ath9k: merge an upstream change to fix false tx hangs on ar9003
[openwrt.git] / package / mac80211 / patches / 300-pending_work.patch
index 0900596..494c794 100644 (file)
        WLAN_STA_BLOCK_BA       = 1<<11,
 --- a/drivers/net/wireless/ath/ath9k/beacon.c
 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
-@@ -384,7 +384,9 @@ void ath_beacon_tasklet(unsigned long da
+@@ -360,6 +360,7 @@ void ath_beacon_tasklet(unsigned long da
+       struct ath_common *common = ath9k_hw_common(ah);
+       struct ath_buf *bf = NULL;
+       struct ieee80211_vif *vif;
++      struct ath_tx_status ts;
+       int slot;
+       u32 bfaddr, bc = 0;
+@@ -384,7 +385,9 @@ void ath_beacon_tasklet(unsigned long da
                        ath_dbg(common, ATH_DBG_BSTUCK,
                                "beacon is officially stuck\n");
                        sc->sc_flags |= SC_OP_TSF_RESET;
                }
  
                return;
+@@ -464,6 +467,11 @@ void ath_beacon_tasklet(unsigned long da
+               ath9k_hw_txstart(ah, sc->beacon.beaconq);
+               sc->beacon.ast_be_xmit += bc;     /* XXX per-vif? */
++              if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
++                      spin_lock_bh(&sc->sc_pcu_lock);
++                      ath9k_hw_txprocdesc(ah, bf->bf_desc, (void *)&ts);
++                      spin_unlock_bh(&sc->sc_pcu_lock);
++              }
+       }
+ }
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
 @@ -617,8 +617,11 @@ void ath_hw_check(struct work_struct *wo
  void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx);
  
  #endif  /* AR9003_PHY_H */
+--- a/drivers/net/wireless/ath/ath5k/eeprom.c
++++ b/drivers/net/wireless/ath/ath5k/eeprom.c
+@@ -691,14 +691,12 @@ ath5k_eeprom_free_pcal_info(struct ath5k
+               if (!chinfo[pier].pd_curves)
+                       continue;
+-              for (pdg = 0; pdg < ee->ee_pd_gains[mode]; pdg++) {
++              for (pdg = 0; pdg < AR5K_EEPROM_N_PD_CURVES; pdg++) {
+                       struct ath5k_pdgain_info *pd =
+                                       &chinfo[pier].pd_curves[pdg];
+-                      if (pd != NULL) {
+-                              kfree(pd->pd_step);
+-                              kfree(pd->pd_pwr);
+-                      }
++                      kfree(pd->pd_step);
++                      kfree(pd->pd_pwr);
+               }
+               kfree(chinfo[pier].pd_curves);
+--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+@@ -229,6 +229,7 @@ static void ar9003_hw_fill_txdesc(struct
+ static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds,
+                                struct ath_tx_status *ts)
+ {
++      struct ar9003_txc *txc = (struct ar9003_txc *) ds;
+       struct ar9003_txs *ads;
+       u32 status;
+@@ -238,7 +239,11 @@ static int ar9003_hw_proc_txdesc(struct 
+       if ((status & AR_TxDone) == 0)
+               return -EINPROGRESS;
+-      ah->ts_tail = (ah->ts_tail + 1) % ah->ts_size;
++      ts->qid = MS(ads->ds_info, AR_TxQcuNum);
++      if (!txc || (MS(txc->info, AR_TxQcuNum) == ts->qid))
++              ah->ts_tail = (ah->ts_tail + 1) % ah->ts_size;
++      else
++              return -ENOENT;
+       if ((MS(ads->ds_info, AR_DescId) != ATHEROS_VENDOR_ID) ||
+           (MS(ads->ds_info, AR_TxRxDesc) != 1)) {
+@@ -254,7 +259,6 @@ static int ar9003_hw_proc_txdesc(struct 
+       ts->ts_seqnum = MS(status, AR_SeqNum);
+       ts->tid = MS(status, AR_TxTid);
+-      ts->qid = MS(ads->ds_info, AR_TxQcuNum);
+       ts->desc_id = MS(ads->status1, AR_TxDescId);
+       ts->ts_tstamp = ads->status4;
+       ts->ts_status = 0;
This page took 0.023967 seconds and 4 git commands to generate.