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.
Showing the changes to include/uapi (1 of 93 files). Show all
Unified · Split
| @@ -2907,6 +2907,14 @@ enum nl80211_commands { · 2906 unmodified lines | |||
| 2907 | * APs Support". Drivers may set additional flags that they support | 2907 | * APs Support". Drivers may set additional flags that they support |
| 2908 | * in the kernel or device. | 2908 | * in the kernel or device. |
| 2909 | * | 2909 | * |
| 2910 | * @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index | ||
| 2911 | * of the radio in interest. Internally a value of -1 is used to | ||
| 2912 | * indicate that the radio id is not given in user-space. This means | ||
| 2913 | * that all the attributes are applicable to all the radios. If there is | ||
| 2914 | * a radio index provided in user-space, the attributes will be | ||
| 2915 | * applicable to that specific radio only. If the radio id is greater | ||
| 2916 | * thank the number of radios, error denoting invalid value is returned. | ||
| 2917 | * | ||
| 2910 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 2918 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2911 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 2919 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2912 | * @__NL80211_ATTR_AFTER_LAST: internal use | 2920 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -3464,6 +3472,8 @@ enum nl80211_attrs { · 551 unmodified lines | |||
| 3464 | 3472 | ||
| 3465 | NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS, | 3473 | NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS, |
| 3466 | 3474 | ||
| 3475 | NL80211_ATTR_WIPHY_RADIO_INDEX, | ||
| 3476 | |||
| 3467 | /* add attributes here, update the policy in nl80211.c */ | 3477 | /* add attributes here, update the policy in nl80211.c */ |
| 3468 | 3478 | ||
| 3469 | __NL80211_ATTR_AFTER_LAST, | 3479 | __NL80211_ATTR_AFTER_LAST, |