carl9170 firmware: update version to 1.9.5
[carl9170fw.git] / carlfw / src / wlan.c
index a7c805b588908267541bd994f6c878a0abea16c2..b83e672287c0e971469b878ec124d695bf4d363e 100644 (file)
@@ -292,25 +292,12 @@ static void __wlan_tx(struct dma_desc *desc)
 
        wlan_tx_ampdu(super);
 
-#if (defined CONFIG_CARL9170FW_LOOPBACK) || (defined CONFIG_CARL9170FW_DISCARD)
-       wlan_tx_complete(super, true);
-       unhide_super(desc);
-# ifdef CONFIG_CARL9170FW_LOOPBACK
-       dma_put(&fw.pta.up_queue, desc);
-       up_trigger();
-# elif CONFIG_CARL9170FW_DISCARD
-       dma_reclaim(&fw.pta.down_queue, desc);
-       down_trigger();
-# endif
-#else /* CONFIG_CARL9170FW_LOOPBACK */
-
-# ifdef CONFIG_CARL9170FW_DEBUG
+#ifdef CONFIG_CARL9170FW_DEBUG
        BUG_ON(fw.phy.psm.state != CARL9170_PSM_WAKE);
-# endif /* CONFIG_CARL9170FW_DEBUG */
+#endif /* CONFIG_CARL9170FW_DEBUG */
 
        /* insert desc into the right queue */
        dma_put(&fw.wlan.tx_queue[super->s.queue], desc);
-#endif /* CONFIG_CARL9170FW_LOOPBACK */
 }
 
 static void wlan_assign_seq(struct ieee80211_hdr *hdr, unsigned int vif)
@@ -318,7 +305,7 @@ static void wlan_assign_seq(struct ieee80211_hdr *hdr, unsigned int vif)
        hdr->seq_ctrl &= cpu_to_le16(~IEEE80211_SCTL_SEQ);
        hdr->seq_ctrl |= cpu_to_le16(fw.wlan.sequence[vif]);
 
-       if (!(hdr->seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG)))
+       if (ieee80211_is_first_frag(hdr->seq_ctrl))
                fw.wlan.sequence[vif] += 0x10;
 }
 
@@ -364,6 +351,12 @@ static bool wlan_tx_status(struct dma_queue *queue,
                /* reset retry indicator flags */
                desc->ctrl &= ~(AR9170_CTRL_TXFAIL | AR9170_CTRL_BAFAIL);
 
+               /*
+                * Note: wlan_tx_consume_retry will override the old
+                * phy [CCK,OFDM, HT, BW20/40, MCS...] and mac vectors
+                * [AMPDU,RTS/CTS,...] therefore be careful when they
+                * are used.
+                */
                if (wlan_tx_consume_retry(super)) {
                        /*
                         * retry for simple and aggregated 802.11 frames.