/** * reload_hw_mode_done - Callback for after the HW mode is setup * @hapd_iface: Pointer to interface data. * @status: Status of the HW mode setup. */ static void reload_hw_mode_done(struct hostapd_iface *hapd_iface, int status) { struct hostapd_data *hapd = hapd_iface->bss[0]; struct hostapd_config_change *change = hapd_iface->change; struct hostapd_config *newconf = change->newconf; hostapd_iface_cb cb; int freq; if (status) { printf("Failed to select hw_mode.\n"); cb = hapd_iface->reload_iface_cb; hapd_iface->reload_iface_cb = NULL; cb(hapd_iface, -1); return; } freq = hostapd_hw_get_freq(hapd, newconf->channel); HOSTAPD_DEBUG(HOSTAPD_DEBUG_MINIMAL, "Mode: %s Channel: %d Frequency: %d MHz\n", hostapd_hw_mode_txt(newconf->hw_mode), newconf->channel, freq); if (hostapd_set_freq(hapd, newconf->hw_mode, freq)) { printf("Could not set channel %d (%d MHz) for kernel " "driver\n", newconf->channel, freq); } change->beacon_changed++; reload_iface2(hapd_iface); }
/** * reload_hw_mode_done - Callback for after the HW mode is setup * @wasd_iface: Pointer to interface data. * @status: Status of the HW mode setup. */ static void reload_hw_mode_done(struct asd_iface *wasd_iface, int status) { struct asd_data *wasd = wasd_iface->bss[0]; struct asd_config_change *change = wasd_iface->change; struct asd_config *newconf = change->newconf; asd_iface_cb cb; int freq; if (status) { asd_printf(ASD_DEFAULT,MSG_DEBUG,"Failed to select hw_mode.\n"); cb = wasd_iface->reload_iface_cb; wasd_iface->reload_iface_cb = NULL; cb(wasd_iface, -1); return; } freq = asd_hw_get_freq(wasd, newconf->channel); asd_printf(ASD_DEFAULT,MSG_DEBUG, "Mode: %s Channel: %d Frequency: %d MHz", asd_hw_mode_txt(newconf->hw_mode), newconf->channel, freq); if (asd_set_freq(wasd, newconf->hw_mode, freq)) { asd_printf(ASD_DEFAULT,MSG_DEBUG,"Could not set channel %d (%d MHz) for kernel " "driver\n", newconf->channel, freq); } change->beacon_changed++; reload_iface2(wasd_iface); }
/** * reload_iface2_handler - Handler that calls reload_face2 * @eloop_data: Stores the struct hostapd_iface for the interface. * @user_ctx: Unused. */ static void reload_iface2_handler(void *eloop_data, void *user_ctx) { struct hostapd_iface *hapd_iface = eloop_data; reload_iface2(hapd_iface); }
/** * reload_iface2_handler - Handler that calls reload_face2 * @circle_data: Stores the struct asd_iface for the interface. * @user_ctx: Unused. */ static void reload_iface2_handler(void *circle_data, void *user_ctx) { struct asd_iface *wasd_iface = circle_data; reload_iface2(wasd_iface); }