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
This commit is contained in:

committed by
Vishwajith Upendra

parent
00d42aeb8e
commit
e61d4e1382
@@ -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);
|
qdf_nbuf_t wbuf, uint32_t data_attr);
|
||||||
void hif_send_complete_check(struct hif_opaque_softc *scn, uint8_t PipeID,
|
void hif_send_complete_check(struct hif_opaque_softc *scn, uint8_t PipeID,
|
||||||
int force);
|
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,
|
void hif_get_default_pipe(struct hif_opaque_softc *scn, uint8_t *ULPipe,
|
||||||
uint8_t *DLPipe);
|
uint8_t *DLPipe);
|
||||||
int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
|
int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
|
||||||
|
@@ -110,24 +110,6 @@ void hif_shut_down_device(struct hif_opaque_softc *scn)
|
|||||||
hif_stop(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
|
* hif_get_target_id(): hif_get_target_id
|
||||||
*
|
*
|
||||||
|
@@ -2251,6 +2251,8 @@ static int hif_bus_suspend_link_up(struct hif_softc *scn)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hif_pci_cancel_deferred_target_sleep(scn);
|
||||||
|
|
||||||
return 0;
|
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)
|
static int hif_bus_suspend_link_down(struct hif_softc *scn)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev;
|
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);
|
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
@@ -2312,7 +2313,7 @@ static int hif_bus_suspend_link_down(struct hif_softc *scn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Stop the HIF Sleep Timer */
|
/* 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);
|
qdf_atomic_set(&scn->link_suspended, 1);
|
||||||
|
|
||||||
|
12
htc/htc.c
12
htc/htc.c
@@ -828,18 +828,6 @@ void *htc_get_targetdef(HTC_HANDLE htc_handle)
|
|||||||
return hif_get_targetdef(target->hif_dev);
|
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
|
#ifdef IPA_OFFLOAD
|
||||||
/**
|
/**
|
||||||
* htc_ipa_get_ce_resource() - get uc resource on lower layer
|
* htc_ipa_get_ce_resource() - get uc resource on lower layer
|
||||||
|
@@ -703,7 +703,6 @@ do { \
|
|||||||
void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credit);
|
void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credit);
|
||||||
void htc_dump_counter_info(HTC_HANDLE HTCHandle);
|
void htc_dump_counter_info(HTC_HANDLE HTCHandle);
|
||||||
void *htc_get_targetdef(HTC_HANDLE htc_handle);
|
void *htc_get_targetdef(HTC_HANDLE htc_handle);
|
||||||
void htc_cancel_deferred_target_sleep(void *context);
|
|
||||||
int htc_runtime_suspend(void);
|
int htc_runtime_suspend(void);
|
||||||
int htc_runtime_resume(void);
|
int htc_runtime_resume(void);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user