]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: Disallow setting of HT for channel 14
authorMasashi Honma <masashi.honma@gmail.com>
Mon, 21 Oct 2019 07:50:45 +0000 (16:50 +0900)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 30 Oct 2019 09:07:22 +0000 (10:07 +0100)
commit24a68d5e433ecde74e29500c6d6e9a508961fb6d
tree745bafb2a61d280f07c43b8b0643fc07488dd628
parent629bd790bccf615ac401eb8f60dbad876a8a2c44
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: Masashi 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: Johannes Berg <johannes.berg@intel.com>
net/wireless/chan.c
net/wireless/util.c