OSDN Git Service

mwifiex: set fw api info for backword compatibility
authorAvinash Patil <patila@marvell.com>
Fri, 12 Sep 2014 14:38:45 +0000 (20:08 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Sep 2014 19:00:50 +0000 (15:00 -0400)
If we dont set FW API info here, for older FW releases where FW API
is not available in GET_HW_SPEC, API version would remain 0.
This may cause issues with 11ac if older FW is used with newer driver.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/cmdevt.c

index 985f6c2..fcc70ae 100644 (file)
@@ -1508,6 +1508,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)) {