ath9k: fix a regression in the powersave handling related changes
authorFelix Fietkau <nbd@openwrt.org>
Wed, 5 Jun 2013 19:16:20 +0000 (19:16 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 5 Jun 2013 19:16:20 +0000 (19:16 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 36859

package/mac80211/patches/300-pending_work.patch

index 18379c09cacc816cf79f84599d12521017ffa0ac..f718e266ee967a6b3ab8ec6ea46a77c8026cb855 100644 (file)
                bool is_40, is_sgi, is_sp;
                int phy;
  
-@@ -1107,9 +1122,8 @@ static void ath_tx_fill_desc(struct ath_
+@@ -1106,10 +1121,8 @@ static void ath_tx_fill_desc(struct ath_
+                            struct ath_txq *txq, int len)
  {
        struct ath_hw *ah = sc->sc_ah;
-       struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(bf->bf_mpdu);
+-      struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(bf->bf_mpdu);
 -      struct ath_buf *bf_first = bf;
 +      struct ath_buf *bf_first = NULL;
        struct ath_tx_info info;
  
        memset(&info, 0, sizeof(info));
        info.is_first = true;
-@@ -1117,24 +1131,17 @@ static void ath_tx_fill_desc(struct ath_
+@@ -1117,24 +1130,14 @@ static void ath_tx_fill_desc(struct ath_
        info.txpower = MAX_RATE_POWER;
        info.qcu = txq->axq_qnum;
  
 -      ath_buf_set_rate(sc, bf, &info, len);
 -
 -      if (tx_info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT)
-+      if ((tx_info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT) ||
-+          txq == sc->tx.uapsdq)
-               info.flags |= ATH9K_TXDESC_CLRDMASK;
+-              info.flags |= ATH9K_TXDESC_CLRDMASK;
+-
        if (bf->bf_state.bfs_paprd)
                info.flags |= (u32) bf->bf_state.bfs_paprd << ATH9K_TXDESC_PAPRD_S;
  
 -
        while (bf) {
                struct sk_buff *skb = bf->bf_mpdu;
++              struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
                struct ath_frame_info *fi = get_frame_info(skb);
 +              bool aggr = !!(bf->bf_state.bf_type & BUF_AGGR);
  
                info.type = get_hw_packet_type(skb);
                if (bf->bf_next)
-@@ -1142,6 +1149,21 @@ static void ath_tx_fill_desc(struct ath_
+@@ -1142,6 +1145,25 @@ static void ath_tx_fill_desc(struct ath_
                else
                        info.link = 0;
  
 +                      bf_first = bf;
 +
 +                      info.flags = ATH9K_TXDESC_INTREQ;
++                      if ((tx_info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT) ||
++                          txq == sc->tx.uapsdq)
++                              info.flags |= ATH9K_TXDESC_CLRDMASK;
++
 +                      if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK)
 +                              info.flags |= ATH9K_TXDESC_NOACK;
 +                      if (tx_info->flags & IEEE80211_TX_CTL_LDPC)
 +              txq = sc->tx.uapsdq;
 +              ath_txq_lock(sc, txq);
 +      }
-+
 +      if (txctl->an && ieee80211_is_data_qos(hdr->frame_control)) {
 +              tidno = ieee80211_get_qos_ctl(hdr)[0] &
 +                      IEEE80211_QOS_CTL_TID_MASK;
 +
 +      ath_set_rates(vif, sta, bf);
 +      ath_tx_send_normal(sc, txq, tid, skb);
++
 +out:
        ath_txq_unlock(sc, txq);