aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-03-30 23:35:04 +0100
committerDaniel Golle <daniel@makrotopia.org>2020-04-01 19:47:59 +0100
commita24a9bbc8c131c300fd8d4f9307aa236ed61a34b (patch)
treee430c39c85f8c8b776b6022466e6ab9d577804c0 /package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch
parent51edc4eb89bb299d5da2a20e1cc7349b808c6747 (diff)
downloadupstream-a24a9bbc8c131c300fd8d4f9307aa236ed61a34b.tar.gz
upstream-a24a9bbc8c131c300fd8d4f9307aa236ed61a34b.tar.bz2
upstream-a24a9bbc8c131c300fd8d4f9307aa236ed61a34b.zip
mac80211: rt2x00: prune more unnecessary exports
The calibration patches for MT7620 unnecessarily export symbols and populate never accessed function pointers. Remove all that and make functions static as the only place where each of those functions is called is within rt2800lib.c. Also make code more readable by fixing indentation, removing unnecessary parantheses and simplifying some instructions using shorthands here and there. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch')
-rw-r--r--package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch29
1 files changed, 4 insertions, 25 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch b/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch
index b6180efa8b..89a4ccb961 100644
--- a/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch
+++ b/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch
@@ -1,10 +1,10 @@
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -8628,6 +8628,71 @@ void rt2800_r_calibration(struct rt2x00_
+@@ -8621,6 +8621,70 @@ static void rt2800_r_calibration(struct
+ rt2800_register_write(rt2x00dev, PWR_PIN_CFG, MAC_PWR_PIN_CFG);
}
- EXPORT_SYMBOL_GPL(rt2800_r_calibration);
-+void rt2800_rxdcoc_calibration(struct rt2x00_dev *rt2x00dev)
++static void rt2800_rxdcoc_calibration(struct rt2x00_dev *rt2x00dev)
+{
+ u8 bbpreg = 0;
+ u32 macvalue = 0, macvalue1 = 0;
@@ -67,12 +67,11 @@
+
+ rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, saverfb0r2);
+}
-+EXPORT_SYMBOL_GPL(rt2800_rxdcoc_calibration);
+
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
bool set_bw, bool is_ht40)
{
-@@ -9237,6 +9302,7 @@ static void rt2800_init_rfcsr_6352(struc
+@@ -9230,6 +9294,7 @@ static void rt2800_init_rfcsr_6352(struc
rt2800_r_calibration(rt2x00dev);
rt2800_rf_self_txdc_cal(rt2x00dev);
@@ -80,23 +79,3 @@
rt2800_bw_filter_calibration(rt2x00dev, true);
rt2800_bw_filter_calibration(rt2x00dev, false);
}
---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h
-@@ -245,6 +245,7 @@ void rt2800_vco_calibration(struct rt2x0
- void rt2800_rf_self_txdc_cal(struct rt2x00_dev *rt2x00dev);
- int rt2800_calcrcalibrationcode(struct rt2x00_dev *rt2x00dev, int d1, int d2);
- void rt2800_r_calibration(struct rt2x00_dev *rt2x00dev);
-+void rt2800_rxdcoc_calibration(struct rt2x00_dev *rt2x00dev);
-
- int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev);
- void rt2800_disable_radio(struct rt2x00_dev *rt2x00dev);
---- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-@@ -565,6 +565,7 @@ struct rt2x00lib_ops {
- void (*rf_self_txdc_cal) (struct rt2x00_dev *rt2x00dev);
- int (*calcrcalibrationcode) (struct rt2x00_dev *rt2x00dev, int d1, int d2);
- void (*r_calibration) (struct rt2x00_dev *rt2x00dev);
-+ void (*rxdcoc_calibration) (struct rt2x00_dev *rt2x00dev);
-
- /*
- * Data queue handlers.