Commit 6285ee30 authored by Ilan Peer's avatar Ilan Peer Committed by Johannes Berg

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: default avatarIlan Peer <ilan.peer@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20231113112844.d4490bcdefb1.I8fcd158b810adddef4963727e9153096416b30ce@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d3ca4ab4
...@@ -2608,6 +2608,8 @@ struct cfg80211_scan_6ghz_params { ...@@ -2608,6 +2608,8 @@ struct cfg80211_scan_6ghz_params {
* @n_6ghz_params: number of 6 GHz params * @n_6ghz_params: number of 6 GHz params
* @scan_6ghz_params: 6 GHz params * @scan_6ghz_params: 6 GHz params
* @bssid: BSSID to scan for (most commonly, the wildcard BSSID) * @bssid: BSSID to scan for (most commonly, the wildcard BSSID)
* @tsf_report_link_id: for MLO, indicates the link ID of the BSS that should be
* used for TSF reporting. Can be set to -1 to indicate no preference.
*/ */
struct cfg80211_scan_request { struct cfg80211_scan_request {
struct cfg80211_ssid *ssids; struct cfg80211_ssid *ssids;
...@@ -2636,6 +2638,7 @@ struct cfg80211_scan_request { ...@@ -2636,6 +2638,7 @@ struct cfg80211_scan_request {
bool scan_6ghz; bool scan_6ghz;
u32 n_6ghz_params; u32 n_6ghz_params;
struct cfg80211_scan_6ghz_params *scan_6ghz_params; struct cfg80211_scan_6ghz_params *scan_6ghz_params;
s8 tsf_report_link_id;
/* keep last */ /* keep last */
struct ieee80211_channel *channels[] __counted_by(n_channels); struct ieee80211_channel *channels[] __counted_by(n_channels);
......
...@@ -6241,9 +6241,11 @@ enum nl80211_feature_flags { ...@@ -6241,9 +6241,11 @@ enum nl80211_feature_flags {
* the BSS that the interface that requested the scan is connected to * the BSS that the interface that requested the scan is connected to
* (if available). * (if available).
* @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the * @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the
* time the last beacon/probe was received. The time is the TSF of the * time the last beacon/probe was received. For a non MLO connection, the
* BSS that the interface that requested the scan is connected to * time is the TSF of the BSS that the interface that requested the scan is
* (if available). * connected to (if available). For an MLO connection, the time is the TSF
* of the BSS corresponding with link ID specified in the scan request (if
* specified).
* @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of * @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of
* channel dwell time. * channel dwell time.
* @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate * @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate
......
...@@ -9337,6 +9337,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) ...@@ -9337,6 +9337,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
else else
eth_broadcast_addr(request->bssid); eth_broadcast_addr(request->bssid);
request->tsf_report_link_id = nl80211_link_id_or_invalid(info->attrs);
request->wdev = wdev; request->wdev = wdev;
request->wiphy = &rdev->wiphy; request->wiphy = &rdev->wiphy;
request->scan_start = jiffies; request->scan_start = jiffies;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment