This contains the following commits: ``` git log --oneline v6.12.52...v6.12.61 -- drivers/net/wireless/ net/mac80211/ net/wireless/ a1eb56723b32 wifi: ath12k: correctly handle mcast packets for clients c0a9c2c1b7b9 wifi: mac80211: use wiphy_hrtimer_work for csa.switch_work d4caee32a9f8 wifi: cfg80211: add an hrtimer based delayed work item 6455948c8aab wifi: mac80211: reject address change while connecting 80dc5a2ce5b7 wifi: ath11k: Clear affinity hint before calling ath11k_pcic_free_irq() in error path acd24d509227 wifi: mac80211: skip rate verification for not captured PSDUs 53cf801b8555 wifi: ath11k: zero init info->status in wmi_process_mgmt_tx_comp() e8fa86b0bd96 wifi: mac80211_hwsim: Limit destroy_on_close radio removal to netgroup 77d4afd6c78b Revert "wifi: ath10k: avoid unnecessary wait for service ready message" 07d862c7de3d wifi: ath12k: Increase DP_REO_CMD_RING_SIZE to 256 522734fc807c wifi: mac80211: Track NAN interface start/stop 8db790c2491e wifi: ath10k: Fix connection after GTK rekeying 72f1984246e6 wifi: rtw89: renew a completion for each H2C command waiting C2H event 336da4414300 wifi: rtw89: obtain RX path from ppdu status IE00 da91687f01f4 wifi: mt76: mt7996: fix memory leak on mt7996_mcu_sta_key_tlv error a534dd44b70e wifi: mt76: mt76_eeprom_override to int aa5ed215cfe8 wifi: mt76: mt7996: Temporarily disable EPCS efe2ef24feab wifi: mt76: mt7921: Add 160MHz beamformee capability for mt7922 device 5de410dfb4d9 wifi: mac80211: Fix HE capabilities element check f157d1cb2cdc wifi: iwlwifi: fw: Add ASUS to PPAG and TAS list c9df78e84e85 wifi: mac80211: Fix 6 GHz Band capabilities element advertisement in lower bands 958234997dd5 wifi: rtw89: fix BSSID comparison for non-transmitted BSSID ca18975c4de2 wifi: rtw89: wow: remove notify during WoWLAN net-detect bc1ca06998c1 wifi: rtw88: sdio: use indirect IO for device registers before power-on 8ebef59d0294 wifi: rtw89: print just once for unknown C2H events 5596a90c8952 wifi: mac80211: fix key tailroom accounting leak 23b8682f05ec wifi: mac80211: don't mark keys for inactive links as uploaded e3373f10c6a6 wifi: ath11k: avoid bit operation on key flags 50f50dd024b4 wifi: ath11k: add support for MU EDCA 2a6cd5951ba8 wifi: ath12k: free skb during idr cleanup callback 775e37df2acc wifi: ath11k: Add missing platform IDs for quirk table c4840991ee4c wifi: ath10k: Fix memory leak on unsupported WMI command a6eed58249e7 wifi: brcmfmac: fix crash while sending Action Frames in standalone AP Mode 57100b87c778 wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev() 4a63523d3541 wifi: cfg80211: Add missing lock in cfg80211_check_and_end_cac() e9fd43b799d2 wifi: rtw89: avoid possible TX wait initialization race b419093e5e42 wifi: mt76: mt7921u: Add VID/PID for Netgear A7500 feb1774aaf85 wifi: mt76: mt7925u: Add VID/PID for Netgear A9000 bd3ac455a88d wifi: ath11k: HAL SRNG: don't deinitialize and re-initialize again 8055133a9f64 wifi: rtw89: avoid circular locking dependency in ser_state_run() 1c873416758f wifi: mac80211: fix Rx packet handling when pubsta information is not available 6e7d9fa61d7d wifi: ath10k: avoid unnecessary wait for service ready message 8d4f6ab4c53e wifi: ath12k: fix wrong logging ID used for CE fc00890c55e3 wifi: mt76: mt7915: fix mt7981 pre-calibration e18c4e6ba36c wifi: mt76: mt7996: Convert mt7996_wed_rro_addr to LE f481404a9826 wifi: mt76: mt7996: Fix RX packets configuration for primary WED device 57519239c76c wifi: mt76: fix potential memory leak in mt76_wmac_probe() 27c8e2e4b56f wifi: iwlwifi: Remove redundant header files 605402433eb8 wifi: mwifiex: send world regulatory domain to driver ``` The removed patch was added upstream. Link: https://github.com/openwrt/openwrt/pull/21134 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
102 lines
3.7 KiB
Diff
102 lines
3.7 KiB
Diff
From: Sven Eckelmann <seckelmann@datto.com>
|
|
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 <seckelmann@datto.com>
|
|
|
|
Forwarded: no
|
|
|
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
|
@@ -1030,6 +1030,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;
|
|
@@ -1062,7 +1096,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);
|
|
reinit_completion(&ar->vdev_delete_done);
|
|
@@ -1508,7 +1543,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);
|
|
|
|
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
|
arg.ssid = arvif->u.ap.ssid;
|
|
@@ -3439,7 +3475,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
|