xref: /wlan-driver/qcacld-3.0/core/mac/src/pe/lim/lim_send_messages.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2011-2019, 2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*
21  *
22  * lim_send_messages.h: Provides functions to send messages or Indications to HAL.
23  * Author:    Sunit Bhatia
24  * Date:       09/21/2006
25  * History:-
26  * Date        Modified by            Modification Information
27  *
28  * --------------------------------------------------------------------------
29  *
30  */
31 #ifndef __LIM_SEND_MESSAGES_H
32 #define __LIM_SEND_MESSAGES_H
33 
34 #include "ani_global.h"
35 #include "lim_types.h"
36 #include "wma_if.h"
37 #include "sir_params.h"
38 QDF_STATUS lim_send_beacon_params(struct mac_context *mac,
39 				     tpUpdateBeaconParams pUpdatedBcnParams,
40 				     struct pe_session *pe_session);
41 /* QDF_STATUS lim_send_beacon_params(struct mac_context *mac, tpUpdateBeaconParams pUpdatedBcnParams); */
42 QDF_STATUS lim_send_mode_update(struct mac_context *mac,
43 				   tUpdateVHTOpMode *tempParam,
44 				   struct pe_session *pe_session);
45 QDF_STATUS lim_send_rx_nss_update(struct mac_context *mac,
46 				     tUpdateRxNss *tempParam,
47 				     struct pe_session *pe_session);
48 
49 QDF_STATUS lim_set_membership(struct mac_context *mac,
50 				 tUpdateMembership *pTempParam,
51 				 struct pe_session *pe_session);
52 
53 QDF_STATUS lim_set_user_pos(struct mac_context *mac,
54 			       tUpdateUserPos *pTempParam,
55 			       struct pe_session *pe_session);
56 
57 /**
58  * lim_send_switch_chnl_params() - change channel
59  * @mac: pointer to Global MAC structure
60  * @session: pe session
61  *
62  * Return: QDF_STATUS
63  */
64 QDF_STATUS lim_send_switch_chnl_params(struct mac_context *mac,
65 				       struct pe_session *session);
66 
67 /**
68  * lim_send_edca_params() - Send edsa params to firmware
69  * @mac: pointer to Global MAC structure
70  * @pUpdatedEdcaParams: updated edca params
71  * @vdev_id: vdev id
72  * @mu_edca: MU edca
73  *
74  * Return: QDF_STATUS
75  */
76 QDF_STATUS lim_send_edca_params(struct mac_context *mac,
77 				tSirMacEdcaParamRecord *pUpdatedEdcaParams,
78 				uint16_t vdev_id, bool mu_edca);
79 /**
80  * lim_set_active_edca_params() - Choose best EDCA parameters
81  * @mac_ctx:  pointer to Global Mac structure.
82  * @edca_params: pointer to the local EDCA parameters
83  * @pe_session: point to the session entry
84  *
85  *  This function is called to set the most up-to-date EDCA parameters
86  *  given the default local EDCA parameters.  The rules are as following:
87  *  - If ACM bit is set for all ACs, then downgrade everything to Best Effort.
88  *  - If ACM is not set for any AC, then PE will use the default EDCA
89  *    parameters as advertised by AP.
90  *  - If ACM is set in any of the ACs, PE will use the EDCA parameters
91  *    from the next best AC for which ACM is not enabled.
92  *
93  * Return: none
94  */
95 void lim_set_active_edca_params(struct mac_context *mac_ctx,
96 				tSirMacEdcaParamRecord *edca_params,
97 				struct pe_session *pe_session);
98 
99 #define CAPABILITY_FILTER_MASK  0x73CF
100 #define ERP_FILTER_MASK         0xF8
101 #define EDCA_FILTER_MASK        0xF0
102 #define QOS_FILTER_MASK         0xF0
103 #define HT_BYTE0_FILTER_MASK    0x0
104 #define HT_BYTE2_FILTER_MASK    0xEB
105 #define HT_BYTE5_FILTER_MASK    0xFD
106 #define DS_PARAM_CHANNEL_MASK   0x0
107 #define VHTOP_CHWIDTH_MASK      0xFC
108 
109 QDF_STATUS lim_send_exclude_unencrypt_ind(struct mac_context *mac,
110 					     bool excludeUnenc,
111 					     struct pe_session *pe_session);
112 QDF_STATUS lim_send_ht40_obss_scanind(struct mac_context *mac_ctx,
113 						struct pe_session *session);
114 void lim_handle_sme_join_result(struct mac_context *,
115 		tSirResultCodes, uint16_t, struct pe_session *);
116 
117 /**
118  * lim_send_edca_pifs_param() - Send edca/pifs param to firmware based on
119  * edca_param_type ini
120  * @mac: pointer to Global Mac structure
121  * @param: pointer to param
122  * @vdev_id: vdev id
123  *
124  * Return: QDF_STATUS
125  */
126 QDF_STATUS
127 lim_send_edca_pifs_param(struct mac_context *mac,
128 			 struct wlan_edca_pifs_param_ie *param,
129 			 uint8_t vdev_id);
130 #endif
131