iwlwifi: do not call statistics from rfkill
authorMohamed Abbas <mohamed.abbas@intel.com>
Wed, 29 Oct 2008 21:05:49 +0000 (14:05 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 Nov 2008 20:17:38 +0000 (15:17 -0500)
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c

index f3e4cf5..8264d37 100644 (file)
@@ -1153,6 +1153,10 @@ static void iwl_bg_statistics_periodic(unsigned long data)
        if (test_bit(STATUS_EXIT_PENDING, &priv->status))
                return;
 
+       /* dont send host command if rf-kill is on */
+       if (!iwl_is_ready_rf(priv))
+               return;
+
        iwl_send_statistics_request(priv, CMD_ASYNC);
 }