From patchwork Mon May 16 20:24:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 574530 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 16309C433FE for ; Mon, 16 May 2022 20:49:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348190AbiEPUtL (ORCPT ); Mon, 16 May 2022 16:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348210AbiEPUsH (ORCPT ); Mon, 16 May 2022 16:48:07 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D8954035 for ; Mon, 16 May 2022 13:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652732708; x=1684268708; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x5/42K7FWuC9jcpGGjVf2/0eBur/BDsIMcOItE/clzc=; b=ZuWDSv3kjQ3l1HFddGGelp6n9knlmh9SYCTQk6HvIZUcNiMtNYldrLjH DKuZgRW2EBwuXCUHayRFiekdi53ucrRnTEMJ1thYgD/B5Ty0jX1SjeH1C iZ3db9mYQkfdd1TwI/RHko42Iijwqez+PtrfjH89rp65ThwlLCVLf3s7Y I=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 16 May 2022 13:25:06 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2022 13:25:06 -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; Mon, 16 May 2022 13:25:05 -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; Mon, 16 May 2022 13:25:04 -0700 From: Aloka Dixit To: CC: , Aloka Dixit Subject: [PATCH v5 2/3] mac80211: process additional data during beacon change Date: Mon, 16 May 2022 13:24:53 -0700 Message-ID: <20220516202454.4925-3-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220516202454.4925-1-quic_alokad@quicinc.com> References: <20220516202454.4925-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 Modify the prototype for ieee80211_change_beacon() to accept struct cfg80211_ap_settings instead of struct cfg80211_beacon_data to process FILS discovery and unsolicited broadcast probe response transmission configurations. Signed-off-by: Aloka Dixit --- net/mac80211/cfg.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index bbec7d778084..1054b6625c53 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1313,12 +1313,14 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, } static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, - struct cfg80211_beacon_data *params) + struct cfg80211_ap_settings *params) { struct ieee80211_sub_if_data *sdata; struct ieee80211_bss_conf *bss_conf; + struct cfg80211_beacon_data *beacon = ¶ms->beacon; struct beacon_data *old; int err; + u32 changed; sdata = IEEE80211_DEV_TO_SUB_IF(dev); sdata_assert_lock(sdata); @@ -1333,18 +1335,36 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, if (!old) return -ENOENT; - err = ieee80211_assign_beacon(sdata, params, NULL, NULL); + err = ieee80211_assign_beacon(sdata, beacon, NULL, NULL); if (err < 0) return err; + changed = err; + + if (params->fils_discovery.max_interval) { + err = ieee80211_set_fils_discovery(sdata, + ¶ms->fils_discovery); + if (err < 0) + return err; + changed |= BSS_CHANGED_FILS_DISCOVERY; + } + + if (params->unsol_bcast_probe_resp.interval) { + err = ieee80211_set_unsol_bcast_probe_resp(sdata, + ¶ms->unsol_bcast_probe_resp); + if (err < 0) + return err; + changed |= BSS_CHANGED_UNSOL_BCAST_PROBE_RESP; + } + bss_conf = &sdata->vif.bss_conf; - if (params->he_bss_color_valid && - params->he_bss_color.enabled != bss_conf->he_bss_color.enabled) { - bss_conf->he_bss_color.enabled = params->he_bss_color.enabled; - err |= BSS_CHANGED_HE_BSS_COLOR; + if (beacon->he_bss_color_valid && + beacon->he_bss_color.enabled != bss_conf->he_bss_color.enabled) { + bss_conf->he_bss_color.enabled = beacon->he_bss_color.enabled; + changed |= BSS_CHANGED_HE_BSS_COLOR; } - ieee80211_bss_info_change_notify(sdata, err); + ieee80211_bss_info_change_notify(sdata, changed); return 0; }