diff mbox

mwifiex: correct antenna number with high bits reserved

Message ID 1520488442-10729-1-git-send-email-huxm@marvell.com (mailing list archive)
State Accepted
Commit eaab43e505d01ed19f63e08e52252cbc1c69b9b9
Delegated to: Kalle Valo
Headers show

Commit Message

Xinming Hu March 8, 2018, 5:54 a.m. UTC
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>
---
 drivers/net/wireless/marvell/mwifiex/cmdevt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kalle Valo March 13, 2018, 4:53 p.m. UTC | #1
Xinming Hu <huxm@marvell.com> wrote:

> 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>

Patch applied to wireless-drivers-next.git, thanks.

eaab43e505d0 mwifiex: correct antenna number with high bits reserved
diff mbox

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
index dcc529e..78a4a6a 100644
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
@@ -1526,7 +1526,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;