Skip to content
Snippets Groups Projects
Unverified Commit 487922a8 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Downgrade mac80211 to LEDE 6c2651566cce8f5b3a3d3b976439dee2bac5e07e

In addition, the temperature compensation support patch is reverted.

It seems that newer mac80211 version are less stable, so we downgrade it
for now.
parent 9934d254
No related branches found
No related tags found
No related merge requests found
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 11 Oct 2016 02:54:27 +0200
Subject: ath9k: revert temperature compensation support patch (FS#111)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Backport of LEDE 3e4d0e3e77dcf9b2116e5ed53f30e2bf53b1c6b7
diff --git a/package/kernel/mac80211/patches/328-ath9k_hw-implement-temperature-compensation-support-.patch b/package/kernel/mac80211/patches/328-ath9k_hw-implement-temperature-compensation-support-.patch
deleted file mode 100644
index cff32ad..0000000
--- a/package/kernel/mac80211/patches/328-ath9k_hw-implement-temperature-compensation-support-.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Mon, 11 Jul 2016 11:35:55 +0200
-Subject: [PATCH] ath9k_hw: implement temperature compensation support for
- AR9003+
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
-@@ -33,6 +33,7 @@ struct coeff {
-
- enum ar9003_cal_types {
- IQ_MISMATCH_CAL = BIT(0),
-+ TEMP_COMP_CAL = BIT(1),
- };
-
- static void ar9003_hw_setup_calibration(struct ath_hw *ah,
-@@ -58,6 +59,12 @@ static void ar9003_hw_setup_calibration(
- /* Kick-off cal */
- REG_SET_BIT(ah, AR_PHY_TIMING4, AR_PHY_TIMING4_DO_CAL);
- break;
-+ case TEMP_COMP_CAL:
-+ ath_dbg(common, CALIBRATE,
-+ "starting Temperature Compensation Calibration\n");
-+ REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_LOCAL);
-+ REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_START);
-+ break;
- default:
- ath_err(common, "Invalid calibration type\n");
- break;
-@@ -86,7 +93,8 @@ static bool ar9003_hw_per_calibration(st
- /*
- * Accumulate cal measures for active chains
- */
-- cur_caldata->calCollect(ah);
-+ if (cur_caldata->calCollect)
-+ cur_caldata->calCollect(ah);
- ah->cal_samples++;
-
- if (ah->cal_samples >= cur_caldata->calNumSamples) {
-@@ -99,7 +107,8 @@ static bool ar9003_hw_per_calibration(st
- /*
- * Process accumulated data
- */
-- cur_caldata->calPostProc(ah, numChains);
-+ if (cur_caldata->calPostProc)
-+ cur_caldata->calPostProc(ah, numChains);
-
- /* Calibration has finished. */
- caldata->CalValid |= cur_caldata->calType;
-@@ -314,9 +323,16 @@ static const struct ath9k_percal_data iq
- ar9003_hw_iqcalibrate
- };
-
-+static const struct ath9k_percal_data temp_cal_single_sample = {
-+ TEMP_COMP_CAL,
-+ MIN_CAL_SAMPLES,
-+ PER_MAX_LOG_COUNT,
-+};
-+
- static void ar9003_hw_init_cal_settings(struct ath_hw *ah)
- {
- ah->iq_caldata.calData = &iq_cal_single_sample;
-+ ah->temp_caldata.calData = &temp_cal_single_sample;
-
- if (AR_SREV_9300_20_OR_LATER(ah)) {
- ah->enabled_cals |= TX_IQ_CAL;
-@@ -324,7 +340,7 @@ static void ar9003_hw_init_cal_settings(
- ah->enabled_cals |= TX_IQ_ON_AGC_CAL;
- }
-
-- ah->supp_cals = IQ_MISMATCH_CAL;
-+ ah->supp_cals = IQ_MISMATCH_CAL | TEMP_COMP_CAL;
- }
-
- #define OFF_UPPER_LT 24
-@@ -1383,6 +1399,9 @@ static void ar9003_hw_init_cal_common(st
- INIT_CAL(&ah->iq_caldata);
- INSERT_CAL(ah, &ah->iq_caldata);
-
-+ INIT_CAL(&ah->temp_caldata);
-+ INSERT_CAL(ah, &ah->temp_caldata);
-+
- /* Initialize current pointer to first element in list */
- ah->cal_list_curr = ah->cal_list;
-
---- a/drivers/net/wireless/ath/ath9k/hw.h
-+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -830,6 +830,7 @@ struct ath_hw {
- /* Calibration */
- u32 supp_cals;
- struct ath9k_cal_list iq_caldata;
-+ struct ath9k_cal_list temp_caldata;
- struct ath9k_cal_list adcgain_caldata;
- struct ath9k_cal_list adcdc_caldata;
- struct ath9k_cal_list *cal_list;
diff --git a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
index 4615643..6edef09 100644
--- a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
+++ b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
@@ -84,7 +84,7 @@
bool reset_power_on;
bool htc_reset_init;
-@@ -1068,6 +1076,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
+@@ -1067,6 +1075,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
bool ath9k_hw_check_alive(struct ath_hw *ah);
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 30 Sep 2016 16:57:57 +0200
Subject: mac80211: fix tx issue with CCMP PN generated in hardware
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Backport of LEDE f3747020e202883a43729fc245986f9e36289d6c
diff --git a/package/kernel/mac80211/patches/346-mac80211-Move-reorder-sensitive-TX-handlers-to-after.patch b/package/kernel/mac80211/patches/346-mac80211-Move-reorder-sensitive-TX-handlers-to-after.patch
index 8ceed51..aba1ff4 100644
--- a/package/kernel/mac80211/patches/346-mac80211-Move-reorder-sensitive-TX-handlers-to-after.patch
+++ b/package/kernel/mac80211/patches/346-mac80211-Move-reorder-sensitive-TX-handlers-to-after.patch
@@ -404,7 +404,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
sta->tx_stats.packets[skb_get_queue_mapping(skb)]++;
- if (fast_tx->pn_offs) {
-+ if (pn_offs) {
++ if (pn_offs && (key_conf->flags & IEEE80211_KEY_FLAG_GENERATE_IV)) {
u64 pn;
- u8 *crypto_hdr = skb->data + fast_tx->pn_offs;
+ u8 *crypto_hdr = skb->data + pn_offs;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment