File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
espressif/common-hal/wifi
raspberrypi/common-hal/wifi Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -86,9 +86,9 @@ mp_obj_t common_hal_wifi_network_get_authmode(wifi_network_obj_t *self) {
86
86
}
87
87
mp_obj_t authmode_list = mp_obj_new_list (0 , NULL );
88
88
if (authmode_mask != 0 ) {
89
- for (uint8_t i = 0 ; i < 8 ; i ++ ) {
89
+ for (uint8_t i = 0 ; i < 32 ; i ++ ) {
90
90
if ((authmode_mask >> i ) & 1 ) {
91
- mp_obj_list_append (authmode_list , cp_enum_find (& wifi_authmode_type , i ));
91
+ mp_obj_list_append (authmode_list , cp_enum_find (& wifi_authmode_type , 1 << i ));
92
92
}
93
93
}
94
94
}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ mp_obj_t common_hal_wifi_network_get_country(wifi_network_obj_t *self) {
53
53
}
54
54
55
55
mp_obj_t common_hal_wifi_network_get_authmode (wifi_network_obj_t * self ) {
56
- uint8_t authmode_mask = 0 ;
56
+ uint32_t authmode_mask = 0 ;
57
57
if (self -> record .auth_mode == 0 ) {
58
58
authmode_mask = AUTHMODE_OPEN ;
59
59
}
@@ -71,9 +71,9 @@ mp_obj_t common_hal_wifi_network_get_authmode(wifi_network_obj_t *self) {
71
71
;
72
72
mp_obj_t authmode_list = mp_obj_new_list (0 , NULL );
73
73
if (authmode_mask != 0 ) {
74
- for (uint8_t i = 0 ; i < 8 ; i ++ ) {
74
+ for (uint32_t i = 0 ; i < 32 ; i ++ ) {
75
75
if ((authmode_mask >> i ) & 1 ) {
76
- mp_obj_list_append (authmode_list , cp_enum_find (& wifi_authmode_type , i ));
76
+ mp_obj_list_append (authmode_list , cp_enum_find (& wifi_authmode_type , 1 << i ));
77
77
}
78
78
}
79
79
}
You can’t perform that action at this time.
0 commit comments