From c9ae7f9a14af3330eaf62abfd6de5dfab31bf708 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 7 May 2011 16:20:59 +0200 Subject: [PATCH] carl9170 firmware: remove unnecessary initializations --- carlfw/src/dma.c | 15 --------------- carlfw/src/wlan.c | 5 +++-- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/carlfw/src/dma.c b/carlfw/src/dma.c index 7ca0c9a..18c57ce 100644 --- a/carlfw/src/dma.c +++ b/carlfw/src/dma.c @@ -121,13 +121,8 @@ void dma_init_descriptors(void) set(AR9170_MAC_REG_DMA_RXQ_ADDR, (uint32_t) fw.wlan.rx_queue.head); - fw.usb.int_desc->status = AR9170_OWN_BITS_SW; - fw.usb.int_desc->ctrl = (AR9170_CTRL_LS_BIT | AR9170_CTRL_FS_BIT); fw.usb.int_desc->dataSize = AR9170_BLOCK_SIZE; - fw.usb.int_desc->totalLen = 0; - fw.usb.int_desc->lastAddr = fw.usb.int_desc; fw.usb.int_desc->dataAddr = (void *) &dma_mem.reserved.rsp; - fw.usb.int_desc->nextAddr = (void *) 0; memset(DESC_PAYLOAD(fw.usb.int_desc), 0xff, AR9170_INT_MAGIC_HEADER_SIZE); @@ -137,18 +132,8 @@ void dma_init_descriptors(void) /* rsp is now available for use */ fw.usb.int_desc_available = 1; - fw.wlan.ba_desc->status = AR9170_OWN_BITS_SW; - fw.wlan.ba_desc->ctrl = (AR9170_CTRL_LS_BIT | AR9170_CTRL_FS_BIT); - fw.wlan.ba_desc->dataSize = fw.wlan.ba_desc->totalLen = - sizeof(struct carl9170_tx_superdesc) + - sizeof(struct ar9170_tx_hwdesc) + - sizeof(struct ieee80211_ba) + FCS_LEN; - fw.wlan.ba_desc->lastAddr = fw.wlan.ba_desc; - fw.wlan.ba_desc->nextAddr = fw.wlan.ba_desc; fw.wlan.ba_desc->dataAddr = (void *) &dma_mem.reserved.ba; - memset(DESC_PAYLOAD(fw.wlan.ba_desc), 0, 128); - fw.wlan.ba_desc_available = 1; } diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index 8440363..caf9b6d 100644 --- a/carlfw/src/wlan.c +++ b/carlfw/src/wlan.c @@ -513,14 +513,15 @@ static void wlan_send_buffered_ba(void) if (!fw.wlan.ba_desc_available) return; + fw.wlan.ba_desc_available = 0; + ctx = &fw.wlan.ba_cache[fw.wlan.ba_head_idx]; fw.wlan.ba_head_idx++; fw.wlan.ba_head_idx %= CONFIG_CARL9170FW_BACK_REQS_NUM; /* Format BlockAck */ - fw.wlan.ba_desc->status = 0; + fw.wlan.ba_desc->status = AR9170_OWN_BITS_SW; fw.wlan.ba_desc->ctrl = AR9170_CTRL_FS_BIT | AR9170_CTRL_LS_BIT; - fw.wlan.ba_desc_available = 0; fw.wlan.ba_desc->nextAddr = fw.wlan.ba_desc->lastAddr = fw.wlan.ba_desc; -- 2.31.1