diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-06-10 04:21:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-14 15:39:27 -0400 |
commit | c1475ca99edcc7216ddc45838ab2c3281c14ba22 (patch) | |
tree | 3f1a5fd9c2fce428382cf49e3140c281a49e006b /net/mac80211/iface.c | |
parent | 344eec67c7b8557234e149d254bca2ae9614d61e (diff) |
mac80211: move aggregation callback processing
This moves the aggregation callback processing
to the per-sdata skb queue and a work function
rather than the tasklet.
Unfortunately, this means that it extends the
pkt_type hack to that skb queue. However, it
will enable making ampdu_action API changes
gradually, my current plan is to get rid of
this again by forcing drivers to only return
from ampdu_action() when everything is done,
thus removing the callbacks completely.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 87fc012e4ab3..9f00d3f174e4 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -482,7 +482,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
482 | } | 482 | } |
483 | /* fall through */ | 483 | /* fall through */ |
484 | default: | 484 | default: |
485 | cancel_work_sync(&sdata->work); | 485 | flush_work(&sdata->work); |
486 | /* | 486 | /* |
487 | * When we get here, the interface is marked down. | 487 | * When we get here, the interface is marked down. |
488 | * Call synchronize_rcu() to wait for the RX path | 488 | * Call synchronize_rcu() to wait for the RX path |
@@ -708,6 +708,7 @@ static void ieee80211_iface_work(struct work_struct *work) | |||
708 | struct ieee80211_local *local = sdata->local; | 708 | struct ieee80211_local *local = sdata->local; |
709 | struct sk_buff *skb; | 709 | struct sk_buff *skb; |
710 | struct sta_info *sta; | 710 | struct sta_info *sta; |
711 | struct ieee80211_ra_tid *ra_tid; | ||
711 | 712 | ||
712 | if (!ieee80211_sdata_running(sdata)) | 713 | if (!ieee80211_sdata_running(sdata)) |
713 | return; | 714 | return; |
@@ -727,8 +728,16 @@ static void ieee80211_iface_work(struct work_struct *work) | |||
727 | while ((skb = skb_dequeue(&sdata->skb_queue))) { | 728 | while ((skb = skb_dequeue(&sdata->skb_queue))) { |
728 | struct ieee80211_mgmt *mgmt = (void *)skb->data; | 729 | struct ieee80211_mgmt *mgmt = (void *)skb->data; |
729 | 730 | ||
730 | if (ieee80211_is_action(mgmt->frame_control) && | 731 | if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_START) { |
731 | mgmt->u.action.category == WLAN_CATEGORY_BACK) { | 732 | ra_tid = (void *)&skb->cb; |
733 | ieee80211_start_tx_ba_cb(&sdata->vif, ra_tid->ra, | ||
734 | ra_tid->tid); | ||
735 | } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_STOP) { | ||
736 | ra_tid = (void *)&skb->cb; | ||
737 | ieee80211_stop_tx_ba_cb(&sdata->vif, ra_tid->ra, | ||
738 | ra_tid->tid); | ||
739 | } else if (ieee80211_is_action(mgmt->frame_control) && | ||
740 | mgmt->u.action.category == WLAN_CATEGORY_BACK) { | ||
732 | int len = skb->len; | 741 | int len = skb->len; |
733 | 742 | ||
734 | rcu_read_lock(); | 743 | rcu_read_lock(); |