qcacmn: Add NULL checks within CDP Layer
Part-1: Add Null checks for all API's in the cdp layer. Change-Id: I283fa5e9ff7c5f2024ecbc91d7544469ab64fcaa CRs-Fixed: 2136173
This commit is contained in:

committed by
snandini

parent
c80eea7fcc
commit
aa62ae7615
@@ -45,14 +45,18 @@ static inline void
|
|||||||
cdp_cfg_set_rx_fwd_disabled(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev,
|
cdp_cfg_set_rx_fwd_disabled(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev,
|
||||||
uint8_t disable_rx_fwd)
|
uint8_t disable_rx_fwd)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->set_cfg_rx_fwd_disabled)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->set_cfg_rx_fwd_disabled(cfg_pdev,
|
!soc->ops->cfg_ops->set_cfg_rx_fwd_disabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cfg_ops->set_cfg_rx_fwd_disabled(cfg_pdev,
|
||||||
disable_rx_fwd);
|
disable_rx_fwd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,14 +74,18 @@ static inline void
|
|||||||
cdp_cfg_set_packet_log_enabled(ol_txrx_soc_handle soc,
|
cdp_cfg_set_packet_log_enabled(ol_txrx_soc_handle soc,
|
||||||
struct cdp_cfg *cfg_pdev, uint8_t val)
|
struct cdp_cfg *cfg_pdev, uint8_t val)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->set_cfg_packet_log_enabled)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->set_cfg_packet_log_enabled(cfg_pdev,
|
!soc->ops->cfg_ops->set_cfg_packet_log_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cfg_ops->set_cfg_packet_log_enabled(cfg_pdev,
|
||||||
val);
|
val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,16 +103,18 @@ static inline struct cdp_cfg
|
|||||||
*cdp_cfg_attach(ol_txrx_soc_handle soc,
|
*cdp_cfg_attach(ol_txrx_soc_handle soc,
|
||||||
qdf_device_t osdev, void *cfg_param)
|
qdf_device_t osdev, void *cfg_param)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->cfg_attach)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->cfg_attach(osdev, cfg_param);
|
!soc->ops->cfg_ops->cfg_attach)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return NULL;
|
return soc->ops->cfg_ops->cfg_attach(osdev, cfg_param);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -121,14 +131,18 @@ static inline void
|
|||||||
cdp_cfg_vdev_rx_set_intrabss_fwd(ol_txrx_soc_handle soc,
|
cdp_cfg_vdev_rx_set_intrabss_fwd(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, bool val)
|
struct cdp_vdev *vdev, bool val)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->vdev_rx_set_intrabss_fwd)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->vdev_rx_set_intrabss_fwd(vdev, val);
|
!soc->ops->cfg_ops->vdev_rx_set_intrabss_fwd)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cfg_ops->vdev_rx_set_intrabss_fwd(vdev, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -144,15 +158,19 @@ cdp_cfg_vdev_rx_set_intrabss_fwd(ol_txrx_soc_handle soc,
|
|||||||
static inline uint8_t
|
static inline uint8_t
|
||||||
cdp_cfg_is_rx_fwd_disabled(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
cdp_cfg_is_rx_fwd_disabled(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->is_rx_fwd_disabled)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->is_rx_fwd_disabled(vdev);
|
!soc->ops->cfg_ops->is_rx_fwd_disabled)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cfg_ops->is_rx_fwd_disabled(vdev);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -168,15 +186,18 @@ static inline void
|
|||||||
cdp_cfg_tx_set_is_mgmt_over_wmi_enabled(ol_txrx_soc_handle soc,
|
cdp_cfg_tx_set_is_mgmt_over_wmi_enabled(ol_txrx_soc_handle soc,
|
||||||
uint8_t value)
|
uint8_t value)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->tx_set_is_mgmt_over_wmi_enabled)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->tx_set_is_mgmt_over_wmi_enabled(
|
!soc->ops->cfg_ops->tx_set_is_mgmt_over_wmi_enabled)
|
||||||
value);
|
return;
|
||||||
|
|
||||||
|
soc->ops->cfg_ops->tx_set_is_mgmt_over_wmi_enabled(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -192,16 +213,18 @@ cdp_cfg_tx_set_is_mgmt_over_wmi_enabled(ol_txrx_soc_handle soc,
|
|||||||
static inline int
|
static inline int
|
||||||
cdp_cfg_is_high_latency(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev)
|
cdp_cfg_is_high_latency(ol_txrx_soc_handle soc, struct cdp_cfg *cfg_pdev)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->is_high_latency)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->is_high_latency(cfg_pdev);
|
!soc->ops->cfg_ops->is_high_latency)
|
||||||
|
return 0;
|
||||||
|
|
||||||
return 0;
|
return soc->ops->cfg_ops->is_high_latency(cfg_pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -218,17 +241,19 @@ static inline void
|
|||||||
cdp_cfg_set_flow_control_parameters(ol_txrx_soc_handle soc,
|
cdp_cfg_set_flow_control_parameters(ol_txrx_soc_handle soc,
|
||||||
struct cdp_cfg *cfg_pdev, void *param)
|
struct cdp_cfg *cfg_pdev, void *param)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->set_flow_control_parameters)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->set_flow_control_parameters(cfg_pdev,
|
!soc->ops->cfg_ops->set_flow_control_parameters)
|
||||||
param);
|
return;
|
||||||
|
|
||||||
return;
|
soc->ops->cfg_ops->set_flow_control_parameters(cfg_pdev,
|
||||||
|
param);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -243,16 +268,18 @@ cdp_cfg_set_flow_control_parameters(ol_txrx_soc_handle soc,
|
|||||||
static inline void cdp_cfg_set_flow_steering(ol_txrx_soc_handle soc,
|
static inline void cdp_cfg_set_flow_steering(ol_txrx_soc_handle soc,
|
||||||
struct cdp_cfg *cfg_pdev, uint8_t val)
|
struct cdp_cfg *cfg_pdev, uint8_t val)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->set_flow_steering)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->set_flow_steering(cfg_pdev, val);
|
!soc->ops->cfg_ops->set_flow_steering)
|
||||||
|
return;
|
||||||
|
|
||||||
return;
|
soc->ops->cfg_ops->set_flow_steering(cfg_pdev, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_cfg_get_max_peer_id(ol_txrx_soc_handle soc,
|
static inline void cdp_cfg_get_max_peer_id(ol_txrx_soc_handle soc,
|
||||||
@@ -274,14 +301,17 @@ static inline void
|
|||||||
cdp_cfg_set_ptp_rx_opt_enabled(ol_txrx_soc_handle soc,
|
cdp_cfg_set_ptp_rx_opt_enabled(ol_txrx_soc_handle soc,
|
||||||
struct cdp_cfg *cfg_pdev, uint8_t val)
|
struct cdp_cfg *cfg_pdev, uint8_t val)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->cfg_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->cfg_ops->set_ptp_rx_opt_enabled)
|
if (!soc->ops->cfg_ops ||
|
||||||
return soc->ops->cfg_ops->set_ptp_rx_opt_enabled(cfg_pdev,
|
!soc->ops->cfg_ops->set_ptp_rx_opt_enabled)
|
||||||
val);
|
return;
|
||||||
|
|
||||||
|
soc->ops->cfg_ops->set_ptp_rx_opt_enabled(cfg_pdev, val);
|
||||||
}
|
}
|
||||||
#endif /* _CDP_TXRX_CFG_H_ */
|
#endif /* _CDP_TXRX_CFG_H_ */
|
||||||
|
@@ -46,132 +46,268 @@
|
|||||||
static inline int
|
static inline int
|
||||||
cdp_soc_attach_target(ol_txrx_soc_handle soc)
|
cdp_soc_attach_target(ol_txrx_soc_handle soc)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_soc_attach_target)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_soc_attach_target(soc);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_soc_attach_target)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_soc_attach_target(soc);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
cdp_soc_get_nss_cfg(ol_txrx_soc_handle soc)
|
cdp_soc_get_nss_cfg(ol_txrx_soc_handle soc)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_soc_get_nss_cfg)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_soc_get_nss_cfg(soc);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_soc_get_nss_cfg)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_soc_get_nss_cfg(soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_soc_set_nss_cfg(ol_txrx_soc_handle soc, uint32_t config)
|
cdp_soc_set_nss_cfg(ol_txrx_soc_handle soc, uint32_t config)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_soc_set_nss_cfg)
|
if (!soc || !soc->ops) {
|
||||||
soc->ops->cmn_drv_ops->txrx_soc_set_nss_cfg(soc, config);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_soc_set_nss_cfg)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_soc_set_nss_cfg(soc, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct cdp_vdev *
|
static inline struct cdp_vdev *
|
||||||
cdp_vdev_attach(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
cdp_vdev_attach(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||||
uint8_t *vdev_mac_addr, uint8_t vdev_id, enum wlan_op_mode op_mode)
|
uint8_t *vdev_mac_addr, uint8_t vdev_id, enum wlan_op_mode op_mode)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_vdev_attach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_vdev_attach(pdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_vdev_attach)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_vdev_attach(pdev,
|
||||||
vdev_mac_addr, vdev_id, op_mode);
|
vdev_mac_addr, vdev_id, op_mode);
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_vdev_detach(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_vdev_detach(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
ol_txrx_vdev_delete_cb callback, void *cb_context)
|
ol_txrx_vdev_delete_cb callback, void *cb_context)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_vdev_detach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_vdev_detach(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_vdev_detach)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_vdev_detach(vdev,
|
||||||
callback, cb_context);
|
callback, cb_context);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
cdp_pdev_attach_target(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
cdp_pdev_attach_target(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_pdev_attach_target)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_pdev_attach_target(pdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_pdev_attach_target)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_pdev_attach_target(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct cdp_pdev *cdp_pdev_attach
|
static inline struct cdp_pdev *cdp_pdev_attach
|
||||||
(ol_txrx_soc_handle soc, struct cdp_cfg *ctrl_pdev,
|
(ol_txrx_soc_handle soc, struct cdp_cfg *ctrl_pdev,
|
||||||
HTC_HANDLE htc_pdev, qdf_device_t osdev, uint8_t pdev_id)
|
HTC_HANDLE htc_pdev, qdf_device_t osdev, uint8_t pdev_id)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_pdev_attach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_pdev_attach(soc, ctrl_pdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
htc_pdev, osdev, pdev_id);
|
"%s: Invalid Instance:", __func__);
|
||||||
return NULL;
|
QDF_BUG(0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_pdev_attach)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_pdev_attach(soc, ctrl_pdev,
|
||||||
|
htc_pdev, osdev, pdev_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int cdp_pdev_post_attach(ol_txrx_soc_handle soc,
|
static inline int cdp_pdev_post_attach(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev)
|
struct cdp_pdev *pdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_pdev_post_attach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_pdev_post_attach(pdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_pdev_post_attach)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_pdev_post_attach(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_pdev_pre_detach(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, int force)
|
cdp_pdev_pre_detach(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, int force)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_pdev_pre_detach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_pdev_pre_detach(pdev, force);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_pdev_pre_detach)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_pdev_pre_detach(pdev, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_pdev_detach(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, int force)
|
cdp_pdev_detach(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, int force)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_pdev_detach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_pdev_detach(pdev, force);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_pdev_detach)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_pdev_detach(pdev, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *cdp_peer_create
|
static inline void *cdp_peer_create
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
uint8_t *peer_mac_addr)
|
uint8_t *peer_mac_addr)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_peer_create)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_peer_create(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_peer_create)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_peer_create(vdev,
|
||||||
peer_mac_addr);
|
peer_mac_addr);
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_peer_setup
|
static inline void cdp_peer_setup
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, void *peer)
|
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, void *peer)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_peer_setup)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_peer_setup(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_peer_setup)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_peer_setup(vdev,
|
||||||
peer);
|
peer);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_peer_teardown
|
static inline void cdp_peer_teardown
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, void *peer)
|
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, void *peer)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_peer_teardown)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_peer_teardown(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
peer);
|
"%s: Invalid Instance:", __func__);
|
||||||
return;
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_peer_teardown)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_peer_teardown(vdev, peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_peer_delete(ol_txrx_soc_handle soc, void *peer, uint32_t bitmap)
|
cdp_peer_delete(ol_txrx_soc_handle soc, void *peer, uint32_t bitmap)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_peer_delete)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_peer_delete(peer, bitmap);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_peer_delete)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_peer_delete(peer, bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
cdp_set_monitor_mode(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_set_monitor_mode(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
uint8_t smart_monitor)
|
uint8_t smart_monitor)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_set_monitor_mode)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_set_monitor_mode(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_set_monitor_mode)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_set_monitor_mode(vdev,
|
||||||
smart_monitor);
|
smart_monitor);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
@@ -179,19 +315,37 @@ cdp_set_curchan(ol_txrx_soc_handle soc,
|
|||||||
struct cdp_pdev *pdev,
|
struct cdp_pdev *pdev,
|
||||||
uint32_t chan_mhz)
|
uint32_t chan_mhz)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_set_curchan)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_set_curchan(pdev, chan_mhz);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_set_curchan)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_set_curchan(pdev, chan_mhz);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_set_privacy_filters(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_set_privacy_filters(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
void *filter, uint32_t num)
|
void *filter, uint32_t num)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_set_privacy_filters)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_set_privacy_filters(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_set_privacy_filters)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_set_privacy_filters(vdev,
|
||||||
filter, num);
|
filter, num);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
@@ -201,20 +355,38 @@ static inline void
|
|||||||
cdp_vdev_register(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_vdev_register(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
void *osif_vdev, struct ol_txrx_ops *txrx_ops)
|
void *osif_vdev, struct ol_txrx_ops *txrx_ops)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_vdev_register)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_vdev_register(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_vdev_register)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_vdev_register(vdev,
|
||||||
osif_vdev, txrx_ops);
|
osif_vdev, txrx_ops);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
cdp_mgmt_send(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_mgmt_send(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
qdf_nbuf_t tx_mgmt_frm, uint8_t type)
|
qdf_nbuf_t tx_mgmt_frm, uint8_t type)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_mgmt_send)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_mgmt_send(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_mgmt_send)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_mgmt_send(vdev,
|
||||||
tx_mgmt_frm, type);
|
tx_mgmt_frm, type);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
@@ -222,10 +394,19 @@ cdp_mgmt_send_ext(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|||||||
qdf_nbuf_t tx_mgmt_frm, uint8_t type,
|
qdf_nbuf_t tx_mgmt_frm, uint8_t type,
|
||||||
uint8_t use_6mbps, uint16_t chanfreq)
|
uint8_t use_6mbps, uint16_t chanfreq)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_mgmt_send_ext)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_mgmt_send_ext
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_mgmt_send_ext)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_mgmt_send_ext
|
||||||
(vdev, tx_mgmt_frm, type, use_6mbps, chanfreq);
|
(vdev, tx_mgmt_frm, type, use_6mbps, chanfreq);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -234,28 +415,56 @@ cdp_mgmt_tx_cb_set(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|||||||
uint8_t type, ol_txrx_mgmt_tx_cb download_cb,
|
uint8_t type, ol_txrx_mgmt_tx_cb download_cb,
|
||||||
ol_txrx_mgmt_tx_cb ota_ack_cb, void *ctxt)
|
ol_txrx_mgmt_tx_cb ota_ack_cb, void *ctxt)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_mgmt_tx_cb_set)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_mgmt_tx_cb_set
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_mgmt_tx_cb_set)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_mgmt_tx_cb_set
|
||||||
(pdev, type, download_cb, ota_ack_cb, ctxt);
|
(pdev, type, download_cb, ota_ack_cb, ctxt);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int cdp_get_tx_pending(ol_txrx_soc_handle soc,
|
static inline int cdp_get_tx_pending(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev)
|
struct cdp_pdev *pdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_get_tx_pending)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_get_tx_pending(pdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_get_tx_pending)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_get_tx_pending(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_data_tx_cb_set(ol_txrx_soc_handle soc, struct cdp_vdev *data_vdev,
|
cdp_data_tx_cb_set(ol_txrx_soc_handle soc, struct cdp_vdev *data_vdev,
|
||||||
ol_txrx_data_tx_cb callback, void *ctxt)
|
ol_txrx_data_tx_cb callback, void *ctxt)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_data_tx_cb_set)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_data_tx_cb_set(data_vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_data_tx_cb_set)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_data_tx_cb_set(data_vdev,
|
||||||
callback, ctxt);
|
callback, ctxt);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
@@ -284,10 +493,19 @@ cdp_aggr_cfg(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|||||||
int max_subfrms_ampdu,
|
int max_subfrms_ampdu,
|
||||||
int max_subfrms_amsdu)
|
int max_subfrms_amsdu)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_aggr_cfg)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_aggr_cfg(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_aggr_cfg)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_aggr_cfg(vdev,
|
||||||
max_subfrms_ampdu, max_subfrms_amsdu);
|
max_subfrms_ampdu, max_subfrms_amsdu);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
@@ -295,42 +513,88 @@ cdp_fw_stats_get(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|||||||
struct ol_txrx_stats_req *req, bool per_vdev,
|
struct ol_txrx_stats_req *req, bool per_vdev,
|
||||||
bool response_expected)
|
bool response_expected)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_fw_stats_get)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_fw_stats_get(vdev, req,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_fw_stats_get)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_fw_stats_get(vdev, req,
|
||||||
per_vdev, response_expected);
|
per_vdev, response_expected);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
cdp_debug(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, int debug_specs)
|
cdp_debug(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, int debug_specs)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_debug)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_debug(vdev, debug_specs);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_debug)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_debug(vdev, debug_specs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_fw_stats_cfg(ol_txrx_soc_handle soc,
|
static inline void cdp_fw_stats_cfg(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, uint8_t cfg_stats_type, uint32_t cfg_val)
|
struct cdp_vdev *vdev, uint8_t cfg_stats_type, uint32_t cfg_val)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_fw_stats_cfg)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_fw_stats_cfg(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_fw_stats_cfg)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_fw_stats_cfg(vdev,
|
||||||
cfg_stats_type, cfg_val);
|
cfg_stats_type, cfg_val);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_print_level_set(ol_txrx_soc_handle soc, unsigned level)
|
static inline void cdp_print_level_set(ol_txrx_soc_handle soc, unsigned level)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_print_level_set)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_print_level_set(level);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_print_level_set)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_print_level_set(level);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint8_t *
|
static inline uint8_t *
|
||||||
cdp_get_vdev_mac_addr(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
cdp_get_vdev_mac_addr(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_get_vdev_mac_addr)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_get_vdev_mac_addr(vdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return NULL;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_get_vdev_mac_addr)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_get_vdev_mac_addr(vdev);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -343,10 +607,20 @@ cdp_get_vdev_mac_addr(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
|||||||
static inline struct qdf_mac_addr *cdp_get_vdev_struct_mac_addr
|
static inline struct qdf_mac_addr *cdp_get_vdev_struct_mac_addr
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_get_vdev_struct_mac_addr)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_get_vdev_struct_mac_addr
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_get_vdev_struct_mac_addr)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_get_vdev_struct_mac_addr
|
||||||
(vdev);
|
(vdev);
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -358,9 +632,18 @@ static inline struct qdf_mac_addr *cdp_get_vdev_struct_mac_addr
|
|||||||
static inline struct cdp_pdev *cdp_get_pdev_from_vdev
|
static inline struct cdp_pdev *cdp_get_pdev_from_vdev
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_get_pdev_from_vdev)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_get_pdev_from_vdev(vdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return NULL;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_get_pdev_from_vdev)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_get_pdev_from_vdev(vdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -372,56 +655,111 @@ static inline struct cdp_pdev *cdp_get_pdev_from_vdev
|
|||||||
static inline struct cdp_cfg *
|
static inline struct cdp_cfg *
|
||||||
cdp_get_ctrl_pdev_from_vdev(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
cdp_get_ctrl_pdev_from_vdev(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_get_ctrl_pdev_from_vdev)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_get_ctrl_pdev_from_vdev
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_get_ctrl_pdev_from_vdev)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_get_ctrl_pdev_from_vdev
|
||||||
(vdev);
|
(vdev);
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct cdp_vdev *
|
static inline struct cdp_vdev *
|
||||||
cdp_get_vdev_from_vdev_id(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
cdp_get_vdev_from_vdev_id(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||||
uint8_t vdev_id)
|
uint8_t vdev_id)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_get_vdev_from_vdev_id)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_get_vdev_from_vdev_id
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_get_vdev_from_vdev_id)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_get_vdev_from_vdev_id
|
||||||
(pdev, vdev_id);
|
(pdev, vdev_id);
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_soc_detach(ol_txrx_soc_handle soc)
|
cdp_soc_detach(ol_txrx_soc_handle soc)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_soc_detach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_soc_detach((void *)soc);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_soc_detach)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_soc_detach((void *)soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int cdp_addba_requestprocess(ol_txrx_soc_handle soc,
|
static inline int cdp_addba_requestprocess(ol_txrx_soc_handle soc,
|
||||||
void *peer_handle, uint8_t dialogtoken, uint16_t tid,
|
void *peer_handle, uint8_t dialogtoken, uint16_t tid,
|
||||||
uint16_t batimeout, uint16_t buffersize, uint16_t startseqnum)
|
uint16_t batimeout, uint16_t buffersize, uint16_t startseqnum)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->addba_requestprocess)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->addba_requestprocess(peer_handle,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->addba_requestprocess)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->addba_requestprocess(peer_handle,
|
||||||
dialogtoken, tid, batimeout, buffersize, startseqnum);
|
dialogtoken, tid, batimeout, buffersize, startseqnum);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_addba_responsesetup(ol_txrx_soc_handle soc,
|
static inline void cdp_addba_responsesetup(ol_txrx_soc_handle soc,
|
||||||
void *peer_handle, uint8_t tid, uint8_t *dialogtoken,
|
void *peer_handle, uint8_t tid, uint8_t *dialogtoken,
|
||||||
uint16_t *statuscode, uint16_t *buffersize, uint16_t *batimeout)
|
uint16_t *statuscode, uint16_t *buffersize, uint16_t *batimeout)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->addba_responsesetup)
|
if (!soc || !soc->ops) {
|
||||||
soc->ops->cmn_drv_ops->addba_responsesetup(peer_handle, tid,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->addba_responsesetup)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->addba_responsesetup(peer_handle, tid,
|
||||||
dialogtoken, statuscode, buffersize, batimeout);
|
dialogtoken, statuscode, buffersize, batimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int cdp_delba_process(ol_txrx_soc_handle soc,
|
static inline int cdp_delba_process(ol_txrx_soc_handle soc,
|
||||||
void *peer_handle, int tid, uint16_t reasoncode)
|
void *peer_handle, int tid, uint16_t reasoncode)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->delba_process)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->delba_process(peer_handle,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->delba_process)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->delba_process(peer_handle,
|
||||||
tid, reasoncode);
|
tid, reasoncode);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -437,10 +775,19 @@ static inline uint8_t
|
|||||||
cdp_get_peer_mac_addr_frm_id(ol_txrx_soc_handle soc, uint16_t peer_id,
|
cdp_get_peer_mac_addr_frm_id(ol_txrx_soc_handle soc, uint16_t peer_id,
|
||||||
uint8_t *mac_addr)
|
uint8_t *mac_addr)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->get_peer_mac_addr_frm_id)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->get_peer_mac_addr_frm_id(soc,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return CDP_INVALID_VDEV_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->get_peer_mac_addr_frm_id)
|
||||||
|
return CDP_INVALID_VDEV_ID;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->get_peer_mac_addr_frm_id(soc,
|
||||||
peer_id, mac_addr);
|
peer_id, mac_addr);
|
||||||
return CDP_INVALID_VDEV_ID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -453,10 +800,19 @@ cdp_get_peer_mac_addr_frm_id(ol_txrx_soc_handle soc, uint16_t peer_id,
|
|||||||
static inline void cdp_set_vdev_dscp_tid_map(ol_txrx_soc_handle soc,
|
static inline void cdp_set_vdev_dscp_tid_map(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, uint8_t map_id)
|
struct cdp_vdev *vdev, uint8_t map_id)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->set_vdev_dscp_tid_map)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->set_vdev_dscp_tid_map(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->set_vdev_dscp_tid_map)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->set_vdev_dscp_tid_map(vdev,
|
||||||
map_id);
|
map_id);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -471,11 +827,19 @@ static inline void cdp_set_vdev_dscp_tid_map(ol_txrx_soc_handle soc,
|
|||||||
static inline void cdp_set_pdev_dscp_tid_map(ol_txrx_soc_handle soc,
|
static inline void cdp_set_pdev_dscp_tid_map(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, uint8_t map_id, uint8_t tos, uint8_t tid)
|
struct cdp_pdev *pdev, uint8_t map_id, uint8_t tos, uint8_t tid)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->set_pdev_dscp_tid_map) {
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->set_pdev_dscp_tid_map(pdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
map_id, tos, tid);
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->set_pdev_dscp_tid_map)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->set_pdev_dscp_tid_map(pdev,
|
||||||
|
map_id, tos, tid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -485,8 +849,18 @@ 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)
|
static inline void cdp_flush_cache_rx_queue(ol_txrx_soc_handle soc)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->flush_cache_rx_queue)
|
if (!soc || !soc->ops) {
|
||||||
soc->ops->cmn_drv_ops->flush_cache_rx_queue();
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->flush_cache_rx_queue)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->flush_cache_rx_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -501,9 +875,18 @@ static inline
|
|||||||
int cdp_txrx_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
int cdp_txrx_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
enum cdp_stats stats)
|
enum cdp_stats stats)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_stats)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_stats(vdev, stats);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_stats)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_stats(vdev, stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -512,10 +895,18 @@ int cdp_txrx_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|||||||
*/
|
*/
|
||||||
static inline QDF_STATUS cdp_txrx_intr_attach(ol_txrx_soc_handle soc)
|
static inline QDF_STATUS cdp_txrx_intr_attach(ol_txrx_soc_handle soc)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_intr_attach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->txrx_intr_attach(soc);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_intr_attach)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->txrx_intr_attach(soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -524,8 +915,18 @@ 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)
|
static inline void cdp_txrx_intr_detach(ol_txrx_soc_handle soc)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->txrx_intr_detach)
|
if (!soc || !soc->ops) {
|
||||||
soc->ops->cmn_drv_ops->txrx_intr_detach(soc);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->txrx_intr_detach)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->txrx_intr_detach(soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -536,10 +937,18 @@ static inline void cdp_txrx_intr_detach(ol_txrx_soc_handle soc)
|
|||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
cdp_display_stats(ol_txrx_soc_handle soc, uint16_t value)
|
cdp_display_stats(ol_txrx_soc_handle soc, uint16_t value)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->display_stats)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->display_stats(soc, value);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->display_stats)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->display_stats(soc, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -552,8 +961,18 @@ cdp_display_stats(ol_txrx_soc_handle soc, uint16_t value)
|
|||||||
static inline int cdp_set_pn_check(ol_txrx_soc_handle soc,
|
static inline int cdp_set_pn_check(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, struct cdp_peer *peer_handle, enum cdp_sec_type sec_type, uint32_t *rx_pn)
|
struct cdp_vdev *vdev, struct cdp_peer *peer_handle, enum cdp_sec_type sec_type, uint32_t *rx_pn)
|
||||||
{
|
{
|
||||||
if (soc->ops->cmn_drv_ops->set_pn_check)
|
if (!soc || !soc->ops) {
|
||||||
soc->ops->cmn_drv_ops->set_pn_check(vdev, peer_handle,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->set_pn_check)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
soc->ops->cmn_drv_ops->set_pn_check(vdev, peer_handle,
|
||||||
sec_type, rx_pn);
|
sec_type, rx_pn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -572,10 +991,18 @@ QDF_STATUS cdp_update_config_parameters(ol_txrx_soc_handle soc,
|
|||||||
{
|
{
|
||||||
struct cdp_soc *psoc = (struct cdp_soc *)soc;
|
struct cdp_soc *psoc = (struct cdp_soc *)soc;
|
||||||
|
|
||||||
if (soc->ops->cmn_drv_ops->update_config_parameters)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->cmn_drv_ops->update_config_parameters(psoc,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
cfg);
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->update_config_parameters)
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->update_config_parameters(psoc,
|
||||||
|
cfg);
|
||||||
}
|
}
|
||||||
#endif /* _CDP_TXRX_CMN_H_ */
|
#endif /* _CDP_TXRX_CMN_H_ */
|
||||||
|
@@ -37,9 +37,18 @@
|
|||||||
static inline int cdp_is_target_ar900b
|
static inline int cdp_is_target_ar900b
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_is_target_ar900b)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_is_target_ar900b(vdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_is_target_ar900b)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_is_target_ar900b(vdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -47,9 +56,18 @@ static inline int cdp_is_target_ar900b
|
|||||||
static inline int
|
static inline int
|
||||||
cdp_mempools_attach(ol_txrx_soc_handle soc, void *ctrl_pdev)
|
cdp_mempools_attach(ol_txrx_soc_handle soc, void *ctrl_pdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_mempools_attach)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_mempools_attach(ctrl_pdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_mempools_attach)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_mempools_attach(ctrl_pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,10 +84,19 @@ static inline int
|
|||||||
cdp_set_filter_neighbour_peers(ol_txrx_soc_handle soc,
|
cdp_set_filter_neighbour_peers(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, u_int32_t val)
|
struct cdp_pdev *pdev, u_int32_t val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_filter_neighbour_peers)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_filter_neighbour_peers
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_filter_neighbour_peers)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_set_filter_neighbour_peers
|
||||||
(pdev, val);
|
(pdev, val);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,10 +115,19 @@ static inline int
|
|||||||
cdp_update_filter_neighbour_peers(ol_txrx_soc_handle soc,
|
cdp_update_filter_neighbour_peers(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, uint32_t cmd, uint8_t *macaddr)
|
struct cdp_pdev *pdev, uint32_t cmd, uint8_t *macaddr)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_update_filter_neighbour_peers)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_update_filter_neighbour_peers
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_update_filter_neighbour_peers)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_update_filter_neighbour_peers
|
||||||
(pdev, cmd, macaddr);
|
(pdev, cmd, macaddr);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,9 +146,18 @@ static inline void
|
|||||||
cdp_set_safemode(ol_txrx_soc_handle soc,
|
cdp_set_safemode(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, u_int32_t val)
|
struct cdp_vdev *vdev, u_int32_t val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_safemode)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_safemode(vdev, val);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_safemode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_safemode(vdev, val);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief configure the drop unencrypted frame flag
|
* @brief configure the drop unencrypted frame flag
|
||||||
@@ -128,9 +173,18 @@ static inline void
|
|||||||
cdp_set_drop_unenc(ol_txrx_soc_handle soc,
|
cdp_set_drop_unenc(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, u_int32_t val)
|
struct cdp_vdev *vdev, u_int32_t val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_drop_unenc)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_drop_unenc(vdev, val);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_drop_unenc)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_drop_unenc(vdev, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -147,9 +201,18 @@ static inline void
|
|||||||
cdp_set_tx_encap_type(ol_txrx_soc_handle soc,
|
cdp_set_tx_encap_type(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, enum htt_cmn_pkt_type val)
|
struct cdp_vdev *vdev, enum htt_cmn_pkt_type val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_tx_encap_type)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_tx_encap_type(vdev, val);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_tx_encap_type)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_tx_encap_type(vdev, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,10 +229,19 @@ static inline void
|
|||||||
cdp_set_vdev_rx_decap_type(ol_txrx_soc_handle soc,
|
cdp_set_vdev_rx_decap_type(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, enum htt_cmn_pkt_type val)
|
struct cdp_vdev *vdev, enum htt_cmn_pkt_type val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_vdev_rx_decap_type)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_vdev_rx_decap_type
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_vdev_rx_decap_type)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_vdev_rx_decap_type
|
||||||
(vdev, val);
|
(vdev, val);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,9 +253,18 @@ cdp_set_vdev_rx_decap_type(ol_txrx_soc_handle soc,
|
|||||||
static inline enum htt_cmn_pkt_type
|
static inline enum htt_cmn_pkt_type
|
||||||
cdp_get_vdev_rx_decap_type(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
cdp_get_vdev_rx_decap_type(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_get_vdev_rx_decap_type)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_get_vdev_rx_decap_type(vdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return 0;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_get_vdev_rx_decap_type)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_get_vdev_rx_decap_type(vdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -200,10 +281,19 @@ static inline void
|
|||||||
cdp_set_pdev_reo_dest(ol_txrx_soc_handle soc,
|
cdp_set_pdev_reo_dest(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, enum cdp_host_reo_dest_ring val)
|
struct cdp_pdev *pdev, enum cdp_host_reo_dest_ring val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_pdev_reo_dest)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_pdev_reo_dest
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_pdev_reo_dest)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_pdev_reo_dest
|
||||||
(pdev, val);
|
(pdev, val);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -216,9 +306,18 @@ cdp_set_pdev_reo_dest(ol_txrx_soc_handle soc,
|
|||||||
static inline enum cdp_host_reo_dest_ring
|
static inline enum cdp_host_reo_dest_ring
|
||||||
cdp_get_pdev_reo_dest(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
cdp_get_pdev_reo_dest(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_get_pdev_reo_dest)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_get_pdev_reo_dest(pdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return cdp_host_reo_dest_ring_unknown;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return cdp_host_reo_dest_ring_unknown;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_get_pdev_reo_dest)
|
||||||
|
return cdp_host_reo_dest_ring_unknown;
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_get_pdev_reo_dest(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is this similar to ol_txrx_peer_state_update() in MCL */
|
/* Is this similar to ol_txrx_peer_state_update() in MCL */
|
||||||
@@ -238,10 +337,19 @@ static inline void
|
|||||||
cdp_peer_authorize(ol_txrx_soc_handle soc,
|
cdp_peer_authorize(ol_txrx_soc_handle soc,
|
||||||
struct cdp_peer *peer, u_int32_t authorize)
|
struct cdp_peer *peer, u_int32_t authorize)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_peer_authorize)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_peer_authorize
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_peer_authorize)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_peer_authorize
|
||||||
(peer, authorize);
|
(peer, authorize);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
@@ -250,28 +358,40 @@ cdp_set_inact_params(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|||||||
u_int16_t inact_normal,
|
u_int16_t inact_normal,
|
||||||
u_int16_t inact_overload)
|
u_int16_t inact_overload)
|
||||||
{
|
{
|
||||||
if (!soc || !pdev)
|
if (!soc || !pdev || !soc->ops) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_inact_params)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (soc->ops->ctrl_ops->txrx_set_inact_params)
|
return soc->ops->ctrl_ops->txrx_set_inact_params
|
||||||
return soc->ops->ctrl_ops->txrx_set_inact_params
|
|
||||||
(pdev, inact_check_interval, inact_normal,
|
(pdev, inact_check_interval, inact_normal,
|
||||||
inact_overload);
|
inact_overload);
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
cdp_start_inact_timer(ol_txrx_soc_handle soc,
|
cdp_start_inact_timer(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev,
|
struct cdp_pdev *pdev,
|
||||||
bool enable)
|
bool enable)
|
||||||
{
|
{
|
||||||
if (!soc || !pdev)
|
if (!soc || !pdev || !soc->ops) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_start_inact_timer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (soc->ops->ctrl_ops->txrx_start_inact_timer)
|
return soc->ops->ctrl_ops->txrx_start_inact_timer
|
||||||
return soc->ops->ctrl_ops->txrx_start_inact_timer
|
|
||||||
(pdev, enable);
|
(pdev, enable);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -287,13 +407,18 @@ static inline void
|
|||||||
cdp_set_overload(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
cdp_set_overload(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||||
bool overload)
|
bool overload)
|
||||||
{
|
{
|
||||||
if (!soc || !pdev)
|
if (!soc || !pdev || !soc->ops) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_overload)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (soc->ops->ctrl_ops->txrx_set_overload)
|
soc->ops->ctrl_ops->txrx_set_overload(pdev, overload);
|
||||||
return soc->ops->ctrl_ops->txrx_set_overload(pdev, overload);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -305,13 +430,18 @@ cdp_set_overload(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|||||||
static inline bool
|
static inline bool
|
||||||
cdp_peer_is_inact(ol_txrx_soc_handle soc, void *peer)
|
cdp_peer_is_inact(ol_txrx_soc_handle soc, void *peer)
|
||||||
{
|
{
|
||||||
if (!soc || !peer)
|
if (!soc || !peer || !soc->ops) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_peer_is_inact)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (soc->ops->ctrl_ops->txrx_peer_is_inact)
|
return soc->ops->ctrl_ops->txrx_peer_is_inact(peer);
|
||||||
return soc->ops->ctrl_ops->txrx_peer_is_inact(peer);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -328,10 +458,19 @@ cdp_mark_peer_inact(ol_txrx_soc_handle soc,
|
|||||||
void *peer,
|
void *peer,
|
||||||
bool inactive)
|
bool inactive)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_mark_peer_inact)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_mark_peer_inact
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_mark_peer_inact)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_mark_peer_inact
|
||||||
(peer, inactive);
|
(peer, inactive);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -339,9 +478,18 @@ cdp_mark_peer_inact(ol_txrx_soc_handle soc,
|
|||||||
static inline void cdp_set_mesh_mode
|
static inline void cdp_set_mesh_mode
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, u_int32_t val)
|
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, u_int32_t val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_mesh_mode)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_mesh_mode(vdev, val);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_mesh_mode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_mesh_mode(vdev, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -357,46 +505,91 @@ static inline
|
|||||||
void cdp_set_mesh_rx_filter(ol_txrx_soc_handle soc,
|
void cdp_set_mesh_rx_filter(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, uint32_t val)
|
struct cdp_vdev *vdev, uint32_t val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_mesh_rx_filter)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_mesh_rx_filter(vdev, val);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_mesh_rx_filter)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_mesh_rx_filter(vdev, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_tx_flush_buffers
|
static inline void cdp_tx_flush_buffers
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->tx_flush_buffers)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->tx_flush_buffers(vdev);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->tx_flush_buffers)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->tx_flush_buffers(vdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_txrx_set_vdev_param(ol_txrx_soc_handle soc,
|
static inline void cdp_txrx_set_vdev_param(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, enum cdp_vdev_param_type type,
|
struct cdp_vdev *vdev, enum cdp_vdev_param_type type,
|
||||||
uint32_t val)
|
uint32_t val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_vdev_param)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_vdev_param(vdev, type, val);
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
return;
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_vdev_param)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_vdev_param(vdev, type, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
cdp_peer_set_nawds(ol_txrx_soc_handle soc,
|
cdp_peer_set_nawds(ol_txrx_soc_handle soc,
|
||||||
struct cdp_peer *peer, uint8_t value)
|
struct cdp_peer *peer, uint8_t value)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_peer_set_nawds)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_peer_set_nawds
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_peer_set_nawds)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_peer_set_nawds
|
||||||
(peer, value);
|
(peer, value);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cdp_txrx_set_pdev_param(ol_txrx_soc_handle soc,
|
static inline void cdp_txrx_set_pdev_param(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, enum cdp_pdev_param_type type,
|
struct cdp_pdev *pdev, enum cdp_pdev_param_type type,
|
||||||
uint8_t val)
|
uint8_t val)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_set_pdev_param)
|
if (!soc || !soc->ops) {
|
||||||
return soc->ops->ctrl_ops->txrx_set_pdev_param
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
(pdev, type, val);
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_set_pdev_param)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_set_pdev_param
|
||||||
|
(pdev, type, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -419,16 +612,19 @@ static inline int
|
|||||||
cdp_wdi_event_sub(ol_txrx_soc_handle soc,
|
cdp_wdi_event_sub(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, void *event_cb_sub, uint32_t event)
|
struct cdp_pdev *pdev, void *event_cb_sub, uint32_t event)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->ctrl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->ctrl_ops->txrx_wdi_event_sub)
|
if (!soc->ops->ctrl_ops ||
|
||||||
return soc->ops->ctrl_ops->txrx_wdi_event_sub
|
!soc->ops->ctrl_ops->txrx_wdi_event_sub)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_wdi_event_sub
|
||||||
(pdev, event_cb_sub, event);
|
(pdev, event_cb_sub, event);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -449,16 +645,19 @@ static inline int
|
|||||||
cdp_wdi_event_unsub(ol_txrx_soc_handle soc,
|
cdp_wdi_event_unsub(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, void *event_cb_sub, uint32_t event)
|
struct cdp_pdev *pdev, void *event_cb_sub, uint32_t event)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->ctrl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->ctrl_ops->txrx_wdi_event_unsub)
|
if (!soc->ops->ctrl_ops ||
|
||||||
return soc->ops->ctrl_ops->txrx_wdi_event_unsub
|
!soc->ops->ctrl_ops->txrx_wdi_event_unsub)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_wdi_event_unsub
|
||||||
(pdev, event_cb_sub, event);
|
(pdev, event_cb_sub, event);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -476,17 +675,19 @@ cdp_wdi_event_unsub(ol_txrx_soc_handle soc,
|
|||||||
static inline int
|
static inline int
|
||||||
cdp_get_sec_type(ol_txrx_soc_handle soc, struct cdp_peer *peer, uint8_t sec_idx)
|
cdp_get_sec_type(ol_txrx_soc_handle soc, struct cdp_peer *peer, uint8_t sec_idx)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->ctrl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return A_ERROR;
|
return A_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->ctrl_ops->txrx_get_sec_type)
|
if (!soc->ops->ctrl_ops ||
|
||||||
return soc->ops->ctrl_ops->txrx_get_sec_type
|
!soc->ops->ctrl_ops->txrx_get_sec_type)
|
||||||
(peer, sec_idx);
|
return A_ERROR;
|
||||||
return A_ERROR;
|
|
||||||
|
|
||||||
|
return soc->ops->ctrl_ops->txrx_get_sec_type
|
||||||
|
(peer, sec_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -499,10 +700,19 @@ cdp_get_sec_type(ol_txrx_soc_handle soc, struct cdp_peer *peer, uint8_t sec_idx)
|
|||||||
static inline int cdp_set_mgmt_tx_power(ol_txrx_soc_handle soc,
|
static inline int cdp_set_mgmt_tx_power(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, uint8_t subtype, uint8_t tx_power)
|
struct cdp_vdev *vdev, uint8_t subtype, uint8_t tx_power)
|
||||||
{
|
{
|
||||||
if (soc->ops->ctrl_ops->txrx_update_mgmt_txpow_vdev)
|
if (!soc || !soc->ops) {
|
||||||
soc->ops->ctrl_ops->txrx_update_mgmt_txpow_vdev(vdev,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
subtype, tx_power);
|
"%s: Invalid Instance:", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->ctrl_ops ||
|
||||||
|
!soc->ops->ctrl_ops->txrx_update_mgmt_txpow_vdev)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
soc->ops->ctrl_ops->txrx_update_mgmt_txpow_vdev(vdev,
|
||||||
|
subtype, tx_power);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -51,18 +51,20 @@ cdp_fc_register(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
|||||||
ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
|
ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
|
||||||
ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause)
|
ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->l_flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->l_flowctl_ops->register_tx_flow_control)
|
if (!soc->ops->l_flowctl_ops ||
|
||||||
return soc->ops->l_flowctl_ops->register_tx_flow_control(
|
!soc->ops->l_flowctl_ops->register_tx_flow_control)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->l_flowctl_ops->register_tx_flow_control(
|
||||||
vdev_id, flowControl, osif_fc_ctx,
|
vdev_id, flowControl, osif_fc_ctx,
|
||||||
flow_control_is_pause);
|
flow_control_is_pause);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,17 +79,19 @@ cdp_fc_register(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
|||||||
static inline int
|
static inline int
|
||||||
cdp_fc_deregister(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
cdp_fc_deregister(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->l_flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->l_flowctl_ops->deregister_tx_flow_control_cb)
|
if (!soc->ops->l_flowctl_ops ||
|
||||||
return soc->ops->l_flowctl_ops->deregister_tx_flow_control_cb(
|
!soc->ops->l_flowctl_ops->deregister_tx_flow_control_cb)
|
||||||
vdev_id);
|
return 0;
|
||||||
|
|
||||||
return 0;
|
return soc->ops->l_flowctl_ops->deregister_tx_flow_control_cb(
|
||||||
|
vdev_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,17 +110,19 @@ static inline bool
|
|||||||
cdp_fc_get_tx_resource(ol_txrx_soc_handle soc, uint8_t sta_id,
|
cdp_fc_get_tx_resource(ol_txrx_soc_handle soc, uint8_t sta_id,
|
||||||
unsigned int low_watermark, unsigned int high_watermark_offset)
|
unsigned int low_watermark, unsigned int high_watermark_offset)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->l_flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->l_flowctl_ops->get_tx_resource)
|
if (!soc->ops->l_flowctl_ops ||
|
||||||
return soc->ops->l_flowctl_ops->get_tx_resource(sta_id,
|
!soc->ops->l_flowctl_ops->get_tx_resource)
|
||||||
low_watermark, high_watermark_offset);
|
return false;
|
||||||
|
|
||||||
return false;
|
return soc->ops->l_flowctl_ops->get_tx_resource(sta_id,
|
||||||
|
low_watermark, high_watermark_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -133,17 +139,20 @@ static inline int
|
|||||||
cdp_fc_ll_set_tx_pause_q_depth(ol_txrx_soc_handle soc,
|
cdp_fc_ll_set_tx_pause_q_depth(ol_txrx_soc_handle soc,
|
||||||
uint8_t vdev_id, int pause_q_depth)
|
uint8_t vdev_id, int pause_q_depth)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->l_flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->l_flowctl_ops->ll_set_tx_pause_q_depth)
|
if (!soc->ops->l_flowctl_ops ||
|
||||||
return soc->ops->l_flowctl_ops->ll_set_tx_pause_q_depth(vdev_id,
|
!soc->ops->l_flowctl_ops->ll_set_tx_pause_q_depth)
|
||||||
pause_q_depth);
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->l_flowctl_ops->ll_set_tx_pause_q_depth(
|
||||||
|
vdev_id, pause_q_depth);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -158,16 +167,18 @@ cdp_fc_ll_set_tx_pause_q_depth(ol_txrx_soc_handle soc,
|
|||||||
static inline void
|
static inline void
|
||||||
cdp_fc_vdev_flush(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
cdp_fc_vdev_flush(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->l_flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->l_flowctl_ops->vdev_flush)
|
if (!soc->ops->l_flowctl_ops ||
|
||||||
return soc->ops->l_flowctl_ops->vdev_flush(vdev);
|
!soc->ops->l_flowctl_ops->vdev_flush)
|
||||||
|
return;
|
||||||
|
|
||||||
return;
|
soc->ops->l_flowctl_ops->vdev_flush(vdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -184,16 +195,18 @@ static inline void
|
|||||||
cdp_fc_vdev_pause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_fc_vdev_pause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
uint32_t reason)
|
uint32_t reason)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->l_flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->l_flowctl_ops->vdev_pause)
|
if (!soc->ops->l_flowctl_ops ||
|
||||||
return soc->ops->l_flowctl_ops->vdev_pause(vdev, reason);
|
!soc->ops->l_flowctl_ops->vdev_pause)
|
||||||
|
return;
|
||||||
|
|
||||||
return;
|
soc->ops->l_flowctl_ops->vdev_pause(vdev, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -210,15 +223,16 @@ static inline void
|
|||||||
cdp_fc_vdev_unpause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_fc_vdev_unpause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||||
uint32_t reason)
|
uint32_t reason)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->l_flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->l_flowctl_ops->vdev_unpause)
|
if (!soc->ops->l_flowctl_ops ||
|
||||||
return soc->ops->l_flowctl_ops->vdev_unpause(vdev, reason);
|
!soc->ops->l_flowctl_ops->vdev_unpause)
|
||||||
|
return;
|
||||||
|
|
||||||
return;
|
soc->ops->l_flowctl_ops->vdev_unpause(vdev, reason);
|
||||||
}
|
}
|
||||||
#endif /* _CDP_TXRX_FC_LEG_H_ */
|
#endif /* _CDP_TXRX_FC_LEG_H_ */
|
||||||
|
@@ -46,16 +46,19 @@ static inline QDF_STATUS
|
|||||||
cdp_register_pause_cb(ol_txrx_soc_handle soc,
|
cdp_register_pause_cb(ol_txrx_soc_handle soc,
|
||||||
tx_pause_callback pause_cb)
|
tx_pause_callback pause_cb)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->flowctl_ops->register_pause_cb)
|
if (!soc->ops->flowctl_ops ||
|
||||||
return soc->ops->flowctl_ops->register_pause_cb(soc, pause_cb);
|
!soc->ops->flowctl_ops->register_pause_cb)
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
return soc->ops->flowctl_ops->register_pause_cb(soc, pause_cb);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,17 +74,19 @@ static inline void
|
|||||||
cdp_set_desc_global_pool_size(ol_txrx_soc_handle soc,
|
cdp_set_desc_global_pool_size(ol_txrx_soc_handle soc,
|
||||||
uint32_t num_msdu_desc)
|
uint32_t num_msdu_desc)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops || !soc->ops->flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->ops->flowctl_ops->set_desc_global_pool_size)
|
if (!soc->ops->flowctl_ops ||
|
||||||
return soc->ops->flowctl_ops->set_desc_global_pool_size(
|
!soc->ops->flowctl_ops->set_desc_global_pool_size)
|
||||||
num_msdu_desc);
|
return;
|
||||||
|
|
||||||
return;
|
soc->ops->flowctl_ops->set_desc_global_pool_size(
|
||||||
|
num_msdu_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,17 +102,17 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc)
|
|||||||
{
|
{
|
||||||
void *dp_soc = (void *)soc;
|
void *dp_soc = (void *)soc;
|
||||||
|
|
||||||
if (!soc || !soc->ops || !soc->ops->flowctl_ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
|
QDF_BUG(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->flowctl_ops ||
|
||||||
|
!soc->ops->flowctl_ops->dump_flow_pool_info)
|
||||||
|
return;
|
||||||
|
|
||||||
if (soc->ops->flowctl_ops->dump_flow_pool_info)
|
soc->ops->flowctl_ops->dump_flow_pool_info(dp_soc);
|
||||||
return soc->ops->flowctl_ops->dump_flow_pool_info(dp_soc);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _CDP_TXRX_FC_V2_H_ */
|
#endif /* _CDP_TXRX_FC_V2_H_ */
|
||||||
|
@@ -413,6 +413,7 @@ typedef enum {
|
|||||||
QDF_MODULE_ID_OBJ_MGR,
|
QDF_MODULE_ID_OBJ_MGR,
|
||||||
QDF_MODULE_ID_NSS,
|
QDF_MODULE_ID_NSS,
|
||||||
QDF_MODULE_ID_ROAM_DEBUG,
|
QDF_MODULE_ID_ROAM_DEBUG,
|
||||||
|
QDF_MODULE_ID_CDP,
|
||||||
QDF_MODULE_ID_ANY,
|
QDF_MODULE_ID_ANY,
|
||||||
QDF_MODULE_ID_MAX,
|
QDF_MODULE_ID_MAX,
|
||||||
} QDF_MODULE_ID;
|
} QDF_MODULE_ID;
|
||||||
|
Reference in New Issue
Block a user