1 /* 2 * Copyright (c) 2011-2015, 2017-2019, 2021 The Linux Foundation. All rights 3 * reserved. 4 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 5 * 6 * Permission to use, copy, modify, and/or distribute this software for 7 * any purpose with or without fee is hereby granted, provided that the 8 * above copyright notice and this permission notice appear in all 9 * copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 12 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 13 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 14 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 15 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 16 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 17 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 18 * PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21 /* 22 * 23 * Author: Sandesh Goel 24 * Date: 02/25/02 25 * History:- 26 * Date Modified by Modification Information 27 * -------------------------------------------------------------------- 28 * 29 */ 30 31 #ifndef __SCH_API_H__ 32 #define __SCH_API_H__ 33 34 #include "sir_common.h" 35 #include "sir_mac_prot_def.h" 36 37 #include "ani_global.h" 38 39 /* update only the broadcast qos params */ 40 void sch_qos_update_broadcast(struct mac_context *mac, 41 struct pe_session *pe_session); 42 43 /* fill in the default local edca parameter into gLimEdcaParams[] */ 44 void sch_set_default_edca_params(struct mac_context *mac, struct pe_session *pe_session); 45 46 /* update only local qos params */ 47 void sch_qos_update_local(struct mac_context *mac, struct pe_session *pe_session); 48 49 /* update the edca profile parameters based on STA-SAP concurrency */ 50 void sch_qos_concurrency_update(void); 51 52 /* update the edca profile parameters */ 53 void sch_edca_profile_update(struct mac_context *mac, 54 struct pe_session *pe_session); 55 56 /* / Set the fixed fields in a beacon frame */ 57 QDF_STATUS sch_set_fixed_beacon_fields(struct mac_context *mac, 58 struct pe_session *pe_session); 59 60 /** 61 * sch_process_pre_beacon_ind() - Process the PreBeacon Indication from the Lim 62 * @mac: pointer to mac structure 63 * @msg: schedular msg 64 * @reason: beacon update reason 65 * 66 * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE 67 */ 68 QDF_STATUS sch_process_pre_beacon_ind(struct mac_context *mac, 69 struct scheduler_msg *msg, 70 enum sir_bcn_update_reason reason); 71 72 void sch_beacon_process(struct mac_context *mac, uint8_t *pRxPacketInfo, 73 struct pe_session *pe_session); 74 75 QDF_STATUS sch_beacon_edca_process(struct mac_context *mac, 76 tSirMacEdcaParamSetIE *edca, 77 struct pe_session *pe_session); 78 79 void sch_generate_tim(struct mac_context *, uint8_t **, uint16_t *, uint8_t); 80 81 void sch_set_beacon_interval(struct mac_context *mac, 82 struct pe_session *pe_session); 83 84 /** 85 * sch_send_beacon_req() - send beacon update req to wma 86 * @mac_ctx: pointer to mac structure 87 * @bcn_payload: beacon payload 88 * @size: beacon size 89 * @session:pe session 90 * @reason: beacon update reason 91 * 92 * return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE 93 */ 94 QDF_STATUS sch_send_beacon_req(struct mac_context *mac_ctx, uint8_t *bcn_payload, 95 uint16_t size, struct pe_session *session, 96 enum sir_bcn_update_reason reason); 97 98 99 QDF_STATUS lim_update_probe_rsp_template_ie_bitmap_beacon1(struct mac_context *, 100 tDot11fBeacon1 *, 101 struct pe_session * 102 pe_session); 103 void lim_update_probe_rsp_template_ie_bitmap_beacon2(struct mac_context *, 104 tDot11fBeacon2 *, 105 uint32_t *, 106 tDot11fProbeResponse *); 107 void set_probe_rsp_ie_bitmap(uint32_t *, uint32_t); 108 uint32_t lim_send_probe_rsp_template_to_hal(struct mac_context *, 109 struct pe_session *, 110 uint32_t *); 111 112 int sch_gen_timing_advert_frame(struct mac_context *mac, tSirMacAddr self_addr, 113 uint8_t **buf, uint32_t *timestamp_offset, 114 uint32_t *time_value_offset); 115 116 /* 117 * sch_beacon_process_for_ap() - process the beacon frame for AP sessions 118 * @mac_ctx: pointer to the global mac_ctx 119 * @rx_pkt_info: pointer to the frame Rx Meta 120 * @bcn: pointer to the beacon struct 121 * 122 * Process the beacon in the context of any existing AP or BTAP 123 * session. This takes cares of following two scenarios: 124 * - session = NULL: 125 * e.g. beacon received from a neighboring BSS, you want to apply the 126 * protection settings to BTAP/InfraAP beacons 127 * - session is non NULL: 128 * e.g. beacon received is from the INFRA AP to which you are connected 129 * on another concurrent link. In this case also, we want to apply the 130 * protection settings(as advertised by Infra AP) to BTAP beacons 131 * 132 * Return: None 133 */ 134 void sch_beacon_process_for_ap(struct mac_context *mac_ctx, 135 uint8_t session_id, 136 uint8_t *rx_pkt_info, 137 tSchBeaconStruct *bcn); 138 139 /** 140 * sch_edca_profile_update_all() - update edca profile for all sessions 141 * @pmac: pointer to mac structure 142 * 143 * return: None 144 */ 145 void sch_edca_profile_update_all(struct mac_context *pmac); 146 147 #endif 148