Skip to content

Commit c66cfd5

Browse files
committed
Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
2 parents ecbbec2 + 8acbcdd commit c66cfd5

18 files changed

Lines changed: 101 additions & 48 deletions

File tree

‎drivers/net/wireless/mac80211_hwsim.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ static int __init init_mac80211_hwsim(void)
22232223
IEEE80211_VHT_CAP_RXSTBC_2 |
22242224
IEEE80211_VHT_CAP_RXSTBC_3 |
22252225
IEEE80211_VHT_CAP_RXSTBC_4 |
2226-
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT;
2226+
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
22272227
sband->vht_cap.vht_mcs.rx_mcs_map =
22282228
cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_8 << 0 |
22292229
IEEE80211_VHT_MCS_SUPPORT_0_8 << 2 |

‎drivers/net/wireless/rt2x00/rt2800lib.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5090,7 +5090,8 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
50905090
IEEE80211_HW_SUPPORTS_PS |
50915091
IEEE80211_HW_PS_NULLFUNC_STACK |
50925092
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;
50945095

50955096
/*
50965097
* Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices

‎drivers/net/wireless/rt2x00/rt2x00dev.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,9 @@ void rt2x00lib_txdone(struct queue_entry *entry,
392392
tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
393393
tx_info->status.ampdu_len = 1;
394394
tx_info->status.ampdu_ack_len = success ? 1 : 0;
395-
/*
396-
* TODO: Need to tear down BA session here
397-
* if not successful.
398-
*/
395+
396+
if (!success)
397+
tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
399398
}
400399

401400
if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {

‎include/linux/ieee80211.h‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,32 +1251,34 @@ struct ieee80211_vht_operation {
12511251
#define IEEE80211_VHT_MCS_NOT_SUPPORTED 3
12521252

12531253
/* 802.11ac VHT Capabilities */
1254-
#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000
1255-
#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001
1256-
#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002
1257-
#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004
1258-
#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008
1259-
#define IEEE80211_VHT_CAP_RXLDPC 0x00000010
1260-
#define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020
1261-
#define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040
1262-
#define IEEE80211_VHT_CAP_TXSTBC 0x00000080
1263-
#define IEEE80211_VHT_CAP_RXSTBC_1 0x00000100
1264-
#define IEEE80211_VHT_CAP_RXSTBC_2 0x00000200
1265-
#define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300
1266-
#define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400
1267-
#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800
1268-
#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000
1269-
#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX 0x00006000
1270-
#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX 0x00030000
1271-
#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000
1272-
#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000
1273-
#define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000
1274-
#define IEEE80211_VHT_CAP_HTC_VHT 0x00400000
1275-
#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT 0x00800000
1276-
#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB 0x08000000
1277-
#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB 0x0c000000
1278-
#define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN 0x10000000
1279-
#define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN 0x20000000
1254+
#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000
1255+
#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001
1256+
#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002
1257+
#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004
1258+
#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008
1259+
#define IEEE80211_VHT_CAP_RXLDPC 0x00000010
1260+
#define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020
1261+
#define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040
1262+
#define IEEE80211_VHT_CAP_TXSTBC 0x00000080
1263+
#define IEEE80211_VHT_CAP_RXSTBC_1 0x00000100
1264+
#define IEEE80211_VHT_CAP_RXSTBC_2 0x00000200
1265+
#define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300
1266+
#define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400
1267+
#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800
1268+
#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000
1269+
#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX 0x00006000
1270+
#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX 0x00030000
1271+
#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000
1272+
#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000
1273+
#define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000
1274+
#define IEEE80211_VHT_CAP_HTC_VHT 0x00400000
1275+
#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT 23
1276+
#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK \
1277+
(7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT)
1278+
#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB 0x08000000
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
12801282

12811283
/* Authentication algorithms */
12821284
#define WLAN_AUTH_OPEN 0

‎include/net/mac80211.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,10 @@ struct ieee80211_tx_control {
13691369
* @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any
13701370
* P2P Interface. This will be honoured even if more than one interface
13711371
* 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+
*
13721376
*/
13731377
enum ieee80211_hw_flags {
13741378
IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
@@ -1397,6 +1401,7 @@ enum ieee80211_hw_flags {
13971401
IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23,
13981402
IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24,
13991403
IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25,
1404+
IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL = 1<<26,
14001405
};
14011406

14021407
/**

‎net/mac80211/agg-tx.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
445445

446446
trace_api_start_tx_ba_session(pubsta, tid);
447447

448-
if (WARN_ON(!local->ops->ampdu_action))
448+
if (WARN_ON_ONCE(!local->ops->ampdu_action))
449449
return -EINVAL;
450450

451451
if ((tid >= IEEE80211_NUM_TIDS) ||

‎net/mac80211/debugfs_key.c‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,22 @@ static ssize_t key_icverrors_read(struct file *file, char __user *userbuf,
199199
}
200200
KEY_OPS(icverrors);
201201

202+
static 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+
}
216+
KEY_OPS(mic_failures);
217+
202218
static ssize_t key_key_read(struct file *file, char __user *userbuf,
203219
size_t count, loff_t *ppos)
204220
{
@@ -260,6 +276,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
260276
DEBUGFS_ADD(rx_spec);
261277
DEBUGFS_ADD(replays);
262278
DEBUGFS_ADD(icverrors);
279+
DEBUGFS_ADD(mic_failures);
263280
DEBUGFS_ADD(key);
264281
DEBUGFS_ADD(ifindex);
265282
};

‎net/mac80211/ibss.c‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,20 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
201201
bss_change |= BSS_CHANGED_BASIC_RATES;
202202
bss_change |= BSS_CHANGED_HT;
203203
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+
204218
sdata->vif.bss_conf.ibss_joined = true;
205219
sdata->vif.bss_conf.ibss_creator = creator;
206220
ieee80211_bss_info_change_notify(sdata, bss_change);

‎net/mac80211/iface.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
862862
rcu_assign_pointer(local->p2p_sdata, NULL);
863863
/* fall through */
864864
default:
865-
flush_work(&sdata->work);
865+
cancel_work_sync(&sdata->work);
866866
/*
867867
* When we get here, the interface is marked down.
868868
* Call rcu_barrier() to wait both for the RX path

‎net/mac80211/key.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ struct ieee80211_key {
8181

8282
/* last received RSC */
8383
struct tkip_ctx rx[IEEE80211_NUM_TIDS];
84+
85+
/* number of mic failures */
86+
u32 mic_failures;
8487
} tkip;
8588
struct {
8689
atomic64_t tx_pn;

0 commit comments

Comments
 (0)