From 9c995cf6d4126ce8031ca0804097c7d1f9c5fbb6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 18 Jan 2015 00:54:06 +0000 Subject: ar8216: display flow control info in swconfig get_link in case of autonegatiation too The swconfig get_link attribute (at least) on AR8327/AR8337 doesn't consider the autonegotiated flow control. AR8327/AR8337 provide the info about autonegotiated rx/tx flow control in bits 10 and 11 of the port status register. Use these values to display info about autonegotiated rx/tx flow control as part of the get_link attribute. Successfully tested on TL-WDR4900 (AR8327 rev.4) and TL-WDR4300 (AR8327 rev.2). Signed-off-by: Heiner Kallweit git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44023 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/generic/files/drivers/net/phy/ar8327.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'target/linux/generic/files/drivers/net/phy/ar8327.h') diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.h b/target/linux/generic/files/drivers/net/phy/ar8327.h index 1877f00c97..f0ef013cb6 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.h +++ b/target/linux/generic/files/drivers/net/phy/ar8327.h @@ -84,6 +84,8 @@ #define AR8327_MAX_FRAME_SIZE_MTU BITS(0, 14) #define AR8327_REG_PORT_STATUS(_i) (0x07c + (_i) * 4) +#define AR8327_PORT_STATUS_TXFLOW_AUTO BIT(10) +#define AR8327_PORT_STATUS_RXFLOW_AUTO BIT(11) #define AR8327_REG_HEADER_CTRL 0x098 #define AR8327_REG_PORT_HEADER(_i) (0x09c + (_i) * 4) -- cgit v1.2.3