3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

treewide: Use CamelCase for disable_anqp setting

This commit is contained in:
Denis Kenzior 2019-10-24 23:18:23 -05:00
parent 27afe6c49f
commit d12ee292aa
8 changed files with 12 additions and 11 deletions

View File

@ -111,7 +111,7 @@ class Test(unittest.TestCase):
def setUpClass(cls): def setUpClass(cls):
IWD.copy_to_hotspot('autoconnect.conf') IWD.copy_to_hotspot('autoconnect.conf')
IWD.copy_to_storage('ssidWPA2-1.psk') 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) os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod @classmethod

View File

@ -58,7 +58,7 @@ class Test(unittest.TestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
IWD.copy_to_hotspot('hessid.conf') 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) os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod @classmethod

View File

@ -58,7 +58,7 @@ class Test(unittest.TestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
IWD.copy_to_hotspot('example.conf') 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) os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod @classmethod

View File

@ -58,7 +58,7 @@ class Test(unittest.TestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
IWD.copy_to_hotspot('roaming.conf') 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) os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod @classmethod

View File

@ -134,7 +134,7 @@ class Test(unittest.TestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
IWD.copy_to_hotspot('example.conf') 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) os.system('echo "%s" > /tmp/main.conf' % conf)
@classmethod @classmethod

View File

@ -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 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: configuration file. By default ANQP will be disabled. It can be enabled with:
disable_anqp=0 DisableANQP=0

View File

@ -57,6 +57,7 @@
static struct l_queue *station_list; static struct l_queue *station_list;
static uint32_t netdev_watch; static uint32_t netdev_watch;
static uint32_t mfp_setting; static uint32_t mfp_setting;
static bool anqp_disabled;
struct station { struct station {
enum station_state state; 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 anqp[256];
uint8_t *ptr = anqp; uint8_t *ptr = anqp;
struct anqp_entry *entry; struct anqp_entry *entry;
bool anqp_disabled = true;
if (!bss->hs20_capable) if (!bss->hs20_capable)
return false; return false;
@ -516,9 +516,6 @@ static bool station_start_anqp(struct station *station, struct network *network,
if (network_get_info(network)) if (network_get_info(network))
return false; return false;
l_settings_get_bool(iwd_get_config(), "General", "disable_anqp",
&anqp_disabled);
if (anqp_disabled) { if (anqp_disabled) {
l_debug("Not querying AP for ANQP data (disabled)"); l_debug("Not querying AP for ANQP data (disabled)");
return false; return false;
@ -3192,6 +3189,10 @@ static int station_init(void)
mfp_setting = 1; mfp_setting = 1;
} }
if (!l_settings_get_bool(iwd_get_config(), "General", "DisableANQP",
&anqp_disabled))
anqp_disabled = true;
return true; return true;
} }

View File

@ -931,7 +931,7 @@ static void wiphy_set_station_capability_bits(struct wiphy *wiphy)
ext_capa = wiphy->iftype_extended_capabilities[NL80211_IFTYPE_STATION]; 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))
anqp_disabled = true; anqp_disabled = true;