Selaa lähdekoodia

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
Komal Seelam 9 vuotta sitten
vanhempi
sitoutus
2a5fa63d2b
2 muutettua tiedostoa jossa 13 lisäystä ja 11 poistoa
  1. 4 4
      hif/inc/hif.h
  2. 9 7
      hif/src/ce/ce_bmi.c

+ 4 - 4
hif/inc/hif.h

@@ -272,10 +272,10 @@ void hif_detach_htc(struct ol_softc *scn);
  * 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) */
 CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *scn,
-			 uint8_t *pSendMessage,
-			 uint32_t Length,
-			 uint8_t *pResponseMessage,
-			 uint32_t *pResponseLength, uint32_t TimeoutMS);
+				cdf_dma_addr_t cmd, cdf_dma_addr_t rsp,
+				uint8_t *pSendMessage, uint32_t Length,
+				uint8_t *pResponseMessage,
+				uint32_t *pResponseLength, uint32_t TimeoutMS);
 
 /*
  * APIs to handle HIF specific diagnostic read accesses. These APIs are

+ 9 - 7
hif/src/ce/ce_bmi.c

@@ -138,10 +138,13 @@ void hif_bmi_recv_data(struct CE_handle *copyeng, void *ce_context,
 #endif
 
 CDF_STATUS hif_exchange_bmi_msg(struct ol_softc *hif_ctx,
-		     uint8_t *bmi_request,
-		     uint32_t request_length,
-		     uint8_t *bmi_response,
-		     uint32_t *bmi_response_lengthp, uint32_t TimeoutMS)
+				cdf_dma_addr_t bmi_cmd_da,
+				cdf_dma_addr_t bmi_rsp_da,
+				uint8_t *bmi_request,
+				uint32_t request_length,
+				uint8_t *bmi_response,
+				uint32_t *bmi_response_lengthp,
+				uint32_t TimeoutMS)
 {
 	struct hif_softc *scn = HIF_GET_SOFTC(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 transaction_id = 0xffff;
 	unsigned int user_flags = 0;
-	struct bmi_info *info = hif_get_bmi_ctx(hif_ctx);
 #ifdef BMI_RSP_POLLING
 	cdf_dma_addr_t buf;
 	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,
 	 * (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;
 
 	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,
 		 * 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_CE = CE_response;
 		/* dma_cache_sync(dev, bmi_response,