24 #include <linux/kernel.h>
27 #include <linux/slab.h>
28 #include <linux/netdevice.h>
30 #include <asm/uaccess.h>
37 static void x25_t20timer_expiry(
unsigned long);
39 static void x25_transmit_restart_confirmation(
struct x25_neigh *nb);
40 static void x25_transmit_restart_request(
struct x25_neigh *nb);
45 static inline void x25_start_t20timer(
struct x25_neigh *nb)
50 static void x25_t20timer_expiry(
unsigned long param)
54 x25_transmit_restart_request(nb);
56 x25_start_t20timer(nb);
59 static inline void x25_stop_t20timer(
struct x25_neigh *nb)
64 static inline int x25_t20timer_pending(
struct x25_neigh *nb)
73 unsigned short frametype)
80 confirm = !x25_t20timer_pending(nb);
81 x25_stop_t20timer(nb);
84 x25_transmit_restart_confirmation(nb);
88 x25_stop_t20timer(nb);
115 static void x25_transmit_restart_request(
struct x25_neigh *nb)
126 dptr =
skb_put(skb, X25_STD_MIN_LEN + 2);
142 static void x25_transmit_restart_confirmation(
struct x25_neigh *nb)
153 dptr =
skb_put(skb, X25_STD_MIN_LEN);
180 dptr =
skb_put(skb, X25_STD_MIN_LEN + 2);
182 *dptr++ = ((lci >> 8) & 0x0F) | (nb->
extended ?
185 *dptr++ = (lci >> 0) & 0xFF;
223 x25_transmit_restart_request(nb);
225 x25_start_t20timer(nb);
252 skb_queue_head_init(&nb->
queue);
281 static void __x25_remove_neigh(
struct x25_neigh *nb)
284 x25_stop_t20timer(nb);
305 if (nb->
dev == dev) {
306 __x25_remove_neigh(nb);
326 if (nb->
dev == dev) {
370 sizeof(x25_subscr)) ? -
EFAULT : 0;
405 __x25_remove_neigh(nb);