diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 8 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/main.c | 6 | ||||
-rw-r--r-- | net/mac80211/scan.c | 2 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 11 | ||||
-rw-r--r-- | net/mac80211/status.c | 9 | ||||
-rw-r--r-- | net/mac80211/tx.c | 9 | ||||
-rw-r--r-- | net/mac80211/util.c | 2 |
9 files changed, 39 insertions, 13 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 05f3a313db88..7371f676cf41 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -2594,6 +2594,9 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, | |||
2594 | else | 2594 | else |
2595 | local->probe_req_reg--; | 2595 | local->probe_req_reg--; |
2596 | 2596 | ||
2597 | if (!local->open_count) | ||
2598 | break; | ||
2599 | |||
2597 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); | 2600 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); |
2598 | break; | 2601 | break; |
2599 | default: | 2602 | default: |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index bf87c70ac6c5..c21e33d1abd0 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -1151,10 +1151,6 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
1151 | 1151 | ||
1152 | mutex_lock(&sdata->u.ibss.mtx); | 1152 | mutex_lock(&sdata->u.ibss.mtx); |
1153 | 1153 | ||
1154 | sdata->u.ibss.state = IEEE80211_IBSS_MLME_SEARCH; | ||
1155 | memset(sdata->u.ibss.bssid, 0, ETH_ALEN); | ||
1156 | sdata->u.ibss.ssid_len = 0; | ||
1157 | |||
1158 | active_ibss = ieee80211_sta_active_ibss(sdata); | 1154 | active_ibss = ieee80211_sta_active_ibss(sdata); |
1159 | 1155 | ||
1160 | if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) { | 1156 | if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) { |
@@ -1175,6 +1171,10 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
1175 | } | 1171 | } |
1176 | } | 1172 | } |
1177 | 1173 | ||
1174 | ifibss->state = IEEE80211_IBSS_MLME_SEARCH; | ||
1175 | memset(ifibss->bssid, 0, ETH_ALEN); | ||
1176 | ifibss->ssid_len = 0; | ||
1177 | |||
1178 | sta_info_flush(sdata->local, sdata); | 1178 | sta_info_flush(sdata->local, sdata); |
1179 | 1179 | ||
1180 | spin_lock_bh(&ifibss->incomplete_lock); | 1180 | spin_lock_bh(&ifibss->incomplete_lock); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 8c804550465b..156e5835e37f 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1314,6 +1314,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, | |||
1314 | struct net_device *dev); | 1314 | struct net_device *dev); |
1315 | netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | 1315 | netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, |
1316 | struct net_device *dev); | 1316 | struct net_device *dev); |
1317 | void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, | ||
1318 | struct sk_buff_head *skbs); | ||
1317 | 1319 | ||
1318 | /* HT */ | 1320 | /* HT */ |
1319 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, | 1321 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index c80c4490351c..f57f597972f8 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -871,8 +871,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
871 | local->hw.wiphy->cipher_suites, | 871 | local->hw.wiphy->cipher_suites, |
872 | sizeof(u32) * local->hw.wiphy->n_cipher_suites, | 872 | sizeof(u32) * local->hw.wiphy->n_cipher_suites, |
873 | GFP_KERNEL); | 873 | GFP_KERNEL); |
874 | if (!suites) | 874 | if (!suites) { |
875 | return -ENOMEM; | 875 | result = -ENOMEM; |
876 | goto fail_wiphy_register; | ||
877 | } | ||
876 | for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { | 878 | for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { |
877 | u32 suite = local->hw.wiphy->cipher_suites[r]; | 879 | u32 suite = local->hw.wiphy->cipher_suites[r]; |
878 | if (suite == WLAN_CIPHER_SUITE_WEP40 || | 880 | if (suite == WLAN_CIPHER_SUITE_WEP40 || |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index c4cdbde24fd3..43e60b5a7546 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -917,7 +917,7 @@ int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, | |||
917 | struct cfg80211_sched_scan_request *req) | 917 | struct cfg80211_sched_scan_request *req) |
918 | { | 918 | { |
919 | struct ieee80211_local *local = sdata->local; | 919 | struct ieee80211_local *local = sdata->local; |
920 | struct ieee80211_sched_scan_ies sched_scan_ies; | 920 | struct ieee80211_sched_scan_ies sched_scan_ies = {}; |
921 | int ret, i; | 921 | int ret, i; |
922 | 922 | ||
923 | mutex_lock(&local->mtx); | 923 | mutex_lock(&local->mtx); |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 0a4e4c04db89..d2eb64e12353 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -117,8 +117,8 @@ static void free_sta_work(struct work_struct *wk) | |||
117 | 117 | ||
118 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { | 118 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { |
119 | local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); | 119 | local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); |
120 | __skb_queue_purge(&sta->ps_tx_buf[ac]); | 120 | ieee80211_purge_tx_queue(&local->hw, &sta->ps_tx_buf[ac]); |
121 | __skb_queue_purge(&sta->tx_filtered[ac]); | 121 | ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]); |
122 | } | 122 | } |
123 | 123 | ||
124 | #ifdef CONFIG_MAC80211_MESH | 124 | #ifdef CONFIG_MAC80211_MESH |
@@ -141,7 +141,7 @@ static void free_sta_work(struct work_struct *wk) | |||
141 | tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); | 141 | tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); |
142 | if (!tid_tx) | 142 | if (!tid_tx) |
143 | continue; | 143 | continue; |
144 | __skb_queue_purge(&tid_tx->pending); | 144 | ieee80211_purge_tx_queue(&local->hw, &tid_tx->pending); |
145 | kfree(tid_tx); | 145 | kfree(tid_tx); |
146 | } | 146 | } |
147 | 147 | ||
@@ -961,6 +961,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
961 | struct ieee80211_local *local = sdata->local; | 961 | struct ieee80211_local *local = sdata->local; |
962 | struct sk_buff_head pending; | 962 | struct sk_buff_head pending; |
963 | int filtered = 0, buffered = 0, ac; | 963 | int filtered = 0, buffered = 0, ac; |
964 | unsigned long flags; | ||
964 | 965 | ||
965 | clear_sta_flag(sta, WLAN_STA_SP); | 966 | clear_sta_flag(sta, WLAN_STA_SP); |
966 | 967 | ||
@@ -976,12 +977,16 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
976 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { | 977 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { |
977 | int count = skb_queue_len(&pending), tmp; | 978 | int count = skb_queue_len(&pending), tmp; |
978 | 979 | ||
980 | spin_lock_irqsave(&sta->tx_filtered[ac].lock, flags); | ||
979 | skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); | 981 | skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); |
982 | spin_unlock_irqrestore(&sta->tx_filtered[ac].lock, flags); | ||
980 | tmp = skb_queue_len(&pending); | 983 | tmp = skb_queue_len(&pending); |
981 | filtered += tmp - count; | 984 | filtered += tmp - count; |
982 | count = tmp; | 985 | count = tmp; |
983 | 986 | ||
987 | spin_lock_irqsave(&sta->ps_tx_buf[ac].lock, flags); | ||
984 | skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); | 988 | skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); |
989 | spin_unlock_irqrestore(&sta->ps_tx_buf[ac].lock, flags); | ||
985 | tmp = skb_queue_len(&pending); | 990 | tmp = skb_queue_len(&pending); |
986 | buffered += tmp - count; | 991 | buffered += tmp - count; |
987 | } | 992 | } |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 3af0cc4130f1..101eb88a2b78 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -668,3 +668,12 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
668 | dev_kfree_skb_any(skb); | 668 | dev_kfree_skb_any(skb); |
669 | } | 669 | } |
670 | EXPORT_SYMBOL(ieee80211_free_txskb); | 670 | EXPORT_SYMBOL(ieee80211_free_txskb); |
671 | |||
672 | void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, | ||
673 | struct sk_buff_head *skbs) | ||
674 | { | ||
675 | struct sk_buff *skb; | ||
676 | |||
677 | while ((skb = __skb_dequeue(skbs))) | ||
678 | ieee80211_free_txskb(hw, skb); | ||
679 | } | ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c9bf83f36657..b858ebe41fda 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1358,7 +1358,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx) | |||
1358 | if (tx->skb) | 1358 | if (tx->skb) |
1359 | ieee80211_free_txskb(&tx->local->hw, tx->skb); | 1359 | ieee80211_free_txskb(&tx->local->hw, tx->skb); |
1360 | else | 1360 | else |
1361 | __skb_queue_purge(&tx->skbs); | 1361 | ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); |
1362 | return -1; | 1362 | return -1; |
1363 | } else if (unlikely(res == TX_QUEUED)) { | 1363 | } else if (unlikely(res == TX_QUEUED)) { |
1364 | I802_DEBUG_INC(tx->local->tx_handlers_queued); | 1364 | I802_DEBUG_INC(tx->local->tx_handlers_queued); |
@@ -2120,10 +2120,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
2120 | */ | 2120 | */ |
2121 | void ieee80211_clear_tx_pending(struct ieee80211_local *local) | 2121 | void ieee80211_clear_tx_pending(struct ieee80211_local *local) |
2122 | { | 2122 | { |
2123 | struct sk_buff *skb; | ||
2123 | int i; | 2124 | int i; |
2124 | 2125 | ||
2125 | for (i = 0; i < local->hw.queues; i++) | 2126 | for (i = 0; i < local->hw.queues; i++) { |
2126 | skb_queue_purge(&local->pending[i]); | 2127 | while ((skb = skb_dequeue(&local->pending[i])) != NULL) |
2128 | ieee80211_free_txskb(&local->hw, skb); | ||
2129 | } | ||
2127 | } | 2130 | } |
2128 | 2131 | ||
2129 | /* | 2132 | /* |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 239391807ca9..0151ae33c4cd 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1491,6 +1491,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1491 | list_for_each_entry(sdata, &local->interfaces, list) { | 1491 | list_for_each_entry(sdata, &local->interfaces, list) { |
1492 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 1492 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
1493 | continue; | 1493 | continue; |
1494 | if (!sdata->u.mgd.associated) | ||
1495 | continue; | ||
1494 | 1496 | ||
1495 | ieee80211_send_nullfunc(local, sdata, 0); | 1497 | ieee80211_send_nullfunc(local, sdata, 0); |
1496 | } | 1498 | } |