From 5116bc8f8fab7d56c12089a8ff62b093e24eaf96 Mon Sep 17 00:00:00 2001 From: Amit Mehta Date: Tue, 29 Mar 2022 22:01:49 -0700 Subject: [PATCH] qcacld-3.0: Add DP Component Skeleton code Add new files and Skeleton code for DP component. Change-Id: I6bfe59f31b292b77bbd728423a4ed53c3e4d1c2f CRs-Fixed: 3164956 --- components/dp/core/inc/wlan_dp_main.h | 52 ++++++++ components/dp/core/inc/wlan_dp_objmgr.h | 55 ++++++++ .../dp/core/inc/wlan_dp_periodic_sta_stats.h | 122 ++++++++++++++++++ components/dp/core/inc/wlan_dp_priv.h | 76 +++++++++++ components/dp/core/inc/wlan_dp_txrx.h | 75 +++++++++++ .../dp/core/src/wlan_dp_bus_bandwidth.c | 43 ++++++ .../dp/core/src/wlan_dp_bus_bandwidth.h | 85 ++++++++++++ components/dp/core/src/wlan_dp_main.c | 118 +++++++++++++++++ components/dp/core/src/wlan_dp_nud_tracking.c | 40 ++++++ components/dp/core/src/wlan_dp_nud_tracking.h | 53 ++++++++ .../dp/core/src/wlan_dp_periodic_sta_stats.c | 51 ++++++++ components/dp/core/src/wlan_dp_softap_txrx.c | 37 ++++++ components/dp/core/src/wlan_dp_txrx.c | 39 ++++++ components/dp/dispatcher/inc/wlan_dp_cfg.h | 57 ++++++++ .../dp/dispatcher/inc/wlan_dp_public_struct.h | 58 +++++++++ .../dp/dispatcher/inc/wlan_dp_ucfg_api.h | 75 +++++++++++ .../dp/dispatcher/src/wlan_dp_ucfg_api.c | 70 ++++++++++ .../target_if/dp/inc/target_if_dp_comp.h | 50 +++++++ .../target_if/dp/src/target_if_dp_comp.c | 40 ++++++ os_if/dp/inc/os_if_dp.h | 46 +++++++ os_if/dp/inc/os_if_dp_lro.h | 41 ++++++ os_if/dp/src/os_if_dp.c | 45 +++++++ os_if/dp/src/os_if_dp_lro.c | 28 ++++ os_if/dp/src/os_if_dp_txrx.c | 26 ++++ 24 files changed, 1382 insertions(+) create mode 100644 components/dp/core/inc/wlan_dp_main.h create mode 100644 components/dp/core/inc/wlan_dp_objmgr.h create mode 100644 components/dp/core/inc/wlan_dp_periodic_sta_stats.h create mode 100644 components/dp/core/inc/wlan_dp_priv.h create mode 100644 components/dp/core/inc/wlan_dp_txrx.h create mode 100644 components/dp/core/src/wlan_dp_bus_bandwidth.c create mode 100644 components/dp/core/src/wlan_dp_bus_bandwidth.h create mode 100644 components/dp/core/src/wlan_dp_main.c create mode 100644 components/dp/core/src/wlan_dp_nud_tracking.c create mode 100644 components/dp/core/src/wlan_dp_nud_tracking.h create mode 100644 components/dp/core/src/wlan_dp_periodic_sta_stats.c create mode 100644 components/dp/core/src/wlan_dp_softap_txrx.c create mode 100644 components/dp/core/src/wlan_dp_txrx.c create mode 100644 components/dp/dispatcher/inc/wlan_dp_cfg.h create mode 100644 components/dp/dispatcher/inc/wlan_dp_public_struct.h create mode 100644 components/dp/dispatcher/inc/wlan_dp_ucfg_api.h create mode 100644 components/dp/dispatcher/src/wlan_dp_ucfg_api.c create mode 100644 components/target_if/dp/inc/target_if_dp_comp.h create mode 100644 components/target_if/dp/src/target_if_dp_comp.c create mode 100644 os_if/dp/inc/os_if_dp.h create mode 100644 os_if/dp/inc/os_if_dp_lro.h create mode 100644 os_if/dp/src/os_if_dp.c create mode 100644 os_if/dp/src/os_if_dp_lro.c create mode 100644 os_if/dp/src/os_if_dp_txrx.c diff --git a/components/dp/core/inc/wlan_dp_main.h b/components/dp/core/inc/wlan_dp_main.h new file mode 100644 index 0000000000..b92dcf96d3 --- /dev/null +++ b/components/dp/core/inc/wlan_dp_main.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: wlan_dp_main.h + * + * + */ +#ifndef __WLAN_DP_MAIN_H__ +#define __WLAN_DP_MAIN_H__ + +#include "wlan_dp_public_struct.h" +#include "wlan_dp_priv.h" +#include "wlan_dp_objmgr.h" + +struct wlan_dp_intf* +dp_get_intf_by_macaddr(struct wlan_dp_psoc_context *dp_ctx, + struct qdf_mac_addr *addr); + +QDF_STATUS +dp_vdev_obj_destroy_notification(struct wlan_objmgr_vdev *vdev, void *arg); + +QDF_STATUS +dp_vdev_obj_create_notification(struct wlan_objmgr_vdev *vdev, void *arg); + +QDF_STATUS +dp_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, void *arg); + +QDF_STATUS +dp_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev, void *arg); + +QDF_STATUS +dp_psoc_obj_create_notification(struct wlan_objmgr_psoc *psoc, void *arg); + +QDF_STATUS +dp_psoc_obj_destroy_notification(struct wlan_objmgr_psoc *psoc, void *arg); + +#endif diff --git a/components/dp/core/inc/wlan_dp_objmgr.h b/components/dp/core/inc/wlan_dp_objmgr.h new file mode 100644 index 0000000000..f1747ba94e --- /dev/null +++ b/components/dp/core/inc/wlan_dp_objmgr.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: This file contains various object manager related wrappers and helpers + */ + +#ifndef __WLAN_DP_OBJMGR_H +#define __WLAN_DP_OBJMGR_H + +#include "wlan_cmn.h" +#include "wlan_objmgr_cmn.h" +#include "wlan_objmgr_peer_obj.h" +#include "wlan_objmgr_vdev_obj.h" +#include "wlan_objmgr_pdev_obj.h" +#include "wlan_objmgr_psoc_obj.h" +#include "wlan_utility.h" + +/** + * dp_get_vdev_priv_obj() - Wrapper to retrieve vdev priv obj + * @vdev: vdev pointer + * + * Return: DP vdev private object + */ +static inline struct wlan_dp_intf * +dp_get_vdev_priv_obj(struct wlan_objmgr_vdev *vdev) +{ + return NULL; +} + +/** + * dp_psoc_get_priv() - Wrapper to retrieve psoc priv obj + * @psoc: psoc pointer + * + * Return: DP psoc private object + */ +static inline struct wlan_dp_psoc_context * +dp_psoc_get_priv(struct wlan_objmgr_psoc *psoc) +{ + return NULL; +} +#endif /* __WLAN_DP_OBJMGR_H */ diff --git a/components/dp/core/inc/wlan_dp_periodic_sta_stats.h b/components/dp/core/inc/wlan_dp_periodic_sta_stats.h new file mode 100644 index 0000000000..9d494e5cf7 --- /dev/null +++ b/components/dp/core/inc/wlan_dp_periodic_sta_stats.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: WLAN Host Device Driver periodic STA statistics related implementation + */ + +#if !defined(WLAN_DP_PERIODIC_STA_STATS_H) +#define WLAN_DP_PERIODIC_STA_STATS_H + +#include "wlan_dp_priv.h" +#include "wlan_objmgr_psoc_obj.h" + +#ifdef WLAN_FEATURE_PERIODIC_STA_STATS + +/** + * dp_periodic_sta_stats_config() - Initialize periodic stats configuration + * @config: Pointer to dp configuration + * @psoc: Pointer to psoc + * + * Return: none + */ +void dp_periodic_sta_stats_config(struct wlan_dp_psoc_cfg *config, + struct wlan_objmgr_psoc *psoc); + +/** + * dp_periodic_sta_stats_init() - Initialize periodic stats display flag + * @adapter: Pointer to the station adapter + * + * Return: none + */ +void dp_periodic_sta_stats_init(struct wlan_dp_intf *dp_intf); + +/** + * dp_periodic_sta_stats_display() - Display periodic stats at STA + * @dp_ctx: dp context + * + * Return: none + */ +void dp_periodic_sta_stats_display(struct wlan_dp_psoc_context *dp_ctx); + +/** + * dp_periodic_sta_stats_start() - Start displaying periodic stats for STA + * @adapter: Pointer to the station adapter + * + * Return: none + */ +void dp_periodic_sta_stats_start(struct wlan_dp_intf *dp_intf); + +/** + * dp_periodic_sta_stats_stop() - Stop displaying periodic stats for STA + * @adapter: Pointer to the station adapter + * + * Return: none + */ +void dp_periodic_sta_stats_stop(struct wlan_dp_intf *dp_intf); + +/** + * dp_periodic_sta_stats_mutex_create() - Create mutex for STA periodic stats + * @adapter: Pointer to the station adapter + * + * Return: none + */ +void dp_periodic_sta_stats_mutex_create(struct wlan_dp_intf *dp_intf); + +/** + * dp_periodic_sta_stats_mutex_destroy() - Destroy STA periodic stats mutex + * @adapter: Pointer to the station adapter + * + * Return: none + */ +void dp_periodic_sta_stats_mutex_destroy(struct wlan_dp_intf *dp_intf); + +#else +static inline void +dp_periodic_sta_stats_display(struct wlan_dp_psoc_context *dp_ctx) +{ +} + +static inline void +dp_periodic_sta_stats_config(struct wlan_dp_psoc_cfg *config, + struct wlan_objmgr_psoc *psoc) +{ +} + +static inline void dp_periodic_sta_stats_start(struct wlan_dp_intf *dp_intf) +{ +} + +static inline void dp_periodic_sta_stats_stop(struct wlan_dp_intf *dp_intf) +{ +} + +static inline void +dp_periodic_sta_stats_init(struct wlan_dp_intf *dp_intf) +{ +} + +static inline void +dp_periodic_sta_stats_mutex_create(struct wlan_dp_intf *dp_intf) +{ +} + +static inline void +dp_periodic_sta_stats_mutex_destroy(struct wlan_dp_intf *dp_intf) +{ +} +#endif /* end #ifdef WLAN_FEATURE_PERIODIC_STA_STATS */ +#endif /* end #if !defined(WLAN_DP_PERIODIC_STA_STATS_H) */ diff --git a/components/dp/core/inc/wlan_dp_priv.h b/components/dp/core/inc/wlan_dp_priv.h new file mode 100644 index 0000000000..131595ca5a --- /dev/null +++ b/components/dp/core/inc/wlan_dp_priv.h @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: Declare various struct, macros which are used for private to DP. + * + * Note: This file shall not contain public API's prototype/declarations. + * + */ + +#ifndef _WLAN_DP_PRIV_STRUCT_H_ +#define _WLAN_DP_PRIV_STRUCT_H_ + +#include "wlan_dp_public_struct.h" +#include "cdp_txrx_cmn.h" +#include "hdd_dp_cfg.h" +#include "wlan_dp_cfg.h" +#include "wlan_dp_objmgr.h" +#include +#include "qdf_periodic_work.h" + +#if defined(WLAN_FEATURE_DP_BUS_BANDWIDTH) && defined(FEATURE_RUNTIME_PM) + +/** + * struct dp_rtpm_tput_policy_context - RTPM throughput policy context + */ +struct dp_rtpm_tput_policy_context { +}; +#endif + +struct wlan_dp_psoc_cfg { +}; + +/** + * struct tx_rx_histogram - structure to keep track of tx and rx packets + * received over 100ms intervals + */ +struct tx_rx_histogram { +}; + +struct dp_tx_rx_stats { +}; + +struct dp_stats { + struct dp_tx_rx_stats tx_rx_stats; +}; + +/** + * struct wlan_dp_intf - DP interface object related info + * @dp_ctx: DP context reference + */ +struct wlan_dp_intf { + struct wlan_dp_psoc_context *dp_ctx; +}; + +/** + * struct wlan_dp_psoc_context - psoc related data required for DP + */ +struct wlan_dp_psoc_context { +}; + +#endif /* end of _WLAN_DP_PRIV_STRUCT_H_ */ diff --git a/components/dp/core/inc/wlan_dp_txrx.h b/components/dp/core/inc/wlan_dp_txrx.h new file mode 100644 index 0000000000..3536d8792c --- /dev/null +++ b/components/dp/core/inc/wlan_dp_txrx.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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. + */ + +#ifndef __WLAN_DP_TXRX_H__ +#define __WLAN_DP_TXRX_H__ + +#include +#include +#include + +/** + * dp_softap_start_xmit() - Transmit a frame for SAP interface + * @nbuf: pointer to Network buffer + * @dp_intf: DP interface + * + * Return: QDF_STATUS_SUCCESS on successful transmission + */ +QDF_STATUS +dp_softap_start_xmit(qdf_nbuf_t nbuf, struct wlan_dp_intf *dp_intf); + +/** + * dp_softap_rx_packet_cbk() - Receive packet handler for SAP + * @dp_intf_context: pointer to DP interface context + * @rxBuf: pointer to rx qdf_nbuf + * + * Receive callback registered with data path. DP will call this to notify + * when one or more packets were received for a registered + * STA. + * + * Return: QDF_STATUS_E_FAILURE if any errors encountered, + * QDF_STATUS_SUCCESS otherwise + */ +QDF_STATUS +dp_softap_rx_packet_cbk(void *intf_ctx, qdf_nbuf_t rx_buf); + +/** + * dp_start_xmit() - Transmit a frame for STA interface + * @nbuf: pointer to Network buffer + * @dp_intf: DP interface + * + * Return: QDF_STATUS_SUCCESS on successful transmission + */ +QDF_STATUS +dp_start_xmit(struct wlan_dp_intf *dp_intf, qdf_nbuf_t nbuf); + +/** + * dp_rx_packet_cbk() - Receive packet handler + * @dp_intf_context: pointer to DP interface context + * @rx_buf: pointer to rx qdf_nbuf + * + * Receive callback registered with data path. DP will call this to notify + * when one or more packets were received for a registered + * STA. + * + * Return: QDF_STATUS_E_FAILURE if any errors encountered, + * QDF_STATUS_SUCCESS otherwise + */ +QDF_STATUS dp_rx_packet_cbk(void *dp_intf_context, qdf_nbuf_t rx_buf); + +#endif diff --git a/components/dp/core/src/wlan_dp_bus_bandwidth.c b/components/dp/core/src/wlan_dp_bus_bandwidth.c new file mode 100644 index 0000000000..a6714aaf80 --- /dev/null +++ b/components/dp/core/src/wlan_dp_bus_bandwidth.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: wlan_dp_bus_bandwidth.c + * + * Bus Bandwidth Manager implementation + */ + +#include "wlan_dp_bus_bandwidth.h" +#include "wlan_dp_main.h" +#include +#include "cds_api.h" + +void dp_bbm_apply_independent_policy(struct wlan_objmgr_psoc *psoc, + struct bbm_params *params) +{ +} + +int dp_bbm_context_init(struct wlan_objmgr_psoc *psoc) +{ + return 0; +} + +void dp_bbm_context_deinit(struct wlan_objmgr_psoc *psoc) +{ +} + diff --git a/components/dp/core/src/wlan_dp_bus_bandwidth.h b/components/dp/core/src/wlan_dp_bus_bandwidth.h new file mode 100644 index 0000000000..5eb32e6240 --- /dev/null +++ b/components/dp/core/src/wlan_dp_bus_bandwidth.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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. + */ + +#if !defined(WLAN_DP_BUS_BANDWIDTH_H) +#define WLAN_DP_BUS_BANDWIDTH_H +/** + * DOC: wlan_dp_bus_bandwidth.h + * + * Bus Bandwidth Manager implementation + */ + +#include +#include +#include + +#ifdef FEATURE_BUS_BANDWIDTH_MGR + +/** + * struct bbm_params - BBM params + * + */ +struct bbm_params { +}; + +/** + * dp_bbm_context_init() - Initialize BBM context + * @dp_ctx: DP context + * + * Returns: error code + */ +int dp_bbm_context_init(struct wlan_objmgr_psoc *psoc); + +/** + * dp_bbm_context_deinit() - De-initialize BBM context + * @dp_ctx: DP context + * + * Returns: None + */ +void dp_bbm_context_deinit(struct wlan_objmgr_psoc *psoc); + +/** + * dp_bbm_apply_independent_policy() - Function to apply independent policies + * to set the bus bw level + * @dp_ctx: DP context + * @params: BBM policy related params + * + * The function applies BBM related policies and appropriately sets the bus + * bandwidth level. + * + * Returns: None + */ +void dp_bbm_apply_independent_policy(struct wlan_objmgr_psoc *psoc, + struct bbm_params *params); +#else +static inline int dp_bbm_context_init(struct wlan_objmgr_psoc *psoc) +{ + return 0; +} + +static inline void dp_bbm_context_deinit(struct wlan_objmgr_psoc *psoc) +{ +} + +static inline +void dp_bbm_apply_independent_policy(struct wlan_objmgr_psoc *psoc, + struct bbm_params *params) +{ +} +#endif /* FEATURE_BUS_BANDWIDTH_MGR */ +#endif /* WLAN_DP_BUS_BANDWIDTH_H */ diff --git a/components/dp/core/src/wlan_dp_main.c b/components/dp/core/src/wlan_dp_main.c new file mode 100644 index 0000000000..2a48e950a9 --- /dev/null +++ b/components/dp/core/src/wlan_dp_main.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: wlan_dp_main.c + * + * + */ +#include "wlan_dp_main.h" +#include "wlan_dp_public_struct.h" +#include "cfg_ucfg_api.h" + +/** + * dp_get_intf_by_macaddr() - Get DP interface by mac address. + * @dp_ctx: dp_ctx handle + * @addr: MAC address + * + * Return: DP interface on success else NULL. + */ +struct wlan_dp_intf* +dp_get_intf_by_macaddr(struct wlan_dp_psoc_context *dp_ctx, + struct qdf_mac_addr *addr) +{ + return NULL; +} + +/** + * dp_vdev_obj_create_notification() - DP vdev object creation notification + * @vdev: vdev handle + * @arg_list: arguments list + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS +dp_vdev_obj_create_notification(struct wlan_objmgr_vdev *vdev, void *arg) +{ + return QDF_STATUS_SUCCESS; +} + +/** + * dp_vdev_obj_destroy_notification() - DP vdev object destroy notification + * @vdev: vdev handle + * @arg_list: arguments list + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS +dp_vdev_obj_destroy_notification(struct wlan_objmgr_vdev *vdev, void *arg) + +{ + return QDF_STATUS_SUCCESS; +} + +/** + * dp_pdev_obj_create_notification() - DP pdev object creation notification + * @pdev: pdev handle + * @arg_list: arguments list + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS +dp_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, void *arg) +{ + return QDF_STATUS_SUCCESS; +} + +/** + * dp_pdev_obj_destroy_notification() - DP pdev object destroy notification + * @pdev: pdev handle + * @arg_list: arguments list + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS +dp_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev, void *arg) +{ + return QDF_STATUS_SUCCESS; +} + +/** + * dp_psoc_obj_create_notification() - DP pdev object creation notification + * @psoc: psoc handle + * @arg_list: arguments list + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS +dp_psoc_obj_create_notification(struct wlan_objmgr_psoc *psoc, void *arg) +{ + return QDF_STATUS_SUCCESS; +} + +/** + * dp_psoc_obj_destroy_notification() - DP psoc object destroy notification + * @psoc: psoc handle + * @arg_list: arguments list + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS +dp_psoc_obj_destroy_notification(struct wlan_objmgr_psoc *psoc, void *arg) +{ + return QDF_STATUS_SUCCESS; +} diff --git a/components/dp/core/src/wlan_dp_nud_tracking.c b/components/dp/core/src/wlan_dp_nud_tracking.c new file mode 100644 index 0000000000..77a674c114 --- /dev/null +++ b/components/dp/core/src/wlan_dp_nud_tracking.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 nud event tracking main function definitions + */ + +#include "osif_sync.h" +#include "wlan_dp_main.h" +#include "wlan_dlm_ucfg_api.h" +#include "wlan_dp_cfg.h" +#include +#include "wlan_cm_roam_ucfg_api.h" +#include +#include "wlan_dp_nud_tracking.h" + +#ifdef WLAN_NUD_TRACKING +void dp_nud_deinit_tracking(struct wlan_dp_intf *dp_intf) +{ +} + +void dp_nud_init_tracking(struct wlan_dp_intf *dp_intf) +{ +} +#endif diff --git a/components/dp/core/src/wlan_dp_nud_tracking.h b/components/dp/core/src/wlan_dp_nud_tracking.h new file mode 100644 index 0000000000..6f4ef14ca0 --- /dev/null +++ b/components/dp/core/src/wlan_dp_nud_tracking.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 nud event tracking function declarations + */ + +#ifndef _WLAN_DP_NUD_TRACKING_H_ +#define _WLAN_DP_NUD_TRACKING_H_ + +#ifdef WLAN_NUD_TRACKING + +/** + * dp_nud_init_tracking() - initialize NUD tracking + * @dp_intf: Pointer to dp interface + * + * Return: None + */ +void dp_nud_init_tracking(struct wlan_dp_intf *dp_intf); + +/** + * dp_nud_deinit_tracking() - deinitialize NUD tracking + * @dp_intf: Pointer to dp interface + * + * Return: None + */ +void dp_nud_deinit_tracking(struct wlan_dp_intf *dp_intf); + +#else +static inline void dp_nud_init_tracking(struct wlan_dp_intf *dp_intf) +{ +} + +static inline void dp_nud_deinit_tracking(struct wlan_dp_intf *dp_intf) +{ +} +#endif +#endif diff --git a/components/dp/core/src/wlan_dp_periodic_sta_stats.c b/components/dp/core/src/wlan_dp_periodic_sta_stats.c new file mode 100644 index 0000000000..6d5dd11eac --- /dev/null +++ b/components/dp/core/src/wlan_dp_periodic_sta_stats.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: WLAN Host Device Driver periodic STA statistics related implementation + */ + +#include "cfg_ucfg_api.h" +#include "wlan_dp_periodic_sta_stats.h" + +void dp_periodic_sta_stats_display(struct wlan_dp_psoc_context *dp_ctx) +{ +} + +void dp_periodic_sta_stats_config(struct dp_config *config, + struct wlan_objmgr_psoc *psoc) +{ +} + +void dp_periodic_sta_stats_start(struct wlan_dp_intf *dp_intf) +{ +} + +void dp_periodic_sta_stats_stop(struct wlan_dp_intf *dp_intf) +{ +} + +void dp_periodic_sta_stats_init(struct wlan_dp_intf *dp_intf) +{ +} + +void dp_periodic_sta_stats_mutex_create(struct wlan_dp_intf *dp_intf) +{ +} + +void dp_periodic_sta_stats_mutex_destroy(struct wlan_dp_intf *dp_intf) +{ +} diff --git a/components/dp/core/src/wlan_dp_softap_txrx.c b/components/dp/core/src/wlan_dp_softap_txrx.c new file mode 100644 index 0000000000..9e6ac2e0e4 --- /dev/null +++ b/components/dp/core/src/wlan_dp_softap_txrx.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: wlan_dp_softap_txrx.c + * DP Soft AP TX/RX path implementation + * + * + */ + +#include +#include +#include + +QDF_STATUS dp_softap_start_xmit(qdf_nbuf_t nbuf, struct wlan_dp_intf *dp_intf) +{ + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS dp_softap_rx_packet_cbk(void *intf_ctx, qdf_nbuf_t rx_buf) +{ + return QDF_STATUS_SUCCESS; +} diff --git a/components/dp/core/src/wlan_dp_txrx.c b/components/dp/core/src/wlan_dp_txrx.c new file mode 100644 index 0000000000..11ed2a1c9f --- /dev/null +++ b/components/dp/core/src/wlan_dp_txrx.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: wlan_dp_txrx.c + * DP TX/RX path implementation + * + * + */ + +#include +#include +#include + +QDF_STATUS +dp_start_xmit(struct wlan_dp_intf *dp_intf, qdf_nbuf_t nbuf) +{ + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +dp_rx_packet_cbk(void *dp_intf_context, qdf_nbuf_t rx_buf) +{ + return QDF_STATUS_SUCCESS; +} diff --git a/components/dp/dispatcher/inc/wlan_dp_cfg.h b/components/dp/dispatcher/inc/wlan_dp_cfg.h new file mode 100644 index 0000000000..b18ae5d6bd --- /dev/null +++ b/components/dp/dispatcher/inc/wlan_dp_cfg.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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. + */ + +#ifndef WLAN_DP_CFG_H__ +#define WLAN_DP_CFG_H__ + +#define CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST_LEN 30 + +#ifdef CONFIG_DP_TRACE +/* Max length of gDptraceConfig string. e.g.- "1, 6, 1, 62" */ +#define DP_TRACE_CONFIG_STRING_LENGTH (20) + +/* At max 4 DP Trace config parameters are allowed. Refer - gDptraceConfig */ +#define DP_TRACE_CONFIG_NUM_PARAMS (4) + +/* + * Default value of live mode in case it cannot be determined from cfg string + * gDptraceConfig + */ +#define DP_TRACE_CONFIG_DEFAULT_LIVE_MODE (1) + +/* + * Default value of thresh (packets/second) beyond which DP Trace is disabled. + * Use this default in case the value cannot be determined from cfg string + * gDptraceConfig + */ +#define DP_TRACE_CONFIG_DEFAULT_THRESH (6) + +/* + * Number of intervals of BW timer to wait before enabling/disabling DP Trace. + * Since throughput threshold to disable live logging for DP Trace is very low, + * we calculate throughput based on # packets received in a second. + * For example assuming bandwidth timer interval is 100ms, and if more than 6 + * prints are received in 10 * 100 ms interval, we want to disable DP Trace + * live logging. DP_TRACE_CONFIG_DEFAULT_THRESH_TIME_LIMIT is the default + * value, to be used in case the real value cannot be derived from + * bw timer interval + */ +#define DP_TRACE_CONFIG_DEFAULT_THRESH_TIME_LIMIT (10) + +#endif +#endif /* WLAN_DP_CFG_H__ */ diff --git a/components/dp/dispatcher/inc/wlan_dp_public_struct.h b/components/dp/dispatcher/inc/wlan_dp_public_struct.h new file mode 100644 index 0000000000..a44363ef0e --- /dev/null +++ b/components/dp/dispatcher/inc/wlan_dp_public_struct.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 DP public data structure definations. + * + */ + +#ifndef _WLAN_DP_PUBLIC_STRUCT_H_ +#define _WLAN_DP_PUBLIC_STRUCT_H_ + +#include "wlan_cmn.h" +#include "wlan_objmgr_cmn.h" +#include "wlan_objmgr_global_obj.h" +#include "wmi_unified.h" +#include "qdf_status.h" + +/** + * struct wlan_dp_psoc_callbacks - struct containing callback + * to non-converged driver + * @os_if_dp_gro_rx: OS IF Callback to handle GRO packet to n/w stack + */ +struct wlan_dp_psoc_callbacks { + void (*os_if_dp_gro_rx)(struct sk_buff *skb, uint8_t napi_to_use, + bool flush_gro); +}; + +struct wlan_dp_psoc_sb_ops { + /*TODO to add target if TX ops*/ +}; + +struct wlan_dp_psoc_nb_ops { + /*TODO to add target if RX ops*/ +}; + +/** + * struct wlan_dp_user_config - DP component user config + * @ipa_enable: IPA enabled/disabled config + */ +struct wlan_dp_user_config { + bool ipa_enable; +}; + +#endif /* end of _WLAN_DP_PUBLIC_STRUCT_H_ */ diff --git a/components/dp/dispatcher/inc/wlan_dp_ucfg_api.h b/components/dp/dispatcher/inc/wlan_dp_ucfg_api.h new file mode 100644 index 0000000000..4c1af012f8 --- /dev/null +++ b/components/dp/dispatcher/inc/wlan_dp_ucfg_api.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: wlan_dp_ucfg_api.h + * + * TDLS north bound interface declaration + */ + +#if !defined(_WLAN_DP_UCFG_API_H_) +#define _WLAN_DP_UCFG_API_H_ + +#include +#include +#include +#include +#include +#include + +void ucfg_dp_update_inf_mac(struct wlan_objmgr_psoc *psoc, + struct qdf_mac_addr *cur_mac, + struct qdf_mac_addr *new_mac); + +QDF_STATUS ucfg_dp_destroy_intf(struct wlan_objmgr_psoc *psoc, + struct qdf_mac_addr *intf_addr); + +/** + * ucfg_dp_create_intf() - DP module interface creation + * + */ +QDF_STATUS ucfg_dp_create_intf(struct wlan_objmgr_psoc *psoc, + struct qdf_mac_addr *intf_addr); + +/** + * ucfg_dp_init() - DP module initialization API + * + * Return: QDF_STATUS + */ +QDF_STATUS ucfg_dp_init(void); + +/** + * ucfg_dp_deinit() - DP module deinitialization API + * + * Return: QDF_STATUS + */ +QDF_STATUS ucfg_dp_deinit(void); + +/** + * ucfg_dp_update_config() - DP module config update + * + * Return: QDF_STATUS + */ +QDF_STATUS +ucfg_dp_update_config(struct wlan_objmgr_psoc *psoc, + struct wlan_dp_user_config *req); + +uint64_t +ucfg_dp_get_rx_softirq_yield_duration(struct wlan_objmgr_psoc *psoc); + +#endif diff --git a/components/dp/dispatcher/src/wlan_dp_ucfg_api.c b/components/dp/dispatcher/src/wlan_dp_ucfg_api.c new file mode 100644 index 0000000000..546b769766 --- /dev/null +++ b/components/dp/dispatcher/src/wlan_dp_ucfg_api.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: public API related to the DP called by north bound HDD/OSIF + */ + +#include "wlan_dp_ucfg_api.h" +#include "wlan_dp_main.h" +#include "wlan_dp_objmgr.h" +#include "cdp_txrx_cmn.h" +#include "cfg_ucfg_api.h" + +void ucfg_dp_update_inf_mac(struct wlan_objmgr_psoc *psoc, + struct qdf_mac_addr *cur_mac, + struct qdf_mac_addr *new_mac) +{ +} + +QDF_STATUS +ucfg_dp_create_intf(struct wlan_objmgr_psoc *psoc, + struct qdf_mac_addr *intf_addr) +{ + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +ucfg_dp_destroy_intf(struct wlan_objmgr_psoc *psoc, + struct qdf_mac_addr *intf_addr) +{ + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS ucfg_dp_init(void) +{ + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS ucfg_dp_deinit(void) +{ + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +ucfg_dp_update_config(struct wlan_objmgr_psoc *psoc, + struct wlan_dp_user_config *req) +{ + return QDF_STATUS_SUCCESS; +} + +uint64_t +ucfg_dp_get_rx_softirq_yield_duration(struct wlan_objmgr_psoc *psoc) +{ + return 0; +} diff --git a/components/target_if/dp/inc/target_if_dp_comp.h b/components/target_if/dp/inc/target_if_dp_comp.h new file mode 100644 index 0000000000..56c558385b --- /dev/null +++ b/components/target_if/dp/inc/target_if_dp_comp.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: target_if_dp_comp.h + */ + +#ifndef _WLAN_DP_COMP_TGT_IF_H_ +#define _WLAN_DP_COMP_TGT_IF_H_ + +#include "qdf_types.h" +#include "wlan_dp_public_struct.h" +#include +#include +#include +#include +#include +#include +#include + +/** + * target_if_dp_register_tx_ops() - registers dp tx ops + * @sb_ops: tx ops + * + * Return: none + */ +void target_if_dp_register_tx_ops(struct wlan_dp_psoc_sb_ops *sb_ops); + +/** + * target_if_dp_register_rx_ops() - registers dp rx ops + * @nb_ops: rx ops + * + * Return: none + */ +void target_if_dp_register_rx_ops(struct wlan_dp_psoc_nb_ops *nb_ops); + +#endif diff --git a/components/target_if/dp/src/target_if_dp_comp.c b/components/target_if/dp/src/target_if_dp_comp.c new file mode 100644 index 0000000000..0ccdfe181c --- /dev/null +++ b/components/target_if/dp/src/target_if_dp_comp.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: target_if_dp_comp.c + */ + +#include "target_if_dp_comp.h" +#include "target_if.h" +#include "qdf_status.h" +#include "wmi.h" +#include "wmi_unified_api.h" +#include "wmi_unified_priv.h" +#include "wmi_unified_param.h" +#include "wlan_objmgr_psoc_obj.h" +#include "wlan_dp_public_struct.h" +#include "cdp_txrx_cmn.h" +#include "wlan_dp_main.h" +#include + +void target_if_dp_register_tx_ops(struct wlan_dp_psoc_sb_ops *sb_ops) +{ +} + +void target_if_dp_register_rx_ops(struct wlan_dp_psoc_nb_ops *nb_ops) +{ +} diff --git a/os_if/dp/inc/os_if_dp.h b/os_if/dp/inc/os_if_dp.h new file mode 100644 index 0000000000..415a825c35 --- /dev/null +++ b/os_if/dp/inc/os_if_dp.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: os_if_dp.h + * + * + */ +#ifndef __OSIF_DP_H__ +#define __OSIF_DP_H__ + +#include "wlan_dp_public_struct.h" + +/** + * osif_dp_classify_pkt() - classify packet + * @skb - sk buff + * + * Return: None + */ +void osif_dp_classify_pkt(struct sk_buff *skb); + +#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH +void osif_dp_send_tcp_param_update_event(struct wlan_objmgr_psoc *psoc, + void *data, uint8_t dir); +#else +static inline +void osif_dp_send_tcp_param_update_event(struct wlan_objmgr_psoc *psoc, + void *data, uint8_t dir) +{ +} +#endif /* WLAN_FEATURE_DP_BUS_BANDWIDTH */ +#endif /* __OSIF_DP_H__ */ diff --git a/os_if/dp/inc/os_if_dp_lro.h b/os_if/dp/inc/os_if_dp_lro.h new file mode 100644 index 0000000000..e13e822665 --- /dev/null +++ b/os_if/dp/inc/os_if_dp_lro.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 : osif_dp_lro.h + * + * WLAN Host Device Driver file for DP LRO support. + * + */ + +#ifndef _OSIF_DP_LRO_H_ +#define _OSIF_DP_LRO_H_ + +#include +#include + +/** + * osif_dp_lro_rx() - Handle Rx processing via LRO + * @vdev: Vdev obj mgr + * @nbuf: network buffer + * + * Return: QDF_STATUS_SUCCESS if processed via LRO or non zero return code + */ +QDF_STATUS osif_dp_lro_rx(struct wlan_objmgr_vdev *vdev, qdf_nbuf_t nbuf); + +#endif /* _OSIF_DP_LRO_H_ */ diff --git a/os_if/dp/src/os_if_dp.c b/os_if/dp/src/os_if_dp.c new file mode 100644 index 0000000000..35bca398a5 --- /dev/null +++ b/os_if/dp/src/os_if_dp.c @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: os_if_dp.c + * + * + */ +#include "os_if_dp.h" +#include "wlan_nlink_srv.h" +#include +#include +#include +#include "qca_vendor.h" + +#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH +/** + * osif_dp_send_tcp_param_update_event() - Send vendor event to update + * TCP parameter through Wi-Fi HAL + * @psoc: Pointer to psoc context + * @data: Parameters to update + * @dir: Direction(tx/rx) to update + * + * Return: None + */ +void osif_dp_send_tcp_param_update_event(struct wlan_objmgr_psoc *psoc, + void *data, + uint8_t dir) +{ +} +#endif /*WLAN_FEATURE_DP_BUS_BANDWIDTH*/ diff --git a/os_if/dp/src/os_if_dp_lro.c b/os_if/dp/src/os_if_dp_lro.c new file mode 100644 index 0000000000..efad7cff87 --- /dev/null +++ b/os_if/dp/src/os_if_dp_lro.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: osif_dp_lro.c + * This file contains DP component's LRO osif API implementation + */ +#include +#include "os_if_dp_lro.h" + +QDF_STATUS osif_dp_lro_rx(struct wlan_objmgr_vdev *vdev, qdf_nbuf_t nbuf) +{ + return QDF_STATUS_SUCCESS; +} + diff --git a/os_if/dp/src/os_if_dp_txrx.c b/os_if/dp/src/os_if_dp_txrx.c new file mode 100644 index 0000000000..093c79cdf9 --- /dev/null +++ b/os_if/dp/src/os_if_dp_txrx.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: osif_dp_txrx.c + * This file contains DP component's TX/RX osif API implementation + */ +#include +#include "os_if_dp.h" + +void osif_dp_classify_pkt(struct sk_buff *skb) +{ +}