xref: /wlan-driver/qca-wifi-host-cmn/umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mgr_api.c (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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: wlan_vdev_mgr_api.c
19  *
20  * This file provides definitions to component APIs to get/set mlme fields in
21  * vdev mlme core data structures
22  */
23 
24 #include "include/wlan_vdev_mlme.h"
25 #include <wlan_vdev_mlme_api.h>
26 #include <qdf_module.h>
27 #include <wlan_vdev_mgr_api.h>
28 
wlan_vdev_mgr_get_param_bssid(struct wlan_objmgr_vdev * vdev,uint8_t * bssid)29 void wlan_vdev_mgr_get_param_bssid(struct wlan_objmgr_vdev *vdev,
30 				   uint8_t *bssid)
31 {
32 	struct vdev_mlme_mgmt *mlme_mgmt;
33 	struct vdev_mlme_obj *vdev_mlme;
34 
35 	vdev_mlme = wlan_objmgr_vdev_get_comp_private_obj(
36 						vdev, WLAN_UMAC_COMP_MLME);
37 
38 	if (!vdev_mlme) {
39 		mlme_err("VDEV_MLME is NULL");
40 		return;
41 	}
42 
43 	mlme_mgmt = &vdev_mlme->mgmt;
44 
45 	qdf_mem_copy(bssid, mlme_mgmt->generic.bssid,
46 		     QDF_MAC_ADDR_SIZE);
47 }
48 
49 qdf_export_symbol(wlan_vdev_mgr_get_param_bssid);
50