qcacld-3.0: Change ops from vdev specific to psoc level
Currently in packet capture component the tx and rx ops are stored in vdev but the ops should be only per psoc and the ops will be registered only once per psoc. So change tx and rx ops from vdev specific to psoc level. Change-Id: I09e9dd5d83e7b10c86e80ebf2584469071060813 CRs-Fixed: 3049207
This commit is contained in:

committed by
Madan Koyyalamudi

vanhempi
bb9b2be285
commit
5c72b5aded
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -24,7 +25,7 @@ QDF_STATUS
|
||||
tgt_pkt_capture_register_ev_handler(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct pkt_capture_vdev_priv *vdev_priv;
|
||||
struct pkt_psoc_priv *psoc_priv;
|
||||
struct wlan_pkt_capture_rx_ops *rx_ops;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
@@ -34,13 +35,13 @@ tgt_pkt_capture_register_ev_handler(struct wlan_objmgr_vdev *vdev)
|
||||
return status;
|
||||
}
|
||||
|
||||
vdev_priv = pkt_capture_vdev_get_priv(vdev);
|
||||
if (!vdev_priv) {
|
||||
pkt_capture_err("vdev priv is NULL");
|
||||
psoc_priv = pkt_capture_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
pkt_capture_err("psoc_priv is NULL");
|
||||
return status;
|
||||
}
|
||||
|
||||
rx_ops = &vdev_priv->rx_ops;
|
||||
rx_ops = &psoc_priv->rx_ops;
|
||||
|
||||
if (!rx_ops->pkt_capture_register_ev_handlers)
|
||||
return status;
|
||||
@@ -60,7 +61,7 @@ QDF_STATUS
|
||||
tgt_pkt_capture_unregister_ev_handler(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct pkt_capture_vdev_priv *vdev_priv;
|
||||
struct pkt_psoc_priv *psoc_priv;
|
||||
struct wlan_pkt_capture_rx_ops *rx_ops;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
@@ -70,13 +71,13 @@ tgt_pkt_capture_unregister_ev_handler(struct wlan_objmgr_vdev *vdev)
|
||||
return status;
|
||||
}
|
||||
|
||||
vdev_priv = pkt_capture_vdev_get_priv(vdev);
|
||||
if (!vdev_priv) {
|
||||
pkt_capture_err("vdev priv is NULL");
|
||||
psoc_priv = pkt_capture_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
pkt_capture_err("psoc_priv is NULL");
|
||||
return status;
|
||||
}
|
||||
|
||||
rx_ops = &vdev_priv->rx_ops;
|
||||
rx_ops = &psoc_priv->rx_ops;
|
||||
|
||||
if (!rx_ops->pkt_capture_unregister_ev_handlers)
|
||||
return status;
|
||||
@@ -97,7 +98,7 @@ tgt_pkt_capture_send_mode(struct wlan_objmgr_vdev *vdev,
|
||||
enum pkt_capture_mode mode)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct pkt_capture_vdev_priv *vdev_priv;
|
||||
struct pkt_psoc_priv *psoc_priv;
|
||||
struct wlan_pkt_capture_tx_ops *tx_ops;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
@@ -107,13 +108,13 @@ tgt_pkt_capture_send_mode(struct wlan_objmgr_vdev *vdev,
|
||||
return status;
|
||||
}
|
||||
|
||||
vdev_priv = pkt_capture_vdev_get_priv(vdev);
|
||||
if (!vdev_priv) {
|
||||
pkt_capture_err("vdev priv is NULL");
|
||||
psoc_priv = pkt_capture_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
pkt_capture_err("psoc_priv is NULL");
|
||||
return status;
|
||||
}
|
||||
|
||||
tx_ops = &vdev_priv->tx_ops;
|
||||
tx_ops = &psoc_priv->tx_ops;
|
||||
|
||||
if (!tx_ops->pkt_capture_send_mode)
|
||||
return status;
|
||||
@@ -131,7 +132,7 @@ tgt_pkt_capture_send_beacon_interval(struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t nth_value)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct pkt_capture_vdev_priv *vdev_priv;
|
||||
struct pkt_psoc_priv *psoc_priv;
|
||||
struct wlan_pkt_capture_tx_ops *tx_ops;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
@@ -141,13 +142,13 @@ tgt_pkt_capture_send_beacon_interval(struct wlan_objmgr_vdev *vdev,
|
||||
return status;
|
||||
}
|
||||
|
||||
vdev_priv = pkt_capture_vdev_get_priv(vdev);
|
||||
if (!vdev_priv) {
|
||||
pkt_capture_err("vdev priv is NULL");
|
||||
psoc_priv = pkt_capture_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
pkt_capture_err("psoc_priv is NULL");
|
||||
return status;
|
||||
}
|
||||
|
||||
tx_ops = &vdev_priv->tx_ops;
|
||||
tx_ops = &psoc_priv->tx_ops;
|
||||
|
||||
if (!tx_ops->pkt_capture_send_beacon_interval)
|
||||
return status;
|
||||
@@ -167,7 +168,7 @@ tgt_pkt_capture_send_config(struct wlan_objmgr_vdev *vdev,
|
||||
enum pkt_capture_config config)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct pkt_capture_vdev_priv *vdev_priv;
|
||||
struct pkt_psoc_priv *psoc_priv;
|
||||
struct wlan_pkt_capture_tx_ops *tx_ops;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
@@ -177,13 +178,13 @@ tgt_pkt_capture_send_config(struct wlan_objmgr_vdev *vdev,
|
||||
return status;
|
||||
}
|
||||
|
||||
vdev_priv = pkt_capture_vdev_get_priv(vdev);
|
||||
if (!vdev_priv) {
|
||||
pkt_capture_err("vdev priv is NULL");
|
||||
psoc_priv = pkt_capture_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
pkt_capture_err("psoc_priv is NULL");
|
||||
return status;
|
||||
}
|
||||
|
||||
tx_ops = &vdev_priv->tx_ops;
|
||||
tx_ops = &psoc_priv->tx_ops;
|
||||
|
||||
if (!tx_ops->pkt_capture_send_config)
|
||||
return status;
|
||||
|
Viittaa uudesa ongelmassa
Block a user