[PATCH] hostapd: Rename event handling functions in hostapd for

Jouni Malinen j at w1.fi
Sat Aug 10 00:49:10 PDT 2024


On Thu, Jun 13, 2024 at 06:32:01AM +0000, Hui Bai wrote:
> On Zephyr, both wpa_supplicant and hostapd are supported. One compilation error was found due to function name conflict.
> Both wpa_supplicant and hostapd has its own global event and event handlers with same name:
> wpa_supplicant_event
> wpa_supplicant_event_global
> 
> To fix the compilation error, rename above functions in hostapd for Zephyr as below:
> hostapd_event
> hostapd_event_global

This does not look like something that would really work at all in
hostap.git, i.e., this is based on something that has other changes and
as such, I'm not sure why this particular change should be in
hostap.git.

Those functions have the same name for a reason, i.e., those are the
functions that are called from the driver interface code for either
hostapd or wpa_supplicant. If there is need to make this work with both
hostapd and wpa_supplicant somehow linked into a single binary, the
driver wrappers would need changes. For that, the cleaner way of
updating the design would be by registering wpa_supplicant_event and
wpa_supplicant_event_global as function pointers to the driver interface
and using those function pointers instead of direct calls. That is
something that I could consider applying to hostap.git.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list