> -----Original Message----- > From: Arend Van Spriel [mailto:arend.vanspriel@xxxxxxxxxxxx] > Sent: Thursday, June 20, 2019 11:59 > To: Otcheretianski, Andrei <andrei.otcheretianski@xxxxxxxxx>; > hostap@xxxxxxxxxxxxxxxxxxx > Subject: Re: [PATCH 1/6] AP: Add initial support for 6GHz band > > On 6/19/2019 2:49 PM, Andrei Otcheretianski wrote: > > Add support for new hardware mode for 6GHz band. 6GHz operation is > > defined in "Draft IEEE P802.11ax/D4.1". > > 6GHz band adds 131-135 operating classes that define channels in > > frequency range from 5940MHz to 7105MHz. > > Hi Andrei, > > A few remarks below. Thanks for your review :) > > Regards, > Arend > > > + if (mode == HOSTAPD_MODE_IEEE80211AX) { > > + if (!data->he_enabled) { > > + wpa_printf(MSG_ERROR, > > + "Can't set 6GHz mode - HE isn't enabled"); > > + return -1; > > + } > > + > > + if (center_idx_to_width_6ghz(channel) != 0) { > > Should the condition be '< 0' instead here? > No, because the control channel should be 20mhz valid one. > > + wpa_printf(MSG_ERROR, > > + "Invalid control channel for 6Ghz band"); > > + return -1; > > + } > > + > > + if (!center_segment0) { > > + if (center_segment1) { > > + wpa_printf(MSG_ERROR, > > + "Center0 freq isn't set"); > > + return -1; > > + } > > + > > + data->center_freq1 = data->freq; > > + data->bandwidth = 20; > > + } else { > > + int freq1, freq2 = 0; > > + int bw = center_idx_to_width_6ghz(center_segment0); > > + > > + if (bw < 0 ) { > > + wpa_printf(MSG_ERROR, > > + "Invalid center channel idx for 6GHz"); > > + return -1; > > + } > > + > > + freq1 = ieee80211_chan_to_freq(NULL, 131, > > + center_segment0); > > + if (freq1 < 0) { > > + wpa_printf(MSG_ERROR, > > + "Invalid center0 freq. for 6GHz"); > > + return -1; > > + } > > + > > + if (center_segment1) { > > + if > (center_idx_to_width_6ghz(center_segment1) != 2 || > > + bw != 2) { > > A nit really but you could check for 'bw != 2' first. Right > > > + wpa_printf(MSG_ERROR, > > + "6GHz 80+80 configuration > doesn't use valid 80MHz channels"); > > + return -1; > > + } > > [snip] > > > diff --git a/src/common/ieee802_11_common.c > > b/src/common/ieee802_11_common.c index a081f87cc2..8096e17409 100644 > > --- a/src/common/ieee802_11_common.c > > +++ b/src/common/ieee802_11_common.c > > [snip] > > > @@ -1161,6 +1175,14 @@ static int ieee80211_chan_to_freq_global(u8 > op_class, u8 chan) > > if (chan < 36 || chan > 128) > > return -1; > > return 5000 + 5 * chan; > > + case 131: /* UHB channels, 20 mhz: 1, 5, 9.. */ > > + case 132: /* UHB channels, 40 mhz: 3, 11, 19.. */ > > + case 133: /* UHB channels, 80 mhz: 7, 23, 39.. */ > > + case 134: /* UHB channels, 160 mhz: 15, 47, 79.. */ > > + case 135: /* UHB channels, 80+80 mhz: 7, 23, 39.. */ > > + if (chan < 1 || chan > 233) > > The spec mentions range 1..253. Where is 233 coming from? 233 is the highest channel mentioned in Annex E in op. classes 131-135 > > > + return -1; > > + return 5940 + chan * 5; > > case 180: /* 60 GHz band, channels 1..4 */ > > if (chan < 1 || chan > 4) > > return -1; _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap