Compare commits

..

6 Commits

Author SHA1 Message Date
test0r 0ec58c0ad5 bes2600: Patch C2 — replace ieee80211_rx_irqsafe with ieee80211_rx_ni
Per Phase 4 plan PR #14 + kerneldoc audit (Task #19).  Six call sites
deferred per-RX-frame mac80211 dispatch via tasklet; replace with the
synchronous-from-process-context API ieee80211_rx_ni() which does its
own local_bh_disable wrap.

Why _ni and not _list:

  Phase 4 plan originally targeted ieee80211_rx_list for batch
  delivery.  Mining mt76 mainline (the only driver using _list)
  showed the canonical pattern requires threading a struct list_head
  through the per-frame call chain.  bes2600s WSM dispatcher
  (wsm_handle_rx -> bes2600_rx_cb / wsm.c beacon path) sits between
  the bh threads SDIO read and the mac80211 hand-off; threading a
  list_head through the dispatcher is a non-trivial refactor.
  ieee80211_rx_ni() is the simpler drop-in: no list management, still
  removes the tasklet hop.  Per-call local_bh_disable cost is trivial
  vs the saved tasklet schedule.  Future refactor can revisit _list
  if measurements warrant.

Sites converted:

  - ap.c:96       (bes2600_sta_add link-id rx_queue drain on AP-mode
                   STA add).  Was inside spin_lock_bh(&ps_state_lock);
                   refactored to splice the queue under the lock then
                   deliver after unlock — _ni runs the synchronous
                   mac80211 RX path inline, would otherwise hold the
                   lock across mac80211 dispatch.  splice via
                   skb_queue_splice_init into a local sk_buff_head.
  - sta.c:1487    (deauth-frame inject in inactivity-event handler).
                   Not under any lock; direct conversion.
  - txrx.c:1960   (early-data + pm_unsupported branch from Patch E).
  - txrx.c:1967   (early-data + LINK_SOFT-not-set branch).
  - txrx.c:1971   (normal RX path in bes2600_rx_cb).
  - wsm.c:2415    (beacon delivery in scan-complete WSM handler).
                   beacon SKB ownership is preserved by the existing
                   skb_copy(beacon, GFP_ATOMIC) -> beacon_bkp pattern;
                   no lifecycle change needed.

Mixing constraint (kerneldoc include/net/mac80211.h:5399-5430):
ieee80211_rx_ni() cannot mix with ieee80211_rx_irqsafe() for a
single hardware.  All 6 sites convert atomically; no mixed state.

Build verified clean on ohm sandbox: srcversion 619A51E61BF5479AAC146E6.

