* question about generalized way for RSSI notification
@ 2013-11-29 13:55 Alexey Perevalov
2013-12-02 15:15 ` Dan Williams
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Perevalov @ 2013-11-29 13:55 UTC (permalink / raw)
To: linux-wireless, johannes
Dear wireless subsystem maintainers,
I have a question regarding RSSI notification to the user space.
Right now this information available in /proc/net/wireless.
That generalized method is not depending on driver implementation,
driver just need to provide wireless statistics.
I found 2 places in kernel which report about RSSI to user space eventually.
First place, it's wlan_rndis driver base implementation
./drivers/net/wireless/rndis_wlan.c.
The second place, it's mac80211 driver - beacon frame handling.
Unfortunately wireless driver we're using isn't rndis based and isn't
mac80211 based.
We don't want to depends on driver code.
What community think in this situation, is it possible to add notifier
with following responsibility:
send netlink notification in case of signal level changed according
to predefined by user threshold?
Technically it will looks like rndis_wlan approach - timer function with
predefined frequency.
This functionality is needed to reduce user space daemon activity which
provides information to GUI wifi indicator.
Also such approach could decrease time reaction on signal level changes.
Currently, some OSes has 1 second interval,
another one has 3 seconds for checking RSSI.
--
Best regards,
Alexey Perevalov
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about generalized way for RSSI notification
2013-11-29 13:55 question about generalized way for RSSI notification Alexey Perevalov
@ 2013-12-02 15:15 ` Dan Williams
2013-12-03 6:47 ` Alexey Perevalov
0 siblings, 1 reply; 3+ messages in thread
From: Dan Williams @ 2013-12-02 15:15 UTC (permalink / raw)
To: Alexey Perevalov; +Cc: linux-wireless, johannes
On Fri, 2013-11-29 at 17:55 +0400, Alexey Perevalov wrote:
> Dear wireless subsystem maintainers,
>
> I have a question regarding RSSI notification to the user space.
> Right now this information available in /proc/net/wireless.
> That generalized method is not depending on driver implementation,
> driver just need to provide wireless statistics.
>
> I found 2 places in kernel which report about RSSI to user space eventually.
> First place, it's wlan_rndis driver base implementation
> ./drivers/net/wireless/rndis_wlan.c.
> The second place, it's mac80211 driver - beacon frame handling.
Do you mean ieee80211_rx_mgmt_beacon()?
> Unfortunately wireless driver we're using isn't rndis based and isn't
> mac80211 based.
> We don't want to depends on driver code.
There's another possibility: use cfg80211 for the driver's configuration
interface. cfg80211 is actually just some utility code that implements
the nl80211 API (which replaces the old WEXT configuration API). Any
driver can use cfg80211, not just ones based on the mac80211 software
stack. In fact, a number of the older "fullmac" drivers (libertas,
orinico) have been ported to use the cfg80211 API for all configuration
handling.
> What community think in this situation, is it possible to add notifier
> with following responsibility:
> send netlink notification in case of signal level changed according
> to predefined by user threshold?
Look at net/wireless/nl80211.c; these are the entry points when
userspace is configuring the driver with nl80211 commands. Userspace
would set up CQM thresholds with the NL80211_CMD_SET_CQM command, which
then gets passed to your driver. Your driver could then set up a timer
or level triggers based on the userspace parameters, and then call
cfg80211_cqm_rssi_notify() as appropriate to send the notification to
userspace.
Dan
> Technically it will looks like rndis_wlan approach - timer function with
> predefined frequency.
>
> This functionality is needed to reduce user space daemon activity which
> provides information to GUI wifi indicator.
> Also such approach could decrease time reaction on signal level changes.
> Currently, some OSes has 1 second interval,
> another one has 3 seconds for checking RSSI.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about generalized way for RSSI notification
2013-12-02 15:15 ` Dan Williams
@ 2013-12-03 6:47 ` Alexey Perevalov
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Perevalov @ 2013-12-03 6:47 UTC (permalink / raw)
To: Dan Williams; +Cc: linux-wireless
Hi Dan,
Thank you very much, already existing netlink interface is really what
we need.
And beacon frame it's better place to send notification about RSSI.
On 12/02/2013 07:15 PM, Dan Williams wrote:
> On Fri, 2013-11-29 at 17:55 +0400, Alexey Perevalov wrote:
>> Dear wireless subsystem maintainers,
>>
>> I have a question regarding RSSI notification to the user space.
>> Right now this information available in /proc/net/wireless.
>> That generalized method is not depending on driver implementation,
>> driver just need to provide wireless statistics.
>>
>> I found 2 places in kernel which report about RSSI to user space eventually.
>> First place, it's wlan_rndis driver base implementation
>> ./drivers/net/wireless/rndis_wlan.c.
>> The second place, it's mac80211 driver - beacon frame handling.
> Do you mean ieee80211_rx_mgmt_beacon()?
Yes I meant IEEE80211_STYPE_BEACON handling which use already existing
netlink infrastructure.
>> Unfortunately wireless driver we're using isn't rndis based and isn't
>> mac80211 based.
>> We don't want to depends on driver code.
> There's another possibility: use cfg80211 for the driver's configuration
> interface. cfg80211 is actually just some utility code that implements
> the nl80211 API (which replaces the old WEXT configuration API). Any
> driver can use cfg80211, not just ones based on the mac80211 software
> stack. In fact, a number of the older "fullmac" drivers (libertas,
> orinico) have been ported to use the cfg80211 API for all configuration
> handling.
>
>> What community think in this situation, is it possible to add notifier
>> with following responsibility:
>> send netlink notification in case of signal level changed according
>> to predefined by user threshold?
> Look at net/wireless/nl80211.c; these are the entry points when
> userspace is configuring the driver with nl80211 commands. Userspace
> would set up CQM thresholds with the NL80211_CMD_SET_CQM command, which
> then gets passed to your driver. Your driver could then set up a timer
> or level triggers based on the userspace parameters, and then call
> cfg80211_cqm_rssi_notify() as appropriate to send the notification to
> userspace.
>
> Dan
>
>> Technically it will looks like rndis_wlan approach - timer function with
>> predefined frequency.
>>
>> This functionality is needed to reduce user space daemon activity which
>> provides information to GUI wifi indicator.
>> Also such approach could decrease time reaction on signal level changes.
>> Currently, some OSes has 1 second interval,
>> another one has 3 seconds for checking RSSI.
>>
--
Best regards,
Alexey Perevalov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-03 6:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-29 13:55 question about generalized way for RSSI notification Alexey Perevalov
2013-12-02 15:15 ` Dan Williams
2013-12-03 6:47 ` Alexey Perevalov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).