Skip to content

Commit 7030f68

Browse files
committed
wifi: cfg80211: parse attribute to update unsolicited probe response template
JIRA: https://issues.redhat.com/browse/RHEL-114891 commit c932be7 Author: Yuvarani V <quic_yuvarani@quicinc.com> Date: Thu Jul 10 11:04:27 2025 +0530 wifi: cfg80211: parse attribute to update unsolicited probe response template At present, the updated unsolicited broadcast probe response template is not processed during userspace commands such as channel switch or color change. This leads to an issue where older incorrect unsolicited probe response is still used during these events. Add support to parse the netlink attribute and store it so that mac80211/drivers can use it to set the BSS_CHANGED_UNSOL_BCAST_PROBE_RESP flag in order to send the updated unsolicited broadcast probe response templates during these events. Signed-off-by: Yuvarani V <quic_yuvarani@quicinc.com> Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com> Link: https://patch.msgid.link/20250710-update_unsol_bcast_probe_resp-v2-1-31aca39d3b30@oss.qualcomm.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
1 parent 61ac360 commit 7030f68

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

include/net/cfg80211.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,7 @@ struct cfg80211_ap_update {
15261526
* @n_counter_offsets_beacon: number of csa counters the beacon (tail)
15271527
* @n_counter_offsets_presp: number of csa counters in the probe response
15281528
* @beacon_after: beacon data to be used on the new channel
1529+
* @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters
15291530
* @radar_required: whether radar detection is required on the new channel
15301531
* @block_tx: whether transmissions should be blocked while changing
15311532
* @count: number of beacons until switch
@@ -1540,6 +1541,7 @@ struct cfg80211_csa_settings {
15401541
unsigned int n_counter_offsets_beacon;
15411542
unsigned int n_counter_offsets_presp;
15421543
struct cfg80211_beacon_data beacon_after;
1544+
struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp;
15431545
bool radar_required;
15441546
bool block_tx;
15451547
u8 count;
@@ -1555,6 +1557,7 @@ struct cfg80211_csa_settings {
15551557
* @counter_offset_beacon: offsets of the counters within the beacon (tail)
15561558
* @counter_offset_presp: offsets of the counters within the probe response
15571559
* @beacon_next: beacon data to be used after the color change
1560+
* @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters
15581561
* @count: number of beacons until the color change
15591562
* @color: the color used after the change
15601563
* @link_id: defines the link on which color change is expected during MLO.
@@ -1565,6 +1568,7 @@ struct cfg80211_color_change_settings {
15651568
u16 counter_offset_beacon;
15661569
u16 counter_offset_presp;
15671570
struct cfg80211_beacon_data beacon_next;
1571+
struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp;
15681572
u8 count;
15691573
u8 color;
15701574
u8 link_id;

net/wireless/nl80211.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11002,6 +11002,16 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
1100211002
if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX])
1100311003
params.block_tx = true;
1100411004

11005+
if ((wdev->iftype == NL80211_IFTYPE_AP ||
11006+
wdev->iftype == NL80211_IFTYPE_P2P_GO) &&
11007+
info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP]) {
11008+
err = nl80211_parse_unsol_bcast_probe_resp(
11009+
rdev, info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP],
11010+
&params.unsol_bcast_probe_resp);
11011+
if (err)
11012+
goto free;
11013+
}
11014+
1100511015
params.link_id = link_id;
1100611016
err = rdev_channel_switch(rdev, dev, &params);
1100711017

@@ -16815,6 +16825,14 @@ static int nl80211_color_change(struct sk_buff *skb, struct genl_info *info)
1681516825
params.counter_offset_presp = offset;
1681616826
}
1681716827

16828+
if (info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP]) {
16829+
err = nl80211_parse_unsol_bcast_probe_resp(
16830+
rdev, info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP],
16831+
&params.unsol_bcast_probe_resp);
16832+
if (err)
16833+
goto out;
16834+
}
16835+
1681816836
params.link_id = nl80211_link_id(info->attrs);
1681916837
err = rdev_color_change(rdev, dev, &params);
1682016838

0 commit comments

Comments
 (0)