Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Jeff Johnson | 0301ecb | 2018-06-29 09:36:23 -0700 | [diff] [blame] | 2 | * Copyright (c) 2011-2012, 2014-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 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 | /* |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 20 | * |
| 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 Sirasanagandla | 2f17f8d | 2018-10-03 17:24:20 +0530 | [diff] [blame] | 33 | /** |
| 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 Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 40 | void ibss_bss_add(struct mac_context *mac_ctx, struct pe_session *session); |
Rajeev Kumar Sirasanagandla | 2f17f8d | 2018-10-03 17:24:20 +0530 | [diff] [blame] | 41 | |
| 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 Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 49 | void ibss_bss_delete(struct mac_context *mac_ctx, struct pe_session *session); |
Rajeev Kumar Sirasanagandla | 2f17f8d | 2018-10-03 17:24:20 +0530 | [diff] [blame] | 50 | |
| 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 Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 58 | void lim_ibss_delete_all_peers(struct mac_context *mac_ctx, struct pe_session *session); |
Rajeev Kumar Sirasanagandla | 2f17f8d | 2018-10-03 17:24:20 +0530 | [diff] [blame] | 59 | |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 60 | void lim_ibss_init(struct mac_context *); |
| 61 | void lim_ibss_delete(struct mac_context *, struct pe_session *pe_session); |
| 62 | QDF_STATUS lim_ibss_coalesce(struct mac_context *, tpSirMacMgmtHdr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 63 | tpSchBeaconStruct, uint8_t *, uint32_t, uint16_t, |
Jeff Johnson | b6f7d38 | 2018-11-18 22:17:15 -0800 | [diff] [blame] | 64 | struct pe_session *); |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 65 | QDF_STATUS lim_ibss_sta_add(struct mac_context *, void *, struct pe_session *); |
| 66 | QDF_STATUS lim_ibss_add_sta_rsp(struct mac_context *, void *, struct pe_session *); |
Abhishek Singh | 3df7661 | 2017-05-16 14:05:32 +0530 | [diff] [blame] | 67 | |
| 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 Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 79 | void lim_process_ibss_del_sta_rsp(struct mac_context *mac_ctx, |
Abhishek Singh | 3df7661 | 2017-05-16 14:05:32 +0530 | [diff] [blame] | 80 | struct scheduler_msg *lim_msg, |
Jeff Johnson | b6f7d38 | 2018-11-18 22:17:15 -0800 | [diff] [blame] | 81 | struct pe_session *pe_session); |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 82 | tLimIbssPeerNode *lim_ibss_peer_find(struct mac_context *mac, tSirMacAddr macAddr); |
| 83 | void lim_ibss_del_bss_rsp(struct mac_context *, void *, struct pe_session *); |
| 84 | void lim_ibss_del_bss_rsp_when_coalescing(struct mac_context *, void *, struct pe_session *); |
| 85 | void lim_ibss_add_bss_rsp_when_coalescing(struct mac_context *mac, void *msg, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 86 | struct pe_session *pe_session); |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 87 | void lim_ibss_decide_protection_on_delete(struct mac_context *mac, tpDphHashNode pStaDs, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 88 | tpUpdateBeaconParams pBeaconParams, |
Jeff Johnson | b5c1333 | 2018-12-03 09:54:51 -0800 | [diff] [blame] | 89 | struct pe_session *pe_session); |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 90 | void lim_ibss_heart_beat_handle(struct mac_context *mac, struct pe_session *pe_session); |
| 91 | void lim_process_ibss_peer_inactivity(struct mac_context *mac, void *buf); |