diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
commit | bbb20089a3275a19e475dbc21320c3742e3ca423 (patch) | |
tree | 216fdc1cbef450ca688135c5b8969169482d9a48 /net/irda | |
parent | 3e48e656903e9fd8bc805c6a2c4264d7808d315b (diff) | |
parent | 657a77fa7284d8ae28dfa48f1dc5d919bf5b2843 (diff) |
Merge branch 'dmaengine' into async-tx-next
Conflicts:
crypto/async_tx/async_xor.c
drivers/dma/ioat/dma_v2.h
drivers/dma/ioat/pci.c
drivers/md/raid5.c
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/af_irda.c | 6 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_lmp.c | 1 | ||||
-rw-r--r-- | net/irda/irlap_frame.c | 18 | ||||
-rw-r--r-- | net/irda/irnetlink.c | 19 |
4 files changed, 8 insertions, 36 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 3eb5bcc75f99..cb762c8723ea 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -913,9 +913,6 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) | |||
913 | /* Clean up the original one to keep it in listen state */ | 913 | /* Clean up the original one to keep it in listen state */ |
914 | irttp_listen(self->tsap); | 914 | irttp_listen(self->tsap); |
915 | 915 | ||
916 | /* Wow ! What is that ? Jean II */ | ||
917 | skb->sk = NULL; | ||
918 | skb->destructor = NULL; | ||
919 | kfree_skb(skb); | 916 | kfree_skb(skb); |
920 | sk->sk_ack_backlog--; | 917 | sk->sk_ack_backlog--; |
921 | 918 | ||
@@ -1762,7 +1759,8 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1762 | switch (cmd) { | 1759 | switch (cmd) { |
1763 | case TIOCOUTQ: { | 1760 | case TIOCOUTQ: { |
1764 | long amount; | 1761 | long amount; |
1765 | amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); | 1762 | |
1763 | amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); | ||
1766 | if (amount < 0) | 1764 | if (amount < 0) |
1767 | amount = 0; | 1765 | amount = 0; |
1768 | if (put_user(amount, (unsigned int __user *)arg)) | 1766 | if (put_user(amount, (unsigned int __user *)arg)) |
diff --git a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c index 67c99d20857f..7ba96618660e 100644 --- a/net/irda/ircomm/ircomm_lmp.c +++ b/net/irda/ircomm/ircomm_lmp.c | |||
@@ -196,6 +196,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, | |||
196 | /* Don't forget to refcount it - see ircomm_tty_do_softint() */ | 196 | /* Don't forget to refcount it - see ircomm_tty_do_softint() */ |
197 | skb_get(skb); | 197 | skb_get(skb); |
198 | 198 | ||
199 | skb_orphan(skb); | ||
199 | skb->destructor = ircomm_lmp_flow_control; | 200 | skb->destructor = ircomm_lmp_flow_control; |
200 | 201 | ||
201 | if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { | 202 | if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { |
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 2562ebc1b22c..7af2e74deda8 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -982,17 +982,12 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command) | |||
982 | { | 982 | { |
983 | struct sk_buff *tx_skb; | 983 | struct sk_buff *tx_skb; |
984 | struct sk_buff *skb; | 984 | struct sk_buff *skb; |
985 | int count; | ||
986 | 985 | ||
987 | IRDA_ASSERT(self != NULL, return;); | 986 | IRDA_ASSERT(self != NULL, return;); |
988 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 987 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
989 | 988 | ||
990 | /* Initialize variables */ | ||
991 | count = skb_queue_len(&self->wx_list); | ||
992 | |||
993 | /* Resend unacknowledged frame(s) */ | 989 | /* Resend unacknowledged frame(s) */ |
994 | skb = skb_peek(&self->wx_list); | 990 | skb_queue_walk(&self->wx_list, skb) { |
995 | while (skb != NULL) { | ||
996 | irlap_wait_min_turn_around(self, &self->qos_tx); | 991 | irlap_wait_min_turn_around(self, &self->qos_tx); |
997 | 992 | ||
998 | /* We copy the skb to be retransmitted since we will have to | 993 | /* We copy the skb to be retransmitted since we will have to |
@@ -1011,21 +1006,12 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command) | |||
1011 | /* | 1006 | /* |
1012 | * Set poll bit on the last frame retransmitted | 1007 | * Set poll bit on the last frame retransmitted |
1013 | */ | 1008 | */ |
1014 | if (count-- == 1) | 1009 | if (skb_queue_is_last(&self->wx_list, skb)) |
1015 | tx_skb->data[1] |= PF_BIT; /* Set p/f bit */ | 1010 | tx_skb->data[1] |= PF_BIT; /* Set p/f bit */ |
1016 | else | 1011 | else |
1017 | tx_skb->data[1] &= ~PF_BIT; /* Clear p/f bit */ | 1012 | tx_skb->data[1] &= ~PF_BIT; /* Clear p/f bit */ |
1018 | 1013 | ||
1019 | irlap_send_i_frame(self, tx_skb, command); | 1014 | irlap_send_i_frame(self, tx_skb, command); |
1020 | |||
1021 | /* | ||
1022 | * If our skb is the last buffer in the list, then | ||
1023 | * we are finished, if not, move to the next sk-buffer | ||
1024 | */ | ||
1025 | if (skb == skb_peek_tail(&self->wx_list)) | ||
1026 | skb = NULL; | ||
1027 | else | ||
1028 | skb = skb->next; | ||
1029 | } | 1015 | } |
1030 | #if 0 /* Not yet */ | 1016 | #if 0 /* Not yet */ |
1031 | /* | 1017 | /* |
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c index 2f05ec1037ab..8dd7ed7e7c1f 100644 --- a/net/irda/irnetlink.c +++ b/net/irda/irnetlink.c | |||
@@ -87,7 +87,7 @@ static int irda_nl_get_mode(struct sk_buff *skb, struct genl_info *info) | |||
87 | if (!dev) | 87 | if (!dev) |
88 | return -ENODEV; | 88 | return -ENODEV; |
89 | 89 | ||
90 | msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); | 90 | msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); |
91 | if (!msg) { | 91 | if (!msg) { |
92 | dev_put(dev); | 92 | dev_put(dev); |
93 | return -ENOMEM; | 93 | return -ENOMEM; |
@@ -148,21 +148,8 @@ static struct genl_ops irda_nl_ops[] = { | |||
148 | 148 | ||
149 | int irda_nl_register(void) | 149 | int irda_nl_register(void) |
150 | { | 150 | { |
151 | int err, i; | 151 | return genl_register_family_with_ops(&irda_nl_family, |
152 | 152 | irda_nl_ops, ARRAY_SIZE(irda_nl_ops)); | |
153 | err = genl_register_family(&irda_nl_family); | ||
154 | if (err) | ||
155 | return err; | ||
156 | |||
157 | for (i = 0; i < ARRAY_SIZE(irda_nl_ops); i++) { | ||
158 | err = genl_register_ops(&irda_nl_family, &irda_nl_ops[i]); | ||
159 | if (err) | ||
160 | goto err_out; | ||
161 | } | ||
162 | return 0; | ||
163 | err_out: | ||
164 | genl_unregister_family(&irda_nl_family); | ||
165 | return err; | ||
166 | } | 153 | } |
167 | 154 | ||
168 | void irda_nl_unregister(void) | 155 | void irda_nl_unregister(void) |