mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-05-06 09:27:25 +02:00
wiphy: Remove unneeded nesting
This commit is contained in:
parent
0303a095aa
commit
1894b75a18
13
src/wiphy.c
13
src/wiphy.c
@ -669,6 +669,7 @@ static void parse_bss(struct netdev *netdev, struct l_genl_attr *attr)
|
|||||||
struct network *network = NULL;
|
struct network *network = NULL;
|
||||||
struct ie_rsn_info rsne = { 0 };
|
struct ie_rsn_info rsne = { 0 };
|
||||||
enum scan_ssid_security ssid_security;
|
enum scan_ssid_security ssid_security;
|
||||||
|
const char *id;
|
||||||
|
|
||||||
bss = l_new(struct bss, 1);
|
bss = l_new(struct bss, 1);
|
||||||
|
|
||||||
@ -720,11 +721,9 @@ static void parse_bss(struct netdev *netdev, struct l_genl_attr *attr)
|
|||||||
if (!ssid) {
|
if (!ssid) {
|
||||||
l_warn("Received BSS but SSID IE returned NULL -- ignoring");
|
l_warn("Received BSS but SSID IE returned NULL -- ignoring");
|
||||||
goto fail;
|
goto fail;
|
||||||
} else {
|
}
|
||||||
const char *id;
|
|
||||||
|
|
||||||
ssid_security = scan_get_ssid_security(bss->capability, &rsne);
|
ssid_security = scan_get_ssid_security(bss->capability, &rsne);
|
||||||
|
|
||||||
id = iwd_network_get_id(ssid, ssid_len, ssid_security);
|
id = iwd_network_get_id(ssid, ssid_len, ssid_security);
|
||||||
|
|
||||||
network = l_hashmap_lookup(netdev->networks, id);
|
network = l_hashmap_lookup(netdev->networks, id);
|
||||||
@ -739,7 +738,6 @@ static void parse_bss(struct netdev *netdev, struct l_genl_attr *attr)
|
|||||||
network->ssid_len = ssid_len;
|
network->ssid_len = ssid_len;
|
||||||
network->ssid_security = ssid_security;
|
network->ssid_security = ssid_security;
|
||||||
network->bss_list = l_queue_new();
|
network->bss_list = l_queue_new();
|
||||||
|
|
||||||
l_hashmap_insert(netdev->networks, id, network);
|
l_hashmap_insert(netdev->networks, id, network);
|
||||||
|
|
||||||
if (!l_dbus_register_interface(dbus_get_bus(),
|
if (!l_dbus_register_interface(dbus_get_bus(),
|
||||||
@ -765,12 +763,9 @@ static void parse_bss(struct netdev *netdev, struct l_genl_attr *attr)
|
|||||||
new_bss = l_memdup(bss, sizeof(*bss));
|
new_bss = l_memdup(bss, sizeof(*bss));
|
||||||
new_bss->network = network;
|
new_bss->network = network;
|
||||||
|
|
||||||
l_queue_insert(network->bss_list, new_bss,
|
l_queue_insert(network->bss_list, new_bss, add_bss, NULL);
|
||||||
add_bss, NULL);
|
|
||||||
} else {
|
} else {
|
||||||
l_debug("Found existing BSS '%s'",
|
l_debug("Found existing BSS '%s'", bss_address_to_string(bss));
|
||||||
bss_address_to_string(bss));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
l_queue_push_head(netdev->bss_list, bss);
|
l_queue_push_head(netdev->bss_list, bss);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user