]> 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)
commit5eca06bd87f769657d89db7e02d3372e4eae53b1
tree4d36b6e345a29accf39b4cb56d8d951992ada970
parente932041681c52d26a8940a12723c336fc897e812
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