Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-drm-fsl-dcu.git] / net / sctp / endpointola.c
index 5ffb1af336c0180321a35e5fcf8cc1ad7ed68d18..129756908da49992b5a42e07b84f7521a778e891 100644 (file)
@@ -61,7 +61,7 @@
 #include <net/sctp/sm.h>
 
 /* Forward declarations for internal helpers. */
-static void sctp_endpoint_bh_rcv(struct sctp_endpoint *ep);
+static void sctp_endpoint_bh_rcv(struct work_struct *work);
 
 /*
  * Initialize the base fields of the endpoint structure.
@@ -89,8 +89,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
        sctp_inq_init(&ep->base.inqueue);
 
        /* Set its top-half handler */
-       sctp_inq_set_th_handler(&ep->base.inqueue,
-                               (void (*)(void *))sctp_endpoint_bh_rcv, ep);
+       sctp_inq_set_th_handler(&ep->base.inqueue, sctp_endpoint_bh_rcv);
 
        /* Initialize the bind addr area */
        sctp_bind_addr_init(&ep->base.bind_addr, 0);
@@ -305,7 +304,7 @@ int sctp_endpoint_is_peeled_off(struct sctp_endpoint *ep,
        bp = &ep->base.bind_addr;
        list_for_each(pos, &bp->address_list) {
                addr = list_entry(pos, struct sctp_sockaddr_entry, list);
-               if (sctp_has_association(&addr->a_h, paddr)) {
+               if (sctp_has_association(&addr->a, paddr)) {
                        sctp_read_unlock(&ep->base.addr_lock);
                        return 1;
                }
@@ -318,8 +317,11 @@ int sctp_endpoint_is_peeled_off(struct sctp_endpoint *ep,
 /* Do delayed input processing.  This is scheduled by sctp_rcv().
  * This may be called on BH or task time.
  */
-static void sctp_endpoint_bh_rcv(struct sctp_endpoint *ep)
+static void sctp_endpoint_bh_rcv(struct work_struct *work)
 {
+       struct sctp_endpoint *ep =
+               container_of(work, struct sctp_endpoint,
+                            base.inqueue.immediate);
        struct sctp_association *asoc;
        struct sock *sk;
        struct sctp_transport *transport;
@@ -346,10 +348,8 @@ static void sctp_endpoint_bh_rcv(struct sctp_endpoint *ep)
                 * COOKIE-ECHO chunk.
                 */
                if (NULL == chunk->asoc) {
-                       union sctp_addr tmp;
-                       flip_to_n(&tmp, sctp_source(chunk));
                        asoc = sctp_endpoint_lookup_assoc(ep,
-                                                         &tmp,
+                                                         sctp_source(chunk),
                                                          &transport);
                        chunk->asoc = asoc;
                        chunk->transport = transport;