mwifiex: advertise correct beamforming information for VHT
authorAmitkumar Karwar <akarwar@marvell.com>
Sat, 8 Feb 2014 00:27:27 +0000 (16:27 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Feb 2014 20:36:16 +0000 (15:36 -0500)
Currently MU/SU beamformer and MU beamformee features are
not supported.

Hence this patch modifies VHT capability information accordingly.
Number of sounding dimensions should be zero in this case.

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

index 556cb2c..7711b11 100644 (file)
@@ -1499,8 +1499,10 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
                /* Copy 11AC cap */
                adapter->hw_dot_11ac_dev_cap =
                                        le32_to_cpu(hw_spec->dot_11ac_dev_cap);
-               adapter->usr_dot_11ac_dev_cap_bg = adapter->hw_dot_11ac_dev_cap;
-               adapter->usr_dot_11ac_dev_cap_a = adapter->hw_dot_11ac_dev_cap;
+               adapter->usr_dot_11ac_dev_cap_bg = adapter->hw_dot_11ac_dev_cap
+                                       & ~MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK;
+               adapter->usr_dot_11ac_dev_cap_a = adapter->hw_dot_11ac_dev_cap
+                                       & ~MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK;
 
                /* Copy 11AC mcs */
                adapter->hw_dot_11ac_mcs_support =
index cad9f86..4139c6f 100644 (file)
@@ -243,6 +243,15 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
 #define GET_DEVTXMCSMAP(dev_mcs_map)      (dev_mcs_map >> 16)
 #define GET_DEVRXMCSMAP(dev_mcs_map)      (dev_mcs_map & 0xFFFF)
 
+/* Clear SU Beanformer, MU beanformer, MU beanformee and
+ * sounding dimensions bits
+ */
+#define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \
+                       (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \
+                        IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \
+                        IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \
+                        IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK)
+
 #define MOD_CLASS_HR_DSSS       0x03
 #define MOD_CLASS_OFDM          0x07
 #define MOD_CLASS_HT            0x08