mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-10 20:38:50 -04:00
wifi: cfg80211/mac80211: Add support to get radio index
Currently, per-radio attributes are set on per-phy basis, i.e., all the radios present in a wiphy will take attributes values sent from user. But each radio in a wiphy can get different values from userspace based on its requirement. To extend support to set per-radio attributes, add support to get radio index from userspace. Add an NL attribute - NL80211_ATTR_WIPHY_RADIO_INDEX, to get user specified radio index for which attributes should be changed. Pass this to individual drivers, so that the drivers can use this radio index to change per-radio attributes when necessary. Currently, per-radio attributes identified are: NL80211_ATTR_WIPHY_TX_POWER_LEVEL NL80211_ATTR_WIPHY_ANTENNA_TX NL80211_ATTR_WIPHY_ANTENNA_RX NL80211_ATTR_WIPHY_RETRY_SHORT NL80211_ATTR_WIPHY_RETRY_LONG NL80211_ATTR_WIPHY_FRAG_THRESHOLD NL80211_ATTR_WIPHY_RTS_THRESHOLD NL80211_ATTR_WIPHY_COVERAGE_CLASS NL80211_ATTR_TXQ_LIMIT NL80211_ATTR_TXQ_MEMORY_LIMIT NL80211_ATTR_TXQ_QUANTUM By default, the radio index is set to -1. This means the attribute should be treated as a global configuration. If the user has not specified any index, then the radio index passed to individual drivers would be -1. This would indicate that the attribute applies to all radios in that wiphy. Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Link: https://patch.msgid.link/20250615082312.619639-2-quic_rdevanat@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
4cb1ce7e25
commit
b74947b4f6
@@ -2907,6 +2907,14 @@ enum nl80211_commands {
|
||||
* APs Support". Drivers may set additional flags that they support
|
||||
* in the kernel or device.
|
||||
*
|
||||
* @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index
|
||||
* of the radio in interest. Internally a value of -1 is used to
|
||||
* indicate that the radio id is not given in user-space. This means
|
||||
* that all the attributes are applicable to all the radios. If there is
|
||||
* a radio index provided in user-space, the attributes will be
|
||||
* applicable to that specific radio only. If the radio id is greater
|
||||
* thank the number of radios, error denoting invalid value is returned.
|
||||
*
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -3464,6 +3472,8 @@ enum nl80211_attrs {
|
||||
|
||||
NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS,
|
||||
|
||||
NL80211_ATTR_WIPHY_RADIO_INDEX,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
|
||||
Reference in New Issue
Block a user