aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/work.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-25 04:02:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-29 15:24:35 -0500
commitf30221e4ec62d905b56d5e8f7ccab6b406a97cf5 (patch)
tree07d3a4cf6da15a3622dd79c1d72e0e5c9201566a /net/mac80211/work.c
parentf7ca38dfe58c20cb1aa2ed9643187e8b194b5bae (diff)
mac80211: implement off-channel mgmt TX
This implements the new off-channel TX API in mac80211 with a new work item type. The operation doesn't add a new work item when we're on the right channel and there's no wait time so that for example p2p probe responses will be transmitted without delay. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/work.c')
-rw-r--r--net/mac80211/work.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index ae344d1ba056..2b5c3f267198 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -561,6 +561,25 @@ ieee80211_remain_on_channel_timeout(struct ieee80211_work *wk)
561} 561}
562 562
563static enum work_action __must_check 563static enum work_action __must_check
564ieee80211_offchannel_tx(struct ieee80211_work *wk)
565{
566 if (!wk->started) {
567 wk->timeout = jiffies + msecs_to_jiffies(wk->offchan_tx.wait);
568
569 /*
570 * After this, offchan_tx.frame remains but now is no
571 * longer a valid pointer -- we still need it as the
572 * cookie for canceling this work.
573 */
574 ieee80211_tx_skb(wk->sdata, wk->offchan_tx.frame);
575
576 return WORK_ACT_NONE;
577 }
578
579 return WORK_ACT_TIMEOUT;
580}
581
582static enum work_action __must_check
564ieee80211_assoc_beacon_wait(struct ieee80211_work *wk) 583ieee80211_assoc_beacon_wait(struct ieee80211_work *wk)
565{ 584{
566 if (wk->started) 585 if (wk->started)
@@ -955,6 +974,9 @@ static void ieee80211_work_work(struct work_struct *work)
955 case IEEE80211_WORK_REMAIN_ON_CHANNEL: 974 case IEEE80211_WORK_REMAIN_ON_CHANNEL:
956 rma = ieee80211_remain_on_channel_timeout(wk); 975 rma = ieee80211_remain_on_channel_timeout(wk);
957 break; 976 break;
977 case IEEE80211_WORK_OFFCHANNEL_TX:
978 rma = ieee80211_offchannel_tx(wk);
979 break;
958 case IEEE80211_WORK_ASSOC_BEACON_WAIT: 980 case IEEE80211_WORK_ASSOC_BEACON_WAIT:
959 rma = ieee80211_assoc_beacon_wait(wk); 981 rma = ieee80211_assoc_beacon_wait(wk);
960 break; 982 break;