diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-12-18 17:20:48 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-05 16:07:12 -0500 |
commit | 90fc4b3a5ba24f09af2a8c4a723651a328949460 (patch) | |
tree | 0ec7031f451f8a7eb38259b6fe80ec52cf780b43 /net/mac80211/offchannel.c | |
parent | 21f83589644bb2ed98079bf1e2154c8e70ca6a6c (diff) | |
download | blackbird-op-linux-90fc4b3a5ba24f09af2a8c4a723651a328949460.tar.gz blackbird-op-linux-90fc4b3a5ba24f09af2a8c4a723651a328949460.zip |
mac80211: implement off-channel TX using hw r-o-c offload
When the driver has remain-on-channel offload,
implement off-channel transmission using that
primitive.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/offchannel.c')
-rw-r--r-- | net/mac80211/offchannel.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 49b9ec22d9b6..b4e52676f3fb 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -196,6 +196,7 @@ static void ieee80211_hw_roc_start(struct work_struct *work) { struct ieee80211_local *local = container_of(work, struct ieee80211_local, hw_roc_start); + struct ieee80211_sub_if_data *sdata; mutex_lock(&local->mtx); @@ -206,11 +207,19 @@ static void ieee80211_hw_roc_start(struct work_struct *work) ieee80211_recalc_idle(local); - cfg80211_ready_on_channel(local->hw_roc_dev, local->hw_roc_cookie, - local->hw_roc_channel, - local->hw_roc_channel_type, - local->hw_roc_duration, - GFP_KERNEL); + if (local->hw_roc_skb) { + sdata = IEEE80211_DEV_TO_SUB_IF(local->hw_roc_dev); + ieee80211_tx_skb(sdata, local->hw_roc_skb); + local->hw_roc_skb = NULL; + } else { + cfg80211_ready_on_channel(local->hw_roc_dev, + local->hw_roc_cookie, + local->hw_roc_channel, + local->hw_roc_channel_type, + local->hw_roc_duration, + GFP_KERNEL); + } + mutex_unlock(&local->mtx); } @@ -236,11 +245,12 @@ static void ieee80211_hw_roc_done(struct work_struct *work) return; } - cfg80211_remain_on_channel_expired(local->hw_roc_dev, - local->hw_roc_cookie, - local->hw_roc_channel, - local->hw_roc_channel_type, - GFP_KERNEL); + if (!local->hw_roc_for_tx) + cfg80211_remain_on_channel_expired(local->hw_roc_dev, + local->hw_roc_cookie, + local->hw_roc_channel, + local->hw_roc_channel_type, + GFP_KERNEL); local->hw_roc_channel = NULL; local->hw_roc_cookie = 0; |