]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
iwlwifi: avoid sending too many commands
[mv-sheeva.git] / drivers / net / wireless / iwlwifi / iwl-agn-hcmd.c
index d03ba6a8e64a2d2bba3488cf0885711e49d4a131..a63582f060f1be6908fd8dc110dc04e1dcaaf5ec 100644 (file)
@@ -287,6 +287,15 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
        ctx_bss = &priv->contexts[IWL_RXON_CTX_BSS];
        ctx_pan = &priv->contexts[IWL_RXON_CTX_PAN];
 
+       /*
+        * If the PAN context is inactive, then we don't need
+        * to update the PAN parameters, the last thing we'll
+        * have done before it goes inactive is making the PAN
+        * parameters be WLAN-only.
+        */
+       if (!ctx_pan->is_active)
+               return 0;
+
        memset(&cmd, 0, sizeof(cmd));
 
        /* only 2 slots are currently allowed */