aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/hal/odm_CfoTracking.h
blob: 8fa6d9ec58807c41becaa524fdcb6462ac2f51d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 ******************************************************************************/

#ifndef	__ODMCFOTRACK_H__
#define    __ODMCFOTRACK_H__

#define		CFO_TH_XTAL_HIGH		20		/*  kHz */
#define		CFO_TH_XTAL_LOW			10		/*  kHz */
#define		CFO_TH_ATC			80		/*  kHz */

struct cfo_tracking {
	bool bATCStatus;
	bool largeCFOHit;
	bool bAdjust;
	u8 CrystalCap;
	u8 DefXCap;
	int CFO_tail[2];
	int CFO_ave_pre;
	u32 packetCount;
	u32 packetCount_pre;

	bool bForceXtalCap;
	bool bReset;
};

void ODM_CfoTrackingReset(void *pDM_VOID
);

void ODM_CfoTrackingInit(void *pDM_VOID);

void ODM_CfoTracking(void *pDM_VOID);

void odm_parsing_cfo(void *pDM_VOID, void *pPktinfo_VOID, s8 *pcfotail);

#endif