iwlwifi: mvm: declare TDLS support
authorArik Nemtsov <arik@wizery.com>
Sun, 11 May 2014 15:13:04 +0000 (18:13 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 24 Nov 2014 06:30:19 +0000 (08:30 +0200)
The driver/FW combination now support TDLS.
Check the FW support with the TLV bit.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-debug.h
drivers/net/wireless/iwlwifi/iwl-fw.h
drivers/net/wireless/iwlwifi/mvm/mac80211.c

index 0a70bcd241f5b9703096726e9e3e81b1cb84b5f0..6842545535582246cf5369327c7748344ce98a97 100644 (file)
@@ -143,7 +143,7 @@ do {                                                                \
 #define IWL_DL_INFO            0x00000001
 #define IWL_DL_MAC80211                0x00000002
 #define IWL_DL_HCMD            0x00000004
-#define IWL_DL_STATE           0x00000008
+#define IWL_DL_TDLS            0x00000008
 /* 0x000000F0 - 0x00000010 */
 #define IWL_DL_QUOTA           0x00000010
 #define IWL_DL_TE              0x00000020
@@ -180,6 +180,7 @@ do {                                                                \
 #define IWL_DL_TX_QUEUES       0x80000000
 
 #define IWL_DEBUG_INFO(p, f, a...)     IWL_DEBUG(p, IWL_DL_INFO, f, ## a)
+#define IWL_DEBUG_TDLS(p, f, a...)     IWL_DEBUG(p, IWL_DL_TDLS, f, ## a)
 #define IWL_DEBUG_MAC80211(p, f, a...) IWL_DEBUG(p, IWL_DL_MAC80211, f, ## a)
 #define IWL_DEBUG_EXTERNAL(p, f, a...) IWL_DEBUG(p, IWL_DL_EXTERNAL, f, ## a)
 #define IWL_DEBUG_TEMP(p, f, a...)     IWL_DEBUG(p, IWL_DL_TEMP, f, ## a)
index 133022a7bf6f8fdaaedbcbcbd57ec316519617b8..78d3e5f5fff9fd13275c2d226cffe59741ebeaaf 100644 (file)
@@ -146,6 +146,7 @@ enum iwl_ucode_tlv_api {
  * enum iwl_ucode_tlv_capa - ucode capabilities
  * @IWL_UCODE_TLV_CAPA_D0I3_SUPPORT: supports D0i3
  * @IWL_UCODE_TLV_CAPA_UMAC_SCAN: supports UMAC scan.
+ * @IWL_UCODE_TLV_CAPA_TDLS_SUPPORT: support basic TDLS functionality
  * @IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT: supports insertion of current
  *     tx power value into TPC Report action frame and Link Measurement Report
  *     action frame
@@ -160,6 +161,7 @@ enum iwl_ucode_tlv_api {
 enum iwl_ucode_tlv_capa {
        IWL_UCODE_TLV_CAPA_D0I3_SUPPORT                 = BIT(0),
        IWL_UCODE_TLV_CAPA_UMAC_SCAN                    = BIT(2),
+       IWL_UCODE_TLV_CAPA_TDLS_SUPPORT                 = BIT(6),
        IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT    = BIT(8),
        IWL_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT      = BIT(9),
        IWL_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT       = BIT(10),
index 08976c3a4dfc6e98d0509e6b20f2ee93343206c8..801abcfbaa7fd2072ef8ff04e7b78ebde387b873 100644 (file)
@@ -490,6 +490,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
        if (ret)
                return ret;
 
+       if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_TDLS_SUPPORT) {
+               IWL_DEBUG_TDLS(mvm, "TDLS supported\n");
+               hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;
+       }
+
        ret = ieee80211_register_hw(mvm->hw);
        if (ret)
                iwl_mvm_leds_exit(mvm);