diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2009-10-08 22:17:11 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-13 03:44:04 -0700 |
commit | a6e4bc5304033e434fabccabb230b8e9ff55d76f (patch) | |
tree | a1ddf8a6648a5f60e8196c34ad20f9e107f40e8e /drivers/net/can/sja1000 | |
parent | 61321bbd6235ca9a40ba3bc249e8906cc66233c3 (diff) | |
download | linux-stable-a6e4bc5304033e434fabccabb230b8e9ff55d76f.tar.gz linux-stable-a6e4bc5304033e434fabccabb230b8e9ff55d76f.tar.bz2 linux-stable-a6e4bc5304033e434fabccabb230b8e9ff55d76f.zip |
can: make the number of echo skb's configurable
This patch allows the CAN controller driver to define the number of echo
skb's used for the local loopback (echo), as suggested by Kurt Van
Dijck, with the function:
struct net_device *alloc_candev(int sizeof_priv,
unsigned int echo_skb_max);
The CAN drivers have been adapted accordingly. For the ems_usb driver,
as suggested by Sebastian Haas, the number of echo skb's has been
increased to 10, which improves the transmission performance a lot.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can/sja1000')
-rw-r--r-- | drivers/net/can/sja1000/sja1000.c | 3 | ||||
-rw-r--r-- | drivers/net/can/sja1000/sja1000.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 16d2ecd2a3b7..96d8be4253f8 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c @@ -565,7 +565,8 @@ struct net_device *alloc_sja1000dev(int sizeof_priv) struct net_device *dev; struct sja1000_priv *priv; - dev = alloc_candev(sizeof(struct sja1000_priv) + sizeof_priv); + dev = alloc_candev(sizeof(struct sja1000_priv) + sizeof_priv, + SJA1000_ECHO_SKB_MAX); if (!dev) return NULL; diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h index 302d2c763ad7..97a622b9302f 100644 --- a/drivers/net/can/sja1000/sja1000.h +++ b/drivers/net/can/sja1000/sja1000.h @@ -50,6 +50,8 @@ #include <linux/can/dev.h> #include <linux/can/platform/sja1000.h> +#define SJA1000_ECHO_SKB_MAX 1 /* the SJA1000 has one TX buffer object */ + #define SJA1000_MAX_IRQ 20 /* max. number of interrupts handled in ISR */ /* SJA1000 registers - manual section 6.4 (Pelican Mode) */ |