qcacld-3.0: move hif_bus_open to hif_open
Can consolidate these allocations. Change-Id: I8af6fa459db62c99bf93ecdbd1dcd94bbee580a8 CRs-Fixed: 967256
This commit is contained in:

committed by
Akash Patel

parent
ebc68145ac
commit
3cfe68601a
@@ -125,7 +125,7 @@ static int hdd_hif_open(struct device *dev, void *bdev, const hif_bus_id *bid,
|
||||
int ret = 0;
|
||||
void *hif_ctx;
|
||||
|
||||
status = hif_open();
|
||||
status = hif_open(bus_type);
|
||||
if (!CDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("hif_open error = %d", status);
|
||||
return cdf_status_to_os_return(status);
|
||||
|
@@ -627,7 +627,7 @@ void hif_disable_isr(void *scn);
|
||||
void hif_reset_soc(void *scn);
|
||||
void hif_disable_aspm(void);
|
||||
void hif_save_htc_htt_config_endpoint(int htc_endpoint);
|
||||
CDF_STATUS hif_open(void);
|
||||
CDF_STATUS hif_open(enum ath_hal_bus_type bus_type);
|
||||
void hif_close(void *hif_ctx);
|
||||
CDF_STATUS hif_enable(void *hif_ctx, struct device *dev, void *bdev,
|
||||
const hif_bus_id *bid, enum ath_hal_bus_type bus_type,
|
||||
|
@@ -511,7 +511,7 @@ void hif_set_fw_info(void *scn, uint32_t target_fw_version)
|
||||
*
|
||||
* Return: scn
|
||||
*/
|
||||
CDF_STATUS hif_open(void)
|
||||
CDF_STATUS hif_open(enum ath_hal_bus_type bus_type)
|
||||
{
|
||||
struct ol_softc *scn;
|
||||
v_CONTEXT_t cds_context;
|
||||
@@ -536,6 +536,14 @@ CDF_STATUS hif_open(void)
|
||||
cdf_atomic_init(&scn->tasklet_from_intr);
|
||||
init_waitqueue_head(&scn->aps_osdev.event_queue);
|
||||
scn->linkstate_vote = 0;
|
||||
|
||||
status = hif_bus_open(scn, bus_type);
|
||||
if (status != CDF_STATUS_SUCCESS) {
|
||||
HIF_ERROR("%s: hif_bus_open error = %d, bus_type = %d",
|
||||
__func__, status, bus_type);
|
||||
cds_free_context(cds_context, CDF_MODULE_ID_HIF, scn);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -592,16 +600,8 @@ CDF_STATUS hif_enable(void *hif_ctx, struct device *dev,
|
||||
return CDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
status = hif_bus_open(scn, bus_type);
|
||||
if (status != CDF_STATUS_SUCCESS) {
|
||||
HIF_ERROR("%s: hif_bus_open error = %d, bus_type = %d",
|
||||
__func__, status, bus_type);
|
||||
return status;
|
||||
}
|
||||
|
||||
status = hif_enable_bus(scn, dev, bdev, bid, type);
|
||||
if (status != CDF_STATUS_SUCCESS) {
|
||||
hif_bus_close(scn);
|
||||
HIF_ERROR("%s: hif_enable_bus error = %d",
|
||||
__func__, status);
|
||||
return status;
|
||||
@@ -613,7 +613,6 @@ CDF_STATUS hif_enable(void *hif_ctx, struct device *dev,
|
||||
if (hif_config_ce(scn)) {
|
||||
HIF_ERROR("%s: Target probe failed.", __func__);
|
||||
hif_disable_bus(scn->aps_osdev.bdev);
|
||||
hif_bus_close(scn);
|
||||
status = CDF_STATUS_E_FAILURE;
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user