Extract modifications to hostapd 0.8.x, adapt for 2.2