Files
bes2600-dkms/bes2600/epta_coex.h
T
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

84 lines
2.7 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* BT/WiFi coexistence interface for BES2600
*
* Copyright (c) 2022, Bestechnic (Beijing) Co., Ltd.
*
*/
#ifndef __EPTA_COEX_H__
#define __EPTA_COEX_H__
#include <linux/types.h>
#include <linux/nl80211.h>
#include "bes2600.h"
#define WIFI_COEX_MODE_FDD_BIT (1<<0)
#define WIFI_COEX_MODE_FDD_HYBRID_BIT (1<<1)
enum bwifi_epta_state {
EPTA_STATE_WIFI_DISCONNECTED = 0,
EPTA_STATE_WIFI_SCANNING = 1,
EPTA_STATE_WIFI_SCAN_COMP = 2,
EPTA_STATE_WIFI_CONNECTING = 3,
EPTA_STATE_WIFI_CONNECTED = 4,
EPTA_STATE_WIFI_GOT_IP = 5,
EPTA_STATE_WIFI_TTS_START = 6,
EPTA_STATE_WIFI_TTS_END = 7,
EPTA_STATE_NUM
};
/* max FREEZE BIT */
#define EPTA_FREEZE_MAX 32
typedef enum {
EPTA_FREEZE_SCANNING = 1 << 0,
EPTA_FREEZE_CONNECTING = 1 << 1,
EPTA_FREEZE_TTS = 1 << 2,
EPTA_FREEZE_THP = 1 << 3,
/* clear all FREEZE BIT */
EPTA_FREEZE_ALL
} EPTA_FREEZE_TYPE_T;
#ifndef COEX_TDD_RSSI_THR
#define COEX_TDD_RSSI_THR (-15)
#endif
#ifndef COEX_FDD_RSSI_THR
#define COEX_FDD_RSSI_THR (-10)
#endif
#define EPTA_PS_WLAN_DURATION (20000)
#define EPTA_PS_BT_DURATION (80000)
#define EPTA_ADJUST_WLAN_DURATION_HIGH (80000)
#define EPTA_ADJUST_WLAN_DURATION_MEDIUM (55000)
#define EPTA_ADJUST_WLAN_DURATION_LOW (40000)
#define EPTA_WLAN_TP_HIGH (4000)
#define EPTA_WLAN_TP_MEDIUM (2000)
#define EPTA_WLAN_TP_LOW (100)
#define EPTA_WLAN_TP_PS (50)
#define EPTA_FREEZE_TDD_PERIOD (102400)
#define EPTA_TDD_CONNECT_WIFI (50000)
#define EPTA_TDD_CONNECT_BT (50000)
int coex_set_epta_params(struct bes2600_common *hw_priv, int wlan_duraiton, int bt_duration, int hw_epta_enable);
void coex_peroid_handle(struct bes2600_common *hw_priv, int connected, int rssi, int channel, uint32_t tp);
void coex_set_bt_state(struct bes2600_common *hw_priv, int state);
void coex_set_wifi_conn(struct bes2600_common *hw_priv, uint8_t connect_status);
void coex_set_epta_tts(struct bes2600_common *hw_priv, uint32_t tts_state);
int coex_init_mode(struct bes2600_common *hw_priv, int coex_mode);
int coex_deinit_mode(struct bes2600_common *hw_priv);
int coex_start(struct bes2600_common *hw_priv);
int coex_stop(struct bes2600_common *hw_priv);
void coex_rssi_update(struct bes2600_common *hw_priv, int rssi, int channel, int connected);
// void coex_band_update(struct bes2600_common *hw_priv, enum nl80211_band band);
bool coex_is_fdd_mode(void);
void coex_set_fdd_mode(bool fdd_mode);
bool coex_is_bt_a2dp(void);
bool coex_is_bt_inactive(void);
bool coex_is_wifi_inactive(void);
#endif