diff mbox

[RFC,04/10] nl80211_driver: add P2P device to is_p2p_interface()

Message ID 1360581347-26766-5-git-send-email-arend@broadcom.com
State Superseded
Headers show

Commit Message

Arend van Spriel Feb. 11, 2013, 11:15 a.m. UTC
From: David Spinadel <david.spinadel@intel.com>

Signed-hostap: David Spinadel <david.spinadel@intel.com>
---
 src/drivers/driver_nl80211.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Arend van Spriel Feb. 11, 2013, 11:35 a.m. UTC | #1
On 02/11/2013 12:15 PM, Arend van Spriel wrote:
> From: David Spinadel <david.spinadel@intel.com>
> 
> Signed-hostap: David Spinadel <david.spinadel@intel.com>
> ---
>  src/drivers/driver_nl80211.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> index 670eedc..4d6e0a8 100644
> --- a/src/drivers/driver_nl80211.c
> +++ b/src/drivers/driver_nl80211.c
> @@ -365,7 +365,8 @@ static int is_sta_interface(enum nl80211_iftype nlmode)
>  static int is_p2p_interface(enum nl80211_iftype nlmode)
>  {
>  	return (nlmode == NL80211_IFTYPE_P2P_CLIENT ||
> -		nlmode == NL80211_IFTYPE_P2P_GO);
> +		nlmode == NL80211_IFTYPE_P2P_GO ||
> +		nlmode == NL80211_IFTYPE_P2P_DEVICE);

Not sure if this is the way to go. The function is primarily used to
determine whether 11b rates should be disabled. For P2P clients and
group owners that is the same, but not for P2P device.

Maybe this function should be renamed towards its use.

>  }
>  
>  
>
diff mbox

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 670eedc..4d6e0a8 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -365,7 +365,8 @@  static int is_sta_interface(enum nl80211_iftype nlmode)
 static int is_p2p_interface(enum nl80211_iftype nlmode)
 {
 	return (nlmode == NL80211_IFTYPE_P2P_CLIENT ||
-		nlmode == NL80211_IFTYPE_P2P_GO);
+		nlmode == NL80211_IFTYPE_P2P_GO ||
+		nlmode == NL80211_IFTYPE_P2P_DEVICE);
 }