xref: /wlan-driver/qca-wifi-host-cmn/umac/mlme/include/wlan_pdev_mlme.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
6*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
7*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*5113495bSYour Name  */
17*5113495bSYour Name 
18*5113495bSYour Name /**
19*5113495bSYour Name  * DOC: Define PDEV MLME structure and APIs
20*5113495bSYour Name  */
21*5113495bSYour Name #ifndef _WLAN_PDEV_MLME_H_
22*5113495bSYour Name #define _WLAN_PDEV_MLME_H_
23*5113495bSYour Name 
24*5113495bSYour Name #include <qdf_timer.h>
25*5113495bSYour Name #include <include/wlan_vdev_mlme.h>
26*5113495bSYour Name #include <wlan_ext_mlme_obj_types.h>
27*5113495bSYour Name 
28*5113495bSYour Name /**
29*5113495bSYour Name  * struct pdev_restart_attr - Pdev restart attributes
30*5113495bSYour Name  * @vdev: vdev on which the pdev restart cmd was enqueued
31*5113495bSYour Name  * @restart_bmap: Bitmap for vdev requesting multivdev restart
32*5113495bSYour Name  */
33*5113495bSYour Name struct pdev_restart_attr {
34*5113495bSYour Name 	struct wlan_objmgr_vdev *vdev;
35*5113495bSYour Name 	qdf_bitmap(restart_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
36*5113495bSYour Name };
37*5113495bSYour Name 
38*5113495bSYour Name /**
39*5113495bSYour Name  * struct pdev_mlme_obj -  PDEV MLME component object
40*5113495bSYour Name  * @pdev:                  PDEV object
41*5113495bSYour Name  * @ext_pdev_ptr:          PDEV MLME legacy pointer
42*5113495bSYour Name  * @mlme_register_ops:     Call back to register MLME legacy APIs
43*5113495bSYour Name  * @vdev_restart_lock:     Lock for VDEVs restart
44*5113495bSYour Name  * @restart_req_timer:     Timer handle for VDEVs restart
45*5113495bSYour Name  * @restart_pend_vdev_bmap: Bitmap for VDEV RESTART command pending
46*5113495bSYour Name  * @restart_send_vdev_bmap: Bitmap for VDEV RESTART command sending
47*5113495bSYour Name  * @start_send_vdev_arr:   Bitmap for VDEV START command sending
48*5113495bSYour Name  * @pdev_restart: Pdev restart attributes structure
49*5113495bSYour Name  * @multivdev_restart_wait_cnt: multi vdev restart wait counter
50*5113495bSYour Name  */
51*5113495bSYour Name struct pdev_mlme_obj {
52*5113495bSYour Name 	struct wlan_objmgr_pdev *pdev;
53*5113495bSYour Name 	mlme_pdev_ext_t *ext_pdev_ptr;
54*5113495bSYour Name 	QDF_STATUS (*mlme_register_ops)(struct vdev_mlme_obj *vdev_mlme);
55*5113495bSYour Name 	qdf_spinlock_t vdev_restart_lock;
56*5113495bSYour Name 	qdf_timer_t restart_req_timer;
57*5113495bSYour Name 	qdf_bitmap(restart_pend_vdev_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
58*5113495bSYour Name 	qdf_bitmap(restart_send_vdev_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
59*5113495bSYour Name 	qdf_bitmap(start_send_vdev_arr, WLAN_UMAC_PSOC_MAX_VDEVS);
60*5113495bSYour Name 	struct pdev_restart_attr pdev_restart;
61*5113495bSYour Name 	qdf_atomic_t multivdev_restart_wait_cnt;
62*5113495bSYour Name };
63*5113495bSYour Name 
64*5113495bSYour Name #ifdef MOBILE_DFS_SUPPORT
65*5113495bSYour Name static inline
wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev * pdev)66*5113495bSYour Name bool wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev *pdev)
67*5113495bSYour Name {
68*5113495bSYour Name 	return false;
69*5113495bSYour Name }
70*5113495bSYour Name #else
71*5113495bSYour Name bool wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev *pdev);
72*5113495bSYour Name #endif /* MOBILE_DFS_SUPPORT */
73*5113495bSYour Name #endif
74