Skip to content

Commit

Permalink
fixup! sys/shell: add iw shell command
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian18 committed Jul 15, 2023
1 parent 55296ab commit c6ba3fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sys/shell/cmds/iw.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int _iw_connect(netif_t *iface, wifi_connect_request_t *request)
return ret;
}
/* callback unlocks mutex */
ztimer_mutex_lock_timeout(ZTIMER_SEC, &_sync, SC_IW_AP_SCAN_TIMEOUT_SEC_MAX);
ztimer_mutex_lock_timeout(ZTIMER_SEC, &_sync, SC_IW_AP_CONNECT_TIMEOUT_SEC_MAX);
mutex_unlock(&_sync);
return 0;
}
Expand Down Expand Up @@ -294,7 +294,7 @@ static int _iw_scan(netif_t *iface, wifi_scan_request_t *request)
return ret;
}
/* callback unlocks mutex */
ztimer_mutex_lock_timeout(ZTIMER_SEC, &_sync, SC_IW_AP_CONNECT_TIMEOUT_SEC_MAX);
ztimer_mutex_lock_timeout(ZTIMER_SEC, &_sync, SC_IW_AP_SCAN_TIMEOUT_SEC_MAX);
mutex_unlock(&_sync);
return 0;
}
Expand Down Expand Up @@ -364,16 +364,16 @@ int _iw_cmd(int argc, char **argv)
int ret = -EINVAL;
netif_t *iface = netif_get_by_name(argv[1]);
if (!iface) {
printf("%s: invalid interface given", argv[0]);
printf("%s: invalid interface given\n", argv[0]);
goto exit_failure;
}
if ((ret = _iw_probe(iface)) != 0) {
if (ret == -ENOTSUP) {
printf("%s: interface is not Wi-Fi", argv[0]);
printf("%s: interface is not Wi-Fi\n", argv[0]);
goto exit_failure;
}
else {
printf("%s: interface communication error", argv[0]);
printf("%s: interface communication error\n", argv[0]);
goto exit_failure;
}
}
Expand Down

0 comments on commit c6ba3fe

Please sign in to comment.