1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
4 * Copyright(c) 2009-2012 Realtek Corporation.
7 * wlanfae <wlanfae@realtek.com>
8 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
11 * Larry Finger <Larry.Finger@lwfinger.net>
13 *****************************************************************************/
15 #ifndef __RTL_CORE_H__
16 #define __RTL_CORE_H__
18 #define RTL_SUPPORTED_FILTERS \
19 (FIF_ALLMULTI | FIF_CONTROL | \
22 FIF_BCN_PRBRESP_PROMISC)
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
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
36 enum cck_packet_detection_threshold {
37 CCK_PD_STAGE_LOWRSSI = 0,
38 CCK_PD_STAGE_HIGHRSSI = 1,
40 CCK_FA_STAGE_HIGH = 3,
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,
52 enum dm_dig_connect_e {
55 DIG_STA_BEFORE_CONNECT,
56 DIG_MULTISTA_DISCONNECT,
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);