8dd79199f8
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.
99 lines
2.9 KiB
C
99 lines
2.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Datapath interface for BES2600 mac80211 driver
|
|
*
|
|
* Copyright (c) 2010, ST-Ericsson
|
|
* Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
|
|
*
|
|
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
|
|
*
|
|
*/
|
|
|
|
#ifndef BES2600_TXRX_H
|
|
#define BES2600_TXRX_H
|
|
|
|
#include <linux/list.h>
|
|
|
|
/* extern */ struct ieee80211_hw;
|
|
/* extern */ struct sk_buff;
|
|
/* extern */ struct wsm_tx;
|
|
/* extern */ struct wsm_rx;
|
|
/* extern */ struct wsm_tx_confirm;
|
|
/* extern */ struct bes2600_txpriv;
|
|
/* extern */ struct bes2600_vif;
|
|
|
|
struct tx_policy {
|
|
union {
|
|
__le32 tbl[3];
|
|
u8 raw[12];
|
|
};
|
|
u8 defined; /* TODO: u32 or u8, profile and select best */
|
|
u8 usage_count; /* --// -- */
|
|
u8 retry_count; /* --// -- */
|
|
u8 uploaded;
|
|
};
|
|
|
|
struct tx_policy_cache_entry {
|
|
struct tx_policy policy;
|
|
struct list_head link;
|
|
};
|
|
|
|
#define TX_POLICY_CACHE_SIZE (8)
|
|
struct tx_policy_cache {
|
|
struct tx_policy_cache_entry cache[TX_POLICY_CACHE_SIZE];
|
|
struct list_head used;
|
|
struct list_head free;
|
|
spinlock_t lock;
|
|
};
|
|
|
|
/* ******************************************************************** */
|
|
/* TX policy cache */
|
|
/* Intention of TX policy cache is an overcomplicated WSM API.
|
|
* Device does not accept per-PDU tx retry sequence.
|
|
* It uses "tx retry policy id" instead, so driver code has to sync
|
|
* linux tx retry sequences with a retry policy table in the device.
|
|
*/
|
|
void tx_policy_init(struct bes2600_common *hw_priv);
|
|
void tx_policy_upload_work(struct work_struct *work);
|
|
|
|
/* ******************************************************************** */
|
|
/* TX implementation */
|
|
|
|
u32 bes2600_rate_mask_to_wsm(struct bes2600_common *hw_priv,
|
|
u32 rates);
|
|
void bes2600_tx(struct ieee80211_hw *dev,
|
|
struct ieee80211_tx_control *control,
|
|
struct sk_buff *skb);
|
|
void bes2600_skb_dtor(struct bes2600_common *hw_priv,
|
|
struct sk_buff *skb,
|
|
const struct bes2600_txpriv *txpriv);
|
|
|
|
/* ******************************************************************** */
|
|
/* WSM callbacks */
|
|
|
|
void bes2600_tx_confirm_cb(struct bes2600_common *hw_priv,
|
|
struct wsm_tx_confirm *arg);
|
|
void bes2600_rx_cb(struct bes2600_vif *priv,
|
|
struct wsm_rx *arg,
|
|
struct sk_buff **skb_p);
|
|
|
|
/* ******************************************************************** */
|
|
/* Timeout */
|
|
|
|
void bes2600_tx_timeout(struct work_struct *work);
|
|
|
|
/* ******************************************************************** */
|
|
/* Security */
|
|
int bes2600_alloc_key(struct bes2600_common *hw_priv);
|
|
void bes2600_free_key(struct bes2600_common *hw_priv, int idx);
|
|
void bes2600_free_keys(struct bes2600_common *hw_priv);
|
|
int bes2600_upload_keys(struct bes2600_vif *priv);
|
|
|
|
/* ******************************************************************** */
|
|
/* Workaround for WFD test case 6.1.10 */
|
|
#if defined(CONFIG_BES2600_USE_STE_EXTENSIONS)
|
|
void bes2600_link_id_reset(struct work_struct *work);
|
|
#endif
|
|
|
|
#endif /* BES2600_TXRX_H */
|