Commit 2be6636a authored by Pontus Fuchs's avatar Pontus Fuchs Committed by John W. Linville

wcn36xx: Print FW capabilities

After fw caps exchange, print the FW's capabilities.
Signed-off-by: default avatarPontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4bda7faf
...@@ -178,6 +178,49 @@ static inline u8 get_sta_index(struct ieee80211_vif *vif, ...@@ -178,6 +178,49 @@ static inline u8 get_sta_index(struct ieee80211_vif *vif,
sta_priv->sta_index; sta_priv->sta_index;
} }
static const char * const wcn36xx_caps_names[] = {
"MCC", /* 0 */
"P2P", /* 1 */
"DOT11AC", /* 2 */
"SLM_SESSIONIZATION", /* 3 */
"DOT11AC_OPMODE", /* 4 */
"SAP32STA", /* 5 */
"TDLS", /* 6 */
"P2P_GO_NOA_DECOUPLE_INIT_SCAN",/* 7 */
"WLANACTIVE_OFFLOAD", /* 8 */
"BEACON_OFFLOAD", /* 9 */
"SCAN_OFFLOAD", /* 10 */
"ROAM_OFFLOAD", /* 11 */
"BCN_MISS_OFFLOAD", /* 12 */
"STA_POWERSAVE", /* 13 */
"STA_ADVANCED_PWRSAVE", /* 14 */
"AP_UAPSD", /* 15 */
"AP_DFS", /* 16 */
"BLOCKACK", /* 17 */
"PHY_ERR", /* 18 */
"BCN_FILTER", /* 19 */
"RTT", /* 20 */
"RATECTRL", /* 21 */
"WOW" /* 22 */
};
static const char *wcn36xx_get_cap_name(enum place_holder_in_cap_bitmap x)
{
if (x >= ARRAY_SIZE(wcn36xx_caps_names))
return "UNKNOWN";
return wcn36xx_caps_names[x];
}
static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
{
int i;
for (i = 0; i < MAX_FEATURE_SUPPORTED; i++) {
if (get_feat_caps(wcn->fw_feat_caps, i))
wcn36xx_info("FW Cap %s\n", wcn36xx_get_cap_name(i));
}
}
static int wcn36xx_start(struct ieee80211_hw *hw) static int wcn36xx_start(struct ieee80211_hw *hw)
{ {
struct wcn36xx *wcn = hw->priv; struct wcn36xx *wcn = hw->priv;
...@@ -237,6 +280,8 @@ static int wcn36xx_start(struct ieee80211_hw *hw) ...@@ -237,6 +280,8 @@ static int wcn36xx_start(struct ieee80211_hw *hw)
ret = wcn36xx_smd_feature_caps_exchange(wcn); ret = wcn36xx_smd_feature_caps_exchange(wcn);
if (ret) if (ret)
wcn36xx_warn("Exchange feature caps failed\n"); wcn36xx_warn("Exchange feature caps failed\n");
else
wcn36xx_feat_caps_info(wcn);
} }
INIT_LIST_HEAD(&wcn->vif_list); INIT_LIST_HEAD(&wcn->vif_list);
return 0; return 0;
......
...@@ -1685,8 +1685,7 @@ int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2, ...@@ -1685,8 +1685,7 @@ int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2,
return ret; return ret;
} }
static inline void set_feat_caps(u32 *bitmap, void set_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
enum place_holder_in_cap_bitmap cap)
{ {
int arr_idx, bit_idx; int arr_idx, bit_idx;
...@@ -1700,8 +1699,7 @@ static inline void set_feat_caps(u32 *bitmap, ...@@ -1700,8 +1699,7 @@ static inline void set_feat_caps(u32 *bitmap,
bitmap[arr_idx] |= (1 << bit_idx); bitmap[arr_idx] |= (1 << bit_idx);
} }
static inline int get_feat_caps(u32 *bitmap, int get_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
enum place_holder_in_cap_bitmap cap)
{ {
int arr_idx, bit_idx; int arr_idx, bit_idx;
int ret = 0; int ret = 0;
...@@ -1717,8 +1715,7 @@ static inline int get_feat_caps(u32 *bitmap, ...@@ -1717,8 +1715,7 @@ static inline int get_feat_caps(u32 *bitmap,
return ret; return ret;
} }
static inline void clear_feat_caps(u32 *bitmap, void clear_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
enum place_holder_in_cap_bitmap cap)
{ {
int arr_idx, bit_idx; int arr_idx, bit_idx;
......
...@@ -112,6 +112,9 @@ int wcn36xx_smd_keep_alive_req(struct wcn36xx *wcn, ...@@ -112,6 +112,9 @@ int wcn36xx_smd_keep_alive_req(struct wcn36xx *wcn,
int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2, int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2,
u32 arg3, u32 arg4, u32 arg5); u32 arg3, u32 arg4, u32 arg5);
int wcn36xx_smd_feature_caps_exchange(struct wcn36xx *wcn); int wcn36xx_smd_feature_caps_exchange(struct wcn36xx *wcn);
void set_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
int get_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
void clear_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
int wcn36xx_smd_add_ba_session(struct wcn36xx *wcn, int wcn36xx_smd_add_ba_session(struct wcn36xx *wcn,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment