]> rtime.felk.cvut.cz Git - socketcan-devel.git/commit
can: add limit for nframes and clean up signed/unsigned variables
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Fri, 13 Aug 2010 16:15:16 +0000 (16:15 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Fri, 13 Aug 2010 16:15:16 +0000 (16:15 +0000)
commit85cd454effec2db6d85bcdb6f5ee2e5988c34321
treedb2a796eab49f6e757000f7c33cbbad3795c4406
parentfc8a0dd6ef35f802add449087a25ab7caad1094f
can: add limit for nframes and clean up signed/unsigned variables

This patch adds a limit for nframes as the number of frames in TX_SETUP and
RX_SETUP are derived from a single byte multiplex value by default.
Use-cases that would require to send/filter more than 256 CAN frames should
be implemented in userspace for complexity reasons anyway.

Additionally the assignments of unsigned values from userspace to signed
values in kernelspace and vice versa are fixed by using unsigned values in
kernelspace consistently.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Reported-by: Ben Hawkes <hawkes@google.com>
Acked-by: Urs Thuermann <urs.thuermann@volkswagen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Upstream commit:
http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=5b75c4973ce779520b9d1e392483207d6f842cde

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1194 030b6a49-0b11-0410-94ab-b0dab22257f2
kernel/2.6/net/can/bcm.c