blob: f6d787c513792afc56af099eb3fae45c3dcd1fff [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
AnjaneeDevi Kapparapu24b52ff2014-02-18 18:44:02 -08002 * Copyright (c) 2012-2013 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.
Gopichand Nakkala9c070ad2013-01-08 21:16:34 -080020 */
AnjaneeDevi Kapparapu24b52ff2014-02-18 18:44:02 -080021
Gopichand Nakkala9c070ad2013-01-08 21:16:34 -080022/*
AnjaneeDevi Kapparapu24b52ff2014-02-18 18:44:02 -080023 * 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/*
Jeff Johnson295189b2012-06-20 16:38:30 -070029 * limStaHashApi.c: Provides access functions to get/set values of station hash entry fields.
30 * Author: Sunit Bhatia
31 * Date: 09/19/2006
32 * History:-
33 * Date Modified by Modification Information
34 *
35 * --------------------------------------------------------------------------
36 *
37 */
38
39#include "limStaHashApi.h"
40
41
42/**
43 * limGetStaHashBssidx()
44 *
45 *FUNCTION:
46 * This function is called to Get the Bss Index of the currently associated Station.
47 *
48 *LOGIC:
49 *
50 *ASSUMPTIONS:
51 * NA
52 *
53 *NOTE:
54 * NA
55 *
56 * @param pMac pointer to Global Mac structure.
57 * @param assocId AssocID of the Station.
58 * @param bssidx pointer to the bss index, which will be returned by the function.
59 *
60 * @return success if GET operation is ok, else Failure.
61 */
62
63tSirRetStatus limGetStaHashBssidx(tpAniSirGlobal pMac, tANI_U16 assocId, tANI_U8 *bssidx, tpPESession psessionEntry)
64{
65 tpDphHashNode pSta = dphGetHashEntry(pMac, assocId, &psessionEntry->dph.dphHashTable);
66
67 if (pSta == NULL)
68 {
Kiran Kumar Lokere432a6772013-04-01 18:40:00 -070069 PELOGE(limLog(pMac, LOGE, FL("invalid STA %d"), assocId);)
Jeff Johnson295189b2012-06-20 16:38:30 -070070 return eSIR_LIM_INVALID_STA;
71 }
72
73 *bssidx = (tANI_U8)pSta->bssId;
74 return eSIR_SUCCESS;
75}
76
77
78