prompt "Number of additional pseudo virtual interfaces"
depends on CARL9170FW_EXPERIMENTAL
+config CARL9170FW_FW_MAC_RESET
+ def_bool n
+ prompt "Firmware MAC Chip recovery"
+ depends on CARL9170FW_EXPERIMENTAL
+
config CARL9170FW_BROKEN_FEATURES
def_bool n
prompt "Broken Featurs"
break;
case CARL9170_CMD_SWRST:
+#ifdef CONFIG_CARL9170FW_FW_MAC_RESET
/*
* Command has no payload, so the response
* has no payload either.
* resp->hdr.len = 0;
*/
fw.wlan.mac_reset = CARL9170_MAC_RESET_FORCE;
+#endif /* CONFIG_CARL9170FW_FW_MAC_RESET */
break;
case CARL9170_CMD_REBOOT:
#endif /* CONFIG_CARL9170FW_RADIO_FUNCTIOS */
default:
+ BUG("Unknown command %x\n", cmd->hdr.cmd);
break;
}
}
success = true;
+ /* update hangcheck */
+ fw.wlan.last_tx_desc_num[qidx] = 0;
+
if (!!(desc->ctrl & AR9170_CTRL_FAIL)) {
txfail = !!(desc->ctrl & AR9170_CTRL_TXFAIL);
unhide_super(desc);
- /* update hangcheck */
- fw.wlan.last_tx_desc_num[qidx] = 0;
-
#ifdef CONFIG_CARL9170FW_HANDLE_BACK_REQ
if (unlikely(super == (void *) &dma_mem.reserved.ba)) {
fw.wlan.ba_desc = desc;
fw.wlan.rx_overruns += overruns = get(AR9170_MAC_REG_RX_OVERRUN);
if (unlikely(overruns)) {
if (overruns == total) {
- /*
- * Theoretically, it should be enough to
- * trigger the WLAN RX DMA bit. But the
- * original firmware wanted a reset...
- */
DBG("RX Overrun");
fw.wlan.mac_reset++;
}
+
+ wlan_trigger(AR9170_DMA_TRIGGER_RXQ);
}
}
}
}
+#ifdef CONFIG_CARL9170FW_FW_MAC_RESET
/*
* NB: Resetting the MAC is a two-edged sword.
* On most occasions, it does what it is supposed to do.
set(AR9170_MAC_REG_DMA_RXQ_ADDR, (uint32_t) fw.wlan.rx_queue.head);
wlan_trigger(AR9170_DMA_TRIGGER_RXQ);
}
+#else
+static void wlan_mac_reset(void)
+{
+ /* The driver takes care of reinitializing the device */
+ BUG("MAC RESET");
+}
+#endif /* CONFIG_CARL9170FW_FW_MAC_RESET */
void __cold wlan_timer(void)
{