aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c3
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c7
-rw-r--r--include/linux/ieee80211.h54
-rw-r--r--include/net/mac80211.h5
-rw-r--r--net/mac80211/agg-tx.c2
-rw-r--r--net/mac80211/debugfs_key.c17
-rw-r--r--net/mac80211/ibss.c14
-rw-r--r--net/mac80211/iface.c2
-rw-r--r--net/mac80211/key.h3
-rw-r--r--net/mac80211/mlme.c4
-rw-r--r--net/mac80211/rc80211_minstrel.c9
-rw-r--r--net/mac80211/rx.c9
-rw-r--r--net/mac80211/scan.c2
-rw-r--r--net/mac80211/status.c6
-rw-r--r--net/mac80211/wpa.c5
-rw-r--r--net/wireless/chan.c3
-rw-r--r--net/wireless/wext-compat.c2
18 files changed, 101 insertions, 48 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 8a61dbd320e6..ff9085502bea 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2223,7 +2223,7 @@ static int __init init_mac80211_hwsim(void)
2223 IEEE80211_VHT_CAP_RXSTBC_2 | 2223 IEEE80211_VHT_CAP_RXSTBC_2 |
2224 IEEE80211_VHT_CAP_RXSTBC_3 | 2224 IEEE80211_VHT_CAP_RXSTBC_3 |
2225 IEEE80211_VHT_CAP_RXSTBC_4 | 2225 IEEE80211_VHT_CAP_RXSTBC_4 |
2226 IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT; 2226 IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
2227 sband->vht_cap.vht_mcs.rx_mcs_map = 2227 sband->vht_cap.vht_mcs.rx_mcs_map =
2228 cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_8 << 0 | 2228 cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_8 << 0 |
2229 IEEE80211_VHT_MCS_SUPPORT_0_8 << 2 | 2229 IEEE80211_VHT_MCS_SUPPORT_0_8 << 2 |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index d4d0c3664eb2..197b4466a5d2 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -5090,7 +5090,8 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
5090 IEEE80211_HW_SUPPORTS_PS | 5090 IEEE80211_HW_SUPPORTS_PS |
5091 IEEE80211_HW_PS_NULLFUNC_STACK | 5091 IEEE80211_HW_PS_NULLFUNC_STACK |
5092 IEEE80211_HW_AMPDU_AGGREGATION | 5092 IEEE80211_HW_AMPDU_AGGREGATION |
5093 IEEE80211_HW_REPORTS_TX_ACK_STATUS; 5093 IEEE80211_HW_REPORTS_TX_ACK_STATUS |
5094 IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL;
5094 5095
5095 /* 5096 /*
5096 * Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices 5097 * Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 3248b4224c4e..4ffb6a584cd0 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -392,10 +392,9 @@ void rt2x00lib_txdone(struct queue_entry *entry,
392 tx_info->flags |= IEEE80211_TX_STAT_AMPDU; 392 tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
393 tx_info->status.ampdu_len = 1; 393 tx_info->status.ampdu_len = 1;
394 tx_info->status.ampdu_ack_len = success ? 1 : 0; 394 tx_info->status.ampdu_ack_len = success ? 1 : 0;
395 /* 395
396 * TODO: Need to tear down BA session here 396 if (!success)
397 * if not successful. 397 tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
398 */
399 } 398 }
400 399
401 if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) { 400 if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 8f690e53dd89..f0859cc73861 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1251,32 +1251,34 @@ struct ieee80211_vht_operation {
1251#define IEEE80211_VHT_MCS_NOT_SUPPORTED 3 1251#define IEEE80211_VHT_MCS_NOT_SUPPORTED 3
1252 1252
1253/* 802.11ac VHT Capabilities */ 1253/* 802.11ac VHT Capabilities */
1254#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000 1254#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000
1255#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001 1255#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001
1256#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002 1256#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002
1257#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004 1257#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004
1258#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008 1258#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008
1259#define IEEE80211_VHT_CAP_RXLDPC 0x00000010 1259#define IEEE80211_VHT_CAP_RXLDPC 0x00000010
1260#define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020 1260#define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020
1261#define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040 1261#define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040
1262#define IEEE80211_VHT_CAP_TXSTBC 0x00000080 1262#define IEEE80211_VHT_CAP_TXSTBC 0x00000080
1263#define IEEE80211_VHT_CAP_RXSTBC_1 0x00000100 1263#define IEEE80211_VHT_CAP_RXSTBC_1 0x00000100
1264#define IEEE80211_VHT_CAP_RXSTBC_2 0x00000200 1264#define IEEE80211_VHT_CAP_RXSTBC_2 0x00000200
1265#define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300 1265#define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300
1266#define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400 1266#define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400
1267#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 1267#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800
1268#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 1268#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000
1269#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX 0x00006000 1269#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX 0x00006000
1270#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX 0x00030000 1270#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX 0x00030000
1271#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000 1271#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000
1272#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000 1272#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000
1273#define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000 1273#define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000
1274#define IEEE80211_VHT_CAP_HTC_VHT 0x00400000 1274#define IEEE80211_VHT_CAP_HTC_VHT 0x00400000
1275#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT 0x00800000 1275#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT 23
1276#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB 0x08000000 1276#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK \
1277#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB 0x0c000000 1277 (7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT)
1278#define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN 0x10000000 1278#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB 0x08000000
1279#define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN 0x20000000 1279#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB 0x0c000000
1280#define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN 0x10000000
1281#define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN 0x20000000
1280 1282
1281/* Authentication algorithms */ 1283/* Authentication algorithms */
1282#define WLAN_AUTH_OPEN 0 1284#define WLAN_AUTH_OPEN 0
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1c02fb3b3817..ee50c5eba50c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1369,6 +1369,10 @@ struct ieee80211_tx_control {
1369 * @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any 1369 * @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any
1370 * P2P Interface. This will be honoured even if more than one interface 1370 * P2P Interface. This will be honoured even if more than one interface
1371 * is supported. 1371 * is supported.
1372 *
1373 * @IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL: On this hardware TX BA session
1374 * should be tear down once BAR frame will not be acked.
1375 *
1372 */ 1376 */
1373enum ieee80211_hw_flags { 1377enum ieee80211_hw_flags {
1374 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, 1378 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
@@ -1397,6 +1401,7 @@ enum ieee80211_hw_flags {
1397 IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, 1401 IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23,
1398 IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24, 1402 IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24,
1399 IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, 1403 IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25,
1404 IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL = 1<<26,
1400}; 1405};
1401 1406
1402/** 1407/**
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 4152ed1034b8..eb9df22418f0 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -445,7 +445,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
445 445
446 trace_api_start_tx_ba_session(pubsta, tid); 446 trace_api_start_tx_ba_session(pubsta, tid);
447 447
448 if (WARN_ON(!local->ops->ampdu_action)) 448 if (WARN_ON_ONCE(!local->ops->ampdu_action))
449 return -EINVAL; 449 return -EINVAL;
450 450
451 if ((tid >= IEEE80211_NUM_TIDS) || 451 if ((tid >= IEEE80211_NUM_TIDS) ||
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
index 2d4235497f1b..c3a3082b72e5 100644
--- a/net/mac80211/debugfs_key.c
+++ b/net/mac80211/debugfs_key.c
@@ -199,6 +199,22 @@ static ssize_t key_icverrors_read(struct file *file, char __user *userbuf,
199} 199}
200KEY_OPS(icverrors); 200KEY_OPS(icverrors);
201 201
202static ssize_t key_mic_failures_read(struct file *file, char __user *userbuf,
203 size_t count, loff_t *ppos)
204{
205 struct ieee80211_key *key = file->private_data;
206 char buf[20];
207 int len;
208
209 if (key->conf.cipher != WLAN_CIPHER_SUITE_TKIP)
210 return -EINVAL;
211
212 len = scnprintf(buf, sizeof(buf), "%u\n", key->u.tkip.mic_failures);
213
214 return simple_read_from_buffer(userbuf, count, ppos, buf, len);
215}
216KEY_OPS(mic_failures);
217
202static ssize_t key_key_read(struct file *file, char __user *userbuf, 218static ssize_t key_key_read(struct file *file, char __user *userbuf,
203 size_t count, loff_t *ppos) 219 size_t count, loff_t *ppos)
204{ 220{
@@ -260,6 +276,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
260 DEBUGFS_ADD(rx_spec); 276 DEBUGFS_ADD(rx_spec);
261 DEBUGFS_ADD(replays); 277 DEBUGFS_ADD(replays);
262 DEBUGFS_ADD(icverrors); 278 DEBUGFS_ADD(icverrors);
279 DEBUGFS_ADD(mic_failures);
263 DEBUGFS_ADD(key); 280 DEBUGFS_ADD(key);
264 DEBUGFS_ADD(ifindex); 281 DEBUGFS_ADD(ifindex);
265}; 282};
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index fa862b24a7e0..8881fc77fb13 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -201,6 +201,20 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
201 bss_change |= BSS_CHANGED_BASIC_RATES; 201 bss_change |= BSS_CHANGED_BASIC_RATES;
202 bss_change |= BSS_CHANGED_HT; 202 bss_change |= BSS_CHANGED_HT;
203 bss_change |= BSS_CHANGED_IBSS; 203 bss_change |= BSS_CHANGED_IBSS;
204
205 /*
206 * In 5 GHz/802.11a, we can always use short slot time.
207 * (IEEE 802.11-2012 18.3.8.7)
208 *
209 * In 2.4GHz, we must always use long slots in IBSS for compatibility
210 * reasons.
211 * (IEEE 802.11-2012 19.4.5)
212 *
213 * HT follows these specifications (IEEE 802.11-2012 20.3.18)
214 */
215 sdata->vif.bss_conf.use_short_slot = chan->band == IEEE80211_BAND_5GHZ;
216 bss_change |= BSS_CHANGED_ERP_SLOT;
217
204 sdata->vif.bss_conf.ibss_joined = true; 218 sdata->vif.bss_conf.ibss_joined = true;
205 sdata->vif.bss_conf.ibss_creator = creator; 219 sdata->vif.bss_conf.ibss_creator = creator;
206 ieee80211_bss_info_change_notify(sdata, bss_change); 220 ieee80211_bss_info_change_notify(sdata, bss_change);
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 40c36d5d7377..09a80b55cf5a 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -862,7 +862,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
862 rcu_assign_pointer(local->p2p_sdata, NULL); 862 rcu_assign_pointer(local->p2p_sdata, NULL);
863 /* fall through */ 863 /* fall through */
864 default: 864 default:
865 flush_work(&sdata->work); 865 cancel_work_sync(&sdata->work);
866 /* 866 /*
867 * When we get here, the interface is marked down. 867 * When we get here, the interface is marked down.
868 * Call rcu_barrier() to wait both for the RX path 868 * Call rcu_barrier() to wait both for the RX path
diff --git a/net/mac80211/key.h b/net/mac80211/key.h
index 7cff0d3a519c..382dc44ed330 100644
--- a/net/mac80211/key.h
+++ b/net/mac80211/key.h
@@ -81,6 +81,9 @@ struct ieee80211_key {
81 81
82 /* last received RSC */ 82 /* last received RSC */
83 struct tkip_ctx rx[IEEE80211_NUM_TIDS]; 83 struct tkip_ctx rx[IEEE80211_NUM_TIDS];
84
85 /* number of mic failures */
86 u32 mic_failures;
84 } tkip; 87 } tkip;
85 struct { 88 struct {
86 atomic64_t tx_pn; 89 atomic64_t tx_pn;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 09556303c7e1..7753a9ca98a6 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2360,9 +2360,9 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
2360 2360
2361 return RX_MGMT_CFG80211_RX_ASSOC; 2361 return RX_MGMT_CFG80211_RX_ASSOC;
2362} 2362}
2363
2363static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, 2364static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
2364 struct ieee80211_mgmt *mgmt, 2365 struct ieee80211_mgmt *mgmt, size_t len,
2365 size_t len,
2366 struct ieee80211_rx_status *rx_status, 2366 struct ieee80211_rx_status *rx_status,
2367 struct ieee802_11_elems *elems, 2367 struct ieee802_11_elems *elems,
2368 bool beacon) 2368 bool beacon)
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 79633ae06fd6..8c5acdc06226 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -154,6 +154,7 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband,
154 struct ieee80211_sta *sta, void *priv_sta, 154 struct ieee80211_sta *sta, void *priv_sta,
155 struct sk_buff *skb) 155 struct sk_buff *skb)
156{ 156{
157 struct minstrel_priv *mp = priv;
157 struct minstrel_sta_info *mi = priv_sta; 158 struct minstrel_sta_info *mi = priv_sta;
158 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 159 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
159 struct ieee80211_tx_rate *ar = info->status.rates; 160 struct ieee80211_tx_rate *ar = info->status.rates;
@@ -181,6 +182,10 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband,
181 182
182 if (mi->sample_deferred > 0) 183 if (mi->sample_deferred > 0)
183 mi->sample_deferred--; 184 mi->sample_deferred--;
185
186 if (time_after(jiffies, mi->stats_update +
187 (mp->update_interval * HZ) / 1000))
188 minstrel_update_stats(mp, mi);
184} 189}
185 190
186 191
@@ -235,10 +240,6 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
235 240
236 mrr = mp->has_mrr && !txrc->rts && !txrc->bss_conf->use_cts_prot; 241 mrr = mp->has_mrr && !txrc->rts && !txrc->bss_conf->use_cts_prot;
237 242
238 if (time_after(jiffies, mi->stats_update + (mp->update_interval *
239 HZ) / 1000))
240 minstrel_update_stats(mp, mi);
241
242 ndx = mi->max_tp_rate; 243 ndx = mi->max_tp_rate;
243 244
244 if (mrr) 245 if (mrr)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index db343fa8033c..580704eba8b8 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -378,9 +378,6 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
378 * the SKB because it has a bad FCS/PLCP checksum. 378 * the SKB because it has a bad FCS/PLCP checksum.
379 */ 379 */
380 380
381 /* room for the radiotap header based on driver features */
382 needed_headroom = ieee80211_rx_radiotap_space(local, status);
383
384 if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS) 381 if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)
385 present_fcs_len = FCS_LEN; 382 present_fcs_len = FCS_LEN;
386 383
@@ -399,6 +396,9 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
399 return remove_monitor_info(local, origskb); 396 return remove_monitor_info(local, origskb);
400 } 397 }
401 398
399 /* room for the radiotap header based on driver features */
400 needed_headroom = ieee80211_rx_radiotap_space(local, status);
401
402 if (should_drop_frame(origskb, present_fcs_len)) { 402 if (should_drop_frame(origskb, present_fcs_len)) {
403 /* only need to expand headroom if necessary */ 403 /* only need to expand headroom if necessary */
404 skb = origskb; 404 skb = origskb;
@@ -2333,7 +2333,8 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
2333 if (len < IEEE80211_MIN_ACTION_SIZE) 2333 if (len < IEEE80211_MIN_ACTION_SIZE)
2334 return RX_DROP_UNUSABLE; 2334 return RX_DROP_UNUSABLE;
2335 2335
2336 if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC) 2336 if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC &&
2337 mgmt->u.action.category != WLAN_CATEGORY_SELF_PROTECTED)
2337 return RX_DROP_UNUSABLE; 2338 return RX_DROP_UNUSABLE;
2338 2339
2339 if (!(status->rx_flags & IEEE80211_RX_RA_MATCH)) 2340 if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index f7176ac5a535..8ed83dcc149f 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -118,7 +118,7 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
118 struct ieee80211_tim_ie *tim_ie = elems->tim; 118 struct ieee80211_tim_ie *tim_ie = elems->tim;
119 bss->dtim_period = tim_ie->dtim_period; 119 bss->dtim_period = tim_ie->dtim_period;
120 if (!elems->parse_error) 120 if (!elems->parse_error)
121 bss->valid_data |= IEEE80211_BSS_VALID_DTIM; 121 bss->valid_data |= IEEE80211_BSS_VALID_DTIM;
122 } 122 }
123 123
124 /* If the beacon had no TIM IE, or it was invalid, use 1 */ 124 /* If the beacon had no TIM IE, or it was invalid, use 1 */
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index ab50285fcbab..07d99578a2b1 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -502,7 +502,11 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
502 IEEE80211_BAR_CTRL_TID_INFO_MASK) >> 502 IEEE80211_BAR_CTRL_TID_INFO_MASK) >>
503 IEEE80211_BAR_CTRL_TID_INFO_SHIFT; 503 IEEE80211_BAR_CTRL_TID_INFO_SHIFT;
504 504
505 ieee80211_set_bar_pending(sta, tid, ssn); 505 if (local->hw.flags &
506 IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL)
507 ieee80211_stop_tx_ba_session(&sta->sta, tid);
508 else
509 ieee80211_set_bar_pending(sta, tid, ssn);
506 } 510 }
507 } 511 }
508 512
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 8bd2f5c6a56e..c175ee866ff4 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -104,7 +104,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
104 */ 104 */
105 if (status->flag & (RX_FLAG_MMIC_STRIPPED | RX_FLAG_IV_STRIPPED)) { 105 if (status->flag & (RX_FLAG_MMIC_STRIPPED | RX_FLAG_IV_STRIPPED)) {
106 if (status->flag & RX_FLAG_MMIC_ERROR) 106 if (status->flag & RX_FLAG_MMIC_ERROR)
107 goto mic_fail; 107 goto mic_fail_no_key;
108 108
109 if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key && 109 if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key &&
110 rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) 110 rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)
@@ -161,6 +161,9 @@ update_iv:
161 return RX_CONTINUE; 161 return RX_CONTINUE;
162 162
163mic_fail: 163mic_fail:
164 rx->key->u.tkip.mic_failures++;
165
166mic_fail_no_key:
164 /* 167 /*
165 * In some cases the key can be unset - e.g. a multicast packet, in 168 * In some cases the key can be unset - e.g. a multicast packet, in
166 * a driver that supports HW encryption. Send up the key idx only if 169 * a driver that supports HW encryption. Send up the key idx only if
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index b5f69831e318..a7990bb16529 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -265,6 +265,9 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
265 265
266 /* TODO: missing regulatory check on 80/160 bandwidth */ 266 /* TODO: missing regulatory check on 80/160 bandwidth */
267 267
268 if (width > 20)
269 prohibited_flags |= IEEE80211_CHAN_NO_OFDM;
270
268 if (!cfg80211_secondary_chans_ok(wiphy, chandef->center_freq1, 271 if (!cfg80211_secondary_chans_ok(wiphy, chandef->center_freq1,
269 width, prohibited_flags)) 272 width, prohibited_flags))
270 return false; 273 return false;
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index f9680c9cf9b3..d997d0f0c54a 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -176,7 +176,7 @@ int cfg80211_wext_giwrange(struct net_device *dev,
176 case CFG80211_SIGNAL_TYPE_NONE: 176 case CFG80211_SIGNAL_TYPE_NONE:
177 break; 177 break;
178 case CFG80211_SIGNAL_TYPE_MBM: 178 case CFG80211_SIGNAL_TYPE_MBM:
179 range->max_qual.level = -110; 179 range->max_qual.level = (u8)-110;
180 range->max_qual.qual = 70; 180 range->max_qual.qual = 70;
181 range->avg_qual.qual = 35; 181 range->avg_qual.qual = 35;
182 range->max_qual.updated |= IW_QUAL_DBM; 182 range->max_qual.updated |= IW_QUAL_DBM;