aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/debugfs_netdev.c14
-rw-r--r--net/mac80211/mlme.c8
-rw-r--r--net/mac80211/rx.c17
3 files changed, 39 insertions, 0 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 2dabdf7680d0..872adb86200c 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -81,6 +81,8 @@ static ssize_t ieee80211_if_fmt_##name( \
81 IEEE80211_IF_FMT(name, field, "%d\n") 81 IEEE80211_IF_FMT(name, field, "%d\n")
82#define IEEE80211_IF_FMT_HEX(name, field) \ 82#define IEEE80211_IF_FMT_HEX(name, field) \
83 IEEE80211_IF_FMT(name, field, "%#x\n") 83 IEEE80211_IF_FMT(name, field, "%#x\n")
84#define IEEE80211_IF_FMT_LHEX(name, field) \
85 IEEE80211_IF_FMT(name, field, "%#lx\n")
84#define IEEE80211_IF_FMT_SIZE(name, field) \ 86#define IEEE80211_IF_FMT_SIZE(name, field) \
85 IEEE80211_IF_FMT(name, field, "%zd\n") 87 IEEE80211_IF_FMT(name, field, "%zd\n")
86 88
@@ -145,6 +147,8 @@ IEEE80211_IF_FILE(rc_rateidx_mask_2ghz, rc_rateidx_mask[IEEE80211_BAND_2GHZ],
145 HEX); 147 HEX);
146IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ], 148IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ],
147 HEX); 149 HEX);
150IEEE80211_IF_FILE(flags, flags, HEX);
151IEEE80211_IF_FILE(state, state, LHEX);
148 152
149/* STA attributes */ 153/* STA attributes */
150IEEE80211_IF_FILE(bssid, u.mgd.bssid, MAC); 154IEEE80211_IF_FILE(bssid, u.mgd.bssid, MAC);
@@ -283,6 +287,8 @@ IEEE80211_IF_FILE(dot11MeshHWMPRootMode,
283static void add_sta_files(struct ieee80211_sub_if_data *sdata) 287static void add_sta_files(struct ieee80211_sub_if_data *sdata)
284{ 288{
285 DEBUGFS_ADD(drop_unencrypted); 289 DEBUGFS_ADD(drop_unencrypted);
290 DEBUGFS_ADD(flags);
291 DEBUGFS_ADD(state);
286 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 292 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
287 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 293 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
288 294
@@ -296,6 +302,8 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
296static void add_ap_files(struct ieee80211_sub_if_data *sdata) 302static void add_ap_files(struct ieee80211_sub_if_data *sdata)
297{ 303{
298 DEBUGFS_ADD(drop_unencrypted); 304 DEBUGFS_ADD(drop_unencrypted);
305 DEBUGFS_ADD(flags);
306 DEBUGFS_ADD(state);
299 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 307 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
300 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 308 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
301 309
@@ -307,6 +315,8 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
307static void add_wds_files(struct ieee80211_sub_if_data *sdata) 315static void add_wds_files(struct ieee80211_sub_if_data *sdata)
308{ 316{
309 DEBUGFS_ADD(drop_unencrypted); 317 DEBUGFS_ADD(drop_unencrypted);
318 DEBUGFS_ADD(flags);
319 DEBUGFS_ADD(state);
310 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 320 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
311 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 321 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
312 322
@@ -316,12 +326,16 @@ static void add_wds_files(struct ieee80211_sub_if_data *sdata)
316static void add_vlan_files(struct ieee80211_sub_if_data *sdata) 326static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
317{ 327{
318 DEBUGFS_ADD(drop_unencrypted); 328 DEBUGFS_ADD(drop_unencrypted);
329 DEBUGFS_ADD(flags);
330 DEBUGFS_ADD(state);
319 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 331 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
320 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 332 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
321} 333}
322 334
323static void add_monitor_files(struct ieee80211_sub_if_data *sdata) 335static void add_monitor_files(struct ieee80211_sub_if_data *sdata)
324{ 336{
337 DEBUGFS_ADD(flags);
338 DEBUGFS_ADD(state);
325} 339}
326 340
327#ifdef CONFIG_MAC80211_MESH 341#ifdef CONFIG_MAC80211_MESH
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 32210695b8b6..dfa752e5520b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -601,6 +601,14 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency)
601 list_for_each_entry(sdata, &local->interfaces, list) { 601 list_for_each_entry(sdata, &local->interfaces, list) {
602 if (!ieee80211_sdata_running(sdata)) 602 if (!ieee80211_sdata_running(sdata))
603 continue; 603 continue;
604 if (sdata->vif.type == NL80211_IFTYPE_AP) {
605 /* If an AP vif is found, then disable PS
606 * by setting the count to zero thereby setting
607 * ps_sdata to NULL.
608 */
609 count = 0;
610 break;
611 }
604 if (sdata->vif.type != NL80211_IFTYPE_STATION) 612 if (sdata->vif.type != NL80211_IFTYPE_STATION)
605 continue; 613 continue;
606 found = sdata; 614 found = sdata;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index f36d70f5b062..7185c9316be2 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -85,6 +85,9 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local,
85 if (len & 1) /* padding for RX_FLAGS if necessary */ 85 if (len & 1) /* padding for RX_FLAGS if necessary */
86 len++; 86 len++;
87 87
88 if (status->flag & RX_FLAG_HT) /* HT info */
89 len += 3;
90
88 return len; 91 return len;
89} 92}
90 93
@@ -193,6 +196,20 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
193 rx_flags |= IEEE80211_RADIOTAP_F_RX_BADPLCP; 196 rx_flags |= IEEE80211_RADIOTAP_F_RX_BADPLCP;
194 put_unaligned_le16(rx_flags, pos); 197 put_unaligned_le16(rx_flags, pos);
195 pos += 2; 198 pos += 2;
199
200 if (status->flag & RX_FLAG_HT) {
201 rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_MCS);
202 *pos++ = IEEE80211_RADIOTAP_MCS_HAVE_MCS |
203 IEEE80211_RADIOTAP_MCS_HAVE_GI |
204 IEEE80211_RADIOTAP_MCS_HAVE_BW;
205 *pos = 0;
206 if (status->flag & RX_FLAG_SHORT_GI)
207 *pos |= IEEE80211_RADIOTAP_MCS_SGI;
208 if (status->flag & RX_FLAG_40MHZ)
209 *pos |= IEEE80211_RADIOTAP_MCS_BW_40;
210 pos++;
211 *pos++ = status->rate_idx;
212 }
196} 213}
197 214
198/* 215/*