kernel-fxtec-pro1x/drivers/net/can/sja1000
Wolfgang Grandegger 7b6856a029 can: provide library functions for skb allocation
This patch makes the private functions alloc_can_skb() and
alloc_can_err_skb() of the at91_can driver public and adapts all
drivers to use these. While making the patch I realized, that
the skb's are *not* setup consistently. It's now done as shown
below:

  skb->protocol = htons(ETH_P_CAN);
  skb->pkt_type = PACKET_BROADCAST;
  skb->ip_summed = CHECKSUM_UNNECESSARY;
  *cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
  memset(*cf, 0, sizeof(struct can_frame));

The frame is zeroed out to avoid uninitialized data to be passed to
user space. Some drivers or library code did not set "pkt_type" or
"ip_summed". Also,  "__constant_htons()" should not be used for
runtime invocations, as pointed out by David Miller.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-20 00:08:01 -07:00
..
ems_pci.c ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2 2009-09-24 15:39:18 -07:00
kvaser_pci.c can: sja1000: stop misusing member base_addr of struct net_device 2009-06-01 02:53:34 -07:00
Makefile can: sja1000: legacy SJA1000 ISA bus driver 2009-09-04 02:16:16 -07:00
sja1000.c can: provide library functions for skb allocation 2009-10-20 00:08:01 -07:00
sja1000.h can: make the number of echo skb's configurable 2009-10-13 03:44:04 -07:00
sja1000_isa.c can: sja1000: legacy SJA1000 ISA bus driver 2009-09-04 02:16:16 -07:00
sja1000_of_platform.c can: sja1000_of_platform: fix build problems with printk format 2009-06-10 01:12:39 -07:00
sja1000_platform.c can: sja1000: stop misusing member base_addr of struct net_device 2009-06-01 02:53:34 -07:00