Message ID | 20240506173017.597715-1-quic_periyasa@quicinc.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2db7a82fd150193849d04592e205b3d178207840 |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: ath12k: avoid double SW2HW_MACID conversion | expand |
On 5/6/2024 10:30 AM, Karthikeyan Periyasamy wrote: > Currently, ath12k_wmi_pdev_dma_ring_cfg() fails due to an invalid pdev_id > parameter passed to the WMI_PDEV_DMA_RING_CFG_REQ_CMDID WMI command. This > invalid pdev_id is caused by a double conversion of the MAC ID. Since the > the caller of ath12k_wmi_pdev_dma_ring_cfg() already performs the MAC ID > conversion, it is unnecessary to do it again within the function. To fix > this, remove the software (SW) to hardware (HW) MAC ID conversion from > ath12k_wmi_pdev_dma_ring_cfg() to avoid this redundant conversion. > > Found in code review. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> wrote: > Currently, ath12k_wmi_pdev_dma_ring_cfg() fails due to an invalid pdev_id > parameter passed to the WMI_PDEV_DMA_RING_CFG_REQ_CMDID WMI command. This > invalid pdev_id is caused by a double conversion of the MAC ID. Since the > the caller of ath12k_wmi_pdev_dma_ring_cfg() already performs the MAC ID > conversion, it is unnecessary to do it again within the function. To fix > this, remove the software (SW) to hardware (HW) MAC ID conversion from > ath12k_wmi_pdev_dma_ring_cfg() to avoid this redundant conversion. > > Found in code review. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> > Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> > Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Patch applied to ath-next branch of ath.git, thanks. 2db7a82fd150 wifi: ath12k: avoid double SW2HW_MACID conversion
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 7a52d2082b79..9e9f58b5cbfb 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -3808,7 +3808,7 @@ int ath12k_wmi_pdev_dma_ring_cfg(struct ath12k *ar, cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_DMA_RING_CFG_REQ, sizeof(*cmd)); - cmd->pdev_id = cpu_to_le32(DP_SW2HW_MACID(arg->pdev_id)); + cmd->pdev_id = cpu_to_le32(arg->pdev_id); cmd->module_id = cpu_to_le32(arg->module_id); cmd->base_paddr_lo = cpu_to_le32(arg->base_paddr_lo); cmd->base_paddr_hi = cpu_to_le32(arg->base_paddr_hi);
Currently, ath12k_wmi_pdev_dma_ring_cfg() fails due to an invalid pdev_id parameter passed to the WMI_PDEV_DMA_RING_CFG_REQ_CMDID WMI command. This invalid pdev_id is caused by a double conversion of the MAC ID. Since the the caller of ath12k_wmi_pdev_dma_ring_cfg() already performs the MAC ID conversion, it is unnecessary to do it again within the function. To fix this, remove the software (SW) to hardware (HW) MAC ID conversion from ath12k_wmi_pdev_dma_ring_cfg() to avoid this redundant conversion. Found in code review. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> --- drivers/net/wireless/ath/ath12k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 2c4d8e19cf060744a9db466ffbaea13ab37f25ca