nl80211: fix interface address assignment

When a new interface is created and already has a separate MAC address
assigned by the kernel, then we need to use that address, not just when
we've created a locally administered address.

This fixes use_p2p_group_interface=1 for iwlagn as it already makes
mac80211 assign an address for a second interface since the hardware has
two addresses assigned.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2011-07-15 12:05:19 +03:00 committed by Jouni Malinen
parent b14a210ce2
commit f67eeb5c32

View file

@ -6005,8 +6005,8 @@ static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
nl80211_remove_iface(drv, ifidx); nl80211_remove_iface(drv, ifidx);
return -1; return -1;
} }
os_memcpy(if_addr, new_addr, ETH_ALEN);
} }
os_memcpy(if_addr, new_addr, ETH_ALEN);
} }
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */