qcacmn: Add interface manager module
- Add interface manager module files - Add start_connect event processing - Add stubs for start_connect_complete and start_bss event processing API's Change-Id: I91a2bf38755abef38b6a9348d3eb69983217916c CRs-Fixed: 2759226
This commit is contained in:

committed by
snandini

parent
eaf0cf59d0
commit
00a2d6550f
@@ -388,6 +388,7 @@ typedef bool (*qdf_irqlocked_func_t)(void *);
|
|||||||
* @QDF_MODULE_ID_RPTR: Repeater module ID
|
* @QDF_MODULE_ID_RPTR: Repeater module ID
|
||||||
* @QDF_MODULE_ID_6GHZ: 6Ghz specific feature ID
|
* @QDF_MODULE_ID_6GHZ: 6Ghz specific feature ID
|
||||||
* @QDF_MODULE_ID_IOT_SIM: IOT Simulation for rogue AP module ID
|
* @QDF_MODULE_ID_IOT_SIM: IOT Simulation for rogue AP module ID
|
||||||
|
* @QDF_MODULE_ID_IFMGR: Interface Manager feature ID
|
||||||
* @QDF_MODULE_ID_ANY: anything
|
* @QDF_MODULE_ID_ANY: anything
|
||||||
* @QDF_MODULE_ID_MAX: Max place holder module ID
|
* @QDF_MODULE_ID_MAX: Max place holder module ID
|
||||||
*/
|
*/
|
||||||
@@ -514,6 +515,7 @@ typedef enum {
|
|||||||
QDF_MODULE_ID_RPTR,
|
QDF_MODULE_ID_RPTR,
|
||||||
QDF_MODULE_ID_6GHZ,
|
QDF_MODULE_ID_6GHZ,
|
||||||
QDF_MODULE_ID_IOT_SIM,
|
QDF_MODULE_ID_IOT_SIM,
|
||||||
|
QDF_MODULE_ID_IFMGR,
|
||||||
QDF_MODULE_ID_ANY,
|
QDF_MODULE_ID_ANY,
|
||||||
QDF_MODULE_ID_MAX,
|
QDF_MODULE_ID_MAX,
|
||||||
} QDF_MODULE_ID;
|
} QDF_MODULE_ID;
|
||||||
|
@@ -279,6 +279,7 @@
|
|||||||
* @WLAN_UMAC_COMP_PKT_CAPTURE: Packet capture component
|
* @WLAN_UMAC_COMP_PKT_CAPTURE: Packet capture component
|
||||||
* @WLAN_UMAC_COMP_DCS: DCS
|
* @WLAN_UMAC_COMP_DCS: DCS
|
||||||
* @WLAN_IOT_SIM_COMP: IOT Simulation component
|
* @WLAN_IOT_SIM_COMP: IOT Simulation component
|
||||||
|
* @WLAN_UMAC_COMP_IF_MGR: Interface manager component
|
||||||
* @WLAN_UMAC_COMP_ID_MAX: Maximum components in UMAC
|
* @WLAN_UMAC_COMP_ID_MAX: Maximum components in UMAC
|
||||||
*
|
*
|
||||||
* This id is static.
|
* This id is static.
|
||||||
@@ -323,6 +324,7 @@ enum wlan_umac_comp_id {
|
|||||||
WLAN_UMAC_COMP_PKT_CAPTURE = 35,
|
WLAN_UMAC_COMP_PKT_CAPTURE = 35,
|
||||||
WLAN_UMAC_COMP_DCS = 36,
|
WLAN_UMAC_COMP_DCS = 36,
|
||||||
WLAN_IOT_SIM_COMP = 37,
|
WLAN_IOT_SIM_COMP = 37,
|
||||||
|
WLAN_UMAC_COMP_IF_MGR = 38,
|
||||||
WLAN_UMAC_COMP_ID_MAX,
|
WLAN_UMAC_COMP_ID_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
37
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_ap.h
Normal file
37
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_ap.h
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOC: contains interface manager public file containing AP event handlers
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _WLAN_IF_MGR_AP_H_
|
||||||
|
#define _WLAN_IF_MGR_AP_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_process_start_bss_start() - Start BSS event handler
|
||||||
|
*
|
||||||
|
* Interface manager connect start bss event handler
|
||||||
|
*
|
||||||
|
* @vdev: vdev object
|
||||||
|
* @event_data: Interface mgr event data
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_process_ap_start_bss(struct wlan_objmgr_vdev *vdev,
|
||||||
|
struct if_mgr_event_data *event_data);
|
||||||
|
|
||||||
|
#endif
|
40
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_api.h
Normal file
40
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_api.h
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOC: contains interface manager public api
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _WLAN_IF_MGR_API_H_
|
||||||
|
#define _WLAN_IF_MGR_API_H_
|
||||||
|
|
||||||
|
#include "wlan_objmgr_psoc_obj.h"
|
||||||
|
#include "wlan_objmgr_vdev_obj.h"
|
||||||
|
#include "wlan_if_mgr_public_struct.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* if_mgr_deliver_event() - interface mgr event handler
|
||||||
|
* @vdev: vdev object
|
||||||
|
* @event: interface mangaer event
|
||||||
|
* @event_data: Interface mgr event data
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS if_mgr_deliver_event(struct wlan_objmgr_vdev *vdev,
|
||||||
|
enum wlan_if_mgr_evt event,
|
||||||
|
struct if_mgr_event_data *event_data);
|
||||||
|
|
||||||
|
#endif
|
97
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_main.h
Normal file
97
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_main.h
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOC: contains Interface MGR init/deinit public api
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _WLAN_IF_MGR_MAIN_API_H_
|
||||||
|
#define _WLAN_IF_MGR_MAIN_API_H_
|
||||||
|
|
||||||
|
#include <qdf_atomic.h>
|
||||||
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
|
#include <wlan_objmgr_pdev_obj.h>
|
||||||
|
#include <wlan_objmgr_vdev_obj.h>
|
||||||
|
#include <wlan_if_mgr_public_struct.h>
|
||||||
|
|
||||||
|
#define ifmgr_alert(params...) \
|
||||||
|
QDF_TRACE_FATAL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_err(params...) \
|
||||||
|
QDF_TRACE_ERROR(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_warn(params...) \
|
||||||
|
QDF_TRACE_WARN(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_notice(params...) \
|
||||||
|
QDF_TRACE_INFO(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_info(params...) \
|
||||||
|
QDF_TRACE_INFO(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_debug(params...) \
|
||||||
|
QDF_TRACE_DEBUG(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
|
||||||
|
/* Rate Limited Logs */
|
||||||
|
#define ifmgr_alert_rl(params...) \
|
||||||
|
QDF_TRACE_FATAL_RL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_err_rl(params...) \
|
||||||
|
QDF_TRACE_ERROR_RL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_warn_rl(params...) \
|
||||||
|
QDF_TRACE_WARN_RL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_info_rl(params...) \
|
||||||
|
QDF_TRACE_INFO_RL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_debug_rl(params...) \
|
||||||
|
QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
|
||||||
|
#define ifmgr_nofl_alert(params...) \
|
||||||
|
QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_nofl_err(params...) \
|
||||||
|
QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_nofl_warn(params...) \
|
||||||
|
QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_nofl_info(params...) \
|
||||||
|
QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
#define ifmgr_nofl_debug(params...) \
|
||||||
|
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_IFMGR, params)
|
||||||
|
|
||||||
|
#define ifmgr_hex_dump(level, data, buf_len) \
|
||||||
|
qdf_trace_hex_dump(QDF_MODULE_ID_IFMGR, level, data, buf_len)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct wlan_if_mgr_obj - interface object definition
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
struct wlan_if_mgr_obj {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_if_mgr_psoc_created_notification() - interface mgr psoc create handler
|
||||||
|
* @psoc: psoc object
|
||||||
|
* @arg_list: Argument list
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_if_mgr_psoc_created_notification(struct wlan_objmgr_psoc *psoc,
|
||||||
|
void *arg_list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_scan_psoc_deleted_notification() - scan psoc delete handler
|
||||||
|
* @psoc: psoc object
|
||||||
|
* @arg_list: Argument list
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_if_mgr_psoc_destroyed_notification(struct wlan_objmgr_psoc *psoc,
|
||||||
|
void *arg_list);
|
||||||
|
|
||||||
|
#endif
|
@@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOC: contains interface manager structure definations
|
||||||
|
*/
|
||||||
|
#ifndef __IF_MGR_PUBLIC_STRUCTS_H
|
||||||
|
#define __IF_MGR_PUBLIC_STRUCTS_H
|
||||||
|
|
||||||
|
#include <scheduler_api.h>
|
||||||
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
|
#include <wlan_objmgr_pdev_obj.h>
|
||||||
|
#include <wlan_objmgr_vdev_obj.h>
|
||||||
|
#include <qdf_time.h>
|
||||||
|
#include <qdf_list.h>
|
||||||
|
#include <qdf_atomic.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum wlan_if_mgr_evt: interface manager events
|
||||||
|
* @WLAN_IF_MGR_EV_CONNECT_START:
|
||||||
|
* @WLAN_IF_MGR_EV_CONNECT_COMPLETE:
|
||||||
|
* @WLAN_IF_MGR_EV_DISCONNECT_START:
|
||||||
|
* @WLAN_IF_MGR_EV_DISCONNECT_COMPLETE:
|
||||||
|
* @WLAN_IF_MGR_EV_VALIDATE_CANDIDATE:
|
||||||
|
* @WLAN_IF_MGR_EV_AP_START_BSS:
|
||||||
|
* @WLAN_IF_MGR_EV_AP_START_COMPLETE:
|
||||||
|
* @WLAN_IF_MGR_EV_AP_STOP_BSS:
|
||||||
|
* @WLAN_IF_MGR_EV_AP_STOP_COMPLETE:
|
||||||
|
*/
|
||||||
|
enum wlan_if_mgr_evt {
|
||||||
|
WLAN_IF_MGR_EV_CONNECT_START = 0,
|
||||||
|
WLAN_IF_MGR_EV_CONNECT_COMPLETE = 1,
|
||||||
|
WLAN_IF_MGR_EV_DISCONNECT_START = 2,
|
||||||
|
WLAN_IF_MGR_EV_DISCONNECT_COMPLETE = 3,
|
||||||
|
WLAN_IF_MGR_EV_VALIDATE_CANDIDATE = 4,
|
||||||
|
WLAN_IF_MGR_EV_AP_START_BSS = 5,
|
||||||
|
WLAN_IF_MGR_EV_AP_START_COMPLETE = 6,
|
||||||
|
WLAN_IF_MGR_EV_AP_STOP_BSS = 7,
|
||||||
|
WLAN_IF_MGR_EV_AP_STOP_COMPLETE = 8,
|
||||||
|
WLAN_IF_MGR_EV_MAX = 9,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct if_mgr_event_data - interface manager event data
|
||||||
|
* @status: status
|
||||||
|
*/
|
||||||
|
struct if_mgr_event_data {
|
||||||
|
QDF_STATUS status;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
50
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_sta.h
Normal file
50
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_sta.h
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOC: contains interface manager public file containing STA event handlers
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _WLAN_IF_MGR_STA_H_
|
||||||
|
#define _WLAN_IF_MGR_STA_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_process_connect_start() - connect start event handler
|
||||||
|
*
|
||||||
|
* Interface manager connect start event handler
|
||||||
|
*
|
||||||
|
* @vdev: vdev object
|
||||||
|
* @event_data: Interface mgr event data
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_process_connect_start(struct wlan_objmgr_vdev *vdev,
|
||||||
|
struct if_mgr_event_data *event_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_process_connect_complete() - connect complete event handler
|
||||||
|
*
|
||||||
|
* Interface manager connect complete event handler
|
||||||
|
*
|
||||||
|
* @vdev: vdev object
|
||||||
|
* @event_data: Interface manager complete event data
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_process_connect_complete(struct wlan_objmgr_vdev *vdev,
|
||||||
|
struct if_mgr_event_data *event_data);
|
||||||
|
|
||||||
|
#endif
|
45
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_ucfg_api.h
Normal file
45
umac/cmn_services/interface_mgr/inc/wlan_if_mgr_ucfg_api.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOC: contains interface manager public api
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _WLAN_IF_MGR_UCFG_API_H_
|
||||||
|
#define _WLAN_IF_MGR_UCFG_API_H_
|
||||||
|
|
||||||
|
#include <scheduler_api.h>
|
||||||
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
|
#include <wlan_objmgr_pdev_obj.h>
|
||||||
|
#include <wlan_objmgr_vdev_obj.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_if_mgr_deliver_event() - interface mgr event handler
|
||||||
|
* @vdev: vdev object
|
||||||
|
* @event: interface mangaer event
|
||||||
|
* @event_data: Interface mgr event data
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
QDF_STATUS ucfg_if_mgr_deliver_event(struct wlan_objmgr_vdev *vdev,
|
||||||
|
enum wlan_if_mgr_evt event,
|
||||||
|
struct if_mgr_event_data *event_data)
|
||||||
|
{
|
||||||
|
return if_mgr_deliver_event(vdev, event, event_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
53
umac/cmn_services/interface_mgr/src/wlan_if_mgr_core.c
Normal file
53
umac/cmn_services/interface_mgr/src/wlan_if_mgr_core.c
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOC: contains interface manager public api
|
||||||
|
*/
|
||||||
|
#include "wlan_if_mgr_public_struct.h"
|
||||||
|
#include "wlan_if_mgr_api.h"
|
||||||
|
#include "wlan_if_mgr_sta.h"
|
||||||
|
#include "wlan_if_mgr_ap.h"
|
||||||
|
|
||||||
|
QDF_STATUS if_mgr_deliver_event(struct wlan_objmgr_vdev *vdev,
|
||||||
|
enum wlan_if_mgr_evt event,
|
||||||
|
struct if_mgr_event_data *event_data)
|
||||||
|
{
|
||||||
|
struct wlan_objmgr_psoc *psoc;
|
||||||
|
|
||||||
|
psoc = wlan_vdev_get_psoc(vdev);
|
||||||
|
if (!psoc)
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
|
switch (event) {
|
||||||
|
case WLAN_IF_MGR_EV_CONNECT_START:
|
||||||
|
wlan_process_connect_start(vdev, event_data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_IF_MGR_EV_CONNECT_COMPLETE:
|
||||||
|
wlan_process_connect_complete(vdev, event_data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_IF_MGR_EV_AP_START_BSS:
|
||||||
|
wlan_process_ap_start_bss(vdev, event_data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
72
umac/cmn_services/interface_mgr/src/wlan_if_mgr_main.c
Normal file
72
umac/cmn_services/interface_mgr/src/wlan_if_mgr_main.c
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOC: contains core interface manager function definitions
|
||||||
|
*/
|
||||||
|
#include "wlan_if_mgr_main.h"
|
||||||
|
|
||||||
|
QDF_STATUS wlan_if_mgr_psoc_created_notification(struct wlan_objmgr_psoc *psoc,
|
||||||
|
void *arg_list)
|
||||||
|
{
|
||||||
|
struct wlan_if_mgr_obj *ifmgr_obj;
|
||||||
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
ifmgr_obj = qdf_mem_malloc_atomic(sizeof(struct wlan_if_mgr_obj));
|
||||||
|
if (!ifmgr_obj) {
|
||||||
|
ifmgr_err("Failed to allocate memory");
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Attach scan private date to psoc */
|
||||||
|
status = wlan_objmgr_psoc_component_obj_attach(psoc,
|
||||||
|
WLAN_UMAC_COMP_IF_MGR,
|
||||||
|
(void *)ifmgr_obj,
|
||||||
|
QDF_STATUS_SUCCESS);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
ifmgr_err("Failed to attach psoc scan component");
|
||||||
|
else
|
||||||
|
ifmgr_debug("interface mgr object attach to psoc successful");
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_if_mgr_psoc_destroyed_notification(struct wlan_objmgr_psoc *psoc,
|
||||||
|
void *arg_list)
|
||||||
|
{
|
||||||
|
void *ifmgr_obj = NULL;
|
||||||
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
ifmgr_obj = wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||||
|
WLAN_UMAC_COMP_IF_MGR);
|
||||||
|
|
||||||
|
if (!ifmgr_obj) {
|
||||||
|
ifmgr_err("Failed to detach interface mgr in psoc ctx");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = wlan_objmgr_psoc_component_obj_detach(psoc,
|
||||||
|
WLAN_UMAC_COMP_IF_MGR,
|
||||||
|
ifmgr_obj);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
ifmgr_err("Failed to detach psoc interface mgr component");
|
||||||
|
|
||||||
|
qdf_mem_free(ifmgr_obj);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user