From: Ron Rindjunsky <ron.rindjunsky@intel.com>
To: linville@tuxdriver.com
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org,
flamingice@sourmilk.net, tomas.winkler@intel.com,
yi.zhu@intel.com, Ron Rindjunsky <ron.rindjunsky@intel.com>
Subject: [RFC PATCH 01/10] mac80211: A-MPDU Tx add session's and low level driver's API
Date: Thu, 10 Jan 2008 19:22:13 +0200 [thread overview]
Message-ID: <11999857491583-git-send-email-ron.rindjunsky@intel.com> (raw)
In-Reply-To: <11999857423156-git-send-email-ron.rindjunsky@intel.com>
This patch adds the API for 3 stages in A-MPDU Tx session flow:
- request mac80211 to start/stop A-MPDU Tx session for specific TID. such a
request should be issued by a load aware element, either mac80211 itself
or external element.
- requests by mac80211 to low-level driver to start/stop Tx aggregation.
notice that low level driver responds now with Starting Sequence Number.
- async feedback by low-level to mac80211 to inform that HW is ready for
next A-MPDU Tx state.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
---
include/net/mac80211.h | 62 +++++++++++++++++++++++++++++++++++++++++-
net/mac80211/ieee80211_sta.c | 4 +-
2 files changed, 63 insertions(+), 3 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 3b7bfc6..3151fcf 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -943,10 +943,14 @@ enum ieee80211_erp_change_flags {
* &struct ieee80211_ops to indicate which action is needed.
* @IEEE80211_AMPDU_RX_START: start Rx aggregation
* @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation
+ * @IEEE80211_AMPDU_TX_START: start Tx aggregation
+ * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation
*/
enum ieee80211_ampdu_mlme_action {
IEEE80211_AMPDU_RX_START,
IEEE80211_AMPDU_RX_STOP,
+ IEEE80211_AMPDU_TX_START,
+ IEEE80211_AMPDU_TX_STOP,
};
/**
@@ -1130,7 +1134,7 @@ struct ieee80211_ops {
int (*conf_ht)(struct ieee80211_hw *hw, struct ieee80211_conf *conf);
int (*ampdu_action)(struct ieee80211_hw *hw,
enum ieee80211_ampdu_mlme_action action,
- const u8 *ra, u16 tid, u16 ssn);
+ u8 *addr, u16 tid, u16 *ssn);
};
/**
@@ -1513,4 +1517,60 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw,
struct ieee80211_vif *vif),
void *data);
+/**
+ * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
+ * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * @ra: destination address of the BA session recipient
+ * @tid: the TID to BA on.
+ * @return: success if addBA request was sent, failure otherwise
+ *
+ * Although mac80211/low level driver/user space application can estimate
+ * the need to start aggregation on a certain RA/TID, the session level
+ * will be managed by the mac80211.
+ */
+int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid);
+
+/**
+ * ieee80211_start_tx_ba_cb/_irqsafe - low level driver is ready to aggregate.
+ * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * @ra: destination address of the BA session recipient.
+ * @tid: the TID to BA on.
+ *
+ * This function must be called by low level driver once it has
+ * finished with preparations for the BA session.
+ * Two versions of the function are provided for low-deriver's convinience,
+ * a regular and irqsafe version.
+ */
+void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid);
+void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, u8 *ra,
+ u16 tid);
+/**
+ * ieee80211_stop_tx_ba_session - Stop a Block Ack session.
+ * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * @ra: destination address of the BA session recipient
+ * @tid: the TID to stop BA.
+ * @initiator: if indicates initiator DELBA frame will be sent.
+ * @return: error if no sta with matching da found, success otherwise
+ *
+ * Although mac80211/low level driver/user space application can estimate
+ * the need to stop aggregation on a certain RA/TID, the session level
+ * will be managed by the mac80211.
+ */
+int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, u8 *ra,
+ u16 tid, u8 initiator);
+
+/**
+ * ieee80211_stop_BA_cb - low level driver is ready to stop aggregation.
+ * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * @ra: destination address of the BA session recipient.
+ * @tid: the desired TID to BA on.
+ *
+ * This function must be called by low level driver once it has
+ * finished with preparations for the BA session tear down.
+ * Two versions of the function are provided for low-deriver's convinience,
+ * a regular and an irqsafe version.
+ */
+void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
+void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, u8 *ra, u16 tid);
+
#endif /* MAC80211_H */
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index b1e7d17..ec62938 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -1132,7 +1132,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
if (local->ops->ampdu_action)
ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START,
- sta->addr, tid, start_seq_num);
+ sta->addr, tid, &start_seq_num);
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Rx A-MPDU on tid %d result %d", tid, ret);
#endif /* CONFIG_MAC80211_HT_DEBUG */
@@ -1237,7 +1237,7 @@ void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *ra, u16 tid,
BUG_ON(!local->ops->ampdu_action);
ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_STOP,
- ra, tid, EINVAL);
+ ra, tid, NULL);
if (ret)
printk(KERN_DEBUG "HW problem - can not stop rx "
"aggergation for tid %d\n", tid);
--
1.5.3.3
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
next prev parent reply other threads:[~2008-01-10 17:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 17:22 [RFC PATCH 0/10] mac80211/iwlwifi: A-MPDU Tx support Ron Rindjunsky
2008-01-10 17:22 ` Ron Rindjunsky [this message]
2008-01-11 16:29 ` [RFC PATCH 01/10] mac80211: A-MPDU Tx add session's and low level driver's API Johannes Berg
2008-01-13 15:17 ` Ron Rindjunsky
2008-01-13 21:58 ` Johannes Berg
2008-01-14 9:25 ` Ron Rindjunsky
2008-01-10 17:22 ` [RFC PATCH 02/10] mac80211: A-MPDU Tx add MLME structures Ron Rindjunsky
2008-01-11 16:31 ` Johannes Berg
2008-01-10 17:22 ` [RFC PATCH 03/10] mac80211: A-MPDU Tx adding basic functionality Ron Rindjunsky
2008-01-11 16:51 ` Johannes Berg
2008-01-13 15:18 ` Ron Rindjunsky
2008-01-13 21:51 ` Johannes Berg
2008-01-14 9:26 ` Ron Rindjunsky
2008-01-14 10:35 ` Johannes Berg
2008-01-10 17:22 ` [RFC PATCH 04/10] mac80211: A-MPDU Tx MLME data initialization Ron Rindjunsky
2008-01-10 17:22 ` [RFC PATCH 05/10] mac80211: A-MPDU add debugfs support Ron Rindjunsky
2008-01-10 17:22 ` [RFC PATCH 06/10] mac80211: A-MPDU Tx adding qdisc support Ron Rindjunsky
2008-01-11 16:55 ` Johannes Berg
2008-01-27 17:55 ` Patrick McHardy
2008-01-27 19:19 ` Tomas Winkler
2008-01-28 13:44 ` Patrick McHardy
2008-01-10 17:22 ` [RFC PATCH 07/10] mac80211: A-MPDU Tx change tx_status to support Block Ack data Ron Rindjunsky
2008-01-11 16:56 ` Johannes Berg
2008-01-12 11:43 ` Tomas Winkler
[not found] ` <49299.::ffff:91.5.126.126.1200138845.squirrel@secure.sipsolutions.net>
2008-01-12 12:37 ` Rindjunsky, Ron
[not found] ` <-2543242200241674408@unknownmsgid>
2008-01-12 12:47 ` Tomas Winkler
2008-01-10 17:22 ` [RFC PATCH 08/10] iwlwifi: A-MPDU Tx conform API to mac80211 Ron Rindjunsky
2008-01-10 17:22 ` [RFC PATCH 09/10] iwlwifi: A-MPDU Tx conform flows " Ron Rindjunsky
2008-01-10 17:22 ` [RFC PATCH 10/10] iwlwifi: A-MPDU Tx conform block Ack rate scaling " Ron Rindjunsky
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=11999857491583-git-send-email-ron.rindjunsky@intel.com \
--to=ron.rindjunsky@intel.com \
--cc=flamingice@sourmilk.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomas.winkler@intel.com \
--cc=yi.zhu@intel.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).