The bes2600 driver is a fork of the upstream cw1200 driver
(drivers/net/wireless/st/cw1200/, ST-Ericsson, Dmitry Tarnyagin
2010-2011). The fork's file headers have three GPL-compliance issues:
1. NO SPDX-License-Identifier on any of 48 source files (cw1200
mainline has them on all 25). kernel.org-mandated since 2017.
2. Original "Copyright (c) 2010, ST-Ericsson" lines stripped from
all files inherited from cw1200, replaced with
"Copyright (c) 2010, Bestechnic" — factually impossible
(Bestechnic did not author the 2010 work) and a GPL-2.0 §1
attribution-preservation violation.
3. The "GPL version 2 as published by the Free Software Foundation"
boilerplate paragraph is redundant alongside SPDX and is the
legacy form modern kernel sources have replaced.
This patch corrects all three for the 48 .c/.h files in bes2600/:
- Adds `// SPDX-License-Identifier: GPL-2.0-only` (or `/* ... */`
for headers) as line 1 of every file.
- Restores `Copyright (c) 2010, ST-Ericsson` + `Author: Dmitry
Tarnyagin <dmitry.tarnyagin@lockless.no>` as the FIRST copyright
chain entry on all 22 files derived from cw1200 (bh.{c,h},
debug.{c,h}, fwio.{c,h}, hwio.{c,h}, main.c, pm.{c,h},
queue.{c,h}, scan.{c,h}, sta.{c,h}, txrx.{c,h}, wsm.{c,h}).
- Keeps `Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.` as
the SECOND chain entry where Bestechnic genuinely contributed.
- Notes "Derived from cw1200_sdio.c" + ST-Ericsson copyright on
bes2600_sdio.c (heavy derivation, not a literal rename).
- Notes "Replaces hwbus.h from cw1200/" + ST-Ericsson copyright
on sbus.h.
- Preserves the prism54/islsm authorship chain on main.c and
bes2600.h (Michael Wu 2006 + Jean-Baptiste Note 2004-2006).
- Drops the GPL-2.0 boilerplate paragraph in favour of SPDX.
No code changes — only file-header comment blocks. Module build is
unaffected (verified by header-only diff scope).
This is a prerequisite for any kernel.org submission attempt. The
existing MODULE_LICENSE("GPL") + MODULE_AUTHOR(Tarnyagin@stericsson.com)
declarations were already present and are unchanged here; the
mismatch between MODULE_AUTHOR and the (since-corrected) per-file
copyrights is now resolved.
Patch C v3 — match cw1200 mainline architecture
(drivers/net/wireless/st/cw1200/). Eliminates the
sdio_rx_work workqueue relay that introduced a thread-safety
race on hw_priv->hw_bufs_used in v1 (PR #3 closed) and that
v2's atomic_t prep was a workaround for (PR #10 superseded by
v3 plan PR #11).
Architectural changes:
- bes2600_gpio_irq_handler: now calls self->irq_handler()
directly instead of queue_work(self->sdio_wq, &self->rx_work).
Bumps bh_rx atomic + wakes bh_wq.
- bes2600_bh_rx_helper (BES_SDIO_RX_MULTIPLE_ENABLE branch):
now calls priv->sbus_ops->bus_rx_batch() to do the SDIO read
inline. No pipe_read, no skb_dequeue.
- bes2600_sdio_read_rx_batch (new): the SDIO read sequence
extracted from sdio_rx_work, registered as
sbus_ops->bus_rx_batch. Runs in bh thread context.
- bes2600_sdio_extract_packets: calls
bes2600_bh_handle_rx_skb() directly per parsed SKB. No
skb_queue_tail, no rx_queue.
- bes2600_bh_handle_rx_skb (new in bh.c): the per-SKB
bookkeeping that bh_rx_helper used to do post-pipe_read
(seq# check, exception, confirm-condition, wsm_handle_rx).
Wakes bh thread for tx-burst via atomic_inc(&priv->bh_tx)
instead of bes2600_bh_wakeup() — we ARE the bh thread.
- Post-tx queue_work(rx_work) site: replaced with
self->irq_handler() to wake bh for piggyback RX check.
Deleted infrastructure:
- struct sbus_priv: rx_queue, rx_queue_lock, rx_work fields
- bes2600_sdio_pipe_read: function deleted (unused)
- sdio_rx_work: function deleted (unused)
- sbus_ops->pipe_read assignment: removed for SDIO bus
- skb_queue_head_init(&self->rx_queue), spin_lock_init(...),
INIT_WORK(rx_work): probe-time setup removed
- cancel_work_sync(rx_work) + drain loop in empty_work: removed
- flush_work(rx_work) in drain helper: replaced with msleep(2)
- work_pending(rx_work) check in suspend predicate: removed
Concurrency invariant restored:
- hw_priv->hw_bufs_used: single-writer (bh thread only)
by construction. No atomic_t needed.
- hw_priv->hw_bufs_used_vif[]: ditto.
- hw_priv->wsm_tx_pending[]: ditto.
- All other shared state: unchanged or already protected.
Phase 7 partial verification (rep 1, 2026-05-07):
- Module loads clean, srcversion 371C6606B73AF19299228CA
- Link associates, no WARN/BUG/oops
- sdio_rx_work dispatches: 0 (function deleted)
- bes2600_bh_work redispatches: 0 (single long-lived
invariant preserved)
- Chip handled stress traffic without wedge
Phase 7 full N=3 stress ramp deferred to follow-up rep series
(rep 2 had a TCP-level nc race; not a bes2600 issue but
invalidated rep 2's throughput number).