Skip to contentSkip to conversation

VLAN/CDP networking support.

PATCH In review Pantelis Antoniou 4 participants 8 messages Mar 30, 2004 – Apr 18, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VLAN/CDP networking support.

Hello

The following patch adds networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol).

You control the sending/receiving of VLAN tagged packets with the "vlan" environmental variable.
When not present no tagging is performed.

CDP is used mainly to discover your device VLAN(s) when connected to a Cisco switch.

Note: In order to enable CDP support a small change is needed in the networking driver.
You have to enable reception of the 01:00:0c:cc:cc:cc mac address which is a multicast address.

Various defines control CDP; see the README section.

Regards

Pantelis

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: net.diffstat
Url: http://lists.denx.de/pipermail/u-boot/attachments/20040330/d665e9e0/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: net.diff
Url: http://lists.denx.de/pipermail/u-boot/attachments/20040330/d665e9e0/attachment-0001.txt

#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

The following patch adds networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol).

Cool!!! Added. Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Defaults are wonderful, just like fire.
                  - Larry Wall in <[email protected]>
#2 lore raw

Dear Pantelis,

Quoted 3 lines · in message <[email protected]> you wrote:
Quoted 3 lines

The following patch adds networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol).

Unfortunately this patch breaks supoort for ARM boards:

Configuring for assabet board...
net.c:135: initializer element is not constant
net.c:136: initializer element is not constant
net.c: In function `NetLoop':
net.c:282: warning: implicit declaration of function eth_set_current' net.c: In function NetStartAgain':
net.c:525: warning: unused variable gd' net/libnet.a(net.o): In function NetLoop':
/home/wd/u-boot/net/net.c:282: undefined reference to `eth_set_current'

Can you please provide a patch to clean this up?

Best regards,

Wolfgang Denk

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Digital computers are themselves more complex than most things people
build: They have very large numbers of states. This makes conceiving,
describing, and testing them hard. Software systems  have  orders-of-
magnitude more states than computers do.           - Fred Brooks, Jr.
#3 lore raw
Quoted 21 lines · Wolfgang Denk

Dear Pantelis,

Quoted 3 lines · in message <[email protected]> you wrote:
Quoted 3 lines

The following patch adds networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol).

Unfortunately this patch breaks supoort for ARM boards:

Configuring for assabet board...
net.c:135: initializer element is not constant
net.c:136: initializer element is not constant
net.c: In function `NetLoop':
net.c:282: warning: implicit declaration of function eth_set_current' net.c: In function NetStartAgain':
net.c:525: warning: unused variable gd' net/libnet.a(net.o): In function NetLoop':
/home/wd/u-boot/net/net.c:282: undefined reference to `eth_set_current'

Quoted 7 lines

Can you please provide a patch to clean this up?

Best regards,

Wolfgang Denk

Hmm.

Let me download the CVS version and try again.
My version passed the MAKEALL tests...

Regards

Pantelis

#4 lore raw

[U-Boot-Users] Is smc91111 driver need to be ported?

In reply to Wolfgang Denk

Hi,
I am porting u-boot-1.1.0 for the blackfin proceor. Anybody is using the
smc driver present in the drivers directory
It seems incomplete to use in u-boot. because the driver is not hooked
with upper eth layer(eth.c).

Is it need to be ported ?

Thanks and Regards
Ganapathi C

#5 lore raw

[U-Boot-Users] Is smc91111 driver need to be ported?

Quoted 5 lines · In message <[email protected]> you…

I am porting u-boot-1.1.0 for the blackfin proceor. Anybody is using the
smc driver present in the drivers directory
It seems incomplete to use in u-boot. because the driver is not hooked
with upper eth layer(eth.c).

I think you must be missing something. A quick check shows:

-> grep CONFIG_DRIVER_SMC91111 include/configs/*
include/configs/ADNPESC1.h:#define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
include/configs/DK1C20.h:#define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
include/configs/DK1S10.h:#define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
include/configs/cradle.h:#define CONFIG_DRIVER_SMC91111 include/configs/dnp1110.h:#define CONFIG_DRIVER_SMC91111
include/configs/innokom.h:#define CONFIG_DRIVER_SMC91111 1
include/configs/integratorcp.h:#define CONFIG_DRIVER_SMC91111
include/configs/logodl.h:#define CONFIG_DRIVER_SMC91111 1
include/configs/versatile.h:#define CONFIG_DRIVER_SMC91111 include/configs/xm250.h:#define CONFIG_DRIVER_SMC91111

Quoted 1 line

Is it need to be ported ?

I don't think so. It seems that at least 10 different boards already use this driver without problems.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"Have you lived in this village all your life?"        "No, not yet."
#6 lore raw
In reply to Wolfgang Denk

Dear Pantelis,

net/net.c can't be compiled with my poor mipsel-linux-gcc 2.96.
The message is :
mipsel-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xBFC00000
-I/home/mkomiya/u-boot.mk/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/lib/gcc-lib/mipsel-linux/2.96-sdelinuxmips-030324/include -pipe -DCONFIG_MIPS -D__MIPS__ -mcpu=r4600 -EL -mabicalls -Wall -Wstrict-prototypes -c -o net.o net.c net.c:135: initializer element is not constant
net.c:136: initializer element is not constant

It seems to be falled in the loop by ushort NetOurVLAN = ntohs(-1)
ushort NetOurNativeVLAN = htons(-1)

Could you intialize these variables in the program ?

Best regards,

Masami Komiya

Quoted 12 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:

The following patch adds networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol).

Cool!!! Added. Thanks.

Best regards,

Wolfgang Denk

#7 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

net/net.c can't be compiled with my poor mipsel-linux-gcc 2.96.

Fixed now in CVS.

Best regards,

Wolfgang Denk

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
I don't mind criticism. You know me. I've  never  been  one  to  take
offence  at  criticism. No one could say I'm the sort to take offence
at criticism -- Not twice, anyway. Not without blowing bubbles.
                                  - Terry Pratchett, _Witches Abroad_