X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Fwlan.c;h=d0adb5964dfcd999e1e8ac1d8a80ee5187234f1a;hb=b96940e2ea6b783faea07da811ab4ad4c8de59cb;hp=1f4afa3b618d147a7a7b9b493f85a86b5ae60a4c;hpb=fa097d02ca1683946b2207c8ebf69538e8c3cb9c;p=carl9170fw.git diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index 1f4afa3..d0adb59 100644 --- a/carlfw/src/wlan.c +++ b/carlfw/src/wlan.c @@ -44,32 +44,6 @@ static void wlan_txupdate(unsigned int queue) wlan_trigger(BIT(queue)); } -static void wlan_dma_bump(unsigned int qidx) -{ - unsigned int offset = qidx; - uint32_t status, trigger; - - status = get(AR9170_MAC_REG_DMA_STATUS) >> 12; - trigger = get(AR9170_MAC_REG_DMA_TRIGGER) >> 12; - - while (offset != 0) { - status >>= 4; - trigger >>= 4; - offset--; - } - - status &= 0xf; - trigger &= 0xf; - - if ((trigger == 0xa) && (status == 0x8)) { - DBG("UNSTUCK"); - wlan_txunstuck(qidx); - } else { - DBG("UPDATE"); - wlan_txupdate(qidx); - } -} - #ifdef CONFIG_CARL9170FW_DEBUG static void wlan_dump_queue(unsigned int qidx) { @@ -198,6 +172,7 @@ static bool wlan_tx_consume_retry(struct carl9170_tx_superframe *super) /* update MAC flags */ super->f.hdr.mac.erp_prot = super->s.ri[super->s.rix].erp_prot; + super->f.hdr.mac.ampdu = super->s.ri[super->s.rix].ampdu; /* reinitialize try counter */ super->s.cnt = 1; @@ -857,6 +832,32 @@ void handle_wlan(void) #undef HANDLER } +static void wlan_dma_bump(unsigned int qidx) +{ + unsigned int offset = qidx; + uint32_t status, trigger; + + status = get(AR9170_MAC_REG_DMA_STATUS) >> 12; + trigger = get(AR9170_MAC_REG_DMA_TRIGGER) >> 12; + + while (offset != 0) { + status >>= 4; + trigger >>= 4; + offset--; + } + + status &= 0xf; + trigger &= 0xf; + + if ((trigger == 0xa) && (status == 0x8)) { + DBG("UNSTUCK"); + wlan_txunstuck(qidx); + } else { + DBG("UPDATE"); + wlan_txupdate(qidx); + } +} + static void wlan_check_hang(void) { struct dma_desc *desc;