qcacmn: Callback to get current bandwidth level
Add HIF callbacks to get current bandwidth level from upper layers. Change-Id: I18524558296f4b7d684f18b0e6615b2a0516b6d2 CRs-Fixed: 2602029
This commit is contained in:

zatwierdzone przez
nshrivas

rodzic
bdd5fcef82
commit
b34654bd55
@@ -537,7 +537,7 @@ struct htc_callbacks {
|
||||
* @is_recovery_in_progress: Query if driver state is recovery in progress
|
||||
* @is_load_unload_in_progress: Query if driver state Load/Unload in Progress
|
||||
* @is_driver_unloading: Query if driver is unloading.
|
||||
*
|
||||
* @get_bandwidth_level: Query current bandwidth level for the driver
|
||||
* This Structure provides callback pointer for HIF to query hdd for driver
|
||||
* states.
|
||||
*/
|
||||
@@ -548,6 +548,7 @@ struct hif_driver_state_callbacks {
|
||||
bool (*is_load_unload_in_progress)(void *context);
|
||||
bool (*is_driver_unloading)(void *context);
|
||||
bool (*is_target_ready)(void *context);
|
||||
int (*get_bandwidth_level)(void *context);
|
||||
};
|
||||
|
||||
/* This API detaches the HTC layer from the HIF device */
|
||||
|
@@ -1219,6 +1219,19 @@ bool hif_is_target_ready(struct hif_softc *scn)
|
||||
}
|
||||
qdf_export_symbol(hif_is_target_ready);
|
||||
|
||||
int hif_get_bandwidth_level(struct hif_opaque_softc *hif_handle)
|
||||
{
|
||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_handle);
|
||||
struct hif_driver_state_callbacks *cbk = hif_get_callbacks_handle(scn);
|
||||
|
||||
if (cbk && cbk->get_bandwidth_level)
|
||||
return cbk->get_bandwidth_level(cbk->context);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
qdf_export_symbol(hif_get_bandwidth_level);
|
||||
|
||||
/**
|
||||
* hif_batch_send() - API to access hif specific function
|
||||
* ce_batch_send.
|
||||
|
@@ -324,6 +324,15 @@ bool hif_is_driver_unloading(struct hif_softc *scn);
|
||||
bool hif_is_load_or_unload_in_progress(struct hif_softc *scn);
|
||||
bool hif_is_recovery_in_progress(struct hif_softc *scn);
|
||||
bool hif_is_target_ready(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* hif_get_bandwidth_level() - API to get the current bandwidth level
|
||||
* @scn: HIF Context
|
||||
*
|
||||
* Return: PLD bandwidth level
|
||||
*/
|
||||
int hif_get_bandwidth_level(struct hif_opaque_softc *hif_handle);
|
||||
|
||||
void hif_wlan_disable(struct hif_softc *scn);
|
||||
int hif_target_sleep_state_adjust(struct hif_softc *scn,
|
||||
bool sleep_ok,
|
||||
|
Reference in New Issue
Block a user