18 Oct, 2011

1 commit


22 Sep, 2011

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/Kconfig
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
    drivers/net/ethernet/broadcom/tg3.c
    drivers/net/wireless/iwlwifi/iwl-pci.c
    drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
    drivers/net/wireless/rt2x00/rt2800usb.c
    drivers/net/wireless/wl12xx/main.c

    David S. Miller
     

16 Sep, 2011

1 commit


02 Aug, 2011

1 commit

  • When assigning a NULL value to an RCU protected pointer, no barrier
    is needed. The rcu_assign_pointer, used to handle that but will soon
    change to not handle the special case.

    Convert all rcu_assign_pointer of NULL value.

    //smpl
    @@ expression P; @@

    - rcu_assign_pointer(P, NULL)
    + RCU_INIT_POINTER(P, NULL)

    //

    Signed-off-by: Stephen Hemminger
    Acked-by: Paul E. McKenney
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

17 Jun, 2011

1 commit


05 May, 2011

2 commits

  • can: rename can_try_module_get to can_get_proto

    can_try_module_get does return a struct can_proto.
    The name explains what is done in so much detail that a caller
    may not notice that a struct can_proto is locked/unlocked.

    Signed-off-by: Kurt Van Dijck
    Acked-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Kurt Van Dijck
     
  • commit 53914b67993c724cec585863755c9ebc8446e83b had the
    same message. That commit did put everything in place but
    did not make can_proto const itself.

    Signed-off-by: Kurt Van Dijck
    Acked-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Kurt Van Dijck
     

07 Apr, 2011

1 commit

  • This patch removes spin_locks at CAN socket creation time by using RCU.

    Inspired by the discussion with Kurt van Dijck and Eric Dumazet the RCU code
    was partly derived from af_phonet.c

    Signed-off-by: Oliver Hartkopp
    Reviewed-by: Eric Dumazet
    Acked-by: Kurt Van Dijck
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

28 Mar, 2011

1 commit

  • can_ioctl is the only reason for struct proto to be non-const.
    script/check-patch.pl suggests struct proto be const.

    Setting the reference to the common can_ioctl() in all CAN protocols directly
    removes the need to make the struct proto writable in af_can.c

    Signed-off-by: Kurt Van Dijck
    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

02 Feb, 2010

1 commit

  • In commit 20dd3850bcf860561496827b711fa10fecf6e787 "can: Speed up CAN frame
    receiption by using ml_priv" the formerly used hlist of receiver lists for
    each CAN netdevice has been replaced.

    The hlist content ensured only CAN netdevices to be accessed by the
    can_rx_(un)register() functions which accidently dropped away together with
    the hlist receiver implementation.

    This patch re-introduces the check for CAN netdevices in can_rx_(un)register().

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

04 Jan, 2010

1 commit

  • this patch removes the hlist that contains the CAN receiver filter lists.
    It uses the 'midlayer private' pointer ml_priv and links the filters directly
    to the CAN netdevice, which allows to omit the walk through the complete CAN
    devices hlist for each received CAN frame.

    This patch is tested and does not remove any locking.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

30 Nov, 2009

1 commit


26 Nov, 2009

1 commit

  • Generated with the following semantic patch

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 == n2
    + net_eq(n1, n2)

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 != n2
    + !net_eq(n1, n2)

    applied over {include,net,drivers/net}.

    Signed-off-by: Octavian Purdila
    Signed-off-by: David S. Miller

    Octavian Purdila
     

06 Nov, 2009

2 commits

  • The generic __sock_create function has a kern argument which allows the
    security system to make decisions based on if a socket is being created by
    the kernel or by userspace. This patch passes that flag to the
    net_proto_family specific create function, so it can do the same thing.

    Signed-off-by: Eric Paris
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Eric Paris
     
  • struct can_proto had a capability field which wasn't ever used. It is
    dropped entirely.

    struct inet_protosw had a capability field which can be more clearly
    expressed in the code by just checking if sock->type = SOCK_RAW.

    Signed-off-by: Eric Paris
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Eric Paris
     

