diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index f18cfd727872..cc756e93e6c8 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -182,10 +182,11 @@ static int ieee80211_open(struct net_device *dev) | |||
182 | { | 182 | { |
183 | struct ieee80211_sub_if_data *sdata, *nsdata; | 183 | struct ieee80211_sub_if_data *sdata, *nsdata; |
184 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 184 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
185 | struct sta_info *sta; | ||
185 | struct ieee80211_if_init_conf conf; | 186 | struct ieee80211_if_init_conf conf; |
187 | u32 changed = 0; | ||
186 | int res; | 188 | int res; |
187 | bool need_hw_reconfig = 0; | 189 | bool need_hw_reconfig = 0; |
188 | struct sta_info *sta; | ||
189 | 190 | ||
190 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 191 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
191 | 192 | ||
@@ -329,7 +330,8 @@ static int ieee80211_open(struct net_device *dev) | |||
329 | goto err_stop; | 330 | goto err_stop; |
330 | 331 | ||
331 | ieee80211_if_config(dev); | 332 | ieee80211_if_config(dev); |
332 | ieee80211_reset_erp_info(dev); | 333 | changed |= ieee80211_reset_erp_info(dev); |
334 | ieee80211_bss_info_change_notify(sdata, changed); | ||
333 | ieee80211_enable_keys(sdata); | 335 | ieee80211_enable_keys(sdata); |
334 | 336 | ||
335 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA && | 337 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA && |
@@ -1190,15 +1192,13 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
1190 | changed); | 1192 | changed); |
1191 | } | 1193 | } |
1192 | 1194 | ||
1193 | void ieee80211_reset_erp_info(struct net_device *dev) | 1195 | u32 ieee80211_reset_erp_info(struct net_device *dev) |
1194 | { | 1196 | { |
1195 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1197 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1196 | 1198 | ||
1197 | sdata->bss_conf.use_cts_prot = 0; | 1199 | sdata->bss_conf.use_cts_prot = 0; |
1198 | sdata->bss_conf.use_short_preamble = 0; | 1200 | sdata->bss_conf.use_short_preamble = 0; |
1199 | ieee80211_bss_info_change_notify(sdata, | 1201 | return BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_ERP_PREAMBLE; |
1200 | BSS_CHANGED_ERP_CTS_PROT | | ||
1201 | BSS_CHANGED_ERP_PREAMBLE); | ||
1202 | } | 1202 | } |
1203 | 1203 | ||
1204 | void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | 1204 | void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, |
@@ -1404,14 +1404,15 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1404 | struct ieee80211_local *local = hw_to_local(hw); | 1404 | struct ieee80211_local *local = hw_to_local(hw); |
1405 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 1405 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
1406 | u16 frag, type; | 1406 | u16 frag, type; |
1407 | __le16 fc; | ||
1407 | struct ieee80211_tx_status_rtap_hdr *rthdr; | 1408 | struct ieee80211_tx_status_rtap_hdr *rthdr; |
1408 | struct ieee80211_sub_if_data *sdata; | 1409 | struct ieee80211_sub_if_data *sdata; |
1409 | struct net_device *prev_dev = NULL; | 1410 | struct net_device *prev_dev = NULL; |
1411 | struct sta_info *sta; | ||
1410 | 1412 | ||
1411 | rcu_read_lock(); | 1413 | rcu_read_lock(); |
1412 | 1414 | ||
1413 | if (info->status.excessive_retries) { | 1415 | if (info->status.excessive_retries) { |
1414 | struct sta_info *sta; | ||
1415 | sta = sta_info_get(local, hdr->addr1); | 1416 | sta = sta_info_get(local, hdr->addr1); |
1416 | if (sta) { | 1417 | if (sta) { |
1417 | if (test_sta_flags(sta, WLAN_STA_PS)) { | 1418 | if (test_sta_flags(sta, WLAN_STA_PS)) { |
@@ -1426,8 +1427,24 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1426 | } | 1427 | } |
1427 | } | 1428 | } |
1428 | 1429 | ||
1430 | fc = hdr->frame_control; | ||
1431 | |||
1432 | if ((info->flags & IEEE80211_TX_STAT_AMPDU_NO_BACK) && | ||
1433 | (ieee80211_is_data_qos(fc))) { | ||
1434 | u16 tid, ssn; | ||
1435 | u8 *qc; | ||
1436 | sta = sta_info_get(local, hdr->addr1); | ||
1437 | if (sta) { | ||
1438 | qc = ieee80211_get_qos_ctl(hdr); | ||
1439 | tid = qc[0] & 0xf; | ||
1440 | ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10) | ||
1441 | & IEEE80211_SCTL_SEQ); | ||
1442 | ieee80211_send_bar(sta->sdata->dev, hdr->addr1, | ||
1443 | tid, ssn); | ||
1444 | } | ||
1445 | } | ||
1446 | |||
1429 | if (info->flags & IEEE80211_TX_STAT_TX_FILTERED) { | 1447 | if (info->flags & IEEE80211_TX_STAT_TX_FILTERED) { |
1430 | struct sta_info *sta; | ||
1431 | sta = sta_info_get(local, hdr->addr1); | 1448 | sta = sta_info_get(local, hdr->addr1); |
1432 | if (sta) { | 1449 | if (sta) { |
1433 | ieee80211_handle_filtered_frame(local, sta, skb); | 1450 | ieee80211_handle_filtered_frame(local, sta, skb); |