working usb negociation

networkmanager compatibility
This commit is contained in:
rltbg
2026-02-17 13:44:11 +01:00
committed by Tiago Batista Cardoso
parent 46e2d50a55
commit 0ca4a10aa4

View File

@@ -29,7 +29,8 @@ struct ch397_device {
};
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);
@@ -227,6 +228,9 @@ static int ch397_net_stop(struct net_device *netdev)
netif_stop_queue(netdev);
netif_carrier_off(netdev);
ch397_stop_rx(dev);
netif_carrier_off(netdev);
return 0;
}
@@ -307,7 +311,8 @@ static int ch397_probe(struct usb_interface *interface,
int intf_num = interface->cur_altsetting->desc.bInterfaceNumber;
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);
/*
@@ -424,8 +429,7 @@ static int ch397_probe(struct usb_interface *interface,
dev_info(&interface->dev, "CH397 attached as %s (MAC: %pM)\n",
netdev->name, mac);
//if (retval)
// goto error;
netif_carrier_off(netdev);
return 0;