blob: 43ecd15c4e6e6f0feff0c65d8e4c64a6c270cc8f [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Jeff Johnson0301ecb2018-06-29 09:36:23 -07002 * Copyright (c) 2011-2012, 2014-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 *
21 * This file lim_ibss_peer_mgmt.h contains prototypes for
22 * the utility functions LIM uses to maintain peers in IBSS.
23 * Author: Chandra Modumudi
24 * Date: 03/12/04
25 * History:-
26 * Date Modified by Modification Information
27 * --------------------------------------------------------------------
28 */
29
30#include "sir_common.h"
31#include "lim_utils.h"
32
Rajeev Kumar Sirasanagandla2f17f8d2018-10-03 17:24:20 +053033/**
34 * ibss_bss_delete()- start the ibss
35 * @mac_ctx: Pointer to Global MAC structure
36 * @session: pe session
37 *
38 * Return: None
39 */
Jeff Johnson9320c1e2018-12-02 13:09:20 -080040void ibss_bss_add(struct mac_context *mac_ctx, struct pe_session *session);
Rajeev Kumar Sirasanagandla2f17f8d2018-10-03 17:24:20 +053041
42/**
43 * ibss_bss_delete()- delete the current BSS
44 * @mac_ctx: Pointer to Global MAC structure
45 * @session: pe session
46 *
47 * Return: None
48 */
Jeff Johnson9320c1e2018-12-02 13:09:20 -080049void ibss_bss_delete(struct mac_context *mac_ctx, struct pe_session *session);
Rajeev Kumar Sirasanagandla2f17f8d2018-10-03 17:24:20 +053050
51/**
52 * lim_ibss_delete_all_peers: delete all IBSS peers.
53 * @mac_ctx: Pointer to Global MAC structure
54 * @session: pe session
55 *
56 * Return: None
57 */
Jeff Johnson9320c1e2018-12-02 13:09:20 -080058void lim_ibss_delete_all_peers(struct mac_context *mac_ctx, struct pe_session *session);
Rajeev Kumar Sirasanagandla2f17f8d2018-10-03 17:24:20 +053059
Jeff Johnson9320c1e2018-12-02 13:09:20 -080060void lim_ibss_init(struct mac_context *);
61void lim_ibss_delete(struct mac_context *, struct pe_session *pe_session);
62QDF_STATUS lim_ibss_coalesce(struct mac_context *, tpSirMacMgmtHdr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080063 tpSchBeaconStruct, uint8_t *, uint32_t, uint16_t,
Jeff Johnsonb6f7d382018-11-18 22:17:15 -080064 struct pe_session *);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080065QDF_STATUS lim_ibss_sta_add(struct mac_context *, void *, struct pe_session *);
66QDF_STATUS lim_ibss_add_sta_rsp(struct mac_context *, void *, struct pe_session *);
Abhishek Singh3df76612017-05-16 14:05:32 +053067
68/**
69 * lim_process_ibss_del_sta_rsp()- Handle ibss delete
70 * peer resp from firmware
71 *
72 * @mac_ptr: Pointer to Global MAC structure
73 * @lim_msg: delete sta response
74 * @pe_session: pe session
75 *
76 * Return: None
77 *
78 */
Jeff Johnson9320c1e2018-12-02 13:09:20 -080079void lim_process_ibss_del_sta_rsp(struct mac_context *mac_ctx,
Abhishek Singh3df76612017-05-16 14:05:32 +053080 struct scheduler_msg *lim_msg,
Jeff Johnsonb6f7d382018-11-18 22:17:15 -080081 struct pe_session *pe_session);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080082tLimIbssPeerNode *lim_ibss_peer_find(struct mac_context *mac, tSirMacAddr macAddr);
83void lim_ibss_del_bss_rsp(struct mac_context *, void *, struct pe_session *);
84void lim_ibss_del_bss_rsp_when_coalescing(struct mac_context *, void *, struct pe_session *);
85void lim_ibss_add_bss_rsp_when_coalescing(struct mac_context *mac, void *msg,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080086 struct pe_session *pe_session);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080087void lim_ibss_decide_protection_on_delete(struct mac_context *mac, tpDphHashNode pStaDs,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080088 tpUpdateBeaconParams pBeaconParams,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080089 struct pe_session *pe_session);
Jeff Johnson9320c1e2018-12-02 13:09:20 -080090void lim_ibss_heart_beat_handle(struct mac_context *mac, struct pe_session *pe_session);
91void lim_process_ibss_peer_inactivity(struct mac_context *mac, void *buf);