18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/* Copyright(c) 2009-2012  Realtek Corporation.*/
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef	__RTL_92S_DM_H__
58c2ecf20Sopenharmony_ci#define __RTL_92S_DM_H__
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cienum dm_dig_alg {
88c2ecf20Sopenharmony_ci	DIG_ALGO_BY_FALSE_ALARM = 0,
98c2ecf20Sopenharmony_ci	DIG_ALGO_BY_RSSI	= 1,
108c2ecf20Sopenharmony_ci	DIG_ALGO_BEFORE_CONNECT_BY_RSSI_AND_ALARM = 2,
118c2ecf20Sopenharmony_ci	DIG_ALGO_BY_TOW_PORT = 3,
128c2ecf20Sopenharmony_ci	DIG_ALGO_MAX
138c2ecf20Sopenharmony_ci};
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cienum dm_dig_two_port_alg {
168c2ecf20Sopenharmony_ci	DIG_TWO_PORT_ALGO_RSSI = 0,
178c2ecf20Sopenharmony_ci	DIG_TWO_PORT_ALGO_FALSE_ALARM = 1,
188c2ecf20Sopenharmony_ci};
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_cienum dm_dig_dbg {
218c2ecf20Sopenharmony_ci	DM_DBG_OFF = 0,
228c2ecf20Sopenharmony_ci	DM_DBG_ON = 1,
238c2ecf20Sopenharmony_ci	DM_DBG_MAX
248c2ecf20Sopenharmony_ci};
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_cienum dm_dig_sta {
278c2ecf20Sopenharmony_ci	DM_STA_DIG_OFF = 0,
288c2ecf20Sopenharmony_ci	DM_STA_DIG_ON,
298c2ecf20Sopenharmony_ci	DM_STA_DIG_MAX
308c2ecf20Sopenharmony_ci};
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_cienum dm_ratr_sta {
338c2ecf20Sopenharmony_ci	DM_RATR_STA_HIGH = 0,
348c2ecf20Sopenharmony_ci	DM_RATR_STA_MIDDLEHIGH = 1,
358c2ecf20Sopenharmony_ci	DM_RATR_STA_MIDDLE = 2,
368c2ecf20Sopenharmony_ci	DM_RATR_STA_MIDDLELOW = 3,
378c2ecf20Sopenharmony_ci	DM_RATR_STA_LOW = 4,
388c2ecf20Sopenharmony_ci	DM_RATR_STA_ULTRALOW = 5,
398c2ecf20Sopenharmony_ci	DM_RATR_STA_MAX
408c2ecf20Sopenharmony_ci};
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci#define DM_TYPE_BYFW			0
438c2ecf20Sopenharmony_ci#define DM_TYPE_BYDRIVER		1
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#define	TX_HIGH_PWR_LEVEL_NORMAL	0
468c2ecf20Sopenharmony_ci#define	TX_HIGH_PWR_LEVEL_LEVEL1	1
478c2ecf20Sopenharmony_ci#define	TX_HIGH_PWR_LEVEL_LEVEL2	2
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci#define	HAL_DM_DIG_DISABLE		BIT(0)	/* Disable Dig */
508c2ecf20Sopenharmony_ci#define	HAL_DM_HIPWR_DISABLE		BIT(1)	/* Disable High Power */
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci#define	TX_HIGHPWR_LEVEL_NORMAL		0
538c2ecf20Sopenharmony_ci#define	TX_HIGHPWR_LEVEL_NORMAL1	1
548c2ecf20Sopenharmony_ci#define	TX_HIGHPWR_LEVEL_NORMAL2	2
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define	TX_POWER_NEAR_FIELD_THRESH_LVL2	74
578c2ecf20Sopenharmony_ci#define	TX_POWER_NEAR_FIELD_THRESH_LVL1	67
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci#define	DM_DIG_HIGH_PWR_THRESH_HIGH	75
608c2ecf20Sopenharmony_ci#define	DM_DIG_HIGH_PWR_THRESH_LOW	70
618c2ecf20Sopenharmony_ci#define	DM_DIG_MIN_NETCORE		0x12
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_civoid rtl92s_dm_watchdog(struct ieee80211_hw *hw);
648c2ecf20Sopenharmony_civoid rtl92s_dm_init(struct ieee80211_hw *hw);
658c2ecf20Sopenharmony_civoid rtl92s_dm_init_edca_turbo(struct ieee80211_hw *hw);
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#endif
68