[PATCH] P2P return a successful response for p2p presence request if driver has return noa_len greater than 0

Neeraj Kumar Garg neerajkg
Sun Nov 20 22:41:45 PST 2011


Hello Johannes,

Thanks for your comments. I agree that this area needs a lot of work but I think it is safe to return P2P_SC_SUCCESS if curr_noa_len > 0.
Once nl gives support to these cmds like (get_noa/set_noa), we can always revisit the code once it is properly implemented.

May I ask what is the purpose of returning P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE if driver returned noa_len > 0?

Regards,
-Neeraj

-----Original Message-----
From: Johannes Berg [mailto:johannes at sipsolutions.net] 
Sent: Saturday, November 19, 2011 4:41 PM
To: Neeraj Kumar Garg
Cc: hostap at lists.shmoo.com
Subject: Re: [PATCH] P2P return a successful response for p2p presence request if driver has return noa_len greater than 0

On Tue, 2011-11-08 at 03:06 -0800, Neeraj Kumar Garg wrote:

> +++ b/src/p2p/p2p_group.c
> @@ -658,7 +658,7 @@ u8 p2p_group_presence_req(struct p2p_group *group,
>       curr_noa_len);
>  
>   /* TODO: properly process request and store copy */
> - if (curr_noa_len > 0)
> + if (curr_noa_len < 0)
>   return P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE;
>  
>   return P2P_SC_SUCCESS;

I thought about this some more and I think neither behaviour is actually
correct with nl80211 drivers since they don't pass NoA data up. Unless,
of course, powersaving is disabled, the device doesn't support
multi-channel, etc.

I think this area generally needs a lot of work and this patch/hack
isn't really suitable for anything.

johannes





More information about the Hostap mailing list