* [PATCH] cfg80211: allow driver to signal noise level
@ 2009-10-20 12:13 Holger Schurig
2009-10-20 23:18 ` Johannes Berg
2009-10-23 14:41 ` Bob Copeland
0 siblings, 2 replies; 7+ messages in thread
From: Holger Schurig @ 2009-10-20 12:13 UTC (permalink / raw)
To: John Linville, Johannes Berg, linux-wireless
Allows a WLAN driver to signal current noise level:
# iw eth1 link
Connected to 00:13:19:80:da:30 (on eth1)
SSID: SSID
freq: 2437
RX: 424 bytes (5 packets)
TX: 0 bytes (0 packets)
signal: -49 dBm
noise: -93 dBm
tx bitrate: 11.0 MBit/s
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
---
NOTE: I didn't find out how to modify wext-compat.c so
that "iwconfig" would also display the noise.
--- linux-wl.orig/include/linux/nl80211.h
+++ linux-wl/include/linux/nl80211.h
@@ -871,6 +871,8 @@
* @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station)
* @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this
* station)
+ * @NL80211_STA_INFO_NOISE: noise level (u8, dBm) (used in station mode for
+ * "iw link")
*/
enum nl80211_sta_info {
__NL80211_STA_INFO_INVALID,
@@ -884,6 +886,7 @@
NL80211_STA_INFO_TX_BITRATE,
NL80211_STA_INFO_RX_PACKETS,
NL80211_STA_INFO_TX_PACKETS,
+ NL80211_STA_INFO_NOISE,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
--- linux-wl.orig/include/net/cfg80211.h
+++ linux-wl/include/net/cfg80211.h
@@ -309,6 +309,7 @@
* (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
* @STATION_INFO_RX_PACKETS: @rx_packets filled
* @STATION_INFO_TX_PACKETS: @tx_packets filled
+ * @STATION_INFO_NOISE: @noise filled
*/
enum station_info_flags {
STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -321,6 +322,7 @@
STATION_INFO_TX_BITRATE = 1<<7,
STATION_INFO_RX_PACKETS = 1<<8,
STATION_INFO_TX_PACKETS = 1<<9,
+ STATION_INFO_NOISE = 1<<10,
};
/**
@@ -367,6 +369,7 @@
* @plid: mesh peer link id
* @plink_state: mesh peer link state
* @signal: signal strength of last received packet in dBm
+ * @noise: noise level in dBm
* @txrate: current unicast bitrate to this station
* @rx_packets: packets received from this station
* @tx_packets: packets transmitted to this station
@@ -384,6 +387,7 @@
u16 plid;
u8 plink_state;
s8 signal;
+ s8 noise;
struct rate_info txrate;
u32 rx_packets;
u32 tx_packets;
--- linux-wl.orig/net/wireless/nl80211.c
+++ linux-wl/net/wireless/nl80211.c
@@ -1636,6 +1636,9 @@
if (sinfo->filled & STATION_INFO_SIGNAL)
NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL,
sinfo->signal);
+ if (sinfo->filled & STATION_INFO_NOISE)
+ NLA_PUT_U8(msg, NL80211_STA_INFO_NOISE,
+ sinfo->noise);
if (sinfo->filled & STATION_INFO_TX_BITRATE) {
txrate = nla_nest_start(msg, NL80211_STA_INFO_TX_BITRATE);
if (!txrate)
--
http://www.holgerschurig.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cfg80211: allow driver to signal noise level
2009-10-20 12:13 [PATCH] cfg80211: allow driver to signal noise level Holger Schurig
@ 2009-10-20 23:18 ` Johannes Berg
2009-10-21 9:24 ` Henning Rogge
2009-10-22 7:13 ` Holger Schurig
2009-10-23 14:41 ` Bob Copeland
1 sibling, 2 replies; 7+ messages in thread
From: Johannes Berg @ 2009-10-20 23:18 UTC (permalink / raw)
To: Holger Schurig; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
On Tue, 2009-10-20 at 14:13 +0200, Holger Schurig wrote:
> Allows a WLAN driver to signal current noise level:
>
> # iw eth1 link
> Connected to 00:13:19:80:da:30 (on eth1)
> SSID: SSID
> freq: 2437
> RX: 424 bytes (5 packets)
> TX: 0 bytes (0 packets)
> signal: -49 dBm
> noise: -93 dBm
> tx bitrate: 11.0 MBit/s
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
NACKed-by: Johannes Berg <johannes@sipsolutions.net>
As discussed previously, noise is not a property of a station.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cfg80211: allow driver to signal noise level
2009-10-20 23:18 ` Johannes Berg
@ 2009-10-21 9:24 ` Henning Rogge
2009-10-22 7:13 ` Holger Schurig
1 sibling, 0 replies; 7+ messages in thread
From: Henning Rogge @ 2009-10-21 9:24 UTC (permalink / raw)
To: Johannes Berg; +Cc: Holger Schurig, John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]
Am Wed October 21 2009 01:18:11 schrieb Johannes Berg:
> On Tue, 2009-10-20 at 14:13 +0200, Holger Schurig wrote:
> > Allows a WLAN driver to signal current noise level:
> >
> > # iw eth1 link
> > Connected to 00:13:19:80:da:30 (on eth1)
> > SSID: SSID
> > freq: 2437
> > RX: 424 bytes (5 packets)
> > TX: 0 bytes (0 packets)
> > signal: -49 dBm
> > noise: -93 dBm
> > tx bitrate: 11.0 MBit/s
> >
> > Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
>
> NACKed-by: Johannes Berg <johannes@sipsolutions.net>
>
> As discussed previously, noise is not a property of a station.
Noise it not a property of a link between two stations, but a property of the
local station alone (the point where the noise was measured).
Do we have a netlink part to put in properties like this ?
Henning Rogge
--
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-263, Fax +49 228 9435 685
mailto:henning.rogge@fkie.fraunhofer.de http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cfg80211: allow driver to signal noise level
2009-10-20 23:18 ` Johannes Berg
2009-10-21 9:24 ` Henning Rogge
@ 2009-10-22 7:13 ` Holger Schurig
2009-10-23 13:40 ` Johannes Berg
1 sibling, 1 reply; 7+ messages in thread
From: Holger Schurig @ 2009-10-22 7:13 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
On Wednesday 21 October 2009 01:18:11 Johannes Berg wrote:
> As discussed previously, noise is not a property of a station.
URL?
Should I aim for an "iw dev XXX show noise", e.g. try to
handle it as a property of the card? I could either add
an .get_noise() to cfg80211_ops, or better an .get_card_status()
with some bitmask of filled fields, like for the .get_station()
call. What would you prefer?
--
http://www.holgerschurig.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cfg80211: allow driver to signal noise level
2009-10-22 7:13 ` Holger Schurig
@ 2009-10-23 13:40 ` Johannes Berg
2009-10-23 15:46 ` Holger Schurig
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2009-10-23 13:40 UTC (permalink / raw)
To: Holger Schurig; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 718 bytes --]
On Thu, 2009-10-22 at 09:13 +0200, Holger Schurig wrote:
> On Wednesday 21 October 2009 01:18:11 Johannes Berg wrote:
> > As discussed previously, noise is not a property of a station.
>
> URL?
At the wireless summit in Berlin, I think. I realise that not everybody
can be there, but still:
http://wireless.kernel.org/en/developers/Summits/Berlin-2009/notes
>
> Should I aim for an "iw dev XXX show noise", e.g. try to
> handle it as a property of the card? I could either add
> an .get_noise() to cfg80211_ops, or better an .get_card_status()
> with some bitmask of filled fields, like for the .get_station()
> call. What would you prefer?
It's really a property of the _channel_.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cfg80211: allow driver to signal noise level
2009-10-20 12:13 [PATCH] cfg80211: allow driver to signal noise level Holger Schurig
2009-10-20 23:18 ` Johannes Berg
@ 2009-10-23 14:41 ` Bob Copeland
1 sibling, 0 replies; 7+ messages in thread
From: Bob Copeland @ 2009-10-23 14:41 UTC (permalink / raw)
To: Holger Schurig; +Cc: John Linville, Johannes Berg, linux-wireless
On Tue, Oct 20, 2009 at 8:13 AM, Holger Schurig
<hs4233@mail.mn-solutions.de> wrote:
> Allows a WLAN driver to signal current noise level:
>
If the patch does survive in some form, can you change
the patch description to use "indicate" instead of
"signal?" My internal parser kept searching for the
missing verb until I realized we were talking about
signalling the noise level instead of the signal [or]
noise level :)
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cfg80211: allow driver to signal noise level
2009-10-23 13:40 ` Johannes Berg
@ 2009-10-23 15:46 ` Holger Schurig
0 siblings, 0 replies; 7+ messages in thread
From: Holger Schurig @ 2009-10-23 15:46 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
> It's really a property of the _channel_.
Please don't be so terse. That's not helpful. If you don't have
time, then don't answer at all :-)
How would like to see an interface to get the noise out of the
driver?
--
http://www.holgerschurig.de
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-23 15:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 12:13 [PATCH] cfg80211: allow driver to signal noise level Holger Schurig
2009-10-20 23:18 ` Johannes Berg
2009-10-21 9:24 ` Henning Rogge
2009-10-22 7:13 ` Holger Schurig
2009-10-23 13:40 ` Johannes Berg
2009-10-23 15:46 ` Holger Schurig
2009-10-23 14:41 ` Bob Copeland
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).