summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjay Devnani <sdevnani@qca.qualcomm.com>2014-11-17 20:17:11 -0800
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2014-11-26 17:12:07 +0530
commit4c22528cbbc6fc110de20dce0becc0f8a0109c8f (patch)
tree5ce5705275ad6f47a7b061b06ece30b69323cad0
parentff149966bd2555e7aa886766b04ba1c62fdabdcd (diff)
WLAN: SDIO optimization - Different credit sizes for HTT packets
HTT only needs 1536 bytes. Having a credit size of 1792 just to incorporate control messages is an overhead for the data packets Change-Id: Ic73973e43210532ee7b562b3389b46bed686d5a0 CRs-Fixed: 754224
-rw-r--r--CORE/SERVICES/BMI/ol_fw.c13
-rw-r--r--CORE/SERVICES/COMMON/hif.h2
-rw-r--r--CORE/SERVICES/COMMON/htc.h8
-rw-r--r--CORE/SERVICES/COMMON/targaddrs.h9
-rw-r--r--CORE/SERVICES/HIF/sdio/hif_sdio_recv.c4
-rw-r--r--CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c5
-rw-r--r--CORE/SERVICES/HTC/htc.c16
-rw-r--r--CORE/SERVICES/HTC/htc_internal.h11
-rw-r--r--CORE/SERVICES/HTC/htc_send.c147
-rw-r--r--CORE/SERVICES/HTC/htc_services.c22
10 files changed, 199 insertions, 38 deletions
diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c
index a709e421b342..f32ba8f88619 100644
--- a/CORE/SERVICES/BMI/ol_fw.c
+++ b/CORE/SERVICES/BMI/ol_fw.c
@@ -2368,10 +2368,6 @@ u_int8_t ol_get_number_of_peers_supported(struct ol_softc *scn)
}
#ifdef HIF_SDIO
-#define SDIO_SWAP_MAILBOX_FW_ACK 0x10000
-#define SDIO_REDUCE_TX_COMPL_FW_ACK 0X20000
-#define SDIO_SWAP_MAILBOX_SET 0x1
-#define SDIO_REDUCE_TX_COMPL_SET 0x2
/*Setting SDIO block size, mbox ISR yield limit for SDIO based HIF*/
static A_STATUS
@@ -2454,7 +2450,10 @@ ol_sdio_extra_initialization(struct ol_softc *scn)
break;
}
- param |= (SDIO_SWAP_MAILBOX_SET|SDIO_REDUCE_TX_COMPL_SET);
+ param |= (HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET|
+ HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET|
+ HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE);
+
BMIWriteMemory(scn->hif_hdl,
host_interest_item_address(scn->target_type,
offsetof(struct host_interest_s,
@@ -2482,12 +2481,12 @@ ol_target_ready(struct ol_softc *scn, void *cfg_ctx)
return;
}
- if (value & SDIO_SWAP_MAILBOX_FW_ACK) {
+ if (value & HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_FW_ACK) {
printk("MAILBOX SWAP Service is enabled!\n");
HIFSetMailboxSwap(scn->hif_hdl);
}
- if (value & SDIO_REDUCE_TX_COMPL_FW_ACK) {
+ if (value & HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_FW_ACK) {
printk("Reduced Tx Complete service is enabled!\n");
ol_cfg_set_tx_free_at_download(cfg_ctx);
diff --git a/CORE/SERVICES/COMMON/hif.h b/CORE/SERVICES/COMMON/hif.h
index 035015b2c8a4..4f912ef650ea 100644
--- a/CORE/SERVICES/COMMON/hif.h
+++ b/CORE/SERVICES/COMMON/hif.h
@@ -826,4 +826,6 @@ void HIFSetMailboxSwap(HIF_DEVICE *device);
}
#endif
+A_BOOL HIFIsMailBoxSwapped(HIF_DEVICE *hd);
+
#endif /* _HIF_H_ */
diff --git a/CORE/SERVICES/COMMON/htc.h b/CORE/SERVICES/COMMON/htc.h
index ac0c1866b383..9fcaf6159f6f 100644
--- a/CORE/SERVICES/COMMON/htc.h
+++ b/CORE/SERVICES/COMMON/htc.h
@@ -223,16 +223,22 @@ typedef PREPACK struct {
/* extended information */
A_UINT32 HTCVersion : 8,
MaxMsgsPerHTCBundle : 8,
- reserved : 16;
+ AltDataCreditSize : 12,
+ Reserved : 4;
} POSTPACK HTC_READY_EX_MSG;
#define HTC_READY_EX_MSG_HTCVERSION_LSB 0
#define HTC_READY_EX_MSG_HTCVERSION_MASK 0x000000ff
#define HTC_READY_EX_MSG_HTCVERSION_OFFSET sizeof(HTC_READY_MSG)
+
#define HTC_READY_EX_MSG_MAXMSGSPERHTCBUNDLE_LSB 8
#define HTC_READY_EX_MSG_MAXMSGSPERHTCBUNDLE_MASK 0x0000ff00
#define HTC_READY_EX_MSG_MAXMSGSPERHTCBUNDLE_OFFSET sizeof(HTC_READY_MSG)
+#define HTC_READY_EX_MSG_ALTDATACREDITSIZE_LSB 16
+#define HTC_READY_EX_MSG_ALTDATACREDITSIZE_MASK 0x0fff0000
+#define HTC_READY_EX_MSG_ALTDATACREDITSIZE_OFFSET sizeof(HTC_READY_MSG)
+
#define HTC_VERSION_2P0 0x00
#define HTC_VERSION_2P1 0x01 /* HTC 2.1 */
diff --git a/CORE/SERVICES/COMMON/targaddrs.h b/CORE/SERVICES/COMMON/targaddrs.h
index 4f916980567f..05a0fbc3ce5a 100644
--- a/CORE/SERVICES/COMMON/targaddrs.h
+++ b/CORE/SERVICES/COMMON/targaddrs.h
@@ -418,9 +418,12 @@ PREPACK64 struct host_interest_s {
#define DESC_IN_FW() \
(HOST_INTEREST->hi_fw_swap & HI_DESC_IN_FW_BIT)
-#define HI_ACS_FLAGS_ENABLED (1 << 0) /* ACS is enabled */
-#define HI_ACS_FLAGS_USE_WWAN (1 << 1) /* Use physical WWAN device */
-#define HI_ACS_FLAGS_TEST_VAP (1 << 2) /* Use test VAP */
+#define HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET (1 << 0)
+#define HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET (1 << 1)
+#define HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE (1 << 2)
+
+#define HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_FW_ACK (1 << 16)
+#define HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_FW_ACK (1 << 17)
/* CONSOLE FLAGS
*
diff --git a/CORE/SERVICES/HIF/sdio/hif_sdio_recv.c b/CORE/SERVICES/HIF/sdio/hif_sdio_recv.c
index fb8a34b58b7b..d0b8ffb1bcf0 100644
--- a/CORE/SERVICES/HIF/sdio/hif_sdio_recv.c
+++ b/CORE/SERVICES/HIF/sdio/hif_sdio_recv.c
@@ -621,7 +621,7 @@ static A_STATUS HIFDevIssueRecvPacketBundle(HIF_SDIO_DEVICE *pDev,
}
bundleSpaceRemaining = HTC_MAX_MSG_PER_BUNDLE_RX * target->TargetCreditSize;
- pPacketRxBundle = AllocateHTCBundlePacket(target);
+ pPacketRxBundle = AllocateHTCBundleRxPacket(target);
pBundleBuffer = pPacketRxBundle->pBuffer;
for(i = 0; !HTC_QUEUE_EMPTY(pRecvPktQueue) && i < HTC_MAX_MSG_PER_BUNDLE_RX; i++){
@@ -669,7 +669,7 @@ static A_STATUS HIFDevIssueRecvPacketBundle(HIF_SDIO_DEVICE *pDev,
}HTC_PACKET_QUEUE_ITERATE_END;
}
/* free bundle space under Sync mode */
- FreeHTCBundlePacket(target, pPacketRxBundle);
+ FreeHTCBundleRxPacket(target, pPacketRxBundle);
return status;
}
A_STATUS HIFDevRecvMessagePendingHandler(HIF_SDIO_DEVICE *pDev,
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
index 921493b482a5..4af913f04536 100644
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
@@ -37,6 +37,7 @@
#include "regtable.h"
#include "vos_api.h"
#include "wma_api.h"
+#include "hif_internal.h"
/* by default setup a bounce buffer for the data packets, if the underlying host controller driver
does not use DMA you may be able to skip this step and save the memory allocation and transfer time */
@@ -2289,3 +2290,7 @@ void HIFsuspendwow(HIF_DEVICE *hif_device)
printk(KERN_INFO "HIFsuspendwow TODO\n");
}
+A_BOOL HIFIsMailBoxSwapped(HIF_DEVICE *hd)
+{
+ return ((struct hif_device *)hd)->swap_mailbox;
+}
diff --git a/CORE/SERVICES/HTC/htc.c b/CORE/SERVICES/HTC/htc.c
index 244580f2014f..2ff489aa1af6 100644
--- a/CORE/SERVICES/HTC/htc.c
+++ b/CORE/SERVICES/HTC/htc.c
@@ -161,7 +161,14 @@ static void HTCCleanup(HTC_TARGET *target)
A_FREE(pPacket);
}
- pPacket = target->pBundleFreeList;
+ pPacket = target->pBundleFreeTxList;
+ while (pPacket) {
+ HTC_PACKET *pPacketTmp = (HTC_PACKET *)pPacket->ListLink.pNext;
+ A_FREE(pPacket);
+ pPacket = pPacketTmp;
+ }
+
+ pPacket = target->pBundleFreeRxList;
while (pPacket) {
HTC_PACKET *pPacketTmp = (HTC_PACKET *)pPacket->ListLink.pNext;
A_FREE(pPacket);
@@ -536,8 +543,11 @@ A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle)
}
target->TotalTransmitCredits = HTC_GET_FIELD(rdy_msg, HTC_READY_MSG, CREDITCOUNT);
- target->TargetCreditSize = (int)HTC_GET_FIELD(rdy_msg, HTC_READY_MSG, CREDITSIZE);
- target->MaxMsgsPerHTCBundle = (A_UINT8)pReadyMsg->MaxMsgsPerHTCBundle;
+ target->TargetCreditSize = (int)HTC_GET_FIELD(rdy_msg, HTC_READY_MSG, CREDITSIZE);
+
+ target->MaxMsgsPerHTCBundle = (A_UINT8) HTC_GET_FIELD(pReadyMsg, HTC_READY_EX_MSG, MAXMSGSPERHTCBUNDLE);
+ target->AltDataCreditSize = (A_UINT16)HTC_GET_FIELD(pReadyMsg, HTC_READY_EX_MSG, ALTDATACREDITSIZE);
+
/* for old fw this value is set to 0. But the minimum value should be 1,
* i.e., no bundling */
if (target->MaxMsgsPerHTCBundle < 1)
diff --git a/CORE/SERVICES/HTC/htc_internal.h b/CORE/SERVICES/HTC/htc_internal.h
index 00b72b1cce2a..662cf5fd5e9e 100644
--- a/CORE/SERVICES/HTC/htc_internal.h
+++ b/CORE/SERVICES/HTC/htc_internal.h
@@ -194,10 +194,12 @@ typedef struct _HTC_TARGET {
#endif
adf_os_device_t osdev;
struct ol_ath_htc_stats htc_pkt_stats;
- HTC_PACKET *pBundleFreeList;
+ HTC_PACKET *pBundleFreeTxList;
+ HTC_PACKET *pBundleFreeRxList;
A_UINT32 CE_send_cnt;
A_UINT32 TX_comp_cnt;
A_UINT8 MaxMsgsPerHTCBundle;
+ A_UINT16 AltDataCreditSize;
} HTC_TARGET;
#define HTC_ENABLE_BUNDLE(target) (target->MaxMsgsPerHTCBundle > 1)
@@ -240,8 +242,11 @@ A_STATUS HTCRxCompletionHandler(
A_STATUS HTCTxCompletionHandler(
void *Context, adf_nbuf_t netbuf, unsigned int transferID);
-HTC_PACKET *AllocateHTCBundlePacket(HTC_TARGET *target);
-void FreeHTCBundlePacket(HTC_TARGET *target, HTC_PACKET *pPacket);
+HTC_PACKET *AllocateHTCBundleRxPacket(HTC_TARGET *target);
+HTC_PACKET *AllocateHTCBundleTxPacket(HTC_TARGET *target);
+
+void FreeHTCBundleRxPacket(HTC_TARGET *target, HTC_PACKET *pPacket);
+void FreeHTCBundleTxPacket(HTC_TARGET *target, HTC_PACKET *pPacket);
HTC_PACKET *AllocateHTCPacketContainer(HTC_TARGET *target);
void FreeHTCPacketContainer(HTC_TARGET *target, HTC_PACKET *pPacket);
diff --git a/CORE/SERVICES/HTC/htc_send.c b/CORE/SERVICES/HTC/htc_send.c
index a532360a1c6a..40da4ed829c9 100644
--- a/CORE/SERVICES/HTC/htc_send.c
+++ b/CORE/SERVICES/HTC/htc_send.c
@@ -162,20 +162,23 @@ HTCSendCompleteCheckCleanup(void *context)
}
-HTC_PACKET *AllocateHTCBundlePacket(HTC_TARGET *target)
+HTC_PACKET *AllocateHTCBundleTxPacket(HTC_TARGET *target)
{
HTC_PACKET *pPacket;
HTC_PACKET_QUEUE *pQueueSave;
adf_nbuf_t netbuf;
+
LOCK_HTC_TX(target);
- if (NULL == target->pBundleFreeList) {
+ if (NULL == target->pBundleFreeTxList) {
UNLOCK_HTC_TX(target);
+
+ /* for HTT packets, if AltDataCreditSize is non zero, we will have
+ allocated more space per packet (i.e., TargetCreditSize-AltDataCreditSize)
+ per bundle packet, but this should is required since we reuse the packet
+ for all services and all endpoints */
+
netbuf = adf_nbuf_alloc(NULL,
-#ifdef HIF_USB
HTC_MAX_MSG_PER_BUNDLE_TX * target->TargetCreditSize,
-#else
- target->MaxMsgsPerHTCBundle * target->TargetCreditSize,
-#endif
0,
4,
FALSE);
@@ -212,21 +215,126 @@ HTC_PACKET *AllocateHTCBundlePacket(HTC_TARGET *target)
}
//already done malloc - restore from free list
- pPacket = target->pBundleFreeList;
+ pPacket = target->pBundleFreeTxList;
+ AR_DEBUG_ASSERT(pPacket);
+ if (!pPacket)
+ {
+ UNLOCK_HTC_TX(target);
+ return NULL;
+ }
+ target->pBundleFreeTxList = (HTC_PACKET *)pPacket->ListLink.pNext;
+ UNLOCK_HTC_TX(target);
+ pPacket->ListLink.pNext = NULL;
+
+ return pPacket;
+}
+
+void FreeHTCBundleTxPacket(HTC_TARGET *target, HTC_PACKET *pPacket)
+{
+ A_UINT32 curentHeadRoom;
+ adf_nbuf_t netbuf;
+ HTC_PACKET_QUEUE *pQueueSave;
+
+ netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket);
+ AR_DEBUG_ASSERT(netbuf);
+ if (!netbuf)
+ {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("\n%s: Invalid netbuf in HTC "
+ "Packet\n", __func__));
+ return;
+ }
+
+ // HIF adds data to the headroom section of the nbuf, restore the original
+ // size. If this is not done, headroom keeps shrinking with every HIF send
+ // and eventually HIF ends up doing another malloc big enough to store the
+ // data + its header
+
+ curentHeadRoom = adf_nbuf_headroom(netbuf);
+ adf_nbuf_pull_head(netbuf, pPacket->netbufOrigHeadRoom - curentHeadRoom);
+ adf_nbuf_trim_tail(netbuf, adf_nbuf_len(netbuf));
+
+ //restore the pBuffer pointer. HIF changes this
+ pPacket->pBuffer = adf_nbuf_data(netbuf);
+ pPacket->BufferLength = adf_nbuf_len(netbuf);
+
+ //restore queue
+ pQueueSave = (HTC_PACKET_QUEUE*)pPacket->pContext;
+ AR_DEBUG_ASSERT(pQueueSave);
+
+ INIT_HTC_PACKET_QUEUE(pQueueSave);
+
+ LOCK_HTC_TX(target);
+ if (target->pBundleFreeTxList == NULL) {
+ target->pBundleFreeTxList = pPacket;
+ pPacket->ListLink.pNext = NULL;
+ } else {
+ pPacket->ListLink.pNext = (DL_LIST *)target->pBundleFreeTxList;
+ target->pBundleFreeTxList = pPacket;
+ }
+ UNLOCK_HTC_TX(target);
+}
+
+HTC_PACKET *AllocateHTCBundleRxPacket(HTC_TARGET *target)
+{
+ HTC_PACKET *pPacket;
+ HTC_PACKET_QUEUE *pQueueSave;
+ adf_nbuf_t netbuf;
+ LOCK_HTC_TX(target);
+ if (NULL == target->pBundleFreeRxList) {
+ UNLOCK_HTC_TX(target);
+ netbuf = adf_nbuf_alloc(NULL,
+ HTC_MAX_MSG_PER_BUNDLE_RX * target->TargetCreditSize,
+ 0,
+ 4,
+ FALSE);
+ AR_DEBUG_ASSERT(netbuf);
+ if (!netbuf)
+ {
+ return NULL;
+ }
+ pPacket = adf_os_mem_alloc(NULL, sizeof(HTC_PACKET));
+ AR_DEBUG_ASSERT(pPacket);
+ if (!pPacket)
+ {
+ adf_nbuf_free(netbuf);
+ return NULL;
+ }
+ pQueueSave = adf_os_mem_alloc(NULL, sizeof(HTC_PACKET_QUEUE));
+ AR_DEBUG_ASSERT(pQueueSave);
+ if (!pQueueSave)
+ {
+ adf_nbuf_free(netbuf);
+ adf_os_mem_free(pPacket);
+ return NULL;
+ }
+ INIT_HTC_PACKET_QUEUE(pQueueSave);
+ pPacket->pContext = pQueueSave;
+ SET_HTC_PACKET_NET_BUF_CONTEXT(pPacket, netbuf);
+ pPacket->pBuffer = adf_nbuf_data(netbuf);
+ pPacket->BufferLength = adf_nbuf_len(netbuf);
+
+ //store the original head room so that we can restore this when we "free" the packet
+ //free packet puts the packet back on the free list
+ pPacket->netbufOrigHeadRoom = adf_nbuf_headroom(netbuf);
+ return pPacket;
+ }
+
+ //already done malloc - restore from free list
+ pPacket = target->pBundleFreeRxList;
AR_DEBUG_ASSERT(pPacket);
if (!pPacket)
{
UNLOCK_HTC_TX(target);
return NULL;
}
- target->pBundleFreeList = (HTC_PACKET *)pPacket->ListLink.pNext;
+ target->pBundleFreeRxList = (HTC_PACKET *)pPacket->ListLink.pNext;
UNLOCK_HTC_TX(target);
pPacket->ListLink.pNext = NULL;
return pPacket;
}
-void FreeHTCBundlePacket(HTC_TARGET *target, HTC_PACKET *pPacket)
+void FreeHTCBundleRxPacket(HTC_TARGET *target, HTC_PACKET *pPacket)
{
A_UINT32 curentHeadRoom;
adf_nbuf_t netbuf;
@@ -261,16 +369,17 @@ void FreeHTCBundlePacket(HTC_TARGET *target, HTC_PACKET *pPacket)
INIT_HTC_PACKET_QUEUE(pQueueSave);
LOCK_HTC_TX(target);
- if (target->pBundleFreeList == NULL) {
- target->pBundleFreeList = pPacket;
+ if (target->pBundleFreeRxList == NULL) {
+ target->pBundleFreeRxList = pPacket;
pPacket->ListLink.pNext = NULL;
} else {
- pPacket->ListLink.pNext = (DL_LIST *)target->pBundleFreeList;
- target->pBundleFreeList = pPacket;
+ pPacket->ListLink.pNext = (DL_LIST *)target->pBundleFreeRxList;
+ target->pBundleFreeRxList = pPacket;
}
UNLOCK_HTC_TX(target);
}
+
#if defined(HIF_USB) || defined(HIF_SDIO)
#ifdef ENABLE_BUNDLE_TX
static A_STATUS HTCSendBundledNetbuf(HTC_TARGET *target,
@@ -328,11 +437,11 @@ static void HTCIssuePacketsBundle(HTC_TARGET *target,
bundlesSpaceRemaining = HTC_MAX_MSG_PER_BUNDLE_TX * pEndpoint->TxCreditSize;
- pPacketTx = AllocateHTCBundlePacket(target);
+ pPacketTx = AllocateHTCBundleTxPacket(target);
if (!pPacketTx)
{
//good time to panic
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AllocateHTCBundlePacket failed \n"));
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AllocateHTCBundleTxPacket failed \n"));
AR_DEBUG_ASSERT(FALSE);
return;
}
@@ -364,11 +473,11 @@ static void HTCIssuePacketsBundle(HTC_TARGET *target,
return;
}
bundlesSpaceRemaining = HTC_MAX_MSG_PER_BUNDLE_TX * pEndpoint->TxCreditSize;
- pPacketTx = AllocateHTCBundlePacket(target);
+ pPacketTx = AllocateHTCBundleTxPacket(target);
if (!pPacketTx)
{
//good time to panic
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AllocateHTCBundlePacket failed \n"));
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AllocateHTCBundleTxPacket failed \n"));
AR_DEBUG_ASSERT(FALSE);
return;
}
@@ -414,7 +523,7 @@ static void HTCIssuePacketsBundle(HTC_TARGET *target,
HTCSendBundledNetbuf(target, pEndpoint,
pBundleBuffer - last_creditPad, pPacketTx);
} else {
- FreeHTCBundlePacket(target, pPacketTx);
+ FreeHTCBundleTxPacket(target, pPacketTx);
}
}
#endif /* ENABLE_BUNDLE_TX */
@@ -1356,7 +1465,7 @@ A_STATUS HTCTxCompletionHandler(void *Context,
pPacket->Status = A_OK;
SendPacketCompletion(target,pPacketTemp);
}HTC_PACKET_QUEUE_ITERATE_END;
- FreeHTCBundlePacket(target, pPacket);
+ FreeHTCBundleTxPacket(target, pPacket);
#ifdef HIF_USB
if (!IS_TX_CREDIT_FLOW_ENABLED(pEndpoint)) {
diff --git a/CORE/SERVICES/HTC/htc_services.c b/CORE/SERVICES/HTC/htc_services.c
index 72e9fcc91879..b717b22e7197 100644
--- a/CORE/SERVICES/HTC/htc_services.c
+++ b/CORE/SERVICES/HTC/htc_services.c
@@ -269,9 +269,31 @@ A_STATUS HTCConnectService(HTC_HANDLE HTCHandle,
&pEndpoint->ul_is_polled,
&pEndpoint->dl_is_polled);
if (A_FAILED(status)) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,("%s Failed to Map Service to Pipe\n",
+ __func__));
break;
}
+#if defined(HIF_USB) || 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
+ uses the default credit size. Use AltDataCreditSize only when mailbox
+ is swapped. Mailbox swap bit is set by bmi_target_ready at the end of
+ BMI phase.
+
+ The Credit Size is a parameter associated with the mbox rather than a
+ service. Multiple services can run on this mbox.
+
+ If AltDataCreditSize is 0, that means the firmware doesn't support
+ this feature. Default to the TargetCreditSize
+ */
+
+ if ((target->AltDataCreditSize) && HIFIsMailBoxSwapped(target->hif_dev)
+ && (pEndpoint->UL_PipeID == 1) && (pEndpoint->DL_PipeID == 0))
+ pEndpoint->TxCreditSize = target->AltDataCreditSize;
+#endif
+
adf_os_assert(!pEndpoint->dl_is_polled); /* not currently supported */
if (pEndpoint->ul_is_polled) {