mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-22 07:31:51 +08:00
wireless/wapi: add option to associate with bssid
Change-Id: I68ef42edfc50ef5baf0f02a570d0e7f79669659f Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -782,6 +782,7 @@ static int wapi_save_config_cmd(int sock, int argc, FAR char **argv)
|
||||
char essid[WAPI_ESSID_MAX_SIZE + 1];
|
||||
enum wapi_essid_flag_e essid_flag;
|
||||
struct wpa_wconfig_s conf;
|
||||
struct ether_addr ap;
|
||||
uint8_t if_flags;
|
||||
uint32_t value;
|
||||
size_t psk_len;
|
||||
@@ -818,6 +819,14 @@ static int wapi_save_config_cmd(int sock, int argc, FAR char **argv)
|
||||
conf.ssid = essid;
|
||||
conf.ssidlen = strnlen(essid, sizeof(essid));
|
||||
|
||||
ret = wapi_get_ap(sock, argv[0], &ap);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
conf.bssid = (FAR const char *)ap.ether_addr_octet;
|
||||
|
||||
memset(psk, 0, sizeof(psk));
|
||||
ret = wpa_driver_wext_get_key_ext(sock,
|
||||
argv[0],
|
||||
|
Reference in New Issue
Block a user