diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-05-08 20:27:44 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-05-08 21:53:03 +0200 |
| commit | a7dee5b65c602637f8209d46d4611ed846a17459 (patch) | |
| tree | b6e574c2101764b8733a4eef677bb2a79e17c9b0 | |
| parent | d3d424dad348c78222a6d962e2d51b56b485807d (diff) | |
Change all logging level to debug.
| -rw-r--r-- | src/control.rs | 14 | ||||
| -rw-r--r-- | src/runner.rs | 22 |
2 files changed, 18 insertions, 18 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()); |
diff --git a/src/runner.rs b/src/runner.rs index 56b9a609c..98f8aff7f 100644 --- a/src/runner.rs +++ b/src/runner.rs | |||
| @@ -80,12 +80,12 @@ where | |||
| 80 | self.bus | 80 | self.bus |
| 81 | .write8(FUNC_BACKPLANE, REG_BACKPLANE_CHIP_CLOCK_CSR, BACKPLANE_ALP_AVAIL_REQ) | 81 | .write8(FUNC_BACKPLANE, REG_BACKPLANE_CHIP_CLOCK_CSR, BACKPLANE_ALP_AVAIL_REQ) |
| 82 | .await; | 82 | .await; |
| 83 | info!("waiting for clock..."); | 83 | debug!("waiting for clock..."); |
| 84 | while self.bus.read8(FUNC_BACKPLANE, REG_BACKPLANE_CHIP_CLOCK_CSR).await & BACKPLANE_ALP_AVAIL == 0 {} | 84 | while self.bus.read8(FUNC_BACKPLANE, REG_BACKPLANE_CHIP_CLOCK_CSR).await & BACKPLANE_ALP_AVAIL == 0 {} |
| 85 | info!("clock ok"); | 85 | debug!("clock ok"); |
| 86 | 86 | ||
| 87 | let chip_id = self.bus.bp_read16(0x1800_0000).await; | 87 | let chip_id = self.bus.bp_read16(0x1800_0000).await; |
| 88 | info!("chip ID: {}", chip_id); | 88 | debug!("chip ID: {}", chip_id); |
| 89 | 89 | ||
| 90 | // Upload firmware. | 90 | // Upload firmware. |
| 91 | self.core_disable(Core::WLAN).await; | 91 | self.core_disable(Core::WLAN).await; |
| @@ -95,10 +95,10 @@ where | |||
| 95 | 95 | ||
| 96 | let ram_addr = CHIP.atcm_ram_base_address; | 96 | let ram_addr = CHIP.atcm_ram_base_address; |
| 97 | 97 | ||
| 98 | info!("loading fw"); | 98 | debug!("loading fw"); |
| 99 | self.bus.bp_write(ram_addr, firmware).await; | 99 | self.bus.bp_write(ram_addr, firmware).await; |
| 100 | 100 | ||
| 101 | info!("loading nvram"); | 101 | debug!("loading nvram"); |
| 102 | // Round up to 4 bytes. | 102 | // Round up to 4 bytes. |
| 103 | let nvram_len = (NVRAM.len() + 3) / 4 * 4; | 103 | let nvram_len = (NVRAM.len() + 3) / 4 * 4; |
| 104 | self.bus | 104 | self.bus |
| @@ -112,7 +112,7 @@ where | |||
| 112 | .await; | 112 | .await; |
| 113 | 113 | ||
| 114 | // Start core! | 114 | // Start core! |
| 115 | info!("starting up core..."); | 115 | debug!("starting up core..."); |
| 116 | self.core_reset(Core::WLAN).await; | 116 | self.core_reset(Core::WLAN).await; |
| 117 | assert!(self.core_is_up(Core::WLAN).await); | 117 | assert!(self.core_is_up(Core::WLAN).await); |
| 118 | 118 | ||
| @@ -132,7 +132,7 @@ where | |||
| 132 | .await; | 132 | .await; |
| 133 | 133 | ||
| 134 | // wait for wifi startup | 134 | // wait for wifi startup |
| 135 | info!("waiting for wifi init..."); | 135 | debug!("waiting for wifi init..."); |
| 136 | while self.bus.read32(FUNC_BUS, REG_BUS_STATUS).await & STATUS_F2_RX_READY == 0 {} | 136 | while self.bus.read32(FUNC_BUS, REG_BUS_STATUS).await & STATUS_F2_RX_READY == 0 {} |
| 137 | 137 | ||
| 138 | // Some random configs related to sleep. | 138 | // Some random configs related to sleep. |
| @@ -158,14 +158,14 @@ where | |||
| 158 | 158 | ||
| 159 | // start HT clock | 159 | // start HT clock |
| 160 | //self.bus.write8(FUNC_BACKPLANE, REG_BACKPLANE_CHIP_CLOCK_CSR, 0x10).await; | 160 | //self.bus.write8(FUNC_BACKPLANE, REG_BACKPLANE_CHIP_CLOCK_CSR, 0x10).await; |
| 161 | //info!("waiting for HT clock..."); | 161 | //debug!("waiting for HT clock..."); |
| 162 | //while self.bus.read8(FUNC_BACKPLANE, REG_BACKPLANE_CHIP_CLOCK_CSR).await & 0x80 == 0 {} | 162 | //while self.bus.read8(FUNC_BACKPLANE, REG_BACKPLANE_CHIP_CLOCK_CSR).await & 0x80 == 0 {} |
| 163 | //info!("clock ok"); | 163 | //debug!("clock ok"); |
| 164 | 164 | ||
| 165 | #[cfg(feature = "firmware-logs")] | 165 | #[cfg(feature = "firmware-logs")] |
| 166 | self.log_init().await; | 166 | self.log_init().await; |
| 167 | 167 | ||
| 168 | info!("init done "); | 168 | debug!("wifi init done"); |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | #[cfg(feature = "firmware-logs")] | 171 | #[cfg(feature = "firmware-logs")] |
| @@ -174,7 +174,7 @@ where | |||
| 174 | 174 | ||
| 175 | let addr = CHIP.atcm_ram_base_address + CHIP.chip_ram_size - 4 - CHIP.socram_srmem_size; | 175 | let addr = CHIP.atcm_ram_base_address + CHIP.chip_ram_size - 4 - CHIP.socram_srmem_size; |
| 176 | let shared_addr = self.bus.bp_read32(addr).await; | 176 | let shared_addr = self.bus.bp_read32(addr).await; |
| 177 | info!("shared_addr {:08x}", shared_addr); | 177 | debug!("shared_addr {:08x}", shared_addr); |
| 178 | 178 | ||
| 179 | let mut shared = [0; SharedMemData::SIZE]; | 179 | let mut shared = [0; SharedMemData::SIZE]; |
| 180 | self.bus.bp_read(shared_addr, &mut shared).await; | 180 | self.bus.bp_read(shared_addr, &mut shared).await; |
