mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
netconfig: Store pointer to netdev instead of ifindex
To avoid repeated lookups by ifindex, replace the ifindex member in struct netconfig with a struct netdev pointer. A struct netconfig always lives shorter than the struct netdev.
This commit is contained in:
parent
98ba09562e
commit
a8b1139dcb
@ -54,7 +54,7 @@
|
||||
|
||||
struct netconfig {
|
||||
struct l_netconfig *nc;
|
||||
uint32_t ifindex;
|
||||
struct netdev *netdev;
|
||||
|
||||
char *mdns;
|
||||
struct ie_fils_ip_addr_response_info *fils_override;
|
||||
@ -581,7 +581,7 @@ struct netconfig *netconfig_new(uint32_t ifindex)
|
||||
|
||||
netconfig = l_new(struct netconfig, 1);
|
||||
netconfig->nc = l_netconfig_new(ifindex);
|
||||
netconfig->ifindex = ifindex;
|
||||
netconfig->netdev = netdev;
|
||||
netconfig->resolve = resolve_new(ifindex);
|
||||
|
||||
debug_level = getenv("IWD_DHCP_DEBUG");
|
||||
|
Loading…
Reference in New Issue
Block a user