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
..
2009-09-23 07:39:29 -07:00
2009-06-18 08:46:47 +10:00
2009-09-09 11:19:00 -04:00
2009-09-19 02:14:45 -04:00
2009-06-17 00:36:36 -04:00
2009-09-20 16:09:20 +05:30
2009-09-08 17:42:50 -07:00
2009-04-01 08:59:23 -07:00
2009-06-01 06:21:13 +00:00
2009-04-23 10:06:35 +01:00
2009-10-03 20:52:01 +02:00
2009-06-11 21:36:09 -04:00
2009-07-12 12:22:34 -07:00
2009-09-23 11:01:25 -07:00
2009-07-14 20:29:57 +08:00
2009-06-11 21:36:06 -04:00
2009-09-18 09:48:52 -07:00
2009-06-22 10:12:30 +01:00
2009-05-18 14:46:26 +01:00
2009-04-03 14:53:32 -07:00
2009-09-14 17:41:42 -07:00
2009-06-17 09:33:49 -07:00
2009-07-08 09:18:05 -07:00
2009-10-07 01:10:44 -07:00
2009-06-24 08:17:04 -04:00
2009-09-12 14:48:40 +02:00
2009-06-15 21:30:25 -07:00
2009-06-18 13:04:05 -07:00
2009-09-01 01:13:31 -07:00
2009-09-18 22:45:43 +02:00
2009-09-01 17:52:57 -07:00
2009-04-02 19:04:53 -07:00
2009-09-11 12:54:58 -07:00
2009-08-19 23:08:24 +04:00
2009-07-26 19:25:44 -07:00
2009-10-07 13:57:10 -07:00
2009-06-29 08:59:10 +10:00
2009-06-02 00:45:24 -07:00
2009-08-21 15:30:12 -07:00
2009-07-31 08:55:48 +02:00
2009-09-23 07:39:41 -07:00
2009-06-18 13:03:56 -07:00
2009-09-26 10:17:19 -07:00
2009-04-21 13:41:48 -07:00
2009-04-21 13:41:48 -07:00
2009-10-18 18:52:53 -07:00
2009-08-29 15:53:00 +02:00
2009-09-30 00:32:06 -04:00
2009-09-23 07:39:58 -07:00
2009-09-10 10:46:47 +03:00
2009-09-19 13:13:17 -07:00
2009-09-26 10:17:19 -07:00
2009-09-22 07:17:33 -07:00
2009-09-18 21:22:08 +02:00
2009-04-06 16:06:26 +01:00
2009-06-23 20:21:39 +01:00
2009-07-30 16:03:45 +09:30
2009-04-28 07:37:28 +02:00
2009-06-16 19:47:48 -07:00
2009-09-23 07:39:41 -07:00
2009-09-22 07:17:35 -07:00
2009-06-16 08:40:20 +02:00
2009-04-29 17:32:35 -07:00
2009-07-08 09:31:56 -07:00
2009-06-11 21:36:02 -04:00
2009-09-21 15:14:51 +02:00
2009-10-12 23:40:10 -07:00
2009-06-17 18:02:11 -07:00
2009-06-17 18:02:11 -07:00
2009-09-26 10:17:19 -07:00
2009-06-17 12:24:34 -07:00
2009-06-17 18:02:11 -07:00
2009-10-07 16:39:42 -04:00
2009-06-15 21:44:43 -07:00
2009-04-01 08:59:13 -07:00
2009-04-01 08:59:13 -07:00
2009-04-24 08:54:21 +02:00
2009-09-22 07:17:47 -07:00
2009-10-04 15:05:10 -07:00
2009-06-18 13:04:04 -07:00
2009-07-29 19:10:36 -07:00
2009-09-23 07:39:41 -07:00
2009-06-11 21:36:12 -04:00
2009-09-19 08:53:22 +02:00
2009-09-19 08:53:22 +02:00
2009-08-23 19:13:02 -07:00
2009-06-24 08:17:06 -04:00
2009-09-01 12:48:21 -04:00
2009-05-09 10:49:41 -04:00
2009-04-01 08:59:24 -07:00
2009-04-08 14:33:38 -07:00
2009-08-28 19:57:30 -04:00
2009-04-13 15:04:29 -07:00
2009-06-15 15:50:49 +02:00
2009-04-21 19:40:00 -07:00
2009-04-27 02:45:02 -07:00
2009-08-31 18:08:51 +02:00
2009-05-12 11:11:48 +02:00
2009-04-02 19:05:01 -07:00
2009-07-06 13:57:03 -07:00
2009-09-02 01:03:43 -07:00
2009-08-30 22:26:34 +02:00
2009-09-23 06:46:23 -07:00
2009-09-23 18:13:10 -07:00
2009-08-26 12:39:29 +01:00
2009-09-23 22:26:32 +09:30
2009-09-23 22:26:32 +09:30
2009-09-23 22:26:32 +09:30
2009-09-23 22:26:32 +09:30
2009-09-23 22:26:32 +09:30
2009-09-23 22:26:32 +09:30
2009-09-22 07:17:30 -07:00
2009-09-19 13:13:25 -07:00
2009-09-19 13:13:26 -07:00
2009-09-15 16:51:30 +02:00
2009-09-21 15:14:53 +02:00