diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-02-15 04:24:31 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-15 04:24:31 -0500 |
commit | 0a9d59a2461477bd9ed143c01af9df3f8f00fa81 (patch) | |
tree | df997d1cfb0786427a0df1fbd6f0640fa4248cf4 /net/mac80211 | |
parent | a23ce6da9677d245aa0aadc99f4197030350ab54 (diff) | |
parent | 795abaf1e4e188c4171e3cd3dbb11a9fcacaf505 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/Kconfig | 6 | ||||
-rw-r--r-- | net/mac80211/agg-rx.c | 11 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/main.c | 12 | ||||
-rw-r--r-- | net/mac80211/status.c | 7 | ||||
-rw-r--r-- | net/mac80211/tx.c | 5 |
7 files changed, 29 insertions, 16 deletions
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index 9109262abd24..c766056d0488 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig | |||
@@ -20,7 +20,7 @@ config MAC80211_HAS_RC | |||
20 | def_bool n | 20 | def_bool n |
21 | 21 | ||
22 | config MAC80211_RC_PID | 22 | config MAC80211_RC_PID |
23 | bool "PID controller based rate control algorithm" if EMBEDDED | 23 | bool "PID controller based rate control algorithm" if EXPERT |
24 | select MAC80211_HAS_RC | 24 | select MAC80211_HAS_RC |
25 | ---help--- | 25 | ---help--- |
26 | This option enables a TX rate control algorithm for | 26 | This option enables a TX rate control algorithm for |
@@ -28,14 +28,14 @@ config MAC80211_RC_PID | |||
28 | rate. | 28 | rate. |
29 | 29 | ||
30 | config MAC80211_RC_MINSTREL | 30 | config MAC80211_RC_MINSTREL |
31 | bool "Minstrel" if EMBEDDED | 31 | bool "Minstrel" if EXPERT |
32 | select MAC80211_HAS_RC | 32 | select MAC80211_HAS_RC |
33 | default y | 33 | default y |
34 | ---help--- | 34 | ---help--- |
35 | This option enables the 'minstrel' TX rate control algorithm | 35 | This option enables the 'minstrel' TX rate control algorithm |
36 | 36 | ||
37 | config MAC80211_RC_MINSTREL_HT | 37 | config MAC80211_RC_MINSTREL_HT |
38 | bool "Minstrel 802.11n support" if EMBEDDED | 38 | bool "Minstrel 802.11n support" if EXPERT |
39 | depends on MAC80211_RC_MINSTREL | 39 | depends on MAC80211_RC_MINSTREL |
40 | default y | 40 | default y |
41 | ---help--- | 41 | ---help--- |
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index f138b195d657..227ca82eef72 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 | 235 | ||
243 | /* examine state machine */ | 236 | /* examine state machine */ |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 4bc8a9250cfd..9cd73b11506e 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1822,6 +1822,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
1822 | *cookie ^= 2; | 1822 | *cookie ^= 2; |
1823 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_TX_OFFCHAN; | 1823 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_TX_OFFCHAN; |
1824 | local->hw_roc_skb = skb; | 1824 | local->hw_roc_skb = skb; |
1825 | local->hw_roc_skb_for_status = skb; | ||
1825 | mutex_unlock(&local->mtx); | 1826 | mutex_unlock(&local->mtx); |
1826 | 1827 | ||
1827 | return 0; | 1828 | return 0; |
@@ -1875,6 +1876,7 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, | |||
1875 | if (ret == 0) { | 1876 | if (ret == 0) { |
1876 | kfree_skb(local->hw_roc_skb); | 1877 | kfree_skb(local->hw_roc_skb); |
1877 | local->hw_roc_skb = NULL; | 1878 | local->hw_roc_skb = NULL; |
1879 | local->hw_roc_skb_for_status = NULL; | ||
1878 | } | 1880 | } |
1879 | 1881 | ||
1880 | mutex_unlock(&local->mtx); | 1882 | mutex_unlock(&local->mtx); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c47d7c0e48a4..533fd32f49ff 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -953,7 +953,7 @@ struct ieee80211_local { | |||
953 | 953 | ||
954 | struct ieee80211_channel *hw_roc_channel; | 954 | struct ieee80211_channel *hw_roc_channel; |
955 | struct net_device *hw_roc_dev; | 955 | struct net_device *hw_roc_dev; |
956 | struct sk_buff *hw_roc_skb; | 956 | struct sk_buff *hw_roc_skb, *hw_roc_skb_for_status; |
957 | struct work_struct hw_roc_start, hw_roc_done; | 957 | struct work_struct hw_roc_start, hw_roc_done; |
958 | enum nl80211_channel_type hw_roc_channel_type; | 958 | enum nl80211_channel_type hw_roc_channel_type; |
959 | unsigned int hw_roc_duration; | 959 | unsigned int hw_roc_duration; |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 485d36bc9a46..a46ff06d7cb8 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -39,6 +39,8 @@ module_param(ieee80211_disable_40mhz_24ghz, bool, 0644); | |||
39 | MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz, | 39 | MODULE_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 | ||
42 | static struct lock_class_key ieee80211_rx_skb_queue_class; | ||
43 | |||
42 | void ieee80211_configure_filter(struct ieee80211_local *local) | 44 | void ieee80211_configure_filter(struct ieee80211_local *local) |
43 | { | 45 | { |
44 | u64 mc; | 46 | u64 mc; |
@@ -569,7 +571,15 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
569 | spin_lock_init(&local->filter_lock); | 571 | spin_lock_init(&local->filter_lock); |
570 | spin_lock_init(&local->queue_stop_reason_lock); | 572 | spin_lock_init(&local->queue_stop_reason_lock); |
571 | 573 | ||
572 | skb_queue_head_init(&local->rx_skb_queue); | 574 | /* |
575 | * The rx_skb_queue is only accessed from tasklets, | ||
576 | * but other SKB queues are used from within IRQ | ||
577 | * context. Therefore, this one needs a different | ||
578 | * locking class so our direct, non-irq-safe use of | ||
579 | * the queue's lock doesn't throw lockdep warnings. | ||
580 | */ | ||
581 | skb_queue_head_init_class(&local->rx_skb_queue, | ||
582 | &ieee80211_rx_skb_queue_class); | ||
573 | 583 | ||
574 | INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work); | 584 | INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work); |
575 | 585 | ||
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 38a797217a91..071ac95c4aa0 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -323,6 +323,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
323 | 323 | ||
324 | if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { | 324 | if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { |
325 | struct ieee80211_work *wk; | 325 | struct ieee80211_work *wk; |
326 | u64 cookie = (unsigned long)skb; | ||
326 | 327 | ||
327 | rcu_read_lock(); | 328 | rcu_read_lock(); |
328 | list_for_each_entry_rcu(wk, &local->work_list, list) { | 329 | list_for_each_entry_rcu(wk, &local->work_list, list) { |
@@ -334,8 +335,12 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
334 | break; | 335 | break; |
335 | } | 336 | } |
336 | rcu_read_unlock(); | 337 | rcu_read_unlock(); |
338 | if (local->hw_roc_skb_for_status == skb) { | ||
339 | cookie = local->hw_roc_cookie ^ 2; | ||
340 | local->hw_roc_skb_for_status = NULL; | ||
341 | } | ||
337 | cfg80211_mgmt_tx_status( | 342 | cfg80211_mgmt_tx_status( |
338 | skb->dev, (unsigned long) skb, skb->data, skb->len, | 343 | skb->dev, cookie, skb->data, skb->len, |
339 | !!(info->flags & IEEE80211_TX_STAT_ACK), GFP_ATOMIC); | 344 | !!(info->flags & IEEE80211_TX_STAT_ACK), GFP_ATOMIC); |
340 | } | 345 | } |
341 | 346 | ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index a449dd508682..306533ba0d3d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1547,7 +1547,7 @@ static int ieee80211_skb_resize(struct ieee80211_local *local, | |||
1547 | skb_orphan(skb); | 1547 | skb_orphan(skb); |
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | if (skb_header_cloned(skb)) | 1550 | if (skb_cloned(skb)) |
1551 | I802_DEBUG_INC(local->tx_expand_skb_head_cloned); | 1551 | I802_DEBUG_INC(local->tx_expand_skb_head_cloned); |
1552 | else if (head_need || tail_need) | 1552 | else if (head_need || tail_need) |
1553 | I802_DEBUG_INC(local->tx_expand_skb_head); | 1553 | I802_DEBUG_INC(local->tx_expand_skb_head); |
@@ -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) |