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 ie_rsn_info rsne = { 0 };
|
||||
enum scan_ssid_security ssid_security;
|
||||
const char *id;
|
||||
|
||||
bss = l_new(struct bss, 1);
|
||||
|
||||
|
@ -720,11 +721,9 @@ static void parse_bss(struct netdev *netdev, struct l_genl_attr *attr)
|
|||
if (!ssid) {
|
||||
l_warn("Received BSS but SSID IE returned NULL -- ignoring");
|
||||
goto fail;
|
||||
} else {
|
||||
const char *id;
|
||||
}
|
||||
|
||||
ssid_security = scan_get_ssid_security(bss->capability, &rsne);
|
||||
|
||||
id = iwd_network_get_id(ssid, ssid_len, ssid_security);
|
||||
|
||||
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_security = ssid_security;
|
||||
network->bss_list = l_queue_new();
|
||||
|
||||
l_hashmap_insert(netdev->networks, id, network);
|
||||
|
||||
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->network = network;
|
||||
|
||||
l_queue_insert(network->bss_list, new_bss,
|
||||
add_bss, NULL);
|
||||
l_queue_insert(network->bss_list, new_bss, add_bss, NULL);
|
||||
} else {
|
||||
l_debug("Found existing BSS '%s'",
|
||||
bss_address_to_string(bss));
|
||||
}
|
||||
l_debug("Found existing BSS '%s'", bss_address_to_string(bss));
|
||||
}
|
||||
|
||||
l_queue_push_head(netdev->bss_list, bss);
|
||||
|
|
Loading…
Reference in New Issue