diff options
author | Tova Mussai <tova.mussai@intel.com> | 2019-11-15 09:27:48 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-11-15 09:32:30 +0200 |
commit | 19ff9b2c6e3cdf1363ef0ec58e2089d750594d60 (patch) | |
tree | 43e37df8ee47b88117af32747225008b150ac073 /drivers/net/wireless/intel/iwlwifi/fw/img.h | |
parent | iwlwifi: scan: Create function to build scan cmd (diff) | |
download | linux-19ff9b2c6e3cdf1363ef0ec58e2089d750594d60.tar.xz linux-19ff9b2c6e3cdf1363ef0ec58e2089d750594d60.zip |
iwlwifi: scan: adapt the code to use api ver 11
FW scan api ver 11 adds support for some new features,
in this version the fw did also some cleanup in the api,
which causes the driver not to be able to use the
current scan req struct.
Therefore, in this patch the driver has new version for the scan command
code
Signed-off-by: Tova Mussai <tova.mussai@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/img.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/img.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/img.h b/drivers/net/wireless/intel/iwlwifi/fw/img.h index dbeab093171e..994880a83652 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/img.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/img.h @@ -313,4 +313,22 @@ iwl_get_ucode_image(const struct iwl_fw *fw, enum iwl_ucode_type ucode_type) return &fw->img[ucode_type]; } +static inline u8 iwl_mvm_lookup_cmd_ver(const struct iwl_fw *fw, u8 grp, u8 cmd) +{ + const struct iwl_fw_cmd_version *entry; + unsigned int i; + + if (!fw->ucode_capa.cmd_versions || + !fw->ucode_capa.n_cmd_versions) + return IWL_FW_CMD_VER_UNKNOWN; + + entry = fw->ucode_capa.cmd_versions; + for (i = 0; i < fw->ucode_capa.n_cmd_versions; i++, entry++) { + if (entry->group == grp && entry->cmd == cmd) + return entry->cmd_ver; + } + + return IWL_FW_CMD_VER_UNKNOWN; +} + #endif /* __iwl_fw_img_h__ */ |