aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-2.6.30/640-br2684_backport_routed.patch
blob: d925144fa950d9d540cab7413269e0d889c91be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
commit 2e302ebfeac04beb5a5d6af1ac583c6a1fb76d1a
Author: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Date:   Fri Dec 4 11:06:32 2009 +0000

    atm: [br2684] allow routed mode operation again
    
    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>

--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -544,6 +544,12 @@ static const struct net_device_ops br268
 	.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);
@@ -559,11 +565,10 @@ static void br2684_setup(struct net_devi
 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;