linux/drivers/net/wireless/b43
Bruno Randolf 566bfe5a8b mac80211: use hardware flags for signal/noise units
trying to clean up the signal/noise code. the previous code in mac80211 had
confusing names for the related variables, did not have much definition of
what units of signal and noise were provided and used implicit mechanisms from
the wireless extensions.

this patch introduces hardware capability flags to let the hardware specify
clearly if it can provide signal and noise level values and which units it can
provide. this also anticipates possible new units like RCPI in the future.

for signal:

  IEEE80211_HW_SIGNAL_UNSPEC - unspecified, unknown, hw specific
  IEEE80211_HW_SIGNAL_DB     - dB difference to unspecified reference point
  IEEE80211_HW_SIGNAL_DBM    - dBm, difference to 1mW

for noise we currently only have dBm:

  IEEE80211_HW_NOISE_DBM     - dBm, difference to 1mW

if IEEE80211_HW_SIGNAL_UNSPEC or IEEE80211_HW_SIGNAL_DB is used the driver has
to provide the maximum value (max_signal) it reports in order for applications
to make sense of the signal values.

i tried my best to find out for each driver what it can provide and update it
but i'm not sure (?) for some of them and used the more conservative guess in
doubt. this can be fixed easily after this patch has been merged by changing
the hardware flags of the driver.

DRIVER          SIGNAL    MAX	NOISE   QUAL
-----------------------------------------------------------------
adm8211         unspec(?) 100   n/a     missing
at76_usb        unspec(?) (?)   unused  missing
ath5k           dBm             dBm     percent rssi
b43legacy       dBm             dBm     percent jssi(?)
b43             dBm             dBm     percent jssi(?)
iwl-3945        dBm             dBm     percent snr+more
iwl-4965        dBm             dBm     percent snr+more
p54             unspec    127   n/a     missing
rt2x00          dBm	        n/a     percent rssi+tx/rx frame success
  rt2400        dBm             n/a
  rt2500pci     dBm             n/a
  rt2500usb     dBm             n/a
  rt61pci       dBm             n/a
  rt73usb       dBm             n/a
rtl8180         unspec(?) 65    n/a     (?)
rtl8187         unspec(?) 65    (?)     noise(?)
zd1211          dB(?)     100   n/a     percent

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:49 -04:00
..
b43.h b43: replace limit_value macro with clamp_val 2008-05-14 16:29:32 -04:00
debugfs.c b43: Rewrite LO calibration algorithm 2008-05-07 15:02:12 -04:00
debugfs.h b43: Rewrite LO calibration algorithm 2008-05-07 15:02:12 -04:00
dma.c mac80211: clean up get_tx_stats callback 2008-05-07 15:02:26 -04:00
dma.h b43: Add PIO support for PCMCIA devices 2008-04-08 15:05:56 -04:00
Kconfig b43: Use SSB block-I/O to do PIO 2008-04-08 16:44:41 -04:00
leds.c PM: Remove destroy_suspended_device() 2008-04-19 19:10:28 -07:00
leds.h [B43]: LED triggers support 2007-10-10 16:54:11 -07:00
lo.c b43: replace limit_value macro with clamp_val 2008-05-14 16:29:32 -04:00
lo.h b43: Rewrite LO calibration algorithm 2008-05-07 15:02:12 -04:00
main.c mac80211: use hardware flags for signal/noise units 2008-05-14 16:29:49 -04:00
main.h b43: Rewrite LO calibration algorithm 2008-05-07 15:02:12 -04:00
Makefile b43: Add PIO support for PCMCIA devices 2008-04-08 15:05:56 -04:00
nphy.c b43: Add more N-PHY stuff 2008-04-08 16:44:41 -04:00
nphy.h b43: Don't compile N-PHY code when N-PHY is disabled 2008-03-25 16:41:59 -04:00
pcmcia.c ssb: Turn suspend/resume upside down 2008-04-08 15:05:57 -04:00
pcmcia.h
phy.c b43: replace limit_value macro with clamp_val 2008-05-14 16:29:32 -04:00
phy.h b43: Rewrite LO calibration algorithm 2008-05-07 15:02:12 -04:00
pio.c mac80211: clean up get_tx_stats callback 2008-05-07 15:02:26 -04:00
pio.h b43: Add PIO support for PCMCIA devices 2008-04-08 15:05:56 -04:00
rfkill.c b43: fix use-after-free rfkill bug 2008-01-16 12:53:32 -05:00
rfkill.h b43: Rewrite and fix rfkill init 2007-11-10 04:25:12 -05:00
sysfs.c cfg80211 API for channels/bitrates, mac80211 and driver conversion 2008-02-29 15:19:32 -05:00
sysfs.h
tables_nphy.c b43: Add lots of N-PHY lookup tables 2008-01-28 15:10:03 -08:00
tables_nphy.h b43: Add lots of N-PHY lookup tables 2008-01-28 15:10:03 -08:00
tables.c b43: Fix for broken transmission 2008-01-28 15:05:59 -08:00
tables.h b43: rewrite A PHY initialization 2008-01-28 15:04:31 -08:00
wa.c b43: pull out helpers for writing noise table 2008-03-13 16:02:33 -04:00
wa.h b43: rewrite A PHY initialization 2008-01-28 15:04:31 -08:00
xmit.c mac80211: use hardware flags for signal/noise units 2008-05-14 16:29:49 -04:00
xmit.h b43: Add more N-PHY stuff 2008-04-08 16:44:41 -04:00