wcn36xx: calculate DXE control registers values
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
@@ -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
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.
Signed-off-by Ramon Fried <[email protected]>
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
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.
Signed-off-by Ramon Fried <[email protected]>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.
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.
Signed-off-by Ramon Fried <[email protected]>Signed-off-by Kalle Valo <[email protected]>
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