patch-2.3.14 linux/drivers/isdn/isdn_net.c
Next file: linux/drivers/isdn/isdn_net.h
Previous file: linux/drivers/isdn/isdn_concap.c
Back to the patch index
Back to the overall index
- Lines: 296
- Date:
Wed Aug 18 11:38:57 1999
- Orig file:
v2.3.13/linux/drivers/isdn/isdn_net.c
- Orig date:
Sun May 23 10:03:42 1999
diff -u --recursive --new-file v2.3.13/linux/drivers/isdn/isdn_net.c linux/drivers/isdn/isdn_net.c
@@ -1,4 +1,4 @@
-/* $Id: isdn_net.c,v 1.84 1999/04/18 14:06:55 fritz Exp $
+/* $Id: isdn_net.c,v 1.88 1999/07/07 10:13:31 detabc Exp $
* Linux ISDN subsystem, network interfaces and related functions (linklevel).
*
@@ -21,6 +21,19 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn_net.c,v $
+ * Revision 1.88 1999/07/07 10:13:31 detabc
+ * remove unused messages
+ *
+ * Revision 1.87 1999/07/06 07:53:53 calle
+ * calls to dev_alloc_skb waste 16 bytes of memory, if we calculate the
+ * right header space for the lowlevel driver. using alloc_skb instead.
+ *
+ * Revision 1.86 1999/06/09 10:12:05 paul
+ * thinko in previous patch
+ *
+ * Revision 1.85 1999/06/07 19:42:39 paul
+ * isdn_net_getpeer() fixed to return correct `outgoing' flag
+ *
* Revision 1.84 1999/04/18 14:06:55 fritz
* Removed TIMRU stuff.
*
@@ -68,7 +81,7 @@
* Added more locking stuff in tty_write.
*
* Revision 1.71 1998/06/18 22:43:08 fritz
- * Bugfix: Setting ndev->do_ioctl had beed accidetly removed at abc-cleanup.
+ * Bugfix: Setting ndev->do_ioctl had beed accidetly removed at cleanup.
*
* Revision 1.70 1998/06/17 19:50:49 he
* merged with 2.1.10[34] (cosmetics and udelay() -> mdelay())
@@ -80,40 +93,13 @@
* so autodial is suppressed for that device until it is switched on using
* 'isdnctrl status dev-name on'.
*
- * Revision 1.68 1998/06/07 00:20:05 fritz
- * abc cleanup.
*
- * Revision 1.67 1998/06/02 12:10:08 detabc
- * wegen einer einstweiliger verfuegung gegen DW ist zur zeit
- * die abc-extension bis zur klaerung der rechtslage nicht verfuegbar
*
* Revision 1.66 1998/05/26 22:39:24 he
* sync'ed with 2.1.102 where appropriate (CAPABILITY changes)
* concap typo
* cleared dev.tbusy in isdn_net BCONN status callback
*
- * Revision 1.65 1998/05/22 10:01:11 detabc
- * in case of a icmp-unreach condition the tcp-keepalive-entrys
- * will be dropped from the internal double-link-list (only abc-extension).
- * send icmp unreach only if the skb->protocol == ETH_P_IP
- * speedup abc-no-dchan redial
- *
- * Revision 1.64 1998/05/07 19:58:39 detabc
- * bugfix in abc_delayed_hangup
- * optimize keepalive-tests for abc_rawip
- *
- * Revision 1.63 1998/05/05 23:23:36 detabc
- * change ICMP_HOST_UNREACH to ICMP_NET_UNREACH (only abc-ext.)
- * set dev->tbusy to zero in isdn_net_unreachable() (only abc-ext.)
- * drop all new packets and send ICMP_NET_UNREACH for
- * min. dialwait to max. dialwait * 6 time. (only abc-ext.)
- * change random-deliver of packets (small first) from all emcapsulation
- * to only rawip with ABC-Router-Flag enabled.
- *
- * Revision 1.62 1998/05/03 17:40:42 detabc
- * Include abc-extension-support for >= 2.1.x Kernels in
- * isdn_net.c and isdn_common.c. alpha-test OK and running !
- *
* Revision 1.61 1998/04/16 19:19:42 keil
* Fix from vger (tx max qlength)
*
@@ -371,17 +357,17 @@
/* Prototypes */
int isdn_net_force_dial_lp(isdn_net_local *);
-static int isdn_net_start_xmit(struct sk_buff *, struct device *);
-static int isdn_net_xmit(struct device *, isdn_net_local *, struct sk_buff *);
+static int isdn_net_start_xmit(struct sk_buff *, struct net_device *);
+static int isdn_net_xmit(struct net_device *, isdn_net_local *, struct sk_buff *);
-char *isdn_net_revision = "$Revision: 1.84 $";
+char *isdn_net_revision = "$Revision: 1.88 $";
/*
* Code for raw-networking over ISDN
*/
static void
-isdn_net_unreachable(struct device *dev, struct sk_buff *skb, char *reason)
+isdn_net_unreachable(struct net_device *dev, struct sk_buff *skb, char *reason)
{
if(skb) {
@@ -403,7 +389,7 @@
}
static void
-isdn_net_reset(struct device *dev)
+isdn_net_reset(struct net_device *dev)
{
#ifdef CONFIG_ISDN_X25
struct concap_device_ops * dops =
@@ -426,10 +412,10 @@
/* Open/initialize the board. */
static int
-isdn_net_open(struct device *dev)
+isdn_net_open(struct net_device *dev)
{
int i;
- struct device *p;
+ struct net_device *p;
struct in_device *in_dev;
isdn_net_reset(dev);
@@ -616,7 +602,7 @@
lp->stats.tx_packets++;
lp->stats.tx_bytes += c->parm.length;
if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP && lp->sav_skb) {
- struct device *mdev;
+ struct net_device *mdev;
if (lp->master)
mdev = lp->master;
else
@@ -1060,7 +1046,7 @@
* Perform hangup for a net-interface.
*/
void
-isdn_net_hangup(struct device *d)
+isdn_net_hangup(struct net_device *d)
{
isdn_net_local *lp = (isdn_net_local *) d->priv;
isdn_ctrl cmd;
@@ -1191,7 +1177,7 @@
* Side-effects: ndev->tbusy is cleared on success.
*/
int
-isdn_net_send_skb(struct device *ndev, isdn_net_local * lp,
+isdn_net_send_skb(struct net_device *ndev, isdn_net_local * lp,
struct sk_buff *skb)
{
int ret;
@@ -1224,7 +1210,7 @@
*/
static int
-isdn_net_xmit(struct device *ndev, isdn_net_local * lp, struct sk_buff *skb)
+isdn_net_xmit(struct net_device *ndev, isdn_net_local * lp, struct sk_buff *skb)
{
int ret;
@@ -1280,7 +1266,7 @@
}
static void
-isdn_net_adjust_hdr(struct sk_buff *skb, struct device *dev)
+isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
{
isdn_net_local *lp = (isdn_net_local *) dev->priv;
if (!skb)
@@ -1300,7 +1286,7 @@
* and start dialing.
*/
static int
-isdn_net_start_xmit(struct sk_buff *skb, struct device *ndev)
+isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{
isdn_net_local *lp = (isdn_net_local *) ndev->priv;
#ifdef CONFIG_ISDN_X25
@@ -1452,9 +1438,9 @@
* Shutdown a net-interface.
*/
static int
-isdn_net_close(struct device *dev)
+isdn_net_close(struct net_device *dev)
{
- struct device *p;
+ struct net_device *p;
#ifdef CONFIG_ISDN_X25
struct concap_proto * cprot =
( (isdn_net_local *) dev->priv ) -> netdev -> cprot;
@@ -1490,7 +1476,7 @@
* Get statistics
*/
static struct enet_statistics *
-isdn_net_get_stats(struct device *dev)
+isdn_net_get_stats(struct net_device *dev)
{
isdn_net_local *lp = (isdn_net_local *) dev->priv;
return &lp->stats;
@@ -1506,7 +1492,7 @@
*/
static unsigned short
-isdn_net_type_trans(struct sk_buff *skb, struct device *dev)
+isdn_net_type_trans(struct sk_buff *skb, struct net_device *dev)
{
struct ethhdr *eth;
unsigned char *rawp;
@@ -1553,7 +1539,7 @@
isdn_net_slarp_send(isdn_net_local *lp, int is_reply)
{
unsigned short hl = dev->drv[lp->isdn_device]->interface->hl_hdrlen;
- struct sk_buff *skb = dev_alloc_skb(hl + sizeof(cisco_hdr) + sizeof(cisco_slarp));
+ struct sk_buff *skb = alloc_skb(hl + sizeof(cisco_hdr) + sizeof(cisco_slarp), GFP_ATOMIC);
unsigned long t = (jiffies / HZ * 1000000);
int len;
cisco_hdr *ch;
@@ -1644,7 +1630,7 @@
* Got a packet from ISDN-Channel.
*/
static void
-isdn_net_receive(struct device *ndev, struct sk_buff *skb)
+isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
{
isdn_net_local *lp = (isdn_net_local *) ndev->priv;
isdn_net_local *olp = lp; /* original 'lp' */
@@ -1793,7 +1779,7 @@
}
static int
-my_eth_header(struct sk_buff *skb, struct device *dev, unsigned short type,
+my_eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
void *daddr, void *saddr, unsigned len)
{
struct ethhdr *eth = (struct ethhdr *) skb_push(skb, ETH_HLEN);
@@ -1838,7 +1824,7 @@
*/
static int
-isdn_net_header(struct sk_buff *skb, struct device *dev, unsigned short type,
+isdn_net_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
void *daddr, void *saddr, unsigned plen)
{
isdn_net_local *lp = dev->priv;
@@ -1894,7 +1880,7 @@
static int
isdn_net_rebuild_header(struct sk_buff *skb)
{
- struct device *dev = skb->dev;
+ struct net_device *dev = skb->dev;
isdn_net_local *lp = dev->priv;
int ret = 0;
@@ -1926,7 +1912,7 @@
* Interface-setup. (called just after registering a new interface)
*/
static int
-isdn_net_init(struct device *ndev)
+isdn_net_init(struct net_device *ndev)
{
ushort max_hlhdr_len = 0;
isdn_net_local *lp = (isdn_net_local *) ndev->priv;
@@ -2437,7 +2423,7 @@
* Allocate a new network-interface and initialize its data structures.
*/
char *
-isdn_net_new(char *name, struct device *master)
+isdn_net_new(char *name, struct net_device *master)
{
isdn_net_dev *netdev;
@@ -2466,8 +2452,8 @@
netdev->local->p_encap = ISDN_NET_ENCAP_RAWIP;
if (master) {
/* Device shall be a slave */
- struct device *p = (((isdn_net_local *) master->priv)->slave);
- struct device *q = master;
+ struct net_device *p = (((isdn_net_local *) master->priv)->slave);
+ struct net_device *q = master;
netdev->local->master = master;
/* Put device at end of slave-chain */
@@ -2928,7 +2914,7 @@
/* for pre-bound channels, we need this extra check */
if ( strncmp(dev->num[idx],"???",3) == 0 ) return -ENOTCONN;
strncpy(phone->phone,dev->num[idx],ISDN_MSNLEN);
- phone->outgoing=USG_OUTGOING(idx);
+ phone->outgoing=USG_OUTGOING(dev->usage[idx]);
if ( copy_to_user(peer,phone,sizeof(*peer)) ) return -EFAULT;
return 0;
}
@@ -3004,7 +2990,7 @@
isdn_net_force_hangup(char *name)
{
isdn_net_dev *p = isdn_net_findif(name);
- struct device *q;
+ struct net_device *q;
if (p) {
if (p->local->isdn_device < 0)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)