diff mbox series

[1/3] driver: Add regulatory wmm_limit to hostapd_channel_data

Message ID 20190403160753.16682-1-andrei.otcheretianski@intel.com
State Accepted
Headers show
Series [1/3] driver: Add regulatory wmm_limit to hostapd_channel_data | expand

Commit Message

Andrei Otcheretianski April 3, 2019, 4:07 p.m. UTC
From: Haim Dreyfuss <haim.dreyfuss@intel.com>

ETSI EN 301 893 v2.1.1 (2017-05) standard defines a new channel access
mechanism that all devices (WLAN and LAA) need to comply with.
In previous versions the device was allowed by ETSI to implement
802.11 channel access mechanism based on a set of priority classes
which are taken from 802.11. According of the new standard there
might be some exceptions which require ETSI countries to follow
more restrictive rules. In such a case the AP's wmm IE need to
comply with ETSI limitation. To be able to do so the regulatory
domain passes the new limitation values if needed.
Implement this, by storing it and use it to calculate the new
wmm parameters.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
---
 src/drivers/driver.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 23423d92e8..fa569e1502 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -101,6 +101,21 @@  enum reg_type {
 	REGDOM_TYPE_INTERSECTION,
 };
 
+/**
+ * struct hostapd_wmm_rule - WMM regulatory rule.
+ *
+ * @min_cwmin - lower bound of cw_min value.
+ * @min_cwmax - lower bound of cw_max value.
+ * @min_aifs - lower bound of aifs value.
+ * @max_txop - upper bound of txop, value in units of 32us.
+ */
+struct hostapd_wmm_rule {
+	int min_cwmin;
+	int min_cwmax;
+	int min_aifs;
+	int max_txop;
+};
+
 /**
  * struct hostapd_channel_data - Channel information
  */
@@ -156,6 +171,16 @@  struct hostapd_channel_data {
 	 * dfs_cac_ms - DFS CAC time in milliseconds
 	 */
 	unsigned int dfs_cac_ms;
+
+	/**
+	 * wmm_rules_valid  - indicates wmm_rules state
+	 */
+	u8 wmm_rules_valid;
+
+	/**
+	 * wmm_rules - WMM regulatory rules.
+	 */
+	struct hostapd_wmm_rule wmm_rules[WMM_AC_NUM];
 };
 
 #define HE_MAX_NUM_SS 		8