File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
drivers/net/wireless/mediatek/mt76 Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,13 @@ void mt7925_regd_update(struct mt792x_dev *dev)
63
63
struct mt76_dev * mdev = & dev -> mt76 ;
64
64
struct ieee80211_hw * hw = mdev -> hw ;
65
65
66
+ if (!dev -> regd_change )
67
+ return ;
68
+
66
69
mt7925_mcu_set_clc (dev , mdev -> alpha2 , dev -> country_ie_env );
67
70
mt7925_mcu_set_channel_domain (hw -> priv );
68
71
mt7925_set_tx_sar_pwr (hw , NULL );
72
+ dev -> regd_change = false;
69
73
}
70
74
EXPORT_SYMBOL_GPL (mt7925_regd_update );
71
75
@@ -91,6 +95,7 @@ mt7925_regd_notifier(struct wiphy *wiphy,
91
95
memcpy (mdev -> alpha2 , req -> alpha2 , 2 );
92
96
mdev -> region = req -> dfs_region ;
93
97
dev -> country_ie_env = req -> country_ie_env ;
98
+ dev -> regd_change = true;
94
99
95
100
if (pm -> suspended )
96
101
return ;
Original file line number Diff line number Diff line change @@ -1300,6 +1300,7 @@ void mt7925_mac_reset_work(struct work_struct *work)
1300
1300
cancel_delayed_work_sync (& dev -> mphy .mac_work );
1301
1301
cancel_delayed_work_sync (& pm -> ps_work );
1302
1302
cancel_work_sync (& pm -> wake_work );
1303
+ dev -> sar_inited = false;
1303
1304
1304
1305
for (i = 0 ; i < 10 ; i ++ ) {
1305
1306
mutex_lock (& dev -> mt76 .mutex );
Original file line number Diff line number Diff line change @@ -310,6 +310,7 @@ void mt7925_set_stream_he_eht_caps(struct mt792x_phy *phy)
310
310
int __mt7925_start (struct mt792x_phy * phy )
311
311
{
312
312
struct mt76_phy * mphy = phy -> mt76 ;
313
+ struct mt792x_dev * dev = phy -> dev ;
313
314
int err ;
314
315
315
316
err = mt7925_mcu_set_channel_domain (mphy );
@@ -320,9 +321,12 @@ int __mt7925_start(struct mt792x_phy *phy)
320
321
if (err )
321
322
return err ;
322
323
323
- err = mt7925_set_tx_sar_pwr (mphy -> hw , NULL );
324
- if (err )
325
- return err ;
324
+ if (!dev -> sar_inited ) {
325
+ err = mt7925_set_tx_sar_pwr (mphy -> hw , NULL );
326
+ if (err )
327
+ return err ;
328
+ dev -> sar_inited = true;
329
+ }
326
330
327
331
mt792x_mac_reset_counters (phy );
328
332
set_bit (MT76_STATE_RUNNING , & mphy -> state );
Original file line number Diff line number Diff line change @@ -224,6 +224,8 @@ struct mt792x_dev {
224
224
bool aspm_supported :1 ;
225
225
bool hif_idle :1 ;
226
226
bool hif_resumed :1 ;
227
+ bool sar_inited :1 ;
228
+ bool regd_change :1 ;
227
229
wait_queue_head_t wait ;
228
230
229
231
struct work_struct init_work ;
You can’t perform that action at this time.
0 commit comments