From 9952c8cf40597f033f5522fc6a4a9076469bb63a Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Fri, 16 Aug 2019 12:03:43 +0200 Subject: [PATCH] ath10k-ct: update to version 2019-08-14 Changes: 9e5ab25027e0 ath10k-ct: Update to latest 5.2 upstream, support bigger mtu, 160Mhz Removed upstreamed patches: - 204-ath10k-fix-max-antenna-gain-unit.patch - 205-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch Signed-off-by: Koen Vandeputte --- package/kernel/ath10k-ct/Makefile | 6 +- ...h10k-4.16-use-tpt-trigger-by-default.patch | 2 +- ...ilable-channels-via-DT-ieee80211-fre.patch | 2 +- ...204-ath10k-fix-max-antenna-gain-unit.patch | 49 --------- ...-power-reduction-for-US-regulatory-d.patch | 101 ------------------ 5 files changed, 5 insertions(+), 155 deletions(-) delete mode 100644 package/kernel/ath10k-ct/patches/204-ath10k-fix-max-antenna-gain-unit.patch delete mode 100644 package/kernel/ath10k-ct/patches/205-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index 89c0b43ad6..12f910dd78 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2019-06-13 -PKG_SOURCE_VERSION:=f0aa81302b2286715fa2fa5a2f4ebe2faf17694c -PKG_MIRROR_HASH:=a6d418dfec02842529a53b3c48236e7a375a654a03e199fbc5178bdb269b7d64 +PKG_SOURCE_DATE:=2019-08-14 +PKG_SOURCE_VERSION:=9e5ab25027e0971fa24ccf93373324c08c4e992d +PKG_MIRROR_HASH:=afe555d1659fafa56368f2f3fa70f65e65d061447dfdc4b7bacb87436dd0a005 # Build the 4.19 ath10k-ct driver version. Other options are "-4.16", or # leave un-defined for 4.7 kernel. Probably this should match as closely as diff --git a/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch b/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch index 9fe4c3b860..1757b94e5e 100644 --- a/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch +++ b/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/ath10k-4.19/mac.c +++ b/ath10k-4.19/mac.c -@@ -9963,7 +9963,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -9965,7 +9965,7 @@ int ath10k_mac_register(struct ath10k *a wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch index 7a5b4fd21f..3a22fc74cb 100644 --- a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch +++ b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch @@ -29,7 +29,7 @@ Forwarded: https://patchwork.kernel.org/patch/10549245/ #include #include #include -@@ -9687,6 +9688,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -9689,6 +9690,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; } diff --git a/package/kernel/ath10k-ct/patches/204-ath10k-fix-max-antenna-gain-unit.patch b/package/kernel/ath10k-ct/patches/204-ath10k-fix-max-antenna-gain-unit.patch deleted file mode 100644 index 9fafaa0fa2..0000000000 --- a/package/kernel/ath10k-ct/patches/204-ath10k-fix-max-antenna-gain-unit.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Sven Eckelmann -Date: Tue, 11 Jun 2019 13:58:35 +0200 -Subject: ath10k: fix max antenna gain unit - -Most of the txpower for the ath10k firmware is stored as twicepower (0.5 dB -steps). This isn't the case for max_antenna_gain - which is still expected -by the firmware as dB. - -The firmware is converting it from dB to the internal (twicepower) -representation when it calculates the limits of a channel. This can be seen -in tpc_stats when configuring "12" as max_antenna_gain. Instead of the -expected 12 (6 dB), the tpc_stats shows 24 (12 dB). - -Tested on QCA9888 and IPQ4019 with firmware 10.4-3.5.3-00057. - -Fixes: 02256930d9b8 ("ath10k: use proper tx power unit") -Signed-off-by: Sven Eckelmann - -Forwarded: https://patchwork.kernel.org/patch/10986723/ - ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -1185,7 +1185,7 @@ static int ath10k_monitor_vdev_start(str - arg.channel.min_power = 0; - arg.channel.max_power = channel->max_power * 2; - arg.channel.max_reg_power = channel->max_reg_power * 2; -- arg.channel.max_antenna_gain = channel->max_antenna_gain * 2; -+ arg.channel.max_antenna_gain = channel->max_antenna_gain; - - reinit_completion(&ar->vdev_setup_done); - -@@ -1627,7 +1627,7 @@ static int ath10k_vdev_start_restart(str - arg.channel.min_power = 0; - arg.channel.max_power = chandef->chan->max_power * 2; - arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; -- arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain * 2; -+ arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain; - - /* CT Firmware can support 32+ VDEVS, but can only support - * beacon-ing devs with dev ids 0 - 31 due to firmware limitations. -@@ -3799,7 +3799,7 @@ static int ath10k_update_channel_list(st - ch->min_power = 0; - ch->max_power = channel->max_power * 2; - ch->max_reg_power = channel->max_reg_power * 2; -- ch->max_antenna_gain = channel->max_antenna_gain * 2; -+ ch->max_antenna_gain = channel->max_antenna_gain; - ch->reg_class_id = 0; /* FIXME */ - - /* FIXME: why use only legacy modes, why not any diff --git a/package/kernel/ath10k-ct/patches/205-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch b/package/kernel/ath10k-ct/patches/205-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch deleted file mode 100644 index ff8631e207..0000000000 --- a/package/kernel/ath10k-ct/patches/205-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch +++ /dev/null @@ -1,101 +0,0 @@ -From: Sven Eckelmann -Date: Wed, 28 Nov 2018 16:16:27 +0100 -Subject: ath10k: adjust tx power reduction for US regulatory domain - -FCC allows maximum antenna gain of 6 dBi. 15.247(b)(4): - -> (4) The conducted output power limit -> specified in paragraph (b) of this section -> is based on the use of antennas -> with directional gains that do not exceed -> 6 dBi. Except as shown in paragraph -> (c) of this section, if transmitting -> antennas of directional gain greater -> than 6 dBi are used, the conducted -> output power from the intentional radiator -> shall be reduced below the stated -> values in paragraphs (b)(1), (b)(2), -> and (b)(3) of this section, as appropriate, -> by the amount in dB that the -> directional gain of the antenna exceeds -> 6 dBi. - -https://www.gpo.gov/fdsys/pkg/CFR-2013-title47-vol1/pdf/CFR-2013-title47-vol1-sec15-247.pdf - -Signed-off-by: Sven Eckelmann - -Forwarded: no - ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -1153,6 +1153,40 @@ static inline int ath10k_vdev_setup_sync - return ar->last_wmi_vdev_start_status; - } - -+static u32 ath10k_get_max_antenna_gain(struct ath10k *ar, -+ u32 ch_max_antenna_gain) -+{ -+ u32 max_antenna_gain; -+ -+ if (ar->dfs_detector && ar->dfs_detector->region == NL80211_DFS_FCC) { -+ /* FCC allows maximum antenna gain of 6 dBi. 15.247(b)(4): -+ * -+ * > (4) The conducted output power limit -+ * > specified in paragraph (b) of this section -+ * > is based on the use of antennas -+ * > with directional gains that do not exceed -+ * > 6 dBi. Except as shown in paragraph -+ * > (c) of this section, if transmitting -+ * > antennas of directional gain greater -+ * > than 6 dBi are used, the conducted -+ * > output power from the intentional radiator -+ * > shall be reduced below the stated -+ * > values in paragraphs (b)(1), (b)(2), -+ * > and (b)(3) of this section, as appropriate, -+ * > by the amount in dB that the -+ * > directional gain of the antenna exceeds -+ * > 6 dBi. -+ * -+ * https://www.gpo.gov/fdsys/pkg/CFR-2013-title47-vol1/pdf/CFR-2013-title47-vol1-sec15-247.pdf -+ */ -+ max_antenna_gain = 6; -+ } else { -+ max_antenna_gain = 0; -+ } -+ -+ return max(ch_max_antenna_gain, max_antenna_gain); -+} -+ - static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id) - { - struct cfg80211_chan_def *chandef = NULL; -@@ -1185,7 +1219,8 @@ static int ath10k_monitor_vdev_start(str - arg.channel.min_power = 0; - arg.channel.max_power = channel->max_power * 2; - arg.channel.max_reg_power = channel->max_reg_power * 2; -- arg.channel.max_antenna_gain = channel->max_antenna_gain; -+ arg.channel.max_antenna_gain = ath10k_get_max_antenna_gain(ar, -+ channel->max_antenna_gain); - - reinit_completion(&ar->vdev_setup_done); - -@@ -1627,7 +1662,8 @@ static int ath10k_vdev_start_restart(str - arg.channel.min_power = 0; - arg.channel.max_power = chandef->chan->max_power * 2; - arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; -- arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain; -+ arg.channel.max_antenna_gain = ath10k_get_max_antenna_gain(ar, -+ chandef->chan->max_antenna_gain); - - /* CT Firmware can support 32+ VDEVS, but can only support - * beacon-ing devs with dev ids 0 - 31 due to firmware limitations. -@@ -3799,7 +3835,8 @@ static int ath10k_update_channel_list(st - ch->min_power = 0; - ch->max_power = channel->max_power * 2; - ch->max_reg_power = channel->max_reg_power * 2; -- ch->max_antenna_gain = channel->max_antenna_gain; -+ ch->max_antenna_gain = ath10k_get_max_antenna_gain(ar, -+ channel->max_antenna_gain); - ch->reg_class_id = 0; /* FIXME */ - - /* FIXME: why use only legacy modes, why not any -- 2.25.1