android_kernel_xiaomi_sm8350/drivers/net
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
..
appletalk drivers/net/appletalk: use time_before, time_before_eq, etc 2008-04-19 18:15:41 -07:00
arcnet
arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-30 08:45:48 -07:00
atlx [netdrvr] atlx: code movement: move atl1 parameter parsing 2008-04-25 02:08:52 -04:00
bonding netdev: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
can
chelsio
cris
cxgb3 RDMA/cxgb3: Support peer-2-peer connection setup 2008-04-29 13:46:52 -07:00
e1000 e1000: convert uint16_t style integers to u16 2008-04-16 20:41:45 -04:00
e1000e e1000e: Increment version to 0.2.1 2008-04-25 02:08:05 -04:00
ehea ehea: make things static 2008-04-25 02:08:53 -04:00
fec_8xx
fs_enet phy: Change mii_bus id field to a string 2008-04-16 20:09:35 -04:00
hamradio 6pack: use netstats in net_device structure 2008-05-13 01:35:24 -04:00
ibm_emac
ibm_newemac ibm_newemac: Increase MDIO timeouts 2008-04-25 02:08:56 -04:00
igb igb: save and restore pcie/msi state to support EEH recovery 2008-04-25 02:08:04 -04:00
irda tty: The big operations rework 2008-04-30 08:29:47 -07:00
ixgb ixgb: convert uint16_t style integers to u16 2008-04-16 20:41:44 -04:00
ixgbe ixgbe: save and restore pcie/msi state to support EEH recovery 2008-04-25 02:07:13 -04:00
ixp2000
mlx4 mlx4_core: Avoid recycling old FMR R_Keys too soon 2008-04-29 13:46:53 -07:00
myri10ge Remove duplicated unlikely() in IS_ERR() 2008-04-29 08:06:25 -07:00
netxen Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-25 12:28:28 -07:00
pcmcia 3c589_cs: use netstats in net_device structure 2008-05-13 01:35:24 -04:00
phy Add support for SMSC LAN8187 and LAN8700 PHYs 2008-04-29 01:55:59 -04:00
sfc New driver "sfc" for Solarstorm SFC4000 controller. 2008-04-29 01:42:43 -04:00
skfp
tokenring 3c359: use netstats in net_device structure 2008-05-13 01:35:25 -04:00
tulip net: use get/put_unaligned_* helpers 2008-04-29 08:06:27 -07:00
usb net: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:15:50 -04:00
wan tty: The big operations rework 2008-04-30 08:29:47 -07:00
wireless mac80211: use hardware flags for signal/noise units 2008-05-14 16:29:49 -04:00
3c59x.c
3c501.c
3c501.h
3c503.c
3c503.h
3c505.c 3c505: use netstats in net_device structure 2008-04-29 01:55:11 -04:00
3c505.h 3c505: use netstats in net_device structure 2008-04-29 01:55:11 -04:00
3c507.c
3c509.c 3c509: use netstats in net_device structure 2008-04-29 01:55:12 -04:00
3c515.c 3c515: use netstats in net_device structure 2008-04-29 01:55:14 -04:00
3c523.c 3c523: use netstats in net_device structure 2008-05-13 01:35:24 -04:00
3c523.h
3c527.c 3c527: use netstats in net_device structure 2008-05-13 01:35:25 -04:00
3c527.h
7990.c
7990.h
8139cp.c 8139cp: use netstats in net_device structure 2008-05-13 01:35:23 -04:00
8139too.c 8139too: use netstats in net_device structure 2008-05-13 01:35:24 -04:00
8390.c net: fix returning void-valued expression warnings 2008-05-01 02:47:38 -07:00
8390.h 8390.h: remove net_device_stats 2008-05-13 01:35:23 -04:00
82596.c
a2065.c
a2065.h
ac3200.c
acenic_firmware.h
acenic.c acenic: use netstats in net_device structure 2008-05-13 01:35:24 -04:00
acenic.h acenic: use netstats in net_device structure 2008-05-13 01:35:24 -04:00
amd8111e.c
amd8111e.h
apne.c
ariadne.c
ariadne.h
at1700.c
atarilance.c
atp.c
atp.h
au1000_eth.c phy: Change mii_bus id field to a string 2008-04-16 20:09:35 -04:00
au1000_eth.h
ax88796.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
b44.c ssb: Fix usage of struct device used for DMAing 2008-04-15 15:04:35 -04:00
b44.h
bfin_mac.c Blackfin EMAC Driver: Initial version of ethtool support 2008-04-29 01:56:24 -04:00
bfin_mac.h Blackfin EMAC Driver: code cleanup 2008-04-29 01:56:14 -04:00
bmac.c
bmac.h
bnx2_fw2.h bnx2: Update RV2P firmware for 5709. 2008-05-02 16:57:59 -07:00
bnx2_fw.h
bnx2.c bnx2: Update version to 1.7.5. 2008-05-02 16:58:18 -07:00
bnx2.h
bnx2x_fw_defs.h
bnx2x_hsi.h
bnx2x_init_values.h
bnx2x_init.h
bnx2x_reg.h
bnx2x.c BNX2X: Correct bringing chip out of reset 2008-04-09 15:25:46 -07:00
bnx2x.h
bsd_comp.c
cassini.c
cassini.h
cpmac.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
cs89x0.c
cs89x0.h
de600.c
de600.h
de620.c
de620.h
declance.c
defxx.c
defxx.h
depca.c
depca.h
dl2k.c
dl2k.h
dm9000.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
dm9000.h
dummy.c
e100.c net: use get/put_unaligned_* helpers 2008-04-29 08:06:27 -07:00
e2100.c
eepro100.c
eepro.c net: eepro autoport typo 2008-04-29 01:56:01 -04:00
eexpress.c
eexpress.h
enc28j60_hw.h
enc28j60.c
epic100.c
eql.c
es3210.c
eth16i.c
ewrk3.c
ewrk3.h
fealnx.c
fec_mpc52xx_phy.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
fec_mpc52xx.c [POWERPC] mpc5200: Allow for fixed speed MII configurations 2008-05-01 11:05:58 -06:00
fec_mpc52xx.h [POWERPC] mpc5200: Allow for fixed speed MII configurations 2008-05-01 11:05:58 -06:00
fec.c m68knommu: fix FEC driver locking 2008-05-01 08:08:36 -07:00
fec.h m68knommu: fix ColdFire 5272 fec driver hash registers 2008-05-01 08:08:36 -07:00
forcedeth.c forcedeth: realtek phy crossover detection 2008-04-25 02:08:57 -04:00
gianfar_ethtool.c
gianfar_mii.c [netdrvr] gianfar: Determine TBIPA value dynamically 2008-04-29 01:57:57 -04:00
gianfar_mii.h [netdrvr] gianfar: Determine TBIPA value dynamically 2008-04-29 01:57:57 -04:00
gianfar_sysfs.c
gianfar.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
gianfar.h [netdrvr] gianfar: Determine TBIPA value dynamically 2008-04-29 01:57:57 -04:00
hamachi.c net: use get/put_unaligned_* helpers 2008-04-29 08:06:27 -07:00
hp100.c
hp100.h
hp-plus.c
hp.c
hplance.c
hplance.h
hydra.c
ibmlana.c
ibmlana.h
ibmveth.c netdev: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
ibmveth.h
ifb.c
ioc3-eth.c
ipg.c
ipg.h
isa-skeleton.c
iseries_veth.c [POWERPC] properly declare onstack completion in iseries veth 2008-04-17 07:46:11 +10:00
jazzsonic.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-30 08:45:48 -07:00
korina.c korina: misc cleanup 2008-04-25 02:08:51 -04:00
lance.c
lasi_82596.c
lib8390.c drivers/net/lib8390: fix warning, trim trailing whitespace 2008-05-13 01:41:28 -04:00
lib82596.c
LICENSE.SRC
lne390.c
loopback.c
lp486e.c
mac89x0.c
mac8390.c
macb.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
macb.h
mace.c
mace.h
macmace.c
macsonic.c
macvlan.c
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-30 08:45:48 -07:00
meth.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
meth.h
mii.c
mipsnet.c
mv643xx_eth.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
mvme147.c
myri_code.h
myri_sbus.c
myri_sbus.h
natsemi.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
ne2.c
ne2k-pci.c
ne3210.c
ne-h8300.c
ne.c
netconsole.c netconsole: only set CON_PRINTBUFFER if the user specifies a netconsole 2008-04-15 00:49:04 -07:00
netx-eth.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
ni52.c
ni52.h
ni65.c
ni65.h
ni5010.c
ni5010.h
niu.c niu: Add support for Neptune FEM/NEM cards for C10 server blades 2008-04-24 21:09:20 -07:00
niu.h [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
ns83820.c
pasemi_mac_ethtool.c
pasemi_mac.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-04-21 15:50:49 -07:00
pasemi_mac.h
pci-skeleton.c
pcnet32.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
plip.c
ppp_async.c tty: add throttle/unthrottle helpers 2008-04-30 08:29:47 -07:00
ppp_deflate.c
ppp_generic.c ppp_generic: use stats from net_device structure 2008-04-23 18:54:01 -07:00
ppp_mppe.c
ppp_mppe.h
ppp_synctty.c tty: add throttle/unthrottle helpers 2008-04-30 08:29:47 -07:00
pppoe.c netdev: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
pppol2tp.c netdev: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
pppox.c
ps3_gelic_net.c
ps3_gelic_net.h
ps3_gelic_wireless.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
ps3_gelic_wireless.h
qla3xxx.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
qla3xxx.h
r6040.c
r8169.c r8169: fix oops in r8169_get_mac_version 2008-04-17 22:48:41 +02:00
rionet.c [RAPIDIO] Auto-probe the RapidIO system size 2008-04-29 19:40:28 +10:00
rrunner.c
rrunner.h
s2io-regs.h
s2io.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
s2io.h [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
saa9730.c
saa9730.h
sb1000.c sb1000.c: make const arrays static 2008-04-16 20:41:44 -04:00
sb1250-mac.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
sc92031.c sc92031: use netdev_alloc_skb 2008-04-16 20:41:35 -04:00
seeq8005.c
seeq8005.h
sgiseeq.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
sgiseeq.h
sis190.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
sis900.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
sis900.h
skge.c
skge.h
sky2.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
sky2.h
slhc.c
slip.c tty: The big operations rework 2008-04-30 08:29:47 -07:00
slip.h
smc91x.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
smc91x.h Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
smc911x.c smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt} 2008-04-25 02:08:55 -04:00
smc911x.h
smc9194.c
smc9194.h
smc-mca.c
smc-ultra32.c
smc-ultra.c
sni_82596.c net drivers: fix platform driver hotplug/coldplug 2008-04-25 02:08:54 -04:00
sonic.c
sonic.h
Space.c
spider_net_ethtool.c
spider_net.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
spider_net.h spidernet: change interrupt masks 2008-04-16 20:06:50 -04:00
starfire_firmware.h
starfire_firmware.pl
starfire.c [NET]: Undo code bloat in hot paths due to print_mac(). 2008-04-08 16:50:44 -07:00
stnic.c
sun3_82586.c
sun3_82586.h
sun3lance.c
sunbmac.c
sunbmac.h
sundance.c
sungem_phy.c
sungem_phy.h
sungem.c
sungem.h
sunhme.c
sunhme.h
sunlance.c
sunqe.c
sunqe.h
sunvnet.c
sunvnet.h
tc35815.c tc35815: Statistics cleanup 2008-04-17 15:31:31 -04:00
tehuti_fw.h
tehuti.c drivers/net/tehuti: use proper capability check for raw IO access 2008-04-29 11:45:16 -07:00
tehuti.h
tg3.c tg3: Update version to 3.92 2008-05-02 16:49:50 -07:00
tg3.h tg3: Add link state reporting to UMP firmware 2008-05-02 16:49:29 -07:00
tlan.c
tlan.h
tsi108_eth.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
tsi108_eth.h
tun.c tun: Multicast handling in tun_chr_ioctl() needs proper locking. 2008-04-24 03:44:43 -07:00
typhoon-firmware.h
typhoon.c [netdrvr] typhoon: typhoon_resume - remove call to start_queue 2008-04-25 02:08:08 -04:00
typhoon.h
ucc_geth_ethtool.c [netdrvr] Trim trailing whitespace for several drivers 2008-05-13 01:41:58 -04:00
ucc_geth_mii.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-04-21 15:50:49 -07:00
ucc_geth_mii.h
ucc_geth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-25 12:28:28 -07:00
ucc_geth.h phy: Change mii_bus id field to a string 2008-04-16 20:09:35 -04:00
veth.c
via-rhine.c
via-velocity.c via-velocity: fix vlan receipt 2008-04-25 02:45:23 -04:00
via-velocity.h
virtio_net.c virtio: explicit advertisement of driver features 2008-05-02 21:50:50 +10:00
wd.c
xen-netfront.c net: fix returning void-valued expression warnings 2008-05-01 02:47:38 -07:00
yellowfin.c net: use get/put_unaligned_* helpers 2008-04-29 08:06:27 -07:00
znet.c
zorro8390.c