[PATCH v1 16/25] j1939: make j1939_session_get_by_skcb available for other files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



we will need it for signal handling on (E)TP transfers

Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
 net/can/j1939/j1939-priv.h | 6 ++++++
 net/can/j1939/transport.c  | 9 +++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/net/can/j1939/j1939-priv.h b/net/can/j1939/j1939-priv.h
index 95025a6ca10e..018a0d1707fe 100644
--- a/net/can/j1939/j1939-priv.h
+++ b/net/can/j1939/j1939-priv.h
@@ -233,10 +233,16 @@ void j1939_session_get(struct j1939_session *session);
 void j1939_session_put(struct j1939_session *session);
 void j1939_session_skb_queue(struct j1939_session *session,
 			     struct sk_buff *skb);
+struct j1939_session *j1939_session_get_by_skcb(struct j1939_priv *priv,
+						struct j1939_sk_buff_cb *skcb,
+						bool extd, bool reverse);
 
 #define J1939_MAX_TP_PACKET_SIZE (7 * 0xff)
 #define J1939_MAX_ETP_PACKET_SIZE (7 * 0x00ffffff)
 
+#define J1939_REGULAR 0
+#define J1939_EXTENDED 1
+
 /* CAN protocol */
 extern const struct can_proto j1939_can_proto;
 
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index b2d7fc9127ab..0efcb02b2794 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -8,9 +8,6 @@
 
 #include "j1939-priv.h"
 
-#define J1939_REGULAR 0
-#define J1939_EXTENDED 1
-
 #define J1939_ETP_PGN_CTL 0xc800
 #define J1939_ETP_PGN_DAT 0xc700
 #define J1939_TP_PGN_CTL 0xec00
@@ -335,9 +332,9 @@ j1939_session *j1939_session_get_by_skcb_locked(struct j1939_priv *priv,
 	return NULL;
 }
 
-static struct j1939_session *j1939_session_get_by_skcb(struct j1939_priv *priv,
-						      struct j1939_sk_buff_cb *skcb,
-						      bool extd, bool reverse)
+struct j1939_session *j1939_session_get_by_skcb(struct j1939_priv *priv,
+						struct j1939_sk_buff_cb *skcb,
+						bool extd, bool reverse)
 {
 	struct list_head *root = j1939_sessionq(priv, extd);
 	struct j1939_session *session;
-- 
2.20.1




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux