All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Jouni Malinen <jouni.malinen@atheros.com>,
	linville@tuxdriver.com
Subject: [RFC] wireless: add BlockAck frame structure
Date: Sat, 14 Nov 2009 00:23:07 +0100	[thread overview]
Message-ID: <200911140023.08161.chunkeey@googlemail.com> (raw)

This patch adds the BlockAck frame structure as described in
802.11n specification section 7.2.1.8.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
I'm not sure if:
 - everyone will be happy about ext. ieee80211_ba_cb structure?
 - this structure should a part of ieee80211_bar?
---
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 49b1abd..cda0b23 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -747,10 +747,48 @@ struct ieee80211_bar {
 	__le16 start_seq_num;
 } __attribute__((packed));
 
-/* 802.11 BAR control masks */
+/* 802.11 BA(R) control masks */
 #define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL     0x0000
+#define IEEE80211_BAR_CTRL_MULTI_TID		 0x0002
 #define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA  0x0004
 
+/**
+ * struct ieee80211_ba_cb - Compressed BlockAck variant
+ *
+ * This structure refers to "BA Information field" as
+ * described in 802.11n specification section 7.2.1.8.3
+ */
+struct ieee80211_ba_cb {
+	__le16 start_seq_num;
+	__u8 bitmap[8];
+} __attribute__((packed));
+
+/**
+ * struct ieee80211_ba - BlockAck frame
+ *
+ * This structure refers to "BlockAck frame" as
+ * described in 802.11n specification section 7.2.1.8.1
+ */
+struct ieee80211_ba {
+	__le16 frame_control;
+	__le16 duration;
+	__u8 ra[6];
+	__u8 ta[6];
+	__le16 control;
+	union {
+		struct {
+			__le16 start_seq_num;
+			__u8 bitmap[128];
+		} basic __attribute__((packed));
+
+		struct ieee80211_ba_cb cb;
+
+		struct {
+			__le16 per_tid;
+			struct ieee80211_ba_cb cb;
+		} cbmtid[0] __attribute__((packed));
+	} __attribute__((packed));
+} __attribute__((packed));
 
 #define IEEE80211_HT_MCS_MASK_LEN		10
 

             reply	other threads:[~2009-11-13 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 23:23 Christian Lamparter [this message]
2009-11-13 23:27 ` [RFC] wireless: add BlockAck frame structure 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=200911140023.08161.chunkeey@googlemail.com \
    --to=chunkeey@googlemail.com \
    --cc=johannes@sipsolutions.net \
    --cc=jouni.malinen@atheros.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.