[PATCH 6/7] hal: store firmware wlan and crm version
Kalle Valo
kvalo at qca.qualcomm.com
Mon May 20 06:54:17 EDT 2013
Store firmware wlan and crm versions, we will need those
in the future.
Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
---
smd.c | 15 +++++++++++++--
wcn36xx.h | 4 ++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/smd.c b/smd.c
index 5534787..3f25c22 100644
--- a/smd.c
+++ b/smd.c
@@ -146,8 +146,19 @@ static int wcn36xx_smd_start_rsp(struct wcn36xx *wcn, void *buf, size_t len)
if (WCN36XX_FW_MSG_RESULT_SUCCESS != rsp->start_rsp_params.status)
return -EIO;
- wcn36xx_info("WLAN ver=%s, CRM ver=%s",
- rsp->start_rsp_params.wlan_version, rsp->start_rsp_params.crm_version);
+
+ memcpy(wcn->crm_version, rsp->start_rsp_params.crm_version,
+ WCN36XX_HAL_VERSION_LENGTH);
+ memcpy(wcn->wlan_version, rsp->start_rsp_params.wlan_version,
+ WCN36XX_HAL_VERSION_LENGTH);
+
+ /* null terminate the strings, just in case */
+ wcn->crm_version[WCN36XX_HAL_VERSION_LENGTH] = '\0';
+ wcn->wlan_version[WCN36XX_HAL_VERSION_LENGTH] = '\0';
+
+ wcn36xx_info("firmware WLAN version '%s' and CRM version '%s'",
+ wcn->wlan_version, wcn->crm_version);
+
return 0;
}
diff --git a/wcn36xx.h b/wcn36xx.h
index 0ca615d..198f7ff 100644
--- a/wcn36xx.h
+++ b/wcn36xx.h
@@ -98,6 +98,10 @@ struct wcn36xx {
struct mac_address addresses[2];
u8 ch;
+ /* extra byte for the NULL termination */
+ u8 crm_version[WCN36XX_HAL_VERSION_LENGTH + 1];
+ u8 wlan_version[WCN36XX_HAL_VERSION_LENGTH + 1];
+
bool beacon_enable;
// IRQs
int tx_irq; // TX complete irq
More information about the wcn36xx
mailing list