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

Neeraj Kumar Garg neerajkg
Tue Nov 22 21:01:46 PST 2011


Hello Jouni,
Thanks for the explanation. I see your point now. So below would be my 2 proposals:

Proposal A):
1) Upon getting presence request, supplicant will simply call set_noa() with received presence request NOA attribute. Let the driver take care of modifying the NOA attribute in NOA frames depending upon the received presence request. Driver will also disable oppps upon this set_noa call.
2) We need to modify current set_noa function prototype to tell the driver somehow that the attached NOA attributes are from the presence request. Otherwise driver will not have anyway to find out if he has to do the modify NOA schedule based on presence request OR they are new NOA values from the application itself.
3) The disadvantage with this approach is that it doesn't look clean. Or we need to comeup with a new driver function (*handle_presence) or something like that.
Proposal B): 
1) Upon getting presence request, supplicant will call get_noa(). Supplicant will disable the current NOA schedule completely and will also disable oppps by simply calling set_noa().Also multiple presence requests from different clients will do the same. 
2) Once all clients sends a presence request with 0 values (whoevers sent a presence request earlier), we will again enable the previous NOA schedule. 
3) Advantage here is it is clean approach and doesn't increase the supplicant complexity to calculate revised NOA schedule.

If you want to redesign the power-mgmt stuff later, I think Proposal B) would be a good alternative for near future, rather than not supporting the presence request completely if driver has an NOA schedule going on. 

Let me know your thoughts on this. I will accordingly send a patch.

Regards,
-Neeraj

-----Original Message-----
From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of Jouni Malinen
Sent: Monday, November 21, 2011 7:37 PM
To: 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 Sun, Nov 20, 2011 at 10:41:45PM -0800, Neeraj Kumar Garg wrote:
> 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.

Not really.

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

The goal of the current implementation was to get minimal implementation
to pass mandatory certification requirements with a driver (not
nl80211-based). In other words, wpa_supplicant was accepting any request
if NoA was not used at the GO and rejecting any request if NoA was used.
As pointed out in this thread, more complete support needs quite a bit
more work and needs to include with architecture design for NoA
management in general.

In other words, I cannot apply this patch, but I would be fine with a
small patch to make this minimal design "work" with nl80211, i.e., make
sure we do not accept any request incorrectly if the device happens to
be using NoA internally without letting mac80211/wpa_supplicant know.

-- 
Jouni Malinen                                            PGP id EFC895FA
_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap





More information about the Hostap mailing list