lkml.org 
[lkml]   [2022]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.17 0509/1126] mt76: mt7915: fix the nss setting in bitrates
    Date
    From: MeiChia Chiu <meichia.chiu@mediatek.com>

    [ Upstream commit c41d2a075206fcbdc89695b874a6ac06160b4f1a ]

    without this change, the fixed MCS only supports 1 Nss.

    Fixes: 70fd1333cd32f ("mt76: mt7915: rework .set_bitrate_mask() to support more options")
    Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
    Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com>
    Signed-off-by: Felix Fietkau <nbd@nbd.name>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 9 ++++++---
    1 file changed, 6 insertions(+), 3 deletions(-)

    diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
    index f7b97b7ab21f..8ff2402c4817 100644
    --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
    +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
    @@ -2126,9 +2126,12 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
    phy.sgi |= gi << (i << (_he)); \
    phy.he_ltf |= mask->control[band].he_ltf << (i << (_he));\
    } \
    - for (i = 0; i < ARRAY_SIZE(mask->control[band]._mcs); i++) \
    - nrates += hweight16(mask->control[band]._mcs[i]); \
    - phy.mcs = ffs(mask->control[band]._mcs[0]) - 1; \
    + for (i = 0; i < ARRAY_SIZE(mask->control[band]._mcs); i++) { \
    + if (!mask->control[band]._mcs[i]) \
    + continue; \
    + nrates += hweight16(mask->control[band]._mcs[i]); \
    + phy.mcs = ffs(mask->control[band]._mcs[i]) - 1; \
    + } \
    } while (0)

    if (sta->he_cap.has_he) {
    --
    2.34.1


    \
     
     \ /
      Last update: 2022-04-05 14:31    [W:4.036 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site