GNU Linux-libre 4.19.245-gnu1
[releases.git] / drivers / staging / rtlwifi / core.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2009-2012  Realtek Corporation.
5  *
6  * Contact Information:
7  * wlanfae <wlanfae@realtek.com>
8  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
9  * Hsinchu 300, Taiwan.
10  *
11  * Larry Finger <Larry.Finger@lwfinger.net>
12  *
13  *****************************************************************************/
14
15 #ifndef __RTL_CORE_H__
16 #define __RTL_CORE_H__
17
18 #define RTL_SUPPORTED_FILTERS           \
19         (FIF_ALLMULTI | FIF_CONTROL | \
20         FIF_OTHER_BSS | \
21         FIF_FCSFAIL | \
22         FIF_BCN_PRBRESP_PROMISC)
23
24 #define DM_DIG_THRESH_HIGH              40
25 #define DM_DIG_THRESH_LOW               35
26 #define DM_FALSEALARM_THRESH_LOW        400
27 #define DM_FALSEALARM_THRESH_HIGH       1000
28
29 #define DM_DIG_MAX                      0x3e
30 #define DM_DIG_MIN                      0x1e
31 #define DM_DIG_MAX_AP                   0x32
32 #define DM_DIG_BACKOFF_MAX              12
33 #define DM_DIG_BACKOFF_MIN              -4
34 #define DM_DIG_BACKOFF_DEFAULT          10
35
36 enum cck_packet_detection_threshold {
37         CCK_PD_STAGE_LOWRSSI = 0,
38         CCK_PD_STAGE_HIGHRSSI = 1,
39         CCK_FA_STAGE_LOW = 2,
40         CCK_FA_STAGE_HIGH = 3,
41         CCK_PD_STAGE_MAX = 4,
42 };
43
44 enum dm_dig_ext_port_alg_e {
45         DIG_EXT_PORT_STAGE_0 = 0,
46         DIG_EXT_PORT_STAGE_1 = 1,
47         DIG_EXT_PORT_STAGE_2 = 2,
48         DIG_EXT_PORT_STAGE_3 = 3,
49         DIG_EXT_PORT_STAGE_MAX = 4,
50 };
51
52 enum dm_dig_connect_e {
53         DIG_STA_DISCONNECT,
54         DIG_STA_CONNECT,
55         DIG_STA_BEFORE_CONNECT,
56         DIG_MULTISTA_DISCONNECT,
57         DIG_MULTISTA_CONNECT,
58         DIG_AP_DISCONNECT,
59         DIG_AP_CONNECT,
60         DIG_AP_ADD_STATION,
61         DIG_CONNECT_MAX
62 };
63
64 extern const struct ieee80211_ops rtl_ops;
65 void rtl_fw_cb(const struct firmware *firmware, void *context);
66 void rtl_wowlan_fw_cb(const struct firmware *firmware, void *context);
67 bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb);
68 bool rtl_btc_status_false(void);
69 void rtl_dm_diginit(struct ieee80211_hw *hw, u32 cur_igval);
70
71 #endif