Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
AnjaneeDevi Kapparapu | 24b52ff | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 2 | * 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 Nakkala | 9c070ad | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 20 | */ |
AnjaneeDevi Kapparapu | 24b52ff | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 21 | |
Gopichand Nakkala | 9c070ad | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 22 | /* |
AnjaneeDevi Kapparapu | 24b52ff | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 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 | /* |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 29 | * 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 | |
| 63 | tSirRetStatus 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 Lokere | 432a677 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 69 | PELOGE(limLog(pMac, LOGE, FL("invalid STA %d"), assocId);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 70 | return eSIR_LIM_INVALID_STA; |
| 71 | } |
| 72 | |
| 73 | *bssidx = (tANI_U8)pSta->bssId; |
| 74 | return eSIR_SUCCESS; |
| 75 | } |
| 76 | |
| 77 | |
| 78 | |