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

index 67c9668d2e3781503950c7071d1abeb035f5b7d8,49df0e9d5c5f05397e2b8947b394320906cd6a51..80898bb808b5a36493cea945752e34f6fe5d9658
@@@ -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: