All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-10  5:10 ` Janusz Dziedzic
  0 siblings, 0 replies; 19+ messages in thread
From: Janusz Dziedzic @ 2015-06-10  5:10 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel, nbd, sujith, Janusz Dziedzic

Add p2p dev 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 scan failed.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
@Felix, Sujith please review. I am not sure if didn't miss some
case for NL80211_IFTYPE_P2P_DEVICE (special handling required?).

 drivers/net/wireless/ath/ath9k/init.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index f8d11ef..7da1a17 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,9 @@ 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] 19+ messages in thread

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-10  5:10 ` Janusz Dziedzic
  0 siblings, 0 replies; 19+ messages in thread
From: Janusz Dziedzic @ 2015-06-10  5:10 UTC (permalink / raw)
  To: ath9k-devel

Add p2p dev 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 scan failed.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
@Felix, Sujith please review. I am not sure if didn't miss some
case for NL80211_IFTYPE_P2P_DEVICE (special handling required?).

 drivers/net/wireless/ath/ath9k/init.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index f8d11ef..7da1a17 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,9 @@ 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] 19+ messages in thread

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-10  5:10 ` [ath9k-devel] " Janusz Dziedzic
@ 2015-06-15 10:33   ` Sujith Manoharan
  -1 siblings, 0 replies; 19+ messages in thread
From: Sujith Manoharan @ 2015-06-15 10:33 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: linux-wireless, ath9k-devel, nbd

Janusz Dziedzic wrote:
> Add p2p dev 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 scan failed.
> 
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
> ---
> @Felix, Sujith please review. I am not sure if didn't miss some
> case for NL80211_IFTYPE_P2P_DEVICE (special handling required?).

At least the callbacks for adding/removing interfaces need
to be handled ?

But, can you describe the sequence of commands used that
resulted in this issue ?

Sujith

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

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-15 10:33   ` Sujith Manoharan
  0 siblings, 0 replies; 19+ messages in thread
From: Sujith Manoharan @ 2015-06-15 10:33 UTC (permalink / raw)
  To: ath9k-devel

Janusz Dziedzic wrote:
> Add p2p dev 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 scan failed.
> 
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
> ---
> @Felix, Sujith please review. I am not sure if didn't miss some
> case for NL80211_IFTYPE_P2P_DEVICE (special handling required?).

At least the callbacks for adding/removing interfaces need
to be handled ?

But, can you describe the sequence of commands used that
resulted in this issue ?

Sujith

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

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-15 10:33   ` [ath9k-devel] " Sujith Manoharan
@ 2015-06-15 11:38     ` Janusz Dziedzic
  -1 siblings, 0 replies; 19+ messages in thread
From: Janusz Dziedzic @ 2015-06-15 11:38 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: linux-wireless, ath9k-devel, Felix Fietkau

On 15 June 2015 at 12:33, Sujith Manoharan <sujith@msujith.org> wrote:
> Janusz Dziedzic wrote:
>> Add p2p dev 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 scan failed.
>>
>> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
>> ---
>> @Felix, Sujith please review. I am not sure if didn't miss some
>> case for NL80211_IFTYPE_P2P_DEVICE (special handling required?).
>
> At least the callbacks for adding/removing interfaces need
> to be handled ?
>
Strange, but I didn't hit any problem yet with my simple patch.

> But, can you describe the sequence of commands used that
> resulted in this issue ?
>
1. load ath9k with use_chanctx=1
2. run wpa_supplicant using wlan0
3. connect wlan0 to AP
4. when we are connected, run p2p_find form wpa_cli
5. scan will failed with Operation not supported (even I will
force-ap-scan, while chanctx version using hw_scan callback ...)
6. p2p_find will fail

BR
Janusz

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

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-15 11:38     ` Janusz Dziedzic
  0 siblings, 0 replies; 19+ messages in thread
From: Janusz Dziedzic @ 2015-06-15 11:38 UTC (permalink / raw)
  To: ath9k-devel

On 15 June 2015 at 12:33, Sujith Manoharan <sujith@msujith.org> wrote:
> Janusz Dziedzic wrote:
>> Add p2p dev 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 scan failed.
>>
>> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
>> ---
>> @Felix, Sujith please review. I am not sure if didn't miss some
>> case for NL80211_IFTYPE_P2P_DEVICE (special handling required?).
>
> At least the callbacks for adding/removing interfaces need
> to be handled ?
>
Strange, but I didn't hit any problem yet with my simple patch.

> But, can you describe the sequence of commands used that
> resulted in this issue ?
>
1. load ath9k with use_chanctx=1
2. run wpa_supplicant using wlan0
3. connect wlan0 to AP
4. when we are connected, run p2p_find form wpa_cli
5. scan will failed with Operation not supported (even I will
force-ap-scan, while chanctx version using hw_scan callback ...)
6. p2p_find will fail

BR
Janusz

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

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-15 11:38     ` [ath9k-devel] " Janusz Dziedzic
@ 2015-06-15 11:46       ` Janusz Dziedzic
  -1 siblings, 0 replies; 19+ messages in thread
From: Janusz Dziedzic @ 2015-06-15 11:46 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: linux-wireless, ath9k-devel, Felix Fietkau

On 15 June 2015 at 13:38, Janusz Dziedzic <janusz.dziedzic@tieto.com> wrote:
> On 15 June 2015 at 12:33, Sujith Manoharan <sujith@msujith.org> wrote:
>> Janusz Dziedzic wrote:
>>> Add p2p dev 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 scan failed.
>>>
>>> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
>>> ---
>>> @Felix, Sujith please review. I am not sure if didn't miss some
>>> case for NL80211_IFTYPE_P2P_DEVICE (special handling required?).
>>
>> At least the callbacks for adding/removing interfaces need
>> to be handled ?
>>
> Strange, but I didn't hit any problem yet with my simple patch.
>
>> But, can you describe the sequence of commands used that
>> resulted in this issue ?
>>
> 1. load ath9k with use_chanctx=1
> 2. run wpa_supplicant using wlan0
> 3. connect wlan0 to AP
3. setup AP using wlan0
> 4. run p2p_find form wpa_cli
> 5. scan will failed with Operation not supported (even I will
> force-ap-scan, while chanctx version using hw_scan callback ...)
> 6. p2p_find will fail
>
> BR
> Janusz

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

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-15 11:46       ` Janusz Dziedzic
  0 siblings, 0 replies; 19+ messages in thread
From: Janusz Dziedzic @ 2015-06-15 11:46 UTC (permalink / raw)
  To: ath9k-devel

On 15 June 2015 at 13:38, Janusz Dziedzic <janusz.dziedzic@tieto.com> wrote:
> On 15 June 2015 at 12:33, Sujith Manoharan <sujith@msujith.org> wrote:
>> Janusz Dziedzic wrote:
>>> Add p2p dev 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 scan failed.
>>>
>>> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
>>> ---
>>> @Felix, Sujith please review. I am not sure if didn't miss some
>>> case for NL80211_IFTYPE_P2P_DEVICE (special handling required?).
>>
>> At least the callbacks for adding/removing interfaces need
>> to be handled ?
>>
> Strange, but I didn't hit any problem yet with my simple patch.
>
>> But, can you describe the sequence of commands used that
>> resulted in this issue ?
>>
> 1. load ath9k with use_chanctx=1
> 2. run wpa_supplicant using wlan0
> 3. connect wlan0 to AP
3. setup AP using wlan0
> 4. run p2p_find form wpa_cli
> 5. scan will failed with Operation not supported (even I will
> force-ap-scan, while chanctx version using hw_scan callback ...)
> 6. p2p_find will fail
>
> BR
> Janusz

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

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-15 11:38     ` [ath9k-devel] " Janusz Dziedzic
@ 2015-06-15 15:47       ` Sujith Manoharan
  -1 siblings, 0 replies; 19+ messages in thread
From: Sujith Manoharan @ 2015-06-15 15:47 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: linux-wireless, ath9k-devel, Felix Fietkau

Janusz Dziedzic wrote:
> > At least the callbacks for adding/removing interfaces need
> > to be handled ?
> >
> Strange, but I didn't hit any problem yet with my simple patch.

Ok. But I am not very familiar with how p2p-device is supposed
to be used...

Sujith

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

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-15 15:47       ` Sujith Manoharan
  0 siblings, 0 replies; 19+ messages in thread
From: Sujith Manoharan @ 2015-06-15 15:47 UTC (permalink / raw)
  To: ath9k-devel

Janusz Dziedzic wrote:
> > At least the callbacks for adding/removing interfaces need
> > to be handled ?
> >
> Strange, but I didn't hit any problem yet with my simple patch.

