qcacmn: Modify HIF BMI API to pass dma command and response
Pass BMI DMA Command and Response address to HIF BMI API as arguments instead of using bmi context in HIF. Change-Id: Ifdb51581a33665b1857c63e33b1c26bbd99575eb CRs-Fixed: 967765
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
6081702c40
commit
2a5fa63d2b
@@ -272,8 +272,8 @@ void hif_detach_htc(struct ol_softc *scn);
|
|||||||
* API to handle HIF-specific BMI message exchanges, this API is synchronous
|
* API to handle HIF-specific BMI message exchanges, this API is synchronous
|
||||||
* and only allowed to be called from a context that can block (sleep) */
|
* and only allowed to be called from a context that can block (sleep) */
|
||||||
CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *scn,
|
CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *scn,
|
||||||
uint8_t *pSendMessage,
|
cdf_dma_addr_t cmd, cdf_dma_addr_t rsp,
|
||||||
uint32_t Length,
|
uint8_t *pSendMessage, uint32_t Length,
|
||||||
uint8_t *pResponseMessage,
|
uint8_t *pResponseMessage,
|
||||||
uint32_t *pResponseLength, uint32_t TimeoutMS);
|
uint32_t *pResponseLength, uint32_t TimeoutMS);
|
||||||
|
|
||||||
|
@@ -138,10 +138,13 @@ void hif_bmi_recv_data(struct CE_handle *copyeng, void *ce_context,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *hif_ctx,
|
CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *hif_ctx,
|
||||||
|
cdf_dma_addr_t bmi_cmd_da,
|
||||||
|
cdf_dma_addr_t bmi_rsp_da,
|
||||||
uint8_t *bmi_request,
|
uint8_t *bmi_request,
|
||||||
uint32_t request_length,
|
uint32_t request_length,
|
||||||
uint8_t *bmi_response,
|
uint8_t *bmi_response,
|
||||||
uint32_t *bmi_response_lengthp, uint32_t TimeoutMS)
|
uint32_t *bmi_response_lengthp,
|
||||||
|
uint32_t TimeoutMS)
|
||||||
{
|
{
|
||||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||||
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(hif_ctx);
|
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(hif_ctx);
|
||||||
@@ -157,7 +160,6 @@ CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *hif_ctx,
|
|||||||
unsigned int mux_id = 0;
|
unsigned int mux_id = 0;
|
||||||
unsigned int transaction_id = 0xffff;
|
unsigned int transaction_id = 0xffff;
|
||||||
unsigned int user_flags = 0;
|
unsigned int user_flags = 0;
|
||||||
struct bmi_info *info = hif_get_bmi_ctx(hif_ctx);
|
|
||||||
#ifdef BMI_RSP_POLLING
|
#ifdef BMI_RSP_POLLING
|
||||||
cdf_dma_addr_t buf;
|
cdf_dma_addr_t buf;
|
||||||
unsigned int completed_nbytes, id, flags;
|
unsigned int completed_nbytes, id, flags;
|
||||||
@@ -192,7 +194,7 @@ CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *hif_ctx,
|
|||||||
* CE_request = dma_map_single(dev,
|
* CE_request = dma_map_single(dev,
|
||||||
* (void *)bmi_request, request_length, DMA_TO_DEVICE);
|
* (void *)bmi_request, request_length, DMA_TO_DEVICE);
|
||||||
*/
|
*/
|
||||||
CE_request = info->bmi_cmd_da;
|
CE_request = bmi_cmd_da;
|
||||||
transaction->bmi_request_CE = CE_request;
|
transaction->bmi_request_CE = CE_request;
|
||||||
|
|
||||||
if (bmi_response) {
|
if (bmi_response) {
|
||||||
@@ -201,7 +203,7 @@ CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *hif_ctx,
|
|||||||
* CE_response = dma_map_single(dev, bmi_response,
|
* CE_response = dma_map_single(dev, bmi_response,
|
||||||
* BMI_DATASZ_MAX, DMA_FROM_DEVICE);
|
* BMI_DATASZ_MAX, DMA_FROM_DEVICE);
|
||||||
*/
|
*/
|
||||||
CE_response = info->bmi_rsp_da;
|
CE_response = bmi_rsp_da;
|
||||||
transaction->bmi_response_host = bmi_response;
|
transaction->bmi_response_host = bmi_response;
|
||||||
transaction->bmi_response_CE = CE_response;
|
transaction->bmi_response_CE = CE_response;
|
||||||
/* dma_cache_sync(dev, bmi_response,
|
/* dma_cache_sync(dev, bmi_response,
|
||||||
|
Reference in New Issue
Block a user