From patchwork Mon May 9 17:33:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 571499 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 B0DBFC433EF for ; Mon, 9 May 2022 17:34:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239723AbiEIRiE (ORCPT ); Mon, 9 May 2022 13:38:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239693AbiEIRiA (ORCPT ); Mon, 9 May 2022 13:38:00 -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 A50852016C1 for ; Mon, 9 May 2022 10:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652117646; x=1683653646; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qAE/mRwXdE3kw0cxtB76458eJ/PpNa0Oc90/4iwC0wU=; b=tgViLD9p4ckkRMY1uRH4qLnQQCkbkD28b8thBg8rGN/8Jy26QAAWZODB ZzK7JEccMGfDXw15s96LJBZ6QY60J39VXX8cV2rxPPj8OKyleLehcMw+Z JtORp/0rwYzNjbZ22xYwhTOafVOJ2dupoulqaCWujtG8Ek28AtGb6YTxh Y=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 09 May 2022 10:34:06 -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; 09 May 2022 10:34: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, 9 May 2022 10:34: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, 9 May 2022 10:34:05 -0700 From: Aloka Dixit To: CC: , Aloka Dixit Subject: [PATCH v3 2/2] mac80211: process additional data in ieee80211_change_beacon() Date: Mon, 9 May 2022 10:33:54 -0700 Message-ID: <20220509173354.2482-3-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220509173354.2482-1-quic_alokad@quicinc.com> References: <20220509173354.2482-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 an instance of struct cfg80211_ap_settings instead of struct cfg80211_beacon_data to process FILS discovery and unsolicited broadcast probe response transmission configuration. Set the respective flags when applicable. Signed-off-by: Aloka Dixit --- v3: No change from v2. net/mac80211/cfg.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index f1d211e61e49..22843184d6ee 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1313,11 +1313,12 @@ 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 beacon_data *old; int err; + u32 changed; sdata = IEEE80211_DEV_TO_SUB_IF(dev); sdata_assert_lock(sdata); @@ -1332,10 +1333,28 @@ 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, ¶ms->beacon, NULL, NULL); if (err < 0) return err; - ieee80211_bss_info_change_notify(sdata, 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; + } + + ieee80211_bss_info_change_notify(sdata, changed); return 0; }