Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
14d8ce70
Commit
14d8ce70
authored
Jun 04, 2005
by
Committed by
Jeff Garzik
Jun 04, 2005
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of /spare/repo/netdev-2.6 branch hdlc
parents
79121839
b3dd65f9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
216 additions
and
175 deletions
+216
-175
Documentation/networking/generic-hdlc.txt
Documentation/networking/generic-hdlc.txt
+26
-25
drivers/net/wan/hdlc_fr.c
drivers/net/wan/hdlc_fr.c
+176
-144
drivers/net/wan/hdlc_generic.c
drivers/net/wan/hdlc_generic.c
+11
-5
include/linux/hdlc.h
include/linux/hdlc.h
+3
-1
No files found.
Documentation/networking/generic-hdlc.txt
View file @
14d8ce70
Generic HDLC layer
Krzysztof Halasa <khc@pm.waw.pl>
January, 2003
Generic HDLC layer currently supports:
- Frame Relay (ANSI, CCITT and no LMI), with ARP support (no InARP).
Normal (routed) and Ethernet-bridged (Ethernet device emulation)
interfaces can share a single PVC.
- raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
- Cisco HDLC,
- PPP (uses syncppp.c),
- X.25 (uses X.25 routines).
There are hardware drivers for the following cards:
- C101 by Moxa Technologies Co., Ltd.
- RISCom/N2 by SDL Communications Inc.
- and others, some not in the official kernel.
1. Frame Relay (ANSI, CCITT, Cisco and no LMI).
- Normal (routed) and Ethernet-bridged (Ethernet device emulation)
interfaces can share a single PVC.
- ARP support (no InARP support in the kernel - there is an
experimental InARP user-space daemon available on:
http://www.kernel.org/pub/linux/utils/net/hdlc/).
2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
3. Cisco HDLC.
4. PPP (uses syncppp.c).
5. X.25 (uses X.25 routines).
Generic HDLC is a protocol driver only - it needs a low-level driver
for your particular hardware.
Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible
with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
...
...
@@ -24,7 +24,7 @@ with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
Make sure the hdlc.o and the hardware driver are loaded. It should
create a number of "hdlc" (hdlc0 etc) network devices, one for each
WAN port. You'll need the "sethdlc" utility, get it from:
http://
hq.pm.waw.pl
/hdlc/
http://
www.kernel.org/pub/linux/utils/net
/hdlc/
Compile sethdlc.c utility:
gcc -O2 -Wall -o sethdlc sethdlc.c
...
...
@@ -52,12 +52,12 @@ Setting interface:
* v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port
if the card has software-selectable interfaces
loopback - activate hardware loopback (for testing only)
* clock ext -
external clock (uses DTE RX and TX clock)
* clock int -
internal clock (provides clock signal on DCE clock output)
* clock txint -
TX internal, RX external (provides TX clock on DCE output)
* clock txfromrx -
TX clock derived from RX clock (TX clock on DCE output)
* rate - sets clock rate in bps (
not required for external clock or
for txfromrx)
* clock ext -
both RX clock and TX clock external
* clock int -
both RX clock and TX clock internal
* clock txint -
RX clock external, TX clock internal
* clock txfromrx -
RX clock external, TX clock derived from RX clock
* rate - sets clock rate in bps (
for "int" or "txint" clock only)
Setting protocol:
...
...
@@ -79,7 +79,7 @@ Setting protocol:
* x25 - sets X.25 mode
* fr - Frame Relay mode
lmi ansi / ccitt / none - LMI (link management) type
lmi ansi / ccitt /
cisco /
none - LMI (link management) type
dce - Frame Relay DCE (network) side LMI instead of default DTE (user).
It has nothing to do with clocks!
t391 - link integrity verification polling timer (in seconds) - user
...
...
@@ -119,13 +119,14 @@ or
If you have a problem with N2
or C101 card, you can issue the "private"
command to see port's packet descriptor rings (in kernel logs):
If you have a problem with N2
, C101 or PLX200SYN card, you can issue the
"private"
command to see port's packet descriptor rings (in kernel logs):
sethdlc hdlc0 private
The hardware driver has to be build with
CONFIG_HDLC_
DEBUG_RINGS.
The hardware driver has to be build with
#define
DEBUG_RINGS.
Attaching this info to bug reports would be helpful. Anyway, let me know
if you have problems using this.
For patches and other info look at http://hq.pm.waw.pl/hdlc/
For patches and other info look at:
<http://www.kernel.org/pub/linux/utils/net/hdlc/>.
drivers/net/wan/hdlc_fr.c
View file @
14d8ce70
This diff is collapsed.
Click to expand it.
drivers/net/wan/hdlc_generic.c
View file @
14d8ce70
/*
* Generic HDLC support routines for Linux
*
* Copyright (C) 1999 - 200
3
Krzysztof Halasa <khc@pm.waw.pl>
* Copyright (C) 1999 - 200
5
Krzysztof Halasa <khc@pm.waw.pl>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License
...
...
@@ -38,7 +38,7 @@
#include <linux/hdlc.h>
static
const
char
*
version
=
"HDLC support module revision 1.1
7
"
;
static
const
char
*
version
=
"HDLC support module revision 1.1
8
"
;
#undef DEBUG_LINK
...
...
@@ -126,10 +126,13 @@ void hdlc_set_carrier(int on, struct net_device *dev)
if
(
!
hdlc
->
open
)
goto
carrier_exit
;
if
(
hdlc
->
carrier
)
if
(
hdlc
->
carrier
)
{
printk
(
KERN_INFO
"%s: Carrier detected
\n
"
,
dev
->
name
);
__hdlc_set_carrier_on
(
dev
);
else
}
else
{
printk
(
KERN_INFO
"%s: Carrier lost
\n
"
,
dev
->
name
);
__hdlc_set_carrier_off
(
dev
);
}
carrier_exit:
spin_unlock_irqrestore
(
&
hdlc
->
state_lock
,
flags
);
...
...
@@ -157,8 +160,11 @@ int hdlc_open(struct net_device *dev)
spin_lock_irq
(
&
hdlc
->
state_lock
);
if
(
hdlc
->
carrier
)
if
(
hdlc
->
carrier
)
{
printk
(
KERN_INFO
"%s: Carrier detected
\n
"
,
dev
->
name
);
__hdlc_set_carrier_on
(
dev
);
}
else
printk
(
KERN_INFO
"%s: No carrier
\n
"
,
dev
->
name
);
hdlc
->
open
=
1
;
...
...
include/linux/hdlc.h
View file @
14d8ce70
/*
* Generic HDLC support routines for Linux
*
* Copyright (C) 1999-200
3
Krzysztof Halasa <khc@pm.waw.pl>
* Copyright (C) 1999-200
5
Krzysztof Halasa <khc@pm.waw.pl>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License
...
...
@@ -41,6 +41,7 @@
#define LMI_NONE 1
/* No LMI, all PVCs are static */
#define LMI_ANSI 2
/* ANSI Annex D */
#define LMI_CCITT 3
/* ITU-T Annex A */
#define LMI_CISCO 4
/* The "original" LMI, aka Gang of Four */
#define HDLC_MAX_MTU 1500
/* Ethernet 1500 bytes */
#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4)
/* for ETH+VLAN over FR */
...
...
@@ -89,6 +90,7 @@ typedef struct pvc_device_struct {
unsigned
int
deleted
:
1
;
unsigned
int
fecn
:
1
;
unsigned
int
becn
:
1
;
unsigned
int
bandwidth
;
/* Cisco LMI reporting only */
}
state
;
}
pvc_device
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment