This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / net / sctp / socket.c
index d9967aa..8408c17 100644 (file)
@@ -1063,7 +1063,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
        struct sctp_sndrcvinfo default_sinfo = { 0 };
        struct sctp_sndrcvinfo *sinfo;
        struct sctp_initmsg *sinit;
-       sctp_assoc_t associd = 0;
+       sctp_assoc_t associd = NULL;
        sctp_cmsgs_t cmsgs = { NULL };
        int err;
        sctp_scope_t scope;
@@ -2120,20 +2120,6 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva
        return err;
 }
 
-static int sctp_setsockopt_adaption_layer(struct sock *sk, char __user *optval,
-                                         int optlen)
-{
-       __u32 val;
-
-       if (optlen < sizeof(__u32))
-               return -EINVAL;
-       if (copy_from_user(&val, optval, sizeof(__u32)))
-               return -EFAULT;
-
-       sctp_sk(sk)->adaption_ind = val;
-
-       return 0;
-}
 
 /* API 6.2 setsockopt(), getsockopt()
  *
@@ -2233,10 +2219,6 @@ SCTP_STATIC int sctp_setsockopt(struct sock *sk, int level, int optname,
        case SCTP_MAXSEG:
                retval = sctp_setsockopt_maxseg(sk, optval, optlen);
                break;
-       case SCTP_ADAPTION_LAYER:
-               retval = sctp_setsockopt_adaption_layer(sk, optval, optlen);
-               break;
-
        default:
                retval = -ENOPROTOOPT;
                break;
@@ -2536,8 +2518,6 @@ SCTP_STATIC int sctp_init_sock(struct sock *sk)
        /* User specified fragmentation limit. */
        sp->user_frag         = 0;
 
-       sp->adaption_ind = 0;
-
        sp->pf = sctp_get_pf_specific(sk->sk_family);
 
        /* Control variables for partial data delivery. */
@@ -2669,7 +2649,7 @@ static int sctp_getsockopt_sctp_status(struct sock *sk, int len,
                goto out;
        }
 
-       SCTP_DEBUG_PRINTK("sctp_getsockopt_sctp_status(%d): %d %d %d\n",
+       SCTP_DEBUG_PRINTK("sctp_getsockopt_sctp_status(%d): %d %d %p\n",
                          len, status.sstat_state, status.sstat_rwnd,
                          status.sstat_assoc_id);
 
@@ -3179,29 +3159,6 @@ static int sctp_getsockopt_primary_addr(struct sock *sk, int len,
        return 0;
 }
 
-/*
- * 7.1.11  Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER)
- *
- * Requests that the local endpoint set the specified Adaption Layer
- * Indication parameter for all future INIT and INIT-ACK exchanges.
- */
-static int sctp_getsockopt_adaption_layer(struct sock *sk, int len,
-                                 char __user *optval, int __user *optlen)
-{
-       __u32 val;
-
-       if (len < sizeof(__u32))
-               return -EINVAL;
-
-       len = sizeof(__u32);
-       val = sctp_sk(sk)->adaption_ind;
-       if (put_user(len, optlen))
-               return -EFAULT;
-       if (copy_to_user(optval, &val, len))
-               return -EFAULT;
-       return 0;
-}
-
 /*
  *
  * 7.1.14 Set default send parameters (SCTP_DEFAULT_SEND_PARAM)
@@ -3558,10 +3515,6 @@ SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname,
                retval = sctp_getsockopt_peer_addr_info(sk, len, optval,
                                                        optlen);
                break;
-       case SCTP_ADAPTION_LAYER:
-               retval = sctp_getsockopt_adaption_layer(sk, len, optval,
-                                                       optlen);
-               break;
        default:
                retval = -ENOPROTOOPT;
                break;
@@ -4594,7 +4547,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
         * delivery.   Three cases:
         * 1) No partial deliver;  no work.
         * 2) Peeling off partial delivery; keep pd_lobby in new pd_lobby.
-        * 3) Peeling off non-partial delivery; move pd_lobby to receive_queue.
+        * 3) Peeling off non-partial delivery; move pd_lobby to recieve_queue.
         */
        skb_queue_head_init(&newsp->pd_lobby);
        sctp_sk(newsk)->pd_mode = assoc->ulpq.pd_mode;
@@ -4648,7 +4601,6 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
 /* This proto struct describes the ULP interface for SCTP.  */
 struct proto sctp_prot = {
        .name        =  "SCTP",
-       .owner       =  THIS_MODULE,
        .close       =  sctp_close,
        .connect     =  sctp_connect,
        .disconnect  =  sctp_disconnect,
@@ -4672,7 +4624,6 @@ struct proto sctp_prot = {
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 struct proto sctpv6_prot = {
        .name           = "SCTPv6",
-       .owner          = THIS_MODULE,
        .close          = sctp_close,
        .connect        = sctp_connect,
        .disconnect     = sctp_disconnect,