carl9170 firmware: get rid of nested wlan_tx calls
[carl9170fw.git] / carlfw / src / wlan.c
index 69d90e628d97062ac968aaadc025e8d4617ed3d8..bae584f02123e8da948428f0ade04733d8c5ea29 100644 (file)
@@ -343,8 +343,6 @@ static void _wlan_tx(struct dma_desc *desc)
                            get(AR9170_MAC_REG_AMPDU_FACTOR),
                            8 << super->s.ampdu_factor));
        }
-
-       __wlan_tx(desc);
 }
 
 /* propagate transmission status back to the driver */
@@ -469,7 +467,6 @@ static void handle_tx_completion(void)
                        }
                }
 
-
                wlan_tx_ampdu_reset(i);
 
                for_each_desc(desc, &fw.wlan.tx_retry)
@@ -499,6 +496,7 @@ void __hot wlan_tx(struct dma_desc *desc)
 #endif /* CONFIG_CARL9170FW_CAB_QUEUE */
 
        _wlan_tx(desc);
+       __wlan_tx(desc);
        wlan_trigger(BIT(super->s.queue));
 }
 
@@ -707,12 +705,10 @@ static unsigned int wlan_rx_filter(struct dma_desc *desc)
                rx_filter |= CARL9170_RX_FILTER_MGMT;
        }
 
-#ifdef CONFIG_CARL9170FW_WOL
        if (unlikely(fw.suspend_mode == CARL9170_HOST_SUSPENDED)) {
                wol_rx(rx_filter, hdr, min(data_len,
                        (unsigned int)AR9170_BLOCK_SIZE));
        }
-#endif /* CONFIG_CARL9170FW_WOL */
 
 #undef AR9170_RX_ERROR_BAD
 
@@ -762,6 +758,7 @@ void wlan_cab_flush_queue(const unsigned int vif)
 
                /* ready to roll! */
                _wlan_tx(desc);
+               __wlan_tx(desc);
                wlan_trigger(BIT(super->s.queue));
        }
 }