diff options
Diffstat (limited to 'drivers/net/usb/cdc-phonet.c')
-rw-r--r-- | drivers/net/usb/cdc-phonet.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index dc9444525b49..109751bad3bb 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c | |||
@@ -97,8 +97,9 @@ static void tx_complete(struct urb *req) | |||
97 | struct sk_buff *skb = req->context; | 97 | struct sk_buff *skb = req->context; |
98 | struct net_device *dev = skb->dev; | 98 | struct net_device *dev = skb->dev; |
99 | struct usbpn_dev *pnd = netdev_priv(dev); | 99 | struct usbpn_dev *pnd = netdev_priv(dev); |
100 | int status = req->status; | ||
100 | 101 | ||
101 | switch (req->status) { | 102 | switch (status) { |
102 | case 0: | 103 | case 0: |
103 | dev->stats.tx_bytes += skb->len; | 104 | dev->stats.tx_bytes += skb->len; |
104 | break; | 105 | break; |
@@ -109,7 +110,7 @@ static void tx_complete(struct urb *req) | |||
109 | dev->stats.tx_aborted_errors++; | 110 | dev->stats.tx_aborted_errors++; |
110 | default: | 111 | default: |
111 | dev->stats.tx_errors++; | 112 | dev->stats.tx_errors++; |
112 | dev_dbg(&dev->dev, "TX error (%d)\n", req->status); | 113 | dev_dbg(&dev->dev, "TX error (%d)\n", status); |
113 | } | 114 | } |
114 | dev->stats.tx_packets++; | 115 | dev->stats.tx_packets++; |
115 | 116 | ||
@@ -150,8 +151,9 @@ static void rx_complete(struct urb *req) | |||
150 | struct page *page = virt_to_page(req->transfer_buffer); | 151 | struct page *page = virt_to_page(req->transfer_buffer); |
151 | struct sk_buff *skb; | 152 | struct sk_buff *skb; |
152 | unsigned long flags; | 153 | unsigned long flags; |
154 | int status = req->status; | ||
153 | 155 | ||
154 | switch (req->status) { | 156 | switch (status) { |
155 | case 0: | 157 | case 0: |
156 | spin_lock_irqsave(&pnd->rx_lock, flags); | 158 | spin_lock_irqsave(&pnd->rx_lock, flags); |
157 | skb = pnd->rx_skb; | 159 | skb = pnd->rx_skb; |