Replace the single squashed 0001-bes2600-besser-cumulative-series.patch with 20 individual per-commit patches matching the bes2600/besser-danctnix-v3 branch in marfrit/bes2600-dkms. Also remove the duplicate 0003-arm64 entry that was a bug in pkgrel=3. Patch list: 0001 c5.1 defer scan and soften WARN on firmware reject 0002 c5.1.1 widen scan-defer backoff to 30s and decay reject_count 0003 c5.2 recover wedged firmware via mmc_hw_reset on link break 0004 c6.1 gate PM indication completion on pending request 0005 c6.2 short-circuit wake handshake when chip confirmed ACTIVE 0006 c7 self-detect when firmware does not honor PSM and skip 0007 c5.2.1 handle multi-function SDIO cards in mmc_hw_reset 0008 Patch A pre-empt AP-deauth-6 with reassoc on decrypt-fail storm 0009 Patch B bus_reset on connection-loss storm 0010 Patch F3 atomicize atomic_add() calls 0011 Patch F2 fix missing destroy_workqueue() on error in init_common 0012 Patch F1 fix concurrency UAF in bes2600_hw_scan / sched_scan 0013 Patch C v3 drop sdio_rx_work relay, IRQ→bh-direct 0014 Patch G restore SPDX identifiers + ST-Ericsson attribution 0015 Patch D atomicize ba_lock counters, drop the spinlock 0016 Patch E skip ps_state_lock when PSM-known-disabled 0017 Patch C2 replace ieee80211_rx_irqsafe with ieee80211_rx_ni 0018 Patch H bh.c hygiene cleanup (drop fossil blocks, dead stubs) 0019 besser#18 pending_record_lock SOFTIRQ-safe fix 0020 danctnix-flavor: export bus_reset helpers for bes2600_btuart Build pending (pkgrel=4 makepkg in progress on boltzmann). Signed-off-by: Claude (noether) <claude@reauktion.de>
BESser — BES2600 driver mainlining for Pine64 PineTab2
Working tree for upstreaming the Bestechnic BES2600WM WiFi/BT combo driver currently shipped out-of-tree by the danctnix kernel for the Pine64 PineTab2.
Why "BESser"
"BES" (the chip vendor) + German besser ("better"). Sibling to:
- Bin — u-boot upstreaming for the CoolPi GenBook (RK3588)
- MegabitChip — DDR init blob RE for the same SoC
- SouthAfrica — OpenPineBuds / 1MORE Fit SE BES2300 firmware RE (chip family relative)
- RockHard — RK3588 mainline kernel work
Hardware target
| Item | Value |
|---|---|
| Device | PineTab2 |
| Host name | ohm (ohm.fritz.box, ohm.vpn = 10.170.16.14) |
| SoC | Rockchip RK3566 (aarch64) |
| WiFi/BT | Bestechnic BES2600WM — WiFi 4 (11n dual-band 1x1) + BT 5.2/5.3 |
| WiFi interface | SDIO 3.0, vendor 0xBE57 device 0x2002 |
| BT interface | UART HCI (separate bes2600_btuart module) |
| OS | Arch Linux ARM, danctnix kernel 6.19.10-danctnix1-1-pinetab2 |
Driver lineage
ST-Ericsson CW1200 (mainline drivers/net/wireless/st/cw1200/)
│ author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
▼
Bestechnic BES2600 (closed fork ~2015–2023, same author)
│ adds: BT-over-UART, 5GHz, ePTA coexistence, SDIO ADMA, char-dev API
▼
Released for Chinese Android burner-phone vendor kernels (~2023)
│
▼
arjan-vlek/bes2600 (GitLab, 2023-07) → 26-commit checkpatch cleanup
│
├── TuxThePenguin0/bes2600 (preserves pre-removal Android source)
├── salsa.debian.org/Mobian-team/devices/bes2600-dkms (active, our PR target)
└── codeberg.org/DanctNIX/linux-pinetab2 (in-kernel at drivers/staging/bes2600/)
CW1200-ancestry markers in current source: same author Dmitry Tarnyagin,
CONFIG_BES2600_USE_STE_EXTENSIONS (STE = ST-Ericsson),
CONFIG_BES2600_WSM_DEBUG (WSM = CW1200's host↔FW protocol).
Repos
| Role | Path |
|---|---|
| This umbrella | git.reauktion.de/marfrit/besser — patches/, scripts/, fw-analysis/, notes/ |
| Mobian DKMS fork (PR target) | git.reauktion.de/marfrit/bes2600-dkms — branches per patch; upstream = salsa.debian.org/Mobian-team/devices/bes2600-dkms |
| DanctNIX kernel package (ohm) | git.reauktion.de/marfrit/marfrit-packages/arch/linux-pinetab2-danctnix-besser/ — kernel-agent-driven PKGBUILD, pkgrel=4+ |
| kernel-agent manifest + patches | git.reauktion.de/marfrit/kernel-agent — fleet/ohm.yaml lists the per-patch series, bin/ka-promote ohm emits the cumulative the PKGBUILD consumes |
| Historical hand-managed PKGBUILD | git.reauktion.de/marfrit/besser/danctnix-besser-pkgbuild/ — pkgrel≤3, deprecated; see directory README |
Patch series
| Patch | Status | Description |
|---|---|---|
| c1 | ✅ MERGED-LOCAL, deployed on ohm | bes2600: use request_firmware() for factory.txt read — kills filp_open / kernel_read in the read path; fixes the (NULL device *) read and check /lib/firmware/bes2600_factory.txt error boot spam |
| c2 | pending | PM handshake gate + retry — fixes bes2600_pwr_enter_lp_mode wait pm ind timeout recurring every 5–10s |
| c3 | pending | bes_chardev removal + nl80211 testmode hookup — clears the second upstream blocker (custom char device); secondary effect on bug #3 |
| c4 | pending | Enable CONFIG_BES2600_TESTMODE=y + route patch_wifi_testMode — exposes hidden firmware testmode features |
| c5 | pending | Investigate factory.txt parse fail — uncovered by c1; original bug masked it; parser chokes on data request_firmware now successfully returns |
| c1.1 | pending follow-up | Drop kernel_write from factory.c + bes_chardev.c + bes_fw.c (/lib/firmware/bes2002_fw_write.bin debug file!) |
| c1.2 | pending follow-up | Thread struct device * through factory API → eliminates (NULL device *) log prefix |
Workflow
- Edit on Mobian fork (
bes2600-dkms) — primary upstream PR target - Topic branch per patch:
bes2600/<short-name> git commit --signoffwith full kernel-style message- checkpatch.pl --no-tree --strict before push (must be clean)
git format-patch -1 -o ../besser/patches/to canonicalize- Push branch to
origin(Gitea), open MR upstream when ready
Build + deploy
See scripts/:
build-bes2600-on-ohm.sh— native aarch64 build on ohm (requireslinux-pinetab2-headers)deploy-c1-to-ohm.sh— install patched modules to/lib/modules/<ver>/extra/+ depmodbackup-ohm-kernel.sh— timestamped tar.zst of /boot + /lib/modules + /lib/firmware/bes2600
Firmware RE state (task d)
Firmware blobs (4 .bin + factory.txt) are not committed here (binary,
ships from Bestechnic). On boltzmann:~/src/besser/firmware-from-ohm/ and
on oppenheimer:/work/besser/ (Ghidra host).
What IS committed under fw-analysis/:
*.strings.txt— full sorted-unique strings extraction per blob*.fnnames.txt— function-name pattern extraction (191 candidates frombest2002_fw_sdio.bin)
Build provenance: Dec 26-27 2023 build from Bestechnic Jenkins
(GCC-10-pipeline), source git commit 8125e20be (NOT public).
Hidden features in firmware (per task d): testmode patch (CONFIG_BES2600_TESTMODE
gates it), ePTA coexistence with bypass (gEptaBypass: %d), DPD per-channel
calibration, hal_trace_crash_dump_register, METAL_ID + patch_version
introspection, RF tone generation (nosignal variant), memory dump (nosignal
variant), DAC/IQ calibration v2, fast-PSM tuning hooks.
Adjacent infrastructure
- oppenheimer (CT131 on data Proxmox): Ghidra 11.3.2 host. SSH via
mfritsche@192.168.88.63. Staging at/work/besser/. - boltzmann (Rock 5 ITX+): primary build/dev, ARM64 native, hub-tools preferred path.
- ohm: target hardware; UART-over-USB-C debug rig also available (Tigard FT2232H Channel A @ 1.8V).
Authors / contacts
- Markus Fritsche
<fritsche.markus@gmail.com>(this fork) - Driver upstream: Dmitry Tarnyagin
<dmitry.tarnyagin@stericsson.com>(CW1200 / BES2600 base) - BT companion: Dang Huynh
<dang.huynh@mainlining.org>(bes2600_btuart.c, 2025) - Mobian DKMS: Julian
<mail@julianfairfax.ch>(current packaging maintainer)