mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
br2684: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
410e9d8f9c
commit
0ba25ff4c6
1 changed files with 11 additions and 9 deletions
|
@ -259,10 +259,9 @@ static int br2684_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
* We remember when the MAC gets set, so we don't override it later with
|
* We remember when the MAC gets set, so we don't override it later with
|
||||||
* the ESI of the ATM card of the first VC
|
* the ESI of the ATM card of the first VC
|
||||||
*/
|
*/
|
||||||
static int (*my_eth_mac_addr) (struct net_device *, void *);
|
|
||||||
static int br2684_mac_addr(struct net_device *dev, void *p)
|
static int br2684_mac_addr(struct net_device *dev, void *p)
|
||||||
{
|
{
|
||||||
int err = my_eth_mac_addr(dev, p);
|
int err = eth_mac_addr(dev, p);
|
||||||
if (!err)
|
if (!err)
|
||||||
BRPRIV(dev)->mac_was_set = 1;
|
BRPRIV(dev)->mac_was_set = 1;
|
||||||
return err;
|
return err;
|
||||||
|
@ -538,16 +537,20 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct net_device_ops br2684_netdev_ops = {
|
||||||
|
.ndo_start_xmit = br2684_start_xmit,
|
||||||
|
.ndo_set_mac_address = br2684_mac_addr,
|
||||||
|
.ndo_change_mtu = eth_change_mtu,
|
||||||
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
|
};
|
||||||
|
|
||||||
static void br2684_setup(struct net_device *netdev)
|
static void br2684_setup(struct net_device *netdev)
|
||||||
{
|
{
|
||||||
struct br2684_dev *brdev = BRPRIV(netdev);
|
struct br2684_dev *brdev = BRPRIV(netdev);
|
||||||
|
|
||||||
ether_setup(netdev);
|
ether_setup(netdev);
|
||||||
brdev->net_dev = netdev;
|
|
||||||
|
|
||||||
my_eth_mac_addr = netdev->set_mac_address;
|
netdev->netdev_ops = &br2684_netdev_ops;
|
||||||
netdev->set_mac_address = br2684_mac_addr;
|
|
||||||
netdev->hard_start_xmit = br2684_start_xmit;
|
|
||||||
|
|
||||||
INIT_LIST_HEAD(&brdev->brvccs);
|
INIT_LIST_HEAD(&brdev->brvccs);
|
||||||
}
|
}
|
||||||
|
@ -558,9 +561,8 @@ static void br2684_setup_routed(struct net_device *netdev)
|
||||||
brdev->net_dev = netdev;
|
brdev->net_dev = netdev;
|
||||||
|
|
||||||
netdev->hard_header_len = 0;
|
netdev->hard_header_len = 0;
|
||||||
my_eth_mac_addr = netdev->set_mac_address;
|
|
||||||
netdev->set_mac_address = br2684_mac_addr;
|
netdev->netdev_ops = &br2684_netdev_ops;
|
||||||
netdev->hard_start_xmit = br2684_start_xmit;
|
|
||||||
netdev->addr_len = 0;
|
netdev->addr_len = 0;
|
||||||
netdev->mtu = 1500;
|
netdev->mtu = 1500;
|
||||||
netdev->type = ARPHRD_PPP;
|
netdev->type = ARPHRD_PPP;
|
||||||
|
|
Loading…
Reference in a new issue