diff options
author | Dale Farnsworth <dale@farnsworth.org> | 2006-01-27 03:06:38 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-27 11:11:16 -0500 |
commit | ed9b5d457668392182659747a734b38e86820adb (patch) | |
tree | 0d3c6e28ef5b0d2392278ce8d6c0850b09e9e13f /drivers/net/mv643xx_eth.c | |
parent | cfc88b07292076f960b6782a7fea770abdac4ce6 (diff) |
[PATCH] mv643xx_eth: Remove needless mp->port_mac_addr
mp->port_mac_addr is just a redundant copy of dev->dev_addr, so remove it.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 7ef4b0434a3f..af9bbe649fc1 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -243,8 +243,7 @@ static void mv643xx_eth_update_mac_address(struct net_device *dev) | |||
243 | unsigned int port_num = mp->port_num; | 243 | unsigned int port_num = mp->port_num; |
244 | 244 | ||
245 | eth_port_init_mac_tables(port_num); | 245 | eth_port_init_mac_tables(port_num); |
246 | memcpy(mp->port_mac_addr, dev->dev_addr, 6); | 246 | eth_port_uc_addr_set(port_num, dev->dev_addr); |
247 | eth_port_uc_addr_set(port_num, mp->port_mac_addr); | ||
248 | } | 247 | } |
249 | 248 | ||
250 | /* | 249 | /* |
@@ -320,7 +319,7 @@ static void mv643xx_eth_tx_timeout_task(struct net_device *dev) | |||
320 | 319 | ||
321 | netif_device_detach(dev); | 320 | netif_device_detach(dev); |
322 | eth_port_reset(mp->port_num); | 321 | eth_port_reset(mp->port_num); |
323 | eth_port_start(mp); | 322 | eth_port_start(dev); |
324 | netif_device_attach(dev); | 323 | netif_device_attach(dev); |
325 | } | 324 | } |
326 | 325 | ||
@@ -751,9 +750,6 @@ static int mv643xx_eth_open(struct net_device *dev) | |||
751 | /* Stop RX Queues */ | 750 | /* Stop RX Queues */ |
752 | mv_write(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(port_num), 0x0000ff00); | 751 | mv_write(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(port_num), 0x0000ff00); |
753 | 752 | ||
754 | /* Set the MAC Address */ | ||
755 | memcpy(mp->port_mac_addr, dev->dev_addr, 6); | ||
756 | |||
757 | eth_port_init(mp); | 753 | eth_port_init(mp); |
758 | 754 | ||
759 | INIT_WORK(&mp->rx_task, (void (*)(void *))mv643xx_eth_rx_task, dev); | 755 | INIT_WORK(&mp->rx_task, (void (*)(void *))mv643xx_eth_rx_task, dev); |
@@ -839,7 +835,7 @@ static int mv643xx_eth_open(struct net_device *dev) | |||
839 | 835 | ||
840 | mv643xx_eth_rx_task(dev); /* Fill RX ring with skb's */ | 836 | mv643xx_eth_rx_task(dev); /* Fill RX ring with skb's */ |
841 | 837 | ||
842 | eth_port_start(mp); | 838 | eth_port_start(dev); |
843 | 839 | ||
844 | /* Interrupt Coalescing */ | 840 | /* Interrupt Coalescing */ |
845 | 841 | ||
@@ -1706,7 +1702,6 @@ MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX"); | |||
1706 | * Prior to calling the initialization routine eth_port_init() the user | 1702 | * Prior to calling the initialization routine eth_port_init() the user |
1707 | * must set the following fields under mv643xx_private struct: | 1703 | * must set the following fields under mv643xx_private struct: |
1708 | * port_num User Ethernet port number. | 1704 | * port_num User Ethernet port number. |
1709 | * port_mac_addr[6] User defined port MAC address. | ||
1710 | * port_config User port configuration value. | 1705 | * port_config User port configuration value. |
1711 | * port_config_extend User port config extend value. | 1706 | * port_config_extend User port config extend value. |
1712 | * port_sdma_config User port SDMA config value. | 1707 | * port_sdma_config User port SDMA config value. |
@@ -1796,7 +1791,7 @@ static void eth_port_init(struct mv643xx_private *mp) | |||
1796 | * and ether_init_rx_desc_ring for Rx queues). | 1791 | * and ether_init_rx_desc_ring for Rx queues). |
1797 | * | 1792 | * |
1798 | * INPUT: | 1793 | * INPUT: |
1799 | * struct mv643xx_private *mp Ethernet port control struct | 1794 | * dev - a pointer to the required interface |
1800 | * | 1795 | * |
1801 | * OUTPUT: | 1796 | * OUTPUT: |
1802 | * Ethernet port is ready to receive and transmit. | 1797 | * Ethernet port is ready to receive and transmit. |
@@ -1804,8 +1799,9 @@ static void eth_port_init(struct mv643xx_private *mp) | |||
1804 | * RETURN: | 1799 | * RETURN: |
1805 | * None. | 1800 | * None. |
1806 | */ | 1801 | */ |
1807 | static void eth_port_start(struct mv643xx_private *mp) | 1802 | static void eth_port_start(struct net_device *dev) |
1808 | { | 1803 | { |
1804 | struct mv643xx_private *mp = netdev_priv(dev); | ||
1809 | unsigned int port_num = mp->port_num; | 1805 | unsigned int port_num = mp->port_num; |
1810 | int tx_curr_desc, rx_curr_desc; | 1806 | int tx_curr_desc, rx_curr_desc; |
1811 | 1807 | ||
@@ -1820,7 +1816,7 @@ static void eth_port_start(struct mv643xx_private *mp) | |||
1820 | (u32)((struct eth_rx_desc *)mp->rx_desc_dma + rx_curr_desc)); | 1816 | (u32)((struct eth_rx_desc *)mp->rx_desc_dma + rx_curr_desc)); |
1821 | 1817 | ||
1822 | /* Add the assigned Ethernet address to the port's address table */ | 1818 | /* Add the assigned Ethernet address to the port's address table */ |
1823 | eth_port_uc_addr_set(port_num, mp->port_mac_addr); | 1819 | eth_port_uc_addr_set(port_num, dev->dev_addr); |
1824 | 1820 | ||
1825 | /* Assign port configuration and command. */ | 1821 | /* Assign port configuration and command. */ |
1826 | mv_write(MV643XX_ETH_PORT_CONFIG_REG(port_num), mp->port_config); | 1822 | mv_write(MV643XX_ETH_PORT_CONFIG_REG(port_num), mp->port_config); |