Root/package/mac80211/patches/565-ath9k_disable_paprd.patch

1--- a/drivers/net/wireless/ath/ath9k/debug.c
2+++ b/drivers/net/wireless/ath/ath9k/debug.c
3@@ -1767,6 +1767,8 @@ int ath9k_init_debug(struct ath_hw *ah)
4                 sc->debug.debugfs_phy, sc, &fops_tx_chainmask);
5     debugfs_create_file("disable_ani", S_IRUSR | S_IWUSR,
6                 sc->debug.debugfs_phy, sc, &fops_disable_ani);
7+ debugfs_create_bool("paprd", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
8+ &sc->sc_ah->config.enable_paprd);
9     debugfs_create_file("regidx", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
10                 sc, &fops_regidx);
11     debugfs_create_file("regval", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
12--- a/drivers/net/wireless/ath/ath9k/hw.c
13+++ b/drivers/net/wireless/ath/ath9k/hw.c
14@@ -2521,10 +2521,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw
15         pCap->rx_status_len = sizeof(struct ar9003_rxs);
16         pCap->tx_desc_len = sizeof(struct ar9003_txc);
17         pCap->txs_len = sizeof(struct ar9003_txs);
18- if (!ah->config.paprd_disable &&
19- ah->eep_ops->get_eeprom(ah, EEP_PAPRD) &&
20- !AR_SREV_9462(ah))
21- pCap->hw_caps |= ATH9K_HW_CAP_PAPRD;
22     } else {
23         pCap->tx_desc_len = sizeof(struct ath_desc);
24         if (AR_SREV_9280_20(ah))
25--- a/drivers/net/wireless/ath/ath9k/hw.h
26+++ b/drivers/net/wireless/ath/ath9k/hw.h
27@@ -236,7 +236,6 @@ enum ath9k_hw_caps {
28     ATH9K_HW_CAP_LDPC = BIT(6),
29     ATH9K_HW_CAP_FASTCLOCK = BIT(7),
30     ATH9K_HW_CAP_SGI_20 = BIT(8),
31- ATH9K_HW_CAP_PAPRD = BIT(9),
32     ATH9K_HW_CAP_ANT_DIV_COMB = BIT(10),
33     ATH9K_HW_CAP_2GHZ = BIT(11),
34     ATH9K_HW_CAP_5GHZ = BIT(12),
35@@ -287,12 +286,12 @@ struct ath9k_ops_config {
36     u8 pcie_clock_req;
37     u32 pcie_waen;
38     u8 analog_shiftreg;
39- u8 paprd_disable;
40     u32 ofdm_trig_low;
41     u32 ofdm_trig_high;
42     u32 cck_trig_high;
43     u32 cck_trig_low;
44     u32 enable_ani;
45+ u32 enable_paprd;
46     int serialize_regmode;
47     bool rx_intr_mitigation;
48     bool tx_intr_mitigation;
49--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
50+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
51@@ -2982,6 +2982,10 @@ static u32 ath9k_hw_ar9300_get_eeprom(st
52     case EEP_RX_MASK:
53         return pBase->txrxMask & 0xf;
54     case EEP_PAPRD:
55+ if (AR_SREV_9462(ah))
56+ return false;
57+ if (!ah->config.enable_paprd);
58+ return false;
59         return !!(pBase->featureEnable & BIT(5));
60     case EEP_CHAIN_MASK_REDUCE:
61         return (pBase->miscConfiguration >> 0x3) & 0x1;
62--- a/drivers/net/wireless/ath/ath9k/link.c
63+++ b/drivers/net/wireless/ath/ath9k/link.c
64@@ -423,7 +423,7 @@ set_timer:
65         cal_interval = min(cal_interval, (u32)short_cal_interval);
66 
67     mod_timer(&common->ani.timer, jiffies + msecs_to_jiffies(cal_interval));
68- if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_PAPRD) && ah->caldata) {
69+ if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD) && ah->caldata) {
70         if (!ah->caldata->paprd_done)
71             ieee80211_queue_work(sc->hw, &sc->paprd_work);
72         else if (!ah->paprd_table_write_done)
73

Archive Download this file



interactive