blob: 508d017531b519711c16e1b95ad4555efe6c3942 [file] [log] [blame]
Arun Kumar Khandavallid76b54a2019-08-27 16:39:18 +05301/*
2 * Copyright (c) 2019 The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17/**
18 * DOC: Implements PSOC MLME public APIs
19 */
20
21#include <wlan_objmgr_psoc_obj.h>
22#include <wlan_mlme_dbg.h>
23#include <include/wlan_psoc_mlme.h>
24#include <wlan_psoc_mlme_api.h>
25#include <qdf_module.h>
26
27struct psoc_mlme_obj *wlan_psoc_mlme_get_cmpt_obj(struct wlan_objmgr_psoc *psoc)
28{
29 struct psoc_mlme_obj *psoc_mlme;
30
31 psoc_mlme = wlan_objmgr_psoc_get_comp_private_obj(psoc,
32 WLAN_UMAC_COMP_MLME);
33 if (!psoc_mlme) {
34 mlme_err("PSOC MLME component object is NULL");
35 return NULL;
36 }
37
38 return psoc_mlme;
39}
40
41qdf_export_symbol(wlan_psoc_mlme_get_cmpt_obj);
42
43mlme_psoc_ext_t *wlan_psoc_mlme_get_ext_hdl(struct wlan_objmgr_psoc *psoc)
44{
45 struct psoc_mlme_obj *psoc_mlme;
46
47 psoc_mlme = wlan_psoc_mlme_get_cmpt_obj(psoc);
48 if (psoc_mlme)
49 return psoc_mlme->ext_psoc_ptr;
50
51 return NULL;
52}
53
54qdf_export_symbol(wlan_psoc_mlme_get_ext_hdl);
55
56void wlan_psoc_mlme_set_ext_hdl(struct psoc_mlme_obj *psoc_mlme,
57 mlme_psoc_ext_t *psoc_ext_hdl)
58{
59 psoc_mlme->ext_psoc_ptr = psoc_ext_hdl;
60}
61
62qdf_export_symbol(wlan_psoc_mlme_set_ext_hdl);