xref: /wlan-driver/qcacld-3.0/core/mac/inc/sir_types.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2011-2016,2018-2020 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 /*
20  *
21  * This file sir_types.h contains the common types
22  *
23  * Author:    V. K. Kandarpa
24  * Date:      04/12/2002
25  */
26 
27 #ifndef __SIR_TYPES_H
28 #define __SIR_TYPES_H
29 
30 #include <qdf_status.h>
31 #include <qdf_types.h>
32 
33 /**
34  * typedef mac_handle_t - MAC Handle
35  *
36  * Handle to the MAC.  The MAC handle is returned to the HDD from the
37  * UMAC on Open.  The MAC handle is an input to all UMAC function
38  * calls and represents an opaque handle to the UMAC instance that is
39  * tied to the HDD instance
40  *
41  * The UMAC must be able to derive it's internal instance structure
42  * pointer through this handle.
43  */
44 /*
45  * NOTE WELL: struct opaque_mac_handle is not defined anywhere. This
46  * reference is used to help ensure that a mac_handle_t is never used
47  * where a different handle type is expected
48  */
49 struct opaque_mac_handle;
50 typedef struct opaque_mac_handle *mac_handle_t;
51 
52 /**
53  * typedef hdd_handle_t - HDD Handle
54  *
55  * Handle to the HDD.  The HDD handle is given to the UMAC from the
56  * HDD on Open.  The HDD handle is an input to all HDD/PAL function
57  * calls and represents an opaque handle to the HDD instance that is
58  * tied to the UMAC instance
59  *
60  * The HDD must be able to derive it's internal instance structure
61  * pointer through this handle.
62  */
63 /*
64  * NOTE WELL: struct opaque_hdd_handle is not defined anywhere. This
65  * reference is used to help ensure that a hdd_handle_t is never used
66  * where a different handle type is expected
67  */
68 struct opaque_hdd_handle;
69 typedef struct opaque_hdd_handle *hdd_handle_t;
70 
71 #ifndef WLAN_MAX_CLIENTS_ALLOWED
72 #define HAL_NUM_ASSOC_STA           32
73 #define HAL_NUM_STA                 41
74 #else
75 #define HAL_NUM_ASSOC_STA WLAN_MAX_CLIENTS_ALLOWED
76 /*
77  * Sync with OL_TXRX_NUM_LOCAL_PEER_IDS definition.
78  * Each AP will occupy one ID, so it will occupy two IDs for AP-AP mode.
79  * Clients will be assigned max 64 IDs.
80  * STA(associated)/P2P DEV(self-PEER) will get one ID.
81  */
82 #define HAL_NUM_STA (WLAN_MAX_CLIENTS_ALLOWED + 1 + 1 + 1)
83 #endif
84 
85 #endif /* __SIR_TYPES_H */
86