blob: 76415d5c84ff931ae933ddd275967983e658eff5 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2011-2012, 2014-2015 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28#if !defined(__SMERRMINTERNAL_H)
29#define __SMERRMINTERNAL_H
30
31/**
32 * \file sme_rrm_internal.h
33 *
34 * \brief prototype for SME RRM APIs
35 */
36
37/*--------------------------------------------------------------------------
38 Include Files
39 ------------------------------------------------------------------------*/
40#include "cdf_lock.h"
41#include "cdf_trace.h"
42#include "cdf_memory.h"
43#include "cdf_types.h"
44#include "rrm_global.h"
45
46/*--------------------------------------------------------------------------
47 Type declarations
48 ------------------------------------------------------------------------*/
49typedef struct sRrmConfigParam {
50 uint8_t rrmEnabled;
51 uint8_t maxRandnInterval;
52} tRrmConfigParam, *tpRrmConfigParam;
53
54typedef struct sRrmNeighborReportDesc {
55 tListElem List;
56 tSirNeighborBssDescription *pNeighborBssDescription;
57 uint32_t roamScore;
58 uint8_t sessionId;
59} tRrmNeighborReportDesc, *tpRrmNeighborReportDesc;
60
61typedef void (*NeighborReportRspCallback)(void *context,
62 CDF_STATUS cdf_status);
63
64typedef struct sRrmNeighborRspCallbackInfo {
65 uint32_t timeout; /* in ms.. min value is 10 (10ms) */
66 NeighborReportRspCallback neighborRspCallback;
67 void *neighborRspCallbackContext;
68} tRrmNeighborRspCallbackInfo, *tpRrmNeighborRspCallbackInfo;
69
70typedef struct sRrmNeighborRequestControlInfo {
71 /* To check whether a neighbor req is already sent & response pending */
72 bool isNeighborRspPending;
73 cdf_mc_timer_t neighborRspWaitTimer;
74 tRrmNeighborRspCallbackInfo neighborRspCallbackInfo;
75} tRrmNeighborRequestControlInfo, *tpRrmNeighborRequestControlInfo;
76
77typedef struct sRrmSMEContext {
78 uint16_t token;
79 struct cdf_mac_addr sessionBssId;
80 uint8_t regClass;
81 /* list of all channels to be measured. */
82 tCsrChannelInfo channelList;
83 uint8_t currentIndex;
84 /* SSID used in the measuring beacon report. */
85 tAniSSID ssId;
86 tSirMacAddr bssId; /* bssid used for beacon report measurement. */
87 /* Randomization interval to be used in subsequent measurements. */
88 uint16_t randnIntvl;
89 uint16_t duration[SIR_ESE_MAX_MEAS_IE_REQS];
90 uint8_t measMode[SIR_ESE_MAX_MEAS_IE_REQS];
91 tRrmConfigParam rrmConfig;
92 cdf_mc_timer_t IterMeasTimer;
93 tDblLinkList neighborReportCache;
94 tRrmNeighborRequestControlInfo neighborReqControlInfo;
95
96#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
97 tCsrEseBeaconReq eseBcnReqInfo;
98 bool eseBcnReqInProgress;
99#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
100 tRrmMsgReqSource msgSource;
101} tRrmSMEContext, *tpRrmSMEContext;
102
103typedef struct sRrmNeighborReq {
104 uint8_t no_ssid;
105 tSirMacSSid ssid;
106} tRrmNeighborReq, *tpRrmNeighborReq;
107
108#endif /* #if !defined( __SMERRMINTERNAL_H ) */