diff options
author | Eliad Peller <eliad@wizery.com> | 2012-05-13 09:47:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-05 15:21:46 -0400 |
commit | c53f7e150e178b62b9904428ccbe3ae6f3553fdd (patch) | |
tree | 8a273f55f5b331887c52362d11fc48d8b7e32930 /net | |
parent | 72d7872852e1734e94686012a2e9deade3457329 (diff) |
mac80211: use offchannel queue only when supported
Commit 3a25a8c ("mac80211: add improved HW queue control")
added support for offchannel queue mapping. However, this
mapping is only valid when the driver supports
IEEE80211_HW_QUEUE_CONTROL.
Check whether the driver supports IEEE80211_HW_QUEUE_CONTROL
before setting the hw_queue to the mapped offchannel queue.
(This patch doesn't have any actual effect, because
hw_queue is overridden in ieee80211_tx() anyway,
so this is merely some cleanup)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/cfg.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 495831ee48f1..7ad542363f0b 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -2304,7 +2304,8 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
2304 | 2304 | ||
2305 | IEEE80211_SKB_CB(skb)->flags = flags; | 2305 | IEEE80211_SKB_CB(skb)->flags = flags; |
2306 | 2306 | ||
2307 | if (flags & IEEE80211_TX_CTL_TX_OFFCHAN) | 2307 | if (local->hw.flags & IEEE80211_HW_QUEUE_CONTROL && |
2308 | flags & IEEE80211_TX_CTL_TX_OFFCHAN) | ||
2308 | IEEE80211_SKB_CB(skb)->hw_queue = | 2309 | IEEE80211_SKB_CB(skb)->hw_queue = |
2309 | local->hw.offchannel_tx_hw_queue; | 2310 | local->hw.offchannel_tx_hw_queue; |
2310 | 2311 | ||
@@ -2349,8 +2350,9 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
2349 | /* modify cookie to prevent API mismatches */ | 2350 | /* modify cookie to prevent API mismatches */ |
2350 | *cookie ^= 2; | 2351 | *cookie ^= 2; |
2351 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_TX_OFFCHAN; | 2352 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_TX_OFFCHAN; |
2352 | IEEE80211_SKB_CB(skb)->hw_queue = | 2353 | if (local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) |
2353 | local->hw.offchannel_tx_hw_queue; | 2354 | IEEE80211_SKB_CB(skb)->hw_queue = |
2355 | local->hw.offchannel_tx_hw_queue; | ||
2354 | local->hw_roc_skb = skb; | 2356 | local->hw_roc_skb = skb; |
2355 | local->hw_roc_skb_for_status = skb; | 2357 | local->hw_roc_skb_for_status = skb; |
2356 | mutex_unlock(&local->mtx); | 2358 | mutex_unlock(&local->mtx); |