File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
drivers/net/wireless/mediatek/mt76/mt7925 Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -79,11 +79,14 @@ mt7925_regd_notifier(struct wiphy *wiphy,
79
79
mdev -> region = req -> dfs_region ;
80
80
dev -> country_ie_env = req -> country_ie_env ;
81
81
82
+ dev -> regd_in_progress = true;
82
83
mt792x_mutex_acquire (dev );
83
84
mt7925_mcu_set_clc (dev , req -> alpha2 , req -> country_ie_env );
84
85
mt7925_mcu_set_channel_domain (hw -> priv );
85
86
mt7925_set_tx_sar_pwr (hw , NULL );
86
87
mt792x_mutex_release (dev );
88
+ dev -> regd_in_progress = false;
89
+ wake_up (& dev -> wait );
87
90
}
88
91
89
92
static void mt7925_mac_init_basic_rates (struct mt792x_dev * dev )
@@ -225,6 +228,7 @@ int mt7925_register_device(struct mt792x_dev *dev)
225
228
spin_lock_init (& dev -> pm .wake .lock );
226
229
mutex_init (& dev -> pm .mutex );
227
230
init_waitqueue_head (& dev -> pm .wait );
231
+ init_waitqueue_head (& dev -> wait );
228
232
spin_lock_init (& dev -> pm .txq_lock );
229
233
INIT_DELAYED_WORK (& dev -> mphy .mac_work , mt792x_mac_work );
230
234
INIT_DELAYED_WORK (& dev -> phy .scan_work , mt7925_scan_work );
Original file line number Diff line number Diff line change @@ -455,6 +455,9 @@ static int mt7925_pci_suspend(struct device *device)
455
455
if (err < 0 )
456
456
goto restore_suspend ;
457
457
458
+ wait_event_timeout (dev -> wait ,
459
+ !dev -> regd_in_progress , 5 * HZ );
460
+
458
461
/* always enable deep sleep during suspend to reduce
459
462
* power consumption
460
463
*/
You can’t perform that action at this time.
0 commit comments