[PATCH 01/15] defs: Add RRM definitions for beacon report measurement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Avraham Stern <avraham.stern@xxxxxxxxx>

Signed-off-by: Avraham Stern <avraham.stern@xxxxxxxxx>
---
 src/common/ieee802_11_defs.h | 74 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)

diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 259862d..0e3a5ac 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -589,6 +589,9 @@
 /* byte 1 (out of 5) */
 #define WLAN_RRM_CAPS_LINK_MEASUREMENT BIT(0)
 #define WLAN_RRM_CAPS_NEIGHBOR_REPORT BIT(1)
+#define WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE BIT(4)
+#define WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE BIT(5)
+#define WLAN_RRM_CAPS_BEACON_REPORT_TABLE BIT(6)
 /* byte 2 (out of 5) */
 #define WLAN_RRM_CAPS_LCI_MEASUREMENT BIT(4)
 /* byte 5 (out of 5) */
@@ -1798,6 +1801,77 @@ struct rrm_link_measurement_report {
 	u8 variable[0];
 } STRUCT_PACKED;
 
+/* IEEE Std 802.11-2012, 8.4.2.23.1 - Measurement Request element */
+struct rrm_measurement_request_element {
+	u8 eid;
+	u8 len;
+	u8 token;
+	u8 mode;
+	u8 type;
+	u8 variable[0];
+} STRUCT_PACKED;
+
+/* IEEE Std 802.11-2012, 8.4.2.23.7 - Beacon Request */
+struct rrm_measurement_beacon_request {
+	u8 oper_class;
+	u8 channel;
+	le16 rand_interval; /* in TUs */
+	le16 duration;	/* in TUs */
+	u8 mode;
+	u8 bssid[ETH_ALEN];
+	u8 variable[0];
+} STRUCT_PACKED;
+
+/* IEEE Std 802.11-2012, 8.4.2.24.1 - Measurement Report element */
+struct rrm_measurement_report_element {
+	u8 eid;
+	u8 len;
+	u8 token;
+	u8 mode;
+	u8 type;
+	u8 variable[0];
+} STRUCT_PACKED;
+
+/* IEEE Std 802.11-2012, 8.4.2.24.7 - Beacon Report */
+struct rrm_measurement_beacon_report {
+	u8 op_class;
+	u8 channel;
+	le64 start_time; /* in TSF of the BSS requesting the measurement */
+	le16 duration;	/* in TUs */
+	u8 report_info;
+	u8 rcpi;
+	u8 rsni;
+	u8 bssid[ETH_ALEN];
+	u8 antenna_id;
+	le32 parent_tsf;
+	u8 variable[0];
+} STRUCT_PACKED;
+
+/* IEEE Std 802.11-2012, Table 8-65 - Beacon Request subelement IDs */
+#define WLAN_BEACON_REQUEST_SUBELEM_SSID	0
+#define WLAN_BEACON_REQUEST_SUBELEM_INFO	1
+#define WLAN_BEACON_REQUEST_SUBELEM_DETAIL	2
+#define WLAN_BEACON_REQUEST_SUBELEM_REQUEST	10
+#define WLAN_BEACON_REQUEST_SUBELEM_AP_CHANNEL	51
+#define WLAN_BEACON_REQUEST_SUBELEM_VENDOR	221
+
+/* IEEE Std 802.11-2012, Table 8-86 - Beacon Report Subelement IDs */
+#define WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY	1
+#define WLAN_BEACON_REPORT_SUBELEM_VENDOR	221
+
+/* IEEE Std 802.11-2012, Figure 8-104 - Measurement Request element format */
+#define MEASUREMENT_REQUEST_MODE_PARALLEL BIT(0)
+#define MEASUREMENT_REQUEST_MODE_ENABLE BIT(1)
+#define MEASUREMENT_REQUEST_MODE_REQUEST BIT(2)
+#define MEASUREMENT_REQUEST_MODE_REPORT BIT(3)
+#define MEASUREMENT_REQUEST_MODE_DURATION_MANDATORY BIT(4)
+
+/* IEEE Std 802.11-2012 Figure 8-141 - Measurement Report Mode field */
+#define MEASUREMENT_REPORT_MODE_ACCEPT 0
+#define MEASUREMENT_REPORT_MODE_REJECT_LATE BIT(0)
+#define MEASUREMENT_REPORT_MODE_REJECT_INCAPABLE BIT(1)
+#define MEASUREMENT_REPORT_MODE_REJECT_REFUSE BIT(2)
+
 /* IEEE Std 802.11ad-2012 - Multi-band element */
 struct multi_band_ie {
 	u8 eid; /* WLAN_EID_MULTI_BAND */
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux