mwifiex: correct antenna number with high bits reserved
authorXinming Hu <huxm@marvell.com>
Thu, 8 Mar 2018 05:54:02 +0000 (13:54 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 13 Mar 2018 16:52:58 +0000 (18:52 +0200)
High bits of antenna number are reserved in hardware spec,
using low 4 bits represent supported antenna.

Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/cmdevt.c

index 8746600..7014f44 100644 (file)
@@ -1529,7 +1529,8 @@ 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);
+       adapter->number_of_antenna =
+                       le16_to_cpu(hw_spec->number_of_antenna) & 0xf;
 
        if (le32_to_cpu(hw_spec->dot_11ac_dev_cap)) {
                adapter->is_hw_11ac_capable = true;