Predicted Phase 7 delta: +5-15% over v3+D+E baseline (2.35 MB/s mean
on v3 alone; D+E single-rep was 3.22 MB/s).  Modest improvement
expected from removing the tasklet schedule per RX frame.  Smaller
deltas would still be a net win for upstream-cleanliness — the
kernel.org submission story benefits from not using _irqsafe from
process context.
2026-05-08 06:40:00 +02:00
marfrit 42fd0ceab6 bes2600: Patch E — skip ps_state_lock when PSM-known-disabled (#8) 2026-05-07 22:31:45 +00:00
test0r 4be43770fd bes2600: Patch E — skip ps_state_lock when PSM-known-disabled
Per the Opus structural critique (PR #8 §2.4) and Sonnet review item 5.
The per-RX-frame early-data path takes ps_state_lock to double-check
whether a link entry transitioned to BES2600_LINK_SOFT (AP-side
power-save state machine, soft-link transition).

When c7 has latched pm_unsupported = true (firmware does not honor
PSM, see feedback_bes2600_firmware_no_psm memory), the AP power-save
state machine is dead and link entries never transition to LINK_SOFT.
The per-frame spin_lock_bh + double-check is wasted work.

This patch gates the lock acquisition on !pm_unsupported.  When the
latch is on (the steady state on the production-shipped bes2600
firmware), early_data RX frames bypass the spin_lock_bh and go
directly to ieee80211_rx_irqsafe.

If a future firmware drop fixes PSM, c7 self-clears pm_unsupported on
the first real PM_INDICATION and the locked path resumes.

Scope is narrower than Sonnet originally framed: only the per-RX-frame
hot path (txrx.c:1945-1951 in cleanups+G+D) is touched.  Other
ps_state_lock sites in txrx.c (lines 657, 1256, 1420, 1528) are TX
submission / multicast-start / link-id paths, not per-frame RX, and
not on the Bug #5 hot path.  Leave those alone.

Build verified: srcversion B5922B4933590F33207EE97 on ohm sandbox.
2026-05-08 00:22:14 +02:00
marfrit 3dbabf3092 bes2600: Patch D — atomicize ba_lock counters, drop the spinlock (#7) 2026-05-07 22:19:53 +00:00
marfrit 25c0ed8c57 bes2600: Patch G — restore SPDX + ST-Ericsson attribution chain (#6) 2026-05-07 22:11:14 +00:00
test0r 8dd79199f8 bes2600: Patch G — restore SPDX identifiers + ST-Ericsson attribution
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.
2026-05-08 00:03:50 +02:00
48 changed files with 264 additions and 304 deletions
+16 -8
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* mac80211 STA and AP API for mac80211 BES2600 drivers * AP mode for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include "bes2600.h" #include "bes2600.h"
@@ -65,8 +62,11 @@ int bes2600_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct bes2600_vif *priv = cw12xx_get_vif_from_ieee80211(vif); struct bes2600_vif *priv = cw12xx_get_vif_from_ieee80211(vif);
struct bes2600_link_entry *entry; struct bes2600_link_entry *entry;
struct sk_buff *skb; struct sk_buff *skb;
struct sk_buff_head local_drain;
struct bes2600_common *hw_priv = hw->priv; struct bes2600_common *hw_priv = hw->priv;
__skb_queue_head_init(&local_drain);
#ifdef P2P_MULTIVIF #ifdef P2P_MULTIVIF
WARN_ON(priv->if_id == CW12XX_GENERIC_IF_ID); WARN_ON(priv->if_id == CW12XX_GENERIC_IF_ID);
#endif #endif
@@ -95,9 +95,17 @@ int bes2600_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK) IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK)
priv->sta_asleep_mask |= BIT(sta_priv->link_id); priv->sta_asleep_mask |= BIT(sta_priv->link_id);
entry->status = BES2600_LINK_HARD; entry->status = BES2600_LINK_HARD;
while ((skb = skb_dequeue(&entry->rx_queue))) /*
ieee80211_rx_irqsafe(priv->hw, skb); * Patch C2: splice the rx_queue out under the lock then deliver
* after unlock. ieee80211_rx_ni() runs the mac80211 RX path
* synchronously (formerly ieee80211_rx_irqsafe deferred to a
* tasklet); calling it from inside spin_lock_bh would hold the
* lock across mac80211's full RX dispatch.
*/
skb_queue_splice_init(&entry->rx_queue, &local_drain);
spin_unlock_bh(&priv->ps_state_lock); spin_unlock_bh(&priv->ps_state_lock);
while ((skb = __skb_dequeue(&local_drain)))
ieee80211_rx_ni(priv->hw, skb);
#ifdef AP_AGGREGATE_FW_FIX #ifdef AP_AGGREGATE_FW_FIX
hw_priv->connected_sta_cnt++; hw_priv->connected_sta_cnt++;
if(hw_priv->connected_sta_cnt>1) { if(hw_priv->connected_sta_cnt>1) {
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* mac80211 STA and AP API for mac80211 BES2600 drivers * AP mode interface for BES2600 mac80211 driver
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/version.h> #include <linux/version.h>
#ifndef AP_H_INCLUDED #ifndef AP_H_INCLUDED
+4 -7
View File
@@ -1,18 +1,15 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Common private data for BES2600 drivers * Common private data for BES2600 mac80211 driver
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* Based on the mac80211 Prism54 code, which is * Based on the mac80211 Prism54 code, which is
* Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net> * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
* *
* Based on the islsm (softmac prism54) driver, which is: * Based on the islsm (softmac prism54) driver, which is
* Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al. * Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_H #ifndef BES2600_H
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Factory calibration loader for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/module.h> #include <linux/module.h>
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * Factory calibration loader interface
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef __FACTORY_H__ #ifndef __FACTORY_H__
#define __FACTORY_H__ #define __FACTORY_H__
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * Platform data for BES2600 SDIO bus
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_PLAT_H_INCLUDED #ifndef BES2600_PLAT_H_INCLUDED
#define BES2600_PLAT_H_INCLUDED #define BES2600_PLAT_H_INCLUDED
+7 -6
View File
@@ -1,12 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 SDIO driver for BES2600 device * SDIO bus glue for BES2600 mac80211 driver
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Derived from drivers/net/wireless/st/cw1200/cw1200_sdio.c
* Copyright (c) 2010, ST-Ericsson
* Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
* *
* Copyright (c) 2010, Bestechnic
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#define DEBUG 1 #define DEBUG 1
#include <linux/version.h> #include <linux/version.h>
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Character device for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include<linux/module.h> #include<linux/module.h>
#include <linux/init.h> #include <linux/init.h>
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * Character device interface for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef __BES_CHARDEV_H__ #ifndef __BES_CHARDEV_H__
#define __BES_CHARDEV_H__ #define __BES_CHARDEV_H__
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Firmware download for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include "bes_fw_common.h" #include "bes_fw_common.h"
#include "bes2600.h" #include "bes2600.h"
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Firmware download common code for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include "bes_fw_common.h" #include "bes_fw_common.h"
#include "bes_log.h" #include "bes_log.h"
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * Firmware download common interface
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef __BES_FW_COMMON_H__ #ifndef __BES_FW_COMMON_H__
#define __BES_FW_COMMON_H__ #define __BES_FW_COMMON_H__
+7
View File
@@ -1,3 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* printk wrappers for BES2600
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
*
*/
extern struct device *global_dev; extern struct device *global_dev;
#ifdef CONFIG_BES2600_ENABLE_DEVEL_LOGS #ifdef CONFIG_BES2600_ENABLE_DEVEL_LOGS
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * Vendor testmode messages for BES2600
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES_NL80211_TESTMODE_MSG_H #ifndef BES_NL80211_TESTMODE_MSG_H
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Chip-side power state machine for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/list.h> #include <linux/list.h>
#include <linux/pm.h> #include <linux/pm.h>
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * Chip-side power state machine interface
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef __BES_PWR_H__ #ifndef __BES_PWR_H__
#define __BES_PWR_H__ #define __BES_PWR_H__
+6 -6
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Bottom-half thread for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <net/mac80211.h> #include <net/mac80211.h>
#include <linux/kthread.h> #include <linux/kthread.h>
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Device handling thread interface for mac80211 BES2600 drivers * Bottom-half thread interface for BES2600 mac80211 driver
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_BH_H #ifndef BES2600_BH_H
+6 -6
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Debugging interface for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/module.h> #include <linux/module.h>
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* DebugFS code for BES2600 mac80211 driver * Debugging interface for BES2600 mac80211 driver
* *
* Copyright (c) 2011, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_DEBUG_H_INCLUDED #ifndef BES2600_DEBUG_H_INCLUDED
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * BT/WiFi coexistence (ePTA) for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/types.h> #include <linux/types.h>
#include <linux/version.h> #include <linux/version.h>
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * BT/WiFi coexistence interface for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef __EPTA_COEX_H__ #ifndef __EPTA_COEX_H__
#define __EPTA_COEX_H__ #define __EPTA_COEX_H__
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * BT/WiFi coexistence request handling
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * BT/WiFi coexistence request interface
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef EPTA_REQUEST_H #ifndef EPTA_REQUEST_H
#define EPTA_REQUEST_H #define EPTA_REQUEST_H
+6 -6
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Firmware I/O for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/init.h> #include <linux/init.h>
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * Firmware I/O interface for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef FWIO_H_INCLUDED #ifndef FWIO_H_INCLUDED
#define FWIO_H_INCLUDED #define FWIO_H_INCLUDED
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* HT-related code for BES2600 driver * HT capability config for BES2600
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_HT_H_INCLUDED #ifndef BES2600_HT_H_INCLUDED
+6 -6
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Low-level device IO routines for BES2600 drivers * Low-level device I/O for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/types.h> #include <linux/types.h>
+5 -10
View File
@@ -1,17 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Low-level API for mac80211 BES2600 drivers * Low-level device I/O interface for BES2600 mac80211 driver
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
* *
* Based on: * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* UMAC BES2600 driver which is
* Copyright (c) 2010, Bestechnic
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_HWIO_H_INCLUDED #ifndef BES2600_HWIO_H_INCLUDED
+3 -7
View File
@@ -1,13 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* mac80211 glue code for mac80211 BES2600 drivers * ITP (in-band test mode) for BES2600
* ITP code
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/module.h> #include <linux/module.h>
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* ITP code for BES2600 mac80211 driver * ITP interface for BES2600
* *
* Copyright (c) 2011, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_ITP_H_INCLUDED #ifndef BES2600_ITP_H_INCLUDED
+12 -6
View File
@@ -1,12 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Main entry/init for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
*
* Based on the mac80211 Prism54 code, which is
* Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
*
* Based on the islsm (softmac prism54) driver, which is
* Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/module.h> #include <linux/module.h>
+6 -6
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 power management API for BES2600 drivers * Power management for BES2600 mac80211 driver
* *
* Copyright (c) 2011, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/platform_device.h> #include <linux/platform_device.h>
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 power management interface for BES2600 mac80211 drivers * Power management interface for BES2600 mac80211 driver
* *
* Copyright (c) 2011, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef PM_H_INCLUDED #ifndef PM_H_INCLUDED
+6 -6
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* O(1) TX queue with built-in allocator for BES2600 drivers * O(1) TX queue for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <net/mac80211.h> #include <net/mac80211.h>
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* O(1) TX queue with built-in allocator for BES2600 drivers * O(1) TX queue interface for BES2600 mac80211 driver
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_QUEUE_H_INCLUDED #ifndef BES2600_QUEUE_H_INCLUDED
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Common sbus abstraction layer interface for bes2600 wireless driver * Bus abstraction interface for BES2600
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Replaces hwbus.h from drivers/net/wireless/st/cw1200/
* Copyright (c) 2010, ST-Ericsson
* *
* Copyright (c) 2010, Bestechnic
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_SBUS_H #ifndef BES2600_SBUS_H
+6 -6
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Scan implementation for BES2600 mac80211 drivers * Scan implementation for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/sched.h> #include <linux/sched.h>
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Scan interface for BES2600 mac80211 drivers * Scan interface for BES2600 mac80211 driver
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef SCAN_H_INCLUDED #ifndef SCAN_H_INCLUDED
+7 -7
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 STA API for BES2600 drivers * Mac80211 STA API for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
@@ -1484,7 +1484,7 @@ void bes2600_event_handler(struct work_struct *work)
IEEE80211_STYPE_DEAUTH | IEEE80211_FCTL_TODS); IEEE80211_STYPE_DEAUTH | IEEE80211_FCTL_TODS);
deauth->u.deauth.reason_code = WLAN_REASON_DEAUTH_LEAVING; deauth->u.deauth.reason_code = WLAN_REASON_DEAUTH_LEAVING;
deauth->seq_ctrl = 0; deauth->seq_ctrl = 0;
ieee80211_rx_irqsafe(priv->hw, skb); ieee80211_rx_ni(priv->hw, skb);
bes_devel(" Inactivity Deauth Frame sent for MAC SA %pM \t and DA %pM\n", deauth->sa, deauth->da); bes_devel(" Inactivity Deauth Frame sent for MAC SA %pM \t and DA %pM\n", deauth->sa, deauth->da);
queue_work(priv->hw_priv->workqueue, &priv->set_tim_work); queue_work(priv->hw_priv->workqueue, &priv->set_tim_work);
break; break;
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 STA interface for BES2600 mac80211 drivers * Mac80211 STA API interface for BES2600 mac80211 driver
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/version.h> #include <linux/version.h>
#ifndef STA_H_INCLUDED #ifndef STA_H_INCLUDED
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * Test-mode TX loopback for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include "bes2600.h" #include "bes2600.h"
#include "wsm.h" #include "wsm.h"
+3 -6
View File
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Mac80211 driver for BES2600 device * Test-mode TX loopback interface for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef __TX_LOOP_H__ #ifndef __TX_LOOP_H__
#define __TX_LOOP_H__ #define __TX_LOOP_H__
+26 -8
View File
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Datapath implementation for BES2600 mac80211 drivers * Datapath implementation for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <net/mac80211.h> #include <net/mac80211.h>
@@ -1942,15 +1942,33 @@ void bes2600_rx_cb(struct bes2600_vif *priv,
if (unlikely(bes2600_itp_rxed(hw_priv, skb))) if (unlikely(bes2600_itp_rxed(hw_priv, skb)))
consume_skb(skb); consume_skb(skb);
else if (unlikely(early_data)) { else if (unlikely(early_data)) {
/*
* Patch E: when c7 has latched pm_unsupported (firmware
* doesn't honour PSM, see feedback_bes2600_firmware_no_psm),
* AP-side power-save state machine is dead and link entries
* never transition to BES2600_LINK_SOFT. The double-check
* branch under ps_state_lock is unreachable in that case,
* so skip the per-frame lock acquisition entirely and
* deliver to mac80211 directly.
*
* On firmware that does honour PSM (the latch self-clears
* if a real PM_INDICATION ever arrives see c7), this
* predicate flips back to false and the original locked
* path is taken.
*/
if (hw_priv->bes_power.pm_unsupported) {
ieee80211_rx_ni(priv->hw, skb);
} else {
spin_lock_bh(&priv->ps_state_lock); spin_lock_bh(&priv->ps_state_lock);
/* Double-check status with lock held */ /* Double-check status with lock held */
if (entry->status == BES2600_LINK_SOFT) if (entry->status == BES2600_LINK_SOFT)
skb_queue_tail(&entry->rx_queue, skb); skb_queue_tail(&entry->rx_queue, skb);
else else
ieee80211_rx_irqsafe(priv->hw, skb); ieee80211_rx_ni(priv->hw, skb);
spin_unlock_bh(&priv->ps_state_lock); spin_unlock_bh(&priv->ps_state_lock);
}
} else { } else {
ieee80211_rx_irqsafe(priv->hw, skb); ieee80211_rx_ni(priv->hw, skb);
} }
*skb_p = NULL; *skb_p = NULL;
+6 -6
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Datapath interface for BES2600 mac80211 drivers * Datapath interface for BES2600 mac80211 driver
* *
* Copyright (c) 2010, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_TXRX_H #ifndef BES2600_TXRX_H
+3 -6
View File
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* Mac80211 driver for BES2600 device * WiFi testmode commands for BES2600
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Author:
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifdef CONFIG_BES2600_TESTMODE #ifdef CONFIG_BES2600_TESTMODE
#include <net/netlink.h> #include <net/netlink.h>
+7 -8
View File
@@ -1,13 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/* /*
* WSM host interface (HI) implementation for * WSM host interface for BES2600 mac80211 driver
* BES2600 mac80211 drivers.
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#include <linux/skbuff.h> #include <linux/skbuff.h>
@@ -2413,7 +2412,7 @@ int wsm_handle_rx(struct bes2600_common *hw_priv, int id,
if (!hw_priv->beacon_bkp) if (!hw_priv->beacon_bkp)
hw_priv->beacon_bkp = \ hw_priv->beacon_bkp = \
skb_copy(hw_priv->beacon, GFP_ATOMIC); skb_copy(hw_priv->beacon, GFP_ATOMIC);
ieee80211_rx_irqsafe(hw_priv->hw, hw_priv->beacon); ieee80211_rx_ni(hw_priv->hw, hw_priv->beacon);
hw_priv->beacon = hw_priv->beacon_bkp; hw_priv->beacon = hw_priv->beacon_bkp;
hw_priv->beacon_bkp = NULL; hw_priv->beacon_bkp = NULL;
+5 -9
View File
@@ -1,16 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* WSM host interface (HI) interface for BES2600 mac80211 drivers * WSM host interface for BES2600 mac80211 driver
* *
* Copyright (c) 2022, Bestechnic * Copyright (c) 2010, ST-Ericsson
* Author: * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
* *
* Based on BES2600 UMAC WSM API, which is * Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
* Copyright (C) SA 2010
* Author: Stewart Mathers <stewart.mathers@stericsson.com>
* *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef BES2600_WSM_H_INCLUDED #ifndef BES2600_WSM_H_INCLUDED