Commit b34f346b authored by Ryder Lee's avatar Ryder Lee Committed by Felix Fietkau

wifi: mt76: mt7996: drop return in mt7996_sta_statistics

Avoid blocking other statistics sinfo->filled when txrate is
unavailable.
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 41bc5440
...@@ -975,18 +975,19 @@ static void mt7996_sta_statistics(struct ieee80211_hw *hw, ...@@ -975,18 +975,19 @@ static void mt7996_sta_statistics(struct ieee80211_hw *hw,
struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv; struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;
struct rate_info *txrate = &msta->wcid.rate; struct rate_info *txrate = &msta->wcid.rate;
if (!txrate->legacy && !txrate->flags) if (txrate->legacy || txrate->flags) {
return; if (txrate->legacy) {
sinfo->txrate.legacy = txrate->legacy;
if (txrate->legacy) { } else {
sinfo->txrate.legacy = txrate->legacy; sinfo->txrate.mcs = txrate->mcs;
} else { sinfo->txrate.nss = txrate->nss;
sinfo->txrate.mcs = txrate->mcs; sinfo->txrate.bw = txrate->bw;
sinfo->txrate.nss = txrate->nss; sinfo->txrate.he_gi = txrate->he_gi;
sinfo->txrate.bw = txrate->bw; sinfo->txrate.he_dcm = txrate->he_dcm;
sinfo->txrate.he_gi = txrate->he_gi; sinfo->txrate.he_ru_alloc = txrate->he_ru_alloc;
sinfo->txrate.he_dcm = txrate->he_dcm; }
sinfo->txrate.he_ru_alloc = txrate->he_ru_alloc; sinfo->txrate.flags = txrate->flags;
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
} }
sinfo->txrate.flags = txrate->flags; sinfo->txrate.flags = txrate->flags;
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE); sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment