X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;ds=inline;f=target%2Flinux%2Far71xx%2Ffiles%2Fdrivers%2Fnet%2Fag71xx%2Fag71xx.h;h=bb4cb5ba9ff96b3db1e7c6f5149bef2b207ce6c1;hb=2d335ddc1c69d7a28d5d854da1e809b40d72bca5;hp=be14e7e08bda0bd753a8890510dbfdca244f2f94;hpb=c8564630f3b5e5023dbe595e8056f7a3c100b495;p=openwrt-10.03%2F.git diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h index be14e7e08..bb4cb5ba9 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h @@ -89,7 +89,7 @@ struct ag71xx_desc { struct ag71xx_buf { struct sk_buff *skb; - struct ag71xx_desc *desc; + struct ag71xx_desc *desc; dma_addr_t dma_addr; u32 pad; }; @@ -162,7 +162,7 @@ struct ag71xx { unsigned int link; unsigned int speed; - int duplex; + int duplex; struct work_struct restart_work; struct timer_list oom_timer; @@ -190,12 +190,12 @@ static inline struct ag71xx_platform_data *ag71xx_get_pdata(struct ag71xx *ag) static inline int ag71xx_desc_empty(struct ag71xx_desc *desc) { - return ((desc->ctrl & DESC_EMPTY) != 0); + return (desc->ctrl & DESC_EMPTY) != 0; } static inline int ag71xx_desc_pktlen(struct ag71xx_desc *desc) { - return (desc->ctrl & DESC_PKTLEN_M); + return desc->ctrl & DESC_PKTLEN_M; } /* Register offsets */ @@ -432,7 +432,7 @@ static inline u32 ag71xx_mii_ctrl_rr(struct ag71xx *ag) return __raw_readl(ag->mii_ctrl); } -static void inline ag71xx_mii_ctrl_set_if(struct ag71xx *ag, +static inline void ag71xx_mii_ctrl_set_if(struct ag71xx *ag, unsigned int mii_if) { u32 t; @@ -443,7 +443,7 @@ static void inline ag71xx_mii_ctrl_set_if(struct ag71xx *ag, ag71xx_mii_ctrl_wr(ag, t); } -static void inline ag71xx_mii_ctrl_set_speed(struct ag71xx *ag, +static inline void ag71xx_mii_ctrl_set_speed(struct ag71xx *ag, unsigned int speed) { u32 t; @@ -503,4 +503,12 @@ void ag71xx_ar7240_stop(struct ag71xx *ag); int ag71xx_ar7240_init(struct ag71xx *ag); void ag71xx_ar7240_cleanup(struct ag71xx *ag); +int ag71xx_mdio_mii_read(struct ag71xx_mdio *am, int addr, int reg); +void ag71xx_mdio_mii_write(struct ag71xx_mdio *am, int addr, int reg, u16 val); + +u16 ar7240sw_phy_read(struct mii_bus *mii, unsigned phy_addr, + unsigned reg_addr); +int ar7240sw_phy_write(struct mii_bus *mii, unsigned phy_addr, + unsigned reg_addr, u16 reg_val); + #endif /* _AG71XX_H */