Skip to content

Recovering the complete Wi-Fi firmware

3 October 2026. Reconstructed on 4 November 2026 from development and test notes.

The WLAN investigation initially looked like a driver and firmware-version problem. The Intersil Wi-Fi device communicated over the OMAP's McSPI controller, which supplies the serial peripheral interface (SPI) bus, associated inconsistently, and lost packets. Changing SPI timing, calibration, encryption, and transmit behavior produced enough partial success to make several explanations plausible.

Testing the transport hypothesis

The initial comparison used USB for maintenance so a failed wireless test would leave a control connection. With firmware, upload chunks, and power-on delay fixed, the short router tests produced the following results:

SPI and transfer path Received / sent Mean RTT of received replies
6 MHz, forced PIO 12 / 39 34.0 ms
12 MHz, forced PIO 17 / 39 44.6 ms
24 MHz, forced PIO 27 / 40 5.65 ms
24 MHz, DMA 23 / 40 84.7 ms
24 MHz, PIO repeated 29 / 40 5.64 ms

PIO has the CPU move data through device registers; DMA lets the controller move it directly through memory. RTT is the round-trip time of a ping reply. The faster PIO setting was a useful working point. Packet loss and renewed stalls kept the transport explanation open. The experiments were sequential, and link conditions varied between windows, so the recorded settings and before/after counters mattered as much as the best row.

Reconstructing calibration

The original wlan-cal ARM helper was run under emulation with mocked CAL reads and file writes. Its output supplied in-phase/quadrature (IQ) alignment, power-amplifier (PA) curves, output limits, and received-signal-strength (RSSI) calibration. These values describe the individual radio's analog behavior. The original driver source then established which structures matched the p54 EEPROM records.

An IQ-only candidate changed the channel alignment record and its checksum. A PA-only follow-up substituted the device's six power-curve points per channel. Both associated successfully, and both continued to lose many packets. The PA candidate was rolled back. A later audit checked the apparently unused seventh and eighth slots: their disabled markers and six-point count already matched the original conversion.

CCMP is the encryption scheme used by this Wi-Fi connection. Both hardware and software CCMP produced substantial loss. Request-to-send/clear-to-send (RTS/CTS) coordination, receive dummy reads, sleep suppression, and transmit pacing each received bounded comparisons. One proposed wakeup delay had an especially clear result: its counter stayed at zero throughout the test because READY was present on the first poll. That code path could have no effect in that window.

Returning to the original operating system

Normal Maemo, using the same access point and physical position, received 30 of 30 router replies twice. Its calibration values matched the independent reconstruction. The next question became whether Debian was using the same complete firmware input.

The firmware comparison exposed a damaged copy of version 2.13.0.0.a.22.8:

Part of the suspect file What the comparison found
First 4,096 bytes These matched the complete firmware, including the version string.
Remaining 27,188 bytes Every byte was zero.
Total length The file still occupied the expected 31,284 bytes.

This explained why the earlier checks had passed. Reading the version string identified the expected release. Reading back the uploaded firmware confirmed that the device had received the supplied bytes. The supplied file itself had a zero-filled remainder, and both checks had faithfully accepted it.

Three reads from the running Maemo system and an independent extraction from its original initial filesystem, or initfs, agreed on the complete image. We could now compare firmware behavior while holding the kernel, diagnostic module, calibration, and transport settings fixed.

The older firmware received 18 of 39 router replies. The recovered complete image received 30 of 30, followed by 60 of 60. Association and address assignment through DHCP also succeeded. Those results made the complete image the selected firmware input.

Router replies received: older firmware 18 of 39; recovered image 30 of 30 and 60 of 60

The complete recovered image passed both short comparisons. The older firmware in this chart was a separate test input from the zero-filled copy examined above.

The test used 24 MHz SPI with PIO, a 300 ms power-on delay, 128-byte upload chunks, device-derived IQ calibration, hardware CCMP, and disabled power saving. We had a working wireless connection under those conditions. Reconnect behavior and longer runs still needed testing.

The Linux p54 documentation describes the driver family. The repository's Wi-Fi service and configuration helper cover the userspace side of the working system.

Code, tests and build inputs

Material Repository files
Implementation Maemo helper emulator (GitHub)
Wi-Fi service (GitHub)
Maintained SPI/Wi-Fi changes (GitHub)
Checks and fixtures CAL corruption checks (GitHub)
Kernel source inventory (GitHub)
Build inputs Emulator dependencies (GitHub)
Kernel builder (GitHub)
Wi-Fi configuration (GitHub)

Build and test instructions · Chronological source index

The maintained patch contains p54spi.c and spi-omap2-mcspi.c. The ARM helper emulator requires the hash-identified Maemo executable and the owner's CAL image. The physical association and transfer results are historical device observations.

Journal | Current status

Previous entry | Next entry