aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-06-19 12:55:06 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-06-19 12:55:12 -0400
commitf93beba705842af466e7c916b39630cacb40e9c6 (patch)
tree0f296f0b1e419eb4fc242e188376a4fdd80085fa /net/wireless
parent52874a5e3917dde3b081521b014d6e4b226aacff (diff)
parent3a5a423bb958ad22eeccca66c533e85bf69ba10e (diff)
Merge remote-tracking branch 'mac80211/master' into HEAD
Merge mac80211 to avoid conflicts with the nl80211 attrbuf changes. Conflicts: net/mac80211/iface.c net/wireless/nl80211.c Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4ab1ffa9df11..f8ffb9a59c83 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1527,12 +1527,17 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
1527 struct cfg80211_registered_device *dev; 1527 struct cfg80211_registered_device *dev;
1528 s64 filter_wiphy = -1; 1528 s64 filter_wiphy = -1;
1529 bool split = false; 1529 bool split = false;
1530 struct nlattr **tb = nl80211_fam.attrbuf; 1530 struct nlattr **tb;
1531 int res; 1531 int res;
1532 1532
1533 /* will be zeroed in nlmsg_parse() */
1534 tb = kmalloc(sizeof(*tb) * (NL80211_ATTR_MAX + 1), GFP_KERNEL);
1535 if (!tb)
1536 return -ENOMEM;
1537
1533 rtnl_lock(); 1538 rtnl_lock();
1534 res = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize, 1539 res = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
1535 tb, nl80211_fam.maxattr, nl80211_policy); 1540 tb, NL80211_ATTR_MAX, nl80211_policy);
1536 if (res == 0) { 1541 if (res == 0) {
1537 split = tb[NL80211_ATTR_SPLIT_WIPHY_DUMP]; 1542 split = tb[NL80211_ATTR_SPLIT_WIPHY_DUMP];
1538 if (tb[NL80211_ATTR_WIPHY]) 1543 if (tb[NL80211_ATTR_WIPHY])
@@ -1546,6 +1551,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
1546 netdev = dev_get_by_index(sock_net(skb->sk), ifidx); 1551 netdev = dev_get_by_index(sock_net(skb->sk), ifidx);
1547 if (!netdev) { 1552 if (!netdev) {
1548 rtnl_unlock(); 1553 rtnl_unlock();
1554 kfree(tb);
1549 return -ENODEV; 1555 return -ENODEV;
1550 } 1556 }
1551 if (netdev->ieee80211_ptr) { 1557 if (netdev->ieee80211_ptr) {
@@ -1556,6 +1562,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
1556 dev_put(netdev); 1562 dev_put(netdev);
1557 } 1563 }
1558 } 1564 }
1565 kfree(tb);
1559 1566
1560 list_for_each_entry(dev, &cfg80211_rdev_list, list) { 1567 list_for_each_entry(dev, &cfg80211_rdev_list, list) {
1561 if (!net_eq(wiphy_net(&dev->wiphy), sock_net(skb->sk))) 1568 if (!net_eq(wiphy_net(&dev->wiphy), sock_net(skb->sk)))