diff mbox

hostapd: make VHT IE struct more expressive

Message ID 1362153350-25247-1-git-send-email-johannes@sipsolutions.net
State Accepted
Commit 851b73eb28a8cd693170433d091e48a5a5a4c234
Headers show

Commit Message

Johannes Berg March 1, 2013, 3:55 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

The VHT IE struct just has an opaque 8-byte array for the MCS
set, make it more expressive by explicitly naming the pieces.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
---
 src/ap/ieee802_11_vht.c      | 2 +-
 src/common/ieee802_11_defs.h | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

Comments

Jouni Malinen March 1, 2013, 4:26 p.m. UTC | #1
On Fri, Mar 01, 2013 at 04:55:50PM +0100, Johannes Berg wrote:
> The VHT IE struct just has an opaque 8-byte array for the MCS
> set, make it more expressive by explicitly naming the pieces.

Thanks, applied.
diff mbox

Patch

diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c
index f6cc5d6..0012c0f 100644
--- a/src/ap/ieee802_11_vht.c
+++ b/src/ap/ieee802_11_vht.c
@@ -38,7 +38,7 @@  u8 * hostapd_eid_vht_capabilities(struct hostapd_data *hapd, u8 *eid)
 		hapd->iface->current_mode->vht_capab);
 
 	/* Supported MCS set comes from hw */
-	os_memcpy(cap->vht_supported_mcs_set,
+	os_memcpy(&cap->vht_supported_mcs_set,
 	          hapd->iface->current_mode->vht_mcs_set, 8);
 
 	pos += sizeof(*cap);
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 6a7fff6..652476f 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -579,7 +579,12 @@  struct ieee80211_ht_operation {
 
 struct ieee80211_vht_capabilities {
 	le32 vht_capabilities_info;
-	u8 vht_supported_mcs_set[8];
+	struct {
+		le16 rx_map;
+		le16 rx_highest;
+		le16 tx_map;
+		le16 tx_highest;
+	} vht_supported_mcs_set;
 } STRUCT_PACKED;
 
 struct ieee80211_vht_operation {