commit d12ee292aac490c39d2ced73d3dbf700f311e642
parent 27afe6c49f629dcef82df2c5564a59246643e3c2
Author: Denis Kenzior <denkenz@gmail.com>
Date: Thu, 24 Oct 2019 23:18:23 -0500
treewide: Use CamelCase for disable_anqp setting
Diffstat:
8 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/autotests/testHotspot/autoconnect_test.py b/autotests/testHotspot/autoconnect_test.py
@@ -111,7 +111,7 @@ class Test(unittest.TestCase):
def setUpClass(cls):
IWD.copy_to_hotspot('autoconnect.conf')
IWD.copy_to_storage('ssidWPA2-1.psk')
- conf = '[General]\ndisable_anqp=0\n'
+ conf = '[General]\nDisableANQP=0\n'
os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod
diff --git a/autotests/testHotspot/hessid_test.py b/autotests/testHotspot/hessid_test.py
@@ -58,7 +58,7 @@ class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
IWD.copy_to_hotspot('hessid.conf')
- conf = '[General]\ndisable_anqp=1\n'
+ conf = '[General]\nDisableANQP=1\n'
os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod
diff --git a/autotests/testHotspot/hotspot_test.py b/autotests/testHotspot/hotspot_test.py
@@ -58,7 +58,7 @@ class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
IWD.copy_to_hotspot('example.conf')
- conf = '[General]\ndisable_anqp=0\n'
+ conf = '[General]\nDisableANQP=0\n'
os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod
diff --git a/autotests/testHotspot/roaming_test.py b/autotests/testHotspot/roaming_test.py
@@ -58,7 +58,7 @@ class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
IWD.copy_to_hotspot('roaming.conf')
- conf = '[General]\ndisable_anqp=1\n'
+ conf = '[General]\nDisableANQP=1\n'
os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod
diff --git a/autotests/testKnownNetworks/frequency_test.py b/autotests/testKnownNetworks/frequency_test.py
@@ -134,7 +134,7 @@ class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
IWD.copy_to_hotspot('example.conf')
- conf = '[General]\ndisable_anqp=0\n'
+ conf = '[General]\nDisableANQP=0\n'
os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod
diff --git a/doc/hotspot.txt b/doc/hotspot.txt
@@ -43,4 +43,4 @@ IWD which allows the user to disable ANQP. As a result, this will also disable
any hotspot 2.0 network connections unless the HESSID is provided in the
configuration file. By default ANQP will be disabled. It can be enabled with:
-disable_anqp=0
+DisableANQP=0
diff --git a/src/station.c b/src/station.c
@@ -57,6 +57,7 @@
static struct l_queue *station_list;
static uint32_t netdev_watch;
static uint32_t mfp_setting;
+static bool anqp_disabled;
struct station {
enum station_state state;
@@ -507,7 +508,6 @@ static bool station_start_anqp(struct station *station, struct network *network,
uint8_t anqp[256];
uint8_t *ptr = anqp;
struct anqp_entry *entry;
- bool anqp_disabled = true;
if (!bss->hs20_capable)
return false;
@@ -516,9 +516,6 @@ static bool station_start_anqp(struct station *station, struct network *network,
if (network_get_info(network))
return false;
- l_settings_get_bool(iwd_get_config(), "General", "disable_anqp",
- &anqp_disabled);
-
if (anqp_disabled) {
l_debug("Not querying AP for ANQP data (disabled)");
return false;
@@ -3192,6 +3189,10 @@ static int station_init(void)
mfp_setting = 1;
}
+ if (!l_settings_get_bool(iwd_get_config(), "General", "DisableANQP",
+ &anqp_disabled))
+ anqp_disabled = true;
+
return true;
}
diff --git a/src/wiphy.c b/src/wiphy.c
@@ -931,7 +931,7 @@ static void wiphy_set_station_capability_bits(struct wiphy *wiphy)
ext_capa = wiphy->iftype_extended_capabilities[NL80211_IFTYPE_STATION];
- if (!l_settings_get_bool(iwd_get_config(), "General", "disable_anqp",
+ if (!l_settings_get_bool(iwd_get_config(), "General", "DisableANQP",
&anqp_disabled))
anqp_disabled = true;