Lines Matching refs:sk
35 void nr_output(struct sock *sk, struct sk_buff *skb) in nr_output() argument
49 if ((skbn = sock_alloc_send_skb(sk, frontlen + NR_MAX_PACKET_SIZE, 0, &err)) == NULL) in nr_output()
67 skb_queue_tail(&sk->sk_write_queue, skbn); /* Throw it on the queue */ in nr_output()
72 skb_queue_tail(&sk->sk_write_queue, skb); /* Throw it on the queue */ in nr_output()
75 nr_kick(sk); in nr_output()
82 static void nr_send_iframe(struct sock *sk, struct sk_buff *skb) in nr_send_iframe() argument
84 struct nr_sock *nr = nr_sk(sk); in nr_send_iframe()
95 nr_start_idletimer(sk); in nr_send_iframe()
97 nr_transmit_buffer(sk, skb); in nr_send_iframe()
100 void nr_send_nak_frame(struct sock *sk) in nr_send_nak_frame() argument
103 struct nr_sock *nr = nr_sk(sk); in nr_send_nak_frame()
117 nr_transmit_buffer(sk, skbn); in nr_send_nak_frame()
122 nr_stop_t1timer(sk); in nr_send_nak_frame()
125 void nr_kick(struct sock *sk) in nr_kick() argument
127 struct nr_sock *nr = nr_sk(sk); in nr_kick()
137 if (!skb_peek(&sk->sk_write_queue)) in nr_kick()
156 skb = skb_dequeue(&sk->sk_write_queue); in nr_kick()
160 skb_queue_head(&sk->sk_write_queue, skb); in nr_kick()
164 skb_set_owner_w(skbn, sk); in nr_kick()
169 nr_send_iframe(sk, skbn); in nr_kick()
179 (skb = skb_dequeue(&sk->sk_write_queue)) != NULL); in nr_kick()
184 if (!nr_t1timer_running(sk)) in nr_kick()
185 nr_start_t1timer(sk); in nr_kick()
188 void nr_transmit_buffer(struct sock *sk, struct sk_buff *skb) in nr_transmit_buffer() argument
190 struct nr_sock *nr = nr_sk(sk); in nr_transmit_buffer()
214 nr_disconnect(sk, ENETUNREACH); in nr_transmit_buffer()
223 void nr_establish_data_link(struct sock *sk) in nr_establish_data_link() argument
225 struct nr_sock *nr = nr_sk(sk); in nr_establish_data_link()
230 nr_write_internal(sk, NR_CONNREQ); in nr_establish_data_link()
232 nr_stop_t2timer(sk); in nr_establish_data_link()
233 nr_stop_t4timer(sk); in nr_establish_data_link()
234 nr_stop_idletimer(sk); in nr_establish_data_link()
235 nr_start_t1timer(sk); in nr_establish_data_link()
241 void nr_enquiry_response(struct sock *sk) in nr_enquiry_response() argument
243 struct nr_sock *nr = nr_sk(sk); in nr_enquiry_response()
253 nr_write_internal(sk, frametype); in nr_enquiry_response()
259 void nr_check_iframes_acked(struct sock *sk, unsigned short nr) in nr_check_iframes_acked() argument
261 struct nr_sock *nrom = nr_sk(sk); in nr_check_iframes_acked()
264 nr_frames_acked(sk, nr); in nr_check_iframes_acked()
265 nr_stop_t1timer(sk); in nr_check_iframes_acked()
269 nr_frames_acked(sk, nr); in nr_check_iframes_acked()
270 nr_start_t1timer(sk); in nr_check_iframes_acked()