driver.h contains the definitions needed in driver wrapper implementations (driver_*.c) and driver_i.h contains the definitions that are used in core hostapd code to interact with the driver wrappers.
compat-wireless does not include linux/compiler.h to define __user, so define it in hostapd code before including linux/wireless.h.