aboutsummaryrefslogtreecommitdiff
path: root/src/control.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-05-08 20:27:44 +0200
committerDario Nieuwenhuis <[email protected]>2023-05-08 21:53:03 +0200
commita7dee5b65c602637f8209d46d4611ed846a17459 (patch)
treeb6e574c2101764b8733a4eef677bb2a79e17c9b0 /src/control.rs
parentd3d424dad348c78222a6d962e2d51b56b485807d (diff)
Change all logging level to debug.
Diffstat (limited to 'src/control.rs')
-rw-r--r--src/control.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/control.rs b/src/control.rs
index 3d7d4dd38..6919d569e 100644
--- a/src/control.rs
+++ b/src/control.rs
@@ -35,7 +35,7 @@ impl<'a> Control<'a> {
35 pub async fn init(&mut self, clm: &[u8]) { 35 pub async fn init(&mut self, clm: &[u8]) {
36 const CHUNK_SIZE: usize = 1024; 36 const CHUNK_SIZE: usize = 1024;
37 37
38 info!("Downloading CLM..."); 38 debug!("Downloading CLM...");
39 39
40 let mut offs = 0; 40 let mut offs = 0;
41 for chunk in clm.chunks(CHUNK_SIZE) { 41 for chunk in clm.chunks(CHUNK_SIZE) {
@@ -65,7 +65,7 @@ impl<'a> Control<'a> {
65 // check clmload ok 65 // check clmload ok
66 assert_eq!(self.get_iovar_u32("clmload_status").await, 0); 66 assert_eq!(self.get_iovar_u32("clmload_status").await, 0);
67 67
68 info!("Configuring misc stuff..."); 68 debug!("Configuring misc stuff...");
69 69
70 // Disable tx gloming which transfers multiple packets in one request. 70 // Disable tx gloming which transfers multiple packets in one request.
71 // 'glom' is short for "conglomerate" which means "gather together into 71 // 'glom' is short for "conglomerate" which means "gather together into
@@ -76,7 +76,7 @@ impl<'a> Control<'a> {
76 // read MAC addr. 76 // read MAC addr.
77 let mut mac_addr = [0; 6]; 77 let mut mac_addr = [0; 6];
78 assert_eq!(self.get_iovar("cur_etheraddr", &mut mac_addr).await, 6); 78 assert_eq!(self.get_iovar("cur_etheraddr", &mut mac_addr).await, 6);
79 info!("mac addr: {:02x}", Bytes(&mac_addr)); 79 debug!("mac addr: {:02x}", Bytes(&mac_addr));
80 80
81 let country = countries::WORLD_WIDE_XX; 81 let country = countries::WORLD_WIDE_XX;
82 let country_info = CountryInfo { 82 let country_info = CountryInfo {
@@ -135,7 +135,7 @@ impl<'a> Control<'a> {
135 135
136 self.state_ch.set_ethernet_address(mac_addr); 136 self.state_ch.set_ethernet_address(mac_addr);
137 137
138 info!("INIT DONE"); 138 debug!("INIT DONE");
139 } 139 }
140 140
141 pub async fn set_power_management(&mut self, mode: PowerManagementMode) { 141 pub async fn set_power_management(&mut self, mode: PowerManagementMode) {
@@ -226,7 +226,7 @@ impl<'a> Control<'a> {
226 if status == EStatus::SUCCESS { 226 if status == EStatus::SUCCESS {
227 // successful join 227 // successful join
228 self.state_ch.set_link_state(LinkState::Up); 228 self.state_ch.set_link_state(LinkState::Up);
229 info!("JOINED"); 229 debug!("JOINED");
230 Ok(()) 230 Ok(())
231 } else { 231 } else {
232 warn!("JOIN failed with status={} auth={}", status, auth_status); 232 warn!("JOIN failed with status={} auth={}", status, auth_status);
@@ -330,7 +330,7 @@ impl<'a> Control<'a> {
330 } 330 }
331 331
332 async fn set_iovar_v<const BUFSIZE: usize>(&mut self, name: &str, val: &[u8]) { 332 async fn set_iovar_v<const BUFSIZE: usize>(&mut self, name: &str, val: &[u8]) {
333 info!("set {} = {:02x}", name, Bytes(val)); 333 debug!("set {} = {:02x}", name, Bytes(val));
334 334
335 let mut buf = [0; BUFSIZE]; 335 let mut buf = [0; BUFSIZE];
336 buf[..name.len()].copy_from_slice(name.as_bytes()); 336 buf[..name.len()].copy_from_slice(name.as_bytes());
@@ -344,7 +344,7 @@ impl<'a> Control<'a> {
344 344
345 // TODO this is not really working, it always returns all zeros. 345 // TODO this is not really working, it always returns all zeros.
346 async fn get_iovar(&mut self, name: &str, res: &mut [u8]) -> usize { 346 async fn get_iovar(&mut self, name: &str, res: &mut [u8]) -> usize {
347 info!("get {}", name); 347 debug!("get {}", name);
348 348
349 let mut buf = [0; 64]; 349 let mut buf = [0; 64];
350 buf[..name.len()].copy_from_slice(name.as_bytes()); 350 buf[..name.len()].copy_from_slice(name.as_bytes());