--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
@@ -708,6 +708,22 @@ static int mwifiex_ret_ver_ext(struct mwifiex_private *priv,
{
struct host_cmd_ds_version_ext *ver_ext = &resp->params.verext;
+ if (test_and_clear_bit(MWIFIEX_IS_REQUESTING_FW_VEREXT, &priv->adapter->work_flags)) {
+ if (strncmp(ver_ext->version_str, "ChipRev:20, BB:9b(10.00), RF:40(21)", 128) == 0) {
Rather than memorize the 128-size array here, maybe use
sizeof(ver_ext->version_str) ?
Sounds like a good idea, yeah.
memcpy(version_ext->version_str, ver_ext->version_str,
sizeof(char) * 128);
memcpy(priv->version_str, ver_ext->version_str, 128);