3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +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:
Andrew Zaborowski 2022-08-29 19:35:56 +02:00 committed by Denis Kenzior
parent 98ba09562e
commit a8b1139dcb

View File

@ -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");