X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Fdma.c;h=92a8a68b082331e66a3b565de5c3608b777d38a9;hb=592643728e9b7c37c918afee05df8142c6d7303e;hp=28960326f2f1c742358d9510a101fd1bfaf56849;hpb=fa097d02ca1683946b2207c8ebf69538e8c3cb9c;p=carl9170fw.git diff --git a/carlfw/src/dma.c b/carlfw/src/dma.c index 2896032..92a8a68 100644 --- a/carlfw/src/dma.c +++ b/carlfw/src/dma.c @@ -6,7 +6,7 @@ * Copyright (c) 2000-2005 ZyDAS Technology Corporation * Copyright (c) 2007-2009 Atheros Communications, Inc. * Copyright 2009 Johannes Berg - * Copyright 2009, 2010 Christian Lamparter + * Copyright 2009-2011 Christian Lamparter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -78,23 +78,26 @@ void dma_init_descriptors(void) fw.pta.down_queue.head = fw.pta.down_queue.terminator = &dma_mem.terminator[i++]; for (j = 0; j < __AR9170_NUM_TX_QUEUES; j++) fw.wlan.tx_queue[j].head = fw.wlan.tx_queue[j].terminator = &dma_mem.terminator[i++]; + fw.wlan.tx_retry.head = fw.wlan.tx_retry.terminator = &dma_mem.terminator[i++]; fw.wlan.rx_queue.head = fw.wlan.rx_queue.terminator = &dma_mem.terminator[i++]; fw.usb.int_desc = &dma_mem.terminator[i++]; #ifdef CONFIG_CARL9170FW_CAB_QUEUE - fw.wlan.cab_queue.head = fw.wlan.cab_queue.terminator = &dma_mem.terminator[i++]; + /* GCC bug ? */ +# if (CARL9170_INTF_NUM != 2) + for (j = 0; j < CARL9170_INTF_NUM; j++) + fw.wlan.cab_queue[j].head = fw.wlan.cab_queue[j].terminator = &dma_mem.terminator[i++]; +#else + fw.wlan.cab_queue[0].head = fw.wlan.cab_queue[0].terminator = &dma_mem.terminator[i++]; + fw.wlan.cab_queue[1].head = fw.wlan.cab_queue[1].terminator = &dma_mem.terminator[i++]; +#endif #endif /* CONFIG_CARL9170FW_CAB_QUEUE */ #ifdef CONFIG_CARL9170FW_HANDLE_BACK_REQ fw.wlan.ba_desc = &dma_mem.terminator[i++]; #endif /* CONFIG_CARL9170FW_HANDLE_BACK_REQ */ -#ifdef CONFIG_CARL9170FW_DELAYED_TX - fw.wlan.tx_retry.head = fw.wlan.tx_retry.terminator = &dma_mem.terminator[i++]; - - for (j = 0; j < __AR9170_NUM_TX_QUEUES; j++) - fw.wlan.tx_delay[j].head = fw.wlan.tx_delay[j].terminator = &dma_mem.terminator[i++]; -#endif /* CONFIG_CARL9170FW_DELAYED_TX */ + BUILD_BUG_ON(AR9170_TERMINATOR_NUMBER != j); DBG("Blocks:%d [tx:%d, rx:%d] Terminators:%d/%d\n", AR9170_BLOCK_NUMBER, AR9170_TX_BLOCK_NUMBER, @@ -212,9 +215,6 @@ void dma_put(struct dma_queue *q, struct dma_desc *desc) tmpDesc = desc; - /* force correct CTRL_BITS */ - tmpDesc->ctrl = 0; - tmpDesc->ctrl |= AR9170_CTRL_FS_BIT; while (1) { /* update totalLen */ tmpDesc->totalLen = desc->totalLen; @@ -229,9 +229,7 @@ void dma_put(struct dma_queue *q, struct dma_desc *desc) break; tmpDesc = tmpDesc->nextAddr; - tmpDesc->ctrl = 0; } - tmpDesc->ctrl |= AR9170_CTRL_LS_BIT; /* 2. Next address of Last TD to be added = first TD */ desc->lastAddr->nextAddr = desc;