mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
[WAN]: Remove broken and unmaintained Sangoma drivers.
The in-kernel Sangoma drivers are both not compiling and marked as BROKEN since at least kernel 2.6.0. Sangoma offers out-of-tree drivers, and David Mandelstam told me Sangoma does no longer maintain the in-kernel drivers and prefers to provide them as a separate installation package. This patch therefore removes these drivers. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7ad4d2f690
commit
8db60bcf30
@@ -3058,13 +3058,6 @@ M: khali@linux-fr.org
|
||||
L: lm-sensors@lm-sensors.org
|
||||
S: Odd Fixes
|
||||
|
||||
WAN ROUTER & SANGOMA WANPIPE DRIVERS & API (X.25, FRAME RELAY, PPP, CISCO HDLC)
|
||||
P: Nenad Corbic
|
||||
M: ncorbic@sangoma.com
|
||||
M: dm@sangoma.com
|
||||
W: http://www.sangoma.com
|
||||
S: Supported
|
||||
|
||||
WATCHDOG DEVICE DRIVERS
|
||||
P: Wim Van Sebroeck
|
||||
M: wim@iguana.be
|
||||
|
||||
@@ -410,103 +410,6 @@ config WAN_ROUTER_DRIVERS
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config VENDOR_SANGOMA
|
||||
tristate "Sangoma WANPIPE(tm) multiprotocol cards"
|
||||
depends on WAN_ROUTER_DRIVERS && WAN_ROUTER && (PCI || ISA) && BROKEN
|
||||
---help---
|
||||
Driver for S514-PCI/ISA Synchronous Data Link Adapters (SDLA).
|
||||
|
||||
WANPIPE from Sangoma Technologies Inc. <http://www.sangoma.com/>
|
||||
is a family of intelligent multiprotocol WAN adapters with data
|
||||
transfer rates up to 4Mbps. Cards support:
|
||||
|
||||
- X.25, Frame Relay, PPP, Cisco HDLC protocols.
|
||||
|
||||
- API for protocols like HDLC (LAPB), HDLC Streaming, X.25,
|
||||
Frame Relay and BiSync.
|
||||
|
||||
- Ethernet Bridging over Frame Relay protocol.
|
||||
|
||||
- MULTILINK PPP
|
||||
|
||||
- Async PPP (Modem Dialup)
|
||||
|
||||
The next questions will ask you about the protocols you want
|
||||
the driver to support.
|
||||
|
||||
If you have one or more of these cards, say M to this option;
|
||||
and read <file:Documentation/networking/wan-router.txt>.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called wanpipe.
|
||||
|
||||
config WANPIPE_CHDLC
|
||||
bool "WANPIPE Cisco HDLC support"
|
||||
depends on VENDOR_SANGOMA
|
||||
---help---
|
||||
Connect a WANPIPE card to a leased line using the Cisco HDLC.
|
||||
|
||||
- Supports Dual Port Cisco HDLC on the S514-PCI/S508-ISA cards
|
||||
which allows user to build applications using the HDLC streaming API.
|
||||
|
||||
- CHDLC Streaming MULTILINK PPP that can bind multiple WANPIPE T1
|
||||
cards into a single logical channel.
|
||||
|
||||
Say Y and the Cisco HDLC support, HDLC streaming API and
|
||||
MULTILINK PPP will be included in the driver.
|
||||
|
||||
config WANPIPE_FR
|
||||
bool "WANPIPE Frame Relay support"
|
||||
depends on VENDOR_SANGOMA
|
||||
help
|
||||
Connect a WANPIPE card to a Frame Relay network, or use Frame Relay
|
||||
API to develop custom applications.
|
||||
|
||||
Contains the Ethernet Bridging over Frame Relay feature, where
|
||||
a WANPIPE frame relay link can be directly connected to the Linux
|
||||
kernel bridge. The Frame Relay option is supported on S514-PCI
|
||||
and S508-ISA cards.
|
||||
|
||||
Say Y and the Frame Relay support will be included in the driver.
|
||||
|
||||
config WANPIPE_X25
|
||||
bool "WANPIPE X.25 support"
|
||||
depends on VENDOR_SANGOMA
|
||||
help
|
||||
Connect a WANPIPE card to an X.25 network.
|
||||
|
||||
Includes the X.25 API support for custom applications over the
|
||||
X.25 protocol. The X.25 option is supported on S514-PCI and
|
||||
S508-ISA cards.
|
||||
|
||||
Say Y and the X.25 support will be included in the driver.
|
||||
|
||||
config WANPIPE_PPP
|
||||
bool "WANPIPE PPP support"
|
||||
depends on VENDOR_SANGOMA
|
||||
help
|
||||
Connect a WANPIPE card to a leased line using Point-to-Point
|
||||
Protocol (PPP).
|
||||
|
||||
The PPP option is supported on S514-PCI/S508-ISA cards.
|
||||
|
||||
Say Y and the PPP support will be included in the driver.
|
||||
|
||||
config WANPIPE_MULTPPP
|
||||
bool "WANPIPE Multi-Port PPP support"
|
||||
depends on VENDOR_SANGOMA
|
||||
help
|
||||
Connect a WANPIPE card to a leased line using Point-to-Point
|
||||
Protocol (PPP).
|
||||
|
||||
Uses in-kernel SyncPPP protocol over the Sangoma HDLC Streaming
|
||||
adapter. In this case each Sangoma adapter port can support an
|
||||
independent PPP connection. For example, a single Quad-Port PCI
|
||||
adapter can support up to four independent PPP links. The PPP
|
||||
option is supported on S514-PCI/S508-ISA cards.
|
||||
|
||||
Say Y and the Multi-Port PPP support will be included in the driver.
|
||||
|
||||
config CYCLADES_SYNC
|
||||
tristate "Cyclom 2X(tm) cards (EXPERIMENTAL)"
|
||||
depends on WAN_ROUTER_DRIVERS && (PCI || ISA)
|
||||
|
||||
@@ -5,14 +5,6 @@
|
||||
# Rewritten to use lists instead of if-statements.
|
||||
#
|
||||
|
||||
wanpipe-y := sdlamain.o sdla_ft1.o
|
||||
wanpipe-$(CONFIG_WANPIPE_X25) += sdla_x25.o
|
||||
wanpipe-$(CONFIG_WANPIPE_FR) += sdla_fr.o
|
||||
wanpipe-$(CONFIG_WANPIPE_CHDLC) += sdla_chdlc.o
|
||||
wanpipe-$(CONFIG_WANPIPE_PPP) += sdla_ppp.o
|
||||
wanpipe-$(CONFIG_WANPIPE_MULTPPP) += wanpipe_multppp.o
|
||||
wanpipe-objs := $(wanpipe-y)
|
||||
|
||||
cyclomx-y := cycx_main.o
|
||||
cyclomx-$(CONFIG_CYCLOMX_X25) += cycx_x25.o
|
||||
cyclomx-objs := $(cyclomx-y)
|
||||
@@ -43,11 +35,6 @@ obj-$(CONFIG_LANMEDIA) += lmc/
|
||||
|
||||
obj-$(CONFIG_DLCI) += dlci.o
|
||||
obj-$(CONFIG_SDLA) += sdla.o
|
||||
ifeq ($(CONFIG_WANPIPE_MULTPPP),y)
|
||||
obj-$(CONFIG_VENDOR_SANGOMA) += sdladrv.o wanpipe.o syncppp.o
|
||||
else
|
||||
obj-$(CONFIG_VENDOR_SANGOMA) += sdladrv.o wanpipe.o
|
||||
endif
|
||||
obj-$(CONFIG_CYCLADES_SYNC) += cycx_drv.o cyclomx.o
|
||||
obj-$(CONFIG_LAPBETHER) += lapbether.o
|
||||
obj-$(CONFIG_SBNI) += sbni.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,345 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* sdla_chdlc.c WANPIPE(tm) Multiprotocol WAN Link Driver. Cisco HDLC module.
|
||||
*
|
||||
* Authors: Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Gideon Hack
|
||||
*
|
||||
* Copyright: (c) 1995-1999 Sangoma Technologies Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
* ============================================================================
|
||||
* Sep 30, 1999 Nenad Corbic Fixed dynamic IP and route setup.
|
||||
* Sep 23, 1999 Nenad Corbic Added SMP support, fixed tracing
|
||||
* Sep 13, 1999 Nenad Corbic Split up Port 0 and 1 into separate devices.
|
||||
* Jun 02, 1999 Gideon Hack Added support for the S514 adapter.
|
||||
* Oct 30, 1998 Jaspreet Singh Added Support for CHDLC API (HDLC STREAMING).
|
||||
* Oct 28, 1998 Jaspreet Singh Added Support for Dual Port CHDLC.
|
||||
* Aug 07, 1998 David Fong Initial version.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h> /* printk(), and other useful stuff */
|
||||
#include <linux/stddef.h> /* offsetof(), etc. */
|
||||
#include <linux/errno.h> /* return codes */
|
||||
#include <linux/string.h> /* inline memset(), etc. */
|
||||
#include <linux/slab.h> /* kmalloc(), kfree() */
|
||||
#include <linux/wanrouter.h> /* WAN router definitions */
|
||||
#include <linux/wanpipe.h> /* WANPIPE common user API definitions */
|
||||
#include <linux/if_arp.h> /* ARPHRD_* defines */
|
||||
#include <linux/jiffies.h> /* time_after() macro */
|
||||
|
||||
#include <linux/inetdevice.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#include <linux/in.h> /* sockaddr_in */
|
||||
#include <linux/inet.h>
|
||||
#include <linux/if.h>
|
||||
#include <asm/byteorder.h> /* htons(), etc. */
|
||||
#include <linux/sdlapci.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
#include <linux/sdla_chdlc.h> /* CHDLC firmware API definitions */
|
||||
|
||||
/****** Defines & Macros ****************************************************/
|
||||
|
||||
/* reasons for enabling the timer interrupt on the adapter */
|
||||
#define TMR_INT_ENABLED_UDP 0x0001
|
||||
#define TMR_INT_ENABLED_UPDATE 0x0002
|
||||
|
||||
#define CHDLC_DFLT_DATA_LEN 1500 /* default MTU */
|
||||
#define CHDLC_HDR_LEN 1
|
||||
|
||||
#define IFF_POINTTOPOINT 0x10
|
||||
|
||||
#define WANPIPE 0x00
|
||||
#define API 0x01
|
||||
#define CHDLC_API 0x01
|
||||
|
||||
#define PORT(x) (x == 0 ? "PRIMARY" : "SECONDARY" )
|
||||
|
||||
|
||||
/******Data Structures*****************************************************/
|
||||
|
||||
/* This structure is placed in the private data area of the device structure.
|
||||
* The card structure used to occupy the private area but now the following
|
||||
* structure will incorporate the card structure along with CHDLC specific data
|
||||
*/
|
||||
|
||||
typedef struct chdlc_private_area
|
||||
{
|
||||
struct net_device *slave;
|
||||
sdla_t *card;
|
||||
int TracingEnabled; /* For enabling Tracing */
|
||||
unsigned long curr_trace_addr; /* Used for Tracing */
|
||||
unsigned long start_trace_addr;
|
||||
unsigned long end_trace_addr;
|
||||
unsigned long base_addr_trace_buffer;
|
||||
unsigned long end_addr_trace_buffer;
|
||||
unsigned short number_trace_elements;
|
||||
unsigned available_buffer_space;
|
||||
unsigned long router_start_time;
|
||||
unsigned char route_status;
|
||||
unsigned char route_removed;
|
||||
unsigned long tick_counter; /* For 5s timeout counter */
|
||||
unsigned long router_up_time;
|
||||
u32 IP_address; /* IP addressing */
|
||||
u32 IP_netmask;
|
||||
unsigned char mc; /* Mulitcast support on/off */
|
||||
unsigned short udp_pkt_lgth; /* udp packet processing */
|
||||
char udp_pkt_src;
|
||||
char udp_pkt_data[MAX_LGTH_UDP_MGNT_PKT];
|
||||
unsigned short timer_int_enabled;
|
||||
char update_comms_stats; /* updating comms stats */
|
||||
//FIXME: add driver stats as per frame relay!
|
||||
|
||||
} chdlc_private_area_t;
|
||||
|
||||
/* Route Status options */
|
||||
#define NO_ROUTE 0x00
|
||||
#define ADD_ROUTE 0x01
|
||||
#define ROUTE_ADDED 0x02
|
||||
#define REMOVE_ROUTE 0x03
|
||||
|
||||
|
||||
/****** Function Prototypes *************************************************/
|
||||
/* WAN link driver entry points. These are called by the WAN router module. */
|
||||
static int wpft1_exec (struct sdla *card, void *u_cmd, void *u_data);
|
||||
static int chdlc_read_version (sdla_t* card, char* str);
|
||||
static int chdlc_error (sdla_t *card, int err, CHDLC_MAILBOX_STRUCT *mb);
|
||||
|
||||
/****** Public Functions ****************************************************/
|
||||
|
||||
/*============================================================================
|
||||
* Cisco HDLC protocol initialization routine.
|
||||
*
|
||||
* This routine is called by the main WANPIPE module during setup. At this
|
||||
* point adapter is completely initialized and firmware is running.
|
||||
* o read firmware version (to make sure it's alive)
|
||||
* o configure adapter
|
||||
* o initialize protocol-specific fields of the adapter data space.
|
||||
*
|
||||
* Return: 0 o.k.
|
||||
* < 0 failure.
|
||||
*/
|
||||
int wpft1_init (sdla_t* card, wandev_conf_t* conf)
|
||||
{
|
||||
unsigned char port_num;
|
||||
int err;
|
||||
|
||||
union
|
||||
{
|
||||
char str[80];
|
||||
} u;
|
||||
volatile CHDLC_MAILBOX_STRUCT* mb;
|
||||
CHDLC_MAILBOX_STRUCT* mb1;
|
||||
unsigned long timeout;
|
||||
|
||||
/* Verify configuration ID */
|
||||
if (conf->config_id != WANCONFIG_CHDLC) {
|
||||
printk(KERN_INFO "%s: invalid configuration ID %u!\n",
|
||||
card->devname, conf->config_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Use primary port */
|
||||
card->u.c.comm_port = 0;
|
||||
|
||||
|
||||
/* Initialize protocol-specific fields */
|
||||
if(card->hw.type != SDLA_S514){
|
||||
card->mbox = (void *) card->hw.dpmbase;
|
||||
}else{
|
||||
card->mbox = (void *) card->hw.dpmbase + PRI_BASE_ADDR_MB_STRUCT;
|
||||
}
|
||||
|
||||
mb = mb1 = card->mbox;
|
||||
|
||||
if (!card->configured){
|
||||
|
||||
/* The board will place an 'I' in the return code to indicate that it is
|
||||
ready to accept commands. We expect this to be completed in less
|
||||
than 1 second. */
|
||||
|
||||
timeout = jiffies;
|
||||
while (mb->return_code != 'I') /* Wait 1s for board to initialize */
|
||||
if (time_after(jiffies, timeout + 1*HZ)) break;
|
||||
|
||||
if (mb->return_code != 'I') {
|
||||
printk(KERN_INFO
|
||||
"%s: Initialization not completed by adapter\n",
|
||||
card->devname);
|
||||
printk(KERN_INFO "Please contact Sangoma representative.\n");
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
/* Read firmware version. Note that when adapter initializes, it
|
||||
* clears the mailbox, so it may appear that the first command was
|
||||
* executed successfully when in fact it was merely erased. To work
|
||||
* around this, we execute the first command twice.
|
||||
*/
|
||||
|
||||
if (chdlc_read_version(card, u.str))
|
||||
return -EIO;
|
||||
|
||||
printk(KERN_INFO "%s: Running FT1 Configuration firmware v%s\n",
|
||||
card->devname, u.str);
|
||||
|
||||
card->isr = NULL;
|
||||
card->poll = NULL;
|
||||
card->exec = &wpft1_exec;
|
||||
card->wandev.update = NULL;
|
||||
card->wandev.new_if = NULL;
|
||||
card->wandev.del_if = NULL;
|
||||
card->wandev.state = WAN_DUALPORT;
|
||||
card->wandev.udp_port = conf->udp_port;
|
||||
|
||||
card->wandev.new_if_cnt = 0;
|
||||
|
||||
/* This is for the ports link state */
|
||||
card->u.c.state = WAN_DISCONNECTED;
|
||||
|
||||
/* reset the number of times the 'update()' proc has been called */
|
||||
card->u.c.update_call_count = 0;
|
||||
|
||||
card->wandev.ttl = 0x7F;
|
||||
card->wandev.interface = 0;
|
||||
|
||||
card->wandev.clocking = 0;
|
||||
|
||||
port_num = card->u.c.comm_port;
|
||||
|
||||
/* Setup Port Bps */
|
||||
|
||||
card->wandev.bps = 0;
|
||||
|
||||
card->wandev.mtu = MIN_LGTH_CHDLC_DATA_CFG;
|
||||
|
||||
/* Set up the interrupt status area */
|
||||
/* Read the CHDLC Configuration and obtain:
|
||||
* Ptr to shared memory infor struct
|
||||
* Use this pointer to calculate the value of card->u.c.flags !
|
||||
*/
|
||||
mb1->buffer_length = 0;
|
||||
mb1->command = READ_CHDLC_CONFIGURATION;
|
||||
err = sdla_exec(mb1) ? mb1->return_code : CMD_TIMEOUT;
|
||||
if(err != COMMAND_OK) {
|
||||
chdlc_error(card, err, mb1);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if(card->hw.type == SDLA_S514){
|
||||
card->u.c.flags = (void *)(card->hw.dpmbase +
|
||||
(((CHDLC_CONFIGURATION_STRUCT *)mb1->data)->
|
||||
ptr_shared_mem_info_struct));
|
||||
}else{
|
||||
card->u.c.flags = (void *)(card->hw.dpmbase +
|
||||
(((CHDLC_CONFIGURATION_STRUCT *)mb1->data)->
|
||||
ptr_shared_mem_info_struct % SDLA_WINDOWSIZE));
|
||||
}
|
||||
|
||||
card->wandev.state = WAN_FT1_READY;
|
||||
printk(KERN_INFO "%s: FT1 Config Ready !\n",card->devname);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wpft1_exec(sdla_t *card, void *u_cmd, void *u_data)
|
||||
{
|
||||
CHDLC_MAILBOX_STRUCT* mbox = card->mbox;
|
||||
int len;
|
||||
|
||||
if (copy_from_user((void*)&mbox->command, u_cmd, sizeof(ft1_exec_cmd_t))){
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
len = mbox->buffer_length;
|
||||
|
||||
if (len) {
|
||||
if( copy_from_user((void*)&mbox->data, u_data, len)){
|
||||
return -EFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
/* execute command */
|
||||
if (!sdla_exec(mbox)){
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
/* return result */
|
||||
if( copy_to_user(u_cmd, (void*)&mbox->command, sizeof(ft1_exec_cmd_t))){
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
len = mbox->buffer_length;
|
||||
|
||||
if (len && u_data && copy_to_user(u_data, (void*)&mbox->data, len)){
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/*============================================================================
|
||||
* Read firmware code version.
|
||||
* Put code version as ASCII string in str.
|
||||
*/
|
||||
static int chdlc_read_version (sdla_t* card, char* str)
|
||||
{
|
||||
CHDLC_MAILBOX_STRUCT* mb = card->mbox;
|
||||
int len;
|
||||
char err;
|
||||
mb->buffer_length = 0;
|
||||
mb->command = READ_CHDLC_CODE_VERSION;
|
||||
err = sdla_exec(mb) ? mb->return_code : CMD_TIMEOUT;
|
||||
|
||||
if(err != COMMAND_OK) {
|
||||
chdlc_error(card,err,mb);
|
||||
}
|
||||
else if (str) { /* is not null */
|
||||
len = mb->buffer_length;
|
||||
memcpy(str, mb->data, len);
|
||||
str[len] = '\0';
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
/*============================================================================
|
||||
* Firmware error handler.
|
||||
* This routine is called whenever firmware command returns non-zero
|
||||
* return code.
|
||||
*
|
||||
* Return zero if previous command has to be cancelled.
|
||||
*/
|
||||
static int chdlc_error (sdla_t *card, int err, CHDLC_MAILBOX_STRUCT *mb)
|
||||
{
|
||||
unsigned cmd = mb->command;
|
||||
|
||||
switch (err) {
|
||||
|
||||
case CMD_TIMEOUT:
|
||||
printk(KERN_ERR "%s: command 0x%02X timed out!\n",
|
||||
card->devname, cmd);
|
||||
break;
|
||||
|
||||
case S514_BOTH_PORTS_SAME_CLK_MODE:
|
||||
if(cmd == SET_CHDLC_CONFIGURATION) {
|
||||
printk(KERN_INFO
|
||||
"%s: Configure both ports for the same clock source\n",
|
||||
card->devname);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
printk(KERN_INFO "%s: command 0x%02X returned 0x%02X!\n",
|
||||
card->devname, cmd, err);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,226 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* sdla_asy.h Header file for the Sangoma S508/S514 asynchronous code API
|
||||
*
|
||||
* Author: Gideon Hack
|
||||
*
|
||||
* Copyright: (c) 2000 Sangoma Technologies Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
* ============================================================================
|
||||
*
|
||||
* Jan 28, 2000 Gideon Hack Initial Version
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef _WANPIPE_ASYNC_H
|
||||
#define _WANPIPE_ASYNC_H
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Interface commands
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
#define SET_ASY_CONFIGURATION 0xE2 /* set the asychronous operational configuration */
|
||||
#define READ_ASY_CONFIGURATION 0xE3 /* read the current asychronous operational configuration */
|
||||
#define ENABLE_ASY_COMMUNICATIONS 0xE4 /* enable asychronous communications */
|
||||
#define DISABLE_ASY_COMMUNICATIONS 0xE5 /* disable asychronous communications */
|
||||
#define READ_ASY_OPERATIONAL_STATS 0xE7 /* retrieve the asychronous operational statistics */
|
||||
#define FLUSH_ASY_OPERATIONAL_STATS 0xE8 /* flush the asychronous operational statistics */
|
||||
#define TRANSMIT_ASY_BREAK_SIGNAL 0xEC /* transmit an asychronous break signal */
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Return codes from interface commands
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
#define COMMAND_INVALID_FOR_PORT 0x50 /* the command is invalid for the selected port */
|
||||
#define DISABLE_ASY_COMMS_BEFORE_CFG 0xE1 /* communications must be disabled before setting the configuration */
|
||||
#define ASY_COMMS_ENABLED 0xE1 /* communications are currently enabled */
|
||||
#define ASY_COMMS_DISABLED 0xE1 /* communications are currently disabled */
|
||||
#define ASY_CFG_BEFORE_COMMS_ENABLED 0xE2 /* perform a SET_ASY_CONFIGURATION before enabling comms */
|
||||
#define LGTH_ASY_CFG_DATA_INVALID 0xE2 /* the length of the passed configuration data is invalid */
|
||||
#define INVALID_ASY_CFG_DATA 0xE3 /* the passed configuration data is invalid */
|
||||
#define ASY_BREAK_SIGNAL_BUSY 0xEC /* a break signal is being transmitted */
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Constants for the SET_ASY_CONFIGURATION/READ_ASY_CONFIGURATION command
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
/* the asynchronous configuration structure */
|
||||
typedef struct {
|
||||
unsigned long baud_rate PACKED; /* the baud rate */
|
||||
unsigned short line_config_options PACKED; /* line configuration options */
|
||||
unsigned short modem_config_options PACKED; /* modem configuration options */
|
||||
unsigned short asy_API_options PACKED; /* asynchronous API options */
|
||||
unsigned short asy_protocol_options PACKED; /* asynchronous protocol options */
|
||||
unsigned short Tx_bits_per_char PACKED; /* number of bits per tx character */
|
||||
unsigned short Rx_bits_per_char PACKED; /* number of bits per received character */
|
||||
unsigned short stop_bits PACKED; /* number of stop bits per character */
|
||||
unsigned short parity PACKED; /* parity definition */
|
||||
unsigned short break_timer PACKED; /* the break signal timer */
|
||||
unsigned short asy_Rx_inter_char_timer PACKED; /* the receive inter-character timer */
|
||||
unsigned short asy_Rx_complete_length PACKED; /* the receive 'buffer complete' length */
|
||||
unsigned short XON_char PACKED; /* the XON character */
|
||||
unsigned short XOFF_char PACKED; /* the XOFF character */
|
||||
unsigned short asy_statistics_options PACKED; /* async operational stat options */
|
||||
unsigned long ptr_shared_mem_info_struct PACKED;/* ptr to the shared memory area information structure */
|
||||
unsigned long ptr_asy_Tx_stat_el_cfg_struct PACKED;/* ptr to the transmit status element configuration structure */
|
||||
unsigned long ptr_asy_Rx_stat_el_cfg_struct PACKED;/* ptr to the receive status element configuration structure */
|
||||
} ASY_CONFIGURATION_STRUCT;
|
||||
|
||||
/* permitted minimum and maximum values for setting the asynchronous configuration */
|
||||
#define MIN_ASY_BAUD_RATE 50 /* maximum baud rate */
|
||||
#define MAX_ASY_BAUD_RATE 250000 /* minimum baud rate */
|
||||
#define MIN_ASY_BITS_PER_CHAR 5 /* minimum number of bits per character */
|
||||
#define MAX_ASY_BITS_PER_CHAR 8 /* maximum number of bits per character */
|
||||
#define MIN_BREAK_TMR_VAL 0 /* minimum break signal timer */
|
||||
#define MAX_BREAK_TMR_VAL 5000 /* maximum break signal timer */
|
||||
#define MIN_ASY_RX_INTER_CHAR_TMR 0 /* minimum receive inter-character timer */
|
||||
#define MAX_ASY_RX_INTER_CHAR_TMR 30000 /* maximum receive inter-character timer */
|
||||
#define MIN_ASY_RX_CPLT_LENGTH 0 /* minimum receive 'length complete' value */
|
||||
#define MAX_ASY_RX_CPLT_LENGTH 2000 /* maximum receive 'length complete' value */
|
||||
|
||||
/* bit settings for the 'asy_API_options' */
|
||||
#define ASY_RX_DATA_TRANSPARENT 0x0001 /* do not strip parity and unused bits from received characters */
|
||||
|
||||
/* bit settings for the 'asy_protocol_options' */
|
||||
#define ASY_RTS_HS_FOR_RX 0x0001 /* RTS handshaking is used for reception control */
|
||||
#define ASY_XON_XOFF_HS_FOR_RX 0x0002 /* XON/XOFF handshaking is used for reception control */
|
||||
#define ASY_XON_XOFF_HS_FOR_TX 0x0004 /* XON/XOFF handshaking is used for transmission control */
|
||||
#define ASY_DCD_HS_FOR_TX 0x0008 /* DCD handshaking is used for transmission control */
|
||||
#define ASY_CTS_HS_FOR_TX 0x0020 /* CTS handshaking is used for transmission control */
|
||||
|
||||
/* bit settings for the 'stop_bits' definition */
|
||||
#define ONE_STOP_BIT 1 /* representation for 1 stop bit */
|
||||
#define TWO_STOP_BITS 2 /* representation for 2 stop bits */
|
||||
#define ONE_AND_A_HALF_STOP_BITS 3 /* representation for 1.5 stop bits */
|
||||
|
||||
/* bit settings for the 'parity' definition */
|
||||
#define NO_PARITY 0 /* representation for no parity */
|
||||
#define ODD_PARITY 1 /* representation for odd parity */
|
||||
#define EVEN_PARITY 2 /* representation for even parity */
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Constants for the READ_COMMS_ERROR_STATS command (asynchronous mode)
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
/* the communications error statistics structure */
|
||||
typedef struct {
|
||||
unsigned short Rx_overrun_err_count PACKED; /* receiver overrun error count */
|
||||
unsigned short Rx_parity_err_count PACKED; /* parity errors received count */
|
||||
unsigned short Rx_framing_err_count PACKED; /* framing errors received count */
|
||||
unsigned short comms_err_stat_reserved_1 PACKED;/* reserved for later use */
|
||||
unsigned short comms_err_stat_reserved_2 PACKED;/* reserved for later use */
|
||||
unsigned short comms_err_stat_reserved_3 PACKED;/* reserved for later use */
|
||||
unsigned short comms_err_stat_reserved_4 PACKED;/* reserved for later use */
|
||||
unsigned short comms_err_stat_reserved_5 PACKED;/* reserved for later use */
|
||||
unsigned short DCD_state_change_count PACKED; /* DCD state change count */
|
||||
unsigned short CTS_state_change_count PACKED; /* CTS state change count */
|
||||
} ASY_COMMS_ERROR_STATS_STRUCT;
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Constants for the READ_ASY_OPERATIONAL_STATS command
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
/* the asynchronous operational statistics structure */
|
||||
typedef struct {
|
||||
|
||||
/* Data transmission statistics */
|
||||
unsigned long Data_blocks_Tx_count PACKED;/* number of blocks transmitted */
|
||||
unsigned long Data_bytes_Tx_count PACKED;/* number of bytes transmitted */
|
||||
unsigned long Data_Tx_throughput PACKED;/* transmit throughput */
|
||||
unsigned long no_ms_for_Data_Tx_thruput_comp PACKED;/* millisecond time used for the Tx throughput computation */
|
||||
unsigned long Tx_Data_discard_lgth_err_count PACKED;/* number of Data blocks discarded (length error) */
|
||||
unsigned long reserved_Data_frm_Tx_stat1 PACKED;/* reserved for later use */
|
||||
unsigned long reserved_Data_frm_Tx_stat2 PACKED;/* reserved for later use */
|
||||
unsigned long reserved_Data_frm_Tx_stat3 PACKED;/* reserved for later use */
|
||||
|
||||
/* Data reception statistics */
|
||||
unsigned long Data_blocks_Rx_count PACKED;/* number of blocks received */
|
||||
unsigned long Data_bytes_Rx_count PACKED;/* number of bytes received */
|
||||
unsigned long Data_Rx_throughput PACKED;/* receive throughput */
|
||||
unsigned long no_ms_for_Data_Rx_thruput_comp PACKED;/* millisecond time used for the Rx throughput computation */
|
||||
unsigned long Rx_Data_bytes_discard_count PACKED;/* received Data bytes discarded */
|
||||
unsigned long reserved_Data_frm_Rx_stat1 PACKED;/* reserved for later use */
|
||||
|
||||
/* handshaking protocol statistics */
|
||||
unsigned short XON_chars_Tx_count PACKED; /* number of XON characters transmitted */
|
||||
unsigned short XOFF_chars_Tx_count PACKED; /* number of XOFF characters transmitted */
|
||||
unsigned short XON_chars_Rx_count PACKED; /* number of XON characters received */
|
||||
unsigned short XOFF_chars_Rx_count PACKED; /* number of XOFF characters received */
|
||||
unsigned short Tx_halt_modem_low_count PACKED; /* number of times Tx halted (modem line low) */
|
||||
unsigned short Rx_halt_RTS_low_count PACKED; /* number of times Rx halted by setting RTS low */
|
||||
unsigned long reserved_handshaking_stat1 PACKED;/* reserved for later use */
|
||||
|
||||
/* break statistics */
|
||||
unsigned short break_Tx_count PACKED; /* number of break sequences transmitted */
|
||||
unsigned short break_Rx_count PACKED; /* number of break sequences received */
|
||||
unsigned long reserved_break_stat1 PACKED;/* reserved for later use */
|
||||
|
||||
/* miscellaneous statistics */
|
||||
unsigned long reserved_misc_stat1 PACKED; /* reserved for later use */
|
||||
unsigned long reserved_misc_stat2 PACKED; /* reserved for later use */
|
||||
|
||||
} ASY_OPERATIONAL_STATS_STRUCT;
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Constants for Data transmission
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
/* the Data block transmit status element configuration structure */
|
||||
typedef struct {
|
||||
unsigned short number_Tx_status_elements PACKED; /* number of transmit status elements */
|
||||
unsigned long base_addr_Tx_status_elements PACKED; /* base address of the transmit element list */
|
||||
unsigned long next_Tx_status_element_to_use PACKED; /* pointer to the next transmit element to be used */
|
||||
} ASY_TX_STATUS_EL_CFG_STRUCT;
|
||||
|
||||
|
||||
/* the Data block transmit status element structure */
|
||||
typedef struct {
|
||||
unsigned char opp_flag PACKED; /* opp flag */
|
||||
unsigned short data_length PACKED; /* length of the block to be transmitted */
|
||||
unsigned char reserved_1 PACKED; /* reserved for internal use */
|
||||
unsigned long reserved_2 PACKED; /* reserved for internal use */
|
||||
unsigned long reserved_3 PACKED; /* reserved for internal use */
|
||||
unsigned long ptr_data_bfr PACKED; /* pointer to the data area */
|
||||
} ASY_DATA_TX_STATUS_EL_STRUCT;
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Constants for Data reception
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
/* the Data block receive status element configuration structure */
|
||||
typedef struct {
|
||||
unsigned short number_Rx_status_elements PACKED;/* number of receive status elements */
|
||||
unsigned long base_addr_Rx_status_elements PACKED;/* base address of the receive element list */
|
||||
unsigned long next_Rx_status_element_to_use PACKED;/* pointer to the next receive element to be used */
|
||||
unsigned long base_addr_Rx_buffer PACKED;/* base address of the receive data buffer */
|
||||
unsigned long end_addr_Rx_buffer PACKED;/* end address of the receive data buffer */
|
||||
} ASY_RX_STATUS_EL_CFG_STRUCT;
|
||||
|
||||
/* the Data block receive status element structure */
|
||||
typedef struct {
|
||||
unsigned char opp_flag PACKED; /* opp flag */
|
||||
unsigned short data_length PACKED; /* length of the received data block */
|
||||
unsigned char reserved_1 PACKED; /* reserved for internal use */
|
||||
unsigned short time_stamp PACKED; /* receive time stamp (HDLC_STREAMING_MODE) */
|
||||
unsigned short data_buffered PACKED; /* the number of data bytes still buffered */
|
||||
unsigned long reserved_2 PACKED; /* reserved for internal use */
|
||||
unsigned long ptr_data_bfr PACKED; /* pointer to the data area */
|
||||
} ASY_DATA_RX_STATUS_EL_STRUCT;
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,66 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* sdladrv.h SDLA Support Module. Kernel API Definitions.
|
||||
*
|
||||
* Author: Gideon Hack
|
||||
*
|
||||
* Copyright: (c) 1995-2000 Sangoma Technologies Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
* ============================================================================
|
||||
* Jun 02, 1999 Gideon Hack Added support for the S514 PCI adapter.
|
||||
* Dec 11, 1996 Gene Kozin Complete overhaul.
|
||||
* Oct 17, 1996 Gene Kozin Minor bug fixes.
|
||||
* Jun 12, 1996 Gene Kozin Added support for S503 card.
|
||||
* Dec 06, 1995 Gene Kozin Initial version.
|
||||
*****************************************************************************/
|
||||
#ifndef _SDLADRV_H
|
||||
#define _SDLADRV_H
|
||||
|
||||
|
||||
#define SDLA_MAXIORANGE 4 /* maximum I/O port range */
|
||||
#define SDLA_WINDOWSIZE 0x2000 /* default dual-port memory window size */
|
||||
/****** Data Structures *****************************************************/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Adapter hardware configuration. Pointer to this structure is passed to all
|
||||
* APIs.
|
||||
*/
|
||||
typedef struct sdlahw
|
||||
{
|
||||
unsigned type; /* adapter type */
|
||||
unsigned fwid; /* firmware ID */
|
||||
unsigned port; /* adapter I/O port base */
|
||||
int irq; /* interrupt request level */
|
||||
char S514_cpu_no[1]; /* PCI CPU Number */
|
||||
unsigned char S514_slot_no; /* PCI Slot Number */
|
||||
char auto_pci_cfg; /* Autodetect PCI Slot */
|
||||
struct pci_dev *pci_dev; /* PCI device */
|
||||
void * dpmbase; /* dual-port memory base */
|
||||
unsigned dpmsize; /* dual-port memory size */
|
||||
unsigned pclk; /* CPU clock rate, kHz */
|
||||
unsigned long memory; /* memory size */
|
||||
unsigned long vector; /* local offset of the DPM window */
|
||||
unsigned io_range; /* I/O port range */
|
||||
unsigned char regs[SDLA_MAXIORANGE]; /* was written to registers */
|
||||
unsigned reserved[5];
|
||||
} sdlahw_t;
|
||||
|
||||
/****** Function Prototypes *************************************************/
|
||||
|
||||
extern int sdla_setup (sdlahw_t* hw, void* sfm, unsigned len);
|
||||
extern int sdla_down (sdlahw_t* hw);
|
||||
extern void S514_intack (sdlahw_t* hw, u32 int_status);
|
||||
extern void read_S514_int_stat (sdlahw_t* hw, u32* int_status);
|
||||
extern int sdla_mapmem (sdlahw_t* hw, unsigned long addr);
|
||||
extern int sdla_peek (sdlahw_t* hw, unsigned long addr, void* buf,
|
||||
unsigned len);
|
||||
extern int sdla_poke (sdlahw_t* hw, unsigned long addr, void* buf,
|
||||
unsigned len);
|
||||
extern int sdla_exec (void* opflag);
|
||||
|
||||
extern unsigned wanpipe_hw_probe(void);
|
||||
|
||||
#endif /* _SDLADRV_H */
|
||||
@@ -1,72 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* sdlapci.h WANPIPE(tm) Multiprotocol WAN Link Driver.
|
||||
* Definitions for the SDLA PCI adapter.
|
||||
*
|
||||
* Author: Gideon Hack <ghack@sangoma.com>
|
||||
*
|
||||
* Copyright: (c) 1999-2000 Sangoma Technologies Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
* ============================================================================
|
||||
* Jun 02, 1999 Gideon Hack Initial version.
|
||||
*****************************************************************************/
|
||||
#ifndef _SDLAPCI_H
|
||||
#define _SDLAPCI_H
|
||||
|
||||
/****** Defines *************************************************************/
|
||||
|
||||
/* Definitions for identifying and finding S514 PCI adapters */
|
||||
#define V3_VENDOR_ID 0x11B0 /* V3 vendor ID number */
|
||||
#define V3_DEVICE_ID 0x0002 /* V3 device ID number */
|
||||
#define SANGOMA_SUBSYS_VENDOR 0x4753 /* ID for Sangoma */
|
||||
#define PCI_DEV_SLOT_MASK 0x1F /* mask for slot numbering */
|
||||
#define PCI_IRQ_NOT_ALLOCATED 0xFF /* interrupt line for no IRQ */
|
||||
|
||||
/* Local PCI register offsets */
|
||||
#define PCI_VENDOR_ID_WORD 0x00 /* vendor ID */
|
||||
#define PCI_IO_BASE_DWORD 0x10 /* IO base */
|
||||
#define PCI_MEM_BASE0_DWORD 0x14 /* memory base - apperture 0 */
|
||||
#define PCI_MEM_BASE1_DWORD 0x18 /* memory base - apperture 1 */
|
||||
#define PCI_SUBSYS_VENDOR_WORD 0x2C /* subsystem vendor ID */
|
||||
#define PCI_INT_LINE_BYTE 0x3C /* interrupt line */
|
||||
#define PCI_INT_PIN_BYTE 0x3D /* interrupt pin */
|
||||
#define PCI_MAP0_DWORD 0x40 /* PCI to local bus address 0 */
|
||||
#define PCI_MAP1_DWORD 0x44 /* PCI to local bus address 1 */
|
||||
#define PCI_INT_STATUS 0x48 /* interrupt status */
|
||||
#define PCI_INT_CONFIG 0x4C /* interrupt configuration */
|
||||
|
||||
/* Local PCI register usage */
|
||||
#define PCI_MEMORY_ENABLE 0x00000003 /* enable PCI memory */
|
||||
#define PCI_CPU_A_MEM_DISABLE 0x00000002 /* disable CPU A memory */
|
||||
#define PCI_CPU_B_MEM_DISABLE 0x00100002 /* disable CPU B memory */
|
||||
#define PCI_ENABLE_IRQ_CPU_A 0x005A0004 /* enable IRQ for CPU A */
|
||||
#define PCI_ENABLE_IRQ_CPU_B 0x005A0008 /* enable IRQ for CPU B */
|
||||
#define PCI_DISABLE_IRQ_CPU_A 0x00000004 /* disable IRQ for CPU A */
|
||||
#define PCI_DISABLE_IRQ_CPU_B 0x00000008 /* disable IRQ for CPU B */
|
||||
|
||||
/* Setting for the Interrupt Status register */
|
||||
#define IRQ_CPU_A 0x04 /* IRQ for CPU A */
|
||||
#define IRQ_CPU_B 0x08 /* IRQ for CPU B */
|
||||
|
||||
/* The maximum size of the S514 memory */
|
||||
#define MAX_SIZEOF_S514_MEMORY (256 * 1024)
|
||||
|
||||
/* S514 control register offsets within the memory address space */
|
||||
#define S514_CTRL_REG_BYTE 0x80000
|
||||
|
||||
/* S514 adapter control bytes */
|
||||
#define S514_CPU_HALT 0x00
|
||||
#define S514_CPU_START 0x01
|
||||
|
||||
/* The maximum number of S514 adapters supported */
|
||||
#define MAX_S514_CARDS 20
|
||||
|
||||
#define PCI_CARD_TYPE 0x2E
|
||||
#define S514_DUAL_CPU 0x12
|
||||
#define S514_SINGLE_CPU 0x11
|
||||
|
||||
#endif /* _SDLAPCI_H */
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* sdlasfm.h WANPIPE(tm) Multiprotocol WAN Link Driver.
|
||||
* Definitions for the SDLA Firmware Module (SFM).
|
||||
*
|
||||
* Author: Gideon Hack
|
||||
*
|
||||
* Copyright: (c) 1995-1999 Sangoma Technologies Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
* ============================================================================
|
||||
* Jun 02, 1999 Gideon Hack Added support for the S514 adapter.
|
||||
* Dec 11, 1996 Gene Kozin Cosmetic changes
|
||||
* Apr 16, 1996 Gene Kozin Changed adapter & firmware IDs. Version 2
|
||||
* Dec 15, 1995 Gene Kozin Structures chaned
|
||||
* Nov 09, 1995 Gene Kozin Initial version.
|
||||
*****************************************************************************/
|
||||
#ifndef _SDLASFM_H
|
||||
#define _SDLASFM_H
|
||||
|
||||
/****** Defines *************************************************************/
|
||||
|
||||
#define SFM_VERSION 2
|
||||
#define SFM_SIGNATURE "SFM - Sangoma SDLA Firmware Module"
|
||||
|
||||
/* min/max */
|
||||
#define SFM_IMAGE_SIZE 0x8000 /* max size of SDLA code image file */
|
||||
#define SFM_DESCR_LEN 256 /* max length of description string */
|
||||
#define SFM_MAX_SDLA 16 /* max number of compatible adapters */
|
||||
|
||||
/* Adapter types */
|
||||
#define SDLA_S502A 5020
|
||||
#define SDLA_S502E 5021
|
||||
#define SDLA_S503 5030
|
||||
#define SDLA_S508 5080
|
||||
#define SDLA_S507 5070
|
||||
#define SDLA_S509 5090
|
||||
#define SDLA_S514 5140
|
||||
|
||||
/* S514 PCI adapter CPU numbers */
|
||||
#define S514_CPU_A 'A'
|
||||
#define S514_CPU_B 'B'
|
||||
|
||||
|
||||
/* Firmware identification numbers:
|
||||
* 0 .. 999 Test & Diagnostics
|
||||
* 1000 .. 1999 Streaming HDLC
|
||||
* 2000 .. 2999 Bisync
|
||||
* 3000 .. 3999 SDLC
|
||||
* 4000 .. 4999 HDLC
|
||||
* 5000 .. 5999 X.25
|
||||
* 6000 .. 6999 Frame Relay
|
||||
* 7000 .. 7999 PPP
|
||||
* 8000 .. 8999 Cisco HDLC
|
||||
*/
|
||||
#define SFID_CALIB502 200
|
||||
#define SFID_STRM502 1200
|
||||
#define SFID_STRM508 1800
|
||||
#define SFID_BSC502 2200
|
||||
#define SFID_SDLC502 3200
|
||||
#define SFID_HDLC502 4200
|
||||
#define SFID_HDLC508 4800
|
||||
#define SFID_X25_502 5200
|
||||
#define SFID_X25_508 5800
|
||||
#define SFID_FR502 6200
|
||||
#define SFID_FR508 6800
|
||||
#define SFID_PPP502 7200
|
||||
#define SFID_PPP508 7800
|
||||
#define SFID_PPP514 7140
|
||||
#define SFID_CHDLC508 8800
|
||||
#define SFID_CHDLC514 8140
|
||||
|
||||
/****** Data Types **********************************************************/
|
||||
|
||||
typedef struct sfm_info /* firmware module information */
|
||||
{
|
||||
unsigned short codeid; /* firmware ID */
|
||||
unsigned short version; /* firmaware version number */
|
||||
unsigned short adapter[SFM_MAX_SDLA]; /* compatible adapter types */
|
||||
unsigned long memsize; /* minimum memory size */
|
||||
unsigned short reserved[2]; /* reserved */
|
||||
unsigned short startoffs; /* entry point offset */
|
||||
unsigned short winoffs; /* dual-port memory window offset */
|
||||
unsigned short codeoffs; /* code load offset */
|
||||
unsigned short codesize; /* code size */
|
||||
unsigned short dataoffs; /* configuration data load offset */
|
||||
unsigned short datasize; /* configuration data size */
|
||||
} sfm_info_t;
|
||||
|
||||
typedef struct sfm /* SDLA firmware file structire */
|
||||
{
|
||||
char signature[80]; /* SFM file signature */
|
||||
unsigned short version; /* file format version */
|
||||
unsigned short checksum; /* info + image */
|
||||
unsigned short reserved[6]; /* reserved */
|
||||
char descr[SFM_DESCR_LEN]; /* description string */
|
||||
sfm_info_t info; /* firmware module info */
|
||||
unsigned char image[1]; /* code image (variable size) */
|
||||
} sfm_t;
|
||||
|
||||
#endif /* _SDLASFM_H */
|
||||
|
||||
@@ -1,483 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* wanpipe.h WANPIPE(tm) Multiprotocol WAN Link Driver.
|
||||
* User-level API definitions.
|
||||
*
|
||||
* Author: Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Gideon Hack
|
||||
*
|
||||
* Copyright: (c) 1995-2000 Sangoma Technologies Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
* ============================================================================
|
||||
* Nov 3, 2000 Nenad Corbic Added config_id to sdla_t structure.
|
||||
* Used to determine the protocol running.
|
||||
* Jul 13, 2000 Nenad Corbic Added SyncPPP Support
|
||||
* Feb 24, 2000 Nenad Corbic Added support for x25api driver
|
||||
* Oct 04, 1999 Nenad Corbic New CHDLC and FRAME RELAY code, SMP support
|
||||
* Jun 02, 1999 Gideon Hack Added 'update_call_count' for Cisco HDLC
|
||||
* support
|
||||
* Jun 26, 1998 David Fong Added 'ip_mode' in sdla_t.u.p for dynamic IP
|
||||
* routing mode configuration
|
||||
* Jun 12, 1998 David Fong Added Cisco HDLC union member in sdla_t
|
||||
* Dec 08, 1997 Jaspreet Singh Added 'authenticator' in union of 'sdla_t'
|
||||
* Nov 26, 1997 Jaspreet Singh Added 'load_sharing' structure. Also added
|
||||
* 'devs_struct','dev_to_devtint_next' to 'sdla_t'
|
||||
* Nov 24, 1997 Jaspreet Singh Added 'irq_dis_if_send_count',
|
||||
* 'irq_dis_poll_count' to 'sdla_t'.
|
||||
* Nov 06, 1997 Jaspreet Singh Added a define called 'INTR_TEST_MODE'
|
||||
* Oct 20, 1997 Jaspreet Singh Added 'buff_intr_mode_unbusy' and
|
||||
* 'dlci_intr_mode_unbusy' to 'sdla_t'
|
||||
* Oct 18, 1997 Jaspreet Singh Added structure to maintain global driver
|
||||
* statistics.
|
||||
* Jan 15, 1997 Gene Kozin Version 3.1.0
|
||||
* o added UDP management stuff
|
||||
* Jan 02, 1997 Gene Kozin Version 3.0.0
|
||||
*****************************************************************************/
|
||||
#ifndef _WANPIPE_H
|
||||
#define _WANPIPE_H
|
||||
|
||||
#include <linux/wanrouter.h>
|
||||
|
||||
/* Defines */
|
||||
|
||||
#ifndef PACKED
|
||||
#define PACKED __attribute__((packed))
|
||||
#endif
|
||||
|
||||
#define WANPIPE_MAGIC 0x414C4453L /* signature: 'SDLA' reversed */
|
||||
|
||||
/* IOCTL numbers (up to 16) */
|
||||
#define WANPIPE_DUMP (ROUTER_USER+0) /* dump adapter's memory */
|
||||
#define WANPIPE_EXEC (ROUTER_USER+1) /* execute firmware command */
|
||||
|
||||
#define TRACE_ALL 0x00
|
||||
#define TRACE_PROT 0x01
|
||||
#define TRACE_DATA 0x02
|
||||
|
||||
/* values for request/reply byte */
|
||||
#define UDPMGMT_REQUEST 0x01
|
||||
#define UDPMGMT_REPLY 0x02
|
||||
#define UDP_OFFSET 12
|
||||
|
||||
#define MAX_CMD_BUFF 10
|
||||
#define MAX_X25_LCN 255 /* Maximum number of x25 channels */
|
||||
#define MAX_LCN_NUM 4095 /* Maximum lcn number */
|
||||
#define MAX_FT1_RETRY 100
|
||||
|
||||
#ifndef AF_WANPIPE
|
||||
#define AF_WANPIPE 25
|
||||
#ifndef PF_WANPIPE
|
||||
#define PF_WANPIPE AF_WANPIPE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#define TX_TIMEOUT 5*HZ
|
||||
|
||||
/* General Critical Flags */
|
||||
#define SEND_CRIT 0x00
|
||||
#define PERI_CRIT 0x01
|
||||
|
||||
/* Chdlc and PPP polling critical flag */
|
||||
#define POLL_CRIT 0x03
|
||||
|
||||
/* Frame Relay Tx IRQ send critical flag */
|
||||
#define SEND_TXIRQ_CRIT 0x02
|
||||
|
||||
/* Frame Relay ARP critical flag */
|
||||
#define ARP_CRIT 0x03
|
||||
|
||||
/* Bit maps for dynamic interface configuration
|
||||
* DYN_OPT_ON : turns this option on/off
|
||||
* DEV_DOWN : device was shutdown by the driver not
|
||||
* by user
|
||||
*/
|
||||
#define DYN_OPT_ON 0x00
|
||||
#define DEV_DOWN 0x01
|
||||
|
||||
/*
|
||||
* Data structures for IOCTL calls.
|
||||
*/
|
||||
|
||||
typedef struct sdla_dump /* WANPIPE_DUMP */
|
||||
{
|
||||
unsigned long magic; /* for verification */
|
||||
unsigned long offset; /* absolute adapter memory address */
|
||||
unsigned long length; /* block length */
|
||||
void* ptr; /* -> buffer */
|
||||
} sdla_dump_t;
|
||||
|
||||
typedef struct sdla_exec /* WANPIPE_EXEC */
|
||||
{
|
||||
unsigned long magic; /* for verification */
|
||||
void* cmd; /* -> command structure */
|
||||
void* data; /* -> data buffer */
|
||||
} sdla_exec_t;
|
||||
|
||||
/* UDP management stuff */
|
||||
|
||||
typedef struct wum_header
|
||||
{
|
||||
unsigned char signature[8]; /* 00h: signature */
|
||||
unsigned char type; /* 08h: request/reply */
|
||||
unsigned char command; /* 09h: commnand */
|
||||
unsigned char reserved[6]; /* 0Ah: reserved */
|
||||
} wum_header_t;
|
||||
|
||||
/*************************************************************************
|
||||
Data Structure for global statistics
|
||||
*************************************************************************/
|
||||
|
||||
typedef struct global_stats
|
||||
{
|
||||
unsigned long isr_entry;
|
||||
unsigned long isr_already_critical;
|
||||
unsigned long isr_rx;
|
||||
unsigned long isr_tx;
|
||||
unsigned long isr_intr_test;
|
||||
unsigned long isr_spurious;
|
||||
unsigned long isr_enable_tx_int;
|
||||
unsigned long rx_intr_corrupt_rx_bfr;
|
||||
unsigned long rx_intr_on_orphaned_DLCI;
|
||||
unsigned long rx_intr_dev_not_started;
|
||||
unsigned long tx_intr_dev_not_started;
|
||||
unsigned long poll_entry;
|
||||
unsigned long poll_already_critical;
|
||||
unsigned long poll_processed;
|
||||
unsigned long poll_tbusy_bad_status;
|
||||
unsigned long poll_host_disable_irq;
|
||||
unsigned long poll_host_enable_irq;
|
||||
|
||||
} global_stats_t;
|
||||
|
||||
|
||||
typedef struct{
|
||||
unsigned short udp_src_port PACKED;
|
||||
unsigned short udp_dst_port PACKED;
|
||||
unsigned short udp_length PACKED;
|
||||
unsigned short udp_checksum PACKED;
|
||||
} udp_pkt_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned char ver_inet_hdr_length PACKED;
|
||||
unsigned char service_type PACKED;
|
||||
unsigned short total_length PACKED;
|
||||
unsigned short identifier PACKED;
|
||||
unsigned short flags_frag_offset PACKED;
|
||||
unsigned char ttl PACKED;
|
||||
unsigned char protocol PACKED;
|
||||
unsigned short hdr_checksum PACKED;
|
||||
unsigned long ip_src_address PACKED;
|
||||
unsigned long ip_dst_address PACKED;
|
||||
} ip_pkt_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned char signature[8] PACKED;
|
||||
unsigned char request_reply PACKED;
|
||||
unsigned char id PACKED;
|
||||
unsigned char reserved[6] PACKED;
|
||||
} wp_mgmt_t;
|
||||
|
||||
/*************************************************************************
|
||||
Data Structure for if_send statistics
|
||||
*************************************************************************/
|
||||
typedef struct if_send_stat{
|
||||
unsigned long if_send_entry;
|
||||
unsigned long if_send_skb_null;
|
||||
unsigned long if_send_broadcast;
|
||||
unsigned long if_send_multicast;
|
||||
unsigned long if_send_critical_ISR;
|
||||
unsigned long if_send_critical_non_ISR;
|
||||
unsigned long if_send_tbusy;
|
||||
unsigned long if_send_tbusy_timeout;
|
||||
unsigned long if_send_PIPE_request;
|
||||
unsigned long if_send_wan_disconnected;
|
||||
unsigned long if_send_dlci_disconnected;
|
||||
unsigned long if_send_no_bfrs;
|
||||
unsigned long if_send_adptr_bfrs_full;
|
||||
unsigned long if_send_bfr_passed_to_adptr;
|
||||
unsigned long if_send_protocol_error;
|
||||
unsigned long if_send_bfr_not_passed_to_adptr;
|
||||
unsigned long if_send_tx_int_enabled;
|
||||
unsigned long if_send_consec_send_fail;
|
||||
} if_send_stat_t;
|
||||
|
||||
typedef struct rx_intr_stat{
|
||||
unsigned long rx_intr_no_socket;
|
||||
unsigned long rx_intr_dev_not_started;
|
||||
unsigned long rx_intr_PIPE_request;
|
||||
unsigned long rx_intr_bfr_not_passed_to_stack;
|
||||
unsigned long rx_intr_bfr_passed_to_stack;
|
||||
} rx_intr_stat_t;
|
||||
|
||||
typedef struct pipe_mgmt_stat{
|
||||
unsigned long UDP_PIPE_mgmt_kmalloc_err;
|
||||
unsigned long UDP_PIPE_mgmt_direction_err;
|
||||
unsigned long UDP_PIPE_mgmt_adptr_type_err;
|
||||
unsigned long UDP_PIPE_mgmt_adptr_cmnd_OK;
|
||||
unsigned long UDP_PIPE_mgmt_adptr_cmnd_timeout;
|
||||
unsigned long UDP_PIPE_mgmt_adptr_send_passed;
|
||||
unsigned long UDP_PIPE_mgmt_adptr_send_failed;
|
||||
unsigned long UDP_PIPE_mgmt_not_passed_to_stack;
|
||||
unsigned long UDP_PIPE_mgmt_passed_to_stack;
|
||||
unsigned long UDP_PIPE_mgmt_no_socket;
|
||||
unsigned long UDP_PIPE_mgmt_passed_to_adptr;
|
||||
} pipe_mgmt_stat_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
struct sk_buff *skb;
|
||||
} bh_data_t, cmd_data_t;
|
||||
|
||||
#define MAX_LGTH_UDP_MGNT_PKT 2000
|
||||
|
||||
|
||||
/* This is used for interrupt testing */
|
||||
#define INTR_TEST_MODE 0x02
|
||||
|
||||
#define WUM_SIGNATURE_L 0x50495046
|
||||
#define WUM_SIGNATURE_H 0x444E3845
|
||||
|
||||
#define WUM_KILL 0x50
|
||||
#define WUM_EXEC 0x51
|
||||
|
||||
#define WANPIPE 0x00
|
||||
#define API 0x01
|
||||
#define BRIDGE 0x02
|
||||
#define BRIDGE_NODE 0x03
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/****** Kernel Interface ****************************************************/
|
||||
|
||||
#include <linux/sdladrv.h> /* SDLA support module API definitions */
|
||||
#include <linux/sdlasfm.h> /* SDLA firmware module definitions */
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serialP.h>
|
||||
#include <linux/serial_reg.h>
|
||||
#include <asm/serial.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/tty_driver.h>
|
||||
#include <linux/tty_flip.h>
|
||||
|
||||
/****** Data Structures *****************************************************/
|
||||
|
||||
/* Adapter Data Space.
|
||||
* This structure is needed because we handle multiple cards, otherwise
|
||||
* static data would do it.
|
||||
*/
|
||||
typedef struct sdla
|
||||
{
|
||||
char devname[WAN_DRVNAME_SZ+1]; /* card name */
|
||||
sdlahw_t hw; /* hardware configuration */
|
||||
struct wan_device wandev; /* WAN device data space */
|
||||
|
||||
unsigned open_cnt; /* number of open interfaces */
|
||||
unsigned long state_tick; /* link state timestamp */
|
||||
unsigned intr_mode; /* Type of Interrupt Mode */
|
||||
char in_isr; /* interrupt-in-service flag */
|
||||
char buff_int_mode_unbusy; /* flag for carrying out dev_tint */
|
||||
char dlci_int_mode_unbusy; /* flag for carrying out dev_tint */
|
||||
long configured; /* flag for previous configurations */
|
||||
|
||||
unsigned short irq_dis_if_send_count; /* Disabling irqs in if_send*/
|
||||
unsigned short irq_dis_poll_count; /* Disabling irqs in poll routine*/
|
||||
unsigned short force_enable_irq;
|
||||
char TracingEnabled; /* flag for enabling trace */
|
||||
global_stats_t statistics; /* global statistics */
|
||||
void* mbox; /* -> mailbox */
|
||||
void* rxmb; /* -> receive mailbox */
|
||||
void* flags; /* -> adapter status flags */
|
||||
void (*isr)(struct sdla* card); /* interrupt service routine */
|
||||
void (*poll)(struct sdla* card); /* polling routine */
|
||||
int (*exec)(struct sdla* card, void* u_cmd, void* u_data);
|
||||
/* Used by the listen() system call */
|
||||
/* Wanpipe Socket Interface */
|
||||
int (*func) (struct sk_buff *, struct sock *);
|
||||
struct sock *sk;
|
||||
|
||||
/* Shutdown function */
|
||||
void (*disable_comm) (struct sdla *card);
|
||||
|
||||
/* Secondary Port Device: Piggibacking */
|
||||
struct sdla *next;
|
||||
|
||||
/* TTY driver variables */
|
||||
unsigned char tty_opt;
|
||||
struct tty_struct *tty;
|
||||
unsigned int tty_minor;
|
||||
unsigned int tty_open;
|
||||
unsigned char *tty_buf;
|
||||
unsigned char *tty_rx;
|
||||
struct work_struct tty_work;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{ /****** X.25 specific data **********/
|
||||
u32 lo_pvc;
|
||||
u32 hi_pvc;
|
||||
u32 lo_svc;
|
||||
u32 hi_svc;
|
||||
struct net_device *svc_to_dev_map[MAX_X25_LCN];
|
||||
struct net_device *pvc_to_dev_map[MAX_X25_LCN];
|
||||
struct net_device *tx_dev;
|
||||
struct net_device *cmd_dev;
|
||||
u32 no_dev;
|
||||
volatile u8 *hdlc_buf_status;
|
||||
u32 tx_interrupts_pending;
|
||||
u16 timer_int_enabled;
|
||||
struct net_device *poll_device;
|
||||
atomic_t command_busy;
|
||||
|
||||
u16 udp_pkt_lgth;
|
||||
u32 udp_type;
|
||||
u8 udp_pkt_src;
|
||||
u32 udp_lcn;
|
||||
struct net_device *udp_dev;
|
||||
s8 udp_pkt_data[MAX_LGTH_UDP_MGNT_PKT];
|
||||
|
||||
u8 LAPB_hdlc; /* Option to turn off X25 and run only LAPB */
|
||||
u8 logging; /* Option to log call messages */
|
||||
u8 oob_on_modem; /* Option to send modem status to the api */
|
||||
u16 num_of_ch; /* Number of channels configured by the user */
|
||||
|
||||
struct work_struct x25_poll_work;
|
||||
struct timer_list x25_timer;
|
||||
} x;
|
||||
struct
|
||||
{ /****** frame relay specific data ***/
|
||||
void* rxmb_base; /* -> first Rx buffer */
|
||||
void* rxmb_last; /* -> last Rx buffer */
|
||||
unsigned rx_base; /* S508 receive buffer base */
|
||||
unsigned rx_top; /* S508 receive buffer end */
|
||||
unsigned short node_dlci[100];
|
||||
unsigned short dlci_num;
|
||||
struct net_device *dlci_to_dev_map[991 + 1];
|
||||
unsigned tx_interrupts_pending;
|
||||
unsigned short timer_int_enabled;
|
||||
unsigned short udp_pkt_lgth;
|
||||
int udp_type;
|
||||
char udp_pkt_src;
|
||||
unsigned udp_dlci;
|
||||
char udp_pkt_data[MAX_LGTH_UDP_MGNT_PKT];
|
||||
void* trc_el_base; /* first trace element */
|
||||
void* trc_el_last; /* last trace element */
|
||||
void *curr_trc_el; /* current trace element */
|
||||
unsigned short trc_bfr_space; /* trace buffer space */
|
||||
unsigned char update_comms_stats;
|
||||
struct net_device *arp_dev;
|
||||
spinlock_t if_send_lock;
|
||||
} f;
|
||||
struct /****** PPP-specific data ***********/
|
||||
{
|
||||
char if_name[WAN_IFNAME_SZ+1]; /* interface name */
|
||||
void* txbuf; /* -> current Tx buffer */
|
||||
void* txbuf_base; /* -> first Tx buffer */
|
||||
void* txbuf_last; /* -> last Tx buffer */
|
||||
void* rxbuf_base; /* -> first Rx buffer */
|
||||
void* rxbuf_last; /* -> last Rx buffer */
|
||||
unsigned rx_base; /* S508 receive buffer base */
|
||||
unsigned rx_top; /* S508 receive buffer end */
|
||||
char ip_mode; /* STATIC/HOST/PEER IP Mode */
|
||||
char authenticator; /* Authenticator for PAP/CHAP */
|
||||
unsigned char comm_enabled; /* Is comm enabled or not */
|
||||
unsigned char peer_route; /* Process Peer Route */
|
||||
unsigned long *txbuf_next; /* Next Tx buffer to use */
|
||||
unsigned long *rxbuf_next; /* Next Rx buffer to use */
|
||||
} p;
|
||||
struct /* Cisco HDLC-specific data */
|
||||
{
|
||||
char if_name[WAN_IFNAME_SZ+1]; /* interface name */
|
||||
unsigned char comm_port;/* Communication Port O or 1 */
|
||||
unsigned char usedby; /* Used by WANPIPE or API */
|
||||
void* rxmb; /* Receive mail box */
|
||||
void* flags; /* flags */
|
||||
void* tx_status; /* Tx status element */
|
||||
void* rx_status; /* Rx status element */
|
||||
void* txbuf; /* -> current Tx buffer */
|
||||
void* txbuf_base; /* -> first Tx buffer */
|
||||
void* txbuf_last; /* -> last Tx buffer */
|
||||
void* rxbuf_base; /* -> first Rx buffer */
|
||||
void* rxbuf_last; /* -> last Rx buffer */
|
||||
unsigned rx_base; /* S508 receive buffer base */
|
||||
unsigned rx_top; /* S508 receive buffer end */
|
||||
unsigned char receive_only; /* high speed receivers */
|
||||
unsigned short protocol_options;
|
||||
unsigned short kpalv_tx; /* Tx kpalv timer */
|
||||
unsigned short kpalv_rx; /* Rx kpalv timer */
|
||||
unsigned short kpalv_err; /* Error tolerance */
|
||||
unsigned short slarp_timer; /* SLARP req timer */
|
||||
unsigned state; /* state of the link */
|
||||
unsigned char api_status;
|
||||
unsigned char update_call_count;
|
||||
unsigned short api_options; /* for async config */
|
||||
unsigned char async_mode;
|
||||
unsigned short tx_bits_per_char;
|
||||
unsigned short rx_bits_per_char;
|
||||
unsigned short stop_bits;
|
||||
unsigned short parity;
|
||||
unsigned short break_timer;
|
||||
unsigned short inter_char_timer;
|
||||
unsigned short rx_complete_length;
|
||||
unsigned short xon_char;
|
||||
unsigned short xoff_char;
|
||||
unsigned char comm_enabled; /* Is comm enabled or not */
|
||||
unsigned char backup;
|
||||
} c;
|
||||
struct
|
||||
{
|
||||
void* tx_status; /* Tx status element */
|
||||
void* rx_status; /* Rx status element */
|
||||
void* trace_status; /* Trace status element */
|
||||
void* txbuf; /* -> current Tx buffer */
|
||||
void* txbuf_base; /* -> first Tx buffer */
|
||||
void* txbuf_last; /* -> last Tx buffer */
|
||||
void* rxbuf_base; /* -> first Rx buffer */
|
||||
void* rxbuf_last; /* -> last Rx buffer */
|
||||
void* tracebuf; /* -> current Trace buffer */
|
||||
void* tracebuf_base; /* -> current Trace buffer */
|
||||
void* tracebuf_last; /* -> current Trace buffer */
|
||||
unsigned rx_base; /* receive buffer base */
|
||||
unsigned rx_end; /* receive buffer end */
|
||||
unsigned trace_base; /* trace buffer base */
|
||||
unsigned trace_end; /* trace buffer end */
|
||||
|
||||
} h;
|
||||
} u;
|
||||
} sdla_t;
|
||||
|
||||
/****** Public Functions ****************************************************/
|
||||
|
||||
void wanpipe_open (sdla_t* card); /* wpmain.c */
|
||||
void wanpipe_close (sdla_t* card); /* wpmain.c */
|
||||
void wanpipe_set_state (sdla_t* card, int state); /* wpmain.c */
|
||||
|
||||
int wpx_init (sdla_t* card, wandev_conf_t* conf); /* wpx.c */
|
||||
int wpf_init (sdla_t* card, wandev_conf_t* conf); /* wpf.c */
|
||||
int wpp_init (sdla_t* card, wandev_conf_t* conf); /* wpp.c */
|
||||
int wpc_init (sdla_t* card, wandev_conf_t* conf); /* Cisco HDLC */
|
||||
int bsc_init (sdla_t* card, wandev_conf_t* conf); /* BSC streaming */
|
||||
int hdlc_init(sdla_t* card, wandev_conf_t* conf); /* HDLC support */
|
||||
int wpft1_init (sdla_t* card, wandev_conf_t* conf); /* FT1 Config support */
|
||||
int wsppp_init (sdla_t* card, wandev_conf_t* conf); /* Sync PPP on top of RAW CHDLC */
|
||||
|
||||
extern sdla_t * wanpipe_find_card(char *);
|
||||
extern sdla_t * wanpipe_find_card_num (int);
|
||||
|
||||
extern void wanpipe_queue_work (struct work_struct *);
|
||||
extern void wanpipe_mark_bh (void);
|
||||
extern void wakeup_sk_bh(struct net_device *dev);
|
||||
extern int change_dev_flags(struct net_device *dev, unsigned flags);
|
||||
extern unsigned long get_ip_address(struct net_device *dev, int option);
|
||||
extern void add_gateway(sdla_t *card, struct net_device *dev);
|
||||
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _WANPIPE_H */
|
||||
|
||||
@@ -55,12 +55,10 @@
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/wanpipe.h>
|
||||
#include <linux/if_wanpipe.h>
|
||||
#include <linux/pkt_sched.h>
|
||||
#include <linux/tcp_states.h>
|
||||
#include <linux/if_wanpipe_common.h>
|
||||
#include <linux/sdla_x25.h>
|
||||
|
||||
#ifdef CONFIG_INET
|
||||
#include <net/inet_common.h>
|
||||
|
||||
Reference in New Issue
Block a user