From: Yuanyuan Liu Date: Wed, 27 Jul 2016 00:23:15 +0000 (-0700) Subject: icnss: pass fw version to wlan driver X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c31155183b603cb8dc175d527cb469dcbe7df627;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git icnss: pass fw version to wlan driver Update wlan fw version when wlan driver calls icnss_get_soc_info. Change-Id: I1fda7209901cba2746d6d933796a07416cd1b021 CRs-Fixed: 1046753 Signed-off-by: Yuanyuan Liu --- diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 883f23d8234d..849b84e6228f 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -1580,6 +1580,14 @@ int icnss_get_soc_info(struct icnss_soc_info *info) info->v_addr = penv->mem_base_va; info->p_addr = penv->mem_base_pa; + info->chip_id = penv->chip_info.chip_id; + info->chip_family = penv->chip_info.chip_family; + info->board_id = penv->board_info.board_id; + info->soc_id = penv->soc_info.soc_id; + info->fw_version = penv->fw_version_info.fw_version; + strlcpy(info->fw_build_timestamp, + penv->fw_version_info.fw_build_timestamp, + QMI_WLFW_MAX_TIMESTAMP_LEN_V01 + 1); return 0; } diff --git a/include/soc/qcom/icnss.h b/include/soc/qcom/icnss.h index 6c3ec33cc613..6275e4536bc0 100644 --- a/include/soc/qcom/icnss.h +++ b/include/soc/qcom/icnss.h @@ -15,6 +15,7 @@ #include #define ICNSS_MAX_IRQ_REGISTRATIONS 12 +#define ICNSS_MAX_TIMESTAMP_LEN 32 struct icnss_driver_ops { char *name; @@ -79,7 +80,12 @@ enum icnss_driver_mode { struct icnss_soc_info { void __iomem *v_addr; phys_addr_t p_addr; - u32 version; + uint32_t chip_id; + uint32_t chip_family; + uint32_t board_id; + uint32_t soc_id; + uint32_t fw_version; + char fw_build_timestamp[ICNSS_MAX_TIMESTAMP_LEN + 1]; }; extern int icnss_register_driver(struct icnss_driver_ops *driver);