summaryrefslogtreecommitdiff
path: root/net/netrom/nr_out.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-06-04 16:00:32 -0300
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-06-04 16:00:32 -0300
commit63413da5d31d99ba8d89cf9d9ff997f93b49443d (patch)
tree4add196b24e554f140663a7bd92260a7fd9ebdc4 /net/netrom/nr_out.c
parentfbf47415732b00ff5578d55c6be779a109a01e1f (diff)
o net: create struct sock_common and use in struct sock & tcp_tw_bucket
With this the data dependency is reduced to just making sure that the first member of both struct sock and struct tcp_tw_bucket are a struct sock_common. Also makes it easier to grep for struct sock and struct tcp_tw_bucket usage in the tree as all the members in those structs are prefixed, respectively, with sk_ and tw_, like struct inode (i_), struct block_device (bd_), etc. Checked namespace with make tags/ctags, just one colision with the macros for the struct sock members, with a wanrouter struct, fixed that s/sk_state/state_sk/g in the wanrouter struct. Checked as well if the names of the members in both structs collided with some macro, none found.
Diffstat (limited to 'net/netrom/nr_out.c')
-rw-r--r--net/netrom/nr_out.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/netrom/nr_out.c b/net/netrom/nr_out.c
index 9c04a14fd197..d36393da5825 100644
--- a/net/netrom/nr_out.c
+++ b/net/netrom/nr_out.c
@@ -65,12 +65,12 @@ void nr_output(struct sock *sk, struct sk_buff *skb)
if (skb->len > 0)
skbn->data[4] |= NR_MORE_FLAG;
- skb_queue_tail(&sk->write_queue, skbn); /* Throw it on the queue */
+ skb_queue_tail(&sk->sk_write_queue, skbn); /* Throw it on the queue */
}
kfree_skb(skb);
} else {
- skb_queue_tail(&sk->write_queue, skb); /* Throw it on the queue */
+ skb_queue_tail(&sk->sk_write_queue, skb); /* Throw it on the queue */
}
nr_kick(sk);
@@ -135,7 +135,7 @@ void nr_kick(struct sock *sk)
if (nr->condition & NR_COND_PEER_RX_BUSY)
return;
- if (skb_peek(&sk->write_queue) == NULL)
+ if (!skb_peek(&sk->sk_write_queue))
return;
start = (skb_peek(&nr->ack_queue) == NULL) ? nr->va : nr->vs;
@@ -154,11 +154,11 @@ void nr_kick(struct sock *sk)
/*
* Dequeue the frame and copy it.
*/
- skb = skb_dequeue(&sk->write_queue);
+ skb = skb_dequeue(&sk->sk_write_queue);
do {
if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) {
- skb_queue_head(&sk->write_queue, skb);
+ skb_queue_head(&sk->sk_write_queue, skb);
break;
}
@@ -176,7 +176,8 @@ void nr_kick(struct sock *sk)
*/
skb_queue_tail(&nr->ack_queue, skb);
- } while (nr->vs != end && (skb = skb_dequeue(&sk->write_queue)) != NULL);
+ } while (nr->vs != end &&
+ (skb = skb_dequeue(&sk->sk_write_queue)) != NULL);
nr->vl = nr->vr;
nr->condition &= ~NR_COND_ACK_PENDING;