From: norly Date: Sat, 11 Jun 2022 17:29:31 +0000 (+0200) Subject: Re-align buffers, make RX buffer a power of two X-Git-Url: https://git.enpas.org/?p=elmcan.git;a=commitdiff_plain;h=31929f2fc877607731a00557cc28cc9cdec6580c Re-align buffers, make RX buffer a power of two --- diff --git a/module/can327.c b/module/can327.c index 7391e9d..799905f 100644 --- a/module/can327.c +++ b/module/can327.c @@ -52,8 +52,8 @@ #define ELM327_NAPI_WEIGHT 4 -#define ELM327_SIZE_RXBUF 992 #define ELM327_SIZE_TXBUF 32 +#define ELM327_SIZE_RXBUF 1024 #define ELM327_CAN_CONFIG_SEND_SFF 0x8000 #define ELM327_CAN_CONFIG_VARIABLE_DLC 0x4000 @@ -84,8 +84,8 @@ struct can327 { struct can_rx_offload offload; /* TTY buffers */ - u8 rxbuf[ELM327_SIZE_RXBUF]; u8 txbuf[ELM327_SIZE_TXBUF]; + u8 rxbuf[ELM327_SIZE_RXBUF]; /* Per-channel lock */ spinlock_t lock;