summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>2025-05-27 11:41:43 +0300
committerJohannes Berg <johannes.berg@intel.com>2025-06-20 11:44:05 +0300
commitdf42bfc96e0ad90d243c0ee6b783a33bdb72a184 (patch)
tree771d8622aa5d6d45f6bbdfe095704434368faffc /include
parentaa34ecc42a2138af76642b68b53a5a07cb12fe43 (diff)
downloadlinux-df42bfc96e0ad90d243c0ee6b783a33bdb72a184.tar.xz
wifi: cfg80211: Add utility API to get radio index from channel
Add utility API cfg80211_get_radio_idx_by_chan() to retrieve the radio index corresponding to a given channel in a multi-radio wiphy. This utility function can be used when we want to check the radio-specific data for a channel in a multi-radio wiphy. For example, it can help determine the radio index required to handle a scan request. This index can then be used to decide whether the scan can proceed without interfering with ongoing DFS operations on another radio. Signed-off-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Co-developed-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Link: https://patch.msgid.link/20250527-mlo-dfs-acs-v2-1-92c2f37c81d9@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg80211.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d1848dc8ec99..7719a90ab4d7 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -9372,6 +9372,17 @@ int cfg80211_iter_combinations(struct wiphy *wiphy,
void (*iter)(const struct ieee80211_iface_combination *c,
void *data),
void *data);
+/**
+ * cfg80211_get_radio_idx_by_chan - get the radio index by the channel
+ *
+ * @wiphy: the wiphy
+ * @chan: channel for which the supported radio index is required
+ *
+ * Return: radio index on success or a negative error code
+ */
+int cfg80211_get_radio_idx_by_chan(struct wiphy *wiphy,
+ const struct ieee80211_channel *chan);
+
/**
* cfg80211_stop_iface - trigger interface disconnection