aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154/nl-phy.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-19 18:50:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-19 18:50:47 -0500
commit1ee2dcc2245340cf4ac94b99c4d00efbeba61824 (patch)
tree5339e55add987379525177011dde6e3756b1430c /net/ieee802154/nl-phy.c
parent4457e6f6c9f6052cd5f44a79037108b5ddeb0ce7 (diff)
parent091e0662ee2c37867ad918ce7b6ddd17f0e090e2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Mostly these are fixes for fallout due to merge window changes, as well as cures for problems that have been with us for a much longer period of time" 1) Johannes Berg noticed two major deficiencies in our genetlink registration. Some genetlink protocols we passing in constant counts for their ops array rather than something like ARRAY_SIZE(ops) or similar. Also, some genetlink protocols were using fixed IDs for their multicast groups. We have to retain these fixed IDs to keep existing userland tools working, but reserve them so that other multicast groups used by other protocols can not possibly conflict. In dealing with these two problems, we actually now use less state management for genetlink operations and multicast groups. 2) When configuring interface hardware timestamping, fix several drivers that simply do not validate that the hwtstamp_config value is one the driver actually supports. From Ben Hutchings. 3) Invalid memory references in mwifiex driver, from Amitkumar Karwar. 4) In dev_forward_skb(), set the skb->protocol in the right order relative to skb_scrub_packet(). From Alexei Starovoitov. 5) Bridge erroneously fails to use the proper wrapper functions to make calls to netdev_ops->ndo_vlan_rx_{add,kill}_vid. Fix from Toshiaki Makita. 6) When detaching a bridge port, make sure to flush all VLAN IDs to prevent them from leaking, also from Toshiaki Makita. 7) Put in a compromise for TCP Small Queues so that deep queued devices that delay TX reclaim non-trivially don't have such a performance decrease. One particularly problematic area is 802.11 AMPDU in wireless. From Eric Dumazet. 8) Fix crashes in tcp_fastopen_cache_get(), we can see NULL socket dsts here. Fix from Eric Dumzaet, reported by Dave Jones. 9) Fix use after free in ipv6 SIT driver, from Willem de Bruijn. 10) When computing mergeable buffer sizes, virtio-net fails to take the virtio-net header into account. From Michael Dalton. 11) Fix seqlock deadlock in ip4_datagram_connect() wrt. statistic bumping, this one has been with us for a while. From Eric Dumazet. 12) Fix NULL deref in the new TIPC fragmentation handling, from Erik Hugne. 13) 6lowpan bit used for traffic classification was wrong, from Jukka Rissanen. 14) macvlan has the same issue as normal vlans did wrt. propagating LRO disabling down to the real device, fix it the same way. From Michal Kubecek. 15) CPSW driver needs to soft reset all slaves during suspend, from Daniel Mack. 16) Fix small frame pacing in FQ packet scheduler, from Eric Dumazet. 17) The xen-netfront RX buffer refill timer isn't properly scheduled on partial RX allocation success, from Ma JieYue. 18) When ipv6 ping protocol support was added, the AF_INET6 protocol initialization cleanup path on failure was borked a little. Fix from Vlad Yasevich. 19) If a socket disconnects during a read/recvmsg/recvfrom/etc that blocks we can do the wrong thing with the msg_name we write back to userspace. From Hannes Frederic Sowa. There is another fix in the works from Hannes which will prevent future problems of this nature. 20) Fix route leak in VTI tunnel transmit, from Fan Du. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (106 commits) genetlink: make multicast groups const, prevent abuse genetlink: pass family to functions using groups genetlink: add and use genl_set_err() genetlink: remove family pointer from genl_multicast_group genetlink: remove genl_unregister_mc_group() hsr: don't call genl_unregister_mc_group() quota/genetlink: use proper genetlink multicast APIs drop_monitor/genetlink: use proper genetlink multicast APIs genetlink: only pass array to genl_register_family_with_ops() tcp: don't update snd_nxt, when a socket is switched from repair mode atm: idt77252: fix dev refcnt leak xfrm: Release dst if this dst is improper for vti tunnel netlink: fix documentation typo in netlink_set_err() be2net: Delete secondary unicast MAC addresses during be_close be2net: Fix unconditional enabling of Rx interface options net, virtio_net: replace the magic value ping: prevent NULL pointer dereference on write to msg_name bnx2x: Prevent "timeout waiting for state X" bnx2x: prevent CFC attention bnx2x: Prevent panic during DMAE timeout ...
Diffstat (limited to 'net/ieee802154/nl-phy.c')
-rw-r--r--net/ieee802154/nl-phy.c37
1 files changed, 4 insertions, 33 deletions
diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c
index 22b1a7058fd3..d08c7a43dcd1 100644
--- a/net/ieee802154/nl-phy.c
+++ b/net/ieee802154/nl-phy.c
@@ -77,8 +77,7 @@ out:
77 return -EMSGSIZE; 77 return -EMSGSIZE;
78} 78}
79 79
80static int ieee802154_list_phy(struct sk_buff *skb, 80int ieee802154_list_phy(struct sk_buff *skb, struct genl_info *info)
81 struct genl_info *info)
82{ 81{
83 /* Request for interface name, index, type, IEEE address, 82 /* Request for interface name, index, type, IEEE address,
84 PAN Id, short address */ 83 PAN Id, short address */
@@ -151,8 +150,7 @@ static int ieee802154_dump_phy_iter(struct wpan_phy *phy, void *_data)
151 return 0; 150 return 0;
152} 151}
153 152
154static int ieee802154_dump_phy(struct sk_buff *skb, 153int ieee802154_dump_phy(struct sk_buff *skb, struct netlink_callback *cb)
155 struct netlink_callback *cb)
156{ 154{
157 struct dump_phy_data data = { 155 struct dump_phy_data data = {
158 .cb = cb, 156 .cb = cb,
@@ -170,8 +168,7 @@ static int ieee802154_dump_phy(struct sk_buff *skb,
170 return skb->len; 168 return skb->len;
171} 169}
172 170
173static int ieee802154_add_iface(struct sk_buff *skb, 171int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
174 struct genl_info *info)
175{ 172{
176 struct sk_buff *msg; 173 struct sk_buff *msg;
177 struct wpan_phy *phy; 174 struct wpan_phy *phy;
@@ -273,8 +270,7 @@ out_dev:
273 return rc; 270 return rc;
274} 271}
275 272
276static int ieee802154_del_iface(struct sk_buff *skb, 273int ieee802154_del_iface(struct sk_buff *skb, struct genl_info *info)
277 struct genl_info *info)
278{ 274{
279 struct sk_buff *msg; 275 struct sk_buff *msg;
280 struct wpan_phy *phy; 276 struct wpan_phy *phy;
@@ -356,28 +352,3 @@ out_dev:
356 352
357 return rc; 353 return rc;
358} 354}
359
360static struct genl_ops ieee802154_phy_ops[] = {
361 IEEE802154_DUMP(IEEE802154_LIST_PHY, ieee802154_list_phy,
362 ieee802154_dump_phy),
363 IEEE802154_OP(IEEE802154_ADD_IFACE, ieee802154_add_iface),
364 IEEE802154_OP(IEEE802154_DEL_IFACE, ieee802154_del_iface),
365};
366
367/*
368 * No need to unregister as family unregistration will do it.
369 */
370int nl802154_phy_register(void)
371{
372 int i;
373 int rc;
374
375 for (i = 0; i < ARRAY_SIZE(ieee802154_phy_ops); i++) {
376 rc = genl_register_ops(&nl802154_family,
377 &ieee802154_phy_ops[i]);
378 if (rc)
379 return rc;
380 }
381
382 return 0;
383}