X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Fwlan.c;h=9ef0ad8b1991cad358071c2b0946c47d31563381;hb=b8f7132bb9cc3eb1b0fdeab865493b08e096b47a;hp=3661871e342e908cc001405a1660b9793e9c01d0;hpb=d097e45550d09b473b00bc0e11f5028c06173405;p=carl9170fw.git diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index 3661871..9ef0ad8 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) { @@ -598,8 +572,6 @@ static void handle_rx(void) { struct dma_desc *desc; - wlan_check_rx_overrun(); - for_each_desc_not_bits(desc, &fw.wlan.rx_queue, AR9170_OWN_BITS_HW) { if (unlikely(desc->totalLen < 26 || desc->totalLen > CONFIG_CARL9170FW_RX_FRAME_LEN)) { @@ -858,6 +830,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;