diff mbox series

[v2,4/5] wcn36xx: Functionally decompose DXE reset

Message ID 20211018231722.873525-5-bryan.odonoghue@linaro.org
State New
Headers show
Series wcn36xx: Fix DMA buffer allocation and free logic | expand

Commit Message

Bryan O'Donoghue Oct. 18, 2021, 11:17 p.m. UTC
A follow-on patch will reset the DXE block in dxe_deinit. Prepare the way
by first functionally decomposing the reset.

Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

---
 drivers/net/wireless/ath/wcn36xx/dxe.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

-- 
2.33.0


_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/dxe.c b/drivers/net/wireless/ath/wcn36xx/dxe.c
index 30f4484b336c3..d4f5746d9b10a 100644
--- a/drivers/net/wireless/ath/wcn36xx/dxe.c
+++ b/drivers/net/wireless/ath/wcn36xx/dxe.c
@@ -919,12 +919,19 @@  void wcn36xx_dxe_unset_tx_ack_skb(struct wcn36xx *wcn)
 	spin_unlock_irqrestore(&wcn->dxe_lock, flags);
 }
 
-int wcn36xx_dxe_init(struct wcn36xx *wcn)
+static void wcn36xx_dxe_reset(struct wcn36xx *wcn)
 {
-	int reg_data = 0, ret;
+	int reg_data = 0;
 
 	reg_data = WCN36XX_DXE_REG_RESET;
 	wcn36xx_dxe_write_register(wcn, WCN36XX_DXE_REG_CSR_RESET, reg_data);
+}
+
+int wcn36xx_dxe_init(struct wcn36xx *wcn)
+{
+	int reg_data = 0, ret;
+
+	wcn36xx_dxe_reset(wcn);
 
 	/* Select channels for rx avail and xfer done interrupts... */
 	reg_data = (WCN36XX_DXE_INT_CH3_MASK | WCN36XX_DXE_INT_CH1_MASK) << 16 |