carl9170 firmware: remove unnecessary initializations
authorChristian Lamparter <chunkeey@googlemail.com>
Sat, 7 May 2011 14:20:59 +0000 (16:20 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Sat, 7 May 2011 14:20:59 +0000 (16:20 +0200)
carlfw/src/dma.c
carlfw/src/wlan.c

index 7ca0c9aec0222eb2799e8f1fc3e998309097cee9..18c57ce1392e45405a0a75f0a45a7a5429035e2e 100644 (file)
@@ -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;
 }
 
index 844036376a2532efb4e51d5ce2c11ef660eae4ad..caf9b6d9201161c86cfea542a78c6a9264f5c3ef 100644 (file)
@@ -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;