mirror of https://gitee.com/openkylin/linux.git
Just three fixes:
* fix HT operation in mesh mode * disable preemption in control frame TX * check nla_parse_nested() return values where missing (two places) -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEH1e1rEeCd0AIMq6MB8qZga/fl8QFAls15CcACgkQB8qZga/f l8RUkw/+IQjrtvjKN0Y5rdEy8lgvmd16/umIp6XQ+uBDi3sOrcQRy6G0hwMHg+4F HZ7UbsazCVDwhwtTL/BPTJLWBJRDM9hTIppw6A4yQy7b9dp7EJVfgk4FxC2nsD1z rTzNdTDtrXsLleBOjPxPV0/q6uw4B6fjXhJZvvtPXZUhaB3Uf1gEKrDTMDqHbh5K GbPI1DU6k5M0A8co9wwrEyPGBlq0DRd8amftMWzIP0EOZSCK2BD3zIscZkRCT7dG +Jd2SFhuvhKvFEHuoQPMxAzotsDpIP7q2ejOSSSs3bHaindTWVmzi7XZgIQ3rT/O P8pBV9G4LLaquLNSvM+ihGUxGJXUrYFdsuchvnVr/tYYf3ozGh24XcodVihg47RC T7r0y07Ai4wuxI0aYoP26L5pANl4AEsyooKe5lOArUpHDGDWC9c9LiZAveg0d7vJ 5UtWc+Zlf5n93mHd9/52ktCRo7jqEYFMEU5phwrCKn+YJV6u73BggHp79aAidi9I WMOHiLyiOsSfq8PmqASpV2/mz6oStCG188tto6o5CmeMVk6F1EbiMThajdikoNoM 6K5kGHXYi/wGz4wsohUqWG2KQEM6+pxZeF2GFktGCuKsx7BDfR9V7K2Oub+3VD9Y LZXWHYRRq0YDUzXOEaUz1292QE8OAbYyWnNAZTfc8B7whrA5wRA= =g4XY -----END PGP SIGNATURE----- Merge tag 'mac80211-for-davem-2018-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just three fixes: * fix HT operation in mesh mode * disable preemption in control frame TX * check nla_parse_nested() return values where missing (two places) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
0933cc294f
|
@ -4845,7 +4845,9 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
|
|||
skb_reset_network_header(skb);
|
||||
skb_reset_mac_header(skb);
|
||||
|
||||
local_bh_disable();
|
||||
__ieee80211_subif_start_xmit(skb, skb->dev, flags);
|
||||
local_bh_enable();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -6231,7 +6231,7 @@ do { \
|
|||
nl80211_check_s32);
|
||||
/*
|
||||
* Check HT operation mode based on
|
||||
* IEEE 802.11 2012 8.4.2.59 HT Operation element.
|
||||
* IEEE 802.11-2016 9.4.2.57 HT Operation element.
|
||||
*/
|
||||
if (tb[NL80211_MESHCONF_HT_OPMODE]) {
|
||||
ht_opmode = nla_get_u16(tb[NL80211_MESHCONF_HT_OPMODE]);
|
||||
|
@ -6241,22 +6241,9 @@ do { \
|
|||
IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT))
|
||||
return -EINVAL;
|
||||
|
||||
if ((ht_opmode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT) &&
|
||||
(ht_opmode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT))
|
||||
return -EINVAL;
|
||||
/* NON_HT_STA bit is reserved, but some programs set it */
|
||||
ht_opmode &= ~IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT;
|
||||
|
||||
switch (ht_opmode & IEEE80211_HT_OP_MODE_PROTECTION) {
|
||||
case IEEE80211_HT_OP_MODE_PROTECTION_NONE:
|
||||
case IEEE80211_HT_OP_MODE_PROTECTION_20MHZ:
|
||||
if (ht_opmode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER:
|
||||
case IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED:
|
||||
if (!(ht_opmode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT))
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
cfg->ht_opmode = ht_opmode;
|
||||
mask |= (1 << (NL80211_MESHCONF_HT_OPMODE - 1));
|
||||
}
|
||||
|
@ -10962,9 +10949,12 @@ static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info)
|
|||
rem) {
|
||||
u8 *mask_pat;
|
||||
|
||||
nla_parse_nested(pat_tb, MAX_NL80211_PKTPAT, pat,
|
||||
nl80211_packet_pattern_policy,
|
||||
info->extack);
|
||||
err = nla_parse_nested(pat_tb, MAX_NL80211_PKTPAT, pat,
|
||||
nl80211_packet_pattern_policy,
|
||||
info->extack);
|
||||
if (err)
|
||||
goto error;
|
||||
|
||||
err = -EINVAL;
|
||||
if (!pat_tb[NL80211_PKTPAT_MASK] ||
|
||||
!pat_tb[NL80211_PKTPAT_PATTERN])
|
||||
|
@ -11213,8 +11203,11 @@ static int nl80211_parse_coalesce_rule(struct cfg80211_registered_device *rdev,
|
|||
rem) {
|
||||
u8 *mask_pat;
|
||||
|
||||
nla_parse_nested(pat_tb, MAX_NL80211_PKTPAT, pat,
|
||||
nl80211_packet_pattern_policy, NULL);
|
||||
err = nla_parse_nested(pat_tb, MAX_NL80211_PKTPAT, pat,
|
||||
nl80211_packet_pattern_policy, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (!pat_tb[NL80211_PKTPAT_MASK] ||
|
||||
!pat_tb[NL80211_PKTPAT_PATTERN])
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue