ath10k: fix failure to set multiple fixed rate
PATCH 1/1 ath10k: fix failure to set multiple fixed rate
Currently, below fixed rate commands are broken,
iw wlanx set bitrates legacy-<2.4|5> ht-mcs-<2.4|5> vht-mcs-<2.4|5> \
<NSS:MCSx>
iw wlanx set bitrates legacy-<2.4|5> <legacy rate> ht-mcs-<2.4|5> \
<MCS index> vht-mcs-<2.4|5>
iw wlanx set bitrates legacy-<2.4|5> <legacy rate> ht-mcs-<2.4|5> \
vht-mcs-<2.4|5> <NSS:MCSx>
There are two methods to set fixed rate, both failed,
- Use vdev fixed rate command
This command only support one single rate, but it's broken due to mac80211 change commit e8e4f5280ddd ("mac80211: reject/clear user rate mask if not usable"), which requires user to specify at least one legacy rate. So we can't use this command to set ht/vht single rate any more.
- Use peer_assoc command
This command can update rx capability for multiple rates, it will work fine for ht mcs rates, as each supported mcs can be advertised in ht_mcs index mask. But this will not work with vht rates because, as per the vht mcs capability advertisement, there are only two bits to indicate the supported mcs. E.g. only support 0-7, 0-8, 0-9.
So introduced new WMI command: WMI_PEER_PARAM_FIXED_RATE. After peer assoc, the peer fixed rate cmd will work for that specific peer. Remaining peers will use auto rate. If both vdev fixed rate and peer fixed rates are given, peer fixed rate will take effect to peers for which this cmd is given. Remaining peers in that vdev, will use vdev fixed rate.
Tested HW: QCA9984
Tested FW: 10.4-3.9.0.2-00035
--- drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 7 +++ drivers/net/wireless/ath/ath10k/mac.c | 111 +++++++++++++++++++++++++++++---- drivers/net/wireless/ath/ath10k/wmi.h | 1 + 4 files changed, 108 insertions(+), 12 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +1 -0
@@ -612,6 +612,7 @@ [ATH10K_FW_FEATURE_MGMT_TX_BY_REF] = "mgmt-tx-by-reference", [ATH10K_FW_FEATURE_NON_BMI] = "non-bmi", [ATH10K_FW_FEATURE_SINGLE_CHAN_INFO_PER_CHANNEL] = "single-chan-info-per-channel", + [ATH10K_FW_FEATURE_PEER_FIXED_RATE] = "peer-fixed-rate", }; static unsigned int ath10k_core_get_fw_feature_str(char *buf,
drivers/net/wireless/ath/ath10k/core.h +7 -0
@@ -579,6 +579,10 @@ struct ath10k_vif {struct work_struct ap_csa_work;struct delayed_work connection_loss_work;struct cfg80211_bitrate_mask bitrate_mask; + +/* For setting VHT peer fixed rate, protected by conf_mutex */ +int vht_num_rates; +u8 vht_pfr; };struct ath10k_vif_iter {
@@ -770,6 +774,9 @@ enum ath10k_fw_features {/* Firmware sends only one chan_info event per channel */ ATH10K_FW_FEATURE_SINGLE_CHAN_INFO_PER_CHANNEL =20 , +/* Firmware allows setting peer fixed rate */ +ATH10K_FW_FEATURE_PEER_FIXED_RATE =21 , +/* keep last */ ATH10K_FW_FEATURE_COUNT, };
drivers/net/wireless/ath/ath10k/mac.c +99 -12
195 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi.h +1 -0
@@ -6260,6 +6260,7 @@ enum wmi_peer_param {WMI_PEER_CHAN_WIDTH =0x4 ,WMI_PEER_NSS =0x5 ,WMI_PEER_USE_4ADDR =0x6 , +WMI_PEER_PARAM_FIXED_RATE =0x9 ,WMI_PEER_DEBUG =0xa ,WMI_PEER_PHYMODE =0xd , WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */
Signature · 1 line
1.9.1