aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/lapbether.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 17:07:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 17:07:15 -0400
commitd2aa4550379f92e929af7ed1dd4f55e6a1e331f8 (patch)
tree5ef0fc69a507f0d701fd157b6652427eabd5efdd /drivers/net/wan/lapbether.c
parent9e3e4b1d2d13bead8d52703c82a02b55f108b491 (diff)
parentcb2107be43d2fc5eadec58b92b54bf32c00bfff3 (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: (55 commits) netxen: fix tx ring accounting netxen: fix detection of cut-thru firmware mode forcedeth: fix dma api mismatches atm: sk_wmem_alloc initial value is one net: correct off-by-one write allocations reports via-velocity : fix no link detection on boot Net / e100: Fix suspend of devices that cannot be power managed TI DaVinci EMAC : Fix rmmod error net: group address list and its count ipv4: Fix fib_trie rebalancing, part 2 pkt_sched: Update drops stats in act_police sky2: version 1.23 sky2: add GRO support sky2: skb recycling sky2: reduce default transmit ring sky2: receive counter update sky2: fix shutdown synchronization sky2: PCI irq issues sky2: more receive shutdown sky2: turn off pause during shutdown ... Manually fix trivial conflict in net/core/skbuff.c due to kmemcheck
Diffstat (limited to 'drivers/net/wan/lapbether.c')
-rw-r--r--drivers/net/wan/lapbether.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 2dd78d20eb05..aff4f6bdf3d5 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -149,46 +149,40 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb)
149 */ 149 */
150static int lapbeth_xmit(struct sk_buff *skb, struct net_device *dev) 150static int lapbeth_xmit(struct sk_buff *skb, struct net_device *dev)
151{ 151{
152 int err = -ENODEV; 152 int err;
153 153
154 /* 154 /*
155 * Just to be *really* sure not to send anything if the interface 155 * Just to be *really* sure not to send anything if the interface
156 * is down, the ethernet device may have gone. 156 * is down, the ethernet device may have gone.
157 */ 157 */
158 if (!netif_running(dev)) { 158 if (!netif_running(dev))
159 goto drop; 159 goto drop;
160 }
161 160
162 switch (skb->data[0]) { 161 switch (skb->data[0]) {
163 case 0x00: 162 case 0x00:
164 err = 0;
165 break; 163 break;
166 case 0x01: 164 case 0x01:
167 if ((err = lapb_connect_request(dev)) != LAPB_OK) 165 if ((err = lapb_connect_request(dev)) != LAPB_OK)
168 printk(KERN_ERR "lapbeth: lapb_connect_request " 166 printk(KERN_ERR "lapbeth: lapb_connect_request "
169 "error: %d\n", err); 167 "error: %d\n", err);
170 goto drop_ok; 168 goto drop;
171 case 0x02: 169 case 0x02:
172 if ((err = lapb_disconnect_request(dev)) != LAPB_OK) 170 if ((err = lapb_disconnect_request(dev)) != LAPB_OK)
173 printk(KERN_ERR "lapbeth: lapb_disconnect_request " 171 printk(KERN_ERR "lapbeth: lapb_disconnect_request "
174 "err: %d\n", err); 172 "err: %d\n", err);
175 /* Fall thru */ 173 /* Fall thru */
176 default: 174 default:
177 goto drop_ok; 175 goto drop;
178 } 176 }
179 177
180 skb_pull(skb, 1); 178 skb_pull(skb, 1);
181 179
182 if ((err = lapb_data_request(dev, skb)) != LAPB_OK) { 180 if ((err = lapb_data_request(dev, skb)) != LAPB_OK) {
183 printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err); 181 printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err);
184 err = -ENOMEM;
185 goto drop; 182 goto drop;
186 } 183 }
187 err = 0;
188out: 184out:
189 return err; 185 return NETDEV_TX_OK;
190drop_ok:
191 err = 0;
192drop: 186drop:
193 kfree_skb(skb); 187 kfree_skb(skb);
194 goto out; 188 goto out;