• Sujith Manoharan's avatar
    ath9k: Fix noisefloor calibration · 13311514
    Sujith Manoharan authored
    commit 696df785 upstream.
    
    The commits,
    
    "ath9k: Fix regression in channelwidth switch at the same channel"
    "ath9k: Fix invalid noisefloor reading due to channel update"
    
    attempted to fix noisefloor calibration when a channel switch
    happens due to HT20/HT40 bandwidth change. This is causing invalid
    readings resulting in messages like:
    
    "ath: phy16: NF[0] (-45) > MAX (-95), correcting to MAX".
    
    This results in an incorrect noise being used initially for reporting
    the signal level of received packets, until NF calibration is done
    and the history buffer is updated via the ANI timer, which happens
    much later.
    
    When a bandwidth change happens, it is appropriate to reset
    the internal history data for the channel. Do this correctly in the
    reset() routine by checking the "chanmode" variable.
    Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
    Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    13311514
hw.c 82.6 KB