blob: 4e278198bd571701d81ae510a4fecd4a5c1fbb4d [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Abhinav Kumarf9989582018-02-06 17:42:22 +05302 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004 * 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/*
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080020 * This file lim_send_sme_rsp_messages.h contains the definitions for
21 * sending SME response/notification messages to applications above
22 * MAC software.
23 * Author: Chandra Modumudi
24 * Date: 02/11/02
25 * History:-
26 * Date Modified by Modification Information
27 * --------------------------------------------------------------------
28 *
29 */
30#ifndef __LIM_SEND_SME_RSP_H
31#define __LIM_SEND_SME_RSP_H
32
33#include "sir_common.h"
34#include "sir_api.h"
35#include "sir_mac_prot_def.h"
36
37/* Functions for sending responses to Host */
Jeff Johnson9320c1e2018-12-02 13:09:20 -080038void lim_send_sme_rsp(struct mac_context *, uint16_t, tSirResultCodes, uint8_t,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080039 uint16_t);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080040void lim_send_sme_roc_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080041 tSirResultCodes result_code, uint8_t sme_session_id,
42 uint32_t scan_id);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080043void lim_send_sme_start_bss_rsp(struct mac_context *, uint16_t, tSirResultCodes,
Jeff Johnsond7035a32018-11-18 22:03:13 -080044 struct pe_session *, uint8_t, uint16_t);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080045void lim_send_sme_join_reassoc_rsp(struct mac_context *, uint16_t, tSirResultCodes,
Jeff Johnsond7035a32018-11-18 22:03:13 -080046 uint16_t, struct pe_session *, uint8_t, uint16_t);
Vignesh Viswanathan5b909f52018-05-15 20:13:35 +053047
48/*
49 * lim_prepare_disconnect_done_ind() - Prepares the disconnect done ind message
50 * @mac_ctx: Global mac_ctx
51 * @session_id: PE session id
52 * @reason_code: Disconnect indication reason code
53 * @peer_mac_addr: MAC address of the peer
54 *
55 * Prepares the disconnect done indication message to be sent to the upper layer
56 *
57 * Return: QDF Status
58 */
Jeff Johnson9320c1e2018-12-02 13:09:20 -080059QDF_STATUS lim_prepare_disconnect_done_ind(struct mac_context *mac_ctx,
Vignesh Viswanathan5b909f52018-05-15 20:13:35 +053060 uint32_t **msg,
61 uint8_t session_id,
62 tSirResultCodes reason_code,
63 uint8_t *peer_mac_addr);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080064void lim_send_sme_disassoc_ntf(struct mac_context *, tSirMacAddr, tSirResultCodes,
Jeff Johnsond7035a32018-11-18 22:03:13 -080065 uint16_t, uint16_t, uint8_t, uint16_t, struct pe_session *);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080066void lim_send_sme_deauth_ntf(struct mac_context *, tSirMacAddr, tSirResultCodes, uint16_t,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080067 uint16_t, uint8_t, uint16_t);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080068void lim_send_sme_disassoc_ind(struct mac_context *, tpDphHashNode, struct pe_session *);
69void lim_send_sme_deauth_ind(struct mac_context *, tpDphHashNode,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080070 struct pe_session *pe_session);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080071void lim_send_sme_wm_status_change_ntf(struct mac_context *, tSirSmeStatusChangeCode,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080072 uint32_t *, uint16_t, uint8_t);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080073void lim_send_sme_set_context_rsp(struct mac_context *, struct qdf_mac_addr, uint16_t,
Jeff Johnsond7035a32018-11-18 22:03:13 -080074 tSirResultCodes, struct pe_session *, uint8_t, uint16_t);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080075void lim_handle_delete_bss_rsp(struct mac_context *mac, struct scheduler_msg *MsgQ);
76void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
Rajeev Kumarfeb96382017-01-22 19:42:09 -080077 struct scheduler_msg *msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080078
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080079void
Jeff Johnson9320c1e2018-12-02 13:09:20 -080080lim_send_sme_aggr_qos_rsp(struct mac_context *mac, tpSirAggrQosRsp aggrQosRsp,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080081 uint8_t smesessionId);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080082
Jeff Johnson9320c1e2018-12-02 13:09:20 -080083void lim_send_sme_addts_rsp(struct mac_context *mac, uint8_t rspReqd, uint32_t status,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080084 struct pe_session *pe_session, tSirMacTspecIE tspec,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080085 uint8_t smesessionId, uint16_t smetransactionId);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080086void lim_send_sme_delts_rsp(struct mac_context *mac, tpSirDeltsReq delts,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080087 uint32_t status, struct pe_session *pe_session,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080088 uint8_t smessionId, uint16_t smetransactionId);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080089void lim_send_sme_delts_ind(struct mac_context *mac, tpSirDeltsReqInfo delts,
Jeff Johnsond7035a32018-11-18 22:03:13 -080090 uint16_t aid, struct pe_session *);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080091void lim_send_sme_stats_rsp(struct mac_context *mac, uint16_t msgtype, void *stats);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080092
Naveen Rawatfa2a1002018-05-17 16:06:37 -070093#ifdef QCA_SUPPORT_CP_STATS
Jeff Johnson9320c1e2018-12-02 13:09:20 -080094static inline void lim_send_sme_pe_statistics_rsp(struct mac_context *mac,
Naveen Rawatfa2a1002018-05-17 16:06:37 -070095 uint16_t msgtype, void *stats) {}
96#else
Jeff Johnson9320c1e2018-12-02 13:09:20 -080097void lim_send_sme_pe_statistics_rsp(struct mac_context *mac, uint16_t msgtype,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080098 void *stats);
Naveen Rawatfa2a1002018-05-17 16:06:37 -070099#endif /* QCA_SUPPORT_CP_STATS */
100
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800101#ifdef FEATURE_WLAN_ESE
Jeff Johnson9320c1e2018-12-02 13:09:20 -0800102void lim_send_sme_pe_ese_tsm_rsp(struct mac_context *mac, tAniGetTsmStatsRsp *pStats);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800103#endif
104
Jeff Johnson9320c1e2018-12-02 13:09:20 -0800105void lim_send_sme_ibss_peer_ind(struct mac_context *mac, tSirMacAddr peerMacAddr,
Jeff Johnson582a3382018-03-05 11:58:47 -0800106 uint16_t staIndex, uint8_t *beacon,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800107 uint16_t beaconLen, uint16_t msgType,
108 uint8_t sessionId);
Jeff Johnson9320c1e2018-12-02 13:09:20 -0800109void lim_send_sme_max_assoc_exceeded_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800110 uint8_t smesessionId);
Frank Liu1b821202017-09-07 13:13:54 +0800111
Jeff Johnson9320c1e2018-12-02 13:09:20 -0800112void lim_send_sme_ap_channel_switch_resp(struct mac_context *mac,
Jeff Johnsonb5c13332018-12-03 09:54:51 -0800113 struct pe_session *pe_session,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800114 tpSwitchChannelParams pChnlParams);
Pragaspathi Thilagaraj934275c2018-08-07 14:55:35 +0530115/*
116 * lim_process_beacon_tx_success_ind() - handle successful beacon transmission
117 * indication from the FW This is a generic event generated by the FW afer the
118 * first beacon is sent out after the beacon template update by the host.
119 *
120 * @mac_ctx: Global mac_ctx
121 * @msg_type: msg_type
122 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800123void
Jeff Johnson9320c1e2018-12-02 13:09:20 -0800124lim_process_beacon_tx_success_ind(struct mac_context *mac, uint16_t msgType,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800125 void *event);
126
127typedef enum {
128 lim_csa_ie_present = 0x00000001,
129 lim_xcsa_ie_present = 0x00000002,
130 lim_wbw_ie_present = 0x00000004,
131 lim_cswarp_ie_present = 0x00000008,
132} lim_csa_event_ies_present_flag;
133
134#endif /* __LIM_SEND_SME_RSP_H */