diff --git a/dp/inc/cdp_txrx_cfg.h b/dp/inc/cdp_txrx_cfg.h index 4c88b815d3..acb1bc54c1 100644 --- a/dp/inc/cdp_txrx_cfg.h +++ b/dp/inc/cdp_txrx_cfg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019,2021 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 @@ -23,6 +23,8 @@ #ifndef _CDP_TXRX_CFG_H_ #define _CDP_TXRX_CFG_H_ #include "cdp_txrx_handle.h" +#include + /** * cdp_cfg_set_rx_fwd_disabled() - enable/disable rx forwarding * @soc - data path soc handle @@ -38,8 +40,7 @@ cdp_cfg_set_rx_fwd_disabled(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev, uint8_t disable_rx_fwd) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -67,8 +68,7 @@ cdp_cfg_set_packet_log_enabled(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev, uint8_t val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -96,8 +96,7 @@ static inline struct cdp_cfg qdf_device_t osdev, void *cfg_param) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return NULL; } @@ -124,8 +123,7 @@ cdp_cfg_vdev_rx_set_intrabss_fwd(ol_txrx_soc_handle soc, uint8_t vdev_id, bool val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -151,8 +149,7 @@ static inline uint8_t cdp_cfg_is_rx_fwd_disabled(ol_txrx_soc_handle soc, struct cdp_vdev *vdev) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return 0; } @@ -179,8 +176,7 @@ cdp_cfg_tx_set_is_mgmt_over_wmi_enabled(ol_txrx_soc_handle soc, uint8_t value) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -206,8 +202,7 @@ static inline int cdp_cfg_is_high_latency(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return 0; } @@ -234,8 +229,7 @@ cdp_cfg_set_flow_control_parameters(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev, void *param) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -261,8 +255,7 @@ static inline void cdp_cfg_set_flow_steering(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev, uint8_t val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -294,8 +287,7 @@ cdp_cfg_set_ptp_rx_opt_enabled(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev, uint8_t val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -321,8 +313,7 @@ cdp_cfg_set_new_htt_msg_format(ol_txrx_soc_handle soc, uint8_t val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); return; } @@ -346,8 +337,7 @@ static inline void cdp_cfg_set_peer_unmap_conf_support(ol_txrx_soc_handle soc, bool val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -371,8 +361,7 @@ static inline bool cdp_cfg_get_peer_unmap_conf_support(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return false; } diff --git a/dp/inc/cdp_txrx_cmn.h b/dp/inc/cdp_txrx_cmn.h index 6ffd543357..4638900e15 100644 --- a/dp/inc/cdp_txrx_cmn.h +++ b/dp/inc/cdp_txrx_cmn.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2021 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 @@ -97,6 +97,24 @@ enum verbose_debug_module { #define dp_warn_rl(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_DP, params) #define dp_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_DP, params) +#define dp_cdp_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_DP_CDP, params) +#define dp_cdp_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_DP_CDP, params) +#define dp_cdp_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_DP_CDP, params) +#define dp_cdp_info(params...) \ + __QDF_TRACE_FL(QDF_TRACE_LEVEL_INFO_HIGH, QDF_MODULE_ID_DP_CDP, ## params) +#define dp_cdp_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_DP_CDP, params) + +#define dp_cdp_nofl_alert(params...) \ + QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_DP_CDP, params) +#define dp_cdp_nofl_err(params...) \ + QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_DP_CDP, params) +#define dp_cdp_nofl_warn(params...) \ + QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_DP_CDP, params) +#define dp_cdp_nofl_info(params...) \ + QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_DP_CDP, params) +#define dp_cdp_nofl_debug(params...) \ + QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_DP_CDP, params) + /** * @enum vdev_host_stats_id: * host stats update from CDP have to set one of the following stats ID @@ -113,8 +131,7 @@ static inline QDF_STATUS cdp_soc_attach_target(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_INVAL; } @@ -133,8 +150,7 @@ cdp_vdev_attach(ol_txrx_soc_handle soc, uint8_t pdev_id, enum wlan_op_mode op_mode, enum wlan_op_subtype subtype) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -163,8 +179,7 @@ static inline QDF_STATUS cdp_flow_pool_map(ol_txrx_soc_handle soc, uint8_t pdev_id, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_INVAL; } @@ -191,8 +206,7 @@ static inline void cdp_flow_pool_unmap(ol_txrx_soc_handle soc, uint8_t pdev_id, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -211,8 +225,7 @@ cdp_vdev_detach(ol_txrx_soc_handle soc, uint8_t vdev_id, ol_txrx_vdev_delete_cb callback, void *cb_context) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -229,8 +242,7 @@ static inline int cdp_pdev_attach_target(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -247,8 +259,7 @@ static inline QDF_STATUS cdp_pdev_attach uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -274,8 +285,7 @@ static inline QDF_STATUS cdp_pdev_attach static inline int cdp_pdev_post_attach(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -304,8 +314,7 @@ static inline void cdp_pdev_pre_detach(ol_txrx_soc_handle soc, uint8_t pdev_id, int force) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -321,8 +330,7 @@ static inline QDF_STATUS cdp_pdev_detach(ol_txrx_soc_handle soc, uint8_t pdev_id, int force) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -338,8 +346,7 @@ static inline void cdp_pdev_deinit(ol_txrx_soc_handle soc, uint8_t pdev_id, int force) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -356,8 +363,7 @@ static inline QDF_STATUS cdp_peer_create uint8_t *peer_mac_addr) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -374,8 +380,7 @@ static inline void cdp_peer_setup (ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -402,8 +407,7 @@ static inline QDF_STATUS cdp_cp_peer_del_response uint8_t *peer_mac_addr) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -434,8 +438,7 @@ static inline bool cdp_peer_get_ast_info_by_soc struct cdp_ast_entry_info *ast_entry_info) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return false; } @@ -468,8 +471,7 @@ static inline bool cdp_peer_get_ast_info_by_pdev struct cdp_ast_entry_info *ast_entry_info) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return false; } @@ -504,8 +506,7 @@ static inline QDF_STATUS cdp_peer_ast_delete_by_soc void *cookie) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_INVAL; } @@ -541,8 +542,7 @@ static inline QDF_STATUS cdp_peer_ast_delete_by_pdev void *cookie) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_INVAL; } @@ -565,8 +565,7 @@ static inline int cdp_peer_add_ast enum cdp_txrx_ast_entry_type type, uint32_t flags) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -589,8 +588,7 @@ static inline QDF_STATUS cdp_peer_reset_ast { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -606,8 +604,7 @@ static inline QDF_STATUS cdp_peer_reset_ast_table (ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -623,8 +620,7 @@ static inline void cdp_peer_flush_ast_table (ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -641,8 +637,7 @@ static inline int cdp_peer_update_ast uint8_t *wds_macaddr, uint32_t flags) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -663,8 +658,7 @@ static inline void cdp_peer_teardown (ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -681,8 +675,7 @@ cdp_peer_delete(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac, uint32_t bitmap) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -713,8 +706,7 @@ cdp_peer_delete_sync(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac, uint32_t bitmap) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -733,8 +725,7 @@ cdp_set_monitor_mode(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t smart_monitor) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -753,8 +744,7 @@ cdp_set_curchan(ol_txrx_soc_handle soc, uint32_t chan_mhz) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -771,8 +761,7 @@ cdp_set_privacy_filters(ol_txrx_soc_handle soc, uint8_t vdev_id, void *filter, uint32_t num) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -806,8 +795,7 @@ cdp_vdev_register(ol_txrx_soc_handle soc, uint8_t vdev_id, struct ol_txrx_ops *txrx_ops) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -825,8 +813,7 @@ cdp_mgmt_send(ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t tx_mgmt_frm, uint8_t type) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -845,8 +832,7 @@ cdp_mgmt_send_ext(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t use_6mbps, uint16_t chanfreq) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -866,8 +852,7 @@ cdp_mgmt_tx_cb_set(ol_txrx_soc_handle soc, uint8_t pdev_id, ol_txrx_mgmt_tx_cb ota_ack_cb, void *ctxt) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -897,8 +882,7 @@ cdp_peer_unmap_sync_cb_set(ol_txrx_soc_handle soc, uint16_t *peerid_list)) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -924,8 +908,7 @@ cdp_data_tx_cb_set(ol_txrx_soc_handle soc, uint8_t vdev_id, ol_txrx_data_tx_cb callback, void *ctxt) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -965,8 +948,7 @@ cdp_aggr_cfg(ol_txrx_soc_handle soc, uint8_t vdev_id, int max_subfrms_amsdu) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -985,8 +967,7 @@ cdp_fw_stats_get(ol_txrx_soc_handle soc, uint8_t vdev_id, bool response_expected) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1003,8 +984,7 @@ static inline int cdp_debug(ol_txrx_soc_handle soc, uint8_t vdev_id, int debug_specs) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1021,8 +1001,7 @@ cdp_fw_stats_cfg(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t cfg_stats_type, uint32_t cfg_val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -1038,8 +1017,7 @@ cdp_fw_stats_cfg(ol_txrx_soc_handle soc, static inline void cdp_print_level_set(ol_txrx_soc_handle soc, unsigned level) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1063,8 +1041,7 @@ static inline uint8_t * cdp_get_vdev_mac_addr(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return NULL; } @@ -1093,8 +1070,7 @@ void cdp_get_os_rx_handles_from_vdev(ol_txrx_soc_handle soc, ol_osif_vdev_handle *osif_handle_p) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1119,8 +1095,7 @@ static inline struct cdp_cfg * cdp_get_ctrl_pdev_from_vdev(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return NULL; } @@ -1144,8 +1119,7 @@ static inline uint8_t cdp_get_mon_vdev_from_pdev(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return -EINVAL; } @@ -1161,8 +1135,7 @@ static inline void cdp_soc_detach(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1194,8 +1167,7 @@ cdp_soc_init(ol_txrx_soc_handle soc, u_int16_t devid, struct ol_if_ops *dp_ol_if_ops) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return NULL; } @@ -1228,8 +1200,7 @@ cdp_pdev_init(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1253,8 +1224,7 @@ static inline void cdp_soc_deinit(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1279,8 +1249,7 @@ static inline QDF_STATUS cdp_tso_soc_attach(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1305,8 +1274,7 @@ static inline QDF_STATUS cdp_tso_soc_detach(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1335,8 +1303,7 @@ static inline int cdp_addba_resp_tx_completion(ol_txrx_soc_handle soc, uint8_t tid, int status) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1354,8 +1321,7 @@ static inline int cdp_addba_requestprocess(ol_txrx_soc_handle soc, uint16_t batimeout, uint16_t buffersize, uint16_t startseqnum) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1377,8 +1343,7 @@ cdp_addba_responsesetup(ol_txrx_soc_handle soc, uint16_t *batimeout) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -1397,8 +1362,7 @@ static inline int cdp_delba_process(ol_txrx_soc_handle soc, uint8_t *peer_mac, uint16_t reasoncode) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1429,8 +1393,7 @@ static inline int cdp_delba_tx_completion(ol_txrx_soc_handle soc, uint8_t tid, int status) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1450,8 +1413,7 @@ cdp_set_addbaresponse(ol_txrx_soc_handle soc, uint16_t statuscode) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -1477,8 +1439,7 @@ cdp_set_vdev_dscp_tid_map(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t map_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -1506,8 +1467,7 @@ QDF_STATUS cdp_set_vlan_groupkey(ol_txrx_soc_handle soc, uint8_t vdev_id, uint16_t vlan_id, uint16_t group_key) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1532,8 +1492,7 @@ static inline int cdp_ath_get_total_per(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1558,8 +1517,7 @@ static inline void cdp_set_pdev_dscp_tid_map(ol_txrx_soc_handle soc, uint8_t pdev_id, uint8_t map_id, uint8_t tos, uint8_t tid) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1580,8 +1538,7 @@ static inline void cdp_set_pdev_dscp_tid_map(ol_txrx_soc_handle soc, static inline void cdp_flush_cache_rx_queue(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1605,8 +1562,7 @@ int cdp_txrx_stats_request(ol_txrx_soc_handle soc, uint8_t vdev_id, struct cdp_txrx_stats_req *req) { if (!soc || !soc->ops || !soc->ops->cmn_drv_ops || !req) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_ASSERT(0); return 0; } @@ -1625,8 +1581,7 @@ int cdp_txrx_stats_request(ol_txrx_soc_handle soc, uint8_t vdev_id, static inline QDF_STATUS cdp_txrx_intr_attach(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1645,8 +1600,7 @@ static inline QDF_STATUS cdp_txrx_intr_attach(ol_txrx_soc_handle soc) static inline void cdp_txrx_intr_detach(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1668,8 +1622,7 @@ cdp_display_stats(ol_txrx_soc_handle soc, uint16_t value, enum qdf_stats_verbosity_level level) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1695,8 +1648,7 @@ static inline int cdp_set_pn_check(ol_txrx_soc_handle soc, enum cdp_sec_type sec_type, uint32_t *rx_pn) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1725,8 +1677,7 @@ static inline int cdp_set_key_sec_type(ol_txrx_soc_handle soc, bool is_unicast) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1747,8 +1698,7 @@ cdp_set_key(ol_txrx_soc_handle soc, bool is_unicast, uint32_t *key) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -1776,8 +1726,7 @@ QDF_STATUS cdp_update_config_parameters(ol_txrx_soc_handle soc, struct cdp_soc *psoc = (struct cdp_soc *)soc; if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1801,8 +1750,7 @@ static inline void * cdp_pdev_get_dp_txrx_handle(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1826,8 +1774,7 @@ cdp_pdev_set_dp_txrx_handle(ol_txrx_soc_handle soc, uint8_t pdev_id, void *dp_hdl) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1850,8 +1797,7 @@ static inline void * cdp_vdev_get_dp_ext_txrx_handle(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -1876,8 +1822,7 @@ cdp_vdev_set_dp_ext_txrx_handle(ol_txrx_soc_handle soc, uint8_t vdev_id, uint16_t size) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -1901,8 +1846,7 @@ static inline void * cdp_soc_get_dp_txrx_handle(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return NULL; } @@ -1925,8 +1869,7 @@ static inline void cdp_soc_set_dp_txrx_handle(ol_txrx_soc_handle soc, void *dp_handle) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -1951,8 +1894,7 @@ cdp_soc_handle_mode_change(ol_txrx_soc_handle soc, uint8_t pdev_id, uint32_t lmac_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -1977,8 +1919,7 @@ cdp_soc_map_pdev_to_lmac(ol_txrx_soc_handle soc, uint8_t pdev_id, uint32_t lmac_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -2005,8 +1946,7 @@ cdp_txrx_set_pdev_status_down(ol_txrx_soc_handle soc, bool is_pdev_down) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -2034,8 +1974,7 @@ static inline void cdp_tx_send(ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t nbuf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -2065,8 +2004,7 @@ QDF_STATUS cdp_set_pdev_pcp_tid_map(ol_txrx_soc_handle soc, uint32_t pcp, uint32_t tid) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); return QDF_STATUS_E_INVAL; } @@ -2259,8 +2197,7 @@ cdp_txrx_classify_and_update(ol_txrx_soc_handle soc, struct ol_txrx_nbuf_classify *nbuf_class) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -2348,8 +2285,7 @@ static inline void cdp_set_ba_timeout(ol_txrx_soc_handle soc, uint8_t ac, uint32_t value) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return; } @@ -2374,8 +2310,7 @@ static inline void cdp_get_ba_timeout(ol_txrx_soc_handle soc, uint8_t ac, uint32_t *value) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return; } @@ -2398,8 +2333,7 @@ static inline void cdp_get_ba_timeout(ol_txrx_soc_handle soc, static inline uint32_t cdp_cfg_get(ol_txrx_soc_handle soc, enum cdp_dp_cfg cfg) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); return 0; } @@ -2421,8 +2355,7 @@ cdp_soc_set_rate_stats_ctx(ol_txrx_soc_handle soc, void *ctx) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -2445,8 +2378,7 @@ static inline void* cdp_soc_get_rate_stats_ctx(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return NULL; } @@ -2469,8 +2401,7 @@ cdp_peer_flush_rate_stats(ol_txrx_soc_handle soc, uint8_t pdev_id, void *buf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -2493,8 +2424,7 @@ static inline void uint8_t *mac_addr) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return NULL; } @@ -2517,8 +2447,7 @@ static inline QDF_STATUS cdp_flush_rate_stats_request(struct cdp_soc_t *soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -2549,8 +2478,7 @@ QDF_STATUS cdp_set_vdev_pcp_tid_map(ol_txrx_soc_handle soc, uint8_t pcp, uint8_t tid) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); return QDF_STATUS_E_INVAL; } @@ -2580,8 +2508,7 @@ cdp_tx_send_exc(ol_txrx_soc_handle soc, struct cdp_tx_exception_metadata *tx_exc_metadata) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -2611,8 +2538,7 @@ cdp_vdev_get_peer_mac_list(ol_txrx_soc_handle soc, uint16_t mac_cnt, bool limit) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -2640,8 +2566,7 @@ static inline QDF_STATUS cdp_soc_config_full_mon_mode(ol_txrx_soc_handle soc, uint8_t val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); return QDF_STATUS_E_INVAL; } @@ -2675,8 +2600,7 @@ static inline uint16_t cdp_wds_ext_get_peer_id(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *mac) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -2695,8 +2619,7 @@ cdp_wds_ext_set_peer_rx(ol_txrx_soc_handle soc, uint8_t vdev_id, ol_osif_peer_handle osif_peer) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAULT; } diff --git a/dp/inc/cdp_txrx_ctrl.h b/dp/inc/cdp_txrx_ctrl.h index c719318b64..2ee84b8ea3 100644 --- a/dp/inc/cdp_txrx_ctrl.h +++ b/dp/inc/cdp_txrx_ctrl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 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 @@ -33,8 +33,7 @@ static inline int cdp_is_target_ar900b (ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -52,8 +51,7 @@ static inline int cdp_mempools_attach(ol_txrx_soc_handle soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -84,8 +82,7 @@ cdp_update_filter_neighbour_peers(ol_txrx_soc_handle soc, uint8_t vdev_id, uint32_t cmd, uint8_t *macaddr) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -119,9 +116,7 @@ cdp_record_vdev_mscs_params(ol_txrx_soc_handle soc, uint8_t bool active) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", - __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -149,8 +144,7 @@ cdp_set_pdev_reo_dest(ol_txrx_soc_handle soc, uint8_t pdev_id, enum cdp_host_reo_dest_ring val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -174,8 +168,7 @@ static inline enum cdp_host_reo_dest_ring cdp_get_pdev_reo_dest(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return cdp_host_reo_dest_ring_unknown; } @@ -207,8 +200,7 @@ cdp_peer_authorize(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac, u_int32_t authorize) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -225,8 +217,7 @@ static inline void cdp_tx_flush_buffers (ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -244,16 +235,14 @@ static inline QDF_STATUS cdp_txrx_get_vdev_param(ol_txrx_soc_handle soc, cdp_config_param_type *val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } if (!soc->ops->ctrl_ops || !soc->ops->ctrl_ops->txrx_get_vdev_param) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: callback not registered:", __func__); + dp_cdp_debug("callback not registered:"); return QDF_STATUS_E_FAILURE; } @@ -267,16 +256,14 @@ cdp_txrx_set_vdev_param(ol_txrx_soc_handle soc, cdp_config_param_type val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } if (!soc->ops->ctrl_ops || !soc->ops->ctrl_ops->txrx_set_vdev_param) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "NULL vdev params callback"); + dp_cdp_nofl_debug("NULL vdev params callback"); return QDF_STATUS_E_FAILURE; } @@ -290,8 +277,7 @@ cdp_txrx_set_psoc_param(ol_txrx_soc_handle soc, cdp_config_param_type val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -309,8 +295,7 @@ cdp_txrx_get_psoc_param(ol_txrx_soc_handle soc, cdp_config_param_type *val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -339,8 +324,7 @@ void cdp_set_vdev_peer_protocol_count(ol_txrx_soc_handle soc, int8_t vdev_id, bool enable) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -369,8 +353,7 @@ void cdp_set_vdev_peer_protocol_drop_mask(ol_txrx_soc_handle soc, int8_t vdev_id, int drop_mask) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -399,8 +382,7 @@ int cdp_is_vdev_peer_protocol_count_enabled(ol_txrx_soc_handle soc, int8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -427,8 +409,7 @@ static inline int cdp_get_peer_protocol_drop_mask(ol_txrx_soc_handle soc, int8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return 0; } @@ -475,8 +456,7 @@ static inline QDF_STATUS cdp_txrx_set_pdev_param(ol_txrx_soc_handle soc, cdp_config_param_type val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -506,8 +486,7 @@ static inline QDF_STATUS cdp_txrx_set_peer_param(ol_txrx_soc_handle soc, cdp_config_param_type val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -537,8 +516,7 @@ static inline QDF_STATUS cdp_txrx_get_peer_param(ol_txrx_soc_handle soc, cdp_config_param_type *val) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -557,8 +535,7 @@ cdp_peer_set_vlan_id(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac, uint8_t vlan_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -587,8 +564,7 @@ static inline QDF_STATUS cdp_txrx_get_pdev_param(ol_txrx_soc_handle soc, cdp_config_param_type *value) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -620,8 +596,7 @@ cdp_txrx_peer_protocol_cnt(ol_txrx_soc_handle soc, enum vdev_peer_protocol_tx_rx is_rx) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return; } @@ -685,16 +660,14 @@ cdp_calculate_delay_stats(ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t nbuf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } if (!soc->ops->ctrl_ops || !soc->ops->ctrl_ops->calculate_delay_stats) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: callback not registered:", __func__); + dp_cdp_debug("callback not registered:"); return QDF_STATUS_E_FAILURE; } @@ -723,8 +696,7 @@ cdp_wdi_event_sub(ol_txrx_soc_handle soc, uint8_t pdev_id, { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return 0; } @@ -758,8 +730,7 @@ cdp_wdi_event_unsub(ol_txrx_soc_handle soc, { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return 0; } @@ -790,8 +761,7 @@ cdp_get_sec_type(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac, uint8_t sec_idx) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return A_ERROR; } @@ -817,8 +787,7 @@ cdp_set_mgmt_tx_power(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t subtype, uint8_t tx_power) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } diff --git a/dp/inc/cdp_txrx_flow_ctrl_legacy.h b/dp/inc/cdp_txrx_flow_ctrl_legacy.h index b00b905d3a..2f15c5f09d 100644 --- a/dp/inc/cdp_txrx_flow_ctrl_legacy.h +++ b/dp/inc/cdp_txrx_flow_ctrl_legacy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019,2021 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 @@ -25,7 +25,7 @@ #define _CDP_TXRX_FC_LEG_H_ #include #include "cdp_txrx_handle.h" - +#include #ifdef QCA_HL_NETDEV_FLOW_CONTROL /** @@ -43,8 +43,7 @@ cdp_hl_fc_register(ol_txrx_soc_handle soc, uint8_t pdev_id, tx_pause_callback flowcontrol) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return -EINVAL; } @@ -120,8 +119,7 @@ cdp_fc_register(ol_txrx_soc_handle soc, uint8_t vdev_id, ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return 0; } @@ -156,8 +154,7 @@ static inline int cdp_fc_deregister(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return 0; } @@ -190,8 +187,7 @@ cdp_fc_get_tx_resource(ol_txrx_soc_handle soc, uint8_t pdev_id, unsigned int high_watermark_offset) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return false; } @@ -220,8 +216,7 @@ cdp_fc_ll_set_tx_pause_q_depth(ol_txrx_soc_handle soc, uint8_t vdev_id, int pause_q_depth) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return 0; } @@ -248,8 +243,7 @@ static inline void cdp_fc_vdev_flush(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -277,8 +271,7 @@ cdp_fc_vdev_pause(ol_txrx_soc_handle soc, uint8_t vdev_id, uint32_t reason, uint32_t pause_type) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -306,8 +299,7 @@ cdp_fc_vdev_unpause(ol_txrx_soc_handle soc, uint8_t vdev_id, uint32_t reason, uint32_t pause_type) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); return; } diff --git a/dp/inc/cdp_txrx_flow_ctrl_v2.h b/dp/inc/cdp_txrx_flow_ctrl_v2.h index 630b8b9060..5900fa6890 100644 --- a/dp/inc/cdp_txrx_flow_ctrl_v2.h +++ b/dp/inc/cdp_txrx_flow_ctrl_v2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019,2021 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 @@ -24,6 +24,7 @@ #ifndef _CDP_TXRX_FC_V2_H_ #define _CDP_TXRX_FC_V2_H_ #include +#include /** * cdp_register_pause_cb() - Register flow control callback function pointer @@ -39,8 +40,7 @@ cdp_register_pause_cb(ol_txrx_soc_handle soc, tx_pause_callback pause_cb) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return QDF_STATUS_E_INVAL; } @@ -67,8 +67,7 @@ cdp_set_desc_global_pool_size(ol_txrx_soc_handle soc, uint32_t num_msdu_desc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -93,8 +92,7 @@ static inline void cdp_dump_flow_pool_info(struct cdp_soc_t *soc) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return; } @@ -117,8 +115,7 @@ static inline bool cdp_tx_desc_thresh_reached(struct cdp_soc_t *soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); QDF_BUG(0); return false; } diff --git a/dp/inc/cdp_txrx_host_stats.h b/dp/inc/cdp_txrx_host_stats.h index 5db10b26e1..156d094980 100644 --- a/dp/inc/cdp_txrx_host_stats.h +++ b/dp/inc/cdp_txrx_host_stats.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 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 @@ -24,6 +24,7 @@ #ifndef _CDP_TXRX_HOST_STATS_H_ #define _CDP_TXRX_HOST_STATS_H_ #include "cdp_txrx_handle.h" +#include #include /** * cdp_host_stats_get: cdp call to get host stats @@ -38,8 +39,7 @@ static inline int cdp_host_stats_get(ol_txrx_soc_handle soc, struct ol_txrx_stats_req *req) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -66,8 +66,7 @@ static inline int cdp_host_stats_get_ratekbps(ol_txrx_soc_handle soc, int htflag, int gintval) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -92,8 +91,7 @@ static inline QDF_STATUS cdp_host_stats_clr(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -109,8 +107,7 @@ static inline QDF_STATUS cdp_host_ce_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -127,8 +124,7 @@ static inline int cdp_stats_publish struct cdp_stats_extd *buf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -151,8 +147,7 @@ static inline QDF_STATUS cdp_enable_enhanced_stats(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -176,8 +171,7 @@ static inline QDF_STATUS cdp_disable_enhanced_stats(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -194,8 +188,7 @@ static inline QDF_STATUS cdp_tx_print_tso_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -211,8 +204,7 @@ static inline QDF_STATUS cdp_tx_rst_tso_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -228,8 +220,7 @@ static inline QDF_STATUS cdp_tx_print_sg_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -245,8 +236,7 @@ static inline QDF_STATUS cdp_tx_rst_sg_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -262,8 +252,7 @@ static inline QDF_STATUS cdp_print_rx_cksum_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -279,8 +268,7 @@ static inline QDF_STATUS cdp_rst_rx_cksum_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -296,8 +284,7 @@ static inline QDF_STATUS cdp_host_me_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -321,8 +308,7 @@ static inline QDF_STATUS cdp_per_peer_stats(ol_txrx_soc_handle soc, uint8_t *addr) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -339,8 +325,7 @@ static inline int cdp_host_msdu_ttl_stats(ol_txrx_soc_handle soc, struct ol_txrx_stats_req *req) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -360,8 +345,7 @@ static inline QDF_STATUS cdp_update_peer_stats(ol_txrx_soc_handle soc, uint32_t stats_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -380,8 +364,7 @@ static inline QDF_STATUS cdp_get_dp_fw_peer_stats(ol_txrx_soc_handle soc, uint32_t copy_stats) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -399,8 +382,7 @@ static inline QDF_STATUS cdp_get_dp_htt_stats(ol_txrx_soc_handle soc, void *data, uint32_t data_len) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -429,8 +411,7 @@ cdp_update_pdev_host_stats(ol_txrx_soc_handle soc, uint16_t stats_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -461,8 +442,7 @@ cdp_update_vdev_host_stats(ol_txrx_soc_handle soc, uint16_t stats_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -493,8 +473,7 @@ cdp_txrx_get_peer_stats_param(ol_txrx_soc_handle soc, uint8_t vdev_id, cdp_peer_stats_param_t *buf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -524,8 +503,7 @@ cdp_host_get_peer_stats(ol_txrx_soc_handle soc, uint8_t vdev_id, struct cdp_peer_stats *peer_stats) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -552,8 +530,7 @@ cdp_host_reset_peer_ald_stats(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -580,8 +557,7 @@ cdp_host_reset_peer_stats(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } @@ -610,8 +586,7 @@ cdp_host_get_vdev_stats(ol_txrx_soc_handle soc, bool is_aggregate) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -641,8 +616,7 @@ cdp_update_host_vdev_stats(ol_txrx_soc_handle soc, uint32_t stats_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -672,8 +646,7 @@ cdp_get_vdev_extd_stats(ol_txrx_soc_handle soc, wmi_host_vdev_extd_stats *buf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -699,8 +672,7 @@ cdp_host_get_pdev_stats(ol_txrx_soc_handle soc, uint8_t pdev_id, struct cdp_pdev_stats *buf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -726,8 +698,7 @@ cdp_host_get_radio_stats(ol_txrx_soc_handle soc, void *buf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } diff --git a/dp/inc/cdp_txrx_me.h b/dp/inc/cdp_txrx_me.h index 9d552edcb3..ec4b10f9be 100644 --- a/dp/inc/cdp_txrx_me.h +++ b/dp/inc/cdp_txrx_me.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 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 @@ -27,13 +27,13 @@ #include /* TODO: adf need to be replaced with qdf */ #include "cdp_txrx_handle.h" +#include static inline void cdp_tx_me_alloc_descriptor(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return; } @@ -49,8 +49,7 @@ static inline void cdp_tx_me_free_descriptor(ol_txrx_soc_handle soc, uint8_t pdev_id) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return; } @@ -68,8 +67,7 @@ cdp_tx_me_convert_ucast(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t newmaccnt, uint8_t tid, bool is_igmp) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } diff --git a/dp/inc/cdp_txrx_misc.h b/dp/inc/cdp_txrx_misc.h index 16d034077c..4234eec652 100644 --- a/dp/inc/cdp_txrx_misc.h +++ b/dp/inc/cdp_txrx_misc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 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 @@ -25,6 +25,8 @@ #define _CDP_TXRX_MISC_H_ #include "cdp_txrx_handle.h" +#include + /** * cdp_tx_non_std() - Allow the control-path SW to send data frames * @soc: data path soc handle @@ -52,8 +54,7 @@ cdp_tx_non_std(ol_txrx_soc_handle soc, uint8_t vdev_id, enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list) { if (!soc || !soc->ops || !soc->ops->misc_ops) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s invalid instance", __func__); + dp_cdp_debug("invalid instance"); return NULL; } @@ -761,8 +762,7 @@ cdp_txrx_ext_stats_request(ol_txrx_soc_handle soc, uint8_t pdev_id, struct cdp_txrx_ext_stats *req) { if (!soc || !soc->ops || !soc->ops->misc_ops || !req) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); return QDF_STATUS_E_INVAL; } @@ -784,8 +784,7 @@ static inline QDF_STATUS cdp_request_rx_hw_stats(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops || !soc->ops->misc_ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); return QDF_STATUS_E_INVAL; } @@ -808,8 +807,7 @@ cdp_vdev_inform_ll_conn(ol_txrx_soc_handle soc, uint8_t vdev_id, enum vdev_ll_conn_actions action) { if (!soc || !soc->ops || !soc->ops->misc_ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); return QDF_STATUS_E_INVAL; } @@ -831,8 +829,7 @@ static inline QDF_STATUS cdp_soc_set_swlm_enable(ol_txrx_soc_handle soc, uint8_t value) { if (!soc || !soc->ops || !soc->ops->misc_ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); return QDF_STATUS_E_INVAL; } @@ -853,8 +850,7 @@ static inline uint8_t cdp_soc_is_swlm_enabled(ol_txrx_soc_handle soc) { if (!soc || !soc->ops || !soc->ops->misc_ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); return 0; } @@ -874,8 +870,7 @@ static inline void cdp_display_txrx_hw_info(ol_txrx_soc_handle soc) { if (!soc || !soc->ops || !soc->ops->misc_ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance:", __func__); + dp_cdp_debug("Invalid Instance:"); return; } diff --git a/dp/inc/cdp_txrx_mon.h b/dp/inc/cdp_txrx_mon.h index d42c596851..7a8753d908 100644 --- a/dp/inc/cdp_txrx_mon.h +++ b/dp/inc/cdp_txrx_mon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 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 @@ -25,14 +25,14 @@ #ifndef _CDP_TXRX_MON_H_ #define _CDP_TXRX_MON_H_ #include "cdp_txrx_handle.h" +#include static inline QDF_STATUS cdp_reset_monitor_mode(ol_txrx_soc_handle soc, uint8_t pdev_id, u_int8_t smart_monitor) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } @@ -56,8 +56,7 @@ cdp_deliver_tx_mgmt(ol_txrx_soc_handle soc, uint8_t pdev_id, qdf_nbuf_t nbuf) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } diff --git a/dp/inc/cdp_txrx_pflow.h b/dp/inc/cdp_txrx_pflow.h index 76afaa09fc..ed9ad84154 100644 --- a/dp/inc/cdp_txrx_pflow.h +++ b/dp/inc/cdp_txrx_pflow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017,2019-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017,2019-2021 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 @@ -27,14 +27,14 @@ #include #include "cdp_txrx_ops.h" #include "cdp_txrx_handle.h" +#include static inline uint32_t cdp_pflow_update_pdev_params (ol_txrx_soc_handle soc, uint8_t pdev_id, enum _dp_param_t param, uint32_t val, void *ctx) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } diff --git a/dp/inc/cdp_txrx_raw.h b/dp/inc/cdp_txrx_raw.h index 956119be58..a663172ee8 100644 --- a/dp/inc/cdp_txrx_raw.h +++ b/dp/inc/cdp_txrx_raw.h @@ -26,6 +26,7 @@ #include "cdp_txrx_handle.h" #include "cdp_txrx_ops.h" +#include /** * @brief finds the ast entry for the packet @@ -46,8 +47,7 @@ cdp_rawsim_get_astentry(ol_txrx_soc_handle soc, uint8_t vdev_id, { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_FAILURE; } diff --git a/dp/inc/cdp_txrx_stats.h b/dp/inc/cdp_txrx_stats.h index c912591248..f12318b6cc 100644 --- a/dp/inc/cdp_txrx_stats.h +++ b/dp/inc/cdp_txrx_stats.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017,2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017,2019,2021 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 @@ -24,14 +24,14 @@ #ifndef _CDP_TXRX_STATS_H_ #define _CDP_TXRX_STATS_H_ #include +#include static inline QDF_STATUS cdp_clear_stats(ol_txrx_soc_handle soc, uint8_t pdev_id, uint8_t bitmap) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return QDF_STATUS_E_INVAL; } @@ -48,8 +48,7 @@ cdp_stats(ol_txrx_soc_handle soc, uint8_t vdev_id, char *buffer, unsigned int buf_len) { if (!soc || !soc->ops) { - QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, - "%s: Invalid Instance", __func__); + dp_cdp_debug("Invalid Instance"); QDF_BUG(0); return 0; } diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 3522d92847..71fc08c2eb 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -111,13 +111,6 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc) __QDF_TRACE_FL(QDF_TRACE_LEVEL_INFO_HIGH, QDF_MODULE_ID_DP_INIT, ## params) #define dp_init_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_DP_INIT, params) -#define dp_cdp_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_DP_CDP, params) -#define dp_cdp_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_DP_CDP, params) -#define dp_cdp_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_DP_CDP, params) -#define dp_cdp_info(params...) \ - __QDF_TRACE_FL(QDF_TRACE_LEVEL_INFO_HIGH, QDF_MODULE_ID_DP_CDP, ## params) -#define dp_cdp_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_DP_CDP, params) - #define dp_vdev_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_DP_VDEV, params) #define dp_vdev_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_DP_VDEV, params) #define dp_vdev_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_DP_VDEV, params) @@ -465,9 +458,8 @@ static void dp_service_mon_rings(struct dp_soc *soc, uint32_t quota) continue; work_done = dp_mon_process(soc, NULL, ring, quota); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - FL("Reaped %d descs from Monitor rings"), - work_done); + dp_rx_mon_dest_debug("Reaped %d descs from Monitor rings", + work_done); } } @@ -671,8 +663,7 @@ static int dp_peer_add_ast_wifi3(struct cdp_soc_t *soc_hdl, DP_MOD_ID_CDP); if (!peer) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s: Peer is NULL!\n", __func__); + dp_peer_debug("Peer is NULL!"); return ret; } @@ -708,8 +699,7 @@ static int dp_peer_update_ast_wifi3(struct cdp_soc_t *soc_hdl, DP_MOD_ID_CDP); if (!peer) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s: Peer is NULL!\n", __func__); + dp_peer_debug("Peer is NULL!"); return status; } @@ -7040,9 +7030,8 @@ void dp_peer_unref_delete(struct dp_peer *peer, enum dp_mod_id mod_id) */ QDF_ASSERT(peer_id == HTT_INVALID_PEER); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "Deleting peer %pK ("QDF_MAC_ADDR_FMT")", peer, - QDF_MAC_ADDR_REF(peer->mac_addr.raw)); + dp_peer_debug("Deleting peer %pK ("QDF_MAC_ADDR_FMT")", peer, + QDF_MAC_ADDR_REF(peer->mac_addr.raw)); /* * Deallocate the extended stats contenxt @@ -13146,8 +13135,7 @@ dp_fill_delay_buckets(struct dp_pdev *pdev, uint32_t delay, rstats->to_stack_delay.delay_bucket[delay_index]++; return &rstats->to_stack_delay; default: - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s Incorrect delay mode: %d", __func__, mode); + dp_debug("Incorrect delay mode: %d", mode); } return NULL; diff --git a/dp/wifi3.0/dp_rx_defrag.c b/dp/wifi3.0/dp_rx_defrag.c index cbd158e92e..462259ad59 100644 --- a/dp/wifi3.0/dp_rx_defrag.c +++ b/dp/wifi3.0/dp_rx_defrag.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021 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 @@ -164,8 +164,7 @@ void dp_rx_defrag_waitlist_flush(struct dp_soc *soc) TAILQ_INIT(&temp_list); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - FL("Current time %u"), now_ms); + dp_debug("Current time %u", now_ms); qdf_spin_lock_bh(&soc->rx.defrag.defrag_lock); TAILQ_FOREACH_SAFE(rx_reorder, &soc->rx.defrag.waitlist, @@ -849,9 +848,8 @@ static void dp_rx_frag_pull_hdr(qdf_nbuf_t nbuf, uint16_t hdrsize) qdf_nbuf_pull_head(nbuf, RX_PKT_TLVS_LEN + hdrsize); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s: final pktlen %d .11len %d", - __func__, (uint32_t)qdf_nbuf_len(nbuf), hdrsize); + dp_debug("final pktlen %d .11len %d", + (uint32_t)qdf_nbuf_len(nbuf), hdrsize); } /* @@ -941,12 +939,10 @@ dp_rx_construct_fraglist(struct dp_peer *peer, int tid, qdf_nbuf_t head, qdf_nbuf_set_next(head, NULL); qdf_nbuf_set_is_frag(head, 1); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s: head len %d ext len %d data len %d ", - __func__, - (uint32_t)qdf_nbuf_len(head), - (uint32_t)qdf_nbuf_len(rx_nbuf), - (uint32_t)(head->data_len)); + dp_debug("head len %d ext len %d data len %d ", + (uint32_t)qdf_nbuf_len(head), + (uint32_t)qdf_nbuf_len(rx_nbuf), + (uint32_t)(head->data_len)); return QDF_STATUS_SUCCESS; } @@ -1402,8 +1398,7 @@ static QDF_STATUS dp_rx_defrag_reo_reinject(struct dp_peer *peer, hal_srng_access_end(soc->hal_soc, hal_srng); DP_STATS_INC(soc, rx.reo_reinject, 1); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s: reinjection done !", __func__); + dp_debug("reinjection done !"); return QDF_STATUS_SUCCESS; } #endif @@ -1951,8 +1946,8 @@ uint32_t dp_rx_frag_handle(struct dp_soc *soc, hal_ring_desc_t ring_desc, /* all buffers in MSDU link belong to same pdev */ pdev = dp_get_pdev_for_lmac_id(soc, rx_desc->pool_id); if (!pdev) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "pdev is null for pool_id = %d", rx_desc->pool_id); + dp_nofl_debug("pdev is null for pool_id = %d", + rx_desc->pool_id); return rx_bufs_used; } diff --git a/dp/wifi3.0/dp_rx_mon_dest.c b/dp/wifi3.0/dp_rx_mon_dest.c index c6890788e3..12e89a97b1 100644 --- a/dp/wifi3.0/dp_rx_mon_dest.c +++ b/dp/wifi3.0/dp_rx_mon_dest.c @@ -354,10 +354,7 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id, replenish.nbuf_alloc_fail, 1); qdf_frag_free(rx_desc_tlv); - QDF_TRACE(QDF_MODULE_ID_DP, - QDF_TRACE_LEVEL_DEBUG, - "[%s] failed to allocate parent buffer to hold all frag", - __func__); + dp_rx_mon_dest_debug("failed to allocate parent buffer to hold all frag"); drop_mpdu = true; goto next_msdu; } @@ -380,10 +377,9 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id, if (!is_frag) msdu_cnt--; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s total_len %u frag_len %u flags %u", - __func__, total_frag_len, frag_len, - msdu_list.msdu_info[i].msdu_flags); + dp_rx_mon_dest_debug("total_len %u frag_len %u flags %u", + total_frag_len, frag_len, + msdu_list.msdu_info[i].msdu_flags); rx_pkt_offset = SIZE_OF_MONITOR_TLV; diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 891e396713..a572253303 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -3000,9 +3000,7 @@ void dp_tx_nawds_handler(struct dp_soc *soc, struct dp_vdev *vdev, * dropped in case of intra bss forwarding */ if (sa_peer_id == peer->peer_id) { - QDF_TRACE(QDF_MODULE_ID_DP, - QDF_TRACE_LEVEL_DEBUG, - " %s: multicast packet", __func__); + dp_tx_debug("multicast packet"); DP_STATS_INC(peer, tx.nawds_mcast_drop, 1); continue; } @@ -3020,9 +3018,7 @@ void dp_tx_nawds_handler(struct dp_soc *soc, struct dp_vdev *vdev, NULL); if (nbuf_clone) { - QDF_TRACE(QDF_MODULE_ID_DP, - QDF_TRACE_LEVEL_DEBUG, - FL("pkt send failed")); + dp_tx_debug("pkt send failed"); qdf_nbuf_free(nbuf_clone); } else { if (peer_id != DP_INVALID_PEER) @@ -3279,8 +3275,7 @@ void dp_tx_reinject_handler(struct dp_soc *soc, dp_tx_get_queue(vdev, nbuf, &msdu_info.tx_queue); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s Tx reinject path", __func__); + dp_tx_debug("Tx reinject path"); DP_STATS_INC_PKT(vdev, tx_i.reinject_pkts, 1, qdf_nbuf_len(tx_desc->nbuf)); @@ -3339,9 +3334,7 @@ void dp_tx_reinject_handler(struct dp_soc *soc, nbuf_copy = qdf_nbuf_copy(nbuf); if (!nbuf_copy) { - QDF_TRACE(QDF_MODULE_ID_DP, - QDF_TRACE_LEVEL_DEBUG, - FL("nbuf copy failed")); + dp_tx_debug("nbuf copy failed"); break; } @@ -3352,9 +3345,7 @@ void dp_tx_reinject_handler(struct dp_soc *soc, NULL); if (nbuf_copy) { - QDF_TRACE(QDF_MODULE_ID_DP, - QDF_TRACE_LEVEL_DEBUG, - FL("pkt send failed")); + dp_tx_debug("pkt send failed"); qdf_nbuf_free(nbuf_copy); } } @@ -4031,34 +4022,33 @@ void dp_tx_comp_process_tx_status(struct dp_soc *soc, sizeof(qdf_nbuf_data(nbuf)), tx_desc->id, ts->status, dp_status)); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "-------------------- \n" - "Tx Completion Stats: \n" - "-------------------- \n" - "ack_frame_rssi = %d \n" - "first_msdu = %d \n" - "last_msdu = %d \n" - "msdu_part_of_amsdu = %d \n" - "rate_stats valid = %d \n" - "bw = %d \n" - "pkt_type = %d \n" - "stbc = %d \n" - "ldpc = %d \n" - "sgi = %d \n" - "mcs = %d \n" - "ofdma = %d \n" - "tones_in_ru = %d \n" - "tsf = %d \n" - "ppdu_id = %d \n" - "transmit_cnt = %d \n" - "tid = %d \n" - "peer_id = %d\n", - ts->ack_frame_rssi, ts->first_msdu, - ts->last_msdu, ts->msdu_part_of_amsdu, - ts->valid, ts->bw, ts->pkt_type, ts->stbc, - ts->ldpc, ts->sgi, ts->mcs, ts->ofdma, - ts->tones_in_ru, ts->tsf, ts->ppdu_id, - ts->transmit_cnt, ts->tid, ts->peer_id); + dp_tx_comp_debug("-------------------- \n" + "Tx Completion Stats: \n" + "-------------------- \n" + "ack_frame_rssi = %d \n" + "first_msdu = %d \n" + "last_msdu = %d \n" + "msdu_part_of_amsdu = %d \n" + "rate_stats valid = %d \n" + "bw = %d \n" + "pkt_type = %d \n" + "stbc = %d \n" + "ldpc = %d \n" + "sgi = %d \n" + "mcs = %d \n" + "ofdma = %d \n" + "tones_in_ru = %d \n" + "tsf = %d \n" + "ppdu_id = %d \n" + "transmit_cnt = %d \n" + "tid = %d \n" + "peer_id = %d\n", + ts->ack_frame_rssi, ts->first_msdu, + ts->last_msdu, ts->msdu_part_of_amsdu, + ts->valid, ts->bw, ts->pkt_type, ts->stbc, + ts->ldpc, ts->sgi, ts->mcs, ts->ofdma, + ts->tones_in_ru, ts->tsf, ts->ppdu_id, + ts->transmit_cnt, ts->tid, ts->peer_id); /* Update SoC level stats */ DP_STATS_INCC(soc, tx.dropped_fw_removed, 1, @@ -4351,9 +4341,8 @@ void dp_tx_process_htt_completion(struct dp_soc *soc, break; } default: - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s Invalid HTT tx_status %d\n", - __func__, tx_status); + dp_tx_comp_debug("Invalid HTT tx_status %d\n", + tx_status); break; } diff --git a/dp/wifi3.0/dp_tx.h b/dp/wifi3.0/dp_tx.h index fdcdf68e08..e49e98036d 100644 --- a/dp/wifi3.0/dp_tx.h +++ b/dp/wifi3.0/dp_tx.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 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 @@ -424,9 +424,8 @@ static inline void dp_tx_get_queue(struct dp_vdev *vdev, queue->desc_pool_id = queue_offset; queue->ring_id = qdf_get_cpu(); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s, pool_id:%d ring_id: %d", - __func__, queue->desc_pool_id, queue->ring_id); + dp_tx_debug("pool_id:%d ring_id: %d", + queue->desc_pool_id, queue->ring_id); } /* @@ -467,9 +466,8 @@ static inline void dp_tx_get_queue(struct dp_vdev *vdev, queue->desc_pool_id = DP_TX_GET_DESC_POOL_ID(vdev); queue->ring_id = DP_TX_GET_RING_ID(vdev); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "%s, pool_id:%d ring_id: %d", - __func__, queue->desc_pool_id, queue->ring_id); + dp_tx_debug("pool_id:%d ring_id: %d", + queue->desc_pool_id, queue->ring_id); } static inline hal_ring_handle_t dp_tx_get_hal_ring_hdl(struct dp_soc *soc, diff --git a/hal/wifi3.0/hal_api_mon.h b/hal/wifi3.0/hal_api_mon.h index 105c73e5f9..cead32a4b4 100644 --- a/hal/wifi3.0/hal_api_mon.h +++ b/hal/wifi3.0/hal_api_mon.h @@ -356,9 +356,8 @@ void hal_rx_reo_ent_buf_paddr_get(hal_rxdma_desc_t rx_desc, buf_info->sw_cookie = HAL_RX_BUF_COOKIE_GET(buf_addr_info); buf_info->rbm = HAL_RX_BUF_RBM_GET(buf_addr_info); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "[%s][%d] ReoAddr=%pK, addrInfo=%pK, paddr=0x%llx, loopcnt=%d", - __func__, __LINE__, reo_ent_ring, buf_addr_info, + dp_nofl_debug("[%s][%d] ReoAddr=%pK, addrInfo=%pK, paddr=0x%llx, loopcnt=%d", + __func__, __LINE__, reo_ent_ring, buf_addr_info, (unsigned long long)buf_info->paddr, loop_cnt); } @@ -407,10 +406,9 @@ void hal_rx_mon_msdu_link_desc_set(hal_soc_handle_t hal_soc_hdl, ((uint64_t) (HAL_RX_BUFFER_ADDR_39_32_GET(buf_addr_info)) << 32)); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "[%s][%d] src_srng_desc=%pK, buf_addr=0x%llx, cookie=0x%llx", - __func__, __LINE__, src_srng_desc, (unsigned long long)paddr, - (unsigned long long)p_buffer_addr_info->sw_buffer_cookie); + dp_nofl_debug("[%s][%d] src_srng_desc=%pK, buf_addr=0x%llx, cookie=0x%llx", + __func__, __LINE__, src_srng_desc, (unsigned long long)paddr, + (unsigned long long)p_buffer_addr_info->sw_buffer_cookie); /* Structure copy !!! */ *wbm_srng_buffer_addr_info = diff --git a/hal/wifi3.0/hal_generic_api.h b/hal/wifi3.0/hal_generic_api.h index aae3014234..962c093140 100644 --- a/hal/wifi3.0/hal_generic_api.h +++ b/hal/wifi3.0/hal_generic_api.h @@ -593,9 +593,8 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo, break; case WIFIRX_PPDU_END_E: - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "[%s][%d] ppdu_end_e len=%d", - __func__, __LINE__, tlv_len); + dp_nofl_debug("[%s][%d] ppdu_end_e len=%d", + __func__, __LINE__, tlv_len); /* This is followed by sub-TLVs of PPDU_END */ ppdu_info->rx_state = HAL_RX_MON_PPDU_END; break; @@ -1448,53 +1447,45 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo, rssi_value = HAL_RX_GET(rssi_info_tlv, RECEIVE_RSSI_INFO_0, RSSI_PRI20_CHAIN0); ppdu_info->rx_status.rssi[0] = rssi_value; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "RSSI_PRI20_CHAIN0: %d\n", rssi_value); + dp_nofl_debug("RSSI_PRI20_CHAIN0: %d\n", rssi_value); rssi_value = HAL_RX_GET(rssi_info_tlv, RECEIVE_RSSI_INFO_2, RSSI_PRI20_CHAIN1); ppdu_info->rx_status.rssi[1] = rssi_value; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "RSSI_PRI20_CHAIN1: %d\n", rssi_value); + dp_nofl_debug("RSSI_PRI20_CHAIN1: %d\n", rssi_value); rssi_value = HAL_RX_GET(rssi_info_tlv, RECEIVE_RSSI_INFO_4, RSSI_PRI20_CHAIN2); ppdu_info->rx_status.rssi[2] = rssi_value; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "RSSI_PRI20_CHAIN2: %d\n", rssi_value); + dp_nofl_debug("RSSI_PRI20_CHAIN2: %d\n", rssi_value); rssi_value = HAL_RX_GET(rssi_info_tlv, RECEIVE_RSSI_INFO_6, RSSI_PRI20_CHAIN3); ppdu_info->rx_status.rssi[3] = rssi_value; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "RSSI_PRI20_CHAIN3: %d\n", rssi_value); + dp_nofl_debug("RSSI_PRI20_CHAIN3: %d\n", rssi_value); rssi_value = HAL_RX_GET(rssi_info_tlv, RECEIVE_RSSI_INFO_8, RSSI_PRI20_CHAIN4); ppdu_info->rx_status.rssi[4] = rssi_value; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "RSSI_PRI20_CHAIN4: %d\n", rssi_value); + dp_nofl_debug("RSSI_PRI20_CHAIN4: %d\n", rssi_value); rssi_value = HAL_RX_GET(rssi_info_tlv, RECEIVE_RSSI_INFO_10, RSSI_PRI20_CHAIN5); ppdu_info->rx_status.rssi[5] = rssi_value; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "RSSI_PRI20_CHAIN5: %d\n", rssi_value); + dp_nofl_debug("RSSI_PRI20_CHAIN5: %d\n", rssi_value); rssi_value = HAL_RX_GET(rssi_info_tlv, RECEIVE_RSSI_INFO_12, RSSI_PRI20_CHAIN6); ppdu_info->rx_status.rssi[6] = rssi_value; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "RSSI_PRI20_CHAIN6: %d\n", rssi_value); + dp_nofl_debug("RSSI_PRI20_CHAIN6: %d\n", rssi_value); rssi_value = HAL_RX_GET(rssi_info_tlv, RECEIVE_RSSI_INFO_14, RSSI_PRI20_CHAIN7); ppdu_info->rx_status.rssi[7] = rssi_value; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "RSSI_PRI20_CHAIN7: %d\n", rssi_value); + dp_nofl_debug("RSSI_PRI20_CHAIN7: %d\n", rssi_value); break; } case WIFIPHYRX_OTHER_RECEIVE_INFO_E: diff --git a/hal/wifi3.0/hal_rx.h b/hal/wifi3.0/hal_rx.h index 29f5c6847d..79ebf600b4 100644 --- a/hal/wifi3.0/hal_rx.h +++ b/hal/wifi3.0/hal_rx.h @@ -1926,9 +1926,8 @@ static inline void hal_rx_msdu_list_get(hal_soc_handle_t hal_soc_hdl, msdu_details = hal_rx_link_desc_msdu0_ptr(msdu_link, hal_soc); - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "[%s][%d] msdu_link=%pK msdu_details=%pK", - __func__, __LINE__, msdu_link, msdu_details); + dp_nofl_debug("[%s][%d] msdu_link=%pK msdu_details=%pK", + __func__, __LINE__, msdu_link, msdu_details); for (i = 0; i < HAL_RX_NUM_MSDU_DESC; i++) { /* num_msdus received in mpdu descriptor may be incorrect @@ -1967,9 +1966,8 @@ static inline void hal_rx_msdu_list_get(hal_soc_handle_t hal_soc_hdl, &msdu_details[i].buffer_addr_info_details) | (uint64_t)HAL_RX_BUFFER_ADDR_39_32_GET( &msdu_details[i].buffer_addr_info_details) << 32; - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, - "[%s][%d] i=%d sw_cookie=%d", - __func__, __LINE__, i, msdu_list->sw_cookie[i]); + dp_nofl_debug("[%s][%d] i=%d sw_cookie=%d", + __func__, __LINE__, i, msdu_list->sw_cookie[i]); } *num_msdus = i; }