Files
besser/danctnix-besser-pkgbuild
claude-noether 843d40231f danctnix-besser: regen cumulative patch with bes_chardev.{c,h} merge fix
Build (PID 558898 on boltzmann) failed at bes2600_btuart.c:81:
  error: implicit declaration of function 'bes2600_chrdev_switch_subsys_glb'

Root cause: the original danctnix-flavor adaptation overlaid Mobian's
heavily-trimmed bes_chardev.{c,h} on top of pristine danctnix.  Mobian's
flavor (694 lines) had stripped out the BT/WiFi subsystem-switch
orchestration that pristine danctnix (1387 lines) carries and that
danctnix-only bes2600_btuart.c calls.

Fix: restore pristine danctnix bes_chardev.{c,h} as the baseline for
those two files in the danctnix flavor, then reapply Mobian's
campaign-relevant changes:
  - Patch G: SPDX-License-Identifier header + corrected attribution
  - Patch B: bes2600_chrdev_do_bus_reset + _trigger_bus_reset
    (definitions in bes_chardev.c, declarations in bes_chardev.h,
    EXPORT_SYMBOL_GPL on _trigger_bus_reset since it is called from
    sta.c connection-loss-storm fast-recover path)

Phase 6 thread-safety contract: bus_reset functions read
bes2600_cdev.{sbus_ops,sbus_priv} without locking, identical to the
Mobian-flavor source-of-truth - acceptable given the bus_reset is
invoked from already-serialized higher-level error paths in sta.c.

48 files unchanged in count, +1412/-1243 (was +1426/-2003).  The
delta vs the previous patch is concentrated in bes_chardev.{c,h}:
+776/-16 in .c (restoring the BT/WiFi switching infrastructure plus
appending Patch B), +2/-2 in .h (declarations + SPDX).

Patch verified to apply cleanly to v7.0-danctnix1 baseline.
b2sum updated in PKGBUILD.

Build retrigger pending on his.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 13:59:04 +02:00
..

linux-pinetab2-danctnix-besser

Soft-upstream fork of linux-pinetab2 (DanctNIX kernel for PineTab2) carrying the BESser bes2600 staging-driver patchset.

Drop-in replacement for linux-pinetab2. Same kernel version, same config, same modules — only the drivers/staging/bes2600/ driver differs.

What's in the patchset

A 16-commit cumulative diff over v7.0-danctnix1's in-tree drivers/staging/bes2600/, capturing:

group what it does
c-stack (Patches A, B, c5.1c5.2.1, c6.1, c6.2, c7) wifi-stability fixes: decrypt-storm fast-recover, connection-loss bus-reset, scan-defer-on-firmware-reject, PM state resync, firmware-doesn't-honour-PSM self-detect, multi-function SDIO mmc_hw_reset rescan
Patch F cw1200 mainline backports: hw_scan SKB-lifecycle UAF, init_common destroy_workqueue on error, atomic_add(1, x) → atomic_inc(x) cosmetic
Patch C v3 structural: drop sdio_rx_work workqueue relay; IRQ → bh-direct architecture (matches mainline cw1200)
Patch G GPL-2.0 §1 attribution restoration: SPDX-License-Identifier on every file, Tarnyagin/ST-Ericsson Copyright restored on cw1200-derived files
Patch D ba_lock removed; ba_acc/ba_cnt/ba_acc_rx/ba_cnt_rx/ba_ena converted to atomic_t; per-RX-frame spinlock eliminated
Patch E per-RX-frame ps_state_lock skipped when c7's pm_unsupported latch is on (steady-state on production firmware)
Patch C2 ieee80211_rx_irqsafe → ieee80211_rx_ni at all 6 sites (kernel.org-clean process-context API; tasklet hop removed)
Patch H bh.c hygiene cleanup: 76-line + 468-line #if 0 cw1200-ancestor fossil blocks removed; __bes2600_irq_enable stub removed; per-iteration BUG_ONWARN_ON_ONCE

Measured outcome (Mobian-flavor verification, expected to carry over)

  • Phase 7 N=3 stress @ 4 MB/s sender on RK3566/PineTab2:
    • Patch B baseline: 1.36 MB/s
    • Patch C v3 + F + G + D + E + C2 + H: 2.28 MB/s sustained, +67% over baseline
  • Race-fix verified under stress (no wsm_release_tx_buffer WARN storm under load)
  • Module loads + associates cleanly; pm_unsupported latch fires on boot as expected
  • Build clean with no warnings, srcversion 99052D7… (Mobian-flavor) / TBD on first danctnix build

Provenance

Why it's "BESser"

"Besser" = German for "better." Patch series ID across both DKMS (Mobian) and in-tree (Danctnix) trees. Single source-of-truth lives in marfrit/bes2600-dkms; this PKGBUILD is the danctnix-flavor consumption surface.

Building

makepkg -s

Identical workflow to upstream linux-pinetab2. Flash the resulting .pkg.tar.zst via pacman -U. Reboot to load.

Soft-upstream intent

Submitting this PKGBUILD to DanctNIX for review. If accepted as a replacement for linux-pinetab2 (or sidegrade), the BESser patchset ships to all PineTab2 users via the regular danctnix package update channel. The bes2600 driver gets:

  • ~2× sustained RX throughput
  • Race-correctness on the hot path
  • GPL-2.0 §1 attribution compliance
  • Modern kernel API (no deprecated from_timer, no _irqsafe from process context, no BUG_ON in steady-state)

Drop-in compatibility: same kernel version, same module names, no userspace ABI change.

Maintenance plan

  • New danctnix kernel release → rebase BESser patch onto the new tag, regenerate cumulative diff, bump pkgver
  • New BESser patch on Mobian DKMS → re-overlay + re-flavor + regenerate cumulative diff
  • Both flavors continue to be maintained in lockstep via marfrit/bes2600-dkms source-of-truth

Known gaps

  • Single cumulative diff (squashed 16 commits) for now. Per-patch series can be regenerated if danctnix maintainers prefer.
  • Bluetooth-side bes2600_btuart is independent and untouched by this patchset.
  • bes2600_switch_bt orchestration removed (Mobian-only entry point; not used in danctnix tree).

Author

Markus Fritsche fritsche.markus@gmail.com

Built collaboratively with Claude Opus 4.7 (1M context).