Merge tag 'mac80211-for-davem-2015-01-23' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Another set of last-minute fixes: * fix station double-removal when suspending while associating * fix the HT (802.11n) header length calculation * fix the CCK radiotap flag used for monitoring, a pretty old regression but a simple one-liner * fix per-station group-key handling Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -2854,6 +2854,9 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
|
||||
if (!rdev->ops->get_key)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!pairwise && mac_addr && !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN))
|
||||
return -ENOENT;
|
||||
|
||||
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
|
||||
if (!msg)
|
||||
return -ENOMEM;
|
||||
@@ -2873,10 +2876,6 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
|
||||
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr))
|
||||
goto nla_put_failure;
|
||||
|
||||
if (pairwise && mac_addr &&
|
||||
!(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN))
|
||||
return -ENOENT;
|
||||
|
||||
err = rdev_get_key(rdev, dev, key_idx, pairwise, mac_addr, &cookie,
|
||||
get_key_callback);
|
||||
|
||||
@@ -3047,7 +3046,7 @@ static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info)
|
||||
wdev_lock(dev->ieee80211_ptr);
|
||||
err = nl80211_key_allowed(dev->ieee80211_ptr);
|
||||
|
||||
if (key.type == NL80211_KEYTYPE_PAIRWISE && mac_addr &&
|
||||
if (key.type == NL80211_KEYTYPE_GROUP && mac_addr &&
|
||||
!(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN))
|
||||
err = -ENOENT;
|
||||
|
||||
|
@@ -308,6 +308,12 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ieee80211_is_mgmt(fc)) {
|
||||
if (ieee80211_has_order(fc))
|
||||
hdrlen += IEEE80211_HT_CTL_LEN;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ieee80211_is_ctl(fc)) {
|
||||
/*
|
||||
* ACK and CTS are 10 bytes, all others 16. To see how
|
||||
|
Reference in New Issue
Block a user