Search Linux Wireless

Re: [RFC PATCH] mac80211: use hardware flags for signal/noise units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>     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
>     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		nounit	n/a    (?)
>     rtl8187		nounit	(?)    (?)
>     zd1211		dB(?)	/      percent

This list made me think about the libertas values. Here the 
firmware provides SNR and NF and RSSI is calculated from those 
values. However,

Is it ok to add a dBm value (noisefloor) to a dB value (SNR) ??




The libertas firmware can give me SNR and NF for beacons (via 
CMD_802_11_RSSI) and also for each received frame (in the rx 
packet descriptor structure).

In the firmware manual they say:

   SNR  UINT8  Signal to noise ratio for this packet
               This should be a positive value (dB)
   NF   UINT8  Noise floor for this packet (dBm)
               Noise floor is always negative. The absolute
               value is passed.

That was the description for the RX packet descriptor, the 
description for the CMD_802_11_RSSI is basically the same. 

Now I see two macros:

#define CAL_NF(NF)       ((s32)(-(s32)(NF)))
#define CAL_RSSI(SNR,NF) ((s32)((s32)(SNR) + CAL_NF(NF)))

While I understand the CAL_NF() macro, but I'm not sure if the 
second one does the right thing. Or maybe the manual is simply 
wrong. Here are some samples with my WLAN card sitting next to 
an AP:

rxpd:     SNR  41, NF  86
get_rssi: SNR  41, NF  86
rxpd:     SNR  41, NF  86
get_rssi: SNR  42, NF  86
rxpd:     SNR  41, NF  86
get_rssi: SNR  41, NF  86
rxpd:     SNR  41, NF  86
get_rssi: SNR  41, NF  86
get_rssi: SNR  40, NF  85
rxpd:     SNR  41, NF  86

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux