Browse Source

qcacmn: Controll target sleep in hif

Reduce the api footprint of hif and make hif responsible for controlling
its own timer as part of suspend resume.

Change-Id: I256161a8d147e99811f018c995081684f2bd0167
CRs-Fixed: 986480
Houston Hoffman 9 years ago
parent
commit
e61d4e1382
5 changed files with 3 additions and 34 deletions
  1. 0 1
      hif/inc/hif.h
  2. 0 18
      hif/src/hif_main.c
  3. 3 2
      hif/src/pcie/if_pci.c
  4. 0 12
      htc/htc.c
  5. 0 1
      htc/htc_api.h

+ 0 - 1
hif/inc/hif.h

@@ -385,7 +385,6 @@ QDF_STATUS hif_send_head(struct hif_opaque_softc *scn, uint8_t PipeID,
 				  qdf_nbuf_t wbuf, uint32_t data_attr);
 void hif_send_complete_check(struct hif_opaque_softc *scn, uint8_t PipeID,
 			     int force);
-void hif_cancel_deferred_target_sleep(struct hif_opaque_softc *scn);
 void hif_get_default_pipe(struct hif_opaque_softc *scn, uint8_t *ULPipe,
 			  uint8_t *DLPipe);
 int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,

+ 0 - 18
hif/src/hif_main.c

@@ -110,24 +110,6 @@ void hif_shut_down_device(struct hif_opaque_softc *scn)
 	hif_stop(scn);
 }
 
-
-
-/**
- * hif_cancel_deferred_target_sleep() - cancel deferred target sleep
- *
- * This function cancels the defered target sleep
- *
- * @scn: hif_opaque_softc
- *
- * Return: void
- */
-void hif_cancel_deferred_target_sleep(struct hif_opaque_softc *hif_ctx)
-{
-	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
-
-	hif_pci_cancel_deferred_target_sleep(scn);
-}
-
 /**
  * hif_get_target_id(): hif_get_target_id
  *

+ 3 - 2
hif/src/pcie/if_pci.c

@@ -2251,6 +2251,8 @@ static int hif_bus_suspend_link_up(struct hif_softc *scn)
 		return -EINVAL;
 	}
 
+	hif_pci_cancel_deferred_target_sleep(scn);
+
 	return 0;
 }
 
@@ -2297,7 +2299,6 @@ static int hif_bus_resume_link_up(struct hif_softc *scn)
 static int hif_bus_suspend_link_down(struct hif_softc *scn)
 {
 	struct pci_dev *pdev;
-	struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn);
 	struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
 	int status = 0;
 
@@ -2312,7 +2313,7 @@ static int hif_bus_suspend_link_down(struct hif_softc *scn)
 	}
 
 	/* Stop the HIF Sleep Timer */
-	hif_cancel_deferred_target_sleep(hif_hdl);
+	hif_pci_cancel_deferred_target_sleep(scn);
 
 	qdf_atomic_set(&scn->link_suspended, 1);
 

+ 0 - 12
htc/htc.c

@@ -828,18 +828,6 @@ void *htc_get_targetdef(HTC_HANDLE htc_handle)
 	return hif_get_targetdef(target->hif_dev);
 }
 
-/**
- * htc_cancel_deferred_target_sleep() - cancel deferred target sleep
- * @context: hif_opaque_softc context
- *
- * Return: none
- */
-void htc_cancel_deferred_target_sleep(void *context)
-{
-	struct hif_opaque_softc *scn = (struct hif_opaque_softc *)context;
-	hif_cancel_deferred_target_sleep(scn);
-}
-
 #ifdef IPA_OFFLOAD
 /**
  * htc_ipa_get_ce_resource() - get uc resource on lower layer

+ 0 - 1
htc/htc_api.h

@@ -703,7 +703,6 @@ do {									\
 void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credit);
 void htc_dump_counter_info(HTC_HANDLE HTCHandle);
 void *htc_get_targetdef(HTC_HANDLE htc_handle);
-void htc_cancel_deferred_target_sleep(void *context);
 int htc_runtime_suspend(void);
 int htc_runtime_resume(void);