From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 06/11] mac80211: document TX aggregation (and small cleanup)
Date: Thu, 05 Feb 2009 17:07:44 +0100 [thread overview]
Message-ID: <20090205161133.019284930@sipsolutions.net> (raw)
In-Reply-To: 20090205160738.990564487@sipsolutions.net
Add documentation and move ieee80211_start_tx_ba_cb_irqsafe to right
after ieee80211_start_tx_ba_cb.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/agg-tx.c | 76 +++++++++++++++++++++++++++++++++-----------------
1 file changed, 51 insertions(+), 25 deletions(-)
--- wireless-testing.orig/net/mac80211/agg-tx.c 2009-01-29 20:14:39.000000000 +0100
+++ wireless-testing/net/mac80211/agg-tx.c 2009-01-30 09:06:03.000000000 +0100
@@ -18,6 +18,31 @@
#include "ieee80211_i.h"
#include "wme.h"
+/**
+ * DOC: TX aggregation
+ *
+ * Aggregation on the TX side requires setting the hardware flag
+ * %IEEE80211_HW_AMPDU_AGGREGATION as well as, if present, the @ampdu_queues
+ * hardware parameter to the number of hardware AMPDU queues. If there are no
+ * hardware queues then the driver will (currently) have to do all frame
+ * buffering.
+ *
+ * When TX aggregation is started by some subsystem (usually the rate control
+ * algorithm would be appropriate) by calling the
+ * ieee80211_start_tx_ba_session() function, the driver will be notified via
+ * its @ampdu_action function, with the %IEEE80211_AMPDU_TX_START action.
+ *
+ * In response to that, the driver is later required to call the
+ * ieee80211_start_tx_ba_cb() (or ieee80211_start_tx_ba_cb_irqsafe())
+ * function, which will start the aggregation session.
+ *
+ * Similarly, when the aggregation session is stopped by
+ * ieee80211_stop_tx_ba_session(), the driver's @ampdu_action function will
+ * be called with the action %IEEE80211_AMPDU_TX_STOP. In this case, the
+ * call must not fail, and the driver must later call ieee80211_stop_tx_ba_cb()
+ * (or ieee80211_stop_tx_ba_cb_irqsafe()).
+ */
+
static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
const u8 *da, u16 tid,
u8 dialog_token, u16 start_seq_num,
@@ -363,6 +388,31 @@ void ieee80211_start_tx_ba_cb(struct iee
}
EXPORT_SYMBOL(ieee80211_start_tx_ba_cb);
+void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw,
+ const u8 *ra, u16 tid)
+{
+ struct ieee80211_local *local = hw_to_local(hw);
+ struct ieee80211_ra_tid *ra_tid;
+ struct sk_buff *skb = dev_alloc_skb(0);
+
+ if (unlikely(!skb)) {
+#ifdef CONFIG_MAC80211_HT_DEBUG
+ if (net_ratelimit())
+ printk(KERN_WARNING "%s: Not enough memory, "
+ "dropping start BA session", skb->dev->name);
+#endif
+ return;
+ }
+ ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
+ memcpy(&ra_tid->ra, ra, ETH_ALEN);
+ ra_tid->tid = tid;
+
+ skb->pkt_type = IEEE80211_ADDBA_MSG;
+ skb_queue_tail(&local->skb_queue, skb);
+ tasklet_schedule(&local->tasklet);
+}
+EXPORT_SYMBOL(ieee80211_start_tx_ba_cb_irqsafe);
+
int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw,
u8 *ra, u16 tid,
@@ -492,31 +542,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee
}
EXPORT_SYMBOL(ieee80211_stop_tx_ba_cb);
-void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw,
- const u8 *ra, u16 tid)
-{
- struct ieee80211_local *local = hw_to_local(hw);
- struct ieee80211_ra_tid *ra_tid;
- struct sk_buff *skb = dev_alloc_skb(0);
-
- if (unlikely(!skb)) {
-#ifdef CONFIG_MAC80211_HT_DEBUG
- if (net_ratelimit())
- printk(KERN_WARNING "%s: Not enough memory, "
- "dropping start BA session", skb->dev->name);
-#endif
- return;
- }
- ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
- memcpy(&ra_tid->ra, ra, ETH_ALEN);
- ra_tid->tid = tid;
-
- skb->pkt_type = IEEE80211_ADDBA_MSG;
- skb_queue_tail(&local->skb_queue, skb);
- tasklet_schedule(&local->tasklet);
-}
-EXPORT_SYMBOL(ieee80211_start_tx_ba_cb_irqsafe);
-
void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw,
const u8 *ra, u16 tid)
{
@@ -542,6 +567,7 @@ void ieee80211_stop_tx_ba_cb_irqsafe(str
}
EXPORT_SYMBOL(ieee80211_stop_tx_ba_cb_irqsafe);
+
void ieee80211_process_addba_resp(struct ieee80211_local *local,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt,
--
next prev parent reply other threads:[~2009-02-05 16:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 16:07 [PATCH 00/11] mac80211 aggregation cleanups/fixes Johannes Berg
2009-02-05 16:07 ` [PATCH 01/11] mac80211: remove stray aggregation debugfs definition Johannes Berg
2009-02-05 16:07 ` [PATCH 02/11] mac80211: fix RX aggregation timeouts Johannes Berg
2009-02-05 16:07 ` [PATCH 03/11] mac80211: restructure HT code Johannes Berg
2009-02-05 16:07 ` [PATCH 04/11] mac80211: restrict aggregation to supported interface modes Johannes Berg
2009-02-05 16:07 ` [PATCH 05/11] mac80211: hardware should not deny going back to legacy Johannes Berg
2009-02-05 16:07 ` Johannes Berg [this message]
2009-02-05 16:07 ` [PATCH 07/11] mac80211: fix race in TX aggregation Johannes Berg
2009-02-06 19:13 ` Luis R. Rodriguez
2009-02-06 20:37 ` Johannes Berg
2009-02-05 16:07 ` [PATCH 08/11] mac80211: fix aggregation timer lockups Johannes Berg
2009-02-05 16:07 ` [PATCH 09/11] mac80211: clean up BA session teardown Johannes Berg
2009-02-05 16:07 ` [PATCH 10/11] mac80211: RX aggregation: clean up stop session Johannes Berg
2009-02-05 16:07 ` [PATCH 11/11] mac80211: further cleanups to stopping BA sessions Johannes Berg
2009-02-06 22:32 ` [PATCH 00/11] mac80211 aggregation cleanups/fixes Luis R. Rodriguez
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=20090205161133.019284930@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).