Commit Graph

5 Commits

Author SHA1 Message Date
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