ath10k: hif: make send_complete_check op optional
authorKalle Valo <kvalo@codeaurora.org>
Thu, 16 Apr 2020 11:50:59 +0000 (14:50 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Apr 2020 12:04:02 +0000 (15:04 +0300)
That way we don't need to have an empty function in sdio.c.

No functional changes, compile tested only.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1587037859-28873-5-git-send-email-kvalo@codeaurora.org
drivers/net/wireless/ath/ath10k/hif.h
drivers/net/wireless/ath/ath10k/sdio.c
drivers/net/wireless/ath/ath10k/usb.c

index 2c5d61d98337c7b23e7660d22e6fccf61aebff00..9e45fd9073a67f2090399cbb476034b1a4c804d7 100644 (file)
@@ -170,7 +170,8 @@ static inline void ath10k_hif_get_default_pipe(struct ath10k *ar,
 static inline void ath10k_hif_send_complete_check(struct ath10k *ar,
                                                  u8 pipe_id, int force)
 {
-       ar->hif.ops->send_complete_check(ar, pipe_id, force);
+       if (ar->hif.ops->send_complete_check)
+               ar->hif.ops->send_complete_check(ar, pipe_id, force);
 }
 
 static inline u16 ath10k_hif_get_free_queue_number(struct ath10k *ar,
index 884e1a85e29faa0639e0212c4149ddfcb3307d89..e2aff2254a407d3203b8196b9897f65d0d7b33b5 100644 (file)
@@ -2101,17 +2101,6 @@ static void ath10k_sdio_hif_get_default_pipe(struct ath10k *ar,
        *dl_pipe = 0;
 }
 
-/* This op is currently only used by htc_wait_target if the HTC ready
- * message times out. It is not applicable for SDIO since there is nothing
- * we can do if the HTC ready message does not arrive in time.
- * TODO: Make this op non mandatory by introducing a NULL check in the
- * hif op wrapper.
- */
-static void ath10k_sdio_hif_send_complete_check(struct ath10k *ar,
-                                               u8 pipe, int force)
-{
-}
-
 static const struct ath10k_hif_ops ath10k_sdio_hif_ops = {
        .tx_sg                  = ath10k_sdio_hif_tx_sg,
        .diag_read              = ath10k_sdio_hif_diag_read,
@@ -2123,7 +2112,6 @@ static const struct ath10k_hif_ops ath10k_sdio_hif_ops = {
        .get_htt_tx_complete    = ath10k_sdio_get_htt_tx_complete,
        .map_service_to_pipe    = ath10k_sdio_hif_map_service_to_pipe,
        .get_default_pipe       = ath10k_sdio_hif_get_default_pipe,
-       .send_complete_check    = ath10k_sdio_hif_send_complete_check,
        .power_up               = ath10k_sdio_hif_power_up,
        .power_down             = ath10k_sdio_hif_power_down,
 #ifdef CONFIG_PM
index 1e0343081be918fb92acf59b45f59085a5da9ffc..b7daf344d012edeafa3356a90b21d750cfb9ade1 100644 (file)
@@ -693,17 +693,6 @@ static int ath10k_usb_hif_map_service_to_pipe(struct ath10k *ar, u16 svc_id,
        return 0;
 }
 
-/* This op is currently only used by htc_wait_target if the HTC ready
- * message times out. It is not applicable for USB since there is nothing
- * we can do if the HTC ready message does not arrive in time.
- * TODO: Make this op non mandatory by introducing a NULL check in the
- * hif op wrapper.
- */
-static void ath10k_usb_hif_send_complete_check(struct ath10k *ar,
-                                              u8 pipe, int force)
-{
-}
-
 static int ath10k_usb_hif_power_up(struct ath10k *ar,
                                   enum ath10k_firmware_mode fw_mode)
 {
@@ -737,7 +726,6 @@ static const struct ath10k_hif_ops ath10k_usb_hif_ops = {
        .stop                   = ath10k_usb_hif_stop,
        .map_service_to_pipe    = ath10k_usb_hif_map_service_to_pipe,
        .get_default_pipe       = ath10k_usb_hif_get_default_pipe,
-       .send_complete_check    = ath10k_usb_hif_send_complete_check,
        .get_free_queue_number  = ath10k_usb_hif_get_free_queue_number,
        .power_up               = ath10k_usb_hif_power_up,
        .power_down             = ath10k_usb_hif_power_down,