qcacmn: Refactor BMI members from ol_softc

Group BMI members and access bmi info from hif instead of
dereferencing hif context.

Change-Id: I082f648490be0078df7d90cc8ebbf745b64fd97a
CRs-Fixed: 967765
Этот коммит содержится в:
Komal Seelam
2016-02-01 19:22:17 +05:30
родитель 7fca106501
Коммит b3a3bdf89f
3 изменённых файлов: 30 добавлений и 18 удалений

Просмотреть файл

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -156,6 +156,7 @@ CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *scn,
unsigned int mux_id = 0;
unsigned int transaction_id = 0xffff;
unsigned int user_flags = 0;
struct bmi_info *info = hif_get_bmi_ctx(scn);
#ifdef BMI_RSP_POLLING
cdf_dma_addr_t buf;
unsigned int completed_nbytes, id, flags;
@@ -190,7 +191,7 @@ CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *scn,
* CE_request = dma_map_single(dev,
* (void *)bmi_request, request_length, DMA_TO_DEVICE);
*/
CE_request = scn->bmi_cmd_da;
CE_request = info->bmi_cmd_da;
transaction->bmi_request_CE = CE_request;
if (bmi_response) {
@@ -199,7 +200,7 @@ CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *scn,
* CE_response = dma_map_single(dev, bmi_response,
* BMI_DATASZ_MAX, DMA_FROM_DEVICE);
*/
CE_response = scn->bmi_rsp_da;
CE_response = info->bmi_rsp_da;
transaction->bmi_response_host = bmi_response;
transaction->bmi_response_CE = CE_response;
/* dma_cache_sync(dev, bmi_response,

Просмотреть файл

@@ -3329,3 +3329,15 @@ void hif_runtime_lock_deinit(struct hif_pm_runtime_lock *data)
}
#endif /* FEATURE_RUNTIME_PM */
/**
* hif_get_bmi_ctx() - API to get BMI context
* @hif_ctx: HIF Context
*
* Return: Pointer to BMI Context
*/
struct bmi_info *hif_get_bmi_ctx(void *hif_ctx)
{
struct ol_softc *sc = hif_ctx;
return &sc->bmi_ctx;
}