Skip to content

Commit

Permalink
atm: [br2684] allow routed mode operation again
Browse files Browse the repository at this point in the history
commit 2e302eb upstream.

in routed mode, we don't have a hardware address so netdev_ops doesnt
need to validate our hardware address via .ndo_validate_addr

Reported-by: Manuel Fuentes <mfuentes@agenciaefe.com>
Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Pascal Hambourg <pascal@plouf.fr.eu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
chas williams - CONTRACTOR authored and Greg Kroah-Hartman committed Aug 8, 2011
1 parent bb30b19 commit 58e6859
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions net/atm/br2684.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,12 @@ static const struct net_device_ops br2684_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};

static const struct net_device_ops br2684_netdev_ops_routed = {
.ndo_start_xmit = br2684_start_xmit,
.ndo_set_mac_address = br2684_mac_addr,
.ndo_change_mtu = eth_change_mtu
};

static void br2684_setup(struct net_device *netdev)
{
struct br2684_dev *brdev = BRPRIV(netdev);
Expand All @@ -569,11 +575,10 @@ static void br2684_setup(struct net_device *netdev)
static void br2684_setup_routed(struct net_device *netdev)
{
struct br2684_dev *brdev = BRPRIV(netdev);
brdev->net_dev = netdev;

brdev->net_dev = netdev;
netdev->hard_header_len = 0;

netdev->netdev_ops = &br2684_netdev_ops;
netdev->netdev_ops = &br2684_netdev_ops_routed;
netdev->addr_len = 0;
netdev->mtu = 1500;
netdev->type = ARPHRD_PPP;
Expand Down

0 comments on commit 58e6859

Please sign in to comment.