[PATCH 1/3] ath11k: Split PCI write/read functions
Kalle Valo
kvalo at codeaurora.org
Tue Sep 14 01:36:39 PDT 2021
Jouni Malinen <jouni at codeaurora.org> wrote:
> ath11k_pci_write32/read32 tries to wake up MHI before doing actual
> write/read work, which means each time a u32 is written/read, MHI
> wake up is performed. This is not necessary in case where we do a
> large amount of write/read, cause only one time of wake up is needed.
> So split each one into two parts, the first part does MHI get/put
> and the second one does actual write/read work.
>
> Also avoid the put operation if the previous get operation fails.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
>
> Signed-off-by: Baochen Qiang <bqiang at codeaurora.org>
> Signed-off-by: Jouni Malinen <jouni at codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo at codeaurora.org>
This causes new warnings:
drivers/net/wireless/ath/ath11k/pci.c:177:6: error: no previous prototype for 'ath11k_pci_do_write32' [-Werror=missing-prototypes]
drivers/net/wireless/ath/ath11k/pci.c:224:5: error: no previous prototype for 'ath11k_pci_do_read32' [-Werror=missing-prototypes]
I fixed them in the pending branch like this:
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
@@ -174,7 +174,7 @@ static inline u32 ath11k_pci_get_window_start(struct ath11k_base *ab,
return window_start;
}
-void ath11k_pci_do_write32(struct ath11k_base *ab, u32 offset, u32 value)
+static void ath11k_pci_do_write32(struct ath11k_base *ab, u32 offset, u32 value)
{
struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);
u32 window_start;
@@ -221,7 +221,7 @@ void ath11k_pci_write32(struct ath11k_base *ab, u32 offset, u32 value)
mhi_device_put(ab_pci->mhi_ctrl->mhi_dev);
}
-u32 ath11k_pci_do_read32(struct ath11k_base *ab, u32 offset)
+static u32 ath11k_pci_do_read32(struct ath11k_base *ab, u32 offset)
{
struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);
u32 val, window_start;
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210913180902.193874-2-jouni@codeaurora.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath11k
mailing list