09 Feb, 2011

1 commit

  • rtnl_link_ops->setup(), and the "setup" callback passed to alloc_netdev*(),
    cannot make state changes which need to be undone on failure. There is
    no cleanup mechanism available at this point.

    So we have to add the caif private instance to the global list once we
    are sure that register_netdev() has succedded in ->newlink().

    Otherwise, if register_netdev() fails, the caller will invoke free_netdev()
    and we will have a reference to freed up memory on the chnl_net_list.

    Signed-off-by: David S. Miller

    David S. Miller
     

16 Jan, 2011

1 commit

  • In the original code we check if (servl == NULL) twice. The first time
    should print the message that cfmuxl_remove_uplayer() failed and set
    "ret" correctly, but instead it just returns success. The second check
    should be checking the value of "ret" instead of "servl".

    Signed-off-by: Dan Carpenter
    Acked-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Dan Carpenter
     

11 Jan, 2011

2 commits


23 Nov, 2010

1 commit

  • Changed Makefile to use -y instead of -objs
    because -objs is deprecated and not mentioned in
    Documentation/kbuild/makefiles.txt.

    Also, use the ccflags-$ flag instead of EXTRA_CFLAGS because EXTRA_CFLAGS is
    deprecated and should now be switched.

    Last but not least, took out if-conditionals.

    Signed-off-by: Tracey Dent
    Signed-off-by: David S. Miller

    Tracey Dent
     

04 Nov, 2010

2 commits


07 Oct, 2010

1 commit


06 Oct, 2010

1 commit

  • caif_connect() might dereference a netdevice after dev_put() it.

    It also doesnt check dev_get_by_index() return value and could
    dereference a NULL pointer.

    Fix it, using RCU to avoid taking a reference.

    Signed-off-by: Eric Dumazet
    CC: Sjur Braendeland
    Signed-off-by: David S. Miller

    Eric Dumazet
     

05 Oct, 2010

1 commit


22 Sep, 2010

4 commits


10 Sep, 2010

1 commit


07 Sep, 2010

2 commits

  • Convert pr_("%s" ..., (struct netdev *)->name ...)
    to netdev_((struct netdev *), ...)

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

    Joe Perches
     
  • This patch standardizes caif message logging prefixes.

    Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
    Add missing "\n"s to some logging messages
    Convert pr_warning to pr_warn

    This changes the logging message prefix from CAIF: to caif:
    for all uses but caif_socket.c and chnl_net.c. Those now use
    their filename without extension.

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

    Joe Perches
     

27 Aug, 2010

1 commit

  • caif does not build on ia64 starting with 2.6.32-rc1. Using
    asm/unaligned.h instead of linux/unaligned/le_byteshift.h fixes the issue.

    include/linux/unaligned/le_byteshift.h:40:50: error: redefinition of 'get_unaligned_le16'
    include/linux/unaligned/le_byteshift.h:45:50: error: redefinition of 'get_unaligned_le32'
    include/linux/unaligned/le_byteshift.h:50:50: error: redefinition of 'get_unaligned_le64'
    include/linux/unaligned/le_byteshift.h:55:51: error: redefinition of 'put_unaligned_le16'
    include/linux/unaligned/le_byteshift.h:60:51: error: redefinition of 'put_unaligned_le32'
    include/linux/unaligned/le_byteshift.h:65:51: error: redefinition of 'put_unaligned_le64'
    include/linux/unaligned/le_struct.h:31:51: note: previous definition of 'put_unaligned_le64' was here

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jeff Mahoney
     

11 Aug, 2010

1 commit


23 Jul, 2010

1 commit

  • Negate has precedence over comparison so the original assert only
    checked that "rfml->fragment_size" was larger than 1 or 0.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     

29 Jun, 2010

1 commit


21 Jun, 2010

4 commits

  • Added new CAIF protocol type CAIFPROTO_DEBUG for accessing
    CAIF debug on the ST Ericsson modems.

    There are two debug servers on the modem, one for radio related
    debug (CAIF_RADIO_DEBUG_SERVICE) and the other for
    communication/application related debug (CAIF_COM_DEBUG_SERVICE).

    The debug connection can contain trace debug printouts or
    interactive debug used for debugging and test.

    Debug connections can be of type STREAM or SEQPACKET.

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

    Sjur Braendeland
     
  • Previously CAIF supported maximum transfer size of ~4050.
    The transfer size is now calculated dynamically based on the
    link layers mtu size.

    Signed-off-by: Sjur Braendeland@stericsson.com
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • CAIF Remote File Manager may send or receive more than 4050 bytes.
    Due to this The CAIF RFM service have to support segmentation.

    Signed-off-by: Sjur Braendeland@stericsson.com
    Signed-off-by: David S. Miller

    Sjur Braendeland
     
  • Flow control is not used by all CAIF services.
    The usage of flow control is now part of the gerneal
    initialization function for CAIF Services.

    Signed-off-by: Sjur Braendeland@stericsson.com
    Signed-off-by: David S. Miller

    Sjur Braendeland
     

12 Jun, 2010

1 commit


10 Jun, 2010

1 commit


31 May, 2010

2 commits

  • "phyinfo" can never be null here because we assigned it an address, so I
    removed both the assert and the second check inside the if statement. I
    removed the "phyinfo->phy_layer != NULL" check as well because that was
    asserted earlier.

    Walter Harms suggested I move the "phyinfo->phy_ref_count++;" outside
    the if condition for readability, so I have done that.

    Signed-off-by: Dan Carpenter
    Acked-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • We already dereferenced uaddr towards the start of the function when we
    checked that "uaddr->sa_family != AF_CAIF". Both the check here and the
    earlier check were added in bece7b2398d0: "caif: Rewritten socket
    implementation". Before that patch, we assumed that we recieved a valid
    pointer for uaddr, and based on that, I have removed this check.

    Signed-off-by: Dan Carpenter
    Acked-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Dan Carpenter
     

29 May, 2010

1 commit


24 May, 2010

7 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

1 commit