wpa_supplicant: Add support for 60 GHz band channels 5 and 6

The previous support in the 60 GHz band was for channels 1-4.
Add support for channels 5 and 6.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
This commit is contained in:
Alexei Avshalom Lazar 2019-08-08 14:21:37 +03:00 committed by Jouni Malinen
parent 018edec9b2
commit dc6c3be4e2
3 changed files with 12 additions and 12 deletions

View file

@ -871,8 +871,8 @@ enum hostapd_hw_mode ieee80211_freq_to_channel_ext(unsigned int freq,
return HOSTAPD_MODE_IEEE80211A;
}
/* 56.16 GHz, channel 1..4 */
if (freq >= 56160 + 2160 * 1 && freq <= 56160 + 2160 * 4) {
/* 56.16 GHz, channel 1..6 */
if (freq >= 56160 + 2160 * 1 && freq <= 56160 + 2160 * 6) {
if (sec_channel || vht)
return NUM_HOSTAPD_MODES;
@ -991,8 +991,8 @@ static int ieee80211_chan_to_freq_us(u8 op_class, u8 chan)
if (chan < 149 || chan > 165)
return -1;
return 5000 + 5 * chan;
case 34: /* 60 GHz band, channels 1..3 */
if (chan < 1 || chan > 3)
case 34: /* 60 GHz band, channels 1..6 */
if (chan < 1 || chan > 6)
return -1;
return 56160 + 2160 * chan;
}
@ -1029,8 +1029,8 @@ static int ieee80211_chan_to_freq_eu(u8 op_class, u8 chan)
if (chan < 149 || chan > 169)
return -1;
return 5000 + 5 * chan;
case 18: /* 60 GHz band, channels 1..4 */
if (chan < 1 || chan > 4)
case 18: /* 60 GHz band, channels 1..6 */
if (chan < 1 || chan > 6)
return -1;
return 56160 + 2160 * chan;
}
@ -1073,8 +1073,8 @@ static int ieee80211_chan_to_freq_jp(u8 op_class, u8 chan)
if (chan < 100 || chan > 140)
return -1;
return 5000 + 5 * chan;
case 59: /* 60 GHz band, channels 1..4 */
if (chan < 1 || chan > 3)
case 59: /* 60 GHz band, channels 1..6 */
if (chan < 1 || chan > 6)
return -1;
return 56160 + 2160 * chan;
}
@ -1161,8 +1161,8 @@ static int ieee80211_chan_to_freq_global(u8 op_class, u8 chan)
if (chan < 36 || chan > 128)
return -1;
return 5000 + 5 * chan;
case 180: /* 60 GHz band, channels 1..4 */
if (chan < 1 || chan > 4)
case 180: /* 60 GHz band, channels 1..6 */
if (chan < 1 || chan > 6)
return -1;
return 56160 + 2160 * chan;
}

View file

@ -2479,7 +2479,7 @@ static const struct parse_data ssid_fields[] = {
#endif /* CONFIG_OCV */
{ FUNC(peerkey) /* obsolete - removed */ },
{ INT_RANGE(mixed_cell, 0, 1) },
{ INT_RANGE(frequency, 0, 65000) },
{ INT_RANGE(frequency, 0, 70200) },
{ INT_RANGE(fixed_freq, 0, 1) },
#ifdef CONFIG_ACS
{ INT_RANGE(acs, 0, 1) },

View file

@ -2689,7 +2689,7 @@ static int wpas_wps_nfc_rx_handover_sel(struct wpa_supplicant *wpa_s,
(attr.rf_bands == NULL ||
*attr.rf_bands & WPS_RF_50GHZ))
freq = 5000 + 5 * chan;
else if (chan >= 1 && chan <= 4 &&
else if (chan >= 1 && chan <= 6 &&
(attr.rf_bands == NULL ||
*attr.rf_bands & WPS_RF_60GHZ))
freq = 56160 + 2160 * chan;