netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joachim Eastwood <manabian@gmail.com>
To: nicolas.ferre@atmel.com, davem@davemloft.net
Cc: plagnioj@jcrosoft.com, netdev@vger.kernel.org,
	Joachim Eastwood <manabian@gmail.com>
Subject: [PATCH 3/8] net/macb: export macb_set_hwaddr and macb_get_hwaddr
Date: Wed,  7 Nov 2012 19:14:52 +0100	[thread overview]
Message-ID: <1352312097-31320-4-git-send-email-manabian@gmail.com> (raw)
In-Reply-To: <1352312097-31320-1-git-send-email-manabian@gmail.com>

for usage in at91_ether driver.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 drivers/net/ethernet/cadence/macb.c | 8 +++++---
 drivers/net/ethernet/cadence/macb.h | 2 ++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index a9e5a50..6be5a26 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 4235ab8..d723494 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)
 {
-- 
1.8.0

  parent reply	other threads:[~2012-11-07 18:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07 18:14 [PATCH 0/8] at91_ether share stats/address setting with macb Joachim Eastwood
2012-11-07 18:14 ` [PATCH 1/8] net/macb: check all address registers sets Joachim Eastwood
2012-11-07 18:14 ` [PATCH 2/8] net/macb: support reversed hw addr Joachim Eastwood
2012-11-07 18:14 ` Joachim Eastwood [this message]
2012-11-07 18:14 ` [PATCH 4/8] net/at91_ether: use macb functions for get/set hwaddr Joachim Eastwood
2012-11-07 18:14 ` [PATCH 5/8] net/at91_ether: use stat function from macb Joachim Eastwood
2012-11-07 18:14 ` [PATCH 6/8] net/at91_ether: drop board_data private struct member Joachim Eastwood
2012-11-07 18:14 ` [PATCH 7/8] net/at91_ether: clean up print outs Joachim Eastwood
2012-11-07 18:14 ` [PATCH 8/8] net/at91_ether: fix comment and style issues Joachim Eastwood
2012-11-07 22:45 ` [PATCH 0/8] at91_ether share stats/address setting with macb David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352312097-31320-4-git-send-email-manabian@gmail.com \
    --to=manabian@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).