Lines Matching full:channel
75 /* dfs_channel_available: select new channel according to type parameter */
80 /* Select only radar channel where CAC has not been
93 * channel for CSA, unless they are available for immediate use.
113 * The tables contain first valid channel number based on channel width.
114 * We will also choose this first channel as the control one.
188 /* hostapd DFS implementation assumes the first channel as primary.
189 * If it's not allowed to use the first channel as primary, decline the
190 * whole channel range. */
192 wpa_printf(MSG_DEBUG, "DFS: primary channel not allowed");
200 wpa_printf(MSG_DEBUG, "DFS: no channel data for %d",
205 /* HT 40 MHz secondary channel availability checked only for
206 * primary channel */
214 wpa_printf(MSG_DEBUG, "DFS: channel not available %d",
262 "DFS: channel %d (%d) is incompatible",
277 "DFS: channel %d (%d) not in chanlist",
290 wpa_printf(MSG_DEBUG, "Selected channel %d (%d)",
295 wpa_printf(MSG_DEBUG, "Adding channel %d (%d)",
340 "DFS: Unsupported channel width configuration");
351 /* Return start channel idx we will use for mode->channels[idx] */
356 int channel_no = iface->conf->channel;
428 mode->num_channels, channel_no, iface->conf->channel,
434 wpa_printf(MSG_DEBUG, "Available channel: %d",
443 /* At least one channel have radar flag */
447 struct hostapd_channel_data *channel;
456 channel = &mode->channels[start_chan_idx + i];
457 if (channel->flag & HOSTAPD_CHAN_RADAR)
469 struct hostapd_channel_data *channel;
476 channel = &mode->channels[start_chan_idx + i];
478 if (channel->flag & HOSTAPD_CHAN_DISABLED)
481 if (!(channel->flag & HOSTAPD_CHAN_RADAR))
484 if ((channel->flag & HOSTAPD_CHAN_DFS_MASK) !=
493 /* At least one channel unavailable */
498 struct hostapd_channel_data *channel;
505 channel = &mode->channels[start_chan_idx + i];
506 if (channel->flag & HOSTAPD_CHAN_DISABLED)
508 if ((channel->flag & HOSTAPD_CHAN_DFS_MASK) ==
533 wpa_printf(MSG_DEBUG, "DFS: Selecting random channel");
559 wpa_printf(MSG_DEBUG, "DFS: no random channel found");
562 wpa_printf(MSG_DEBUG, "DFS: got random channel %d (%d)",
571 /* Get secondary channel for HT80P80 */
598 /* Check if we got a valid secondary channel which is not
599 * adjacent to the first channel.
620 struct hostapd_channel_data *channel;
624 channel = dfs_get_valid_channel(iface, &sec, &cf1, &cf2,
627 if (!channel) {
628 wpa_printf(MSG_ERROR, "could not get valid channel");
632 iface->freq = channel->freq;
633 iface->conf->channel = channel->chan;
659 return 1; /* Channel found */
749 /* Check we are on DFS channel(s) */
802 struct hostapd_channel_data *channel;
812 channel = &mode->channels[start_chan_idx + i];
813 if (!(channel->flag & HOSTAPD_CHAN_RADAR))
815 if (channel->dfs_cac_ms > cac_time_ms)
816 cac_time_ms = channel->dfs_cac_ms;
825 * 1 - continue channel/ap setup
826 * 0 - channel/ap setup will be continued after CAC
850 /* Get start (first) channel for current configuration */
882 wpa_printf(MSG_DEBUG, "DFS %d chans unavailable - choose other channel: %s",
899 iface->conf->channel, iface->conf->secondary_channel,
906 iface, iface->conf->hw_mode, iface->freq, iface->conf->channel,
922 iface->radar_background.channel = iface->conf->channel;
932 * Let's select a random channel according to the
951 /* Get the start (first) channel for current configuration */
965 int channel, int freq,
978 wpa_printf(MSG_DEBUG, "DFS will switch to a new channel %d", channel);
980 "freq=%d chan=%d sec_chan=%d", freq, channel,
1001 freq, channel,
1035 iface->conf->channel = channel;
1049 /* Channel configuration will be updated once CSA completes and
1051 wpa_printf(MSG_DEBUG, "DFS waiting channel switch event");
1061 struct hostapd_channel_data *channel;
1066 * Allow selection of DFS channel in ETSI to comply with
1072 channel = dfs_get_valid_channel(iface, &sec, &oper_centr_freq_seg0_idx,
1075 if (!channel ||
1076 channel->chan == iface->conf->channel ||
1077 channel->chan == iface->radar_background.channel)
1078 channel = dfs_downgrade_bandwidth(iface, &sec,
1082 if (!channel ||
1084 channel->freq, channel->chan,
1093 iface->radar_background.channel = -1;
1097 iface->radar_background.channel = channel->chan;
1098 iface->radar_background.freq = channel->freq;
1105 __func__, channel->chan, channel->freq);
1113 iface->radar_background.channel != -1 &&
1123 iface->conf->channel = iface->radar_background.channel;
1135 iface, iface->conf->channel, iface->freq,
1155 * a radar was detected in this channel, interface setup
1158 * non-DFS channel
1160 * DFS channel.
1174 * channel. Perform CSA, move the main chain to the
1175 * selected channel and configure the background chain
1176 * to a new DFS channel.
1188 * Just mark the channel available when CAC completion
1193 * sure the configured channel is available because this
1238 struct hostapd_channel_data *channel;
1241 channel = dfs_get_valid_channel(iface, secondary_channel,
1245 if (channel) {
1246 wpa_printf(MSG_DEBUG, "DFS: Selected channel: %d",
1247 channel->chan);
1248 return channel;
1273 struct hostapd_channel_data *channel;
1282 channel = dfs_get_valid_channel(iface, &secondary_channel,
1287 if (!channel) {
1288 channel = dfs_downgrade_bandwidth(iface, &secondary_channel,
1292 if (!channel) {
1293 wpa_printf(MSG_ERROR, "No valid channel available");
1298 wpa_printf(MSG_DEBUG, "DFS will switch to a new channel %d",
1299 channel->chan);
1301 "freq=%d chan=%d sec_chan=%d", channel->freq,
1302 channel->chan, secondary_channel);
1304 iface->freq = channel->freq;
1305 iface->conf->channel = channel->chan;
1337 * Just select a new random channel according to the
1345 * If background radar detection is supported and the radar channel
1349 if (iface->radar_background.channel == -1)
1354 * Background channel not available yet. Perform CAC on the
1367 struct hostapd_channel_data *channel;
1387 * Allow selection of DFS channel in ETSI to comply with
1393 /* Perform channel switch/CSA */
1394 channel = dfs_get_valid_channel(iface, &secondary_channel,
1399 if (!channel) {
1401 * If there is no channel to switch immediately to, check if
1402 * there is another channel where we can switch even if it
1406 channel = dfs_downgrade_bandwidth(iface, &secondary_channel,
1410 if (!channel) {
1421 iface->freq = channel->freq;
1422 iface->conf->channel = channel->chan;
1435 return hostapd_dfs_request_channel_switch(iface, channel->chan,
1436 channel->freq,
1474 /* Radar detected while operating, switch the channel. */
1502 iface->radar_background.channel == -1) {
1521 /* Get start (first) channel for current configuration */
1548 * DFS channel. Clear it for this new CAC process. */
1576 * 2 - continue channel/AP setup for non-DFS channel
1577 * 1 - continue channel/AP setup for DFS channel
1578 * 0 - channel/AP setup will be continued after CAC
1590 * callback to continue AP/channel setup. Reset the CAC start flag and
1609 "%s: freq %d MHz does not require DFS. Continue channel/AP setup",