hostapd: fix ap/sta regression which got accidentally introduced by r32829 (#11914)