On Thu, 2018-02-08 at 09:49 +0000, Jean Pierre TOSONI wrote:

> In net/mac80211/scan.c, function ieee80211_bss_info_update() passes
> incoming scan results to the generic wireless layer, with indication of
> the received signal level, but no indication of signal validity.

Well, there is an indication of validity, if the value is 0 then it's
invalid.

> Before ieee80211_bss_info_update() is called, rx_status->flag can be set
> to RX_FLAG_NO_SIGNAL_VAL by the ath9k driver and it won't be taken into
> account in the wireless layer.
> Even later in ieee80211_bss_info_update(), rx_status->flag can also be set
> to RX_FLAG_NO_SIGNAL_VAL, and the wireless layer won't be aware of this.

However, it looks like you're right and ieee80211_bss_info_update()
doesn't take the flag into account. Bit strange that we even have the
flag I guess, since we treat 0 as an invalid value in various places,
being too high power to realistically receive anyway.

> I stumbled on this because, when using ath9k (WLE350NX) to do a passive scan
> off-channel, the beacons received in a 30ms window after channel change show
> a signal level +10dB above the real value. So I was looking for a way to
> tell the above layers that the signal is invalid. RX_FLAG_NO_SIGNAL_VAL seems
> to fit, but is not conveyed up to iw or wpa_supplicant.
> 
> In fact I did not find any such thing in net/wireless/nl80211.c, function
> nl80211_send_bss().
> 
> Any suggestion? Did I miss something?

Want to send a patch? There seem to be a few more places as well, e.g.
in rx.c for cfg80211_report_obss_beacon() and cfg80211_rx_mgmt().

johannes

Reply via email to