[PATCH net-next v3 07/13] ax88179_178a: Obtain speed and duplex from Interrupt URB

From: Birger Koblitz

Date: Fri Jul 24 2026 - 03:39:55 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 8ea16d1231037832e12f74e2c5304ee4b7a54389..02c015847eea3dfbdfa73f3d59a7d5b0dd1bc339 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -496,6 +496,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;

@@ -506,6 +507,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