Wired
Gunter Burchardt
gbur
Mon Jun 7 00:33:23 PDT 2004
> This is otherwise ok, but I would try to avoid derefering hapd pointer
> within the driver handler functions to make it somewhat more modular. In
> other words, the registered driver functions would take an additional
> argument, e.g., void *priv, and if not needed, hapd pointer could be
> removed completely from most if not all calls. That DRIVER_DATA macro
> could then be replaced by the handler function doing
>
> struct hostap_driver_data *drv = priv;
>
> Actually, the hapd pointer could be removed from all calls and if it is
> needed somewhere until a cleaner solution is ready, the private driver
> data structure could include hapd pointer from the hostapd_driver_init()
> (or matching) function.
>
> > Each driver can store driver specific data in this pointer. Its the
> > first step to enable hostapd to use other drivers. But I'm not happy
> > about the typecast. Do you have a better idea?
>
> This seems to be the best way to do it and I'm ok with it.
Ok, sounds good. I will do it in this way. Next patch later this day.
Will try to move all wlan-hostap-driver specific stuff to driver.c . It
driver.c grows to much i will make a new file.
regards
gunter
More information about the Hostap
mailing list