Instead of having all driver stuff collected across wpa_supplicant and hostapd, create a common snippet that they both include and that handles the build configuration.