Message ID | iwlwifi.20211109192950.486dfa9c4f35.I52a0411774b700bdc7dedb124d8b59bf99456eb2@changeid (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Kalle Valo |
Headers | show |
Series | iwlwifi: mvm: retry init flow if failed | expand |
On Tue, 2021-11-09 at 19:30 +0200, Luca Coelho wrote: > From: Mordechay Goodstein <mordechay.goodstein@intel.com> > > In some very rare cases the init flow may fail. In many cases, this is > recoverable, so we can retry. Implement a loop to retry two more times > after the first attempt failed. > > This can happen in two different situations, namely during probe and > during mac80211 start. For the first case, a simple loop is enough. > For the second case, we need to add a flag to prevent mac80211 from > trying to restart it as well, leaving full control with the driver. > > Cc: <stable@vger.kernel.org> > Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com> > --- Hi Kalle, Can you take this to v5.16? It fixes a rare but critical issue that causes the NIC to become unusable until the next reboot... I'll assign it to you in patchwork. Thanks! -- Cheers, Luca.
Hi Luca, Thank you for the patch! Yet something to improve: [auto build test ERROR on kvalo-wireless-drivers-next/master] [also build test ERROR on kvalo-wireless-drivers/master v5.15 next-20211110] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Luca-Coelho/iwlwifi-mvm-retry-init-flow-if-failed/20211110-013343 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: powerpc-allmodconfig (attached as .config) compiler: powerpc-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/71e548532c8247fa57b9e952895bba06002eddb0 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Luca-Coelho/iwlwifi-mvm-retry-init-flow-if-failed/20211110-013343 git checkout 71e548532c8247fa57b9e952895bba06002eddb0 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/net/wireless/intel/iwlwifi/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/net/wireless/intel/iwlwifi/iwl-drv.c: In function '_iwl_op_mode_start': drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1342:13: error: invalid storage class for function '_iwl_op_mode_stop' 1342 | static void _iwl_op_mode_stop(struct iwl_drv *drv) | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1342:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 1342 | static void _iwl_op_mode_stop(struct iwl_drv *drv) | ^~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1362:13: error: invalid storage class for function 'iwl_req_fw_callback' 1362 | static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) | ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:7, from include/linux/kernel.h:8, from include/linux/list.h:9, from include/linux/swait.h:5, from include/linux/completion.h:12, from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:7: >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1754:19: error: extern declaration of 'iwlwifi_mod_params' follows declaration with no linkage 1754 | IWL_EXPORT_SYMBOL(iwlwifi_mod_params); | ^~~~~~~~~~~~~~~~~~ include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL' 98 | extern typeof(sym) sym; \ | ^~~ include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL' 160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "") | ^~~~~~~~~~~~~~~ include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL' 164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl") | ^~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.h:87:33: note: in expansion of macro 'EXPORT_SYMBOL_GPL' 87 | #define IWL_EXPORT_SYMBOL(sym) EXPORT_SYMBOL_GPL(sym) | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1754:1: note: in expansion of macro 'IWL_EXPORT_SYMBOL' 1754 | IWL_EXPORT_SYMBOL(iwlwifi_mod_params); | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1746:23: note: previous definition of 'iwlwifi_mod_params' with type 'struct iwl_mod_params' 1746 | struct iwl_mod_params iwlwifi_mod_params = { | ^~~~~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:7, from include/linux/kernel.h:8, from include/linux/list.h:9, from include/linux/swait.h:5, from include/linux/completion.h:12, from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:7: >> include/linux/export.h:67:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 67 | static const struct kernel_symbol __ksymtab_##sym \ | ^~~~~~ include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY' 108 | __KSYMTAB_ENTRY(sym, sec) | ^~~~~~~~~~~~~~~ include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL' 152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns) | ^~~~~~~~~~~~~~~~ include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL' 160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "") | ^~~~~~~~~~~~~~~ include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL' 164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl") | ^~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.h:87:33: note: in expansion of macro 'EXPORT_SYMBOL_GPL' 87 | #define IWL_EXPORT_SYMBOL(sym) EXPORT_SYMBOL_GPL(sym) | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1754:1: note: in expansion of macro 'IWL_EXPORT_SYMBOL' 1754 | IWL_EXPORT_SYMBOL(iwlwifi_mod_params); | ^~~~~~~~~~~~~~~~~ >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1778:19: error: non-static declaration of 'iwl_opmode_register' follows static declaration 1778 | IWL_EXPORT_SYMBOL(iwl_opmode_register); | ^~~~~~~~~~~~~~~~~~~ include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL' 98 | extern typeof(sym) sym; \ | ^~~ include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL' 160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "") | ^~~~~~~~~~~~~~~ include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL' 164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl") | ^~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.h:87:33: note: in expansion of macro 'EXPORT_SYMBOL_GPL' 87 | #define IWL_EXPORT_SYMBOL(sym) EXPORT_SYMBOL_GPL(sym) | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1778:1: note: in expansion of macro 'IWL_EXPORT_SYMBOL' 1778 | IWL_EXPORT_SYMBOL(iwl_opmode_register); | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1756:5: note: previous definition of 'iwl_opmode_register' with type 'int(const char *, const struct iwl_op_mode_ops *)' 1756 | int iwl_opmode_register(const char *name, const struct iwl_op_mode_ops *ops) | ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:7, from include/linux/kernel.h:8, from include/linux/list.h:9, from include/linux/swait.h:5, from include/linux/completion.h:12, from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:7: >> include/linux/export.h:67:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 67 | static const struct kernel_symbol __ksymtab_##sym \ | ^~~~~~ include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY' 108 | __KSYMTAB_ENTRY(sym, sec) | ^~~~~~~~~~~~~~~ include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL' 152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns) | ^~~~~~~~~~~~~~~~ include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL' 160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "") | ^~~~~~~~~~~~~~~ include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL' 164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl") | ^~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.h:87:33: note: in expansion of macro 'EXPORT_SYMBOL_GPL' 87 | #define IWL_EXPORT_SYMBOL(sym) EXPORT_SYMBOL_GPL(sym) | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1778:1: note: in expansion of macro 'IWL_EXPORT_SYMBOL' 1778 | IWL_EXPORT_SYMBOL(iwl_opmode_register); | ^~~~~~~~~~~~~~~~~ >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1800:19: error: non-static declaration of 'iwl_opmode_deregister' follows static declaration 1800 | IWL_EXPORT_SYMBOL(iwl_opmode_deregister); | ^~~~~~~~~~~~~~~~~~~~~ include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL' 98 | extern typeof(sym) sym; \ | ^~~ include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL' 160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "") | ^~~~~~~~~~~~~~~ include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL' 164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl") | ^~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.h:87:33: note: in expansion of macro 'EXPORT_SYMBOL_GPL' 87 | #define IWL_EXPORT_SYMBOL(sym) EXPORT_SYMBOL_GPL(sym) | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1800:1: note: in expansion of macro 'IWL_EXPORT_SYMBOL' 1800 | IWL_EXPORT_SYMBOL(iwl_opmode_deregister); | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1780:6: note: previous definition of 'iwl_opmode_deregister' with type 'void(const char *)' 1780 | void iwl_opmode_deregister(const char *name) | ^~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:7, from include/linux/kernel.h:8, from include/linux/list.h:9, from include/linux/swait.h:5, from include/linux/completion.h:12, from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:7: >> include/linux/export.h:67:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 67 | static const struct kernel_symbol __ksymtab_##sym \ | ^~~~~~ include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY' 108 | __KSYMTAB_ENTRY(sym, sec) | ^~~~~~~~~~~~~~~ include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL' 152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns) | ^~~~~~~~~~~~~~~~ include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL' 160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "") | ^~~~~~~~~~~~~~~ include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL' 164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl") | ^~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.h:87:33: note: in expansion of macro 'EXPORT_SYMBOL_GPL' 87 | #define IWL_EXPORT_SYMBOL(sym) EXPORT_SYMBOL_GPL(sym) | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1800:1: note: in expansion of macro 'IWL_EXPORT_SYMBOL' 1800 | IWL_EXPORT_SYMBOL(iwl_opmode_deregister); | ^~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1802:19: error: invalid storage class for function 'iwl_drv_init' 1802 | static int __init iwl_drv_init(void) | ^~~~~~~~~~~~ In file included from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:10: >> include/linux/module.h:131:49: error: invalid storage class for function '__inittest' 131 | static inline initcall_t __maybe_unused __inittest(void) \ | ^~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1828:1: note: in expansion of macro 'module_init' 1828 | module_init(iwl_drv_init); | ^~~~~~~~~~~ >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1828:1: error: 'alias' attribute ignored [-Werror=attributes] drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1830:20: error: invalid storage class for function 'iwl_drv_exit' 1830 | static void __exit iwl_drv_exit(void) | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1830:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 1830 | static void __exit iwl_drv_exit(void) | ^~~~~~ In file included from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:10: >> include/linux/module.h:139:49: error: invalid storage class for function '__exittest' 139 | static inline exitcall_t __maybe_unused __exittest(void) \ | ^~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1838:1: note: in expansion of macro 'module_exit' 1838 | module_exit(iwl_drv_exit); | ^~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1838:1: error: 'alias' attribute ignored [-Werror=attributes] In file included from include/linux/module.h:22, from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:10: include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_debug' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:436:35: note: in expansion of macro '__param_check' 436 | #define param_check_uint(name, p) __param_check(name, p, unsigned int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_uint' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1841:1: note: in expansion of macro 'module_param_named' 1841 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:409:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~ include/linux/moduleparam.h:436:35: note: in expansion of macro '__param_check' 436 | #define param_check_uint(name, p) __param_check(name, p, unsigned int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_uint' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1841:1: note: in expansion of macro 'module_param_named' 1841 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1841:1: note: in expansion of macro 'module_param_named' 1841 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_swcrypto' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:429:34: note: in expansion of macro '__param_check' 429 | #define param_check_int(name, p) __param_check(name, p, int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_int' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1845:1: note: in expansion of macro 'module_param_named' 1845 | module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1845:1: note: in expansion of macro 'module_param_named' 1845 | module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_11n_disable' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:436:35: note: in expansion of macro '__param_check' 436 | #define param_check_uint(name, p) __param_check(name, p, unsigned int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_uint' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1847:1: note: in expansion of macro 'module_param_named' 1847 | module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1847:1: note: in expansion of macro 'module_param_named' 1847 | module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_amsdu_size' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:429:34: note: in expansion of macro '__param_check' 429 | #define param_check_int(name, p) __param_check(name, p, int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_int' 150 | param_check_##type(name, &(value)); \ vim +/iwlwifi_mod_params +1754 drivers/net/wireless/intel/iwlwifi/iwl-drv.c 65de7e84fdc71a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-04-17 1743 65de7e84fdc71a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-04-17 1744 65de7e84fdc71a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-04-17 1745 /* shared module parameters */ 65de7e84fdc71a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-04-17 1746 struct iwl_mod_params iwlwifi_mod_params = { 3b37f4c99c93ab drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2017-05-30 1747 .fw_restart = true, 65de7e84fdc71a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-04-17 1748 .bt_coex_active = true, 65de7e84fdc71a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-04-17 1749 .power_level = IWL_POWER_INDEX_1, 11dee0b4946bc8 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Emmanuel Grumbach 2016-03-15 1750 .uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT, b0d8d2c27007da drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2019-11-07 1751 .enable_ini = true, 65de7e84fdc71a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-04-17 1752 /* the rest are 0 by default */ 65de7e84fdc71a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-04-17 1753 }; 48e29340d54104 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-03-01 @1754 IWL_EXPORT_SYMBOL(iwlwifi_mod_params); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1755 cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1756 int iwl_opmode_register(const char *name, const struct iwl_op_mode_ops *ops) cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1757 { cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1758 int i; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1759 struct iwl_drv *drv; 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1760 struct iwlwifi_opmode_table *op; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1761 ff1ffb850b7ac6 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-06 1762 mutex_lock(&iwlwifi_opmode_table_mtx); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1763 for (i = 0; i < ARRAY_SIZE(iwlwifi_opmode_table); i++) { 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1764 op = &iwlwifi_opmode_table[i]; 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1765 if (strcmp(op->name, name)) cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1766 continue; 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1767 op->ops = ops; 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1768 /* TODO: need to handle exceptional case */ 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1769 list_for_each_entry(drv, &op->drv, list) 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1770 drv->op_mode = _iwl_op_mode_start(drv, op); 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1771 ff1ffb850b7ac6 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-06 1772 mutex_unlock(&iwlwifi_opmode_table_mtx); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1773 return 0; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1774 } ff1ffb850b7ac6 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-06 1775 mutex_unlock(&iwlwifi_opmode_table_mtx); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1776 return -EIO; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1777 } 48e29340d54104 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-03-01 @1778 IWL_EXPORT_SYMBOL(iwl_opmode_register); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1779 cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1780 void iwl_opmode_deregister(const char *name) cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1781 { cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1782 int i; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1783 struct iwl_drv *drv; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1784 ff1ffb850b7ac6 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-06 1785 mutex_lock(&iwlwifi_opmode_table_mtx); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1786 for (i = 0; i < ARRAY_SIZE(iwlwifi_opmode_table); i++) { cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1787 if (strcmp(iwlwifi_opmode_table[i].name, name)) cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1788 continue; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1789 iwlwifi_opmode_table[i].ops = NULL; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1790 cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1791 /* call the stop routine for all devices */ 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1792 list_for_each_entry(drv, &iwlwifi_opmode_table[i].drv, list) 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1793 _iwl_op_mode_stop(drv); 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1794 ff1ffb850b7ac6 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-06 1795 mutex_unlock(&iwlwifi_opmode_table_mtx); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1796 return; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1797 } ff1ffb850b7ac6 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-06 1798 mutex_unlock(&iwlwifi_opmode_table_mtx); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1799 } 48e29340d54104 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-03-01 @1800 IWL_EXPORT_SYMBOL(iwl_opmode_deregister); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1801 cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1802 static int __init iwl_drv_init(void) cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1803 { ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1804 int i, err; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1805 cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1806 for (i = 0; i < ARRAY_SIZE(iwlwifi_opmode_table); i++) cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1807 INIT_LIST_HEAD(&iwlwifi_opmode_table[i].drv); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1808 e32ec12fd11fbc drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2014-10-22 1809 pr_info(DRV_DESCRIPTION "\n"); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1810 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1811 #ifdef CONFIG_IWLWIFI_DEBUGFS 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1812 /* Create the root of iwlwifi debugfs subsystem. */ 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1813 iwl_dbgfs_root = debugfs_create_dir(DRV_NAME, NULL); 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1814 #endif 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1815 ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1816 err = iwl_pci_register_driver(); ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1817 if (err) ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1818 goto cleanup_debugfs; ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1819 ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1820 return 0; ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1821 ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1822 cleanup_debugfs: ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1823 #ifdef CONFIG_IWLWIFI_DEBUGFS ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1824 debugfs_remove_recursive(iwl_dbgfs_root); ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1825 #endif ee3399e5230c5a drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2019-05-10 1826 return err; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1827 } cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 @1828 module_init(iwl_drv_init); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1829 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Hi Luca, Thank you for the patch! Yet something to improve: [auto build test ERROR on kvalo-wireless-drivers-next/master] [also build test ERROR on kvalo-wireless-drivers/master v5.15 next-20211110] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Luca-Coelho/iwlwifi-mvm-retry-init-flow-if-failed/20211110-013343 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: arc-allyesconfig (attached as .config) compiler: arceb-elf-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/71e548532c8247fa57b9e952895bba06002eddb0 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Luca-Coelho/iwlwifi-mvm-retry-init-flow-if-failed/20211110-013343 git checkout 71e548532c8247fa57b9e952895bba06002eddb0 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/net/wireless/intel/iwlwifi/iwl-drv.c: In function '_iwl_op_mode_start': >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1342:13: error: invalid storage class for function '_iwl_op_mode_stop' 1342 | static void _iwl_op_mode_stop(struct iwl_drv *drv) | ^~~~~~~~~~~~~~~~~ >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1342:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 1342 | static void _iwl_op_mode_stop(struct iwl_drv *drv) | ^~~~~~ >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1362:13: error: invalid storage class for function 'iwl_req_fw_callback' 1362 | static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) | ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1756:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 1756 | int iwl_opmode_register(const char *name, const struct iwl_op_mode_ops *ops) | ^~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1780:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 1780 | void iwl_opmode_deregister(const char *name) | ^~~~ >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1802:19: error: invalid storage class for function 'iwl_drv_init' 1802 | static int __init iwl_drv_init(void) | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1802:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 1802 | static int __init iwl_drv_init(void) | ^~~~~~ In file included from arch/arc/include/asm/smp.h:12, from arch/arc/include/asm/cmpxchg.h:13, from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:188, from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/list.h:9, from include/linux/swait.h:5, from include/linux/completion.h:12, from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:7: >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1828:13: error: initializer element is not constant 1828 | module_init(iwl_drv_init); | ^~~~~~~~~~~~ include/linux/init.h:250:55: note: in definition of macro '____define_initcall' 250 | __attribute__((__section__(__sec))) = fn; | ^~ include/linux/init.h:260:9: note: in expansion of macro '__unique_initcall' 260 | __unique_initcall(fn, id, __sec, __initcall_id(fn)) | ^~~~~~~~~~~~~~~~~ include/linux/init.h:262:35: note: in expansion of macro '___define_initcall' 262 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id) | ^~~~~~~~~~~~~~~~~~ include/linux/init.h:291:41: note: in expansion of macro '__define_initcall' 291 | #define device_initcall(fn) __define_initcall(fn, 6) | ^~~~~~~~~~~~~~~~~ include/linux/init.h:296:24: note: in expansion of macro 'device_initcall' 296 | #define __initcall(fn) device_initcall(fn) | ^~~~~~~~~~~~~~~ include/linux/module.h:88:25: note: in expansion of macro '__initcall' 88 | #define module_init(x) __initcall(x); | ^~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1828:1: note: in expansion of macro 'module_init' 1828 | module_init(iwl_drv_init); | ^~~~~~~~~~~ >> drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1830:20: error: invalid storage class for function 'iwl_drv_exit' 1830 | static void __exit iwl_drv_exit(void) | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1830:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 1830 | static void __exit iwl_drv_exit(void) | ^~~~~~ In file included from arch/arc/include/asm/smp.h:12, from arch/arc/include/asm/cmpxchg.h:13, from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:188, from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/list.h:9, from include/linux/swait.h:5, from include/linux/completion.h:12, from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:7: drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1838:13: error: initializer element is not constant 1838 | module_exit(iwl_drv_exit); | ^~~~~~~~~~~~ include/linux/init.h:299:57: note: in definition of macro '__exitcall' 299 | static exitcall_t __exitcall_##fn __exit_call = fn | ^~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1838:1: note: in expansion of macro 'module_exit' 1838 | module_exit(iwl_drv_exit); | ^~~~~~~~~~~ In file included from include/linux/module.h:22, from drivers/net/wireless/intel/iwlwifi/iwl-drv.c:10: >> include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_debug' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:436:35: note: in expansion of macro '__param_check' 436 | #define param_check_uint(name, p) __param_check(name, p, unsigned int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_uint' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1841:1: note: in expansion of macro 'module_param_named' 1841 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:409:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~ include/linux/moduleparam.h:436:35: note: in expansion of macro '__param_check' 436 | #define param_check_uint(name, p) __param_check(name, p, unsigned int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_uint' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1841:1: note: in expansion of macro 'module_param_named' 1841 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1841:1: note: in expansion of macro 'module_param_named' 1841 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:151:50: error: initializer element is not constant 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1841:1: note: in expansion of macro 'module_param_named' 1841 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: note: (near initialization for '__param_debug.<anonymous>.arg') 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1841:1: note: in expansion of macro 'module_param_named' 1841 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_swcrypto' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:429:34: note: in expansion of macro '__param_check' 429 | #define param_check_int(name, p) __param_check(name, p, int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_int' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1845:1: note: in expansion of macro 'module_param_named' 1845 | module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1845:1: note: in expansion of macro 'module_param_named' 1845 | module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:151:50: error: initializer element is not constant 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1845:1: note: in expansion of macro 'module_param_named' 1845 | module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: note: (near initialization for '__param_swcrypto.<anonymous>.arg') 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1845:1: note: in expansion of macro 'module_param_named' 1845 | module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_11n_disable' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:436:35: note: in expansion of macro '__param_check' 436 | #define param_check_uint(name, p) __param_check(name, p, unsigned int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_uint' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1847:1: note: in expansion of macro 'module_param_named' 1847 | module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1847:1: note: in expansion of macro 'module_param_named' 1847 | module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:151:50: error: initializer element is not constant 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1847:1: note: in expansion of macro 'module_param_named' 1847 | module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: note: (near initialization for '__param_11n_disable.<anonymous>.arg') 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1847:1: note: in expansion of macro 'module_param_named' 1847 | module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_amsdu_size' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:429:34: note: in expansion of macro '__param_check' 429 | #define param_check_int(name, p) __param_check(name, p, int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_int' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1850:1: note: in expansion of macro 'module_param_named' 1850 | module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1850:1: note: in expansion of macro 'module_param_named' 1850 | module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:151:50: error: initializer element is not constant 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1850:1: note: in expansion of macro 'module_param_named' 1850 | module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: note: (near initialization for '__param_amsdu_size.<anonymous>.arg') 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1850:1: note: in expansion of macro 'module_param_named' 1850 | module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_fw_restart' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:468:35: note: in expansion of macro '__param_check' 468 | #define param_check_bool(name, p) __param_check(name, p, bool) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_bool' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1854:1: note: in expansion of macro 'module_param_named' 1854 | module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1854:1: note: in expansion of macro 'module_param_named' 1854 | module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:151:50: error: initializer element is not constant 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1854:1: note: in expansion of macro 'module_param_named' 1854 | module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: note: (near initialization for '__param_fw_restart.<anonymous>.arg') 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1854:1: note: in expansion of macro 'module_param_named' 1854 | module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_nvm_file' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:462:36: note: in expansion of macro '__param_check' 462 | #define param_check_charp(name, p) __param_check(name, p, char *) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_charp' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1857:1: note: in expansion of macro 'module_param_named' 1857 | module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1857:1: note: in expansion of macro 'module_param_named' 1857 | module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:151:50: error: initializer element is not constant 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1857:1: note: in expansion of macro 'module_param_named' 1857 | module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: note: (near initialization for '__param_nvm_file.<anonymous>.arg') 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1857:1: note: in expansion of macro 'module_param_named' 1857 | module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444); | ^~~~~~~~~~~~~~~~~~ >> include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_uapsd_disable' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:436:35: note: in expansion of macro '__param_check' 436 | #define param_check_uint(name, p) __param_check(name, p, unsigned int) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_uint' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1860:1: note: in expansion of macro 'module_param_named' 1860 | module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1860:1: note: in expansion of macro 'module_param_named' 1860 | module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: error: initializer element is not constant 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1860:1: note: in expansion of macro 'module_param_named' 1860 | module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: note: (near initialization for '__param_uapsd_disable.<anonymous>.arg') 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1860:1: note: in expansion of macro 'module_param_named' 1860 | module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, uint, 0644); | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_enable_ini' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:468:35: note: in expansion of macro '__param_check' 468 | #define param_check_bool(name, p) __param_check(name, p, bool) | ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_bool' 150 | param_check_##type(name, &(value)); \ | ^~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1863:1: note: in expansion of macro 'module_param_named' 1863 | module_param_named(enable_ini, iwlwifi_mod_params.enable_ini, | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:289:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 289 | static const char __param_str_##name[] = prefix #name; \ | ^~~~~~ include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call' 176 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) | ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1863:1: note: in expansion of macro 'module_param_named' 1863 | module_param_named(enable_ini, iwlwifi_mod_params.enable_ini, | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: error: initializer element is not constant 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1863:1: note: in expansion of macro 'module_param_named' 1863 | module_param_named(enable_ini, iwlwifi_mod_params.enable_ini, | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:151:50: note: (near initialization for '__param_enable_ini.<anonymous>.arg') 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^ include/linux/moduleparam.h:294:61: note: in definition of macro '__module_param_call' 294 | VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } | ^~~ include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb' 151 | module_param_cb(name, ¶m_ops_##type, &value, perm); \ | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1863:1: note: in expansion of macro 'module_param_named' 1863 | module_param_named(enable_ini, iwlwifi_mod_params.enable_ini, | ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_bt_coex_active' 409 | static inline type __always_unused *__check_##name(void) { return(p); } | ^~~~~~~~ include/linux/moduleparam.h:468:35: note: in expansion of macro '__param_check' 468 | #define param_check_bool(name, p) __param_check(name, p, bool) vim +/_iwl_op_mode_stop +1342 drivers/net/wireless/intel/iwlwifi/iwl-drv.c 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1341 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 @1342 static void _iwl_op_mode_stop(struct iwl_drv *drv) 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1343 { 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1344 /* op_mode can be NULL if its start failed */ 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1345 if (drv->op_mode) { 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1346 iwl_op_mode_stop(drv->op_mode); 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1347 drv->op_mode = NULL; 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1348 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1349 #ifdef CONFIG_IWLWIFI_DEBUGFS 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1350 debugfs_remove_recursive(drv->dbgfs_op_mode); 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1351 drv->dbgfs_op_mode = NULL; 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1352 #endif 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1353 } 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1354 } 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1355 7d4ced86997f69 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Lee Jones 2020-09-10 1356 /* 1c8e11e117c28e drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2012-07-16 1357 * iwl_req_fw_callback - callback when firmware was loaded 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1358 * 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1359 * If loaded successfully, copies the firmware into buffers 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1360 * for the card to fetch (via DMA). 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1361 */ 1c8e11e117c28e drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2012-07-16 @1362 static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1363 { 965974a631756a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1364 struct iwl_drv *drv = context; 965974a631756a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1365 struct iwl_fw *fw = &drv->fw; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1366 struct iwl_ucode_header *ucode; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1367 struct iwlwifi_opmode_table *op; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1368 int err; 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1369 struct iwl_firmware_pieces *pieces; 0c4881ced8d2e3 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2016-12-13 1370 const unsigned int api_max = drv->trans->cfg->ucode_api_max; 0c4881ced8d2e3 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2016-12-13 1371 const unsigned int api_min = drv->trans->cfg->ucode_api_min; 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1372 size_t trigger_tlv_sz[FW_DBG_TRIGGER_MAX]; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1373 u32 api_ver; 6dfa8d019cd21d drivers/net/wireless/iwlwifi/iwl-drv.c David Spinadel 2012-03-10 1374 int i; d4b10483223cf1 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-12 1375 bool load_module = false; e6eb8ca9e486a8 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben-Ami 2015-08-30 1376 bool usniffer_images = false; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1377 66140adc22aacd drivers/net/wireless/iwlwifi/iwl-drv.c Luciano Coelho 2013-08-12 1378 fw->ucode_capa.max_probe_length = IWL_DEFAULT_MAX_PROBE_LENGTH; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1379 fw->ucode_capa.standard_phy_calibration_size = 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1380 IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE; 762533ba9c0306 drivers/net/wireless/iwlwifi/iwl-drv.c David Spinadel 2014-06-05 1381 fw->ucode_capa.n_scan_channels = IWL_DEFAULT_SCAN_CHANNELS; be9ae34ead42f8 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Nathan Errera 2020-10-08 1382 fw->ucode_capa.num_stations = IWL_MVM_STATION_COUNT_MAX; 971377e67074a0 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Shahar S Matityahu 2019-01-01 1383 /* dump all fw memory areas by default */ 971377e67074a0 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Shahar S Matityahu 2019-01-01 1384 fw->dbg.dump_mask = 0xffffffff; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1385 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1386 pieces = kzalloc(sizeof(*pieces), GFP_KERNEL); 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1387 if (!pieces) 53d515ec677a19 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2017-02-28 1388 goto out_free_fw; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1389 9d9b21d1b61647 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Emmanuel Grumbach 2016-03-24 1390 if (!ucode_raw) 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1391 goto try_again; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1392 2953c393a0a469 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Shahar S Matityahu 2019-03-04 1393 IWL_DEBUG_FW_INFO(drv, "Loaded firmware file '%s' (%zd bytes).\n", 965974a631756a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1394 drv->firmware_name, ucode_raw->size); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1395 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1396 /* Make sure that we got at least the API version number */ 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1397 if (ucode_raw->size < 4) { 965974a631756a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1398 IWL_ERR(drv, "File size way too small!\n"); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1399 goto try_again; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1400 } 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1401 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1402 /* Data from ucode file: header followed by uCode images */ 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1403 ucode = (struct iwl_ucode_header *)ucode_raw->data; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1404 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1405 if (ucode->ver) 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1406 err = iwl_parse_v1_v2_firmware(drv, ucode_raw, pieces); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1407 else 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1408 err = iwl_parse_tlv_firmware(drv, ucode_raw, pieces, e6eb8ca9e486a8 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben-Ami 2015-08-30 1409 &fw->ucode_capa, &usniffer_images); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1410 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1411 if (err) 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1412 goto try_again; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1413 f0d8f38cd909e0 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2016-04-25 1414 if (fw_has_api(&drv->fw.ucode_capa, IWL_UCODE_TLV_API_NEW_VERSION)) 7e1223b50089ab drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-02-03 1415 api_ver = drv->fw.ucode_ver; f0d8f38cd909e0 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2016-04-25 1416 else f0d8f38cd909e0 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2016-04-25 1417 api_ver = IWL_UCODE_API(drv->fw.ucode_ver); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1418 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1419 /* 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1420 * api_ver should match the api version forming part of the 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1421 * firmware filename ... but we don't check for that and only rely 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1422 * on the API version read from firmware header from here on forward 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1423 */ 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1424 if (api_ver < api_min || api_ver > api_max) { 965974a631756a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1425 IWL_ERR(drv, 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1426 "Driver unable to support your firmware API. " 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1427 "Driver supports v%u, firmware is v%u.\n", 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1428 api_max, api_ver); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1429 goto try_again; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1430 } 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1431 4db2c9aeb28762 drivers/net/wireless/iwlwifi/iwl-drv.c David Spinadel 2012-03-10 1432 /* 4db2c9aeb28762 drivers/net/wireless/iwlwifi/iwl-drv.c David Spinadel 2012-03-10 1433 * In mvm uCode there is no difference between data and instructions 4db2c9aeb28762 drivers/net/wireless/iwlwifi/iwl-drv.c David Spinadel 2012-03-10 1434 * sections. 4db2c9aeb28762 drivers/net/wireless/iwlwifi/iwl-drv.c David Spinadel 2012-03-10 1435 */ 0c4881ced8d2e3 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2016-12-13 1436 if (fw->type == IWL_FW_DVM && validate_sec_sizes(drv, pieces, 0c4881ced8d2e3 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2016-12-13 1437 drv->trans->cfg)) 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1438 goto try_again; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1439 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1440 /* Allocate ucode buffers for card's bus-master loading ... */ 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1441 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1442 /* Runtime instructions and 2 copies of data: 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1443 * 1) unmodified from disk 1e37f79945b0b8 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Christoph Böhmwalder 2017-09-23 1444 * 2) backup cache for save/restore during power-downs 1e37f79945b0b8 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Christoph Böhmwalder 2017-09-23 1445 */ 6dfa8d019cd21d drivers/net/wireless/iwlwifi/iwl-drv.c David Spinadel 2012-03-10 1446 for (i = 0; i < IWL_UCODE_TYPE_MAX; i++) 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1447 if (iwl_alloc_ucode(drv, pieces, i)) 75813bde1f671a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-05-16 1448 goto out_free_fw; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1449 fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1450 if (pieces->dbg_dest_tlv_init) { 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1451 size_t dbg_dest_size = sizeof(*drv->fw.dbg.dest_tlv) + 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1452 sizeof(drv->fw.dbg.dest_tlv->reg_ops[0]) * 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1453 drv->fw.dbg.n_dest_reg; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1454 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1455 drv->fw.dbg.dest_tlv = kmalloc(dbg_dest_size, GFP_KERNEL); 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1456 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1457 if (!drv->fw.dbg.dest_tlv) 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1458 goto out_free_fw; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1459 fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1460 if (*pieces->dbg_dest_ver == 0) { 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1461 memcpy(drv->fw.dbg.dest_tlv, pieces->dbg_dest_tlv_v1, fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1462 dbg_dest_size); fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1463 } else { fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1464 struct iwl_fw_dbg_dest_tlv_v1 *dest_tlv = 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1465 drv->fw.dbg.dest_tlv; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1466 fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1467 dest_tlv->version = pieces->dbg_dest_tlv->version; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1468 dest_tlv->monitor_mode = fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1469 pieces->dbg_dest_tlv->monitor_mode; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1470 dest_tlv->size_power = fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1471 pieces->dbg_dest_tlv->size_power; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1472 dest_tlv->wrap_count = fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1473 pieces->dbg_dest_tlv->wrap_count; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1474 dest_tlv->write_ptr_reg = fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1475 pieces->dbg_dest_tlv->write_ptr_reg; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1476 dest_tlv->base_shift = fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1477 pieces->dbg_dest_tlv->base_shift; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1478 memcpy(dest_tlv->reg_ops, fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1479 pieces->dbg_dest_tlv->reg_ops, 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1480 sizeof(drv->fw.dbg.dest_tlv->reg_ops[0]) * 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1481 drv->fw.dbg.n_dest_reg); fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1482 fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1483 /* In version 1 of the destination tlv, which is fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1484 * relevant for internal buffer exclusively, fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1485 * the base address is part of given with the length fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1486 * of the buffer, and the size shift is give instead of fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1487 * end shift. We now store these values in base_reg, fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1488 * and end shift, and when dumping the data we'll fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1489 * manipulate it for extracting both the length and fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1490 * base address */ fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1491 dest_tlv->base_reg = pieces->dbg_dest_tlv->cfg_reg; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1492 dest_tlv->end_shift = fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1493 pieces->dbg_dest_tlv->size_shift; fd527eb5d22936 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben Ami 2017-08-16 1494 } 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1495 } 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1496 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1497 for (i = 0; i < ARRAY_SIZE(drv->fw.dbg.conf_tlv); i++) { 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1498 if (pieces->dbg_conf_tlv[i]) { 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1499 drv->fw.dbg.conf_tlv[i] = 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1500 kmemdup(pieces->dbg_conf_tlv[i], 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1501 pieces->dbg_conf_tlv_len[i], 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1502 GFP_KERNEL); a176e114ace4cc drivers/net/wireless/intel/iwlwifi/iwl-drv.c Chris Rorvick 2020-04-17 1503 if (!drv->fw.dbg.conf_tlv[i]) 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1504 goto out_free_fw; 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1505 } 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1506 } 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1507 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1508 memset(&trigger_tlv_sz, 0xff, sizeof(trigger_tlv_sz)); 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1509 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1510 trigger_tlv_sz[FW_DBG_TRIGGER_MISSED_BEACONS] = 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1511 sizeof(struct iwl_fw_dbg_trigger_missed_bcon); 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1512 trigger_tlv_sz[FW_DBG_TRIGGER_CHANNEL_SWITCH] = 0; 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1513 trigger_tlv_sz[FW_DBG_TRIGGER_FW_NOTIF] = 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1514 sizeof(struct iwl_fw_dbg_trigger_cmd); 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1515 trigger_tlv_sz[FW_DBG_TRIGGER_MLME] = 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1516 sizeof(struct iwl_fw_dbg_trigger_mlme); 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1517 trigger_tlv_sz[FW_DBG_TRIGGER_STATS] = 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1518 sizeof(struct iwl_fw_dbg_trigger_stats); 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1519 trigger_tlv_sz[FW_DBG_TRIGGER_RSSI] = 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1520 sizeof(struct iwl_fw_dbg_trigger_low_rssi); 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1521 trigger_tlv_sz[FW_DBG_TRIGGER_TXQ_TIMERS] = 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1522 sizeof(struct iwl_fw_dbg_trigger_txq_timer); 874c174eb9950a drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-25 1523 trigger_tlv_sz[FW_DBG_TRIGGER_TIME_EVENT] = 874c174eb9950a drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-25 1524 sizeof(struct iwl_fw_dbg_trigger_time_event); 4203263d8302be drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-04-15 1525 trigger_tlv_sz[FW_DBG_TRIGGER_BA] = 4203263d8302be drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-04-15 1526 sizeof(struct iwl_fw_dbg_trigger_ba); 1e8f1329aa6767 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben-Ami 2015-08-23 1527 trigger_tlv_sz[FW_DBG_TRIGGER_TDLS] = 1e8f1329aa6767 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben-Ami 2015-08-23 1528 sizeof(struct iwl_fw_dbg_trigger_tdls); 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1529 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1530 for (i = 0; i < ARRAY_SIZE(drv->fw.dbg.trigger_tlv); i++) { d2709ad723ff2a drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-01-29 1531 if (pieces->dbg_trigger_tlv[i]) { 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1532 /* 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1533 * If the trigger isn't long enough, WARN and exit. 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1534 * Someone is trying to debug something and he won't 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1535 * be able to catch the bug he is trying to chase. 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1536 * We'd better be noisy to be sure he knows what's 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1537 * going on. 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1538 */ 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1539 if (WARN_ON(pieces->dbg_trigger_tlv_len[i] < 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1540 (trigger_tlv_sz[i] + 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1541 sizeof(struct iwl_fw_dbg_trigger_tlv)))) 2841a2d3a1b4b4 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-03-19 1542 goto out_free_fw; 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1543 drv->fw.dbg.trigger_tlv_len[i] = d2709ad723ff2a drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-01-29 1544 pieces->dbg_trigger_tlv_len[i]; 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1545 drv->fw.dbg.trigger_tlv[i] = d2709ad723ff2a drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-01-29 1546 kmemdup(pieces->dbg_trigger_tlv[i], 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1547 drv->fw.dbg.trigger_tlv_len[i], d2709ad723ff2a drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2015-01-29 1548 GFP_KERNEL); 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1549 if (!drv->fw.dbg.trigger_tlv[i]) a6017b9030f280 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben-Ami 2016-03-14 1550 goto out_free_fw; a6017b9030f280 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben-Ami 2016-03-14 1551 } a6017b9030f280 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben-Ami 2016-03-14 1552 } a6017b9030f280 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Golan Ben-Ami 2016-03-14 1553 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1554 /* Now that we can no longer fail, copy information */ 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1555 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1556 drv->fw.dbg.mem_tlv = pieces->dbg_mem_tlv; 2ed1e019108252 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-10-20 1557 pieces->dbg_mem_tlv = NULL; 17b809c9b22e34 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2018-06-11 1558 drv->fw.dbg.n_mem_tlv = pieces->n_mem_tlv; 2ed1e019108252 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-10-20 1559 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1560 /* 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1561 * The (size - 16) / 12 formula is based on the information recorded 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1562 * for each event, which is of mode 1 (including timestamp) for all 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1563 * new microcodes that include this information. 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1564 */ 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1565 fw->init_evtlog_ptr = pieces->init_evtlog_ptr; 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1566 if (pieces->init_evtlog_size) 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1567 fw->init_evtlog_size = (pieces->init_evtlog_size - 16)/12; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1568 else 0692fe41b36159 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1569 fw->init_evtlog_size = 286ca8eb4d0a97 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2019-07-12 1570 drv->trans->trans_cfg->base_params->max_event_log_size; 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1571 fw->init_errlog_ptr = pieces->init_errlog_ptr; 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1572 fw->inst_evtlog_ptr = pieces->inst_evtlog_ptr; 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1573 if (pieces->inst_evtlog_size) 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1574 fw->inst_evtlog_size = (pieces->inst_evtlog_size - 16)/12; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1575 else 0692fe41b36159 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1576 fw->inst_evtlog_size = 286ca8eb4d0a97 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Luca Coelho 2019-07-12 1577 drv->trans->trans_cfg->base_params->max_event_log_size; 490fefebb6db4c drivers/net/wireless/iwlwifi/iwl-drv.c Liad Kaufman 2014-09-16 1578 fw->inst_errlog_ptr = pieces->inst_errlog_ptr; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1579 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1580 /* 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1581 * figure out the offset of chain noise reset and gain commands 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1582 * base on the size of standard phy calibration commands table size 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1583 */ 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1584 if (fw->ucode_capa.standard_phy_calibration_size > 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1585 IWL_MAX_PHY_CALIBRATE_TBL_SIZE) 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1586 fw->ucode_capa.standard_phy_calibration_size = 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1587 IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1588 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1589 /* We have our copies now, allow OS release its copies */ 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1590 release_firmware(ucode_raw); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1591 ff1ffb850b7ac6 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-06 1592 mutex_lock(&iwlwifi_opmode_table_mtx); ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1593 switch (fw->type) { ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1594 case IWL_FW_DVM: cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1595 op = &iwlwifi_opmode_table[DVM_OP_MODE]; ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1596 break; ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1597 default: ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1598 WARN(1, "Invalid fw type %d\n", fw->type); 10a0472d1850a9 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Gustavo A. R. Silva 2020-11-20 1599 fallthrough; ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1600 case IWL_FW_MVM: ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1601 op = &iwlwifi_opmode_table[MVM_OP_MODE]; ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1602 break; ca221c9b946cd4 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-04-28 1603 } 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1604 2b2719c7b5bbe3 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-03-26 1605 IWL_INFO(drv, "loaded firmware version %s op_mode %s\n", 2b2719c7b5bbe3 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-03-26 1606 drv->fw.fw_version, op->name); 2b2719c7b5bbe3 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-03-26 1607 c03fe6d3b31c75 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Shahar S Matityahu 2019-07-08 1608 iwl_dbg_tlv_load_bin(drv->trans->dev, drv->trans); c03fe6d3b31c75 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Shahar S Matityahu 2019-07-08 1609 cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1610 /* add this device to the list of devices using this op_mode */ cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1611 list_add_tail(&drv->list, &op->drv); cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1612 cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1613 if (op->ops) { 9da987ac2b88b4 drivers/net/wireless/iwlwifi/iwl-drv.c Meenakshi Venkataraman 2012-07-16 1614 drv->op_mode = _iwl_op_mode_start(drv, op); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1615 daf67ce8cffd14 drivers/net/wireless/iwlwifi/iwl-drv.c Dan Carpenter 2012-06-14 1616 if (!drv->op_mode) { daf67ce8cffd14 drivers/net/wireless/iwlwifi/iwl-drv.c Dan Carpenter 2012-06-14 1617 mutex_unlock(&iwlwifi_opmode_table_mtx); f69a23b795d6ee drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-05 1618 goto out_unbind; daf67ce8cffd14 drivers/net/wireless/iwlwifi/iwl-drv.c Dan Carpenter 2012-06-14 1619 } cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1620 } else { d4b10483223cf1 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-12 1621 load_module = true; cc5f7e39761382 drivers/net/wireless/iwlwifi/iwl-drv.c Don Fry 2012-05-16 1622 } ff1ffb850b7ac6 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-06 1623 mutex_unlock(&iwlwifi_opmode_table_mtx); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1624 f69a23b795d6ee drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-05 1625 /* f69a23b795d6ee drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-05 1626 * Complete the firmware request last so that f69a23b795d6ee drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-05 1627 * a driver unbind (stop) doesn't run while we f69a23b795d6ee drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-05 1628 * are doing the start() above. f69a23b795d6ee drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-05 1629 */ f69a23b795d6ee drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-05 1630 complete(&drv->request_firmware_complete); d4b10483223cf1 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-12 1631 d4b10483223cf1 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-12 1632 /* d4b10483223cf1 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-12 1633 * Load the module last so we don't block anything d4b10483223cf1 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-12 1634 * else from proceeding if the module fails to load d4b10483223cf1 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-12 1635 * or hangs loading. d4b10483223cf1 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-06-12 1636 */ 1618b2b02a3a0e drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-04-04 1637 if (load_module) { 06a1e85e66bac2 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2017-02-28 1638 request_module("%s", op->name); 8edf3fd6eb0649 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-05-28 1639 #ifdef CONFIG_IWLWIFI_OPMODE_MODULAR 1618b2b02a3a0e drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-04-04 1640 if (err) 1618b2b02a3a0e drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-04-04 1641 IWL_ERR(drv, 1618b2b02a3a0e drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-04-04 1642 "failed to load module %s (error %d), is dynamic loading enabled?\n", 1618b2b02a3a0e drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-04-04 1643 op->name, err); 8edf3fd6eb0649 drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-05-28 1644 #endif 1618b2b02a3a0e drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2013-04-04 1645 } 2ed1e019108252 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-10-20 1646 goto free; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1647 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1648 try_again: 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1649 /* try next, if any */ 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1650 release_firmware(ucode_raw); 965974a631756a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1651 if (iwl_request_firmware(drv, false)) 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1652 goto out_unbind; 2ed1e019108252 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-10-20 1653 goto free; 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1654 75813bde1f671a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-05-16 1655 out_free_fw: 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1656 release_firmware(ucode_raw); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1657 out_unbind: 965974a631756a drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-06 1658 complete(&drv->request_firmware_complete); 93faaeea4f2873 drivers/net/wireless/iwlwifi/iwl-drv.c Emmanuel Grumbach 2012-03-22 1659 device_release_driver(drv->trans->dev); 2ed1e019108252 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-10-20 1660 free: 53d515ec677a19 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2017-02-28 1661 if (pieces) { eef187a7b8a144 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2016-10-25 1662 for (i = 0; i < ARRAY_SIZE(pieces->img); i++) eef187a7b8a144 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Sara Sharon 2016-10-25 1663 kfree(pieces->img[i].sec); 2ed1e019108252 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-10-20 1664 kfree(pieces->dbg_mem_tlv); 2ed1e019108252 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2016-10-20 1665 kfree(pieces); 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1666 } 53d515ec677a19 drivers/net/wireless/intel/iwlwifi/iwl-drv.c Johannes Berg 2017-02-28 1667 } 15854ef94f54ae drivers/net/wireless/iwlwifi/iwl-drv.c Johannes Berg 2012-03-05 1668 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 36196e07b1a0..b48a8ec80894 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -1313,23 +1313,30 @@ _iwl_op_mode_start(struct iwl_drv *drv, struct iwlwifi_opmode_table *op) const struct iwl_op_mode_ops *ops = op->ops; struct dentry *dbgfs_dir = NULL; struct iwl_op_mode *op_mode = NULL; + int retry, max_retry = !!iwlwifi_mod_params.fw_restart * IWL_MAX_INIT_RETRY; + + for (retry = 0; retry <= max_retry; retry++) { #ifdef CONFIG_IWLWIFI_DEBUGFS - drv->dbgfs_op_mode = debugfs_create_dir(op->name, - drv->dbgfs_drv); - dbgfs_dir = drv->dbgfs_op_mode; + drv->dbgfs_op_mode = debugfs_create_dir(op->name, + drv->dbgfs_drv); + dbgfs_dir = drv->dbgfs_op_mode; #endif - op_mode = ops->start(drv->trans, drv->trans->cfg, &drv->fw, dbgfs_dir); + op_mode = ops->start(drv->trans, drv->trans->cfg, + &drv->fw, dbgfs_dir); + + if (op_mode) + return op_mode; + + IWL_ERR(drv, "retry init count %d\n", retry); #ifdef CONFIG_IWLWIFI_DEBUGFS - if (!op_mode) { debugfs_remove_recursive(drv->dbgfs_op_mode); drv->dbgfs_op_mode = NULL; - } #endif - return op_mode; + return NULL; } static void _iwl_op_mode_stop(struct iwl_drv *drv) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.h b/drivers/net/wireless/intel/iwlwifi/iwl-drv.h index 2e2d60a58692..0fd009e6d685 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.h @@ -89,4 +89,7 @@ void iwl_drv_stop(struct iwl_drv *drv); #define IWL_EXPORT_SYMBOL(sym) #endif +/* max retry for init flow */ +#define IWL_MAX_INIT_RETRY 2 + #endif /* __iwl_drv_h__ */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 9fb9c7dad314..897e3b91ddb2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -16,6 +16,7 @@ #include <net/ieee80211_radiotap.h> #include <net/tcp.h> +#include "iwl-drv.h" #include "iwl-op-mode.h" #include "iwl-io.h" #include "mvm.h" @@ -1117,9 +1118,30 @@ static int iwl_mvm_mac_start(struct ieee80211_hw *hw) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); int ret; + int retry, max_retry = 0; mutex_lock(&mvm->mutex); - ret = __iwl_mvm_mac_start(mvm); + + /* we are starting the mac not in error flow, and restart is enabled */ + if (!test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status) && + iwlwifi_mod_params.fw_restart) { + max_retry = IWL_MAX_INIT_RETRY; + /* + * This will prevent mac80211 recovery flows to trigger during + * init failures + */ + set_bit(IWL_MVM_STATUS_STARTING, &mvm->status); + } + + for (retry = 0; retry <= max_retry; retry++) { + ret = __iwl_mvm_mac_start(mvm); + if (!ret) + break; + + IWL_ERR(mvm, "mac start retry %d\n", retry); + } + clear_bit(IWL_MVM_STATUS_STARTING, &mvm->status); + mutex_unlock(&mvm->mutex); return ret; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 2b1dcd60e00f..a72d85086fe3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1123,6 +1123,8 @@ struct iwl_mvm { * @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running * @IWL_MVM_STATUS_NEED_FLUSH_P2P: need to flush P2P bcast STA * @IWL_MVM_STATUS_IN_D3: in D3 (or at least about to go into it) + * @IWL_MVM_STATUS_STARTING: starting mac, + * used to disable restart flow while in STARTING state */ enum iwl_mvm_status { IWL_MVM_STATUS_HW_RFKILL, @@ -1134,6 +1136,7 @@ enum iwl_mvm_status { IWL_MVM_STATUS_FIRMWARE_RUNNING, IWL_MVM_STATUS_NEED_FLUSH_P2P, IWL_MVM_STATUS_IN_D3, + IWL_MVM_STATUS_STARTING, }; /* Keep track of completed init configuration */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 232ad531d612..ce7160670aa7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -1600,6 +1600,9 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error) */ if (!mvm->fw_restart && fw_error) { iwl_fw_error_collect(&mvm->fwrt, false); + } else if (test_bit(IWL_MVM_STATUS_STARTING, + &mvm->status)) { + IWL_ERR(mvm, "Starting mac, retry will be triggered anyway\n"); } else if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { struct iwl_mvm_reprobe *reprobe;