Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 975987e7 authored by Oleksij Rempel's avatar Oleksij Rempel Committed by Marc Kleine-Budde
Browse files

can: af_can: export can_sock_destruct()



In j1939 we need our own struct sock::sk_destruct callback. Export the
generic af_can can_sock_destruct() that allows us to chain-call it.

Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
parent 5aa4277d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,5 +65,6 @@ extern void can_rx_unregister(struct net *net, struct net_device *dev,
			      void *data);

extern int can_send(struct sk_buff *skb, int loop);
void can_sock_destruct(struct sock *sk);

#endif /* !_CAN_CORE_H */
+2 −1
Original line number Diff line number Diff line
@@ -86,11 +86,12 @@ static atomic_t skbcounter = ATOMIC_INIT(0);

/* af_can socket functions */

static void can_sock_destruct(struct sock *sk)
void can_sock_destruct(struct sock *sk)
{
	skb_queue_purge(&sk->sk_receive_queue);
	skb_queue_purge(&sk->sk_error_queue);
}
EXPORT_SYMBOL(can_sock_destruct);

static const struct can_proto *can_get_proto(int protocol)
{