diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2017-11-30 18:21:13 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-01 16:36:32 -0500 |
commit | 2733d7b89ce15d60b6409b1c2275605f3e4dc940 (patch) | |
tree | 1a754a8373074274048c88ad1ed04059ddedca0a /drivers/net/ethernet/ti/cpsw.h | |
parent | 2c8a14d62601851b851ea4e502dcdf041936b191 (diff) | |
download | linux-2733d7b89ce15d60b6409b1c2275605f3e4dc940.tar.bz2 |
net: ethernet: ti: cpsw: move mac_hi/lo defines in cpsw.h
Move mac_hi/lo defines in common header cpsw.h and re-use
them for netcp_ethss.c.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.h')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.h b/drivers/net/ethernet/ti/cpsw.h index a325f5556cc5..cf111db3dc27 100644 --- a/drivers/net/ethernet/ti/cpsw.h +++ b/drivers/net/ethernet/ti/cpsw.h @@ -17,6 +17,10 @@ #include <linux/if_ether.h> #include <linux/phy.h> +#define mac_hi(mac) (((mac)[0] << 0) | ((mac)[1] << 8) | \ + ((mac)[2] << 16) | ((mac)[3] << 24)) +#define mac_lo(mac) (((mac)[4] << 0) | ((mac)[5] << 8)) + void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave); int ti_cm_get_macid(struct device *dev, int slave, u8 *mac_addr); |