pegasus: Handle disconnect error code correctly.

EPERM means that disconnect() is runnung. It should be treated like
ENODEV

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Oliver Neukum 2009-04-17 01:40:19 -07:00 committed by David S. Miller
parent 62bcaa1303
commit 9dd014eb98

View File

@ -899,6 +899,7 @@ static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net)
/* cleanup should already have been scheduled */
break;
case -ENODEV: /* disconnect() upcoming */
case -EPERM:
netif_device_detach(pegasus->net);
break;
default: