* Q: how to update platform power state for the network driver
@ 2013-01-09 17:20 Vladimir Kondratiev
2013-01-09 17:31 ` Johannes Berg
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Vladimir Kondratiev @ 2013-01-09 17:20 UTC (permalink / raw)
To: linux-wireless
Hi,
in 60g spec (802.11ad, references to this doc.), station should set "power source" bit in the:
8.4.2.130.3 DMG PCP/AP Capability Information field
This information used to construct "PCP factor" that used in:
10.1.4.3.4 PCP selection in a PBSS
This procedure replaces GO negotiation in P2P. "power source" bit above specified as:
The Power Source field is set to 0 if the STA is battery powered, and is set to 1 otherwise.
What is the best way to obtain this info in the network driver?
Thanks, Vladimir.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Q: how to update platform power state for the network driver
2013-01-09 17:20 Q: how to update platform power state for the network driver Vladimir Kondratiev
@ 2013-01-09 17:31 ` Johannes Berg
2013-01-10 12:06 ` Vladimir Kondratiev
2013-01-10 21:39 ` Kalle Valo
2 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2013-01-09 17:31 UTC (permalink / raw)
To: Vladimir Kondratiev; +Cc: linux-wireless
On Wed, 2013-01-09 at 19:20 +0200, Vladimir Kondratiev wrote:
> Hi,
>
> in 60g spec (802.11ad, references to this doc.), station should set "power source" bit in the:
>
> 8.4.2.130.3 DMG PCP/AP Capability Information field
>
> This information used to construct "PCP factor" that used in:
>
> 10.1.4.3.4 PCP selection in a PBSS
>
> This procedure replaces GO negotiation in P2P. "power source" bit above specified as:
>
> The Power Source field is set to 0 if the STA is battery powered, and is set to 1 otherwise.
>
> What is the best way to obtain this info in the network driver?
You can't really do that very well. Set it in wpa_supplicant according
to the configuration. It might even query the power source on a laptop,
but I suspect this is a somewhat different use case anyway.
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Q: how to update platform power state for the network driver
2013-01-09 17:20 Q: how to update platform power state for the network driver Vladimir Kondratiev
2013-01-09 17:31 ` Johannes Berg
@ 2013-01-10 12:06 ` Vladimir Kondratiev
2013-01-11 0:45 ` Julian Calaby
2013-01-10 21:39 ` Kalle Valo
2 siblings, 1 reply; 9+ messages in thread
From: Vladimir Kondratiev @ 2013-01-10 12:06 UTC (permalink / raw)
To: linux-wireless
On Wednesday, January 09, 2013 07:20:06 PM Vladimir Kondratiev wrote:
> What is the best way to obtain this info in the network driver?
>
Found:
#include <linux/power_supply.h>
int power_supply_is_system_supplied(void);
returns:
positive if system is AC supplied,
0 if battery supplied
negative on error
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Q: how to update platform power state for the network driver
2013-01-09 17:20 Q: how to update platform power state for the network driver Vladimir Kondratiev
2013-01-09 17:31 ` Johannes Berg
2013-01-10 12:06 ` Vladimir Kondratiev
@ 2013-01-10 21:39 ` Kalle Valo
2013-01-13 7:33 ` Vladimir Kondratiev
2 siblings, 1 reply; 9+ messages in thread
From: Kalle Valo @ 2013-01-10 21:39 UTC (permalink / raw)
To: Vladimir Kondratiev; +Cc: linux-wireless
Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> writes:
> in 60g spec (802.11ad, references to this doc.), station should set "power source" bit in the:
>
> 8.4.2.130.3 DMG PCP/AP Capability Information field
>
> This information used to construct "PCP factor" that used in:
>
> 10.1.4.3.4 PCP selection in a PBSS
>
> This procedure replaces GO negotiation in P2P. "power source" bit above specified as:
>
> The Power Source field is set to 0 if the STA is battery powered, and is set to 1 otherwise.
Scary! Just of curiosity, how is this bit supposed to be used in real life?
--
Kalle Valo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Q: how to update platform power state for the network driver
2013-01-10 12:06 ` Vladimir Kondratiev
@ 2013-01-11 0:45 ` Julian Calaby
2013-01-13 7:34 ` Vladimir Kondratiev
2013-01-14 7:07 ` Kalle Valo
0 siblings, 2 replies; 9+ messages in thread
From: Julian Calaby @ 2013-01-11 0:45 UTC (permalink / raw)
To: Vladimir Kondratiev; +Cc: linux-wireless
Hi Vladimir,
On Thu, Jan 10, 2013 at 11:06 PM, Vladimir Kondratiev
<qca_vkondrat@qca.qualcomm.com> wrote:
> On Wednesday, January 09, 2013 07:20:06 PM Vladimir Kondratiev wrote:
>> What is the best way to obtain this info in the network driver?
>>
>
> Found:
>
> #include <linux/power_supply.h>
> int power_supply_is_system_supplied(void);
>
> returns:
> positive if system is AC supplied,
> 0 if battery supplied
> negative on error
One minor point: you might want to add the ability to override this,
even if it's only through debugfs so that people testing the code, or
with unusual requirements can set this how they want / need it.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Q: how to update platform power state for the network driver
2013-01-10 21:39 ` Kalle Valo
@ 2013-01-13 7:33 ` Vladimir Kondratiev
2013-01-14 7:01 ` Kalle Valo
0 siblings, 1 reply; 9+ messages in thread
From: Vladimir Kondratiev @ 2013-01-13 7:33 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
On Thursday, January 10, 2013 11:39:33 PM Kalle Valo wrote:
> Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> writes:
>
> > in 60g spec (802.11ad, references to this doc.), station should set "power source" bit in the:
[skip]
>
> Scary! Just of curiosity, how is this bit supposed to be used in real life?
>
In 60g, you have new ah-hoc network type, PBSS, that should be used for P2P (spec mandates it)
In PBSS, there is AP-like entity called PCP. Instead of P2P GO negotiation, GO choosen before,
on lower layer, when selecting PCP. In this decision, "best suitable" candidate selected PCP,
based on "PCP factor" calculated for each peer. Most significant bit there is "power" since
one who is AC powered is better candidate.
Bottom line - this is to elect as P2P GO AC-powered one (if there is such peer).
Thanks, Vladimir
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Q: how to update platform power state for the network driver
2013-01-11 0:45 ` Julian Calaby
@ 2013-01-13 7:34 ` Vladimir Kondratiev
2013-01-14 7:07 ` Kalle Valo
1 sibling, 0 replies; 9+ messages in thread
From: Vladimir Kondratiev @ 2013-01-13 7:34 UTC (permalink / raw)
To: Julian Calaby; +Cc: linux-wireless
On Friday, January 11, 2013 11:45:43 AM Julian Calaby wrote:
> > #include <linux/power_supply.h>
> > int power_supply_is_system_supplied(void);
> One minor point: you might want to add the ability to override this,
> even if it's only through debugfs so that people testing the code, or
> with unusual requirements can set this how they want / need it.
Sure, thanks for input
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Q: how to update platform power state for the network driver
2013-01-13 7:33 ` Vladimir Kondratiev
@ 2013-01-14 7:01 ` Kalle Valo
0 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2013-01-14 7:01 UTC (permalink / raw)
To: Vladimir Kondratiev; +Cc: linux-wireless
Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> writes:
> On Thursday, January 10, 2013 11:39:33 PM Kalle Valo wrote:
>> Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> writes:
>>
>> > in 60g spec (802.11ad, references to this doc.), station should set "power source" bit in the:
> [skip]
>>
>> Scary! Just of curiosity, how is this bit supposed to be used in real life?
>>
>
> In 60g, you have new ah-hoc network type, PBSS, that should be used for P2P (spec mandates it)
> In PBSS, there is AP-like entity called PCP. Instead of P2P GO negotiation, GO choosen before,
> on lower layer, when selecting PCP. In this decision, "best suitable" candidate selected PCP,
> based on "PCP factor" calculated for each peer. Most significant bit there is "power" since
> one who is AC powered is better candidate.
>
> Bottom line - this is to elect as P2P GO AC-powered one (if there is such peer).
Ok, so it's just a sort of priority bit. That's not bad.
--
Kalle Valo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Q: how to update platform power state for the network driver
2013-01-11 0:45 ` Julian Calaby
2013-01-13 7:34 ` Vladimir Kondratiev
@ 2013-01-14 7:07 ` Kalle Valo
1 sibling, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2013-01-14 7:07 UTC (permalink / raw)
To: Julian Calaby; +Cc: Vladimir Kondratiev, linux-wireless
Julian Calaby <julian.calaby@gmail.com> writes:
>> #include <linux/power_supply.h>
>> int power_supply_is_system_supplied(void);
>>
>> returns:
>> positive if system is AC supplied,
>> 0 if battery supplied
>> negative on error
>
> One minor point: you might want to add the ability to override this,
> even if it's only through debugfs so that people testing the code, or
> with unusual requirements can set this how they want / need it.
I'm also worried that this power_supply interface is not supported in
all platforms. Does anyone know how widely it's used?
--
Kalle Valo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-01-14 7:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09 17:20 Q: how to update platform power state for the network driver Vladimir Kondratiev
2013-01-09 17:31 ` Johannes Berg
2013-01-10 12:06 ` Vladimir Kondratiev
2013-01-11 0:45 ` Julian Calaby
2013-01-13 7:34 ` Vladimir Kondratiev
2013-01-14 7:07 ` Kalle Valo
2013-01-10 21:39 ` Kalle Valo
2013-01-13 7:33 ` Vladimir Kondratiev
2013-01-14 7:01 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox