01 Dec, 2011

1 commit


04 Oct, 2011

1 commit

  • The allocation of "phyinfo" wasn't checked, and also the allocation
    wasn't freed on error paths. Sjur Brændeland pointed out as well
    that "phy_driver" should be freed on the error path too.

    Signed-off-by: Dan Carpenter
    Acked-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Dan Carpenter
     

29 Aug, 2011

1 commit

  • Remove per site OOM messages because they duplicate
    the generic mm subsystem OOM message.

    Use kzalloc instead of kmalloc/memset
    when next to the OOM message removals.

    Reduces object size (allyesconfig ~2%)

    $ size -t drivers/net/caif/built-in.o.old net/caif/built-in.o.old
    text data bss dec hex filename
    32297 700 8224 41221 a105 drivers/net/caif/built-in.o.old
    72159 1317 20552 94028 16f4c net/caif/built-in.o.old
    104456 2017 28776 135249 21051 (TOTALS)
    $ size -t drivers/net/caif/built-in.o.new net/caif/built-in.o.new
    text data bss dec hex filename
    31975 700 8184 40859 9f9b drivers/net/caif/built-in.o.new
    70748 1317 20152 92217 16839 net/caif/built-in.o.new
    102723 2017 28336 133076 207d4 (TOTALS)

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

    Joe Perches
     

23 May, 2011

1 commit

  • CAIF Socket layer - caif_socket.c:
    - Plug mem-leak at reconnect.
    - Always call disconnect to cleanup CAIF stack.
    - Disconnect will always report success.

    CAIF configuration layer - cfcnfg.c
    - Disconnect must dismantle the caif stack correctly
    - Protect against faulty removals (check on id zero)

    CAIF mux layer - cfmuxl.c
    - When inserting new service layer in the MUX remove
    any old entries with the same ID.
    - When removing CAIF Link layer, remove the associated
    service layers before notifying service layers.

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

    sjur.brandeland@stericsson.com
     

16 May, 2011

5 commits


12 Apr, 2011

1 commit

  • Cleanup of new CAIF code.
    * make local functions static
    * remove code that is never used
    * expand get_caif_conf() since wrapper is no longer needed
    * make args to comparison functions const
    * rename connect_req_to_link_param to keep exported names
    consistent

    Compile tested only.

    Signed-off-by: Stephen Hemminger
    Acked-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

20 Jan, 2011

1 commit

  • Clean up some unused macros in net/*.
    1. be left for code change. e.g. PGV_FROM_VMALLOC, PGV_FROM_VMALLOC, KMEM_SAFETYZONE.
    2. never be used since introduced to kernel.
    e.g. P9_RDMA_MAX_SGE, UTIL_CTRL_PKT_SIZE.

    Signed-off-by: Shan Wei
    Acked-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Shan Wei
     

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
     

04 Nov, 2010

1 commit

  • Changes:
    o Bugfix: SO_PRIORITY for SOL_SOCKET could not be handled
    in caif's setsockopt, using the struct sock attribute priority instead.

    o Bugfix: SO_BINDTODEVICE for SOL_SOCKET could not be handled
    in caif's setsockopt, using the struct sock attribute ifindex instead.

    o Wrong assert statement for RFM layer segmentation.

    o CAIF Debug channels was not working over SPI, caif_payload_info
    containing padding info must be initialized.

    o Check on pointer before dereferencing when unregister dev in caif_dev.c

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

    André Carvalho de Matos
     

22 Sep, 2010

1 commit


07 Sep, 2010

1 commit

  • 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
     

21 Jun, 2010

2 commits


31 May, 2010

1 commit

  • "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
     

18 May, 2010

1 commit

  • 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

3 commits

  • 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
     

01 Apr, 2010

1 commit


31 Mar, 2010

1 commit