Historical ath9k-devel archives
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH v3 1/4] ath9k: advertise p2p dev support when chanctx
@ 2015-07-21  9:11 Janusz Dziedzic
  2015-07-21  9:11 ` [ath9k-devel] [PATCH v3 2/4] ath9k: handle RoC cancel correctly Janusz Dziedzic
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Janusz Dziedzic @ 2015-07-21  9:11 UTC (permalink / raw)
  To: ath9k-devel

Advertise p2p device support when ath9k loaded with
use_chanctx=1.

This will fix problem, when first interface is an AP
and next we would like to run p2p_find.
Before p2p find (scan phase) failed with EOPNOTSUPP.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 drivers/net/wireless/ath/ath9k/init.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index eff0e53..89a457d 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -736,13 +736,14 @@ static const struct ieee80211_iface_limit if_limits_multi[] = {
 				 BIT(NL80211_IFTYPE_P2P_CLIENT) |
 				 BIT(NL80211_IFTYPE_P2P_GO) },
 	{ .max = 1,	.types = BIT(NL80211_IFTYPE_ADHOC) },
+	{ .max = 1,	.types = BIT(NL80211_IFTYPE_P2P_DEVICE) },
 };
 
 static const struct ieee80211_iface_combination if_comb_multi[] = {
 	{
 		.limits = if_limits_multi,
 		.n_limits = ARRAY_SIZE(if_limits_multi),
-		.max_interfaces = 2,
+		.max_interfaces = 3,
 		.num_different_channels = 2,
 		.beacon_int_infra_match = true,
 	},
@@ -855,6 +856,10 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
 			BIT(NL80211_IFTYPE_MESH_POINT) |
 			BIT(NL80211_IFTYPE_WDS);
 
+		if (ath9k_is_chanctx_enabled())
+			hw->wiphy->interface_modes |=
+					BIT(NL80211_IFTYPE_P2P_DEVICE);
+
 			hw->wiphy->iface_combinations = if_comb;
 			hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
 	}
-- 
1.9.1

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

end of thread, other threads:[~2015-08-06  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21  9:11 [ath9k-devel] [PATCH v3 1/4] ath9k: advertise p2p dev support when chanctx Janusz Dziedzic
2015-07-21  9:11 ` [ath9k-devel] [PATCH v3 2/4] ath9k: handle RoC cancel correctly Janusz Dziedzic
2015-07-21  9:11 ` [ath9k-devel] [PATCH v3 3/4] ath9k: setup rxfilter for all chanctx Janusz Dziedzic
2015-07-21  9:11 ` [ath9k-devel] [PATCH v3 4/4] ath9k: setup rxfilter when offchannel Janusz Dziedzic
2015-08-06  7:11 ` [ath9k-devel] [v3, 1/4] ath9k: advertise p2p dev support when chanctx Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox