cfg80211: add support to configure HE MCS for beacon rate
PATCH v2 1/1 cfg80211: add support to configure HE MCS for beacon rate
This allows an option to configure a single HE MCS beacon tx rate.
---
v2: clear mcs ratemask when beacon tx rate is not set.
include/uapi/linux/nl80211.h | 9 +++++++-- net/wireless/nl80211.c | 48 +++++++++++++++++++++++++++++++++++--------- 2 files changed, 46 insertions(+), 11 deletions(-)
include/uapi/linux/nl80211.h +7 -2
@@ -1750,8 +1750,9 @@ enum nl80211_commands {* specify just a single bitrate, which is to be used for the beacon. * The driver must also specify support for this with the extended * features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY, -* NL80211_EXT_FEATURE_BEACON_RATE_HT and -* NL80211_EXT_FEATURE_BEACON_RATE_VHT. +* NL80211_EXT_FEATURE_BEACON_RATE_HT, +* NL80211_EXT_FEATURE_BEACON_RATE_VHT and +* NL80211_EXT_FEATURE_BEACON_RATE_HE. * * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
@@ -5896,6 +5897,9 @@ enum nl80211_feature_flags {* @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports * unsolicited broadcast probe response transmission * +* @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate +* configuration (AP/mesh) with HE rates. +* * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. */
@@ -5956,6 +5960,7 @@ enum nl80211_ext_feature_index {NL80211_EXT_FEATURE_SAE_OFFLOAD_AP ,NL80211_EXT_FEATURE_FILS_DISCOVERY ,NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP , +NL80211_EXT_FEATURE_BEACON_RATE_HE ,/* add new features before the definition below */ NUM_NL80211_EXT_FEATURES,
net/wireless/nl80211.c +39 -9
114 lines not on this page · raw message
Signature · 1 line
2.7.4
Johannes Berg
maintainerQuoted 5 lines · Rajkumar Manoharan
This allows an option to configure a single HE MCS beacon tx rate.
Signed-off-by Rajkumar Manoharan <[email protected]>---
v2: clear mcs ratemask when beacon tx rate is not set.
I can't believe I didn't realize this before, but ...
net/wireless/nl80211.c static int nl80211_parse_tx_bitrate_mask(struct genl_info *info, · line 4678
Quoted 8 lines
net/wireless/nl80211.c +3
-1@@ -4672,14 +4673,20 @@ static int nl80211_parse_tx_bitrate_mask(struct genl_info *info, nla_len(tb[NL80211_TXRATE_HT]), mask->control[band].ht_mcs))return -EINVAL ; - } + }else if (is_beacon_tx_rate) +memset (&mask->control[band].ht_mcs,0 , +sizeof (mask->control[band].ht_mcs));
I think this is a bit strange?
I mean, why not just skip the
/* Default to all rates enabled */
for (i = 0; i < NUM_NL80211_BANDS; i++) {
[...]
}code? Right now you're first setting it, and then clearing it again when is_beacon_tx_rate is set ...
I'd prefer a "default_all_enabled" parameter, and then call the above loop conditionally on it (perhaps moving it to a separate function to not have all the deep indentation to worry about).
johannes
Johannes Berg
maintainerQuoted 8 lines · Johannes Berg
Quoted 5 lines · Rajkumar Manoharan
This allows an option to configure a single HE MCS beacon tx rate.
Signed-off-by Rajkumar Manoharan <[email protected]>---
v2: clear mcs ratemask when beacon tx rate is not set.I can't believe I didn't realize this before, but ...
Never mind that comment ... it wasn't there before, I was confused :)
Quoted 7 lines
I mean, why not just skip the
/* Default to all rates enabled */ for (i = 0; i < NUM_NL80211_BANDS; i++) { [...] }
Quoted 7 lines
code? Right now you're first setting it, and then clearing it again when
is_beacon_tx_rateis set ...I'd prefer a "
default_all_enabled" parameter, and then call the above loop conditionally on it (perhaps moving it to a separate function to not have all the deep indentation to worry about).
And maybe that should be a separate patch.
johannes
Quoted 4 lines · Johannes Berg
Quoted 3 lines · Johannes Berg
Quoted 2 lines · Rajkumar Manoharan
This allows an option to configure a single HE MCS beacon tx rate.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Signed-off-by Rajkumar Manoharan <[email protected]>---
v2: clear mcs ratemask when beacon tx rate is not set.I can't believe I didn't realize this before, but ...
Never mind that comment ... it wasn't there before, I was confused :)
No worries. :)
Quoted 11 lines
Quoted 11 lines
I mean, why not just skip the
/* Default to all rates enabled */ for (i = 0; i < NUM_NL80211_BANDS; i++) { [...] }code? Right now you're first setting it, and then clearing it again when
is_beacon_tx_rateis set ...
Quoted 6 lines
Quoted 3 lines
I'd prefer a "
default_all_enabled" parameter, and then call the above loop conditionally on it (perhaps moving it to a separate function to not have all the deep indentation to worry about).And maybe that should be a separate patch.
Neat.. Will split the patch and send a new series.
-Rajkumar