From patchwork Wed May 18 20:39:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 574205 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 329BDC4332F for ; Wed, 18 May 2022 20:39:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242632AbiERUjj (ORCPT ); Wed, 18 May 2022 16:39:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242624AbiERUji (ORCPT ); Wed, 18 May 2022 16:39:38 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A74102AE32 for ; Wed, 18 May 2022 13:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652906377; x=1684442377; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7ZUsmLbsivRKfl6EIkOcK9BMLBxnzH6DNWi1Sk/VaIQ=; b=cEGL29jc1f7XUQ4I/BFTUsk3MGnoqtOM77eM+QECQSU7eKT8hNZ+NtBo pPBhB2Srm3GX44BmAcTUClPKnXMMIIwVIqgYgAda4vOeweps8a9ZxbZQR PgEEVTW2vaDpCl9sEEdlDRFp6zJzp6MxBsz+73dYSlZeG7qgMSMWgakMr 0=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 18 May 2022 13:39:36 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 13:39:36 -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, 18 May 2022 13:39:36 -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, 18 May 2022 13:39:35 -0700 From: Aloka Dixit To: , CC: Aloka Dixit Subject: [PATCH v6 2/3] nl80211: additional processing in NL80211_CMD_SET_BEACON Date: Wed, 18 May 2022 13:39:21 -0700 Message-ID: <20220518203922.26417-3-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220518203922.26417-1-quic_alokad@quicinc.com> References: <20220518203922.26417-1-quic_alokad@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org FILS discovery and unsolicited broadcast probe response transmissions are configured as part of NL80211_CMD_START_AP, however both stop after userspace uses the NL80211_CMD_SET_BEACON command as these attributes are not processed in that command. Add the missing implementation. Signed-off-by: Aloka Dixit --- net/wireless/nl80211.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 4b48819c69d6..4bb4889e4eee 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5810,6 +5810,7 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info) struct net_device *dev = info->user_ptr[1]; struct wireless_dev *wdev = dev->ieee80211_ptr; struct cfg80211_ap_settings *params; + struct nlattr *attrs; int err; if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && @@ -5830,6 +5831,20 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info) if (err) goto out; + attrs = info->attrs[NL80211_ATTR_FILS_DISCOVERY]; + if (attrs) { + err = nl80211_parse_fils_discovery(rdev, attrs, params); + if (err) + goto out; + } + + attrs = info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP]; + if (attrs) { + err = nl80211_parse_unsol_bcast_probe_resp(rdev, attrs, params); + if (err) + goto out; + } + wdev_lock(wdev); err = rdev_change_beacon(rdev, dev, params); wdev_unlock(wdev);