summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cadence
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2012-11-07 12:14:52 +0400
committerDavid S. Miller <davem@davemloft.net>2012-11-08 02:44:37 +0400
commit314bccc4f5b625f9c5a2cf7d74a610cc2612272a (patch)
treea615d8ee628ddb6626bac9e15fc6abb5e22264d9 /drivers/net/ethernet/cadence
parentd25e78aaf963ae400a245fc2ae5af0e3208b7187 (diff)
downloadlinux-314bccc4f5b625f9c5a2cf7d74a610cc2612272a.tar.xz
net/macb: export macb_set_hwaddr and macb_get_hwaddr
for usage in at91_ether driver. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence')
-rw-r--r--drivers/net/ethernet/cadence/macb.c8
-rw-r--r--drivers/net/ethernet/cadence/macb.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index a9e5a50ffc35..6be5a260155b 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -98,7 +98,7 @@ static void *macb_rx_buffer(struct macb *bp, unsigned int index)
return bp->rx_buffers + RX_BUFFER_SIZE * macb_rx_ring_wrap(index);
}
-static void __macb_set_hwaddr(struct macb *bp)
+void macb_set_hwaddr(struct macb *bp)
{
u32 bottom;
u16 top;
@@ -108,8 +108,9 @@ static void __macb_set_hwaddr(struct macb *bp)
top = cpu_to_le16(*((u16 *)(bp->dev->dev_addr + 4)));
macb_or_gem_writel(bp, SA1T, top);
}
+EXPORT_SYMBOL_GPL(macb_set_hwaddr);
-static void __init macb_get_hwaddr(struct macb *bp)
+void macb_get_hwaddr(struct macb *bp)
{
struct macb_platform_data *pdata;
u32 bottom;
@@ -149,6 +150,7 @@ static void __init macb_get_hwaddr(struct macb *bp)
netdev_info(bp->dev, "invalid hw address, using random\n");
eth_hw_addr_random(bp->dev);
}
+EXPORT_SYMBOL_GPL(macb_get_hwaddr);
static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
{
@@ -1035,7 +1037,7 @@ static void macb_init_hw(struct macb *bp)
u32 config;
macb_reset_hw(bp);
- __macb_set_hwaddr(bp);
+ macb_set_hwaddr(bp);
config = macb_mdc_clk_div(bp);
config |= MACB_BF(RBOF, NET_IP_ALIGN); /* Make eth data aligned */
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
index 4235ab871ab4..d7234946d242 100644
--- a/drivers/net/ethernet/cadence/macb.h
+++ b/drivers/net/ethernet/cadence/macb.h
@@ -573,6 +573,8 @@ extern const struct ethtool_ops macb_ethtool_ops;
int macb_mii_init(struct macb *bp);
int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
void macb_set_rx_mode(struct net_device *dev);
+void macb_set_hwaddr(struct macb *bp);
+void macb_get_hwaddr(struct macb *bp);
static inline bool macb_is_gem(struct macb *bp)
{