Skip to content

Commit 6285ee3

Browse files
ilanpeer2jmberg-intel
authored andcommitted
wifi: cfg80211: Extend support for scanning while MLO connected
To extend the support of TSF accounting in scan results for MLO connections, allow to indicate in the scan request the link ID corresponding to the BSS whose TSF should be used for the TSF accounting. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20231113112844.d4490bcdefb1.I8fcd158b810adddef4963727e9153096416b30ce@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent d3ca4ab commit 6285ee3

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

include/net/cfg80211.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,6 +2608,8 @@ struct cfg80211_scan_6ghz_params {
26082608
* @n_6ghz_params: number of 6 GHz params
26092609
* @scan_6ghz_params: 6 GHz params
26102610
* @bssid: BSSID to scan for (most commonly, the wildcard BSSID)
2611+
* @tsf_report_link_id: for MLO, indicates the link ID of the BSS that should be
2612+
* used for TSF reporting. Can be set to -1 to indicate no preference.
26112613
*/
26122614
struct cfg80211_scan_request {
26132615
struct cfg80211_ssid *ssids;
@@ -2636,6 +2638,7 @@ struct cfg80211_scan_request {
26362638
bool scan_6ghz;
26372639
u32 n_6ghz_params;
26382640
struct cfg80211_scan_6ghz_params *scan_6ghz_params;
2641+
s8 tsf_report_link_id;
26392642

26402643
/* keep last */
26412644
struct ieee80211_channel *channels[] __counted_by(n_channels);

include/uapi/linux/nl80211.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6241,9 +6241,11 @@ enum nl80211_feature_flags {
62416241
* the BSS that the interface that requested the scan is connected to
62426242
* (if available).
62436243
* @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the
6244-
* time the last beacon/probe was received. The time is the TSF of the
6245-
* BSS that the interface that requested the scan is connected to
6246-
* (if available).
6244+
* time the last beacon/probe was received. For a non MLO connection, the
6245+
* time is the TSF of the BSS that the interface that requested the scan is
6246+
* connected to (if available). For an MLO connection, the time is the TSF
6247+
* of the BSS corresponding with link ID specified in the scan request (if
6248+
* specified).
62476249
* @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of
62486250
* channel dwell time.
62496251
* @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate

net/wireless/nl80211.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9337,6 +9337,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
93379337
else
93389338
eth_broadcast_addr(request->bssid);
93399339

9340+
request->tsf_report_link_id = nl80211_link_id_or_invalid(info->attrs);
93409341
request->wdev = wdev;
93419342
request->wiphy = &rdev->wiphy;
93429343
request->scan_start = jiffies;

0 commit comments

Comments
 (0)