From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 15/23] mac80211: move BA session work
Date: Thu, 10 Jun 2010 10:21:43 +0200 [thread overview]
Message-ID: <20100610082231.512809279@sipsolutions.net> (raw)
In-Reply-To: 20100610082128.641664439@sipsolutions.net
From: Johannes Berg <johannes.berg@intel.com>
Move the block-ack session works into common
code, since it will be needed for RX agg too
in the next patches.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/agg-tx.c | 39 +++------------------------------------
net/mac80211/ht.c | 32 ++++++++++++++++++++++++++++++++
net/mac80211/ieee80211_i.h | 5 ++++-
net/mac80211/sta_info.c | 2 +-
4 files changed, 40 insertions(+), 38 deletions(-)
--- wireless-testing.orig/net/mac80211/agg-tx.c 2010-06-09 17:21:13.000000000 +0200
+++ wireless-testing/net/mac80211/agg-tx.c 2010-06-09 17:21:14.000000000 +0200
@@ -133,9 +133,8 @@ static void kfree_tid_tx(struct rcu_head
kfree(tid_tx);
}
-static int ___ieee80211_stop_tx_ba_session(
- struct sta_info *sta, u16 tid,
- enum ieee80211_back_parties initiator)
+int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
+ enum ieee80211_back_parties initiator)
{
struct ieee80211_local *local = sta->local;
struct tid_ampdu_tx *tid_tx = sta->ampdu_mlme.tid_tx[tid];
@@ -262,7 +261,7 @@ ieee80211_wake_queue_agg(struct ieee8021
__release(agg_queue);
}
-static void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
+void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
{
struct tid_ampdu_tx *tid_tx = sta->ampdu_mlme.tid_tx[tid];
struct ieee80211_local *local = sta->local;
@@ -318,38 +317,6 @@ static void ieee80211_tx_ba_session_hand
0x40, 5000);
}
-void ieee80211_tx_ba_session_work(struct work_struct *work)
-{
- struct sta_info *sta =
- container_of(work, struct sta_info, ampdu_mlme.work);
- struct tid_ampdu_tx *tid_tx;
- int tid;
-
- /*
- * When this flag is set, new sessions should be
- * blocked, and existing sessions will be torn
- * down by the code that set the flag, so this
- * need not run.
- */
- if (test_sta_flags(sta, WLAN_STA_BLOCK_BA))
- return;
-
- spin_lock_bh(&sta->lock);
- for (tid = 0; tid < STA_TID_NUM; tid++) {
- tid_tx = sta->ampdu_mlme.tid_tx[tid];
- if (!tid_tx)
- continue;
-
- if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state))
- ieee80211_tx_ba_session_handle_start(sta, tid);
- else if (test_and_clear_bit(HT_AGG_STATE_WANT_STOP,
- &tid_tx->state))
- ___ieee80211_stop_tx_ba_session(sta, tid,
- WLAN_BACK_INITIATOR);
- }
- spin_unlock_bh(&sta->lock);
-}
-
int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid)
{
struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
--- wireless-testing.orig/net/mac80211/ht.c 2010-06-09 17:21:13.000000000 +0200
+++ wireless-testing/net/mac80211/ht.c 2010-06-09 17:21:14.000000000 +0200
@@ -114,6 +114,38 @@ void ieee80211_sta_tear_down_BA_sessions
}
}
+void ieee80211_ba_session_work(struct work_struct *work)
+{
+ struct sta_info *sta =
+ container_of(work, struct sta_info, ampdu_mlme.work);
+ struct tid_ampdu_tx *tid_tx;
+ int tid;
+
+ /*
+ * When this flag is set, new sessions should be
+ * blocked, and existing sessions will be torn
+ * down by the code that set the flag, so this
+ * need not run.
+ */
+ if (test_sta_flags(sta, WLAN_STA_BLOCK_BA))
+ return;
+
+ spin_lock_bh(&sta->lock);
+ for (tid = 0; tid < STA_TID_NUM; tid++) {
+ tid_tx = sta->ampdu_mlme.tid_tx[tid];
+ if (!tid_tx)
+ continue;
+
+ if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state))
+ ieee80211_tx_ba_session_handle_start(sta, tid);
+ else if (test_and_clear_bit(HT_AGG_STATE_WANT_STOP,
+ &tid_tx->state))
+ ___ieee80211_stop_tx_ba_session(sta, tid,
+ WLAN_BACK_INITIATOR);
+ }
+ spin_unlock_bh(&sta->lock);
+}
+
void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
const u8 *da, u16 tid,
u16 initiator, u16 reason_code)
--- wireless-testing.orig/net/mac80211/ieee80211_i.h 2010-06-09 17:21:13.000000000 +0200
+++ wireless-testing/net/mac80211/ieee80211_i.h 2010-06-09 17:21:14.000000000 +0200
@@ -1113,9 +1113,12 @@ void ieee80211_process_addba_request(str
int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
enum ieee80211_back_parties initiator);
+int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
+ enum ieee80211_back_parties initiator);
void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
-void ieee80211_tx_ba_session_work(struct work_struct *work);
+void ieee80211_ba_session_work(struct work_struct *work);
+void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid);
/* Spectrum management */
void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
--- wireless-testing.orig/net/mac80211/sta_info.c 2010-06-09 17:21:13.000000000 +0200
+++ wireless-testing/net/mac80211/sta_info.c 2010-06-09 17:21:14.000000000 +0200
@@ -235,7 +235,7 @@ struct sta_info *sta_info_alloc(struct i
spin_lock_init(&sta->lock);
spin_lock_init(&sta->flaglock);
INIT_WORK(&sta->drv_unblock_wk, sta_unblock);
- INIT_WORK(&sta->ampdu_mlme.work, ieee80211_tx_ba_session_work);
+ INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
memcpy(sta->sta.addr, addr, ETH_ALEN);
sta->local = local;
next prev parent reply other threads:[~2010-06-10 8:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 8:21 [PATCH 00/23] aggregation locking rework Johannes Berg
2010-06-10 8:21 ` [PATCH 01/23] mac80211: simplify station/aggregation code Johannes Berg
2010-06-10 8:21 ` [PATCH 02/23] mac80211: use common skb queue Johannes Berg
2010-06-10 8:21 ` [PATCH 03/23] mac80211: use common work struct Johannes Berg
2010-06-10 8:21 ` [PATCH 04/23] mac80211: use common work function Johannes Berg
2010-06-10 8:21 ` [PATCH 05/23] mac80211: common work skb freeing Johannes Berg
2010-06-10 8:21 ` [PATCH 06/23] mac80211: pull mgmt frame rx into rx handler Johannes Berg
2010-06-10 8:21 ` [PATCH 07/23] mac80211: always process blockack action from workqueue Johannes Berg
2010-06-10 8:21 ` [PATCH 08/23] mac80211: move blockack stop due to fragmentation Johannes Berg
2010-06-10 8:21 ` [PATCH 09/23] mac80211: move aggregation callback processing Johannes Berg
2010-06-10 8:21 ` [PATCH 10/23] mac80211: use RCU for RX aggregation Johannes Berg
2010-06-10 8:21 ` [PATCH 11/23] mac80211: use RCU for TX aggregation Johannes Berg
2010-06-10 8:21 ` [PATCH 12/23] mac80211: remove non-irqsafe aggregation callbacks Johannes Berg
2010-06-10 8:21 ` [PATCH 13/23] mac80211: refcount aggregation queue stop Johannes Berg
2010-06-10 8:21 ` [PATCH 14/23] mac80211: make TX aggregation start/stop request async Johannes Berg
2010-06-10 8:21 ` Johannes Berg [this message]
2010-06-10 8:21 ` [PATCH 16/23] mac80211: defer RX agg session teardown to work Johannes Berg
2010-06-10 8:21 ` [PATCH 17/23] mac80211: fix RX aggregation timer Johannes Berg
2010-06-10 8:21 ` [PATCH 18/23] mac80211: change RX aggregation locking Johannes Berg
2010-06-10 8:21 ` [PATCH 19/23] mac80211: defer TX agg session teardown to work Johannes Berg
2010-06-10 8:21 ` [PATCH 20/23] mac80211: change TX aggregation locking Johannes Berg
2010-06-10 8:21 ` [PATCH 21/23] mac80211: allow drivers to sleep in ampdu_action Johannes Berg
2010-06-10 8:21 ` [PATCH 22/23] mac80211: update aggregation documentation Johannes Berg
2010-06-10 8:21 ` [PATCH 23/23] mac80211: fix mgmt frame accounting Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100610082231.512809279@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).