[PATCH 4/9] ax88179_178a: Obtain speed and duplex from Interrupt URB

From: Birger Koblitz

Date: Wed Jul 01 2026 - 01:53:30 EST


For newer AX179A/772D firmwares and the AX88279, the
interrupt URB response also contains information on the Ethernet
speed and duplex status. Read this in order to use it to configure
the link.

Signed-off-by: Birger Koblitz <mail@xxxxxxxxxxxxxxxxx>
---
drivers/net/usb/ax88179_178a.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index fadf449fa5df70d4aed706b7488ac61d4cdf4cc9..16528d873e804fde5dcc27659048882eee1c3eaa 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -474,6 +474,7 @@ static int ax88179_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,

static void ax88179_status(struct usbnet *dev, struct urb *urb)
{
+ struct ax88179_data *data = dev->driver_priv;
struct ax88179_int_data *event;
u32 link;

@@ -484,6 +485,9 @@ static void ax88179_status(struct usbnet *dev, struct urb *urb)
le32_to_cpus((void *)&event->intdata1);

link = (((__force u32)event->intdata1) & AX_INT_PPLS_LINK) >> 16;
+ data->speed = (((__force u32)event->intdata1) >> 8) & 0x7;
+ data->full_duplex = (((__force u32)event->intdata1) >> 12) & 0x1;
+ data->link = link;

if (netif_carrier_ok(dev->net) != link) {
usbnet_link_change(dev, link, 1);

--
2.47.3