Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[~shefty/rdma-dev.git] / drivers / net / wireless / mwifiex / cmdevt.c
index 2b125beecf2c63e73083c92fd4722413d96b2fbe..20a6c55558737b3bc3e3968856c5fe827780c688 100644 (file)
@@ -24,6 +24,7 @@
 #include "main.h"
 #include "wmm.h"
 #include "11n.h"
+#include "11ac.h"
 
 /*
  * This function initializes a command node.
@@ -1465,6 +1466,24 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
        adapter->fw_release_number = le32_to_cpu(hw_spec->fw_release_number);
        adapter->number_of_antenna = le16_to_cpu(hw_spec->number_of_antenna);
 
+       if (le32_to_cpu(hw_spec->dot_11ac_dev_cap)) {
+               adapter->is_hw_11ac_capable = true;
+
+               /* 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;
+
+               /* Copy 11AC mcs */
+               adapter->hw_dot_11ac_mcs_support =
+                               le32_to_cpu(hw_spec->dot_11ac_mcs_support);
+               adapter->usr_dot_11ac_mcs_support =
+                                       adapter->hw_dot_11ac_mcs_support;
+       } else {
+               adapter->is_hw_11ac_capable = false;
+       }
+
        dev_dbg(adapter->dev, "info: GET_HW_SPEC: fw_release_number- %#x\n",
                adapter->fw_release_number);
        dev_dbg(adapter->dev, "info: GET_HW_SPEC: permanent addr: %pM\n",