Ok. But I am not very familiar with how p2p-device is supposed
to be used...

Sujith

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

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-15 15:47       ` [ath9k-devel] " Sujith Manoharan
@ 2015-06-15 18:19         ` Arend van Spriel
  -1 siblings, 0 replies; 19+ messages in thread
From: Arend van Spriel @ 2015-06-15 18:19 UTC (permalink / raw)
  To: Sujith Manoharan
  Cc: Janusz Dziedzic, linux-wireless, ath9k-devel, Felix Fietkau,
	Jouni Malinen

+ Jouni

On 06/15/15 17:47, Sujith Manoharan wrote:
> Janusz Dziedzic wrote:
>>> At least the callbacks for adding/removing interfaces need
>>> to be handled ?
>>>
>> Strange, but I didn't hit any problem yet with my simple patch.
>
> Ok. But I am not very familiar with how p2p-device is supposed
> to be used...

The p2p-device is designed to be used for p2p discovery and p2p action 
frame exchange. It make it easier for driver and/or firmware to 
determine if user-space request is p2p related or not. However, in 
discussions with Jouni I got the impression that ath (or qca) firmware 
and/or drivers did not need this design. Not sure if that claim is 
unaffected by the "use_chanctx=1" parameter.

Regards,
Arend

> Sujith
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-15 18:19         ` Arend van Spriel
  0 siblings, 0 replies; 19+ messages in thread
From: Arend van Spriel @ 2015-06-15 18:19 UTC (permalink / raw)
  To: ath9k-devel

+ Jouni

On 06/15/15 17:47, Sujith Manoharan wrote:
> Janusz Dziedzic wrote:
>>> At least the callbacks for adding/removing interfaces need
>>> to be handled ?
>>>
>> Strange, but I didn't hit any problem yet with my simple patch.
>
> Ok. But I am not very familiar with how p2p-device is supposed
> to be used...

The p2p-device is designed to be used for p2p discovery and p2p action 
frame exchange. It make it easier for driver and/or firmware to 
determine if user-space request is p2p related or not. However, in 
discussions with Jouni I got the impression that ath (or qca) firmware 
and/or drivers did not need this design. Not sure if that claim is 
unaffected by the "use_chanctx=1" parameter.

Regards,
Arend

> Sujith
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-15 18:19         ` [ath9k-devel] " Arend van Spriel
@ 2015-06-16  1:25           ` Sujith Manoharan
  -1 siblings, 0 replies; 19+ messages in thread
From: Sujith Manoharan @ 2015-06-16  1:25 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Janusz Dziedzic, linux-wireless, ath9k-devel, Felix Fietkau,
	Jouni Malinen

Arend van Spriel wrote:
> The p2p-device is designed to be used for p2p discovery and p2p action 
> frame exchange. It make it easier for driver and/or firmware to 
> determine if user-space request is p2p related or not. However, in 
> discussions with Jouni I got the impression that ath (or qca) firmware 
> and/or drivers did not need this design. Not sure if that claim is 
> unaffected by the "use_chanctx=1" parameter.

Thanks for the explanation.

I don't think advertising support for p2p-device is required for
ath9k. P2P discovery works properly with the normal station/ap interface
types and the 'use_chanctx' modparam simply enables multiple channel
contexts.

Sujith

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

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-16  1:25           ` Sujith Manoharan
  0 siblings, 0 replies; 19+ messages in thread
From: Sujith Manoharan @ 2015-06-16  1:25 UTC (permalink / raw)
  To: ath9k-devel

Arend van Spriel wrote:
> The p2p-device is designed to be used for p2p discovery and p2p action 
> frame exchange. It make it easier for driver and/or firmware to 
> determine if user-space request is p2p related or not. However, in 
> discussions with Jouni I got the impression that ath (or qca) firmware 
> and/or drivers did not need this design. Not sure if that claim is 
> unaffected by the "use_chanctx=1" parameter.

Thanks for the explanation.

I don't think advertising support for p2p-device is required for
ath9k. P2P discovery works properly with the normal station/ap interface
types and the 'use_chanctx' modparam simply enables multiple channel
contexts.

Sujith

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

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-16  1:25           ` [ath9k-devel] " Sujith Manoharan
@ 2015-06-16  6:30             ` Janusz Dziedzic
  -1 siblings, 0 replies; 19+ messages in thread
