@@ -2,7 +2,7 @@ use core::cmp::{max, min};
22
33use ch:: driver:: LinkState ;
44use embassy_net_driver_channel as ch;
5- use embassy_time:: { Duration , Timer } ;
5+ use embassy_time:: Timer ;
66
77pub use crate :: bus:: SpiBusCyw43 ;
88use crate :: consts:: * ;
@@ -87,22 +87,22 @@ impl<'a> Control<'a> {
8787 self . set_iovar ( "country" , & country_info. to_bytes ( ) ) . await ;
8888
8989 // set country takes some time, next ioctls fail if we don't wait.
90- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
90+ Timer :: after_millis ( 100 ) . await ;
9191
9292 // Set antenna to chip antenna
9393 self . ioctl_set_u32 ( IOCTL_CMD_ANTDIV , 0 , 0 ) . await ;
9494
9595 self . set_iovar_u32 ( "bus:txglom" , 0 ) . await ;
96- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
96+ Timer :: after_millis ( 100 ) . await ;
9797 //self.set_iovar_u32("apsta", 1).await; // this crashes, also we already did it before...??
98- //Timer::after(Duration::from_millis( 100) ).await;
98+ //Timer::after_millis( 100).await;
9999 self . set_iovar_u32 ( "ampdu_ba_wsize" , 8 ) . await ;
100- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
100+ Timer :: after_millis ( 100 ) . await ;
101101 self . set_iovar_u32 ( "ampdu_mpdu" , 4 ) . await ;
102- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
102+ Timer :: after_millis ( 100 ) . await ;
103103 //self.set_iovar_u32("ampdu_rx_factor", 0).await; // this crashes
104104
105- //Timer::after(Duration::from_millis( 100) ).await;
105+ //Timer::after_millis( 100).await;
106106
107107 // evts
108108 let mut evts = EventMask {
@@ -121,17 +121,17 @@ impl<'a> Control<'a> {
121121
122122 self . set_iovar ( "bsscfg:event_msgs" , & evts. to_bytes ( ) ) . await ;
123123
124- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
124+ Timer :: after_millis ( 100 ) . await ;
125125
126126 // set wifi up
127127 self . up ( ) . await ;
128128
129- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
129+ Timer :: after_millis ( 100 ) . await ;
130130
131131 self . ioctl_set_u32 ( 110 , 0 , 1 ) . await ; // SET_GMODE = auto
132132 self . ioctl_set_u32 ( 142 , 0 , 0 ) . await ; // SET_BAND = any
133133
134- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
134+ Timer :: after_millis ( 100 ) . await ;
135135
136136 self . state_ch . set_ethernet_address ( mac_addr) ;
137137
@@ -185,7 +185,7 @@ impl<'a> Control<'a> {
185185 self . set_iovar_u32x2 ( "bsscfg:sup_wpa2_eapver" , 0 , 0xFFFF_FFFF ) . await ;
186186 self . set_iovar_u32x2 ( "bsscfg:sup_wpa_tmo" , 0 , 2500 ) . await ;
187187
188- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
188+ Timer :: after_millis ( 100 ) . await ;
189189
190190 let mut pfi = PassphraseInfo {
191191 len : passphrase. len ( ) as _ ,
@@ -297,7 +297,7 @@ impl<'a> Control<'a> {
297297 if security != Security :: OPEN {
298298 self . set_iovar_u32x2 ( "bsscfg:wpa_auth" , 0 , 0x0084 ) . await ; // wpa_auth = WPA2_AUTH_PSK | WPA_AUTH_PSK
299299
300- Timer :: after ( Duration :: from_millis ( 100 ) ) . await ;
300+ Timer :: after_millis ( 100 ) . await ;
301301
302302 // Set passphrase
303303 let mut pfi = PassphraseInfo {
0 commit comments