Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit ec649fed authored by Masashi Honma's avatar Masashi Honma Committed by Johannes Berg
Browse files

nl80211: Disallow setting of HT for channel 14


This patch disables setting of HT20 and more for channel 14 because
the channel is only for IEEE 802.11b.

The patch for net/wireless/util.c was unit-tested.

The patch for net/wireless/chan.c was tested with iw command.

Before this patch.
$ sudo iw dev <ifname> set channel 14 HT20
$

After this patch.
$ sudo iw dev <ifname> set channel 14 HT20
kernel reports: invalid channel definition
command failed: Invalid argument (-22)
$

Signed-off-by: default avatarMasashi Honma <masashi.honma@gmail.com>
Link: https://lore.kernel.org/r/20191021075045.2719-1-masashi.honma@gmail.com


[clean up the code, use != instead of equivalent >]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 6f74a55d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment