xref: /wlan-dirver/qca-wifi-host-cmn/target_if/cfr/inc/target_if_cfr_dbr.h (revision 6f88e8eede80c64f1d954f6b1016f9cc087b8b2a)
1 /*
2  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _TARGET_IF_CFR_DBR_H_
20 #define _TARGET_IF_CFR_DBR_H_
21 
22 #define STREAMFS_MAX_SUBBUF_8S 8500
23 #define STREAMFS_NUM_SUBBUF_8S 255
24 
25 /* Values used for computing number of tones */
26 #define TONES_IN_20MHZ  256
27 #define TONES_IN_40MHZ  512
28 #define TONES_IN_80MHZ  1024
29 #define TONES_IN_160MHZ 2048 /* 160 MHz isn't supported yet */
30 #define TONES_INVALID   0
31 
32 #ifdef WLAN_CFR_DBR
33 /**
34  * cfr_dbr_init_pdev() - Inits cfr pdev and registers necessary handlers.
35  * @psoc: pointer to psoc object
36  * @pdev: pointer to pdev object
37  *
38  * Return: Registration status for necessary handlers
39  */
40 QDF_STATUS cfr_dbr_init_pdev(struct wlan_objmgr_psoc *psoc,
41 			     struct wlan_objmgr_pdev *pdev);
42 
43 /**
44  * cfr_dbr_deinit_pdev() - De-inits corresponding pdev and handlers.
45  * @psoc: pointer to psoc object
46  * @pdev: pointer to pdev object
47  *
48  * Return: De-registration status for necessary handlers
49  */
50 QDF_STATUS cfr_dbr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
51 			       struct wlan_objmgr_pdev *pdev);
52 #else
53 static inline
54 QDF_STATUS cfr_dbr_init_pdev(struct wlan_objmgr_psoc *psoc,
55 			     struct wlan_objmgr_pdev *pdev)
56 {
57 	return QDF_STATUS_E_NOSUPPORT;
58 }
59 
60 static inline
61 QDF_STATUS cfr_dbr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
62 			       struct wlan_objmgr_pdev *pdev)
63 {
64 	return QDF_STATUS_E_NOSUPPORT;
65 }
66 #endif
67 #endif
68 
69