mwifiex: extract firmware API version number
authorAmitkumar Karwar <akarwar@marvell.com>
Sat, 8 Mar 2014 03:41:26 +0000 (19:41 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Mar 2014 18:49:13 +0000 (14:49 -0400)
The firmware API version number will be used for future patches
to support different firmware API specs.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/cmdevt.c
drivers/net/wireless/mwifiex/fw.h
drivers/net/wireless/mwifiex/main.h

index 14e05c9f4663dadcef536a3aa1ca3777ee0bd0aa..b41155829220601cf1a8e894e48eb2955126dece 100644 (file)
@@ -1502,6 +1502,7 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
        }
 
        adapter->fw_release_number = le32_to_cpu(hw_spec->fw_release_number);
+       adapter->fw_api_ver = (adapter->fw_release_number >> 16) & 0xff;
        adapter->number_of_antenna = le16_to_cpu(hw_spec->number_of_antenna);
 
        if (le32_to_cpu(hw_spec->dot_11ac_dev_cap)) {
index 39cb3542f79cdf777ccc9528e4ddb76768e5c89a..5b3083488c04224fbf9a00d6c7f103466dc2129e 100644 (file)
@@ -515,6 +515,8 @@ enum P2P_MODES {
 #define ACT_TDLS_CREATE            0x01
 #define ACT_TDLS_CONFIG            0x02
 
+#define MWIFIEX_FW_V15            15
+
 struct mwifiex_ie_types_header {
        __le16 type;
        __le16 len;
index f0289c12e041a066ea68f9153787e135c64a0376..5f9bfb0a161c74c6a8d14d59afdf59efaed514e7 100644 (file)
@@ -802,6 +802,7 @@ struct mwifiex_adapter {
        atomic_t pending_bridged_pkts;
        struct semaphore *card_sem;
        bool ext_scan;
+       u8 fw_api_ver;
        u8 fw_key_api_major_ver, fw_key_api_minor_ver;
 };