public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
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: [PATCH 7/8] mac80211: A-MPDU Rx handling DELBA requests
Date: Mon, 17 Dec 2007 17:57:48 +0200	[thread overview]
Message-ID: <11979070791111-git-send-email-ron.rindjunsky@intel.com> (raw)
In-Reply-To: <11979070692599-git-send-email-ron.rindjunsky@intel.com>

This patch opens the flow to DELBA management frames, and handles end
of A-MPDU session produced by this event.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
---
 net/mac80211/ieee80211_sta.c |   40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)

Index: wl2_6_24_rc3_Rx_Agg/net/mac80211/ieee80211_sta.c
===================================================================
--- wl2_6_24_rc3_Rx_Agg.orig/net/mac80211/ieee80211_sta.c
+++ wl2_6_24_rc3_Rx_Agg/net/mac80211/ieee80211_sta.c
@@ -63,6 +63,8 @@
 #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
 #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C
 #define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFA0
+#define IEEE80211_DELBA_PARAM_TID_MASK 0xF000
+#define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800
 
 #define IEEE80211_MIN_AMPDU_BUF 0x8
 #define IEEE80211_MAX_AMPDU_BUF 0x40
@@ -1274,6 +1276,36 @@ void ieee80211_sta_stop_rx_BA_session(st
 	sta_info_put(sta);
 }
 
+static void ieee80211_sta_process_delba(struct net_device *dev,
+			struct ieee80211_mgmt *mgmt, size_t len)
+{
+	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+	struct sta_info *sta;
+	u16 tid, params;
+	u16 initiator;
+	DECLARE_MAC_BUF(mac);
+
+	sta = sta_info_get(local, mgmt->sa);
+	if (!sta)
+		return;
+
+	params = le16_to_cpu(mgmt->u.action.u.delba.params);
+	tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12;
+	initiator = (params & IEEE80211_DELBA_PARAM_INITIATOR_MASK) >> 11;
+
+#ifdef CONFIG_MAC80211_HT_DEBUG
+	if (net_ratelimit())
+		printk(KERN_DEBUG "delba from %s on tid %d reason code %d\n",
+			print_mac(mac, mgmt->sa), tid,
+			mgmt->u.action.u.delba.reason_code);
+#endif /* CONFIG_MAC80211_HT_DEBUG */
+
+	if (initiator == WLAN_BACK_INITIATOR)
+		ieee80211_sta_stop_rx_BA_session(dev, sta->addr, tid,
+						 WLAN_BACK_INITIATOR, 0);
+	sta_info_put(sta);
+}
+
 /*
  * After receiving Block Ack Request (BAR) we activated a
  * timer after each frame arrives from the originator.
@@ -2234,9 +2266,15 @@ void ieee80211_rx_mgmt_action(struct net
 				break;
 			ieee80211_sta_process_addba_request(dev, mgmt, len);
 			break;
+		case WLAN_ACTION_DELBA:
+			if (len < (IEEE80211_MIN_ACTION_SIZE +
+				   sizeof(mgmt->u.action.u.delba)))
+				break;
+			ieee80211_sta_process_delba(dev, mgmt, len);
+			break;
 		default:
 			if (net_ratelimit())
-			   printk(KERN_DEBUG "%s: received unsupported BACK\n",
+			   printk(KERN_DEBUG "%s: Rx unknown A-MPDU action\n",
 					dev->name);
 			break;
 		}
---------------------------------------------------------------------
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.


  parent reply	other threads:[~2007-12-17 15:58 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 15:57 [PATCH 0/8] mac80211/iwlwifi: integrate IEEE802.11n A-MPDU Rx MLME Ron Rindjunsky
2007-12-17 15:57 ` [PATCH 1/8] mac80211: A-MPDU Rx add low level driver API Ron Rindjunsky
2007-12-17 17:54   ` Johannes Berg
2007-12-17 22:38     ` Johannes Berg
2007-12-18 13:41     ` Ron Rindjunsky
2007-12-18 14:01       ` Johannes Berg
2007-12-17 15:57 ` [PATCH 2/8] mac80211: A-MPDU Rx add MLME structures Ron Rindjunsky
2007-12-17 18:08   ` Johannes Berg
2007-12-18 13:41     ` Ron Rindjunsky
2007-12-18 13:59       ` Johannes Berg
2007-12-18 21:18       ` Johannes Berg
2007-12-19 18:59         ` Rindjunsky, Ron
2007-12-17 15:57 ` [PATCH 3/8] mac80211: A-MPDU Rx adding basic functionality Ron Rindjunsky
2007-12-17 18:06   ` Johannes Berg
2007-12-18 13:42     ` Ron Rindjunsky
2007-12-17 15:57 ` [PATCH 4/8] mac80211: A-MPDU Rx MLME data initialization Ron Rindjunsky
2007-12-17 18:09   ` Johannes Berg
2007-12-18 13:43     ` Ron Rindjunsky
2007-12-17 15:57 ` [PATCH 5/8] mac80211: A-MPDU Rx handling aggregation reordering Ron Rindjunsky
2007-12-17 18:18   ` Johannes Berg
2007-12-18 13:44     ` Ron Rindjunsky
2007-12-18 13:57       ` Johannes Berg
2007-12-19 10:57         ` Rindjunsky, Ron
2007-12-19 15:47           ` Johannes Berg
2007-12-19 16:29             ` Winkler, Tomas
2007-12-19 16:36               ` Johannes Berg
2007-12-20 10:14   ` Johannes Berg
2007-12-20 12:32     ` Ron Rindjunsky
2007-12-20 12:41       ` Johannes Berg
2007-12-20 14:15         ` Ron Rindjunsky
2007-12-23 16:15         ` Ron Rindjunsky
2007-12-23 17:28           ` Johannes Berg
2007-12-23 17:38             ` Ron Rindjunsky
2007-12-23 18:15               ` Johannes Berg
2007-12-17 15:57 ` [PATCH 6/8] mac80211: A-MPDU Rx adding BAR handling capability Ron Rindjunsky
2007-12-17 18:24   ` Johannes Berg
2007-12-18 13:45     ` Ron Rindjunsky
2007-12-18 13:53       ` Johannes Berg
2007-12-19 13:25         ` Rindjunsky, Ron
2007-12-19 15:45           ` Johannes Berg
2007-12-19 18:59             ` Rindjunsky, Ron
2007-12-17 15:57 ` Ron Rindjunsky [this message]
2007-12-17 18:26   ` [PATCH 7/8] mac80211: A-MPDU Rx handling DELBA requests Johannes Berg
2007-12-18 13:46     ` Ron Rindjunsky
2007-12-18 13:51       ` Johannes Berg
2007-12-19 13:22         ` Rindjunsky, Ron
2007-12-17 15:57 ` [PATCH 8/8] iwlwifi: A-MPDU Rx flow enabled 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=11979070791111-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