ath9k_htc: do not configure filter before driver is started
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Thu, 7 Jul 2011 18:03:38 +0000 (23:33 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Jul 2011 15:42:24 +0000 (11:42 -0400)
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_main.c

index 7b779689543223cb7c110b64cd9e1fc819a25bf6..7212acb2bd6ccfb2f09caf858e0b13c48998a504 100644 (file)
@@ -1294,11 +1294,16 @@ static void ath9k_htc_configure_filter(struct ieee80211_hw *hw,
        u32 rfilt;
 
        mutex_lock(&priv->mutex);
-       ath9k_htc_ps_wakeup(priv);
-
        changed_flags &= SUPPORTED_FILTERS;
        *total_flags &= SUPPORTED_FILTERS;
 
+       if (priv->op_flags & OP_INVALID) {
+               ath_dbg(ath9k_hw_common(priv->ah), ATH_DBG_ANY,
+                       "Unable to configure filter on invalid state\n");
+               return;
+       }
+       ath9k_htc_ps_wakeup(priv);
+
        priv->rxfilter = *total_flags;
        rfilt = ath9k_htc_calcrxfilter(priv);
        ath9k_hw_setrxfilter(priv->ah, rfilt);