• Aditya Kumar Singh's avatar
    wifi: ath12k: fix firmware assert during channel switch for peer sta · cbc0008c
    Aditya Kumar Singh authored
    Currently, during change in bandwidth for peer sta, host sends the
    new value of channel width via WMI_PEER_CHWIDTH set peer param command
    alone. This can lead to firmware assert in some scenario since before
    the command, firmware was having value of channel width and its
    corresponding phymode. After the command, host tries to set the new
    value of channel width alone which can become incompatible when compared
    with its phymode.
    
    For example:
    
    Bandwidth Upgrade
    ~~~~~~~~~~~~~~~~~~
    After association, sta is in 40 MHz bandwidth in 11ax-HE40 phymode.
    After bandwidth upgrades, sta moves to 80 MHz but as per phymode,
    max bandwidth is still 40 MHz. Hence, firmware assert is seen.
    So in this case first phymode should be moved to 11ax-HE80
    followed by bandwidth change.
    
    Bandwidth Downgrade
    ~~~~~~~~~~~~~~~~~~
    Similarly, reverse of above is also possible when sta is in 40 MHz
    bandwidth in 11ax-HE40 phymode. Bandwidth should be changed to 20 MHz
    and if host sends phymode first then, phymode will become 11ax-HE20
    and will be incompatible with bandwidth value and hence firmware
    assert will be seen. Hence, in this case first channel width
    should be set followed by phymode.
    
    Fix this issue by sending WMI set peer param command for phymode as
    well as bandwidth based on the type of bandwidth change i.e upgrade
    or downgrade.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
    Signed-off-by: default avatarAditya Kumar Singh <quic_adisi@quicinc.com>
    Signed-off-by: default avatarAaradhana Sahu <quic_aarasahu@quicinc.com>
    Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
    Link: https://lore.kernel.org/r/20230315113202.8774-1-quic_aarasahu@quicinc.com
    cbc0008c
mac.c 187 KB