Hello guys, I had using Luis's ACS patch for a long time, I patched this patch on the hostapd 1.0 source code, and made some fixes for it too. The fix below change a bug when we check the secondary_channel, and avoid accessing the NULL pointer.
I also attach the all in one patch based on hostapd 1.0 in this mail, you can take a try. diff --git a/acs-all-in-one-v7.patch b/acs-for-hostapd-1.0.patch index 0695b6f..33def5e 100644 --- a/acs-all-in-one-v7.patch +++ b/acs-for-hostapd-1.0.patch @@ -46,6 +46,10 @@ index 86f6811..887744b 100644 + unsigned int i; + struct hostapd_channel_data *chan; + ++ if (primary == 0) ++ channel = iface->conf->channel + ++ iface->conf->secondary_channel * 4; ++ + for (i = 0; i < iface->current_mode->num_channels; i++) { + chan = &iface->current_mode->channels[i]; + if (chan->chan == channel) { @@ -96,8 +100,6 @@ index 86f6811..887744b 100644 + +static void hostapd_notify_bad_chans(struct hostapd_iface *iface) +{ -+ iface->current_mode = NULL; -+ + hostapd_logger(iface->bss[0], NULL, + HOSTAPD_MODULE_IEEE80211, + HOSTAPD_LEVEL_WARNING, @@ -109,6 +111,8 @@ index 86f6811..887744b 100644 + hostapd_logger(iface->bss[0], NULL, HOSTAPD_MODULE_IEEE80211, + HOSTAPD_LEVEL_WARNING, + "Hardware does not support configured channel"); ++ ++ iface->current_mode = NULL; +} /** Thanks, - Felix
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel