hostapd/src
Karthikeyan Periyasamy c4dd3afa3c ACS: Avoid invalid interference factor when survey channel time is zero
When the channel time is zero the interference factor calculation falls
under divide by zero operation which results in invalid (NaN =
not-a-number) interference factor value. This leads to wrong ideal
channel selection in ACS during the scenario described below.

Scenario:

In VHT80 mode, the channel 36 (first channel) gets the channel time as
zero which causes the interfactor factor to be an invalid number (NaN).
Any operations (like addition, mulitplication, divide, etc.) with NaN
value results in a NaN value, so that average factor for the primary
channel 36 got the invalid value (NaN). Since channel 36 is the first
channel, ideal factor is assigned as NaN in the first iteration. The
following iteration condition check (factor < ideal_factor) with a NaN
value fail for all other primary channels. This results in channel 36
being chosen as the ideal channel in ACS which holds a NaN value.

Logs:

ACS: Survey analysis for channel 36 (5180 MHz)
ACS: 1: min_nf=-103 interference_factor=nan nf=0 time=0 busy=0 rx=0
ACS: 2: min_nf=-103 interference_factor=0.615385 nf=-102 time=13 busy=8 rx=0
ACS: 3: min_nf=-103 interference_factor=2.45455 nf=0 time=22 busy=16 rx=0
ACS: 4: min_nf=-103 interference_factor=0.785714 nf=-103 time=42 busy=33 rx=0
ACS: 5: min_nf=-103 interference_factor=nan nf=0 time=0 busy=0 rx=0
ACS:  * interference factor average: nan
...
ACS:  * channel 36: total interference = nan
..
ACS:  * channel 149: total interference = 5.93174e-21
..
ACS: Ideal channel is 36 (5180 MHz) with total interference factor of nan

Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
2018-05-16 01:16:54 +03:00
..
ap ACS: Avoid invalid interference factor when survey channel time is zero 2018-05-16 01:16:54 +03:00
common Fix style issues in qca-vendor.h 2018-05-16 01:16:54 +03:00
crypto wolfSSL: Fix EAP-FAST key derivation 2018-05-02 13:32:51 +03:00
drivers wext: Avoid gcc warnings on restricted pointer aliasing 2018-05-16 01:16:54 +03:00
eap_common EAP-pwd: Use abstract crypto API 2017-12-24 21:40:21 +02:00
eap_peer EAP-TLS peer: Disable TLS v1.3 by default 2018-05-01 22:13:38 +03:00
eap_server Silence new gcc warnings on switch statement fallthroughs 2018-05-15 20:55:17 +03:00
eapol_auth Add hostapd tls_flags parameter 2017-09-18 12:12:48 +03:00
eapol_supp Propagate the EAP method error code 2018-03-31 11:57:33 +03:00
fst Silence new gcc warnings on switch statement fallthroughs 2018-05-15 20:55:17 +03:00
l2_packet wpa_supplicant: Don't reply to EAPOL if pkt_type is PACKET_OTHERHOST 2018-04-02 12:21:27 +03:00
p2p P2P: Continue P2P_WAIT_PEER_(IDLE/CONNECT) sequence on a listen cancel 2017-11-03 21:47:32 +02:00
pae mka: Mark ieee802_1x_kay_create_mka() ckn and cak arguments const 2018-03-11 17:04:34 +02:00
radius Silence new gcc warnings on switch statement fallthroughs 2018-05-15 20:55:17 +03:00
rsn_supp FT: Add MDE to assoc request IEs in connect params 2018-04-20 00:32:49 +03:00
tls Use os_memdup() 2017-03-07 13:19:10 +02:00
utils Define host_to_le64() for Windows builds 2018-02-17 18:04:54 +02:00
wps WPS: Do not increment wildcard_uuid when pin is locked 2017-10-03 19:19:01 +03:00
lib.rules Add QUIET=1 option for make 2014-12-29 15:49:05 +02:00
Makefile FST: Add the Fast Session Transfer (FST) module 2015-07-16 18:26:15 +03:00