diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
commit | 2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch) | |
tree | de2635426477d86338a9469ce09ba0626052288f /net/irda | |
parent | 0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff) | |
parent | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/irlap_frame.c | 18 | ||||
-rw-r--r-- | net/irda/irnetlink.c | 19 |
2 files changed, 5 insertions, 32 deletions
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) |