Commit Graph

46 Commits

Author SHA1 Message Date
claude-noether f232476240 notes: Patch C Phase 4 plan — collapse sdio_rx_work into BH (item 1 only)
Per merged PR #8 inline review: items 1 and 2 split, sequential. Patch C
is item-1-only (collapse the sdio_rx_work → rx_queue → bh_work
indirection). Patch C2 (ieee80211_rx_list batch delivery) is split out
and gated on Task #19 kerneldoc contract verification.

Approach choice: Option A (sdio_rx_work delivers directly into
wsm_handle_rx, removing rx_queue and its two synchronization points per
frame) over Option B (subsume into bh thread). Option A has a smaller
diff and clearer bisection story; the residual per-IRQ workqueue
dispatch is preserved as a measurable Phase 7 data point that motivates
or doesn't motivate a follow-on Option-B patch.

Predicted delta in Phase 3 units, with confidence levels stated
explicitly. §4.6 lists 6 risks, of which 2 require Phase 6 contract
citations (wsm_handle_rx callability from sdio_wq context;
wsm_release_tx_buffer's bh-wake invariant). §4.8 mandates a stress
ramp in Phase 7, not a steady cap, per feedback_phase7_stress_ramp.

Symptom-shaped findings (asm nop, commented-out IRQ re-enable, BUG_ON
in hot path) explicitly deferred to Task #24 per
feedback_dont_patch_downstream_artifacts.

Awaiting Phase 5 second-model review on DokuWiki.
2026-05-07 19:04:53 +02:00
marfrit 08c7aafb48 Merge pull request 'notes: Opus second-opinion BES2600 WiFi structural critique' (#8) from claude-noether-6 into main
Reviewed-on: #8
Reviewed-by: Markus Fritsche <mfritsche@reauktion.de>
2026-05-07 16:58:55 +00:00
claude-noether 809e3cce84 notes: opus second-opinion BES2600 WiFi structural critique
Independent code-review writeup (Opus 4.7) against Sonnet's review of the
same tree. Concurs with Sonnet on items 1+2 (RX relay, batch delivery)
and items 4+5 (ba_lock atomics, ps_state_lock skip-when-pm_unsupported);
pushes back on the "9 workqueue events per frame" quantification and
records BES_SDIO_OPTIMIZED_LEN as hard-baked rather than togglable.

New findings: cw12xx-not-bes2600 genealogy still active in source, ~700
lines of #if 0 fossil in bh.c, Allwinner-specific sw_mci_check_r1_ready
in the SDIO bus path, asm volatile("nop") placeholder where IRQ re-enable
used to live, BUG_ON in steady-state hot path, vendor-SDK Makefile shape
that pollutes every diff, 8 EXPORT_SYMBOLs from a nominally-single-binary
module.

Recommends ordering: Patch C (1+2 wrapped) high-risk-first, Patches D+E
as small individually-verifiable cleanups, explicit don't-touch list.
Notes ieee80211_rx_list contract verification (task #19) blocks Patch C.
2026-05-07 18:12:54 +02:00
marfrit 4344873f2d Merge pull request 'Sonnet architect review for Bug #5 — ranked restructuring map' (#7) from claude-noether-5 into main
Reviewed-on: #7
2026-05-07 16:01:55 +00:00
claude-noether 679083d1aa notes: Sonnet architect review for Bug #5 — ranked restructuring map
Sonnet (general-purpose subagent, model=sonnet) reviewed
~/src/besser/bes2600-dkms-mobian/bes2600/ given the Phase 0 measurement
context. Output: 8-item ranked restructuring map, file:line cited.

Headline:
- Item 1: collapse sdio_rx_work relay into BH loop (~5x workqueue
  dispatch reduction, medium effort)
- Item 2: batch deliver via ieee80211_rx_list (small effort, removes
  per-frame softirq)
- Items 1 + 2 together collapse "9 workqueue events per delivered
  frame" to ~1.

Items 3-5 clean up next-layer overhead (TX-side queue_work,
per-frame ba_lock, ps_state_lock under known-dead PSM). Items 6-8
are follow-ons to be re-measured after 1-3 land.

Phase 4 plan locking the lead candidate(s) follows in a separate PR.
2026-05-07 17:38:16 +02:00
claude-noether 594f73c6b4 notes: Bug #5 root cause refined — workqueue-per-SDIO-transaction is the floor
Follow-up ftrace measurement (post-reboot, 3-min 4MB/s capture):
- workqueue_execute_start: 5,643/sec  ← dominates
- wsm_cmd_send: only 13/sec (host-to-chip command path NOT the hotspot)
- lock contention: 50/sec (modest)

The throughput floor is set by per-SDIO-transaction workqueue dispatch
overhead. Surgical patches B5-1/B5-2/B5-3 from the prior Phase 4 plan
all targeted the wrong layer; deferring those until an architectural
restructuring map is produced.

Promoting the Sonnet architect review from "backlog" to
"blocking on Bug #5" — the next step is a restructuring assessment,
not another patch.
2026-05-07 17:31:31 +02:00
claude-noether 928268f477 notes: backlog Sonnet architect review of bes2600 driver
Per PR #6 review feedback. Independent track from Bug #5; scheduled
once the Bug #5 measurement pass finishes.
2026-05-07 16:38:58 +02:00
marfrit 425eb92456 Merge pull request 'Bug #5 Phase 1 metric + Phase 0 anchor receipts' (#6) from claude-noether-4 into main
Reviewed-on: #6
2026-05-07 14:37:29 +00:00
claude-noether 1830c17891 notes: Bug #5 Phase 1 metric + Phase 0 anchor receipts
Phase 0 anchored at N=3 reps (10min @ 4MB/s pv-cap on 2.4GHz):
- rep1+2: ~700 KB/s sustained (10% of link capacity)
- rep3: link death at ~9 min in (passive mode, beacon-loss cascade)

Hot symbol identified: _raw_spin_unlock_irqrestore at ~20% CPU in both
healthy and failed reps, callstack process_one_work → wsm_configuration
→ wsm_cmd_send → bes2600_bh.isra.0 → spin-unlock.

Phase 1 metric locked: ≥2 MB/s sustained throughput, <10% CPU in lock-
cycling, no link death under 30 min continuous load.

Three Phase 4 candidates drafted (B5-1: shrink wsm_cmd_send lock scope;
B5-2: coalesce vif_list_lock in BH dispatcher; B5-3: SPSC ringbuffer for
WSM commands). Locking pending review.
2026-05-07 16:32:45 +02:00
claude-noether 69a1d0f8b1 notes: phase 7 verdict — Patch A confirmed, Patch B dormant
Phase 7 verification of cleanups + Patch A + Patch B (srcversion
1B3B3ED0) on ohm 2026-05-07 12:48 → 15:13 CEST under netcat load
ramped 1 MB/s → 4 MB/s on 2.4GHz newton.

Patch A: predicted delta CONFIRMED at N=2 reproductions.
  - 13:47:56 storm → 1 s reassoc, no AP-deauth-6 escalation
  - 13:49:26 storm → 1 s reassoc, no AP-deauth-6 escalation

Patch B: installed, untriggered. 2 api_connection_loss events spaced
91 s apart, never tripping the 3-in-60s threshold. No false positives,
no spurious bus_resets. Recovery delta unobserved (no harm done).

Trigger C: 17-frame AP-deauth-6 cluster at 12:53 with no patch hooks
firing — bes2600 TX-side glitch suspect. Recovery via mac80211 reauth
in ~4 s. New backlog item.

Bug #5 documented separately (RX path degrades under throughput
pressure; possible root of the original Phase-0 YouTube frame drops).
2026-05-07 15:18:36 +02:00
claude-noether 458ad36f8b notes: backlog Bug #5 — RX path degrades under throughput pressure
Observed 2026-05-07: bumping the netcat sender from 1 MB/s to 4 MB/s
DECREASED ohm's observed RX rate (1015 KB/s → 563 KB/s) and degraded
the link (signal -57 → -67 dBm, MCS 4 → 3). Chip can't sustain near-
link-rate RX even though theoretical capacity is ~8 MB/s.

Hypothesis: driver/firmware lock contention or busy-wait on the RX
SDIO path. Plausibly explains the original Phase-0 observation that
YouTube DASH chunks drop ~10 frames per chunk fetch — chunk fetch is
a brief near-line-rate burst that this bug would be triggered by.
2026-05-07 13:56:36 +02:00
marfrit ea509e810f Merge pull request 'Phase 4 plan: Patch B (Trigger A / api_connection_loss)' (#5) from claude-noether-3 into main
Reviewed-on: #5
2026-05-07 10:45:28 +00:00
claude-noether e53aad5013 notes: phase 4 plan for Patch B (Trigger A / api_connection_loss)
Drafted after Phase 7 verification of Patch A (PR #1, srcversion
21BD07B3). 10h30m sustained load on 2.4GHz produced:
- 0 DecryptStormRecoveries (Patch A dormant; no decrypt-storm fired)
- 9 mac80211 api_connection_loss events
- 1 catastrophic blackhole at 02:42 (reason 4 inactivity → reauth
  with assoc-comeback timeouts → AP unprotected-deauth-6 cluster)

Phase 4 pivots to Trigger A (Patch B). Candidate B-1 lock proposal:
extend c5.2 bus_reset infrastructure to fire on N consecutive
api_connection_loss events; reuses existing recovery path.

Pending Phase 5 review before Phase 6 implementation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 10:22:34 +02:00
marfrit 4acba3e707 Merge pull request #4: Phase 4 plan: decrypt-storm fast-recover (Trigger B), with revised Phase 1 2026-05-06 17:30:48 +00:00
test0r f6a25d811f notes: phase 4 plan artifact for BES2600 wifi-stability campaign
Drafts Patch A (decrypt-storm fast-recover, Trigger B) at txrx.c:1696
with sliding-window threshold + ieee80211_connection_loss reassoc.
Patch B (beacon-loss / Trigger A) parked behind one more diagnostic
rep with 10s snap-loop cadence on the beacon-loss counter.

Folds reviewer feedback from PR #3 + the new Trigger-A finding
(post-resume P1 = api_connection_loss-driven, two reps captured today
at 17:23 and 18:03) into a revised Phase 1 metric counting three
event classes.

Pending Phase 5 second-model review of the plan before Phase 6
implementation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 19:10:12 +02:00
marfrit 07a7d4b3af Merge pull request 'Phase 5 review: BES2600 WiFi-stability campaign artifact' (#3) from claude-noether into main
Reviewed-on: #3
2026-05-06 13:37:16 +00:00
test0r 1a21212744 notes: phase 5 review artifact for BES2600 wifi-stability campaign
Captures Phase 0-3 receipts as of 2026-05-06: three Pattern-P1 events
reproduced (07:13, 11:03, yesterday 22:33), decrypt-failure metric locked
as Phase 1 with source pins (txrx.c:1696, wsm.h:620, wsm.c:1484), rig built
(snap loop + tcpdump filtered ring + iw event + dynamic_debug + netcat 1MB/s),
idle-vs-load comparison shows 35x burst-rate elevation under load with
conditional-escalation flip (100% idle / 0% load).

Pending Phase 5 second-model review before Phase 4 plan.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 15:23:24 +02:00
test0r a6cd2a80fd patches: refresh c7.2 (gate gpio_sleep recovery on !pm_unsupported) 2026-04-28 17:56:10 +02:00
test0r 8301bd24e9 patches: refresh c7.2 (don't undo latched MCU bit in timeout recovery) 2026-04-28 17:54:51 +02:00
test0r 649831a26e patches: refresh c7.2 (don't undo latched MCU bit in timeout recovery) 2026-04-28 17:54:47 +02:00
test0r 0b904093c0 patches: refresh c7 (hold MCU wake-flag bit on latch to spare SDIO_RX msleep) 2026-04-28 17:47:47 +02:00
test0r 670ee57432 patches: add c7 self-detect firmware doesn't honor PSM 2026-04-28 16:56:15 +02:00
test0r 71d9d5f8c4 patches: refresh c6.1 v3 (drop wake GPIO on enter_lp_mode timeout) 2026-04-28 16:11:29 +02:00
test0r c9057cac2c patches: refresh c6.1 + c6.2 (init UNKNOWN; always run wsm_set_operational_mode) 2026-04-28 15:51:58 +02:00
test0r e6a942a5df patches: add c6.2 wake-path consumer of chip_pm_state (Mobian + danctnix) 2026-04-28 15:27:05 +02:00
test0r fc95cb790e patches: add c6.1 PM-indication race + chip_pm_state (Mobian + danctnix) 2026-04-28 15:06:55 +02:00
test0r 42ae953a0c patches: add c5.1.1 scan-defer backoff tune (Mobian + danctnix) 2026-04-28 14:35:53 +02:00
test0r e65a6acd09 patches: add scan-defer-on-reject (c5.1)
Suppresses the WSM-scan WARN cascade in bes2600_scan_work +
wsm_handle_rx by (a) pre-checking BT A2DP coex state and
backing off after N consecutive firmware rejections, and
(b) demoting the WARN() in wsm_generic_confirm to bes_devel
(the upstream-caller's wiphy_warn with request-id is kept).

Deployed + verified on ohm (srcversion A5C8146A…): WARN splat
count 0 per 1 min boot (pre-patch: 32 per 25 min). WiFi
immediately roamed from ch1 signal-47 to ch48 5240 MHz newton
because scan completions now land cleanly with mac80211.
Other counters still 0. Net: +83/-2 lines across 3 files.

Standalone single-patch series in both Mobian-paths and
drivers/staging/bes2600/ paths variants, checkpatch --strict
clean.
2026-04-24 23:51:47 +02:00
test0r 2b7fe4e1de patches: add debian-copyright-fsf-address
Salsa-CI's lintian stage flagged the pre-existing boilerplate
paragraph in debian/copyright as 'old-fsf-address-in-copyright-
file' when cleanups first hit CI. Replace the '51 Franklin
Street, Fifth Floor, Boston, MA 02110-1301 USA' literal with a
'https://www.gnu.org/licenses/' reference; the
/usr/share/common-licenses/LGPL-2.1 reference a few lines later
is unchanged, so license-text location is still covered.

Pushed to salsa and gitea as commit f31c57a on branch cleanups
and as standalone topic debian/copyright-fsf-address on gitea.
2026-04-24 16:26:30 +02:00
test0r d850a8f0fe patches: add pm-timeout-silence (c2.1)
Demote 'wait pm ind timeout' from bes_err() to bes_devel() in
bes2600_pwr_enter_lp_mode(). The cascade this used to warn about
is already suppressed by c2 (pm-gate-on-handshake); the remaining
log line is benign steady-state noise (3-9 events per 10-min
uptime on PineTab2). Deployed + verified on ohm (srcversion
ED89A26…): err-priority count 0, WiFi associated, no
regression. 1-line patch.
2026-04-23 20:42:22 +02:00
test0r e7a021d901 patches: add drop-orphan-file-io (c1.4)
Completes the filp_open/kernel_read/kernel_write removal pass
across the driver. Deletes bes_fw.c DATA_DUMP_OBSERVE blocks
(4 #ifdefs gated on a commented-out #define, dead by default;
would fail to build on modern kernels due to removed
get_fs/set_fs) and main.c's orphan access_file() helper
(no callers in-tree, also relies on get_fs/set_fs).

With c1.2 + c1.3 + c1.4 combined: zero filp_open /
kernel_read / kernel_write / vfs_read / vfs_write references
anywhere in the driver -- precondition for a linux-wireless
RFC for drivers/staging/bes2600/ unlocked.

Deployed + verified on ohm (srcversion 12BAFB9C…): WiFi
associated, no KFENCE / sdio_tx_work / RX failure / PS Mode
Error / factory cali data get failed. Net: -69 lines.
2026-04-23 20:34:07 +02:00
test0r 496924d6fb patches: add drop-dpd-file-paths (c1.3)
Follow-up to staging-prep-series + factory-drop-kernel-write:
remove the BES2600_WRITE_DPD_TO_FILE-gated filp_open / kernel_read /
kernel_write DPD file paths from bes_chardev.c, including the three
functions, the no_dpd module_param, and the associated Makefile
knob + three PATH macros (BES2600_DPD_PATH, BES2600_DEFAULT_DPD_PATH,
BES2600_DPD_GOLDEN_PATH).

Deployed + verified on ohm (srcversion C1283A24…): WiFi associated,
KFENCE / sdio_tx_work splat / RX failure / PS Mode Error / factory
cali data get failed = 0, no DPD regression. Net: -155 lines.

Standalone single-patch series in both Mobian-paths and
drivers/staging/bes2600/ paths variants, checkpatch --strict clean.
2026-04-23 20:15:11 +02:00
test0r 69c6a13cf2 patches: add factory-drop-kernel-write (c1.2)
Follow-up to staging-prep-series: remove kernel_write() +
filp_open(O_CREAT) from factory_section_write_file() in
bes2600_factory.c. Serialised blob now lives only in-memory +
file_buffer for the session; no longer persists to
/lib/firmware/bes2600/bes2600_factory.txt across reboots.

Deployed + verified on ohm (srcversion BD0D1AEC...): WiFi
associated, KFENCE / sdio_tx_work splat / RX failure / PS Mode
Error / factory cali data get failed all 0. Standalone single-
patch series in both Mobian-paths and drivers/staging/bes2600/
paths variants, checkpatch --strict clean.
2026-04-23 20:00:58 +02:00
test0r b8ba0b342e patches: re-roll staging-prep as 7-patch series (tx-bounce added)
Fold bes2600/tx-sdio-dma-oob into the linear series as 7/7.
Re-cover-letter and update testing matrix. Update UPSTREAM.md table
and submission route to list the 7th branch. The PS Mode Error
residual note is removed from the known-limitations section -- it
stopped recurring after 7/7 deployed.

Both staging-prep-series/ (Mobian paths) and staging-prep-series-
danctnix/ (drivers/staging/bes2600/ paths) variants regenerated;
all 14 patch files checkpatch --strict clean (0/0/0).

Net: +117 / -550 lines across 9 files.
2026-04-23 12:43:29 +02:00
test0r b9f90c30e1 patches: add tx-sdio-dma-oob (KFENCE OOB in SDIO TX path)
Diagnosed via KFENCE splat on ohm (6.19.10-danctnix1, PineTab2):
sdio_tx_work passes block-size-aligned length to dma_map_sg while
the underlying skb linear head is only tx_buffer->len long. Fix:
driver-owned DMA bounce page, memcpy + zero-pad per TX buffer.

Both Mobian paths and drivers/staging/bes2600/ paths variants,
checkpatch-clean.
2026-04-23 11:58:50 +02:00
test0r 92913816ab patches: fix invalid placeholder SHA in danctnix cover letter
The danctnix-series cover letter had an invalid 41-hex-char
placeholder SHA on its 'From' header line (40 zeros with an
f1d22ab0 prefix) -- a relic of manual generation. Replaced with
the valid 40-char SHA already used by the Mobian-series cover
letter. The value is cosmetic (cover letters aren't real commits)
but an invalid SHA will confuse 'git am'.
2026-04-22 18:16:52 +02:00
test0r 427bae5ebb patches: replace non-ASCII punctuation with ASCII equivalents
Em-dashes (U+2014), en-dashes (U+2013), and arrow glyphs (U+2192,
U+2194) leaked into commit messages and the cover letter. Linux
kernel patches are expected to be plain ASCII. Substitute:
  --  for em-dash
  -   for en-dash
  -> for rightward arrow
  <-> for left-right arrow

Applied to both staging-prep-series/ (Mobian paths) and
staging-prep-series-danctnix/ (drivers/staging/bes2600/ paths).
checkpatch.pl --no-tree --strict: 0/0/0 on all 12 patches.
2026-04-22 17:15:28 +02:00
test0r 0de9c4898e UPSTREAM.md: document danctnix codeberg submission route
Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
2026-04-22 14:29:00 +02:00
test0r a677ac0404 Add danctnix-layout patch series (drivers/staging/bes2600/)
Danctnix is the de-facto upstream for PineTab2 Arch Linux ARM images and
carries the bes2600 driver in-tree at drivers/staging/bes2600/ in
codeberg.org/DanctNIX/linux-pinetab2 (tag v6.19.10-danctnix1).

Same 6 commits as the Mobian series (staging-prep-series/), regenerated
with paths rooted at drivers/staging/bes2600/ so 'git am' applies
cleanly onto a fresh v6.19.10-danctnix1 clone with no path mangling.
Per-patch content is byte-identical to the Mobian series; the
commit-message bodies are preserved. checkpatch.pl --no-tree --strict
passes for all six.

UPSTREAM.md extended with a 'Near-term alt: danctnix linux-pinetab2
(codeberg)' section covering the submission route (codeberg fork +
PR, or Danct12-direct).

Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
2026-04-22 14:28:37 +02:00
test0r f8107ee6cc Upstream submission prep: UPSTREAM.md + 6-patch linear series with cover letter
UPSTREAM.md captures the submission-ready state:
  - patch-by-patch intent and testing status
  - CW1200 lineage narrative
  - branch-to-patch mapping on marfrit/bes2600-dkms
  - submission routes (near-term Mobian MR, longer-term linux-wireless
    RFC for drivers/staging/)
  - known limitations left for follow-up
  - recommended CC list for a future linux-wireless RFC

patches/staging-prep-series/ contains the linear 6-patch series with
cover letter, generated from the bes2600/staging-prep-series branch on
marfrit/bes2600-dkms (cherry-picked off mobian in dependency order).
All patches checkpatch.pl --no-tree --strict clean.

Branch mapping:
  1/6 bes2600/factory-request-firmware        (c1)
  2/6 bes2600/factory-no-efuse-flag           (c5, stacked on c1)
  3/6 bes2600/factory-thread-dev              (c1.1, stacked on c1+c5)
  4/6 bes2600/pm-gate-on-handshake            (c2, standalone)
  5/6 bes2600/remove-chardev-user-interface   (c3, standalone)
  6/6 bes2600/enable-testmode                 (c4, standalone)

Total: 79 insertions, 549 deletions. Net -470 lines.

Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
2026-04-22 14:17:27 +02:00
test0r 806f4948cb patches: add c1.1 (thread struct device * through factory request_firmware) 2026-04-22 13:27:01 +02:00
test0r 977704da4a patches: add c4 (enable CONFIG_BES2600_TESTMODE + fix bit-rot)
Fifth and (for now) final patch in the BESser staging-prep series.

  enable-testmode/
    0001-bes2600-enable-CONFIG_BES2600_TESTMODE-by-default-fi.patch

Flips the CONFIG_BES2600_TESTMODE Makefile default from n to y, which
exposes the mac80211 testmode_cmd surface (-> firmware
patch_wifi_testMode) through the standard nl80211 testmode interface.
This is the replacement path for the /dev/bes2600 signal/no-signal
switching that the preceding c3 patch removed.

Enabling the flag exposes accumulated bit-rot in the testmode code:
~41 calls to bes2600_info/err/warn/dbg/err_with_cond which have no
corresponding #define anywhere in-tree, plus 3 functions
(bes2600_start_stop_tsm, bes2600_get_tsm_params, bes2600_get_roam_delay)
with external linkage but no prototypes. Both classes of error are
fixed in the same commit:

  - Add shim macros to bes_log.h rewiring bes2600_info() etc to the
    existing bes_info() / bes_err() / bes_warn() / bes_devel() family,
    ignoring the legacy BES2600_DBG_* subsystem-id first argument.
  - Define BES2600_DBG_SBUS / _DOWNLOAD / _ITP / _TEST_MODE as 0
    constants for documentation and grep-ability.
  - Mark the 3 TSM / roam-delay helpers static (they are only called
    from bes2600_testmode_cmd in the same file).

Verified on PineTab2 (BES2600WM + RK3566) running linux-pinetab2
6.19.10-danctnix1-1 + CONFIG_NL80211_TESTMODE=y:
- Module builds cleanly
- 'iw phy0' lists 'testmode' under Supported commands
- wifi stays associated post-reboot; bug #2 (PM handshake timeout)
  and bug #3 (SDIO TX splat) counts remain 0 across the c1+c5+c2+c3+c4
  stack

Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
2026-04-22 13:14:33 +02:00
test0r 159a0c3f80 patches: add c3 (remove userspace /dev/bes2600 cdev interface)
Fourth stacked patch in the BESser staging-prep series.

  remove-chardev-user-interface/
    0001-bes2600-remove-userspace-dev-bes2600-character-devic.patch

519-line deletion of the /dev/bes2600 char-device surface:

  - open/read/write/release fops and the bes2600_chardev_fops instance
  - bes2600_op_* command handlers + bes2600_op_map_tab dispatcher
  - bes2600_get_cmd_and_ifname / bes2600_recyle_cmd_and_ifname_mem
    string helpers
  - bes2600_load_uevent + its call site in
    bes2600_chrdev_wifi_force_close_work
  - cdev_add / device_create / class_create in bes2600_chrdev_init +
    fail label unwind
  - cdev_del / device_destroy / class_destroy in bes2600_chrdev_free
  - cdev/dev_id/major/minor/class/device fields in struct bes_cdev

Keeps: all in-kernel accessor functions (bes2600_chrdev_is_signal_mode
and friends), the fw_type module parameter, DPD management,
wifi_force_close kernel path (minus the userspace uevent), bus-probe
state machine.

Branch: bes2600/remove-chardev-user-interface (standalone off mobian).
Verified on PineTab2 running linux-pinetab2 6.19.10-danctnix1-1:
loaded bes2600 module is c3's (srcversion 162611C4...),
/dev/bes2600 is absent, WiFi continues to associate, bug #2 (PM
timeout) and bug #3 (SDIO TX splat) remain silenced post-reboot.

Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
2026-04-22 13:01:54 +02:00
test0r 2143360c25 patches: restructure into topic-branch subdirs; add c2 pm-gate
patches/ now mirrors the topic-branch structure on
marfrit/bes2600-dkms:

  factory-series/            = bes2600/factory-no-efuse-flag (c1 + c5 stacked)
    0001-*-request_firmware-*.patch     = c1 (request_firmware() read path)
    0002-*-STANDARD_FACTORY_EFUSE_FLAG-*.patch = c5 (default flag off)

  pm-gate-on-handshake/      = bes2600/pm-gate-on-handshake (c2 standalone off mobian)
    0001-*-gate-device-LP-mode-entry-*.patch  = c2 (gate + ETIMEDOUT)

c1 + c5 are stacked because c5's fix depends on c1's rewrite of
factory_section_read_file() having been applied first (otherwise the
parse-fail error is masked).

c2 is standalone because bes_pwr.c is orthogonal to the factory/
request_firmware work; it can be submitted independently.

All three patches verified on PineTab2 (BES2600WM + RK3566) running
linux-pinetab2 6.19.10-danctnix1-1. Bug #1 (factory.txt read path),
bug #1.5 (parse fail), bug #2 (PM handshake timeout spam) all resolved
by this series. Bug #3 (SDIO TX WARN) is reduced to a single boot-time
event that does not cascade.

Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
2026-04-22 12:47:08 +02:00
test0r 72e517ffe1 patches: add c5 (STANDARD_FACTORY_EFUSE_FLAG=n) to the series
Regenerates patches/ as a proper series off marfrit/bes2600-dkms:mobian:

  0001-bes2600-use-request_firmware-for-factory.txt-read.patch  (c1)
  0002-bes2600-default-STANDARD_FACTORY_EFUSE_FLAG-off-for-.patch (c5)

c5 covers two changes in a single commit:

  - Makefile: STANDARD_FACTORY_EFUSE_FLAG default flip from y to n
    (the PineTab2 shipped factory.txt has no ##select_efuse_flag
    section, so the driver was expecting 31 sscanf fields and failing
    on the 30-field file).

  - wsm.h: drop the #if defined(STANDARD_FACTORY_EFUSE_FLAG) guard
    around the wsm_save_factory_txt_to_mcu() prototype. The function
    definition in wsm.c and the call site in sta.c were always ungated,
    so with the new flag default gcc -Werror=missing-prototypes would
    otherwise break the build.

Both patches verified on PineTab2 (BES2600WM + RK3566) running
linux-pinetab2 6.19.10-danctnix1-1: post-reboot dmesg no longer shows
the factory-read or factory-parse error sequence.

Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
2026-04-22 12:34:38 +02:00
test0r e580126d84 Initial: BESser umbrella for BES2600 driver mainlining
Sets up the BES2600 mainlining work tree with:

- README: project overview, hardware target, driver lineage
  (CW1200 -> Bestechnic -> arjan-vlek -> Mobian/danctnix), patch series
  status, repo map, build/deploy workflow.

- patches/: c1 patch generated by git format-patch from
  marfrit/bes2600-dkms branch bes2600/factory-request-firmware
  (checkpatch.pl --no-tree --strict: 0 errors / 0 warnings / 0 checks).

- scripts/: build-bes2600-on-ohm.sh, deploy-c1-to-ohm.sh,
  backup-ohm-kernel.sh - reproducible build + deploy + backup.

- fw-analysis/: per-blob strings.txt + fnnames.txt extracted from the
  4 firmware blobs pulled from ohm 2026-04-21. Source binaries NOT
  committed (Bestechnic-proprietary).

- notes/: observed-bugs.md (4 known bug surfaces with file:line +
  patch-series cross-reference), source-map.md (every public driver
  source variant + their canonical role).

Companion work tree: marfrit/bes2600-dkms (Mobian DKMS fork) at
git.reauktion.de.

Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
2026-04-22 10:13:23 +02:00