[PATCH] Check firmware version more precisely

Eugene Krasnikov k.eugene.e at gmail.com
Thu May 23 12:51:14 EDT 2013


Apparently two different minor versions can have different API and
are not compatible with each other. Let's use more precise version
check so far to track which firmware has which API.

Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
 smd.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/smd.c b/smd.c
index af38dcc..b5fd0d5 100644
--- a/smd.c
+++ b/smd.c
@@ -463,7 +463,11 @@ int wcn36xx_smd_config_sta(struct wcn36xx *wcn, u8 *bssid, u16 ass_id, u8 *sta_m
 		sizeof(wcn->supported_rates));
 	msg_body.sta_params.sta_index = 1;
 
-	if (wcn->fw_minor <= 3)
+	if (!(wcn->fw_major == 1 &&
+		wcn->fw_minor == 2 &&
+		wcn->fw_version == 2 &&
+		wcn->fw_revision == 24))
+
 		return wcn36xx_smd_config_sta_v1(wcn, &msg_body);
 
 	PREPARE_HAL_BUF(wcn->smd_buf, msg_body);
@@ -729,8 +733,10 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, enum nl80211_iftype type,
 		sta->bssid_index = 0xff;
 		bss->action = 0;
 	}
-
-	if (wcn->fw_minor <= 3)
+	if (!(wcn->fw_major == 1 &&
+		wcn->fw_minor == 2 &&
+		wcn->fw_version == 2 &&
+		wcn->fw_revision == 24))
 		return wcn36xx_smd_config_bss_v1(wcn, &msg);
 
 	PREPARE_HAL_BUF(wcn->smd_buf, msg);
-- 
1.7.11.3




More information about the wcn36xx mailing list