Changed wifi.sta.getrssi() to allow user to request RSSI from alternate
BSSID even if bssid_set==0 in STATION config
This commit is contained in:
parent
bdda245a82
commit
90e8bfd5e4
|
@ -483,8 +483,6 @@ static int wifi_station_getrssi( lua_State* L )
|
|||
config.ssid = ssid;
|
||||
}
|
||||
|
||||
if(sta_conf.bssid_set==1) // check if STATION is configured to connect to a specific AP's BSSID
|
||||
{
|
||||
if(lua_isstring(L, 2)) //check if user specified an alternate BSSID to check
|
||||
{
|
||||
char mac[6];
|
||||
|
@ -494,13 +492,11 @@ static int wifi_station_getrssi( lua_State* L )
|
|||
return luaL_error( L, "wrong arg type" );
|
||||
os_str2macaddr(mac, macaddr);
|
||||
config.bssid = mac;
|
||||
// c_memcpy(config.bssid, mac, 6);
|
||||
}
|
||||
else //user did NOT specify an alternate BSSID to check
|
||||
else if (sta_conf.bssid_set==1) // check if STATION is configured to connect to a specific AP's BSSID
|
||||
{
|
||||
config.bssid = sta_conf.bssid;
|
||||
}
|
||||
}
|
||||
else //STATION is NOT configured to connect to a specific AP
|
||||
{
|
||||
config.bssid = NULL;
|
||||
|
|
Loading…
Reference in New Issue