From: Rajkumar Manoharan <rmanohar@codeaurora.org> To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Miles Hu <milehu@codeaurora.org>, Rajkumar Manoharan <rmanohar@codeaurora.org> Subject: [PATCH] ath11k: remove stale monitor status descriptor Date: Mon, 4 May 2020 18:27:43 -0700 [thread overview] Message-ID: <1588642063-6950-1-git-send-email-rmanohar@codeaurora.org> (raw) From: Miles Hu <milehu@codeaurora.org> The driver is not handling monitor status descriptor whenever the done bit of status descriptor is not set by hardware. This leave a stale entry in monitor status ring and flooding warning message. Fix that by removing the descriptor and move forward to next one in monitor status ring. Co-developed-by: Rajkumar Manoharan <rmanohar@codeaurora.org> Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org> Signed-off-by: Miles Hu <milehu@codeaurora.org> --- drivers/net/wireless/ath/ath11k/dp_rx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 47ad3bd9e1c6..27d17b8db662 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -2722,7 +2722,7 @@ static int ath11k_dp_rx_reap_mon_status_ring(struct ath11k_base *ab, int mac_id, ath11k_warn(ab, "rx monitor status with invalid buf_id %d\n", buf_id); spin_unlock_bh(&rx_ring->idr_lock); - continue; + goto move_next; } idr_remove(&rx_ring->bufs_idr, buf_id); @@ -2741,13 +2741,16 @@ static int ath11k_dp_rx_reap_mon_status_ring(struct ath11k_base *ab, int mac_id, tlv = (struct hal_tlv_hdr *)skb->data; if (FIELD_GET(HAL_TLV_HDR_TAG, tlv->tl) != HAL_RX_STATUS_BUFFER_DONE) { - ath11k_hal_srng_src_get_next_entry(ab, srng); - continue; + ath11k_warn(ab, "mon status DONE not set %lx\n", + FIELD_GET(HAL_TLV_HDR_TAG, + tlv->tl)); + dev_kfree_skb_any(skb); + goto move_next; } __skb_queue_tail(skb_list, skb); } - +move_next: skb = ath11k_dp_rx_alloc_mon_status_buf(ab, rx_ring, &buf_id, GFP_ATOMIC); -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Rajkumar Manoharan <rmanohar@codeaurora.org> To: ath11k@lists.infradead.org Cc: Miles Hu <milehu@codeaurora.org>, linux-wireless@vger.kernel.org, Rajkumar Manoharan <rmanohar@codeaurora.org> Subject: [PATCH] ath11k: remove stale monitor status descriptor Date: Mon, 4 May 2020 18:27:43 -0700 [thread overview] Message-ID: <1588642063-6950-1-git-send-email-rmanohar@codeaurora.org> (raw) From: Miles Hu <milehu@codeaurora.org> The driver is not handling monitor status descriptor whenever the done bit of status descriptor is not set by hardware. This leave a stale entry in monitor status ring and flooding warning message. Fix that by removing the descriptor and move forward to next one in monitor status ring. Co-developed-by: Rajkumar Manoharan <rmanohar@codeaurora.org> Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org> Signed-off-by: Miles Hu <milehu@codeaurora.org> --- drivers/net/wireless/ath/ath11k/dp_rx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 47ad3bd9e1c6..27d17b8db662 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -2722,7 +2722,7 @@ static int ath11k_dp_rx_reap_mon_status_ring(struct ath11k_base *ab, int mac_id, ath11k_warn(ab, "rx monitor status with invalid buf_id %d\n", buf_id); spin_unlock_bh(&rx_ring->idr_lock); - continue; + goto move_next; } idr_remove(&rx_ring->bufs_idr, buf_id); @@ -2741,13 +2741,16 @@ static int ath11k_dp_rx_reap_mon_status_ring(struct ath11k_base *ab, int mac_id, tlv = (struct hal_tlv_hdr *)skb->data; if (FIELD_GET(HAL_TLV_HDR_TAG, tlv->tl) != HAL_RX_STATUS_BUFFER_DONE) { - ath11k_hal_srng_src_get_next_entry(ab, srng); - continue; + ath11k_warn(ab, "mon status DONE not set %lx\n", + FIELD_GET(HAL_TLV_HDR_TAG, + tlv->tl)); + dev_kfree_skb_any(skb); + goto move_next; } __skb_queue_tail(skb_list, skb); } - +move_next: skb = ath11k_dp_rx_alloc_mon_status_buf(ab, rx_ring, &buf_id, GFP_ATOMIC); -- 2.7.4 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k
next reply other threads:[~2020-05-05 1:27 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-05 1:27 Rajkumar Manoharan [this message] 2020-05-05 1:27 ` [PATCH] ath11k: remove stale monitor status descriptor Rajkumar Manoharan 2020-05-11 12:27 ` Kalle Valo 2020-05-11 12:27 ` Kalle Valo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1588642063-6950-1-git-send-email-rmanohar@codeaurora.org \ --to=rmanohar@codeaurora.org \ --cc=ath11k@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ --cc=milehu@codeaurora.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.