From: Janusz Dziedzic @ 2015-06-16  6:30 UTC (permalink / raw)
  To: Sujith Manoharan
  Cc: Arend van Spriel, linux-wireless, ath9k-devel, Felix Fietkau,
	Jouni Malinen

On 16 June 2015 at 03:25, Sujith Manoharan <sujith@msujith.org> wrote:
> Arend van Spriel wrote:
>> The p2p-device is designed to be used for p2p discovery and p2p action
>> frame exchange. It make it easier for driver and/or firmware to
>> determine if user-space request is p2p related or not. However, in
>> discussions with Jouni I got the impression that ath (or qca) firmware
>> and/or drivers did not need this design. Not sure if that claim is
>> unaffected by the "use_chanctx=1" parameter.
>
> Thanks for the explanation.
>
> I don't think advertising support for p2p-device is required for
> ath9k. P2P discovery works properly with the normal station/ap interface
> types and the 'use_chanctx' modparam simply enables multiple channel
> contexts.
>
Works except case I described.
p2p_find is combination of scan and ROC, and scan don't work when we
have configured AP from wpa_supplicant.
In case of adding p2p-device AP + P2P_FIND works perfectly, also AP +
P2P_CLIENT/P2P_GO works OK when use_chanctx.

Other fix I can image is change wpa_supplicant and add
NL80211_SCAN_FLAG_AP to p2p_find, and set in ath9k driver
wiphy->features |= NL80211_FEATURE_AP_SCAN;

NL80211_FEATURE_AP_SCAN is not set when use_chanctx=1

I am not sure which is better. First one required only fix in ath9k,
second one also required changes in wpa_supplicant.

BR
Janusz

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

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-16  6:30             ` Janusz Dziedzic
  0 siblings, 0 replies; 19+ messages in thread
From: Janusz Dziedzic @ 2015-06-16  6:30 UTC (permalink / raw)
  To: ath9k-devel

On 16 June 2015 at 03:25, Sujith Manoharan <sujith@msujith.org> wrote:
> Arend van Spriel wrote:
>> The p2p-device is designed to be used for p2p discovery and p2p action
>> frame exchange. It make it easier for driver and/or firmware to
>> determine if user-space request is p2p related or not. However, in
>> discussions with Jouni I got the impression that ath (or qca) firmware
>> and/or drivers did not need this design. Not sure if that claim is
>> unaffected by the "use_chanctx=1" parameter.
>
> Thanks for the explanation.
>
> I don't think advertising support for p2p-device is required for
> ath9k. P2P discovery works properly with the normal station/ap interface
> types and the 'use_chanctx' modparam simply enables multiple channel
> contexts.
>
Works except case I described.
p2p_find is combination of scan and ROC, and scan don't work when we
have configured AP from wpa_supplicant.
In case of adding p2p-device AP + P2P_FIND works perfectly, also AP +
P2P_CLIENT/P2P_GO works OK when use_chanctx.

Other fix I can image is change wpa_supplicant and add
NL80211_SCAN_FLAG_AP to p2p_find, and set in ath9k driver
wiphy->features |= NL80211_FEATURE_AP_SCAN;

NL80211_FEATURE_AP_SCAN is not set when use_chanctx=1

I am not sure which is better. First one required only fix in ath9k,
second one also required changes in wpa_supplicant.

BR
Janusz

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

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-16  6:30             ` [ath9k-devel] " Janusz Dziedzic
@ 2015-06-16  7:08               ` Johannes Berg
  -1 siblings, 0 replies; 19+ messages in thread
From: Johannes Berg @ 2015-06-16  7:08 UTC (permalink / raw)
  To: Janusz Dziedzic
  Cc: Sujith Manoharan, Arend van Spriel, linux-wireless, ath9k-devel,
	Felix Fietkau, Jouni Malinen

On Tue, 2015-06-16 at 08:30 +0200, Janusz Dziedzic wrote:

> Other fix I can image is change wpa_supplicant and add
> NL80211_SCAN_FLAG_AP to p2p_find, and set in ath9k driver
> wiphy->features |= NL80211_FEATURE_AP_SCAN;
> 
> NL80211_FEATURE_AP_SCAN is not set when use_chanctx=1
> 
> I am not sure which is better. First one required only fix in ath9k,
> second one also required changes in wpa_supplicant.

It would be unfortunate if a driver change required wpa_s changes. It
doesn't seem so bad to add p2p-device support to the driver, after all,
there isn't much it needs to do for that.

This seems like a strange quirk though - you can normally not do any p2p
operation when already operating as soft-AP (without P2P-device), no?

johannes


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

* [ath9k-devel] [RFC] ath9k: advertise p2p dev support when chanctx
@ 2015-06-16  7:08               ` Johannes Berg
  0 siblings, 0 replies; 19+ messages in thread
