Skip to content

Commit 82c944d

Browse files
hcodinalinusw
authored andcommitted
net: wan: Add framer framework support
A framer is a component in charge of an E1/T1 line interface. Connected usually to a TDM bus, it converts TDM frames to/from E1/T1 frames. It also provides information related to the E1/T1 line. The framer framework provides a set of APIs for the framer drivers (framer provider) to create/destroy a framer and APIs for the framer users (framer consumer) to obtain a reference to the framer, and use the framer. This basic implementation provides a framer abstraction for: - power on/off the framer - get the framer status (line state) - be notified on framer status changes - get/set the framer configuration Signed-off-by: Herve Codina <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent b85ea95 commit 82c944d

File tree

7 files changed

+1316
-0
lines changed

7 files changed

+1316
-0
lines changed

drivers/net/wan/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ config HDLC_X25
9595
comment "X.25/LAPB support is disabled"
9696
depends on HDLC && (LAPB!=m || HDLC!=m) && LAPB!=y
9797

98+
source "drivers/net/wan/framer/Kconfig"
99+
98100
config PCI200SYN
99101
tristate "Goramo PCI200SYN support"
100102
depends on HDLC && PCI

drivers/net/wan/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ obj-$(CONFIG_HDLC_FR) += hdlc_fr.o
1414
obj-$(CONFIG_HDLC_PPP) += hdlc_ppp.o
1515
obj-$(CONFIG_HDLC_X25) += hdlc_x25.o
1616

17+
obj-y += framer/
18+
1719
obj-$(CONFIG_FARSYNC) += farsync.o
1820

1921
obj-$(CONFIG_LAPBETHER) += lapbether.o

drivers/net/wan/framer/Kconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
#
3+
# FRAMER
4+
#
5+
6+
menuconfig FRAMER
7+
tristate "Framer Subsystem"
8+
help
9+
A framer is a component in charge of an E1/T1 line interface.
10+
Connected usually to a TDM bus, it converts TDM frames to/from E1/T1
11+
frames. It also provides information related to the E1/T1 line.
12+
Used with HDLC, the network can be reached through the E1/T1 line.
13+
14+
This framework is designed to provide a generic interface for framer
15+
devices present in the kernel. This layer will have the generic
16+
API by which framer drivers can create framer using the framer
17+
framework and framer users can obtain reference to the framer.
18+
All the users of this framework should select this config.
19+
20+
if FRAMER
21+
22+
config GENERIC_FRAMER
23+
bool
24+
25+
endif # FRAMER

drivers/net/wan/framer/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
#
3+
# Makefile for the framer drivers.
4+
#
5+
6+
obj-$(CONFIG_GENERIC_FRAMER) += framer-core.o

0 commit comments

Comments
 (0)