diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-07-14 17:14:35 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-11-23 18:30:04 +0100 |
commit | 52300733cd4a8e603e5d545a7e63b25889b895c2 (patch) | |
tree | 0ff78c513cf14f116a41857e80a8af193455c226 /package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch | |
parent | 68886f301850c6c35bdff002a719fed1ded584c9 (diff) | |
download | upstream-52300733cd4a8e603e5d545a7e63b25889b895c2.tar.gz upstream-52300733cd4a8e603e5d545a7e63b25889b895c2.tar.bz2 upstream-52300733cd4a8e603e5d545a7e63b25889b895c2.zip |
mac80211: backport SAR power limit support
Needed for an upcoming mt76 update
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 890bf06cef20015e2cec0274c87a9a2232691b6b)
Diffstat (limited to 'package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index cff870fcd6..b2ee61a6dc 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3745,6 +3745,7 @@ struct mgmt_frame_regs { +@@ -3793,6 +3793,7 @@ struct mgmt_frame_regs { * (as advertised by the nl80211 feature flag.) * @get_tx_power: store the current TX power into the dbm variable; * return 0 if successful @@ -8,7 +8,7 @@ * * @set_wds_peer: set the WDS peer for a WDS interface * -@@ -4067,6 +4068,7 @@ struct cfg80211_ops { +@@ -4115,6 +4116,7 @@ struct cfg80211_ops { enum nl80211_tx_power_setting type, int mbm); int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm); @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -4191,6 +4204,7 @@ const struct cfg80211_ops mac80211_confi +@@ -4202,6 +4215,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -129,15 +129,15 @@ local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -740,6 +740,7 @@ static const struct nla_policy nl80211_p - NLA_POLICY_RANGE(NLA_U8, NL80211_SAE_PWE_HUNT_AND_PECK, +@@ -753,6 +753,7 @@ static const struct nla_policy nl80211_p NL80211_SAE_PWE_BOTH), + [NL80211_ATTR_SAR_SPEC] = NLA_POLICY_NESTED(sar_policy), [NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT }, + [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 }, }; /* policy for the key attributes */ -@@ -3248,6 +3249,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3318,6 +3319,20 @@ static int nl80211_set_wiphy(struct sk_b if (result) return result; } |