diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-drv.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-drv.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c index 99e1da3123c9..ff570027e9dd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c | |||
@@ -483,6 +483,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, | |||
483 | const u8 *tlv_data; | 483 | const u8 *tlv_data; |
484 | char buildstr[25]; | 484 | char buildstr[25]; |
485 | u32 build; | 485 | u32 build; |
486 | int num_of_cpus; | ||
486 | 487 | ||
487 | if (len < sizeof(*ucode)) { | 488 | if (len < sizeof(*ucode)) { |
488 | IWL_ERR(drv, "uCode has invalid length: %zd\n", len); | 489 | IWL_ERR(drv, "uCode has invalid length: %zd\n", len); |
@@ -692,6 +693,42 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, | |||
692 | goto invalid_tlv_len; | 693 | goto invalid_tlv_len; |
693 | drv->fw.phy_config = le32_to_cpup((__le32 *)tlv_data); | 694 | drv->fw.phy_config = le32_to_cpup((__le32 *)tlv_data); |
694 | break; | 695 | break; |
696 | case IWL_UCODE_TLV_SECURE_SEC_RT: | ||
697 | iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR, | ||
698 | tlv_len); | ||
699 | drv->fw.mvm_fw = true; | ||
700 | drv->fw.img[IWL_UCODE_REGULAR].is_secure = true; | ||
701 | break; | ||
702 | case IWL_UCODE_TLV_SECURE_SEC_INIT: | ||
703 | iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT, | ||
704 | tlv_len); | ||
705 | drv->fw.mvm_fw = true; | ||
706 | drv->fw.img[IWL_UCODE_INIT].is_secure = true; | ||
707 | break; | ||
708 | case IWL_UCODE_TLV_SECURE_SEC_WOWLAN: | ||
709 | iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN, | ||
710 | tlv_len); | ||
711 | drv->fw.mvm_fw = true; | ||
712 | drv->fw.img[IWL_UCODE_WOWLAN].is_secure = true; | ||
713 | break; | ||
714 | case IWL_UCODE_TLV_NUM_OF_CPU: | ||
715 | if (tlv_len != sizeof(u32)) | ||
716 | goto invalid_tlv_len; | ||
717 | num_of_cpus = | ||
718 | le32_to_cpup((__le32 *)tlv_data); | ||
719 | |||
720 | if (num_of_cpus == 2) { | ||
721 | drv->fw.img[IWL_UCODE_REGULAR].is_dual_cpus = | ||
722 | true; | ||
723 | drv->fw.img[IWL_UCODE_INIT].is_dual_cpus = | ||
724 | true; | ||
725 | drv->fw.img[IWL_UCODE_WOWLAN].is_dual_cpus = | ||
726 | true; | ||
727 | } else if ((num_of_cpus > 2) || (num_of_cpus < 1)) { | ||
728 | IWL_ERR(drv, "Driver support upto 2 CPUs\n"); | ||
729 | return -EINVAL; | ||
730 | } | ||
731 | break; | ||
695 | default: | 732 | default: |
696 | IWL_DEBUG_INFO(drv, "unknown TLV: %d\n", tlv_type); | 733 | IWL_DEBUG_INFO(drv, "unknown TLV: %d\n", tlv_type); |
697 | break; | 734 | break; |