Skip to content

Commit 55296ab

Browse files
committed
fixup! drivers/atwinc15x0: add support for network scanning and dynamic connection
1 parent 7d6475e commit 55296ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/atwinc15x0/atwinc15x0_netdev.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -918,15 +918,15 @@ static int _atwinc15x0_scan(const wifi_scan_request_t *req)
918918
if (_atwinc15x0_is_busy(atwinc15x0)) {
919919
return -EBUSY;
920920
}
921-
if (_atwinc15x0_is_sleeping(atwinc15x0)) {
922-
_set_state(atwinc15x0, NETOPT_STATE_IDLE);
923-
}
924921
if (req->base.channel != NETOPT_SCAN_REQ_ALL_CH) {
925922
if (req->base.channel < WIFI_2_4_CH_MIN ||
926923
req->base.channel > WIFI_2_4_CH_MAX) {
927924
return -EINVAL;
928925
}
929926
}
927+
if (_atwinc15x0_is_sleeping(atwinc15x0)) {
928+
_set_state(atwinc15x0, NETOPT_STATE_IDLE);
929+
}
930930
tstrM2MScanOption opt = {
931931
.u8NumOfSlot = ATWINC1510_SCAN_SLOTS_DEF,
932932
.u8ProbesPerSlot = ATWINC1510_SCAN_PROBES_NUMOF_DEF,

0 commit comments

Comments
 (0)