commit e795d092507d571d66f2ec98d3efdc7dd284bf80
Author: Tom Tucker <tom@opengridcomputing.com>
Date:   Sun Jul 30 20:44:19 2006 -0700

    [NET] infiniband: Cleanup ib_addr module to use the netevents

    Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff -r a461c2aafb49 drivers/infiniband/core/addr.c
--- a/drivers/infiniband/core/addr.c	Thu Jan 25 14:55:48 2007 -0800
+++ b/drivers/infiniband/core/addr.c	Thu Jan 25 14:58:03 2007 -0800
@@ -35,7 +35,6 @@
 #include <net/arp.h>
 #include <net/neighbour.h>
 #include <net/route.h>
-#include <net/netevent.h>
 #include <rdma/ib_addr.h>
 
 MODULE_AUTHOR("Sean Hefty");
@@ -354,22 +353,25 @@ void rdma_addr_cancel(struct rdma_dev_ad
 }
 EXPORT_SYMBOL(rdma_addr_cancel);
 
-static int netevent_callback(struct notifier_block *self, unsigned long event,
-	void *ctx)
-{
-	if (event == NETEVENT_NEIGH_UPDATE) {
-		struct neighbour *neigh = ctx;
-
-		if (neigh->dev->type == ARPHRD_INFINIBAND &&
-		    (neigh->nud_state & NUD_VALID)) {
-			set_timeout(jiffies);
-		}
-	}
+static int addr_arp_recv(struct sk_buff *skb, struct net_device *dev,
+			 struct packet_type *pkt, struct net_device *orig_dev)
+{
+	struct arphdr *arp_hdr;
+
+	arp_hdr = (struct arphdr *) skb->nh.raw;
+
+	if (arp_hdr->ar_op == htons(ARPOP_REQUEST) ||
+	    arp_hdr->ar_op == htons(ARPOP_REPLY))
+		set_timeout(jiffies);
+
+	kfree_skb(skb);
 	return 0;
 }
 
-static struct notifier_block nb = {
-	.notifier_call = netevent_callback
+static struct packet_type addr_arp = {
+	.type           = __constant_htons(ETH_P_ARP),
+	.func           = addr_arp_recv,
+	.af_packet_priv = (void*) 1,
 };
 
 static int addr_init(void)
@@ -378,13 +380,13 @@ static int addr_init(void)
 	if (!addr_wq)
 		return -ENOMEM;
 
-	register_netevent_notifier(&nb);
+	dev_add_pack(&addr_arp);
 	return 0;
 }
 
 static void addr_cleanup(void)
 {
-	unregister_netevent_notifier(&nb);
+	dev_remove_pack(&addr_arp);
 	destroy_workqueue(addr_wq);
 }
 
