aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/nl80211.h10
-rw-r--r--include/net/cfg80211.h6
-rw-r--r--net/wireless/nl80211.c28
3 files changed, 44 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 97bfebfcce9..1fc04853ec9 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -538,6 +538,9 @@
538 * OLBC handling in hostapd. Beacons are reported in %NL80211_CMD_FRAME 538 * OLBC handling in hostapd. Beacons are reported in %NL80211_CMD_FRAME
539 * messages. Note that per PHY only one application may register. 539 * messages. Note that per PHY only one application may register.
540 * 540 *
541 * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether
542 * No Acknowledgement Policy should be applied.
543 *
541 * @NL80211_CMD_MAX: highest used command number 544 * @NL80211_CMD_MAX: highest used command number
542 * @__NL80211_CMD_AFTER_LAST: internal use 545 * @__NL80211_CMD_AFTER_LAST: internal use
543 */ 546 */
@@ -675,6 +678,8 @@ enum nl80211_commands {
675 678
676 NL80211_CMD_UNEXPECTED_4ADDR_FRAME, 679 NL80211_CMD_UNEXPECTED_4ADDR_FRAME,
677 680
681 NL80211_CMD_SET_NOACK_MAP,
682
678 /* add new commands above here */ 683 /* add new commands above here */
679 684
680 /* used to define NL80211_CMD_MAX below */ 685 /* used to define NL80211_CMD_MAX below */
@@ -1185,6 +1190,9 @@ enum nl80211_commands {
1185 * abides to when initiating radiation on DFS channels. A country maps 1190 * abides to when initiating radiation on DFS channels. A country maps
1186 * to one DFS region. 1191 * to one DFS region.
1187 * 1192 *
1193 * @NL80211_ATTR_NOACK_MAP: This u16 bitmap contains the No Ack Policy of
1194 * up to 16 TIDs.
1195 *
1188 * @NL80211_ATTR_MAX: highest attribute number currently defined 1196 * @NL80211_ATTR_MAX: highest attribute number currently defined
1189 * @__NL80211_ATTR_AFTER_LAST: internal use 1197 * @__NL80211_ATTR_AFTER_LAST: internal use
1190 */ 1198 */
@@ -1428,6 +1436,8 @@ enum nl80211_attrs {
1428 NL80211_ATTR_DISABLE_HT, 1436 NL80211_ATTR_DISABLE_HT,
1429 NL80211_ATTR_HT_CAPABILITY_MASK, 1437 NL80211_ATTR_HT_CAPABILITY_MASK,
1430 1438
1439 NL80211_ATTR_NOACK_MAP,
1440
1431 /* add attributes here, update the policy in nl80211.c */ 1441 /* add attributes here, update the policy in nl80211.c */
1432 1442
1433 __NL80211_ATTR_AFTER_LAST, 1443 __NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d5e18913f29..38ce452da20 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1465,6 +1465,8 @@ struct cfg80211_gtk_rekey_data {
1465 * 1465 *
1466 * @probe_client: probe an associated client, must return a cookie that it 1466 * @probe_client: probe an associated client, must return a cookie that it
1467 * later passes to cfg80211_probe_status(). 1467 * later passes to cfg80211_probe_status().
1468 *
1469 * @set_noack_map: Set the NoAck Map for the TIDs.
1468 */ 1470 */
1469struct cfg80211_ops { 1471struct cfg80211_ops {
1470 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); 1472 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -1658,6 +1660,10 @@ struct cfg80211_ops {
1658 int (*probe_client)(struct wiphy *wiphy, struct net_device *dev, 1660 int (*probe_client)(struct wiphy *wiphy, struct net_device *dev,
1659 const u8 *peer, u64 *cookie); 1661 const u8 *peer, u64 *cookie);
1660 1662
1663 int (*set_noack_map)(struct wiphy *wiphy,
1664 struct net_device *dev,
1665 u16 noack_map);
1666
1661 struct ieee80211_channel *(*get_channel)(struct wiphy *wiphy); 1667 struct ieee80211_channel *(*get_channel)(struct wiphy *wiphy);
1662}; 1668};
1663 1669
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index a1cabde7cb5..6026c29c338 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -204,6 +204,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
204 [NL80211_ATTR_HT_CAPABILITY_MASK] = { 204 [NL80211_ATTR_HT_CAPABILITY_MASK] = {
205 .len = NL80211_HT_CAPABILITY_LEN 205 .len = NL80211_HT_CAPABILITY_LEN
206 }, 206 },
207 [NL80211_ATTR_NOACK_MAP] = { .type = NLA_U16 },
207}; 208};
208 209
209/* policy for the key attributes */ 210/* policy for the key attributes */
@@ -904,6 +905,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
904 if (dev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) 905 if (dev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN)
905 CMD(sched_scan_start, START_SCHED_SCAN); 906 CMD(sched_scan_start, START_SCHED_SCAN);
906 CMD(probe_client, PROBE_CLIENT); 907 CMD(probe_client, PROBE_CLIENT);
908 CMD(set_noack_map, SET_NOACK_MAP);
907 if (dev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS) { 909 if (dev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS) {
908 i++; 910 i++;
909 NLA_PUT_U32(msg, i, NL80211_CMD_REGISTER_BEACONS); 911 NLA_PUT_U32(msg, i, NL80211_CMD_REGISTER_BEACONS);
@@ -1759,6 +1761,23 @@ static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info)
1759 return rdev->ops->del_virtual_intf(&rdev->wiphy, dev); 1761 return rdev->ops->del_virtual_intf(&rdev->wiphy, dev);
1760} 1762}
1761 1763
1764static int nl80211_set_noack_map(struct sk_buff *skb, struct genl_info *info)
1765{
1766 struct cfg80211_registered_device *rdev = info->user_ptr[0];
1767 struct net_device *dev = info->user_ptr[1];
1768 u16 noack_map;
1769
1770 if (!info->attrs[NL80211_ATTR_NOACK_MAP])
1771 return -EINVAL;
1772
1773 if (!rdev->ops->set_noack_map)
1774 return -EOPNOTSUPP;
1775
1776 noack_map = nla_get_u16(info->attrs[NL80211_ATTR_NOACK_MAP]);
1777
1778 return rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map);
1779}
1780
1762struct get_key_cookie { 1781struct get_key_cookie {
1763 struct sk_buff *msg; 1782 struct sk_buff *msg;
1764 int error; 1783 int error;
@@ -6604,6 +6623,15 @@ static struct genl_ops nl80211_ops[] = {
6604 .internal_flags = NL80211_FLAG_NEED_WIPHY | 6623 .internal_flags = NL80211_FLAG_NEED_WIPHY |
6605 NL80211_FLAG_NEED_RTNL, 6624 NL80211_FLAG_NEED_RTNL,
6606 }, 6625 },
6626 {
6627 .cmd = NL80211_CMD_SET_NOACK_MAP,
6628 .doit = nl80211_set_noack_map,
6629 .policy = nl80211_policy,
6630 .flags = GENL_ADMIN_PERM,
6631 .internal_flags = NL80211_FLAG_NEED_NETDEV |
6632 NL80211_FLAG_NEED_RTNL,
6633 },
6634
6607}; 6635};
6608 6636
6609static struct genl_multicast_group nl80211_mlme_mcgrp = { 6637static struct genl_multicast_group nl80211_mlme_mcgrp = {