07 Oct, 2009

1 commit


15 Sep, 2009

1 commit

  • When using nanosleep() in an userspace application we get a ratelimit warning

    NOHZ: local_softirq_pending 08

    for 10 times.

    The echo of CAN frames is done from process context and softirq context only.
    Therefore the usage of netif_rx() was wrong (for years).

    This patch replaces netif_rx() with netif_rx_ni() which has to be used from
    process/softirq context. It also adds a missing comment that can_send() must
    no be used from hardirq context.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Urs Thuermann
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

31 Aug, 2009

1 commit


15 Aug, 2009

1 commit

  • To ensure a proper handling of CAN frames transported in skbuffs some checks
    need to be performed at receive time.

    As stated by Michael Olbrich and Luotao Fu BUG_ON() might be to restrictive.
    This is right as we can just drop the non conform skbuff and the Kernel can
    continue working.

    This patch replaces the BUG_ON() with a WARN_ONCE() so that the system remains
    healthy but we made the problem visible (once).

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Urs Thuermann
    CC: Michael Olbrich
    CC: Luotao Fu
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

10 Jun, 2009

1 commit


17 Apr, 2009

1 commit

  • Since commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop
    Monitor: Adding kfree_skb_clean for non-drops and modifying
    end-of-line points for skbs") so called end-of-line points for skb's
    should use consume_skb() to free the socket buffer.

    In opposite to consume_skb() the function kfree_skb() is intended to
    be used for unexpected skb drops e.g. in error conditions that now can
    trigger the network drop monitor if enabled.

    This patch moves the skb end-of-line point in af_can.c to use
    consume_skb().

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

27 Feb, 2009

1 commit


01 Feb, 2009

1 commit


07 Jan, 2009

1 commit

  • The AF_CAN core delivered always cloned sk_buffs to the AF_CAN
    protocols, although this was _only_ needed by the can-raw protocol.
    With this (additionally documented) change, the AF_CAN core calls the
    callback functions of the registered AF_CAN protocols with the original
    (uncloned) sk_buff pointer and let's the can-raw protocol do the
    skb_clone() itself which omits all unneeded skb_clone() calls for other
    AF_CAN protocols.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Urs Thuermann
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

05 Dec, 2008

1 commit


04 Dec, 2008

1 commit

  • Due to a wrong safety check in af_can.c it was not possible to filter
    for SFF frames with a specific CAN identifier without getting the
    same selected CAN identifier from a received EFF frame also.

    This fix has a minimum (but user visible) impact on the CAN filter
    API and therefore the CAN version is set to a new date.

    Indeed the 'old' API is still working as-is. But when now setting
    CAN_(EFF|RTR)_FLAG in can_filter.can_mask you might get less traffic
    than before - but still the stuff that you expected to get for your
    defined filter ...

    Thanks to Kurt Van Dijck for pointing at this issue and for the review.

    Signed-off-by: Oliver Hartkopp
    Acked-by: Kurt Van Dijck
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

17 Oct, 2008

1 commit


20 Jul, 2008

1 commit


06 Jul, 2008

1 commit

  • Even though the CAN netlayer only deals with CAN netdevices, the
    netlayer interface to the userspace and to the device layer should
    perform some sanity checks.

    This patch adds several sanity checks that mainly prevent userspace apps
    to send broken content into the system that may be misinterpreted by
    some other userspace application.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Urs Thuermann
    Acked-by: Andre Naujoks
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

08 May, 2008

1 commit


26 Mar, 2008

1 commit


08 Feb, 2008

2 commits


29 Jan, 2008

1 commit

  • This patch adds the CAN core functionality but no protocols or drivers.
    No protocol implementations are included here. They come as separate
    patches. Protocol numbers are already in include/linux/can.h.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Urs Thuermann
    Signed-off-by: David S. Miller

    Oliver Hartkopp