[PATCH] nl80211: Make nl80211_get_macaddr() reusable
Jouni Malinen
j at w1.fi
Fri Oct 2 06:46:26 PDT 2026
On Fri, Oct 02, 2026 at 12:06:49AM +0000, Arowa Suliman wrote:
> Return the MAC address in a caller provided buffer instead of writing
> it into bss->addr and declare the function in driver_nl80211.h so that
> driver extensions can use it instead of maintaining private copies.
Is there a planned patch that would use this function from outside
driver_nl80211.c? What is that "driver extensions" referring to?
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> -static int nl80211_get_macaddr(struct i802_bss *bss)
> +/*
> + * Do not pass in bss->addr for a netdev since that would prevent
> + * nl80211_refresh_mac() from reporting EVENT_INTERFACE_MAC_CHANGED.
> + */
> +int nl80211_get_macaddr(struct i802_bss *bss, u8 *addr)
What is that comment about nl80211_refresh_mac() about? That function
does not use nl80211_get_macaddr() and this patch does not seem to make
any functional change in behavior since the only caller of
nl80211_get_macaddr() is modified to use bss->addr as the addr parameter
to this function.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list