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

Johannes Berg johannes
Sat Nov 19 03:11:12 PST 2011


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