mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: fix the wrong SMPS mode
Without this change, it sends the wrong SMPS mode to firmware
when a station sends an action frame with disabled SMPS.
Fixes: 427b09cd6bfa ("mt76: mt7915: fix SMPS operation fail")
Reviewed-by: Ryder Lee <[email protected]>
Signed-off-by: MeiChia Chiu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
fa187f5cf0
commit
11ebf11a35
+16
-1
@@ -2022,6 +2022,21 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
|
||||
bfee->fb_identity_matrix = (nrow == 1 && tx_ant == 2);
|
||||
}
|
||||
|
||||
static enum mcu_mmps_mode
|
||||
mt7915_mcu_get_mmps_mode(enum ieee80211_smps_mode smps)
|
||||
{
|
||||
switch (smps) {
|
||||
case IEEE80211_SMPS_OFF:
|
||||
return MCU_MMPS_DISABLE;
|
||||
case IEEE80211_SMPS_STATIC:
|
||||
return MCU_MMPS_STATIC;
|
||||
case IEEE80211_SMPS_DYNAMIC:
|
||||
return MCU_MMPS_DYNAMIC;
|
||||
default:
|
||||
return MCU_MMPS_DISABLE;
|
||||
}
|
||||
}
|
||||
|
||||
int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
@@ -2053,7 +2068,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
|
||||
ra->phy = *phy;
|
||||
break;
|
||||
case RATE_PARAM_MMPS_UPDATE:
|
||||
ra->mmps_mode = (sta->smps_mode == IEEE80211_SMPS_DYNAMIC);
|
||||
ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->smps_mode);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -366,6 +366,13 @@ enum {
|
||||
MCU_PHY_STATE_OFDMLQ_CNINFO,
|
||||
};
|
||||
|
||||
enum mcu_mmps_mode {
|
||||
MCU_MMPS_STATIC,
|
||||
MCU_MMPS_DYNAMIC,
|
||||
MCU_MMPS_RSV,
|
||||
MCU_MMPS_DISABLE,
|
||||
};
|
||||
|
||||
#define STA_TYPE_STA BIT(0)
|
||||
#define STA_TYPE_AP BIT(1)
|
||||
#define STA_TYPE_ADHOC BIT(2)
|
||||
|
||||
Reference in New Issue
Block a user