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
Generic HDLC layer
Krzysztof Halasa <khc@pm.waw.pl>
Krzysztof Halasa <khc@pm.waw.pl>
January, 2003
Generic HDLC layer currently supports:
Generic HDLC layer currently supports:
- Frame Relay (ANSI, CCITT and no LMI), with ARP support (no InARP).
1. Frame Relay (ANSI, CCITT, Cisco and no LMI).
Normal (routed) and Ethernet-bridged (Ethernet device emulation)
- Normal (routed) and Ethernet-bridged (Ethernet device emulation)
interfaces can share a single PVC.
interfaces can share a single PVC.
- raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
- ARP support (no InARP support in the kernel - there is an
- Cisco HDLC,
experimental InARP user-space daemon available on:
- PPP (uses syncppp.c),
http://www.kernel.org/pub/linux/utils/net/hdlc/).
- X.25 (uses X.25 routines).
2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
3. Cisco HDLC.
There are hardware drivers for the following cards:
4. PPP (uses syncppp.c).
- C101 by Moxa Technologies Co., Ltd.
5. X.25 (uses X.25 routines).
- RISCom/N2 by SDL Communications Inc.
- and others, some not in the official kernel.
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
Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible
with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
...
@@ -24,7 +24,7 @@ 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
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
create a number of "hdlc" (hdlc0 etc) network devices, one for each
WAN port. You'll need the "sethdlc" utility, get it from:
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:
Compile sethdlc.c utility:
gcc -O2 -Wall -o sethdlc sethdlc.c
gcc -O2 -Wall -o sethdlc sethdlc.c
...
@@ -52,12 +52,12 @@ Setting interface:
...
@@ -52,12 +52,12 @@ Setting interface:
* v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port
* v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port
if the card has software-selectable interfaces
if the card has software-selectable interfaces
loopback - activate hardware loopback (for testing only)
loopback - activate hardware loopback (for testing only)
* clock ext -
external clock (uses DTE RX and TX clock)
* clock ext -
both RX clock and TX clock external
* clock int -
internal clock (provides clock signal on DCE clock output)
* clock int -
both RX clock and TX clock internal
* clock txint -
TX internal, RX external (provides TX clock on DCE output)
* clock txint -
RX clock external, TX clock internal
* clock txfromrx -
TX clock derived from RX clock (TX clock on DCE output)
* clock txfromrx -
RX clock external, TX clock derived from RX clock
* rate - sets clock rate in bps (
not required for external clock or
* rate - sets clock rate in bps (
for "int" or "txint" clock only)
for txfromrx)
Setting protocol:
Setting protocol:
...
@@ -79,7 +79,7 @@ Setting protocol:
...
@@ -79,7 +79,7 @@ Setting protocol:
* x25 - sets X.25 mode
* x25 - sets X.25 mode
* fr - Frame Relay 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).
dce - Frame Relay DCE (network) side LMI instead of default DTE (user).
It has nothing to do with clocks!
It has nothing to do with clocks!
t391 - link integrity verification polling timer (in seconds) - user
t391 - link integrity verification polling timer (in seconds) - user
...
@@ -119,13 +119,14 @@ or
...
@@ -119,13 +119,14 @@ or
If you have a problem with N2
or C101 card, you can issue the "private"
If you have a problem with N2
, C101 or PLX200SYN card, you can issue the
command to see port's packet descriptor rings (in kernel logs):
"private"
command to see port's packet descriptor rings (in kernel logs):
sethdlc hdlc0 private
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
Attaching this info to bug reports would be helpful. Anyway, let me know
if you have problems using this.
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
* 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
* 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
* under the terms of version 2 of the GNU General Public License
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include <linux/hdlc.h>
#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
#undef DEBUG_LINK
...
@@ -126,10 +126,13 @@ void hdlc_set_carrier(int on, struct net_device *dev)
...
@@ -126,10 +126,13 @@ void hdlc_set_carrier(int on, struct net_device *dev)
if
(
!
hdlc
->
open
)
if
(
!
hdlc
->
open
)
goto
carrier_exit
;
goto
carrier_exit
;
if
(
hdlc
->
carrier
)
if
(
hdlc
->
carrier
)
{
printk
(
KERN_INFO
"%s: Carrier detected
\n
"
,
dev
->
name
);
__hdlc_set_carrier_on
(
dev
);
__hdlc_set_carrier_on
(
dev
);
else
}
else
{
printk
(
KERN_INFO
"%s: Carrier lost
\n
"
,
dev
->
name
);
__hdlc_set_carrier_off
(
dev
);
__hdlc_set_carrier_off
(
dev
);
}
carrier_exit:
carrier_exit:
spin_unlock_irqrestore
(
&
hdlc
->
state_lock
,
flags
);
spin_unlock_irqrestore
(
&
hdlc
->
state_lock
,
flags
);
...
@@ -157,8 +160,11 @@ int hdlc_open(struct net_device *dev)
...
@@ -157,8 +160,11 @@ int hdlc_open(struct net_device *dev)
spin_lock_irq
(
&
hdlc
->
state_lock
);
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
);
__hdlc_set_carrier_on
(
dev
);
}
else
printk
(
KERN_INFO
"%s: No carrier
\n
"
,
dev
->
name
);
hdlc
->
open
=
1
;
hdlc
->
open
=
1
;
...
...
include/linux/hdlc.h
View file @
14d8ce70
/*
/*
* Generic HDLC support routines for Linux
* 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
* 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
* under the terms of version 2 of the GNU General Public License
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#define LMI_NONE 1
/* No LMI, all PVCs are static */
#define LMI_NONE 1
/* No LMI, all PVCs are static */
#define LMI_ANSI 2
/* ANSI Annex D */
#define LMI_ANSI 2
/* ANSI Annex D */
#define LMI_CCITT 3
/* ITU-T Annex A */
#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_MTU 1500
/* Ethernet 1500 bytes */
#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4)
/* for ETH+VLAN over FR */
#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4)
/* for ETH+VLAN over FR */
...
@@ -89,6 +90,7 @@ typedef struct pvc_device_struct {
...
@@ -89,6 +90,7 @@ typedef struct pvc_device_struct {
unsigned
int
deleted
:
1
;
unsigned
int
deleted
:
1
;
unsigned
int
fecn
:
1
;
unsigned
int
fecn
:
1
;
unsigned
int
becn
:
1
;
unsigned
int
becn
:
1
;
unsigned
int
bandwidth
;
/* Cisco LMI reporting only */
}
state
;
}
state
;
}
pvc_device
;
}
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