working usb negociation
networkmanager compatibility
This commit is contained in:
committed by
Tiago Batista Cardoso
parent
46e2d50a55
commit
0ca4a10aa4
@@ -29,7 +29,8 @@ struct ch397_device {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct usb_device_id ch397_table[] = {
|
static const struct usb_device_id ch397_table[] = {
|
||||||
{ USB_DEVICE(CH349_VENDOR_ID, CH349_PRODUCT_ID) },
|
|
||||||
|
{ USB_DEVICE(CH397_VENDOR_ID, CH397_PRODUCT_ID) },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(usb, ch397_table);
|
MODULE_DEVICE_TABLE(usb, ch397_table);
|
||||||
@@ -227,6 +228,9 @@ static int ch397_net_stop(struct net_device *netdev)
|
|||||||
netif_stop_queue(netdev);
|
netif_stop_queue(netdev);
|
||||||
netif_carrier_off(netdev);
|
netif_carrier_off(netdev);
|
||||||
ch397_stop_rx(dev);
|
ch397_stop_rx(dev);
|
||||||
|
|
||||||
|
netif_carrier_off(netdev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,7 +311,8 @@ static int ch397_probe(struct usb_interface *interface,
|
|||||||
int intf_num = interface->cur_altsetting->desc.bInterfaceNumber;
|
int intf_num = interface->cur_altsetting->desc.bInterfaceNumber;
|
||||||
|
|
||||||
dev_info(&interface->dev,
|
dev_info(&interface->dev,
|
||||||
"Probing CH349 device (config %d, interface %d)\n", config_val,
|
|
||||||
|
"Probing CH397 device (config %d, interface %d)\n", config_val,
|
||||||
intf_num);
|
intf_num);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -424,8 +429,7 @@ static int ch397_probe(struct usb_interface *interface,
|
|||||||
dev_info(&interface->dev, "CH397 attached as %s (MAC: %pM)\n",
|
dev_info(&interface->dev, "CH397 attached as %s (MAC: %pM)\n",
|
||||||
netdev->name, mac);
|
netdev->name, mac);
|
||||||
|
|
||||||
//if (retval)
|
netif_carrier_off(netdev);
|
||||||
// goto error;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user