Lines Matching refs:neigh

30 static void rose_transmit_restart_confirmation(struct rose_neigh *neigh);
31 static void rose_transmit_restart_request(struct rose_neigh *neigh);
33 void rose_start_ftimer(struct rose_neigh *neigh) in rose_start_ftimer() argument
35 del_timer(&neigh->ftimer); in rose_start_ftimer()
37 neigh->ftimer.function = rose_ftimer_expiry; in rose_start_ftimer()
38 neigh->ftimer.expires = in rose_start_ftimer()
41 add_timer(&neigh->ftimer); in rose_start_ftimer()
44 static void rose_start_t0timer(struct rose_neigh *neigh) in rose_start_t0timer() argument
46 del_timer(&neigh->t0timer); in rose_start_t0timer()
48 neigh->t0timer.function = rose_t0timer_expiry; in rose_start_t0timer()
49 neigh->t0timer.expires = in rose_start_t0timer()
52 add_timer(&neigh->t0timer); in rose_start_t0timer()
55 void rose_stop_ftimer(struct rose_neigh *neigh) in rose_stop_ftimer() argument
57 del_timer(&neigh->ftimer); in rose_stop_ftimer()
60 void rose_stop_t0timer(struct rose_neigh *neigh) in rose_stop_t0timer() argument
62 del_timer(&neigh->t0timer); in rose_stop_t0timer()
65 int rose_ftimer_running(struct rose_neigh *neigh) in rose_ftimer_running() argument
67 return timer_pending(&neigh->ftimer); in rose_ftimer_running()
70 static int rose_t0timer_running(struct rose_neigh *neigh) in rose_t0timer_running() argument
72 return timer_pending(&neigh->t0timer); in rose_t0timer_running()
81 struct rose_neigh *neigh = from_timer(neigh, t, t0timer); in rose_t0timer_expiry() local
83 rose_transmit_restart_request(neigh); in rose_t0timer_expiry()
85 neigh->dce_mode = 0; in rose_t0timer_expiry()
87 rose_start_t0timer(neigh); in rose_t0timer_expiry()
95 static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) in rose_send_frame() argument
101 rose_call = (const ax25_address *)neigh->dev->dev_addr; in rose_send_frame()
105 ax25s = neigh->ax25; in rose_send_frame()
106 neigh->ax25 = ax25_send_frame(skb, 260, rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); in rose_send_frame()
110 return neigh->ax25 != NULL; in rose_send_frame()
118 static int rose_link_up(struct rose_neigh *neigh) in rose_link_up() argument
124 rose_call = (const ax25_address *)neigh->dev->dev_addr; in rose_link_up()
128 ax25s = neigh->ax25; in rose_link_up()
129 neigh->ax25 = ax25_find_cb(rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); in rose_link_up()
133 return neigh->ax25 != NULL; in rose_link_up()
139 void rose_link_rx_restart(struct sk_buff *skb, struct rose_neigh *neigh, unsigned short frametype) in rose_link_rx_restart() argument
145 rose_stop_t0timer(neigh); in rose_link_rx_restart()
146 neigh->restarted = 1; in rose_link_rx_restart()
147 neigh->dce_mode = (skb->data[3] == ROSE_DTE_ORIGINATED); in rose_link_rx_restart()
148 rose_transmit_restart_confirmation(neigh); in rose_link_rx_restart()
152 rose_stop_t0timer(neigh); in rose_link_rx_restart()
153 neigh->restarted = 1; in rose_link_rx_restart()
166 if (neigh->restarted) { in rose_link_rx_restart()
167 while ((skbn = skb_dequeue(&neigh->queue)) != NULL) in rose_link_rx_restart()
168 if (!rose_send_frame(skbn, neigh)) in rose_link_rx_restart()
176 static void rose_transmit_restart_request(struct rose_neigh *neigh) in rose_transmit_restart_request() argument
198 if (!rose_send_frame(skb, neigh)) in rose_transmit_restart_request()
205 static void rose_transmit_restart_confirmation(struct rose_neigh *neigh) in rose_transmit_restart_confirmation() argument
225 if (!rose_send_frame(skb, neigh)) in rose_transmit_restart_confirmation()
233 void rose_transmit_clear_request(struct rose_neigh *neigh, unsigned int lci, unsigned char cause, u… in rose_transmit_clear_request() argument
239 if (!neigh->dev) in rose_transmit_clear_request()
258 if (!rose_send_frame(skb, neigh)) in rose_transmit_clear_request()
262 void rose_transmit_link(struct sk_buff *skb, struct rose_neigh *neigh) in rose_transmit_link() argument
266 if (neigh->loopback) { in rose_transmit_link()
267 rose_loopback_queue(skb, neigh); in rose_transmit_link()
271 if (!rose_link_up(neigh)) in rose_transmit_link()
272 neigh->restarted = 0; in rose_transmit_link()
277 if (neigh->restarted) { in rose_transmit_link()
278 if (!rose_send_frame(skb, neigh)) in rose_transmit_link()
281 skb_queue_tail(&neigh->queue, skb); in rose_transmit_link()
283 if (!rose_t0timer_running(neigh)) { in rose_transmit_link()
284 rose_transmit_restart_request(neigh); in rose_transmit_link()
285 neigh->dce_mode = 0; in rose_transmit_link()
286 rose_start_t0timer(neigh); in rose_transmit_link()