Compare commits

..

4 Commits

Author SHA1 Message Date
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 247 additions and 298 deletions
+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 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"
+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
+6 -6
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>
+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__
+30 -12
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,13 +1942,31 @@ 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)) {
spin_lock_bh(&priv->ps_state_lock); /*
/* Double-check status with lock held */ * Patch E: when c7 has latched pm_unsupported (firmware
if (entry->status == BES2600_LINK_SOFT) * doesn't honour PSM, see feedback_bes2600_firmware_no_psm),
skb_queue_tail(&entry->rx_queue, skb); * AP-side power-save state machine is dead and link entries
else * 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_irqsafe(priv->hw, skb); ieee80211_rx_irqsafe(priv->hw, skb);
spin_unlock_bh(&priv->ps_state_lock); } else {
spin_lock_bh(&priv->ps_state_lock);
/* Double-check status with lock held */
if (entry->status == BES2600_LINK_SOFT)
skb_queue_tail(&entry->rx_queue, skb);
else
ieee80211_rx_irqsafe(priv->hw, skb);
spin_unlock_bh(&priv->ps_state_lock);
}
} else { } else {
ieee80211_rx_irqsafe(priv->hw, skb); ieee80211_rx_irqsafe(priv->hw, skb);
} }
+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>
+6 -7
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>
+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