From: Sujith Manoharan Date: Sun, 28 Apr 2013 21:01:38 +0530 Subject: [ath9k-devel] [PATCH 20/20] ath10k: Remove unneeded locks during HTT RX attach In-Reply-To: <1367163098-22787-1-git-send-email-sujith@msujith.org> References: <1367163098-22787-1-git-send-email-sujith@msujith.org> Message-ID: <1367163098-22787-20-git-send-email-sujith@msujith.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org From: Sujith Manoharan We can dispense with the lockdep assert since the refill timer just calls the replenish routine which is held under the ring lock. Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath10k/htt_rx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 95ffcc2..bcb9021 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -273,6 +273,7 @@ static int ath10k_htt_rx_ring_fill_level(struct ath10k_htt *htt) return size; } +/* RX ring lock must be held. */ static void ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num) { struct htt_rx_desc *rx_desc; @@ -280,8 +281,6 @@ static void ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num) dma_addr_t paddr; int idx; - lockdep_assert_held(&htt->rx_ring.lock); - idx = __le32_to_cpu(*(htt->rx_ring.alloc_idx.vaddr)); while (num > 0) { skb = dev_alloc_skb(HTT_RX_BUF_SIZE + HTT_RX_DESC_ALIGN); @@ -641,10 +640,9 @@ int ath10k_htt_rx_attach(struct ath10k_htt *htt) setup_timer(timer, ath10k_htt_rx_ring_refill_retry, (unsigned long)htt); spin_lock_init(&htt->rx_ring.lock); - spin_lock_bh(&htt->rx_ring.lock); + htt->rx_ring.fill_cnt = 0; ath10k_htt_rx_ring_fill_n(htt, htt->rx_ring.fill_level); - spin_unlock_bh(&htt->rx_ring.lock); ath10k_dbg(ATH10K_DBG_HTT, "HTT RX ring size: %d, fill_level: %d\n", htt->rx_ring.size, htt->rx_ring.fill_level); -- 1.8.2.2