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)
{
static bool wlan_tx_consume_retry(struct carl9170_tx_superframe *super)
{
/* check if this was the last possible retry with this rate */
- if (unlikely(super->s.cnt >= super->s.tries[super->s.rix])) {
+ if (unlikely(super->s.cnt >= super->s.ri[super->s.rix].tries)) {
/* end of the road - indicate tx failure */
if (unlikely(super->s.rix == CARL9170_TX_MAX_RETRY_RATES))
return false;
/* finally - mark the old rate as USED */
super->s.rix++;
+ /* 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;
} else {
success = true;
- if (!!(desc->ctrl & AR9170_CTRL_FAIL_MASK)) {
+ if (!!(desc->ctrl & AR9170_CTRL_FAIL)) {
txfail = !!(desc->ctrl & AR9170_CTRL_TXFAIL);
/* reset retry indicator flags */
sizeof(struct ar9170_tx_hwdesc) +
sizeof(struct ieee80211_ba);
- baf->s.tries[0] = 3;
+ baf->s.ri[0].tries = 3;
baf->s.queue = 0;
baf->f.hdr.length = sizeof(struct ieee80211_ba) + FCS_LEN;
{
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)) {
#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;