mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-30 18:59:44 +02:00
[br2684] allow routed mode operation again
Fix part of bug #6709. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19779 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
abc05662c5
commit
06fe5c22d3
@ -1,6 +1,6 @@
|
|||||||
--- a/shell/ash.c
|
--- a/shell/ash.c
|
||||||
+++ b/shell/ash.c
|
+++ b/shell/ash.c
|
||||||
@@ -12360,8 +12360,17 @@ exportcmd(int argc UNUSED_PARAM, char **
|
@@ -12351,8 +12351,17 @@ exportcmd(int argc UNUSED_PARAM, char **
|
||||||
const char *p;
|
const char *p;
|
||||||
char **aptr;
|
char **aptr;
|
||||||
int flag = argv[0][0] == 'r' ? VREADONLY : VEXPORT;
|
int flag = argv[0][0] == 'r' ? VREADONLY : VEXPORT;
|
||||||
@ -19,7 +19,7 @@
|
|||||||
aptr = argptr;
|
aptr = argptr;
|
||||||
name = *aptr;
|
name = *aptr;
|
||||||
if (name) {
|
if (name) {
|
||||||
@@ -12373,10 +12382,12 @@ exportcmd(int argc UNUSED_PARAM, char **
|
@@ -12364,10 +12373,12 @@ exportcmd(int argc UNUSED_PARAM, char **
|
||||||
vp = *findvar(hashvar(name), name);
|
vp = *findvar(hashvar(name), name);
|
||||||
if (vp) {
|
if (vp) {
|
||||||
vp->flags |= flag;
|
vp->flags |= flag;
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
chain_group();
|
chain_group();
|
||||||
clear_array(ahash);
|
clear_array(ahash);
|
||||||
|
|
||||||
@@ -2408,7 +2414,8 @@ static var *evaluate(node *op, var *res)
|
@@ -2410,7 +2416,8 @@ static var *evaluate(node *op, var *res)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case XC( OC_FUNC ):
|
case XC( OC_FUNC ):
|
||||||
@ -44,7 +44,7 @@
|
|||||||
syntax_error(EMSG_UNDEF_FUNC);
|
syntax_error(EMSG_UNDEF_FUNC);
|
||||||
|
|
||||||
X.v = R.v = nvalloc(op->r.f->nargs+1);
|
X.v = R.v = nvalloc(op->r.f->nargs+1);
|
||||||
@@ -2425,7 +2432,10 @@ static var *evaluate(node *op, var *res)
|
@@ -2427,7 +2434,10 @@ static var *evaluate(node *op, var *res)
|
||||||
fnargs = X.v;
|
fnargs = X.v;
|
||||||
|
|
||||||
L.s = g_progname;
|
L.s = g_progname;
|
||||||
@ -56,7 +56,7 @@
|
|||||||
g_progname = L.s;
|
g_progname = L.s;
|
||||||
|
|
||||||
nvfree(fnargs);
|
nvfree(fnargs);
|
||||||
@@ -2788,6 +2798,143 @@ static rstream *next_input_file(void)
|
@@ -2790,6 +2800,143 @@ static rstream *next_input_file(void)
|
||||||
#undef files_happen
|
#undef files_happen
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +200,7 @@
|
|||||||
int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int awk_main(int argc, char **argv)
|
int awk_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -2853,6 +3000,9 @@ int awk_main(int argc, char **argv)
|
@@ -2855,6 +3002,9 @@ int awk_main(int argc, char **argv)
|
||||||
*s1 = '=';
|
*s1 = '=';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,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;
|
@ -0,0 +1,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
|
||||||
|
@@ -536,6 +536,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);
|
||||||
|
@@ -551,11 +557,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;
|
@ -0,0 +1,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
|
||||||
|
@@ -554,6 +554,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);
|
||||||
|
@@ -569,11 +575,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;
|
Loading…
Reference in New Issue
Block a user