]> git.baikalelectronics.ru Git - kernel.git/commit
staging: wilc1000: Connect to highest RSSI value for required SSID
authorAditya Shankar <aditya.shankar@microchip.com>
Mon, 9 Jan 2017 06:12:15 +0000 (11:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Jan 2017 16:37:25 +0000 (17:37 +0100)
commit322f0cb68fb84ff6f545ebc69d07c159d2f4d612
tree4d36b6e345a29accf39b4cb56d8d951992ada970
parent155567c82088e5f418869472f0e39edcd97e6d27
staging: wilc1000: Connect to highest RSSI value for required SSID

Connect to the highest rssi with the required SSID in the shadow
table if the connection criteria is based only on the SSID.
For the first matching SSID, an index to the table is saved.
Later the index is updated if matching SSID has a higher
RSSI value than the last saved index.

However if decision is made based on BSSID, there is only one match
in the table and corresponding index is used.

changes in v2:
initialize sel_bssi_idx to UINT_MAX.
Combine two checks for identifying
sel_bssi_idx value for a SSID.

Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c