WPA associate: NSH was not setting the algorithm parameter.

This commit is contained in:
Gregory Nutt 2017-05-08 13:28:08 -06:00
parent c55adbae86
commit 0376019c35
3 changed files with 5 additions and 4 deletions

View File

@ -1488,7 +1488,7 @@ config NSH_WAPI_AUTHWPA
only valid values are 0x00000001, 0x00000002, and 0x00000004
config NSH_WAPI_CIPHERMODE
hex " IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values"
hex "IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values"
default 0x00000008
range 0x00000001 0x00000010
---help---
@ -1498,7 +1498,7 @@ config NSH_WAPI_CIPHERMODE
this is a bit-encoded field. The only valid values are 0x00000001,
0x00000002,0x00000004, ... 0x00000010
config NSH_WAPI_ALG;
config NSH_WAPI_ALG
int "Algorithm"
default 3
range 0 13

View File

@ -69,6 +69,7 @@ int nsh_associate(FAR const char *ifname)
wconfig.sta_mode = CONFIG_NSH_WAPI_STAMODE;
wconfig.auth_wpa = CONFIG_NSH_WAPI_AUTHWPA;
wconfig.cipher_mode = CONFIG_NSH_WAPI_CIPHERMODE;
wconfig.alg = CONFIG_NSH_WAPI_ALG;
wconfig.ifname = ifname;
wconfig.ssid = (FAR const uint8_t *)ssid;
wconfig.passphrase = (FAR const uint8_t *)passphrase;

View File

@ -254,8 +254,8 @@ int wpa_driver_wext_associate(FAR struct wpa_wconfig_s *wconfig)
DEBUGASSERT(wconfig != NULL);
ninfo("sta_mode=%u auth_wpa=%08x cipher_mode=%08x\n",
wconfig->sta_mode, wconfig->auth_wpa, wconfig->cipher_mode);
ninfo("sta_mode=%u auth_wpa=%08x cipher_mode=%08x alg=%d\n",
wconfig->sta_mode, wconfig->auth_wpa, wconfig->cipher_mode, wconfig->alg);
ninfo("ifname=%s ssid[%u]=%s passphrase[%u]=%s\n",
wconfig->ifname, wconfig->ssidlen, wconfig->ssid, wconfig->phraselen,
wconfig->passphrase);