qcacmn: disable monitor rings for QCN9224
Add dedicated monitor flag at SOC level and do not enable legacy monitor rings for QCN9224 Also add flag to disable rxdma2sw ring for QCN9224. Change-Id: I399d22d6c3361bb75ebaad4e46b156db5e628d6b
This commit is contained in:

committed by
Madan Koyyalamudi

parent
50f3c5d6a6
commit
81de2fc14d
@@ -5481,6 +5481,7 @@ static QDF_STATUS dp_rxdma_ring_config(struct dp_soc *soc)
|
||||
dp_monitor_htt_srng_setup(soc, pdev,
|
||||
lmac_id,
|
||||
mac_for_pdev);
|
||||
if (!soc->rxdma2sw_rings_not_supported)
|
||||
htt_srng_setup(soc->htt_handle, mac_for_pdev,
|
||||
soc->rxdma_err_dst_ring[lmac_id].hal_srng,
|
||||
RXDMA_DST);
|
||||
@@ -12336,11 +12337,15 @@ static void dp_pdev_srng_deinit(struct dp_pdev *pdev)
|
||||
dp_ipa_deinit_alt_tx_ring(soc);
|
||||
}
|
||||
|
||||
if (!soc->rxdma2sw_rings_not_supported) {
|
||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i, pdev->pdev_id);
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
||||
pdev->pdev_id);
|
||||
|
||||
wlan_minidump_remove(soc->rxdma_err_dst_ring[lmac_id].base_vaddr_unaligned,
|
||||
soc->rxdma_err_dst_ring[lmac_id].alloc_size,
|
||||
wlan_minidump_remove(soc->rxdma_err_dst_ring[lmac_id].
|
||||
base_vaddr_unaligned,
|
||||
soc->rxdma_err_dst_ring[lmac_id].
|
||||
alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_ERR_DST,
|
||||
"rxdma_err_dst");
|
||||
@@ -12349,6 +12354,9 @@ static void dp_pdev_srng_deinit(struct dp_pdev *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_pdev_srng_init() - initialize all pdev srng rings including
|
||||
* monitor rings
|
||||
@@ -12384,23 +12392,30 @@ static QDF_STATUS dp_pdev_srng_init(struct dp_pdev *pdev)
|
||||
/* Only valid for MCL */
|
||||
pdev = soc->pdev_list[0];
|
||||
|
||||
if (!soc->rxdma2sw_rings_not_supported) {
|
||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i, pdev->pdev_id);
|
||||
struct dp_srng *srng = &soc->rxdma_err_dst_ring[lmac_id];
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
||||
pdev->pdev_id);
|
||||
struct dp_srng *srng =
|
||||
&soc->rxdma_err_dst_ring[lmac_id];
|
||||
|
||||
if (srng->hal_srng)
|
||||
continue;
|
||||
|
||||
if (dp_srng_init(soc, srng, RXDMA_DST, 0, lmac_id)) {
|
||||
dp_init_err("%pK: " RNG_ERR "rxdma_err_dst_ring", soc);
|
||||
dp_init_err("%pK:" RNG_ERR "rxdma_err_dst_ring",
|
||||
soc);
|
||||
goto fail1;
|
||||
}
|
||||
wlan_minidump_log(soc->rxdma_err_dst_ring[lmac_id].base_vaddr_unaligned,
|
||||
soc->rxdma_err_dst_ring[lmac_id].alloc_size,
|
||||
wlan_minidump_log(soc->rxdma_err_dst_ring[lmac_id].
|
||||
base_vaddr_unaligned,
|
||||
soc->rxdma_err_dst_ring[lmac_id].
|
||||
alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_ERR_DST,
|
||||
"rxdma_err_dst");
|
||||
}
|
||||
}
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
fail1:
|
||||
@@ -12425,12 +12440,15 @@ static void dp_pdev_srng_free(struct dp_pdev *pdev)
|
||||
dp_ipa_free_alt_tx_ring(soc);
|
||||
}
|
||||
|
||||
if (!soc->rxdma2sw_rings_not_supported) {
|
||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i, pdev->pdev_id);
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
||||
pdev->pdev_id);
|
||||
|
||||
dp_srng_free(soc, &soc->rxdma_err_dst_ring[lmac_id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_pdev_srng_alloc() - allocate memory for all pdev srng rings including
|
||||
@@ -12470,18 +12488,23 @@ static QDF_STATUS dp_pdev_srng_alloc(struct dp_pdev *pdev)
|
||||
/* Only valid for MCL */
|
||||
pdev = soc->pdev_list[0];
|
||||
|
||||
if (!soc->rxdma2sw_rings_not_supported) {
|
||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i, pdev->pdev_id);
|
||||
struct dp_srng *srng = &soc->rxdma_err_dst_ring[lmac_id];
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
||||
pdev->pdev_id);
|
||||
struct dp_srng *srng =
|
||||
&soc->rxdma_err_dst_ring[lmac_id];
|
||||
|
||||
if (srng->base_vaddr_unaligned)
|
||||
continue;
|
||||
|
||||
if (dp_srng_alloc(soc, srng, RXDMA_DST, ring_size, 0)) {
|
||||
dp_init_err("%pK: " RNG_ERR "rxdma_err_dst_ring", soc);
|
||||
dp_init_err("%pK:" RNG_ERR "rxdma_err_dst_ring",
|
||||
soc);
|
||||
goto fail1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
fail1:
|
||||
@@ -13001,6 +13024,7 @@ static void dp_soc_cfg_init(struct dp_soc *soc)
|
||||
wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, false);
|
||||
soc->per_tid_basize_max_tid = 8;
|
||||
soc->wbm_release_desc_rx_sg_support = 1;
|
||||
soc->rxdma2sw_rings_not_supported = 1;
|
||||
|
||||
break;
|
||||
default:
|
||||
|
@@ -2099,6 +2099,7 @@ struct dp_soc {
|
||||
#ifdef WIFI_MONITOR_SUPPORT
|
||||
struct dp_mon_soc *monitor_soc;
|
||||
#endif
|
||||
bool rxdma2sw_rings_not_supported;
|
||||
};
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
@@ -94,10 +94,19 @@ static void dp_mon_dest_rings_deinit(struct dp_pdev *pdev, int lmac_id)
|
||||
static void dp_mon_rings_deinit(struct dp_pdev *pdev)
|
||||
{
|
||||
int mac_id = 0;
|
||||
struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx;
|
||||
struct dp_soc *soc = pdev->soc;
|
||||
struct dp_mon_soc *mon_soc;
|
||||
|
||||
pdev_cfg_ctx = pdev->wlan_cfg_ctx;
|
||||
mon_soc = soc->monitor_soc;
|
||||
|
||||
if(!mon_soc) {
|
||||
dp_mon_err("%pK: monitor SOC not initialized",
|
||||
soc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mon_soc->monitor_mode_v2)
|
||||
return;
|
||||
|
||||
for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, mac_id,
|
||||
@@ -137,10 +146,19 @@ static void dp_mon_dest_rings_free(struct dp_pdev *pdev, int lmac_id)
|
||||
static void dp_mon_rings_free(struct dp_pdev *pdev)
|
||||
{
|
||||
int mac_id = 0;
|
||||
struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx;
|
||||
struct dp_soc *soc = pdev->soc;
|
||||
struct dp_mon_soc *mon_soc;
|
||||
|
||||
pdev_cfg_ctx = pdev->wlan_cfg_ctx;
|
||||
mon_soc = soc->monitor_soc;
|
||||
|
||||
if(!mon_soc) {
|
||||
dp_mon_err("%pK: monitor SOC not initialized",
|
||||
soc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (soc->monitor_soc->monitor_mode_v2)
|
||||
return;
|
||||
|
||||
for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, mac_id,
|
||||
@@ -203,9 +221,18 @@ static
|
||||
QDF_STATUS dp_mon_rings_init(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
{
|
||||
int mac_id = 0;
|
||||
struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx;
|
||||
struct dp_mon_soc *mon_soc;
|
||||
|
||||
pdev_cfg_ctx = pdev->wlan_cfg_ctx;
|
||||
mon_soc = soc->monitor_soc;
|
||||
|
||||
if(!mon_soc) {
|
||||
dp_mon_err("%pK: monitor SOC not initialized",
|
||||
soc);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (soc->monitor_soc->monitor_mode_v2)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
|
||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, mac_id,
|
||||
@@ -285,6 +312,18 @@ QDF_STATUS dp_mon_rings_alloc(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
int mac_id = 0;
|
||||
int entries;
|
||||
struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx;
|
||||
struct dp_mon_soc *mon_soc;
|
||||
|
||||
mon_soc = soc->monitor_soc;
|
||||
|
||||
if(!mon_soc) {
|
||||
dp_mon_err("%pK: monitor SOC not initialized",
|
||||
soc);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (mon_soc->monitor_mode_v2)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
pdev_cfg_ctx = pdev->wlan_cfg_ctx;
|
||||
|
||||
@@ -1028,6 +1067,17 @@ QDF_STATUS dp_mon_htt_srng_setup(struct dp_soc *soc,
|
||||
int mac_for_pdev)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct dp_mon_soc *mon_soc;
|
||||
|
||||
mon_soc = soc->monitor_soc;
|
||||
if(!mon_soc) {
|
||||
dp_mon_err("%pK: monitor SOC not initialized",
|
||||
soc);
|
||||
return status;
|
||||
}
|
||||
|
||||
if (mon_soc->monitor_mode_v2)
|
||||
return status;
|
||||
|
||||
if (wlan_cfg_is_delay_mon_replenish(soc->wlan_cfg_ctx)) {
|
||||
status = dp_mon_htt_dest_srng_setup(soc, pdev,
|
||||
@@ -5426,6 +5476,7 @@ QDF_STATUS dp_mon_soc_cfg_init(struct dp_soc *soc)
|
||||
wlan_cfg_set_mon_delayed_replenish_entries(soc->wlan_cfg_ctx,
|
||||
MON_BUF_MIN_ENTRIES);
|
||||
mon_soc->hw_nac_monitor_support = 1;
|
||||
mon_soc->monitor_mode_v2 = 1;
|
||||
break;
|
||||
default:
|
||||
dp_mon_info("%s: Unknown tgt type %d\n", __func__, target_type);
|
||||
|
@@ -195,6 +195,7 @@ struct dp_mon_soc {
|
||||
uint8_t mon_vdev_timer_state;
|
||||
|
||||
struct dp_mon_ops *mon_ops;
|
||||
bool monitor_mode_v2;
|
||||
};
|
||||
|
||||
struct dp_mon_pdev {
|
||||
|
@@ -1366,6 +1366,11 @@ QDF_STATUS dp_mon_filter_update(struct dp_pdev *pdev)
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
return status;
|
||||
|
||||
if (soc->monitor_soc->monitor_mode_v2) {
|
||||
dp_mon_filter_err(" Mon ring not supported for this arch");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup the filters for the monitor destination ring.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user