mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
auto-t: hostapd.py: remove get_freq()/get_config_value()
This commit is contained in:
parent
876ac5f569
commit
541dca499a
@ -212,20 +212,6 @@ class HostapdCLI:
|
||||
if 'OK' not in proc.out:
|
||||
raise Exception('BSS_TM_REQ failed, is hostapd built with CONFIG_WNM_AP=y?')
|
||||
|
||||
def get_config_value(self, key):
|
||||
# first find the right config file
|
||||
with open(self.config, 'r') as f:
|
||||
# read in config file and search for key
|
||||
cfg = f.read()
|
||||
match = re.search(r'%s=.*' % key, cfg)
|
||||
if match:
|
||||
return match.group(0).split('=')[1]
|
||||
return None
|
||||
|
||||
|
||||
def get_freq(self):
|
||||
return chan_freq_map[int(self.get_config_value('channel'))]
|
||||
|
||||
def ungraceful_restart(self):
|
||||
'''
|
||||
Ungracefully kill and restart hostapd
|
||||
|
Loading…
Reference in New Issue
Block a user