Merge "qca-wifi: remove dependency of public files from wlan_objmgr_psoc_obj.h"
diff --git a/target_if/cfr/src/target_if_cfr_8074v2.c b/target_if/cfr/src/target_if_cfr_8074v2.c
index ee7b2c9..0d47efa 100644
--- a/target_if/cfr/src/target_if_cfr_8074v2.c
+++ b/target_if/cfr/src/target_if_cfr_8074v2.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -213,6 +213,7 @@
struct pdev_cfr *pdev_cfrobj;
struct look_up_table *lut = NULL;
struct csi_cfr_header *header = NULL;
+ struct wlan_lmac_if_rx_ops *rx_ops;
if ((!pdev) || (!payload)) {
cfr_err("pdev or payload is null");
@@ -265,7 +266,13 @@
* Message format
* Meta data Header + actual payload + trailer
*/
- status = psoc->soc_cb.rx_ops.cfr_rx_ops.cfr_info_send(pdev, &lut->header,
+ rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
+ if (!rx_ops) {
+ cfr_err("rx_ops is NULL");
+ return true;
+ }
+
+ status = rx_ops->cfr_rx_ops.cfr_info_send(pdev, &lut->header,
sizeof(struct csi_cfr_header),
lut->data, lut->data_len, &end_magic, 4);
release_lut_entry(pdev, lut);
@@ -343,6 +350,7 @@
wmi_cfr_peer_tx_event_param tx_evt_param = {0};
qdf_dma_addr_t buf_addr = 0, buf_addr_temp = 0;
int status;
+ struct wlan_lmac_if_rx_ops *rx_ops;
psoc = scn->psoc_obj;
if (!psoc) {
@@ -350,6 +358,12 @@
return -EINVAL;
}
+ rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
+ if (!rx_ops) {
+ cfr_err("rx_ops is NULL");
+ return -EINVAL;
+ }
+
retval = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_CFR_ID);
if (QDF_IS_STATUS_ERROR(retval)) {
cfr_err("unable to get psoc reference");
@@ -414,9 +428,9 @@
ether_sprintf(&tx_evt_param.peer_mac_addr.bytes[0]));
prepare_cfr_header_txstatus(&tx_evt_param, &header_error);
- psoc->soc_cb.rx_ops.cfr_rx_ops.cfr_info_send(pdev, &header_error,
- sizeof(struct csi_cfr_header),
- NULL, 0, &end_magic, 4);
+ rx_ops->cfr_rx_ops.cfr_info_send(pdev, &header_error,
+ sizeof(struct csi_cfr_header),
+ NULL, 0, &end_magic, 4);
wlan_objmgr_psoc_release_ref(psoc, WLAN_CFR_ID);
wlan_objmgr_vdev_release_ref(vdev, WLAN_CFR_ID);
@@ -501,7 +515,7 @@
status = correlate_and_relay(pdev, cookie, lut,
CORRELATE_TX_EV_MODULE_ID);
if (status == STATUS_STREAM_AND_RELEASE) {
- status = psoc->soc_cb.rx_ops.cfr_rx_ops.cfr_info_send(pdev, &lut->header,
+ status = rx_ops->cfr_rx_ops.cfr_info_send(pdev, &lut->header,
sizeof(struct csi_cfr_header),
lut->data, lut->data_len, &end_magic, 4);
release_lut_entry(pdev, lut);
@@ -585,9 +599,16 @@
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_direct_buf_rx_tx_ops *dbr_tx_ops = NULL;
struct dbr_module_config dbr_config;
+ struct wlan_lmac_if_tx_ops *tx_ops;
psoc = wlan_pdev_get_psoc(pdev);
- dbr_tx_ops = &psoc->soc_cb.tx_ops.dbr_tx_ops;
+ tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
+ if (!tx_ops) {
+ cfr_err("tx_ops is NULL");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ dbr_tx_ops = &tx_ops->dbr_tx_ops;
dbr_config.num_resp_per_event = DBR_NUM_RESP_PER_EVENT_CFR;
dbr_config.event_timeout_in_ms = DBR_EVENT_TIMEOUT_IN_MS_CFR;
if (dbr_tx_ops->direct_buf_rx_module_register) {
@@ -604,9 +625,16 @@
{
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_direct_buf_rx_tx_ops *dbr_tx_ops = NULL;
+ struct wlan_lmac_if_tx_ops *tx_ops;
psoc = wlan_pdev_get_psoc(pdev);
- dbr_tx_ops = &psoc->soc_cb.tx_ops.dbr_tx_ops;
+ tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
+ if (!tx_ops) {
+ cfr_err("tx_ops is NULL");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ dbr_tx_ops = &tx_ops->dbr_tx_ops;
if (dbr_tx_ops->direct_buf_rx_module_unregister) {
return dbr_tx_ops->direct_buf_rx_module_unregister
(pdev, DBR_MODULE_CFR);
@@ -621,9 +649,16 @@
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_direct_buf_rx_tx_ops *dbr_tx_ops = NULL;
struct module_ring_params *param = {0};
+ struct wlan_lmac_if_tx_ops *tx_ops;
psoc = wlan_pdev_get_psoc(pdev);
- dbr_tx_ops = &psoc->soc_cb.tx_ops.dbr_tx_ops;
+ tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
+ if (!tx_ops) {
+ cfr_err("tx_ops is NULL");
+ return NULL;
+ }
+
+ dbr_tx_ops = &tx_ops->dbr_tx_ops;
if(dbr_tx_ops->direct_buf_rx_get_ring_params)
dbr_tx_ops->direct_buf_rx_get_ring_params(pdev, param,
diff --git a/umac/dfs/core/src/misc/dfs_zero_cac.c b/umac/dfs/core/src/misc/dfs_zero_cac.c
index 98eec30..e9bb98f 100644
--- a/umac/dfs/core/src/misc/dfs_zero_cac.c
+++ b/umac/dfs/core/src/misc/dfs_zero_cac.c
@@ -5556,10 +5556,11 @@
void dfs_set_precac_enable(struct wlan_dfs *dfs, uint32_t value)
{
struct wlan_objmgr_psoc *psoc;
- struct wlan_lmac_if_target_tx_ops *tx_ops;
+ struct wlan_lmac_if_target_tx_ops *tgt_tx_ops;
uint32_t target_type;
struct target_psoc_info *tgt_hdl;
struct tgt_info *info;
+ struct wlan_lmac_if_tx_ops *tx_ops;
psoc = wlan_pdev_get_psoc(dfs->dfs_pdev_obj);
if (!psoc) {
@@ -5569,7 +5570,13 @@
return;
}
- tx_ops = &psoc->soc_cb.tx_ops.target_tx_ops;
+ tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
+ if (!tx_ops) {
+ dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "tx_ops is NULL");
+ return;
+ }
+
+ tgt_tx_ops = &tx_ops->target_tx_ops;
target_type = lmac_get_target_type(dfs->dfs_pdev_obj);
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
@@ -5603,7 +5610,7 @@
if ((1 == value) &&
(utils_get_dfsdomain(dfs->dfs_pdev_obj) == DFS_ETSI_DOMAIN)) {
- if (tx_ops->tgt_is_tgt_type_qca9984(target_type))
+ if (tgt_tx_ops->tgt_is_tgt_type_qca9984(target_type))
dfs->dfs_legacy_precac_ucfg = value;
else
dfs->dfs_agile_precac_ucfg = value;