From patchwork Wed Apr 3 16:07:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Otcheretianski, Andrei" X-Patchwork-Id: 1075856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ofk92D7B"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Z4l10Y0Sz9sSM for ; Wed, 3 Apr 2019 23:14:37 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=CwJ3P15tlRU1615SppIDMnHaXmkeDIvgDw6TjR2CgOA=; b=ofk92D7BmG/ziJ i7UJbNnlnZbS+hrSadIiKQc4nCUl99yCFeUxCg07WqJTvICD4OMaF4l1EdxX5Zbn0xiR/1ewt7TFY 5+2rwYehfOj2mfL4bfjI/DQ6LYS9mxZ015xpB+LGxLYU99/wbNsKnOUS6y6lu8rHaG3LsR2GPwGRi 4CoLE2MyT0rppFW0HFTF6VYzNLjJrH3ruRY4g2vI7DMCvHwBm9wLEdo7vvCuyvdZ4d8zzyBYCV8T9 LVU/AFga9wMHvQkVni8YAP7Ygw6OINJxN3EUyAVOOh5Vn5dx4hkdXGKpmskLlUW623Xazah9/LNpl U8Pa00atWdQuUglfCqbg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBemn-00032s-5T; Wed, 03 Apr 2019 12:14:33 +0000 Received: from mga07.intel.com ([134.134.136.100]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBemj-00032G-Pz for hostap@lists.infradead.org; Wed, 03 Apr 2019 12:14:31 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2019 05:14:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,304,1549958400"; d="scan'208";a="131107249" Received: from andrei-xps-12-9q33.jer.intel.com ([10.12.190.129]) by orsmga008.jf.intel.com with ESMTP; 03 Apr 2019 05:14:27 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH 1/3] driver: Add regulatory wmm_limit to hostapd_channel_data Date: Wed, 3 Apr 2019 19:07:51 +0300 Message-Id: <20190403160753.16682-1-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_051429_891287_5077FEB0 X-CRM114-Status: GOOD ( 11.72 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [134.134.136.100 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.4 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Haim Dreyfuss Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Haim Dreyfuss 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 --- src/drivers/driver.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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