wifi: mt76: mt7921: fix wrong power after multiple SAR set
We should update CLC config before SAR set to synchronize all
related settings.
Fixes: 23bdc5d8ca ("wifi: mt76: mt7921: introduce Country Location Control support")
Signed-off-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
@@ -59,6 +59,7 @@ mt7921_regd_notifier(struct wiphy *wiphy,
|
||||
|
||||
memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2));
|
||||
dev->mt76.region = request->dfs_region;
|
||||
dev->country_ie_env = request->country_ie_env;
|
||||
|
||||
mt7921_mutex_acquire(dev);
|
||||
mt7921_mcu_set_clc(dev, request->alpha2, request->country_ie_env);
|
||||
|
||||
@@ -1615,7 +1615,13 @@ static int mt7921_set_sar_specs(struct ieee80211_hw *hw,
|
||||
int err;
|
||||
|
||||
mt7921_mutex_acquire(dev);
|
||||
err = mt7921_mcu_set_clc(dev, dev->mt76.alpha2,
|
||||
dev->country_ie_env);
|
||||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
err = mt7921_set_tx_sar_pwr(hw, sar);
|
||||
out:
|
||||
mt7921_mutex_release(dev);
|
||||
|
||||
return err;
|
||||
|
||||
@@ -304,6 +304,8 @@ struct mt7921_dev {
|
||||
struct work_struct ipv6_ns_work;
|
||||
/* IPv6 addresses for WoWLAN */
|
||||
struct sk_buff_head ipv6_ns_list;
|
||||
|
||||
enum environment_cap country_ie_env;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
Reference in New Issue
Block a user