diff options
| author | Wei-Jen, Lin <jenlin@qca.qualcomm.com> | 2014-12-01 11:05:58 +0800 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2014-12-03 13:02:42 +0530 |
| commit | 27123017f27d956798595ea8e316e1ebb5dfdead (patch) | |
| tree | f96907640f683995a1a3e5fb06da876829212c1a | |
| parent | f84d7c99b139ae5098cf309e51df3daf65e484f5 (diff) | |
qcacld: USB support the different credit sizes for HTT packets
Current credit size of 1792 bytes for HTT data packets is too large.
Support a shorter credit size for HTT service to get the better USB bus
efficiency especially with TX bundling support.
Change-Id: Ia9a9133a52c2bbe11e24a9725fc9577d58c09243
CRs-Fixed: 764381
| -rw-r--r-- | CORE/SERVICES/BMI/ol_fw.c | 24 | ||||
| -rw-r--r-- | CORE/SERVICES/HTC/htc_services.c | 10 |
2 files changed, 33 insertions, 1 deletions
diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c index 6da6486006f9..4e85b26d70d6 100644 --- a/CORE/SERVICES/BMI/ol_fw.c +++ b/CORE/SERVICES/BMI/ol_fw.c @@ -123,6 +123,10 @@ static int ol_get_fw_files_for_target(struct ol_fw_files *pfw_files, } #endif +#ifdef HIF_USB +static A_STATUS ol_usb_extra_initialization(struct ol_softc *scn); +#endif + extern int dbglog_parse_debug_logs(ol_scn_t scn, u_int8_t *datap, u_int32_t len); @@ -2067,6 +2071,8 @@ int ol_download_firmware(struct ol_softc *scn) #ifdef HIF_SDIO status = ol_sdio_extra_initialization(scn); +#elif defined(HIF_USB) + status = ol_usb_extra_initialization(scn); #endif return status; @@ -2500,3 +2506,21 @@ ol_target_ready(struct ol_softc *scn, void *cfg_ctx) } } #endif + +#ifdef HIF_USB +static A_STATUS +ol_usb_extra_initialization(struct ol_softc *scn) +{ + A_STATUS status = !EOK; + u_int32_t param = 0; + + param |= HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE; + status = BMIWriteMemory(scn->hif_hdl, + host_interest_item_address(scn->target_type, + offsetof(struct host_interest_s, + hi_acs_flags)), + (u_int8_t *)¶m, 4, scn); + + return status; +} +#endif diff --git a/CORE/SERVICES/HTC/htc_services.c b/CORE/SERVICES/HTC/htc_services.c index b717b22e7197..d45f100ad3a5 100644 --- a/CORE/SERVICES/HTC/htc_services.c +++ b/CORE/SERVICES/HTC/htc_services.c @@ -274,7 +274,7 @@ A_STATUS HTCConnectService(HTC_HANDLE HTCHandle, break; } -#if defined(HIF_USB) || defined(HIF_SDIO) +#if defined(HIF_SDIO) /* When AltDataCreditSize is non zero, it indicates the credit size for HTT and all other services on Mbox0. Mbox1 has WMI_CONTROL_SVC which @@ -292,6 +292,14 @@ A_STATUS HTCConnectService(HTC_HANDLE HTCHandle, if ((target->AltDataCreditSize) && HIFIsMailBoxSwapped(target->hif_dev) && (pEndpoint->UL_PipeID == 1) && (pEndpoint->DL_PipeID == 0)) pEndpoint->TxCreditSize = target->AltDataCreditSize; +#elif defined(HIF_USB) + /* + * Endpoing to pipe is one-to-one mapping in USB. + * If AltDataCreditSize is not zero, it indicates the credit size for + * HTT_DATA_MSG_SVC services use AltDataCrditSize. + */ + if ((target->AltDataCreditSize) && (pEndpoint->ServiceID == HTT_DATA_MSG_SVC)) + pEndpoint->TxCreditSize = target->AltDataCreditSize; #endif adf_os_assert(!pEndpoint->dl_is_polled); /* not currently supported */ |
