summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorAloka Dixit <quic_alokad@quicinc.com>2023-07-27 20:40:59 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-09-13 13:34:01 +0300
commitb2d431d43c8a3e61a384e0b7b3c9d595ea77895d (patch)
treeed71048425751348193116f6f2c855b728c138e6 /net/wireless
parent66f85d57b7109baf8a7d5ee04049ac9412611d35 (diff)
downloadlinux-b2d431d43c8a3e61a384e0b7b3c9d595ea77895d.tar.xz
wifi: nl80211: additions to NL80211_CMD_SET_BEACON
FILS discovery and unsolicited broadcast probe response templates need to be updated along with beacon templates in some cases such as the channel switch operation. Add the missing implementation. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20230727174100.11721-5-quic_alokad@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 6449072e8def..218093607b29 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6199,6 +6199,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 *attr;
int err;
if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
@@ -6220,6 +6221,20 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
if (err)
goto out;
+ attr = info->attrs[NL80211_ATTR_FILS_DISCOVERY];
+ if (attr) {
+ err = nl80211_parse_fils_discovery(rdev, attr, params);
+ if (err)
+ goto out;
+ }
+
+ attr = info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP];
+ if (attr) {
+ err = nl80211_parse_unsol_bcast_probe_resp(rdev, attr, params);
+ if (err)
+ goto out;
+ }
+
err = rdev_change_beacon(rdev, dev, params);
out: