Commit d680e28a authored by Daniel Campora's avatar Daniel Campora
Browse files

cc3200: Optimize check for WLAN AP mode.

parent 7fd538c1
......@@ -750,7 +750,7 @@ STATIC mp_obj_t wlan_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_
};
// check for correct wlan mode
if (wlan_obj.mode != ROLE_STA && wlan_obj.mode != ROLE_P2P) {
if (wlan_obj.mode == ROLE_AP) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_request_not_possible));
}
......@@ -947,7 +947,7 @@ STATIC mp_obj_t wlan_scan(mp_obj_t self_in) {
};
// check for correct wlan mode
if (wlan_obj.mode != ROLE_STA && wlan_obj.mode != ROLE_P2P) {
if (wlan_obj.mode == ROLE_AP) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_request_not_possible));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment