Commit Graph

17 Commits

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