24 May, 2010

6 commits


18 May, 2010

2 commits

  • This patch removes from net/ (but not any netfilter files)
    all the unnecessary return; statements that precede the
    last closing brace of void functions.

    It does not remove the returns that are immediately
    preceded by a label as gcc doesn't like that.

    Done via:
    $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
    xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Use kzalloc rather than the combination of kmalloc and memset.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression x,size,flags;
    statement S;
    @@

    -x = kmalloc(size,flags);
    +x = kzalloc(size,flags);
    if (x == NULL) S
    -memset(x, 0, size);
    //

    Signed-off-by: Julia Lawall
    Acked-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Julia Lawall
     

29 Apr, 2010

6 commits

  • Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Changes:
    o Bugfix: Flow control was causing the device to be destroyed.
    o Bugfix: Handle CAIF channel connect failures.
    o If the underlying link layer is gone the net-device is no longer removed,
    but closed.

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Changes:
    This is a complete re-write of the socket layer. Making the socket
    implementation more aligned with the other socket layers and using more
    of the support functions available in sock.c. Lots of code is copied
    from af_unix (and some from af_irda).
    Non-blocking mode should be working as well.

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Changes:
    o Function cfcnfg_disconn_adapt_layer is changed to do asynchronous
    disconnect, not waiting for any response from the modem. Due to this
    the function cfcnfg_linkdestroy_rsp does nothing anymore.
    o Because disconnect may take down a connection before a connect response
    is received the function cfcnfg_linkup_rsp is checking if the client is
    still waiting for the response, if not a disconnect request is sent to
    the modem.
    o cfctrl is no longer keeping track of pending disconnect requests.
    o Added function cfctrl_cancel_req, which is used for deleting a pending
    connect request if disconnect is done before connect response is received.
    o Removed unused function cfctrl_insert_req2
    o Added better handling of connect reject from modem.

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Changes:
    o Added functions cfsrvl_get and cfsrvl_put.
    o Added support release_client to use by socket and net device.
    o Increase reference counting for in-flight packets from cfmuxl

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Changes:
    o Renamed cfcnfg_del_adapt_layer to cfcnfg_disconn_adapt_layer
    o Fixed typo cfcfg to cfcnfg
    o Renamed linkid to channel_id
    o Updated documentation in caif_dev.h
    o Minor formatting changes

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     

27 Apr, 2010

1 commit


21 Apr, 2010

1 commit

  • Define a new function to return the waitqueue of a "struct sock".

    static inline wait_queue_head_t *sk_sleep(struct sock *sk)
    {
    return sk->sk_sleep;
    }

    Change all read occurrences of sk_sleep by a call to this function.

    Needed for a future RCU conversion. sk_sleep wont be a field directly
    available.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

01 Apr, 2010

1 commit


31 Mar, 2010

6 commits

  • Kconfig and Makefiles with options for:
    CAIF: Including caif
    CAIF_DEBUG: CAIF Debug
    CAIF_NETDEV: CAIF Network Device for GPRS Contexts

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Adding GPRS Net Device for PDP Contexts.
    The device can be managed by RTNL as defined in if_caif.h.

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Implementation of CAIF sockets for protocol and address family
    PF_CAIF and AF_CAIF.
    CAIF socket is connection oriented implementing SOCK_SEQPACKET
    and SOCK_STREAM interface with supporting blocking and non-blocking mode.

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Registration and deregistration of CAIF Link Layer.

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Support functions for the caif protocol stack:
    cfcnfg.c - CAIF Configuration Module used for
    adding and removing drivers and connection
    cfpkt_skbuff.c - CAIF Packet layer (SKB helper functions)

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • CAIF generic protocol implementation. This layer is
    somewhat generic in order to be able to use and test it outside
    the Linux Kernel.

    cfctrl.c - CAIF control protocol layer
    cfdbgl.c - CAIF debug protocol layer
    cfdgml.c - CAIF datagram protocol layer
    cffrml.c - CAIF framing protocol layer
    cfmuxl.c - CAIF mux protocol layer
    cfrfml.c - CAIF remote file manager protocol layer
    cfserl.c - CAIF serial (fragmentation) protocol layer
    cfsrvl.c - CAIF generic service layer functions
    cfutill.c - CAIF utility protocol layer
    cfveil.c - CAIF AT protocol layer
    cfvidl.c - CAIF video protocol layer

    Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Sjur Braendeland