Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-drm-fsl-dcu.git] / net / netrom / nr_subr.c
index 587bed2674bfb4dcb09e40f13ae0d33b8342e053..cfab5721a6089c2c41f99b8e72ab181155c9f3e4 100644 (file)
@@ -57,7 +57,7 @@ void nr_frames_acked(struct sock *sk, unsigned short nr)
         */
        if (nrom->va != nr) {
                while (skb_peek(&nrom->ack_queue) != NULL && nrom->va != nr) {
-                       skb = skb_dequeue(&nrom->ack_queue);
+                       skb = skb_dequeue(&nrom->ack_queue);
                        kfree_skb(skb);
                        nrom->va = (nrom->va + 1) % NR_MODULUS;
                }
@@ -210,10 +210,9 @@ void nr_write_internal(struct sock *sk, int frametype)
 }
 
 /*
- * This routine is called when a Connect Acknowledge with the Choke Flag
- * set is needed to refuse a connection.
+ * This routine is called to send an error reply.
  */
-void nr_transmit_refusal(struct sk_buff *skb, int mine)
+void __nr_transmit_reply(struct sk_buff *skb, int mine, unsigned char cmdflags)
 {
        struct sk_buff *skbn;
        unsigned char *dptr;
@@ -254,7 +253,7 @@ void nr_transmit_refusal(struct sk_buff *skb, int mine)
                *dptr++ = 0;
        }
 
-       *dptr++ = NR_CONNACK | NR_CHOKE_FLAG;
+       *dptr++ = cmdflags;
        *dptr++ = 0;
 
        if (!nr_route_frame(skbn, NULL))