summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-10-31 14:43:36 -0400
committerDavid S. Miller <davem@davemloft.net>2019-10-31 14:43:36 -0400
commit5a7ec66782fc2d952b355696114104cc828d6440 (patch)
tree1868456d5494bc18c3afd7e55a1122150c55ac06 /net
parent3da09663209d6732c74cb7b6d5890b8dea9cf6f3 (diff)
parent1fab1b89e2e8f01204a9c05a39fd0b6411a48593 (diff)
Merge tag 'mac80211-for-net-2019-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says: ==================== Just two fixes: * HT operation is not allowed on channel 14 (Japan only) * netlink policy for nexthop attribute was wrong ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/chan.c5
-rw-r--r--net/wireless/nl80211.c2
-rw-r--r--net/wireless/util.c3
3 files changed, 8 insertions, 2 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index e851cafd8e2f..fcac5c6366e1 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -204,6 +204,11 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef)
204 return false; 204 return false;
205 } 205 }
206 206
207 /* channel 14 is only for IEEE 802.11b */
208 if (chandef->center_freq1 == 2484 &&
209 chandef->width != NL80211_CHAN_WIDTH_20_NOHT)
210 return false;
211
207 if (cfg80211_chandef_is_edmg(chandef) && 212 if (cfg80211_chandef_is_edmg(chandef) &&
208 !cfg80211_edmg_chandef_valid(chandef)) 213 !cfg80211_edmg_chandef_valid(chandef))
209 return false; 214 return false;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4453dd375de9..7b72286922f7 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -393,7 +393,7 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
393 [NL80211_ATTR_MNTR_FLAGS] = { /* NLA_NESTED can't be empty */ }, 393 [NL80211_ATTR_MNTR_FLAGS] = { /* NLA_NESTED can't be empty */ },
394 [NL80211_ATTR_MESH_ID] = { .type = NLA_BINARY, 394 [NL80211_ATTR_MESH_ID] = { .type = NLA_BINARY,
395 .len = IEEE80211_MAX_MESH_ID_LEN }, 395 .len = IEEE80211_MAX_MESH_ID_LEN },
396 [NL80211_ATTR_MPATH_NEXT_HOP] = { .type = NLA_U32 }, 396 [NL80211_ATTR_MPATH_NEXT_HOP] = NLA_POLICY_ETH_ADDR_COMPAT,
397 397
398 [NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 }, 398 [NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 },
399 [NL80211_ATTR_REG_RULES] = { .type = NLA_NESTED }, 399 [NL80211_ATTR_REG_RULES] = { .type = NLA_NESTED },
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 419eb12c1e93..5b4ed5bbc542 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1559,7 +1559,8 @@ bool ieee80211_chandef_to_operating_class(struct cfg80211_chan_def *chandef,
1559 } 1559 }
1560 1560
1561 if (freq == 2484) { 1561 if (freq == 2484) {
1562 if (chandef->width > NL80211_CHAN_WIDTH_40) 1562 /* channel 14 is only for IEEE 802.11b */
1563 if (chandef->width != NL80211_CHAN_WIDTH_20_NOHT)
1563 return false; 1564 return false;
1564 1565
1565 *op_class = 82; /* channel 14 */ 1566 *op_class = 82; /* channel 14 */