]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: introduce NO_P2P fw feature flag
authorBartosz Markowski <bartosz.markowski@tieto.com>
Tue, 10 Dec 2013 15:20:40 +0000 (16:20 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 16 Dec 2013 14:03:25 +0000 (16:03 +0200)
Not each ath10k FW track supports P2P (10.X for instance does not)
This new firmware feature flag allows to turn off P2P interface type.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/mac.c

index 79726e0fe2f0dd00005c29800739d9886d0a3576..035cbf6d1abee511ec3209cc77283d2f923c08f5 100644 (file)
@@ -306,6 +306,9 @@ enum ath10k_fw_features {
        /* firmware support tx frame management over WMI, otherwise it's HTT */
        ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX = 2,
 
+       /* Firmware does not support P2P */
+       ATH10K_FW_FEATURE_NO_P2P = 3,
+
        /* keep last */
        ATH10K_FW_FEATURE_COUNT,
 };
index 52f618740cd9ae58437c916dc3fd0a7c21a620d5..5b45f3a8ec4020f5a73159c855c3d76bcf3612a1 100644 (file)
@@ -3673,9 +3673,12 @@ int ath10k_mac_register(struct ath10k *ar)
        ar->hw->wiphy->interface_modes =
                BIT(NL80211_IFTYPE_STATION) |
                BIT(NL80211_IFTYPE_ADHOC) |
-               BIT(NL80211_IFTYPE_AP) |
-               BIT(NL80211_IFTYPE_P2P_CLIENT) |
-               BIT(NL80211_IFTYPE_P2P_GO);
+               BIT(NL80211_IFTYPE_AP);
+
+       if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->fw_features))
+               ar->hw->wiphy->interface_modes |=
+                       BIT(NL80211_IFTYPE_P2P_CLIENT) |
+                       BIT(NL80211_IFTYPE_P2P_GO);
 
        ar->hw->flags = IEEE80211_HW_SIGNAL_DBM |
                        IEEE80211_HW_SUPPORTS_PS |