Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
authorJohannes Berg <johannes.berg@intel.com>
Wed, 13 Jun 2012 07:01:22 +0000 (09:01 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 13 Jun 2012 07:01:28 +0000 (09:01 +0200)
1  2 
drivers/net/wireless/iwlwifi/dvm/mac80211.c
drivers/net/wireless/iwlwifi/iwl-drv.c
drivers/net/wireless/iwlwifi/pcie/trans.c

@@@ -899,9 -897,7 +899,8 @@@ static void iwl_ucode_callback(const st
  
        /* We have our copies now, allow OS release its copies */
        release_firmware(ucode_raw);
-       complete(&drv->request_firmware_complete);
  
 +      mutex_lock(&iwlwifi_opmode_table_mtx);
        op = &iwlwifi_opmode_table[DVM_OP_MODE];
  
        /* add this device to the list of devices using this op_mode */
        } else {
                request_module_nowait("%s", op->name);
        }
 +      mutex_unlock(&iwlwifi_opmode_table_mtx);
  
+       /*
+        * Complete the firmware request last so that
+        * a driver unbind (stop) doesn't run while we
+        * are doing the start() above.
+        */
+       complete(&drv->request_firmware_complete);
        return;
  
   try_again: