Merge tag 'iwlwifi-next-for-kalle-2017-06-06' of git://git.kernel.org/pub/scm/linux...
authorKalle Valo <kvalo@codeaurora.org>
Mon, 12 Jun 2017 16:29:39 +0000 (19:29 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 12 Jun 2017 16:29:39 +0000 (19:29 +0300)
First batch of iwlwifi driver patches 4.13

* Loads of FW API documentation improvements (for tools and htmldoc);
* Continued work for the new A000 family;
* Bumped the maximum supported FW API to 31;
* Improve the differentiation between 8000, 9000 and A000 families;
* A lot of fixes and cleanups here and there;

kvalo: There were conflicts iwl_mvm_stop_device() and
iwl_mvm_tcool_set_cur_state(). The former was easy but latter needed more
thought. Apparently the mutex was taken too late, so I fixed so that the mutex
is taken first and then check for iwl_mvm_firmware_running().

12 files changed:
1  2 
drivers/net/wireless/intel/iwlwifi/iwl-8000.c
drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rs.h
drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.h
drivers/net/wireless/intel/iwlwifi/mvm/tt.c
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 89137717c1fce778d63a55af99f16f970f3b34d6,707f282b5afd2124ea0900dd633f98bb1518b9ad..766bb2037b948458c785e00d4c83c1d92f757b62
  #include "iwl-agn-hw.h"
  
  /* Highest firmware API version supported */
- #define IWL8000_UCODE_API_MAX 30
- #define IWL8265_UCODE_API_MAX 30
+ #define IWL8000_UCODE_API_MAX 31
+ #define IWL8265_UCODE_API_MAX 31
  
  /* Lowest firmware API version supported */
 -#define IWL8000_UCODE_API_MIN 17
 -#define IWL8265_UCODE_API_MIN 20
 +#define IWL8000_UCODE_API_MIN 22
 +#define IWL8265_UCODE_API_MIN 22
  
  /* NVM versions */
  #define IWL8000_NVM_VERSION           0x0a1d
index 52f8d7a6a7dcec95d32089a11c7c9e37b53748a7,73bd56e06d9510aeecbc31ee6b945038739a21a6..9a9163f645533f7f881735b88622144a524db9f3
@@@ -1755,8 -1771,7 +1774,8 @@@ static inline void iwl_mvm_stop_device(
  {
        if (!iwl_mvm_has_new_tx_api(mvm))
                iwl_free_fw_paging(mvm);
-       mvm->ucode_loaded = false;
+       clear_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status);
 +      mvm->fw_dbg_conf = FW_DBG_INVALID;
        iwl_trans_stop_device(mvm->trans);
  }
  
index 506d58104e1cc007ba9d767a16dd77f9df8f0481,6414a46e8bb53c54f7387a58fd267ace797a7d0a..453a785a3ea5e91a8a68a475aa2c6a6b1d8f1ff2
@@@ -790,9 -792,8 +792,10 @@@ static int iwl_mvm_tcool_set_cur_state(
        struct iwl_mvm *mvm = (struct iwl_mvm *)(cdev->devdata);
        int ret;
  
-       if (!mvm->ucode_loaded || !(mvm->cur_ucode == IWL_UCODE_REGULAR)) {
 +      mutex_lock(&mvm->mutex);
 +
+       if (!iwl_mvm_firmware_running(mvm) ||
+           mvm->cur_ucode != IWL_UCODE_REGULAR) {
                ret = -EIO;
                goto unlock;
        }