瀏覽代碼

cfg80211: check no-OFDM flag for channels wider than 20 MHz

For channels wider than 20 MHz OFDM will be used, so when
checking whether or not a channel is usable, check for the
no-OFDM flag if the channel is wider than 20 MHz.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 13 年之前
父節點
當前提交
a6662dbae0
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      net/wireless/chan.c

+ 3 - 0
net/wireless/chan.c

@@ -265,6 +265,9 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
 
 	/* TODO: missing regulatory check on 80/160 bandwidth */
 
+	if (width > 20)
+		prohibited_flags |= IEEE80211_CHAN_NO_OFDM;
+
 	if (!cfg80211_secondary_chans_ok(wiphy, chandef->center_freq1,
 					 width, prohibited_flags))
 		return false;