From: Johannes Berg @ 2015-06-16  7:08 UTC (permalink / raw)
  To: ath9k-devel

On Tue, 2015-06-16 at 08:30 +0200, Janusz Dziedzic wrote:

> Other fix I can image is change wpa_supplicant and add
> NL80211_SCAN_FLAG_AP to p2p_find, and set in ath9k driver
> wiphy->features |= NL80211_FEATURE_AP_SCAN;
> 
> NL80211_FEATURE_AP_SCAN is not set when use_chanctx=1
> 
> I am not sure which is better. First one required only fix in ath9k,
> second one also required changes in wpa_supplicant.

It would be unfortunate if a driver change required wpa_s changes. It
doesn't seem so bad to add p2p-device support to the driver, after all,
there isn't much it needs to do for that.

This seems like a strange quirk though - you can normally not do any p2p
operation when already operating as soft-AP (without P2P-device), no?

johannes

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

* Re: [RFC] ath9k: advertise p2p dev support when chanctx
  2015-06-16  6:30             ` [ath9k-devel] " Janusz Dziedzic
  (?)
  (?)
@ 2015-06-16  7:53             ` Sujith
  -1 siblings, 0 replies; 19+ messages in thread
From: Sujith @ 2015-06-16  7:53 UTC (permalink / raw)
  To: Janusz Dziedzic
  Cc: Sujith Manoharan, Arend van Spriel, linux-wireless, ath9k-devel,
	Felix Fietkau, Jouni Malinen

Janusz Dziedzic wrote:
> Works except case I described.
> p2p_find is combination of scan and ROC, and scan don't work when we
> have configured AP from wpa_supplicant.
> In case of adding p2p-device AP + P2P_FIND works perfectly, also AP +
> P2P_CLIENT/P2P_GO works OK when use_chanctx.
> 
> Other fix I can image is change wpa_supplicant and add
> NL80211_SCAN_FLAG_AP to p2p_find, and set in ath9k driver
> wiphy->features |= NL80211_FEATURE_AP_SCAN;
> 
> NL80211_FEATURE_AP_SCAN is not set when use_chanctx=1
> 
> I am not sure which is better. First one required only fix in ath9k,
> second one also required changes in wpa_supplicant.

As Johannes mentioned in his email, adding p2p-device support
in ath9k is the simpler solution, without adding driver-specific
hacks to wpa_s. So this patch seems okay...

Sujith

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

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

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10  5:10 [RFC] ath9k: advertise p2p dev support when chanctx Janusz Dziedzic
2015-06-10  5:10 ` [ath9k-devel] " Janusz Dziedzic
2015-06-15 10:33 ` Sujith Manoharan
2015-06-15 10:33   ` [ath9k-devel] " Sujith Manoharan
2015-06-15 11:38   ` Janusz Dziedzic
2015-06-15 11:38     ` [ath9k-devel] " Janusz Dziedzic
2015-06-15 11:46     ` Janusz Dziedzic
2015-06-15 11:46       ` [ath9k-devel] " Janusz Dziedzic
2015-06-15 15:47     ` Sujith Manoharan
2015-06-15 15:47       ` [ath9k-devel] " Sujith Manoharan
2015-06-15 18:19       ` Arend van Spriel
2015-06-15 18:19         ` [ath9k-devel] " Arend van Spriel
2015-06-16  1:25         ` Sujith Manoharan
2015-06-16  1:25           ` [ath9k-devel] " Sujith Manoharan
2015-06-16  6:30           ` Janusz Dziedzic
2015-06-16  6:30             ` [ath9k-devel] " Janusz Dziedzic
2015-06-16  7:08             ` Johannes Berg
2015-06-16  7:08               ` [ath9k-devel] " Johannes Berg
2015-06-16  7:53             ` Sujith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.