You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/06/02 14:09:30 UTC

[incubator-nuttx] 12/31: Fixed SocketCAN IOB default config and IOB typos

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch SocketCAN
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit e67d2cbee8c485344b487aab3700fc4690aa4984
Author: Peter van der Perk <pe...@nxp.com>
AuthorDate: Thu Mar 5 09:49:41 2020 +0100

    Fixed SocketCAN IOB default config and IOB typos
---
 net/can/Kconfig        | 2 ++
 net/can/can_callback.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/can/Kconfig b/net/can/Kconfig
index 2272db7..d5b6dbd 100644
--- a/net/can/Kconfig
+++ b/net/can/Kconfig
@@ -8,6 +8,8 @@ menu "SocketCAN Support"
 config NET_CAN
 	bool "SocketCAN support"
 	default n
+	select NET_READAHEAD
+	depends on NET
 	---help---
 		Enable support for SocketCAN sockets that will permit.
 
diff --git a/net/can/can_callback.c b/net/can/can_callback.c
index 0f60b6a..7b923d3 100644
--- a/net/can/can_callback.c
+++ b/net/can/can_callback.c
@@ -196,7 +196,7 @@ uint16_t can_datahandler(FAR struct can_conn_s *conn, FAR uint8_t *buffer,
   if (ret < 0)
     {
       nerr("ERROR: Failed to queue the I/O buffer chain: %d\n", ret);
-      iob_free_chain(iob, IOBUSER_NET_TCP_READAHEAD);
+      iob_free_chain(iob, IOBUSER_NET_CAN_READAHEAD);
       return 0;
     }