Skip to contentSkip to conversation

wcn36xx: calculate DXE control registers values

PATCH In review Ramon Fried 2 participants 4 messages Mar 4, 2018 – Mar 26, 2018 Qualcomm WCN36XX wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wcn36xx: calculate DXE control registers values

DXE descriptor control registers used hardcoded magic values.
Added bit definitions of the control register and calculate this values in compilation for clarity.

---
 drivers/net/wireless/ath/wcn36xx/dxe.c |   6 +-
 drivers/net/wireless/ath/wcn36xx/dxe.h | 112 +++++++++++++++++++++++++++++----
 2 files changed, 103 insertions(+), 15 deletions(-)
drivers/net/wireless/ath/wcn36xx/dxe.c +3 -3
index a3f1f7d042a4..8e4d6d9ea277 100644
@@ -376,7 +376,7 @@ static void reap_tx_dxes(struct wcn36xx *wcn, struct wcn36xx_dxe_ch *ch)
 	spin_lock_irqsave(&ch->lock, flags);
 	ctl = ch->tail_blk_ctl;
 	do {
-		if (ctl->desc->ctrl & WCN36XX_DXE_CTRL_VALID_MASK)
+		if (ctl->desc->ctrl & WCN36xx_DXE_CTRL_VLD)
 			break;
 		if (ctl->skb) {
 			dma_unmap_single(wcn->dev, ctl->desc->src_addr_l,
@@ -397,7 +397,7 @@ static void reap_tx_dxes(struct wcn36xx *wcn, struct wcn36xx_dxe_ch *ch)
 		}
 		ctl = ctl->next;
 	} while (ctl != ch->head_blk_ctl &&
-	       !(ctl->desc->ctrl & WCN36XX_DXE_CTRL_VALID_MASK));
+	       !(ctl->desc->ctrl & WCN36xx_DXE_CTRL_VLD));
 
 	ch->tail_blk_ctl = ctl;
 	spin_unlock_irqrestore(&ch->lock, flags);
@@ -503,7 +503,7 @@ static int wcn36xx_rx_handle_packets(struct wcn36xx *wcn,
 		int_mask = WCN36XX_DXE_INT_CH3_MASK;
 	}
 
-	while (!(dxe->ctrl & WCN36XX_DXE_CTRL_VALID_MASK)) {
+	while (!(dxe->ctrl & WCN36xx_DXE_CTRL_VLD)) {
 		skb = ctl->skb;
 		dma_addr = dxe->dst_addr_l;
 		ret = wcn36xx_dxe_fill_skb(wcn->dev, ctl);
drivers/net/wireless/ath/wcn36xx/dxe.h +100 -12

124 lines not on this page · raw message

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw
Quoted 5 lines · Ramon Fried

DXE descriptor control registers used hardcoded magic values. Added bit definitions of the control register and calculate this values in compilation for clarity.

I assume that the values are still the same and there are no functional changes? If yes, I'll add that to the commit log when I commit this.

Signature · 1 line
Kalle Valo
#2 lore raw
Quoted 9 lines · Kalle Valo
Quoted 5 lines · Ramon Fried

DXE descriptor control registers used hardcoded magic values. Added bit definitions of the control register and calculate this values in compilation for clarity.

I assume that the values are still the same and there are no functional changes? If yes, I'll add that to the commit log when I commit this.

Yes. I double verified this. the values are the same.

#3 lore raw
In reply to Ramon Fried
Quoted 6 lines · Ramon Fried

DXE descriptor control registers used hardcoded magic values. Added bit definitions of the control register and calculate this values in compilation for clarity. No functional changes.

Patch applied to ath-next branch of ath.git, thanks.

6ced7958168f wcn36xx: calculate DXE control registers values

Signature · 3 lines
https://patchwork.kernel.org/patch/10257759/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches