aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-01-28 16:23:14 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-28 16:23:14 -0500
commit3e11210d46a4f252f41db6e442b46026aeddbb59 (patch)
treeb258375de649a5e04e8d567c850b47c41f8ceb11 /net/mac80211
parent3bf63e59e577cbecd41334c866f501c4cc5d54c5 (diff)
parentc7c1806098752c1f46943d8db2c69aff07f5d4bc (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts: drivers/net/wireless/ath/ath9k/init.c
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/agg-rx.c11
-rw-r--r--net/mac80211/main.c12
-rw-r--r--net/mac80211/tx.c3
3 files changed, 16 insertions, 10 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 1f51f416242..0c9d0c07eae 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -185,8 +185,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
185 struct ieee80211_mgmt *mgmt, 185 struct ieee80211_mgmt *mgmt,
186 size_t len) 186 size_t len)
187{ 187{
188 struct ieee80211_hw *hw = &local->hw;
189 struct ieee80211_conf *conf = &hw->conf;
190 struct tid_ampdu_rx *tid_agg_rx; 188 struct tid_ampdu_rx *tid_agg_rx;
191 u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num, status; 189 u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num, status;
192 u8 dialog_token; 190 u8 dialog_token;
@@ -231,13 +229,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
231 goto end_no_lock; 229 goto end_no_lock;
232 } 230 }
233 /* determine default buffer size */ 231 /* determine default buffer size */
234 if (buf_size == 0) { 232 if (buf_size == 0)
235 struct ieee80211_supported_band *sband; 233 buf_size = IEEE80211_MAX_AMPDU_BUF;
236
237 sband = local->hw.wiphy->bands[conf->channel->band];
238 buf_size = IEEE80211_MIN_AMPDU_BUF;
239 buf_size = buf_size << sband->ht_cap.ampdu_factor;
240 }
241 234
242 /* make sure the size doesn't exceed the maximum supported by the hw */ 235 /* make sure the size doesn't exceed the maximum supported by the hw */
243 if (buf_size > local->hw.max_rx_aggregation_subframes) 236 if (buf_size > local->hw.max_rx_aggregation_subframes)
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 1c507c6972e..09a27449f3f 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -39,6 +39,8 @@ module_param(ieee80211_disable_40mhz_24ghz, bool, 0644);
39MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz, 39MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz,
40 "Disable 40MHz support in the 2.4GHz band"); 40 "Disable 40MHz support in the 2.4GHz band");
41 41
42static struct lock_class_key ieee80211_rx_skb_queue_class;
43
42void ieee80211_configure_filter(struct ieee80211_local *local) 44void ieee80211_configure_filter(struct ieee80211_local *local)
43{ 45{
44 u64 mc; 46 u64 mc;
@@ -570,7 +572,15 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
570 spin_lock_init(&local->filter_lock); 572 spin_lock_init(&local->filter_lock);
571 spin_lock_init(&local->queue_stop_reason_lock); 573 spin_lock_init(&local->queue_stop_reason_lock);
572 574
573 skb_queue_head_init(&local->rx_skb_queue); 575 /*
576 * The rx_skb_queue is only accessed from tasklets,
577 * but other SKB queues are used from within IRQ
578 * context. Therefore, this one needs a different
579 * locking class so our direct, non-irq-safe use of
580 * the queue's lock doesn't throw lockdep warnings.
581 */
582 skb_queue_head_init_class(&local->rx_skb_queue,
583 &ieee80211_rx_skb_queue_class);
574 584
575 INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work); 585 INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work);
576 586
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e46c801320e..ffc67491c38 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2230,6 +2230,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2230 2230
2231 sdata = vif_to_sdata(vif); 2231 sdata = vif_to_sdata(vif);
2232 2232
2233 if (!ieee80211_sdata_running(sdata))
2234 goto out;
2235
2233 if (tim_offset) 2236 if (tim_offset)
2234 *tim_offset = 0; 2237 *tim_offset = 0;
2235 if (tim_length) 2238 if (tim_length)