blob: dd2c2a1734ece796b29af1d1adefe7593d1caf73 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -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
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080019/**=========================================================================
20
21 \file rrm_api.h
22
23 \brief RRM APIs
24
25 ========================================================================*/
26
27/* $Header$ */
28
29#ifndef __RRM_API_H__
30#define __RRM_API_H__
31
32#define RRM_MIN_TX_PWR_CAP 13
33#define RRM_MAX_TX_PWR_CAP 19
34
35#define RRM_BCN_RPT_NO_BSS_INFO 0
36#define RRM_BCN_RPT_MIN_RPT 1
37
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080038uint8_t rrm_get_min_of_max_tx_power(struct mac_context *mac, int8_t regMax,
Amar Singhala297bfa2015-10-15 15:07:29 -070039 int8_t apTxPower);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080040
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080041QDF_STATUS rrm_initialize(struct mac_context *mac);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080042
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080043QDF_STATUS rrm_cleanup(struct mac_context *mac);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080044
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080045QDF_STATUS rrm_process_link_measurement_request(struct mac_context *mac,
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070046 uint8_t *pRxPacketInfo,
47 tDot11fLinkMeasurementRequest
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080048 *pLinkReq,
Jeff Johnson66845ca2018-11-18 21:44:10 -080049 struct pe_session *
Jeff Johnsonb5c13332018-12-03 09:54:51 -080050 pe_session);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080051
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080052QDF_STATUS rrm_process_radio_measurement_request(struct mac_context *mac,
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070053 tSirMacAddr peer,
54 tDot11fRadioMeasurementRequest
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080055 *pRRMReq,
Jeff Johnson66845ca2018-11-18 21:44:10 -080056 struct pe_session *
Jeff Johnsonb5c13332018-12-03 09:54:51 -080057 pe_session);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080058
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080059QDF_STATUS rrm_process_neighbor_report_response(struct mac_context *mac,
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070060 tDot11fNeighborReportResponse
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080061 *pNeighborRep,
Jeff Johnson66845ca2018-11-18 21:44:10 -080062 struct pe_session *
Jeff Johnsonb5c13332018-12-03 09:54:51 -080063 pe_session);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080064
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080065QDF_STATUS rrm_send_set_max_tx_power_req(struct mac_context *mac,
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070066 int8_t txPower,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080067 struct pe_session *pe_session);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080068
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080069int8_t rrm_get_mgmt_tx_power(struct mac_context *mac,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080070 struct pe_session *pe_session);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080071
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080072void rrm_cache_mgmt_tx_power(struct mac_context *mac,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080073 int8_t txPower, struct pe_session *pe_session);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080074
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080075tpRRMCaps rrm_get_capabilities(struct mac_context *mac,
Jeff Johnsonb5c13332018-12-03 09:54:51 -080076 struct pe_session *pe_session);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080077
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080078void rrm_get_start_tsf(struct mac_context *mac, uint32_t *pStartTSF);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080079
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080080void rrm_update_start_tsf(struct mac_context *mac, uint32_t startTSF[2]);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080081
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080082QDF_STATUS rrm_set_max_tx_power_rsp(struct mac_context *mac,
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070083 struct scheduler_msg *limMsgQ);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080084
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070085QDF_STATUS
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080086rrm_process_neighbor_report_req(struct mac_context *mac,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080087 tpSirNeighborReportReqInd pNeighborReq);
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070088
89QDF_STATUS
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080090rrm_process_beacon_report_xmit(struct mac_context *mac,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080091 tpSirBeaconReportXmitInd pBcnReport);
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070092
Jeff Johnsonb228e0a2018-12-02 12:27:26 -080093void lim_update_rrm_capability(struct mac_context *mac_ctx,
Jeff Johnsonceb4e9b2018-06-22 14:44:24 -070094 tpSirSmeJoinReq join_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080095#endif