iwlwifi: move uCode deallocation to drv
authorJohannes Berg <johannes.berg@intel.com>
Mon, 5 Mar 2012 19:24:48 +0000 (11:24 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 6 Mar 2012 20:16:15 +0000 (15:16 -0500)
This shouldn't be in the op_mode, as it
will later be switchable at runtime.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-drv.c

index 6dd4faead7cda4bccef802ab8478b9c17de304ee..c3b594647def82ef25b68f22f872f0ad82bd6955 100644 (file)
@@ -1385,8 +1385,6 @@ static void iwl_op_mode_dvm_stop(struct iwl_op_mode *op_mode)
        /*This will stop the queues, move the device to low power state */
        iwl_trans_stop_device(trans(priv));
 
-       iwl_dealloc_ucode(nic(priv));
-
        iwl_eeprom_free(priv->shrd);
 
        /*netif_stop_queue(dev); */
index 76fc4407b19e5c2d3435eb122d3e3a3b1577a154..590f57662754cc263d3aa3d865a3500e5836c104 100644 (file)
@@ -99,5 +99,7 @@ void iwl_drv_stop(struct iwl_shared *shrd)
        if (shrd->nic->op_mode)
                iwl_op_mode_stop(shrd->nic->op_mode);
 
+       iwl_dealloc_ucode(shrd->nic);
+
        kfree(shrd->nic);
 }