mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-19 05:04:04 +02:00
ath9k: fix PA predistortion training, fixes hang issues and most likely also fixes #12073
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33278 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
2cc87d4e87
commit
f35d1440f0
58
package/mac80211/patches/575-ath9k_fix_paprd_crash.patch
Normal file
58
package/mac80211/patches/575-ath9k_fix_paprd_crash.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||||
|
@@ -404,6 +404,7 @@ struct ath9k_hw_cal_data {
|
||||||
|
int8_t iCoff;
|
||||||
|
int8_t qCoff;
|
||||||
|
bool rtt_done;
|
||||||
|
+ bool paprd_packet_sent;
|
||||||
|
bool paprd_done;
|
||||||
|
bool nfcal_pending;
|
||||||
|
bool nfcal_interference;
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
|
@@ -1780,6 +1780,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||||
|
/* Operating channel changed, reset channel calibration data */
|
||||||
|
memset(caldata, 0, sizeof(*caldata));
|
||||||
|
ath9k_init_nfcal_hist_buffer(ah, chan);
|
||||||
|
+ } else if (caldata) {
|
||||||
|
+ caldata->paprd_packet_sent = false;
|
||||||
|
}
|
||||||
|
ah->noise = ath9k_hw_getchan_noise(ah, chan);
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||||
|
@@ -2028,6 +2028,9 @@ static void ath_tx_complete(struct ath_s
|
||||||
|
|
||||||
|
ath_dbg(common, XMIT, "TX complete: skb: %p\n", skb);
|
||||||
|
|
||||||
|
+ if (sc->sc_ah->caldata)
|
||||||
|
+ sc->sc_ah->caldata->paprd_packet_sent = true;
|
||||||
|
+
|
||||||
|
if (!(tx_flags & ATH_TX_ERROR))
|
||||||
|
/* Frame was ACKed */
|
||||||
|
tx_info->flags |= IEEE80211_TX_STAT_ACK;
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/link.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/link.c
|
||||||
|
@@ -256,7 +256,7 @@ void ath_paprd_calibrate(struct work_str
|
||||||
|
int len = 1800;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
- if (!caldata)
|
||||||
|
+ if (!caldata || !caldata->paprd_packet_sent || caldata->paprd_done)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ath9k_ps_wakeup(sc);
|
||||||
|
@@ -283,13 +283,6 @@ void ath_paprd_calibrate(struct work_str
|
||||||
|
continue;
|
||||||
|
|
||||||
|
chain_ok = 0;
|
||||||
|
-
|
||||||
|
- ath_dbg(common, CALIBRATE,
|
||||||
|
- "Sending PAPRD frame for thermal measurement on chain %d\n",
|
||||||
|
- chain);
|
||||||
|
- if (!ath_paprd_send_frame(sc, skb, chain))
|
||||||
|
- goto fail_paprd;
|
||||||
|
-
|
||||||
|
ar9003_paprd_setup_gain_table(ah, chain);
|
||||||
|
|
||||||
|
ath_dbg(common, CALIBRATE,
|
Loading…
Reference in New Issue
Block a user