iwlwifi: fix for channel switch
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-agn.c
index 1710815691d54ee2cae1ca4b051397af5e2c3b60..7bdedf61dd36075ccd98a28b42e071b90b00d843 100644 (file)
@@ -122,6 +122,17 @@ int iwl_commit_rxon(struct iwl_priv *priv)
                return -EINVAL;
        }
 
+       /*
+        * receive commit_rxon request
+        * abort any previous channel switch if still in process
+        */
+       if (priv->switch_rxon.switch_in_progress &&
+           (priv->switch_rxon.channel != priv->staging_rxon.channel)) {
+               IWL_DEBUG_11H(priv, "abort channel switch on %d\n",
+                     le16_to_cpu(priv->switch_rxon.channel));
+               priv->switch_rxon.switch_in_progress = false;
+       }
+
        /* If we don't need to send a full RXON, we can use
         * iwl_rxon_assoc_cmd which is used to reconfigure filter
         * and other flags for the current radio configuration. */
This page took 0.031794 seconds and 5 git commands to generate.