aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/main.c45
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c9
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.h3
3 files changed, 51 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index a801aaa76037..95fd5c6614b0 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -178,6 +178,49 @@ static inline u8 get_sta_index(struct ieee80211_vif *vif,
178 sta_priv->sta_index; 178 sta_priv->sta_index;
179} 179}
180 180
181static const char * const wcn36xx_caps_names[] = {
182 "MCC", /* 0 */
183 "P2P", /* 1 */
184 "DOT11AC", /* 2 */
185 "SLM_SESSIONIZATION", /* 3 */
186 "DOT11AC_OPMODE", /* 4 */
187 "SAP32STA", /* 5 */
188 "TDLS", /* 6 */
189 "P2P_GO_NOA_DECOUPLE_INIT_SCAN",/* 7 */
190 "WLANACTIVE_OFFLOAD", /* 8 */
191 "BEACON_OFFLOAD", /* 9 */
192 "SCAN_OFFLOAD", /* 10 */
193 "ROAM_OFFLOAD", /* 11 */
194 "BCN_MISS_OFFLOAD", /* 12 */
195 "STA_POWERSAVE", /* 13 */
196 "STA_ADVANCED_PWRSAVE", /* 14 */
197 "AP_UAPSD", /* 15 */
198 "AP_DFS", /* 16 */
199 "BLOCKACK", /* 17 */
200 "PHY_ERR", /* 18 */
201 "BCN_FILTER", /* 19 */
202 "RTT", /* 20 */
203 "RATECTRL", /* 21 */
204 "WOW" /* 22 */
205};
206
207static const char *wcn36xx_get_cap_name(enum place_holder_in_cap_bitmap x)
208{
209 if (x >= ARRAY_SIZE(wcn36xx_caps_names))
210 return "UNKNOWN";
211 return wcn36xx_caps_names[x];
212}
213
214static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
215{
216 int i;
217
218 for (i = 0; i < MAX_FEATURE_SUPPORTED; i++) {
219 if (get_feat_caps(wcn->fw_feat_caps, i))
220 wcn36xx_info("FW Cap %s\n", wcn36xx_get_cap_name(i));
221 }
222}
223
181static int wcn36xx_start(struct ieee80211_hw *hw) 224static int wcn36xx_start(struct ieee80211_hw *hw)
182{ 225{
183 struct wcn36xx *wcn = hw->priv; 226 struct wcn36xx *wcn = hw->priv;
@@ -237,6 +280,8 @@ static int wcn36xx_start(struct ieee80211_hw *hw)
237 ret = wcn36xx_smd_feature_caps_exchange(wcn); 280 ret = wcn36xx_smd_feature_caps_exchange(wcn);
238 if (ret) 281 if (ret)
239 wcn36xx_warn("Exchange feature caps failed\n"); 282 wcn36xx_warn("Exchange feature caps failed\n");
283 else
284 wcn36xx_feat_caps_info(wcn);
240 } 285 }
241 INIT_LIST_HEAD(&wcn->vif_list); 286 INIT_LIST_HEAD(&wcn->vif_list);
242 return 0; 287 return 0;
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index d5e90c45a482..ae36409656db 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1685,8 +1685,7 @@ out:
1685 return ret; 1685 return ret;
1686} 1686}
1687 1687
1688static inline void set_feat_caps(u32 *bitmap, 1688void set_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
1689 enum place_holder_in_cap_bitmap cap)
1690{ 1689{
1691 int arr_idx, bit_idx; 1690 int arr_idx, bit_idx;
1692 1691
@@ -1700,8 +1699,7 @@ static inline void set_feat_caps(u32 *bitmap,
1700 bitmap[arr_idx] |= (1 << bit_idx); 1699 bitmap[arr_idx] |= (1 << bit_idx);
1701} 1700}
1702 1701
1703static inline int get_feat_caps(u32 *bitmap, 1702int get_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
1704 enum place_holder_in_cap_bitmap cap)
1705{ 1703{
1706 int arr_idx, bit_idx; 1704 int arr_idx, bit_idx;
1707 int ret = 0; 1705 int ret = 0;
@@ -1717,8 +1715,7 @@ static inline int get_feat_caps(u32 *bitmap,
1717 return ret; 1715 return ret;
1718} 1716}
1719 1717
1720static inline void clear_feat_caps(u32 *bitmap, 1718void clear_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
1721 enum place_holder_in_cap_bitmap cap)
1722{ 1719{
1723 int arr_idx, bit_idx; 1720 int arr_idx, bit_idx;
1724 1721
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h
index c46246f8acb9..008d03423dbf 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.h
+++ b/drivers/net/wireless/ath/wcn36xx/smd.h
@@ -112,6 +112,9 @@ int wcn36xx_smd_keep_alive_req(struct wcn36xx *wcn,
112int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2, 112int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2,
113 u32 arg3, u32 arg4, u32 arg5); 113 u32 arg3, u32 arg4, u32 arg5);
114int wcn36xx_smd_feature_caps_exchange(struct wcn36xx *wcn); 114int wcn36xx_smd_feature_caps_exchange(struct wcn36xx *wcn);
115void set_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
116int get_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
117void clear_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
115 118
116int wcn36xx_smd_add_ba_session(struct wcn36xx *wcn, 119int wcn36xx_smd_add_ba_session(struct wcn36xx *wcn,
117 struct ieee80211_sta *sta, 120 struct ieee80211_sta *sta,