Commit a1d59263 authored by Dror Moshe's avatar Dror Moshe Committed by Luca Coelho

iwlwifi: parse phy integration string from FW TLV

Parse phy integration string from FW TLV.
Signed-off-by: default avatarDror Moshe <drorx.moshe@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210117164916.0c790e930484.I23ef2cb9c871e6adc4aab6be378f3811cb531155@changeidSigned-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 70162580
...@@ -93,6 +93,7 @@ enum iwl_ucode_tlv_type { ...@@ -93,6 +93,7 @@ enum iwl_ucode_tlv_type {
IWL_UCODE_TLV_FW_RECOVERY_INFO = 57, IWL_UCODE_TLV_FW_RECOVERY_INFO = 57,
IWL_UCODE_TLV_HW_TYPE = 58, IWL_UCODE_TLV_HW_TYPE = 58,
IWL_UCODE_TLV_FW_FSEQ_VERSION = 60, IWL_UCODE_TLV_FW_FSEQ_VERSION = 60,
IWL_UCODE_TLV_PHY_INTEGRATION_VERSION = 61,
IWL_UCODE_TLV_PNVM_VERSION = 62, IWL_UCODE_TLV_PNVM_VERSION = 62,
IWL_UCODE_TLV_PNVM_SKU = 64, IWL_UCODE_TLV_PNVM_SKU = 64,
......
...@@ -219,6 +219,9 @@ struct iwl_fw { ...@@ -219,6 +219,9 @@ struct iwl_fw {
u8 human_readable[FW_VER_HUMAN_READABLE_SZ]; u8 human_readable[FW_VER_HUMAN_READABLE_SZ];
struct iwl_fw_dbg dbg; struct iwl_fw_dbg dbg;
u8 *phy_integration_ver;
u32 phy_integration_ver_len;
}; };
static inline const char *get_fw_dbg_mode_string(int mode) static inline const char *get_fw_dbg_mode_string(int mode)
......
...@@ -127,6 +127,7 @@ static void iwl_dealloc_ucode(struct iwl_drv *drv) ...@@ -127,6 +127,7 @@ static void iwl_dealloc_ucode(struct iwl_drv *drv)
kfree(drv->fw.dbg.mem_tlv); kfree(drv->fw.dbg.mem_tlv);
kfree(drv->fw.iml); kfree(drv->fw.iml);
kfree(drv->fw.ucode_capa.cmd_versions); kfree(drv->fw.ucode_capa.cmd_versions);
kfree(drv->fw.phy_integration_ver);
for (i = 0; i < IWL_UCODE_TYPE_MAX; i++) for (i = 0; i < IWL_UCODE_TYPE_MAX; i++)
iwl_free_fw_img(drv, drv->fw.img + i); iwl_free_fw_img(drv, drv->fw.img + i);
...@@ -1143,6 +1144,19 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, ...@@ -1143,6 +1144,19 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
capa->n_cmd_versions = capa->n_cmd_versions =
tlv_len / sizeof(struct iwl_fw_cmd_version); tlv_len / sizeof(struct iwl_fw_cmd_version);
break; break;
case IWL_UCODE_TLV_PHY_INTEGRATION_VERSION:
if (drv->fw.phy_integration_ver) {
IWL_ERR(drv,
"phy integration str ignored, already exists\n");
break;
}
drv->fw.phy_integration_ver =
kmemdup(tlv_data, tlv_len, GFP_KERNEL);
if (!drv->fw.phy_integration_ver)
return -ENOMEM;
drv->fw.phy_integration_ver_len = tlv_len;
break;
default: default:
IWL_DEBUG_INFO(drv, "unknown TLV: %d\n", tlv_type); IWL_DEBUG_INFO(drv, "unknown TLV: %d\n", tlv_type);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment