aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-10-10 11:59:54 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-10 11:59:54 -0400
commit85457685e0e314f6902caaef976b3fd8ef4f51b4 (patch)
treea5610b82fdf0a9f2b315cab37656ab97abf93a38 /net
parent2474542f64432398f503373f53bdf620491bcfa8 (diff)
parentc3e7724b6bc2f25e46c38dbe68f09d71fafeafb8 (diff)
Merge tag 'master-2012-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says: ==================== Here is a batch of fixes intended for 3.7... Amitkumar Karwar provides a couple of mwifiex fixes to correctly report some reason codes for certain connection failures. He also provides a fix to cleanup after a scanning failure. Bing Zhao rounds that out with another mwifiex scanning fix. Daniel Golle gives us a fix for a copy/paste error in rt2x00. Felix Fietkau brings a couple of ath9k fixes related to suspend/resume, and a couple of fixes to prevent memory leaks in ath9k and mac80211. Ronald Wahl sends a carl9170 fix for a sleep in softirq context. Thomas Pedersen reorders some code to prevent drv_get_tsf from being called while holding a spinlock, now that it can sleep. Finally, Wei Yongjun prevents a NULL pointer dereference in the ath5k driver. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mesh_sync.c3
-rw-r--r--net/mac80211/status.c4
-rw-r--r--net/mac80211/tx.c22
3 files changed, 15 insertions, 14 deletions
diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c
index accfa00ffcd..a16b7b4b1e0 100644
--- a/net/mac80211/mesh_sync.c
+++ b/net/mac80211/mesh_sync.c
@@ -56,7 +56,6 @@ void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata)
56 u64 tsfdelta; 56 u64 tsfdelta;
57 57
58 spin_lock_bh(&ifmsh->sync_offset_lock); 58 spin_lock_bh(&ifmsh->sync_offset_lock);
59
60 if (ifmsh->sync_offset_clockdrift_max < beacon_int_fraction) { 59 if (ifmsh->sync_offset_clockdrift_max < beacon_int_fraction) {
61 msync_dbg(sdata, "TBTT : max clockdrift=%lld; adjusting\n", 60 msync_dbg(sdata, "TBTT : max clockdrift=%lld; adjusting\n",
62 (long long) ifmsh->sync_offset_clockdrift_max); 61 (long long) ifmsh->sync_offset_clockdrift_max);
@@ -69,11 +68,11 @@ void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata)
69 tsfdelta = -beacon_int_fraction; 68 tsfdelta = -beacon_int_fraction;
70 ifmsh->sync_offset_clockdrift_max -= beacon_int_fraction; 69 ifmsh->sync_offset_clockdrift_max -= beacon_int_fraction;
71 } 70 }
71 spin_unlock_bh(&ifmsh->sync_offset_lock);
72 72
73 tsf = drv_get_tsf(local, sdata); 73 tsf = drv_get_tsf(local, sdata);
74 if (tsf != -1ULL) 74 if (tsf != -1ULL)
75 drv_set_tsf(local, sdata, tsf + tsfdelta); 75 drv_set_tsf(local, sdata, tsf + tsfdelta);
76 spin_unlock_bh(&ifmsh->sync_offset_lock);
77} 76}
78 77
79static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, 78static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 2ce89732d0f..3af0cc4130f 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -34,7 +34,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
34 skb_queue_len(&local->skb_queue_unreliable); 34 skb_queue_len(&local->skb_queue_unreliable);
35 while (tmp > IEEE80211_IRQSAFE_QUEUE_LIMIT && 35 while (tmp > IEEE80211_IRQSAFE_QUEUE_LIMIT &&
36 (skb = skb_dequeue(&local->skb_queue_unreliable))) { 36 (skb = skb_dequeue(&local->skb_queue_unreliable))) {
37 dev_kfree_skb_irq(skb); 37 ieee80211_free_txskb(hw, skb);
38 tmp--; 38 tmp--;
39 I802_DEBUG_INC(local->tx_status_drop); 39 I802_DEBUG_INC(local->tx_status_drop);
40 } 40 }
@@ -159,7 +159,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
159 "dropped TX filtered frame, queue_len=%d PS=%d @%lu\n", 159 "dropped TX filtered frame, queue_len=%d PS=%d @%lu\n",
160 skb_queue_len(&sta->tx_filtered[ac]), 160 skb_queue_len(&sta->tx_filtered[ac]),
161 !!test_sta_flag(sta, WLAN_STA_PS_STA), jiffies); 161 !!test_sta_flag(sta, WLAN_STA_PS_STA), jiffies);
162 dev_kfree_skb(skb); 162 ieee80211_free_txskb(&local->hw, skb);
163} 163}
164 164
165static void ieee80211_check_pending_bar(struct sta_info *sta, u8 *addr, u8 tid) 165static void ieee80211_check_pending_bar(struct sta_info *sta, u8 *addr, u8 tid)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e0e0d1d0e83..c9bf83f3665 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -354,7 +354,7 @@ static void purge_old_ps_buffers(struct ieee80211_local *local)
354 total += skb_queue_len(&sta->ps_tx_buf[ac]); 354 total += skb_queue_len(&sta->ps_tx_buf[ac]);
355 if (skb) { 355 if (skb) {
356 purged++; 356 purged++;
357 dev_kfree_skb(skb); 357 ieee80211_free_txskb(&local->hw, skb);
358 break; 358 break;
359 } 359 }
360 } 360 }
@@ -466,7 +466,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
466 ps_dbg(tx->sdata, 466 ps_dbg(tx->sdata,
467 "STA %pM TX buffer for AC %d full - dropping oldest frame\n", 467 "STA %pM TX buffer for AC %d full - dropping oldest frame\n",
468 sta->sta.addr, ac); 468 sta->sta.addr, ac);
469 dev_kfree_skb(old); 469 ieee80211_free_txskb(&local->hw, old);
470 } else 470 } else
471 tx->local->total_ps_buffered++; 471 tx->local->total_ps_buffered++;
472 472
@@ -1103,7 +1103,7 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
1103 spin_unlock(&tx->sta->lock); 1103 spin_unlock(&tx->sta->lock);
1104 1104
1105 if (purge_skb) 1105 if (purge_skb)
1106 dev_kfree_skb(purge_skb); 1106 ieee80211_free_txskb(&tx->local->hw, purge_skb);
1107 } 1107 }
1108 1108
1109 /* reset session timer */ 1109 /* reset session timer */
@@ -1214,7 +1214,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
1214#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 1214#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
1215 if (WARN_ON_ONCE(q >= local->hw.queues)) { 1215 if (WARN_ON_ONCE(q >= local->hw.queues)) {
1216 __skb_unlink(skb, skbs); 1216 __skb_unlink(skb, skbs);
1217 dev_kfree_skb(skb); 1217 ieee80211_free_txskb(&local->hw, skb);
1218 continue; 1218 continue;
1219 } 1219 }
1220#endif 1220#endif
@@ -1356,7 +1356,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
1356 if (unlikely(res == TX_DROP)) { 1356 if (unlikely(res == TX_DROP)) {
1357 I802_DEBUG_INC(tx->local->tx_handlers_drop); 1357 I802_DEBUG_INC(tx->local->tx_handlers_drop);
1358 if (tx->skb) 1358 if (tx->skb)
1359 dev_kfree_skb(tx->skb); 1359 ieee80211_free_txskb(&tx->local->hw, tx->skb);
1360 else 1360 else
1361 __skb_queue_purge(&tx->skbs); 1361 __skb_queue_purge(&tx->skbs);
1362 return -1; 1362 return -1;
@@ -1393,7 +1393,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
1393 res_prepare = ieee80211_tx_prepare(sdata, &tx, skb); 1393 res_prepare = ieee80211_tx_prepare(sdata, &tx, skb);
1394 1394
1395 if (unlikely(res_prepare == TX_DROP)) { 1395 if (unlikely(res_prepare == TX_DROP)) {
1396 dev_kfree_skb(skb); 1396 ieee80211_free_txskb(&local->hw, skb);
1397 goto out; 1397 goto out;
1398 } else if (unlikely(res_prepare == TX_QUEUED)) { 1398 } else if (unlikely(res_prepare == TX_QUEUED)) {
1399 goto out; 1399 goto out;
@@ -1465,7 +1465,7 @@ void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
1465 headroom = max_t(int, 0, headroom); 1465 headroom = max_t(int, 0, headroom);
1466 1466
1467 if (ieee80211_skb_resize(sdata, skb, headroom, may_encrypt)) { 1467 if (ieee80211_skb_resize(sdata, skb, headroom, may_encrypt)) {
1468 dev_kfree_skb(skb); 1468 ieee80211_free_txskb(&local->hw, skb);
1469 rcu_read_unlock(); 1469 rcu_read_unlock();
1470 return; 1470 return;
1471 } 1471 }
@@ -2050,8 +2050,10 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
2050 head_need += IEEE80211_ENCRYPT_HEADROOM; 2050 head_need += IEEE80211_ENCRYPT_HEADROOM;
2051 head_need += local->tx_headroom; 2051 head_need += local->tx_headroom;
2052 head_need = max_t(int, 0, head_need); 2052 head_need = max_t(int, 0, head_need);
2053 if (ieee80211_skb_resize(sdata, skb, head_need, true)) 2053 if (ieee80211_skb_resize(sdata, skb, head_need, true)) {
2054 goto fail; 2054 ieee80211_free_txskb(&local->hw, skb);
2055 return NETDEV_TX_OK;
2056 }
2055 } 2057 }
2056 2058
2057 if (encaps_data) { 2059 if (encaps_data) {
@@ -2184,7 +2186,7 @@ void ieee80211_tx_pending(unsigned long data)
2184 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 2186 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
2185 2187
2186 if (WARN_ON(!info->control.vif)) { 2188 if (WARN_ON(!info->control.vif)) {
2187 kfree_skb(skb); 2189 ieee80211_free_txskb(&local->hw, skb);
2188 continue; 2190 continue;
2189 } 2191 }
2190 2192