net/wireless/chan.c: prohibited_flags wrongly set
Hi Johannes,
I was debugging issue with hostapd failing on setting channel when I came across this piece of code in chan.c:545:cfg80211_chandef_usable():
if (width > 20) prohibited_flags |= IEEE80211_CHAN_NO_OFDM; /* 5 and 10 MHz are only defined for the OFDM PHY */ if (width < 20) prohibited_flags |= IEEE80211_CHAN_NO_OFDM;
I suspect the first if statement to be wrong, but what should it be?
Regards,
Arend
2014-05-01 10:26 GMT+02:00 Arend van Spriel <[email protected]>:
Quoted 5 lines
Hi Johannes,
I was debugging issue with hostapd failing on setting channel when I came across this piece of code in chan.c:545:cfg80211_chandef_usable():
Quoted 9 lines
if (width > 20) prohibited_flags |= IEEE80211_CHAN_NO_OFDM; /* 5 and 10 MHz are only defined for the OFDM PHY */ if (width < 20) prohibited_flags |= IEEE80211_CHAN_NO_OFDM;I suspect the first if statement to be wrong, but what should it be?
width > 20 - HT40, VHT80 ... - 80211n/80211ac using OFDM - so NO_OFDM
seems to be prohibited.
BR
Janusz
A message that is not in the archive (sent off-list or not yet received): CABPxzYJxWtKtJNDVcxA2tt6jFYDQvJ7hpFbwLQ4JHB0CmGihMw@mail.gmail.com
Quoted 11 lines · Krishna Chaitanya
Quoted 8 lines · Arend van Spriel
Hi Johannes,
I was debugging issue with hostapd failing on setting channel when I came across this piece of code in chan.c:545:cfg80211_chandef_usable():
if (width > 20) prohibited_flags |= IEEE80211_CHAN_NO_OFDM;
Quoted 7 lines
Quoted 5 lines
/* 5 and 10 MHz are only defined for the OFDM PHY */ if (width < 20) prohibited_flags |= IEEE80211_CHAN_NO_OFDM;I suspect the first if statement to be wrong, but what should it be?
Looks ok to me. Basically it says that only 20MHz has a possibility of both OFDM and DSSS.
Adding the list.