From: Kalle Valo Date: Mon, 12 Jun 2017 16:29:39 +0000 (+0300) Subject: Merge tag 'iwlwifi-next-for-kalle-2017-06-06' of git://git.kernel.org/pub/scm/linux... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=833689044e13a3fb8c6c03ad868375670d97010b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge tag 'iwlwifi-next-for-kalle-2017-06-06' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next 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(). --- 833689044e13a3fb8c6c03ad868375670d97010b diff --cc drivers/net/wireless/intel/iwlwifi/iwl-8000.c index 89137717c1fc,707f282b5afd..766bb2037b94 --- a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c @@@ -70,12 -70,12 +70,12 @@@ #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 diff --cc drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 52f8d7a6a7dc,73bd56e06d95..9a9163f64553 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@@ -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); } diff --cc drivers/net/wireless/intel/iwlwifi/mvm/tt.c index 506d58104e1c,6414a46e8bb5..453a785a3ea5 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@@ -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; + mutex_lock(&mvm->mutex); + - if (!mvm->ucode_loaded || !(mvm->cur_ucode == IWL_UCODE_REGULAR)) { + if (!iwl_mvm_firmware_running(mvm) || + mvm->cur_ucode != IWL_UCODE_REGULAR) { ret = -EIO; goto unlock; }