linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath10k: remove P2P from supported interface modes for 10.X FW
@ 2013-10-18 10:07 Bartosz Markowski
  2013-10-18 10:07 ` [PATCH 2/2] ath10k: extend number of AP interfaces for 10.X firmware Bartosz Markowski
  2013-10-21  6:30 ` [PATCH 1/2] ath10k: remove P2P from supported interface modes for 10.X FW Kalle Valo
  0 siblings, 2 replies; 6+ messages in thread
From: Bartosz Markowski @ 2013-10-18 10:07 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Bartosz Markowski

FW 10.X does not support P2P, stop advertising it to mac80211.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |   44 +++++++++++++++++++++++++++------
 1 file changed, 37 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 0b1cc51..af046c4 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3249,6 +3249,17 @@ static const struct ieee80211_iface_limit ath10k_if_limits[] = {
 	},
 };
 
+static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
+	{
+	.max	= 8,
+	.types	= BIT(NL80211_IFTYPE_STATION)
+	},
+	{
+	.max	= 7,
+	.types	= BIT(NL80211_IFTYPE_AP)
+	},
+};
+
 static const struct ieee80211_iface_combination ath10k_if_comb = {
 	.limits = ath10k_if_limits,
 	.n_limits = ARRAY_SIZE(ath10k_if_limits),
@@ -3257,6 +3268,14 @@ static const struct ieee80211_iface_combination ath10k_if_comb = {
 	.beacon_int_infra_match = true,
 };
 
+static const struct ieee80211_iface_combination ath10k_10x_if_comb = {
+	.limits = ath10k_10x_if_limits,
+	.n_limits = ARRAY_SIZE(ath10k_10x_if_limits),
+	.max_interfaces = 8,
+	.num_different_channels = 1,
+	.beacon_int_infra_match = true,
+};
+
 static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
 {
 	struct ieee80211_sta_vht_cap vht_cap = {0};
@@ -3430,12 +3449,19 @@ int ath10k_mac_register(struct ath10k *ar)
 		ar->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = band;
 	}
 
-	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);
+	/* 10.x firmware does not support P2P */
+	if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
+		ar->hw->wiphy->interface_modes =
+			BIT(NL80211_IFTYPE_STATION) |
+			BIT(NL80211_IFTYPE_ADHOC) |
+			BIT(NL80211_IFTYPE_AP);
+	else
+		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);
 
 	ar->hw->flags = IEEE80211_HW_SIGNAL_DBM |
 			IEEE80211_HW_SUPPORTS_PS |
@@ -3478,7 +3504,11 @@ int ath10k_mac_register(struct ath10k *ar)
 	 */
 	ar->hw->queues = 4;
 
-	ar->hw->wiphy->iface_combinations = &ath10k_if_comb;
+	if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
+		ar->hw->wiphy->iface_combinations = &ath10k_10x_if_comb;
+	else
+		ar->hw->wiphy->iface_combinations = &ath10k_if_comb;
+
 	ar->hw->wiphy->n_iface_combinations = 1;
 
 	ar->hw->netdev_features = NETIF_F_HW_CSUM;
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-21  6:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-18 10:07 [PATCH 1/2] ath10k: remove P2P from supported interface modes for 10.X FW Bartosz Markowski
2013-10-18 10:07 ` [PATCH 2/2] ath10k: extend number of AP interfaces for 10.X firmware Bartosz Markowski
2013-10-21  6:31   ` Kalle Valo
2013-10-21  6:51     ` Bartosz Markowski
2013-10-21  6:30 ` [PATCH 1/2] ath10k: remove P2P from supported interface modes for 10.X FW Kalle Valo
2013-10-21  6:52   ` Bartosz Markowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).