mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-04 02:25:58 +00:00
ath11k: remove return for empty tx bitrate in mac_op_sta_statistics
Currently in ath11k_mac_op_sta_statistics() there is the following
logic:
if (!arsta->txrate.legacy && !arsta->txrate.nss)
return;
Unfortunately if this condition is true then the function returns without
setting parameters that follow the txrate. To address this issue remove the
return and instead invert the logic to set the txrate logic if
(arsta->txrate.legacy || arsta->txrate.nss).
The same was done also in ath10k in commit 1cd6ba8ae3
("ath10k: remove return
for NL80211_STA_INFO_TX_BITRATE").
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Signed-off-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211011084957.31024-1-wgong@codeaurora.org
This commit is contained in:
parent
78406044bd
commit
1d795645e1
@ -7426,21 +7426,20 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
sinfo->tx_duration = arsta->tx_duration;
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_DURATION);
|
||||
|
||||
if (!arsta->txrate.legacy && !arsta->txrate.nss)
|
||||
return;
|
||||
|
||||
if (arsta->txrate.legacy) {
|
||||
sinfo->txrate.legacy = arsta->txrate.legacy;
|
||||
} else {
|
||||
sinfo->txrate.mcs = arsta->txrate.mcs;
|
||||
sinfo->txrate.nss = arsta->txrate.nss;
|
||||
sinfo->txrate.bw = arsta->txrate.bw;
|
||||
sinfo->txrate.he_gi = arsta->txrate.he_gi;
|
||||
sinfo->txrate.he_dcm = arsta->txrate.he_dcm;
|
||||
sinfo->txrate.he_ru_alloc = arsta->txrate.he_ru_alloc;
|
||||
if (arsta->txrate.legacy || arsta->txrate.nss) {
|
||||
if (arsta->txrate.legacy) {
|
||||
sinfo->txrate.legacy = arsta->txrate.legacy;
|
||||
} else {
|
||||
sinfo->txrate.mcs = arsta->txrate.mcs;
|
||||
sinfo->txrate.nss = arsta->txrate.nss;
|
||||
sinfo->txrate.bw = arsta->txrate.bw;
|
||||
sinfo->txrate.he_gi = arsta->txrate.he_gi;
|
||||
sinfo->txrate.he_dcm = arsta->txrate.he_dcm;
|
||||
sinfo->txrate.he_ru_alloc = arsta->txrate.he_ru_alloc;
|
||||
}
|
||||
sinfo->txrate.flags = arsta->txrate.flags;
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
|
||||
}
|
||||
sinfo->txrate.flags = arsta->txrate.flags;
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
|
||||
|
||||
/* TODO: Use real NF instead of default one. */
|
||||
sinfo->signal = arsta->rssi_comb + ATH11K_DEFAULT_NOISE_FLOOR;
|
||||
|
Loading…
Reference in New Issue
Block a user