ath10k: Drop WARN_ON()s that always trigger during system resume [Linux 5.1]

ath10k: Drop WARN_ON()s that always trigger during system resume [Linux 5.1]

This Linux kernel change "ath10k: Drop WARN_ON()s that always trigger during system resume" is included in the Linux 5.1 release. This change is authored by Rafael J. Wysocki <rafael.j.wysocki [at] intel.com> on Sun Mar 3 18:24:33 2019 +0100. The commit for this change in Linux stable tree is 9e80ad3 (patch).

ath10k: Drop WARN_ON()s that always trigger during system resume

ath10k_mac_vif_chan() always returns an error for the given vif
during system-wide resume which reliably triggers two WARN_ON()s
in ath10k_bss_info_changed() and they are not particularly
useful in that code path, so drop them.

Tested: QCA6174 hw3.2 PCI with WLAN.RM.2.0-00180-QCARMSWPZ-1
Tested: QCA6174 hw3.2 SDIO with WLAN.RMH.4.4.1-00007-QCARMSWP-1

Fixes: cd93b83ad927 ("ath10k: support for multicast rate control")
Fixes: f279294e9ee2 ("ath10k: add support for configuring management packet rate")
Cc: [email protected]
Reviewed-by: Brian Norris <[email protected]>
Tested-by: Brian Norris <[email protected]>
Tested-by: Claire Chang <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/wireless/ath/ath10k/mac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 41e89db..9c703d2 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5774,7 +5774,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
    }

    if (changed & BSS_CHANGED_MCAST_RATE &&
-       !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
+       !ath10k_mac_vif_chan(arvif->vif, &def)) {
        band = def.chan->band;
        rateidx = vif->bss_conf.mcast_rate[band] - 1;

@@ -5812,7 +5812,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
    }

    if (changed & BSS_CHANGED_BASIC_RATES) {
-       if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) {
+       if (ath10k_mac_vif_chan(vif, &def)) {
            mutex_unlock(&ar->conf_mutex);
            return;
        }

Leave a Reply

Your email address will not be published. Required fields are marked *