P2P Adding interval parameter to set_noa and also update beacon after noa params are applied in the driver

Neeraj Kumar Garg neerajkg
Thu Oct 20 23:19:07 PDT 2011


Hello Jouni,
Could you plz see if interval parameter can be added to power save commands as done by below patch? 

Thanks for your reply. Use-case is test purpose only. Alternatively application may call set_noa and set_ps just to start the power save and then later driver/firmware can fine tune the noa parameters. Primary purpose is WifiAlliance Simga tests for noa and power save. 
For test purpose also, interval param is required as interval minus duration value will decide how long the GO will be active in between of absence periods. If we don't want to increase the no. of params, we may rename the param start to interval. Start parameter may not be much required for test purpose.
Since all other IEs in beacons and probe responses are getting managed by supplicant, it may be a good idea to call p2p_group_notif_noa whenever a test command wants to update noa params or want to update the power-save. That way supplicant always have all the updated IEs in beacons/probe responses.

> diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c
> @@ -642,7 +642,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;

If the driver returns a valid noa attribute and curr_noa_len > 0, we should reutrn P2P Presence response as P2P_SC_SUCCESS instead of UNABLE_TO_ACCODATE. The problem is p2p_process_presence_req takes the status response from p2p_group_presence_req function and then puts this status in P2P Presence response. At present, if curr_noa_len==0, then only we send a SUCCESS response.
I agree that calling function p2p_group_presence_req() is not required at all as we don't use the received noa params, since we are again calling get_noa in the function p2p_process_presence_req. But then we should not use status variable to send the P2P presence response or status variable should be dependent upon get_noa call in function p2p_process_presence_req.

Regards,
-Neeraj

-----Original Message-----
From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of hostap-request at lists.shmoo.com
Sent: Thursday, October 13, 2011 3:31 AM
To: hostap at lists.shmoo.com
Subject: HostAP Digest, Vol 102, Issue 19

Send HostAP mailing list submissions to
	hostap at lists.shmoo.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.shmoo.com/mailman/listinfo/hostap
or, via email, send a message with subject or body 'help' to
	hostap-request at lists.shmoo.com

You can reach the person managing the list at
	hostap-owner at lists.shmoo.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of HostAP digest..."

> Could you please let us know your thoughts on implementation of power-save? We see two issues with present implementation. 
> 1) interval param is not implemented for function p2p_set_noa.
> 2) After noa attribute or ps mode (ctwindow, legacy_ps) is updated to the driver, p2p_group_notif_noa should get called for updating the P2P IE in beacons.

What kind of use case are you looking for with this? The set_noa
driver_ops is really aimed for testing purposes only and the set of
parameters there seemed to be enough to cover the most common test
cases. For any more realistic production use, there is an assumption
that NoA parameters are maintained and decided somewhere in the
driver/firmware. This would also include updated the P2P IE(s) in Beacon
and Probe Response frames.

I'm not against considering changes to allow wpa_supplicant to do
somewhat more in this, but I'm not sure whether it is really realistic
to push all NoA attribute control into user space. It could be helpful
if you could provide some description of the architecture you would use
for P2P GO PS between various components in the system.

> diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c
> @@ -642,7 +642,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;

What is the purpose of this change? The Presence Request processing here
is obviously quite bogus, but I don't see how this would make it any
better.

-- 
Jouni Malinen                                            PGP id EFC895FA


------------------------------

Message: 8
Date: Wed, 12 Oct 2011 14:48:26 -0700 (PDT)
From: hong zhang <henryzhang62 at yahoo.com>
Subject: Is "Wireless event: new AP ..." called when start
	wpa_supplicant?
To: hostap at lists.shmoo.com
Message-ID:
	<1318456106.38579.YahooMailClassic at web161720.mail.bf1.yahoo.com>
Content-Type: text/plain; charset=us-ascii

List,

After traffic runs for 20 mins, I see multiple "Wireless event: new AP:...."
such as
wpa_supplicant( 5744): Wireless event: cmd=0x8b15 len=20

wpa_supplicant( 5744): Wireless event: new AP: 00:1e:13:84:29:33

Then disconnected after getting 
wpa_supplicant( 5744): Wireless event: new AP: 00:00:00:00:00:00


I trace the wpa_supplicant source codes, see call trace is 
wpa_driver_wext_init()==>wpa_driver_wext_event_receive()==>wpa_driver_wext_event_rtm_newlink()==>wpa_driver_wext_event_wireless()==> "new AP: ....".

Does it means it has second wpa_supplicant is executed? But "ps -A" does not show second wpa_supplicant.

Any help will be appreciated.

---henry



------------------------------

Message: 9
Date: Thu, 13 Oct 2011 01:00:44 +0300
From: Jouni Malinen <j at w1.fi>
Subject: Re: Is "Wireless event: new AP ..." called when start
	wpa_supplicant?
To: hostap at lists.shmoo.com
Message-ID: <20111012220044.GA23295 at jm.kir.nu>
Content-Type: text/plain; charset=us-ascii

On Wed, Oct 12, 2011 at 02:48:26PM -0700, hong zhang wrote:
> After traffic runs for 20 mins, I see multiple "Wireless event: new AP:...."
> such as
> wpa_supplicant( 5744): Wireless event: cmd=0x8b15 len=20
> 
> wpa_supplicant( 5744): Wireless event: new AP: 00:1e:13:84:29:33
> 
> Then disconnected after getting 
> wpa_supplicant( 5744): Wireless event: new AP: 00:00:00:00:00:00

> Does it means it has second wpa_supplicant is executed? But "ps -A" does not show second wpa_supplicant.

No, it means that the driver is indicating that there was a new
association (or disassociation), i.e., for whatever reason the driver
decided to reassociate.

-- 
Jouni Malinen                                            PGP id EFC895FA


------------------------------

_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap


End of HostAP Digest, Vol 102, Issue 19
***************************************


_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap





More information about the Hostap mailing list