From: Mohammed Shafi Shajakhan Date: Tue, 7 Dec 2010 15:10:58 +0000 (+0530) Subject: ath9k: Properly use unlikely check macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=aaef24b4c9f5db726e618977b74ffef924360de5;p=openwrt%2Fstaging%2Fblogic.git ath9k: Properly use unlikely check macro AUTOSLEEP feature is enabled only for AR9271 and AR9003 version chipsets.So unlikely macro should be used only to check whether auto-sleep feature is enabled Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 3f8b2e32f364..0eac27d56da7 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -1745,10 +1745,11 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) } spin_lock_irqsave(&sc->sc_pm_lock, flags); - if (unlikely(ath9k_check_auto_sleep(sc) || - (sc->ps_flags & (PS_WAIT_FOR_BEACON | + + if ((sc->ps_flags & (PS_WAIT_FOR_BEACON | PS_WAIT_FOR_CAB | - PS_WAIT_FOR_PSPOLL_DATA)))) + PS_WAIT_FOR_PSPOLL_DATA)) || + unlikely(ath9k_check_auto_sleep(sc))) ath_rx_ps(sc, skb); spin_unlock_irqrestore(&sc->sc_pm_lock, flags);