From patchwork Wed May 11 20:49:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 1629752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=hG1BBExV; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcdkim header.b=BdxQhCIf; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kz6WK5b9cz9sFs for ; Thu, 12 May 2022 06:50:53 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JOoOOygdg44IfI4nY79FtBtL1/uese/WKxK5ULTlxYQ=; b=hG1BBExVuy/t9U 2KnlG2Km3n+w9qKUqjeJirLuqL9Ee1ukQen7itM5eDSGQmP3nxldObZmvoinOmK7K39TbCg5jLXJc tzuYZ0TKX/d2SH6jfA/Al04GlazjNd9WBydKE+4ihbisdR2OoGLIbhbt/a+KVdEO/6AoTbFhsy2l1 ZNOOerhAiGL4UiUHlpPWrL0q4hBe2ZBXzgaDSYUFZfjHbDfvkO477zbXAfO549rzfOzCJWeEyemlg uW17k9oypdzhnKZqelSxZ6qIaqkYAmg1dwOMv0++QRWr9BQS9ZhTfamL7t3TxBw/qSgJWI5AMDwjO NG/vQVFqf77BmYXmN+pA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1notHS-008ZdK-0g; Wed, 11 May 2022 20:49:58 +0000 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1notHF-008ZXZ-Cz for hostap@lists.infradead.org; Wed, 11 May 2022 20:49:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652302185; x=1683838185; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mBosdFzay7cqGpf5LY3DTcYv9YNqddgo4xtF+BMCdgE=; b=BdxQhCIf4C7bWmmc7uyrEkmY08jj5PYnj4gW+nuXSGh3BfW0XQ/+f3Hz vM9o5mxwi+l84w4tVZR9sU4c3SVgzsUyFCcjXbl37kOz0136/AVz0tgU8 rrkREW7mCWsIgJDhq5Au2+RmrHGtUKZMNZfx0eYWtH4He+pxNFy8A7JZp I=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 11 May 2022 13:49:43 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 13:49:43 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 11 May 2022 13:49:43 -0700 Received: from alokad-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 11 May 2022 13:49:43 -0700 From: Aloka Dixit To: , CC: Aloka Dixit Subject: [PATCH v2 02/11] mbssid: retrieve driver capabilities Date: Wed, 11 May 2022 13:49:22 -0700 Message-ID: <20220511204931.25069-3-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220511204931.25069-1-quic_alokad@quicinc.com> References: <20220511204931.25069-1-quic_alokad@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220511_134945_511047_08C0DA46 X-CRM114-Status: GOOD ( 13.11 ) X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Retrieve driver capabilities for maximum number of interfaces for MBSSID and maximum allowed profile periodicity for enhanced MBSSID advertisements. Signed-off-by: Aloka Dixit --- v2: Moved changes in driver_nl80211_capa.c to this patch instead of a separate one. Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [199.106.114.39 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Retrieve driver capabilities for maximum number of interfaces for MBSSID and maximum allowed profile periodicity for enhanced MBSSID advertisements. Signed-off-by: Aloka Dixit --- v2: Moved changes in driver_nl80211_capa.c to this patch instead of a separate one. hostapd/main.c | 3 +++ src/ap/hostapd.h | 5 +++++ src/drivers/driver.h | 5 +++++ src/drivers/driver_nl80211_capa.c | 27 +++++++++++++++++++++++++++ 4 files changed, 40 insertions(+) diff --git a/hostapd/main.c b/hostapd/main.c index 21932d1bea06..e13e1665b6ce 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -241,6 +241,9 @@ static int hostapd_driver_init(struct hostapd_iface *iface) wpa_printf(MSG_ERROR, "set_wowlan failed"); } os_free(triggs); + + iface->mbssid_max_interfaces = capa.mbssid_max_interfaces; + iface->ema_max_periodicity = capa.ema_max_periodicity; } return 0; diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h index 297faaf1409c..36c6a8b21d08 100644 --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h @@ -625,6 +625,11 @@ struct hostapd_iface { /* Previous WMM element information */ struct hostapd_wmm_ac_params prev_wmm[WMM_AC_NUM]; + /* Maximum number of interfaces supported for MBSSID advertisements */ + u8 mbssid_max_interfaces; + /* Maximum profile periodicity for enhanced MBSSID advertisements */ + u8 ema_max_periodicity; + int (*enable_iface_cb)(struct hostapd_iface *iface); int (*disable_iface_cb)(struct hostapd_iface *iface); }; diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 677b729d5d4a..39a2e6387d8a 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2179,6 +2179,11 @@ struct wpa_driver_capa { /* Maximum number of supported CSA counters */ u16 max_csa_counters; + + /* Maximum number of interfaces supported for MBSSID advertisements */ + u8 mbssid_max_interfaces; + /* Maximum profile periodicity for enhanced MBSSID advertisements */ + u8 ema_max_periodicity; }; diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index a0803bad046a..00c6d5d82335 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -850,6 +850,30 @@ err: } +static void wiphy_info_mbssid(struct wpa_driver_capa *cap, struct nlattr *attr) +{ + struct nlattr *config[NL80211_MBSSID_CONFIG_ATTR_MAX + 1]; + + if (nla_parse_nested(config, NL80211_MBSSID_CONFIG_ATTR_MAX, attr, + NULL)) + return; + + if (!config[NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES]) + return; + + cap->mbssid_max_interfaces = + nla_get_u8(config[NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES]); + + if (config[NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY]) + cap->ema_max_periodicity = + nla_get_u8(config[NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY]); + + wpa_printf(MSG_DEBUG, + "multiple_bssid: max interfaces %u, max profile periodicity %u\n", + cap->mbssid_max_interfaces, cap->ema_max_periodicity); +} + + static int wiphy_info_handler(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; @@ -1081,6 +1105,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg) if (tb[NL80211_ATTR_WIPHY_SELF_MANAGED_REG]) capa->flags |= WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY; + if (tb[NL80211_ATTR_MBSSID_CONFIG]) + wiphy_info_mbssid(capa, tb[NL80211_ATTR_MBSSID_CONFIG]); + return NL_SKIP; }