net: wifi: fix log message printing ssid and psk
The following logs show up when trying to connect: uart:~$ wifi connect xxxxxx xxxxxxxxxx Connection requested <dbg> net_wifi_mgmt.wifi_connect: (0x20000500): xxxxxx 6 255 1 \ xxxxxxxxxx 10 <err> log: argument 6 in source net_wifi_mgmt log message \ "%s: (%p): %s %u %u %u %s %u" missinglog_strdup(). <err> log: argument 2 in source net_wifi_mgmt log message \ "%s: (%p): %s %u %u %u %s %u" missinglog_strdup(). Connected uart:~$ Fix that by using LOG_HEXDUMP_DBG() to print SSID and PSK. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
parent
19c8ff9f0a
commit
29cb9271ed
1 changed files with 3 additions and 4 deletions
|
@ -26,10 +26,9 @@ static int wifi_connect(u32_t mgmt_request, struct net_if *iface,
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
NET_DBG("%s %u %u %u %s %u",
|
LOG_HEXDUMP_DBG(params->ssid, params->ssid_length, "ssid");
|
||||||
params->ssid, params->ssid_length,
|
LOG_HEXDUMP_DBG(params->psk, params->psk_length, "psk");
|
||||||
params->channel, params->security,
|
NET_DBG("ch %u sec %u", params->channel, params->security);
|
||||||
params->psk, params->psk_length);
|
|
||||||
|
|
||||||
if ((params->security > WIFI_SECURITY_TYPE_PSK) ||
|
if ((params->security > WIFI_SECURITY_TYPE_PSK) ||
|
||||||
(params->ssid_length > WIFI_SSID_MAX_LEN) ||
|
(params->ssid_length > WIFI_SSID_MAX_LEN) ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue