On 02/24/2012 01:25 PM, Johannes Berg wrote:
On Fri, 2012-02-24 at 10:55 +0530, Mahesh wrote:
Agree. we will work towards updating regulatory database with 80Mhz
bandwidth in 5Gig band. I had modified code to check maximum bandwidth
as well. Please find the updated change below.
- if (freq_range->max_bandwidth_khz< MHZ_TO_KHZ(40))
- bw_flags = IEEE80211_CHAN_NO_HT40;
+ if (freq_range->max_bandwidth_khz< MHZ_TO_KHZ(40)) {
+ bw_flags = IEEE80211_CHAN_NO_HT40 | IEEE80211_CHAN_NO_VHT80;
+ } else if (freq_range->max_bandwidth_khz< MHZ_TO_KHZ(80)) {
+ bw_flags = IEEE80211_CHAN_NO_VHT80;
+ }
no braces needed
Also this will always be true now, so the patch isn't very useful right
now?
True. But once reg database reflects 80MHz BW, we need it. Anyways its
part of new feature. Not a bug fix.
- if (freq_range->max_bandwidth_khz< MHZ_TO_KHZ(40))
- bw_flags = IEEE80211_CHAN_NO_HT40;
+ if (freq_range->max_bandwidth_khz< MHZ_TO_KHZ(40)) {
+ bw_flags = IEEE80211_CHAN_NO_HT40 | IEEE80211_CHAN_NO_VHT80;
+ } else if (freq_range->max_bandwidth_khz< MHZ_TO_KHZ(80)) {
+ bw_flags = IEEE80211_CHAN_NO_VHT80;
+ }
Seems some refactoring could be useful since this is duplicated?
May be a macro?
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html