qcacmn: Drop packets from RXDMA2SW ring on the non-monitoring MAC

In monitor mode, if channel is initially configured from 5G
band and then moved to channel from 2G band, packets are still
received on MAC-0 RXDMA2SW ring since IMPS is disabled for both
MACs. Since driver reaps only MAC-1 RXDMA2SW ring, ring full
condition is hit for the MAC-0 ring causing ring backpressure.

Fix is to drop packets received on the non-monitoring MAC
ring.

Change-Id: I49cb276827f4a06791183ee3fe8c88ba84df085d
CRs-Fixed: 2791341
This commit is contained in:
Yeshwanth Sriram Guntuka
2020-10-14 00:30:09 +05:30
committed by snandini
parent 1d687546c2
commit c5a9883e25
5 changed files with 315 additions and 23 deletions

View File

@@ -2061,8 +2061,10 @@ static void dp_interrupt_timer(void *arg)
int budget = 0xffff, i;
uint32_t remaining_quota = budget;
uint64_t start_time;
uint32_t lmac_id;
uint8_t dp_intr_id;
uint32_t lmac_id = DP_MON_INVALID_LMAC_ID;
uint8_t dp_intr_id = wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx);
uint32_t lmac_iter;
int max_mac_rings = wlan_cfg_get_num_mac_rings(pdev->wlan_cfg_ctx);
/*
* this logic makes all data path interfacing rings (UMAC/LMAC)
@@ -2083,32 +2085,36 @@ static void dp_interrupt_timer(void *arg)
if (!qdf_atomic_read(&soc->cmn_init_done))
return;
if (pdev->mon_chan_band == REG_BAND_UNKNOWN) {
qdf_timer_mod(&soc->int_timer, DP_INTR_POLL_TIMER_MS);
return;
if (pdev->mon_chan_band != REG_BAND_UNKNOWN) {
lmac_id = pdev->ch_band_lmac_id_mapping[pdev->mon_chan_band];
if (qdf_likely(lmac_id != DP_MON_INVALID_LMAC_ID)) {
dp_intr_id = soc->mon_intr_id_lmac_map[lmac_id];
dp_srng_record_timer_entry(soc, dp_intr_id);
}
}
lmac_id = pdev->ch_band_lmac_id_mapping[pdev->mon_chan_band];
if (qdf_unlikely(lmac_id == DP_MON_INVALID_LMAC_ID)) {
qdf_timer_mod(&soc->int_timer, DP_INTR_POLL_TIMER_MS);
return;
}
dp_intr_id = soc->mon_intr_id_lmac_map[lmac_id];
dp_srng_record_timer_entry(soc, dp_intr_id);
start_time = qdf_get_log_timestamp();
dp_is_hw_dbs_enable(soc, &max_mac_rings);
while (yield == DP_TIMER_NO_YIELD) {
work_done = dp_mon_process(soc, &soc->intr_ctx[dp_intr_id],
lmac_id, remaining_quota);
if (work_done) {
budget -= work_done;
if (budget <= 0) {
yield = DP_TIMER_WORK_EXHAUST;
goto budget_done;
for (lmac_iter = 0; lmac_iter < max_mac_rings; lmac_iter++) {
if (lmac_iter == lmac_id)
work_done = dp_mon_process(soc,
&soc->intr_ctx[dp_intr_id],
lmac_iter, remaining_quota);
else
work_done = dp_mon_drop_packets_for_mac(pdev,
lmac_iter,
remaining_quota);
if (work_done) {
budget -= work_done;
if (budget <= 0) {
yield = DP_TIMER_WORK_EXHAUST;
goto budget_done;
}
remaining_quota = budget;
total_work_done += work_done;
}
remaining_quota = budget;
total_work_done += work_done;
}
yield = dp_should_timer_irq_yield(soc, total_work_done,
@@ -2123,7 +2129,8 @@ budget_done:
else
qdf_timer_mod(&soc->int_timer, DP_INTR_POLL_TIMER_MS);
dp_srng_record_timer_exit(soc, dp_intr_id);
if (lmac_id != DP_MON_INVALID_LMAC_ID)
dp_srng_record_timer_exit(soc, dp_intr_id);
}
#ifdef WLAN_FEATURE_DP_EVENT_HISTORY