• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/ax25/

Lines Matching defs:ax25

22 #include <net/ax25.h>
37 void ax25_clear_queues(ax25_cb *ax25)
39 skb_queue_purge(&ax25->write_queue);
40 skb_queue_purge(&ax25->ack_queue);
41 skb_queue_purge(&ax25->reseq_queue);
42 skb_queue_purge(&ax25->frag_queue);
50 void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
57 if (ax25->va != nr) {
58 while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
59 skb = skb_dequeue(&ax25->ack_queue);
61 ax25->va = (ax25->va + 1) % ax25->modulus;
66 void ax25_requeue_frames(ax25_cb *ax25)
75 while ((skb = skb_dequeue_tail(&ax25->ack_queue)) != NULL)
76 skb_queue_head(&ax25->write_queue, skb);
83 int ax25_validate_nr(ax25_cb *ax25, unsigned short nr)
85 unsigned short vc = ax25->va;
87 while (vc != ax25->vs) {
89 vc = (vc + 1) % ax25->modulus;
92 if (nr == ax25->vs) return 1;
101 int ax25_decode(ax25_cb *ax25, struct sk_buff *skb, int *ns, int *nr, int *pf)
109 if (ax25->modulus == AX25_MODULUS) {
151 void ax25_send_control(ax25_cb *ax25, int frametype, int poll_bit, int type)
156 if ((skb = alloc_skb(ax25->ax25_dev->dev->hard_header_len + 2, GFP_ATOMIC)) == NULL)
159 skb_reserve(skb, ax25->ax25_dev->dev->hard_header_len);
164 if (ax25->modulus == AX25_MODULUS) {
169 *dptr |= (ax25->vr << 5);
178 dptr[1] = (ax25->vr << 1);
183 ax25_transmit_buffer(ax25, skb, type);
224 void ax25_calculate_t1(ax25_cb *ax25)
228 switch (ax25->backoff) {
233 t += 2 * ax25->n2count;
237 for (n = 0; n < ax25->n2count; n++)
243 ax25->t1 = t * ax25->rtt;
249 void ax25_calculate_rtt(ax25_cb *ax25)
251 if (ax25->backoff == 0)
254 if (ax25_t1timer_running(ax25) && ax25->n2count == 0)
255 ax25->rtt = (9 * ax25->rtt + ax25->t1 - ax25_display_timer(&ax25->t1timer)) / 10;
257 if (ax25->rtt < AX25_T1CLAMPLO)
258 ax25->rtt = AX25_T1CLAMPLO;
260 if (ax25->rtt > AX25_T1CLAMPHI)
261 ax25->rtt = AX25_T1CLAMPHI;
264 void ax25_disconnect(ax25_cb *ax25, int reason)
266 ax25_clear_queues(ax25);
268 ax25_stop_t1timer(ax25);
269 ax25_stop_t2timer(ax25);
270 ax25_stop_t3timer(ax25);
271 ax25_stop_idletimer(ax25);
273 ax25->state = AX25_STATE_0;
275 ax25_link_failed(ax25, reason);
277 if (ax25->sk != NULL) {
279 bh_lock_sock(ax25->sk);
280 ax25->sk->sk_state = TCP_CLOSE;
281 ax25->sk->sk_err = reason;
282 ax25->sk->sk_shutdown |= SEND_SHUTDOWN;
283 if (!sock_flag(ax25->sk, SOCK_DEAD)) {
284 ax25->sk->sk_state_change(ax25->sk);
285 sock_set_flag(ax25->sk, SOCK_DEAD);
287 bh_unlock_sock(ax25->sk);