ath10k: advertise TDLS wider bandwidth support for 5GHz
authorBalaji Pothunoori <bpothuno@qti.qualcomm.com>
Thu, 21 Dec 2017 14:30:42 +0000 (20:00 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 27 Dec 2017 10:18:31 +0000 (12:18 +0200)
Enable TDLS wider bandwidth support for 5GHz based on firmware wmi capabilities.

This patch is required for chipset QCA9888. Tested with firmware version
10.4-3.5.1-00018.

Signed-off-by: Balaji Pothunoori <bpothuno@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/wmi.h

index a98de614b71f3cb4342ae2ec0a8c8c5a42e0b70f..a0b59a323e7c61d0517122f5592c88685557bd48 100644 (file)
@@ -8294,7 +8294,8 @@ int ath10k_mac_register(struct ath10k *ar)
        if (test_bit(WMI_SERVICE_TDLS, ar->wmi.svc_map) ||
            test_bit(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, ar->wmi.svc_map)) {
                ar->hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;
-               ieee80211_hw_set(ar->hw, TDLS_WIDER_BW);
+               if (test_bit(WMI_SERVICE_TDLS_WIDER_BANDWIDTH, ar->wmi.svc_map))
+                       ieee80211_hw_set(ar->hw, TDLS_WIDER_BW);
        }
 
        ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
index f6d60dc16d1c120de966c619e9363b78613aa8e8..0fe87abceebfbf914b3ea6b0846485a1b57b400c 100644 (file)
@@ -196,6 +196,7 @@ enum wmi_service {
        WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE,
        WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY,
        WMI_SERVICE_MGMT_TX_WMI,
+       WMI_SERVICE_TDLS_WIDER_BANDWIDTH,
 
        /* keep last */
        WMI_SERVICE_MAX,
@@ -337,6 +338,7 @@ enum wmi_10_4_service {
        WMI_10_4_SERVICE_TDLS_UAPSD_SLEEP_STA,
        WMI_10_4_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE,
        WMI_10_4_SERVICE_TDLS_EXPLICIT_MODE_ONLY,
+       WMI_10_4_SERVICE_TDLS_WIDER_BANDWIDTH,
 };
 
 static inline char *wmi_service_name(int service_id)
@@ -445,6 +447,7 @@ static inline char *wmi_service_name(int service_id)
        SVCSTR(WMI_SERVICE_SMART_LOGGING_SUPPORT);
        SVCSTR(WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE);
        SVCSTR(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY);
+       SVCSTR(WMI_SERVICE_TDLS_WIDER_BANDWIDTH);
        default:
                return NULL;
        }
@@ -741,6 +744,8 @@ static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out,
               WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE, len);
        SVCMAP(WMI_10_4_SERVICE_TDLS_EXPLICIT_MODE_ONLY,
               WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, len);
+       SVCMAP(WMI_10_4_SERVICE_TDLS_WIDER_BANDWIDTH,
+              WMI_SERVICE_TDLS_WIDER_BANDWIDTH, len);
 }
 
 #undef SVCMAP