Do not try to store survey information in the unusual event that the
channels survey_list is not initialized. That should not usually happen,
but could, e.g., be the case if the regulatory changes and new channels
are added after the ACS scan was started.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
continue;
if (chan->flag & HOSTAPD_CHAN_DISABLED)
continue;
+ if (!(chan->flag & HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED))
+ continue;
dl_list_del(&survey->list);
dl_list_add_tail(&chan->survey_list, &survey->list);