aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-01-09 08:00:59 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:01:59 -0500
commit0ba25ff4c669e5395110ba6ab4958a97a9f96922 (patch)
tree40020ab95aa79d126a32d5abcf923b08c89550a0 /net/atm
parent410e9d8f9ce962923b52096d40781a569803c760 (diff)
br2684: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/br2684.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 993cbf6078c2..334fcd4a4ea4 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -259,10 +259,9 @@ static int br2684_start_xmit(struct sk_buff *skb, struct net_device *dev)
259 * We remember when the MAC gets set, so we don't override it later with 259 * We remember when the MAC gets set, so we don't override it later with
260 * the ESI of the ATM card of the first VC 260 * the ESI of the ATM card of the first VC
261 */ 261 */
262static int (*my_eth_mac_addr) (struct net_device *, void *);
263static int br2684_mac_addr(struct net_device *dev, void *p) 262static int br2684_mac_addr(struct net_device *dev, void *p)
264{ 263{
265 int err = my_eth_mac_addr(dev, p); 264 int err = eth_mac_addr(dev, p);
266 if (!err) 265 if (!err)
267 BRPRIV(dev)->mac_was_set = 1; 266 BRPRIV(dev)->mac_was_set = 1;
268 return err; 267 return err;
@@ -538,16 +537,20 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
538 return err; 537 return err;
539} 538}
540 539
540static const struct net_device_ops br2684_netdev_ops = {
541 .ndo_start_xmit = br2684_start_xmit,
542 .ndo_set_mac_address = br2684_mac_addr,
543 .ndo_change_mtu = eth_change_mtu,
544 .ndo_validate_addr = eth_validate_addr,
545};
546
541static void br2684_setup(struct net_device *netdev) 547static void br2684_setup(struct net_device *netdev)
542{ 548{
543 struct br2684_dev *brdev = BRPRIV(netdev); 549 struct br2684_dev *brdev = BRPRIV(netdev);
544 550
545 ether_setup(netdev); 551 ether_setup(netdev);
546 brdev->net_dev = netdev;
547 552
548 my_eth_mac_addr = netdev->set_mac_address; 553 netdev->netdev_ops = &br2684_netdev_ops;
549 netdev->set_mac_address = br2684_mac_addr;
550 netdev->hard_start_xmit = br2684_start_xmit;
551 554
552 INIT_LIST_HEAD(&brdev->brvccs); 555 INIT_LIST_HEAD(&brdev->brvccs);
553} 556}
@@ -558,9 +561,8 @@ static void br2684_setup_routed(struct net_device *netdev)
558 brdev->net_dev = netdev; 561 brdev->net_dev = netdev;
559 562
560 netdev->hard_header_len = 0; 563 netdev->hard_header_len = 0;
561 my_eth_mac_addr = netdev->set_mac_address; 564
562 netdev->set_mac_address = br2684_mac_addr; 565 netdev->netdev_ops = &br2684_netdev_ops;
563 netdev->hard_start_xmit = br2684_start_xmit;
564 netdev->addr_len = 0; 566 netdev->addr_len = 0;
565 netdev->mtu = 1500; 567 netdev->mtu = 1500;
566 netdev->type = ARPHRD_PPP; 568 netdev->type = ARPHRD_PPP;