1 parent 8261bed commit 621d2fbCopy full SHA for 621d2fb
1 file changed
wfb_ng/server.py
@@ -113,9 +113,11 @@ def init_wlans(max_bw, wlans):
113
yield call_and_check_rc('nmcli', 'device', 'set', wlan, 'managed', 'no')
114
yield df_sleep(1)
115
116
- yield call_and_check_rc('ip', 'link', 'set', wlan, 'down')
117
- yield call_and_check_rc('iw', 'dev', wlan, 'set', 'monitor', 'otherbss')
118
- yield call_and_check_rc('ip', 'link', 'set', wlan, 'up')
+ monitor_mode_satus = yield call_and_check_rc('iw', 'dev', wlan, 'info', log_stdout=False)
+ if not b'type monitor' in monitor_mode_satus:
+ yield call_and_check_rc('ip', 'link', 'set', wlan, 'down')
119
+ yield call_and_check_rc('iw', 'dev', wlan, 'set', 'monitor', 'otherbss')
120
+ yield call_and_check_rc('ip', 'link', 'set', wlan, 'up')
121
122
# You can set own frequency channel for each card
123
if isinstance(settings.common.wifi_channel, dict):
0 commit comments