mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
usbnet: correct usb_ether_xmit return value
enum netdev_tx {
NETDEV_TX_OK = 0x00, /* driver took care of packet */
NETDEV_TX_BUSY = 0x10, /* driver tx path was busy*/
};
typedef enum netdev_tx netdev_tx_t;
Change-Id: I8199a0c47b59149f679af5b77463d9e87885fc9c
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1820760
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
parent
50440059e7
commit
3fd069ff0c
1 changed files with 4 additions and 4 deletions
|
|
@ -357,14 +357,14 @@ static netdev_tx_t usb_ether_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
dev_kfree_skb_any(skb);
|
||||
USBNETDBG(context,
|
||||
"%s:bulk_in end point is disabled\n", __func__);
|
||||
return 0;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
if (!context->bulk_in->enabled) {
|
||||
dev_kfree_skb_any(skb);
|
||||
USBNETDBG(context,
|
||||
"%s: bulk_in didn't enabled\n", __func__);
|
||||
return 0;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
req = usb_get_xmit_request(STOP_QUEUE, dev);
|
||||
|
|
@ -372,7 +372,7 @@ static netdev_tx_t usb_ether_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
if (!req) {
|
||||
USBNETDBG(context, "%s: could not obtain tx request\n",
|
||||
__func__);
|
||||
return 1;
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
/* Add 4 bytes CRC */
|
||||
|
|
@ -400,7 +400,7 @@ static netdev_tx_t usb_ether_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
"%s: could not queue tx request\n", __func__);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static int usb_ether_open(struct net_device *dev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue