hostapd: fix segmentation fault on non-mac80211 drivers (#7202)