mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7915: fix VoW per-station DRR field layout
The per-station DRR config value packs the BSS group into bits 0-3; the bit 4-5 AC priority and bit 6-7 WMM ID fields follow. The group mask covered bits 0-5, overlapping the AC priority field, and the BWC group value was written as a bare constant that ignored the station's group. Narrow the group mask and derive the BWC group from it. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+2
-1
@@ -112,11 +112,12 @@ enum {
|
|||||||
/* Layout of the per-station DRR config value (VOW_DRR_CTRL_STA_ALL). The AC
|
/* Layout of the per-station DRR config value (VOW_DRR_CTRL_STA_ALL). The AC
|
||||||
* quantum fields are in hardware (LMAC) order, i.e. AC0 = BK ... AC3 = VO.
|
* quantum fields are in hardware (LMAC) order, i.e. AC0 = BK ... AC3 = VO.
|
||||||
*/
|
*/
|
||||||
#define VOW_DRR_STA_BSS_GRP_MASK GENMASK(5, 0)
|
#define VOW_DRR_STA_BSS_GRP_MASK GENMASK(3, 0)
|
||||||
#define VOW_DRR_STA_AC0_QNTM_MASK GENMASK(10, 8)
|
#define VOW_DRR_STA_AC0_QNTM_MASK GENMASK(10, 8)
|
||||||
#define VOW_DRR_STA_AC1_QNTM_MASK GENMASK(14, 12)
|
#define VOW_DRR_STA_AC1_QNTM_MASK GENMASK(14, 12)
|
||||||
#define VOW_DRR_STA_AC2_QNTM_MASK GENMASK(18, 16)
|
#define VOW_DRR_STA_AC2_QNTM_MASK GENMASK(18, 16)
|
||||||
#define VOW_DRR_STA_AC3_QNTM_MASK GENMASK(22, 20)
|
#define VOW_DRR_STA_AC3_QNTM_MASK GENMASK(22, 20)
|
||||||
|
#define VOW_DRR_STA_BWC_GRP_MASK GENMASK(29, 24)
|
||||||
|
|
||||||
/* A station references one of the global DWRR quantum levels per AC. The
|
/* A station references one of the global DWRR quantum levels per AC. The
|
||||||
* mac80211 airtime weight spans a wider, finer range than the eight hardware
|
* mac80211 airtime weight spans a wider, finer range than the eight hardware
|
||||||
|
|||||||
+7
-4
@@ -3706,9 +3706,10 @@ int mt7915_mcu_set_vow_drr_ctrl(struct mt7915_dev *dev, struct mt7915_sta *msta,
|
|||||||
};
|
};
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case VOW_DRR_CTRL_STA_ALL:
|
case VOW_DRR_CTRL_STA_ALL: {
|
||||||
setting |= FIELD_PREP(VOW_DRR_STA_BSS_GRP_MASK,
|
u8 grp = mt7915_vow_sta_bss_grp(&msta->vif->mt76);
|
||||||
mt7915_vow_sta_bss_grp(&msta->vif->mt76));
|
|
||||||
|
setting |= FIELD_PREP(VOW_DRR_STA_BSS_GRP_MASK, grp);
|
||||||
setting |= FIELD_PREP(VOW_DRR_STA_AC0_QNTM_MASK,
|
setting |= FIELD_PREP(VOW_DRR_STA_AC0_QNTM_MASK,
|
||||||
mt76_connac_vow_dwrr_quantum(weight, IEEE80211_AC_BK));
|
mt76_connac_vow_dwrr_quantum(weight, IEEE80211_AC_BK));
|
||||||
setting |= FIELD_PREP(VOW_DRR_STA_AC1_QNTM_MASK,
|
setting |= FIELD_PREP(VOW_DRR_STA_AC1_QNTM_MASK,
|
||||||
@@ -3717,9 +3718,11 @@ int mt7915_mcu_set_vow_drr_ctrl(struct mt7915_dev *dev, struct mt7915_sta *msta,
|
|||||||
mt76_connac_vow_dwrr_quantum(weight, IEEE80211_AC_VI));
|
mt76_connac_vow_dwrr_quantum(weight, IEEE80211_AC_VI));
|
||||||
setting |= FIELD_PREP(VOW_DRR_STA_AC3_QNTM_MASK,
|
setting |= FIELD_PREP(VOW_DRR_STA_AC3_QNTM_MASK,
|
||||||
mt76_connac_vow_dwrr_quantum(weight, IEEE80211_AC_VO));
|
mt76_connac_vow_dwrr_quantum(weight, IEEE80211_AC_VO));
|
||||||
setting |= UMAC_BWC_GROUP_MIN << 24;
|
setting |= FIELD_PREP(VOW_DRR_STA_BWC_GRP_MASK,
|
||||||
|
grp + UMAC_BWC_GROUP_MIN);
|
||||||
req.air_time_ctrl.com_value = cpu_to_le32(setting);
|
req.air_time_ctrl.com_value = cpu_to_le32(setting);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case VOW_DRR_CTRL_STA_PAUSE:
|
case VOW_DRR_CTRL_STA_PAUSE:
|
||||||
/* com_value 0 keeps the station unpaused */
|
/* com_value 0 keeps the station unpaused */
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user