aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2018-08-21 19:39:16 +0800
committerJohn Crispin <john@phrozen.org>2018-08-28 11:26:53 +0200
commit028daa99743b87d33759529d40835cb51dced5cc (patch)
tree96c9894858af9d1296e7d5f630f61c99d0c67369 /target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
parent9300eda00fa91fda22cea56677db5dfa2371ddcb (diff)
downloadupstream-028daa99743b87d33759529d40835cb51dced5cc.tar.gz
upstream-028daa99743b87d33759529d40835cb51dced5cc.tar.bz2
upstream-028daa99743b87d33759529d40835cb51dced5cc.zip
ath79: ag71xx: apply interface mode to MII0/1_CTRL on ar71xx/ar913x
We currently don't have any code configuring interface mode in ath79, meaning that we relies on bootloader to set the correct interface mode. This patch added code to set interface correctly so that everything works even if bootloader configures it wrong.(e.g. on WNDR3800 u-boot set the second GMAC mode to RMII but it should be RGMII.) Introduced "qca,mac-idx" for the difference in MII_CTRL register value. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h')
-rw-r--r--target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
index 377b9f8fe2..9aac1998a8 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
@@ -154,6 +154,8 @@ struct ag71xx {
struct ag71xx_ring rx_ring ____cacheline_aligned;
struct ag71xx_ring tx_ring ____cacheline_aligned;
+ int mac_idx;
+
u16 desc_pktlen_mask;
u16 rx_buf_size;
u8 rx_buf_offset;