Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Linus Torvalds [Wed, 21 Mar 2012 04:04:47 +0000 (21:04 -0700)]
Pull networking merge from David Miller:
 "1) Move ixgbe driver over to purely page based buffering on receive.
     From Alexander Duyck.

  2) Add receive packet steering support to e1000e, from Bruce Allan.

  3) Convert TCP MD5 support over to RCU, from Eric Dumazet.

  4) Reduce cpu usage in handling out-of-order TCP packets on modern
     systems, also from Eric Dumazet.

  5) Support the IP{,V6}_UNICAST_IF socket options, making the wine
     folks happy, from Erich Hoover.

  6) Support VLAN trunking from guests in hyperv driver, from Haiyang
     Zhang.

  7) Support byte-queue-limtis in r8169, from Igor Maravic.

  8) Outline code intended for IP_RECVTOS in IP_PKTOPTIONS existed but
     was never properly implemented, Jiri Benc fixed that.

  9) 64-bit statistics support in r8169 and 8139too, from Junchang Wang.

  10) Support kernel side dump filtering by ctmark in netfilter
      ctnetlink, from Pablo Neira Ayuso.

  11) Support byte-queue-limits in gianfar driver, from Paul Gortmaker.

  12) Add new peek socket options to assist with socket migration, from
      Pavel Emelyanov.

  13) Add sch_plug packet scheduler whose queue is controlled by
      userland daemons using explicit freeze and release commands.  From
      Shriram Rajagopalan.

  14) Fix FCOE checksum offload handling on transmit, from Yi Zou."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1846 commits)
  Fix pppol2tp getsockname()
  Remove printk from rds_sendmsg
  ipv6: fix incorrent ipv6 ipsec packet fragment
  cpsw: Hook up default ndo_change_mtu.
  net: qmi_wwan: fix build error due to cdc-wdm dependecy
  netdev: driver: ethernet: Add TI CPSW driver
  netdev: driver: ethernet: add cpsw address lookup engine support
  phy: add am79c874 PHY support
  mlx4_core: fix race on comm channel
  bonding: send igmp report for its master
  fs_enet: Add MPC5125 FEC support and PHY interface selection
  net: bpf_jit: fix BPF_S_LDX_B_MSH compilation
  net: update the usage of CHECKSUM_UNNECESSARY
  fcoe: use CHECKSUM_UNNECESSARY instead of CHECKSUM_PARTIAL on tx
  net: do not do gso for CHECKSUM_UNNECESSARY in netif_needs_gso
  ixgbe: Fix issues with SR-IOV loopback when flow control is disabled
  net/hyperv: Fix the code handling tx busy
  ixgbe: fix namespace issues when FCoE/DCB is not enabled
  rtlwifi: Remove unused ETH_ADDR_LEN defines
  igbvf: Use ETH_ALEN
  ...

Fix up fairly trivial conflicts in drivers/isdn/gigaset/interface.c and
drivers/net/usb/{Kconfig,qmi_wwan.c} as per David.

17 files changed:
1  2 
Documentation/ioctl/ioctl-number.txt
MAINTAINERS
arch/ia64/hp/sim/simeth.c
drivers/isdn/capi/capi.c
drivers/isdn/gigaset/common.c
drivers/isdn/gigaset/gigaset.h
drivers/isdn/gigaset/interface.c
drivers/isdn/i4l/isdn_tty.c
drivers/ssb/main.c
drivers/tty/ipwireless/tty.c
include/linux/netdevice.h
include/net/sock.h
net/bluetooth/rfcomm/tty.c
net/core/dev.c
net/core/sock.c
net/ipv4/ip_sockglue.c
net/mac80211/mesh_pathtbl.c

@@@ -189,7 -189,7 +189,7 @@@ Code  Seq#(hex)    Include File            Comment
  'Y'   all     linux/cyclades.h
  'Z'   14-15   drivers/message/fusion/mptctl.h
  '['   00-07   linux/usb/tmc.h         USB Test and Measurement Devices
 -                                      <mailto:gregkh@suse.de>
 +                                      <mailto:gregkh@linuxfoundation.org>
  'a'   all     linux/atm*.h, linux/sonet.h     ATM on linux
                                        <http://lrcwww.epfl.ch/>
  'b'   00-FF                           conflict! bit3 vme host bridge
                linux/ixjuser.h         <http://web.archive.org/web/*/http://www.quicknet.net>
  'r'   00-1F   linux/msdos_fs.h and fs/fat/dir.c
  's'   all     linux/cdk.h
- 't'   00-7F   linux/if_ppp.h
+ 't'   00-7F   linux/ppp-ioctl.h
  't'   80-8F   linux/isdn_ppp.h
  't'   90      linux/toshiba.h
  'u'   00-1F   linux/smb_fs.h          gone
diff --combined MAINTAINERS
@@@ -1405,7 -1405,7 +1405,7 @@@ F:      net/ax25
  B43 WIRELESS DRIVER
  M:    Stefano Brivio <stefano.brivio@polimi.it>
  L:    linux-wireless@vger.kernel.org
- L:    b43-dev@lists.infradead.org (moderated for non-subscribers)
+ L:    b43-dev@lists.infradead.org
  W:    http://linuxwireless.org/en/users/Drivers/b43
  S:    Maintained
  F:    drivers/net/wireless/b43/
@@@ -1414,6 -1414,7 +1414,7 @@@ B43LEGACY WIRELESS DRIVE
  M:    Larry Finger <Larry.Finger@lwfinger.net>
  M:    Stefano Brivio <stefano.brivio@polimi.it>
  L:    linux-wireless@vger.kernel.org
+ L:    b43-dev@lists.infradead.org
  W:    http://linuxwireless.org/en/users/Drivers/b43
  S:    Maintained
  F:    drivers/net/wireless/b43legacy/
@@@ -1571,7 -1572,6 +1572,6 @@@ F:      drivers/net/ethernet/broadcom/tg3.
  
  BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
  M:    Brett Rudley <brudley@broadcom.com>
- M:    Henry Ptasinski <henryp@broadcom.com>
  M:    Roland Vossen <rvossen@broadcom.com>
  M:    Arend van Spriel <arend@broadcom.com>
  M:    Franky (Zhenhui) Lin <frankyl@broadcom.com>
@@@ -1809,7 -1809,8 +1809,8 @@@ F:      Documentation/zh_CN
  CISCO VIC ETHERNET NIC DRIVER
  M:    Christian Benvenuti <benve@cisco.com>
  M:    Roopa Prabhu <roprabhu@cisco.com>
- M:    David Wang <dwang2@cisco.com>
+ M:    Neel Patel <neepatel@cisco.com>
+ M:    Nishank Trivedi <nistrive@cisco.com>
  S:    Supported
  F:    drivers/net/ethernet/cisco/enic/
  
@@@ -4937,8 -4938,6 +4938,6 @@@ F:      fs/ocfs2
  
  ORINOCO DRIVER
  L:    linux-wireless@vger.kernel.org
- L:    orinoco-users@lists.sourceforge.net
- L:    orinoco-devel@lists.sourceforge.net
  W:    http://linuxwireless.org/en/users/Drivers/orinoco
  W:    http://www.nongnu.org/orinoco/
  S:    Orphan
@@@ -5345,6 -5344,17 +5344,17 @@@ L:    cbe-oss-dev@lists.ozlabs.or
  S:    Maintained
  F:    drivers/block/ps3vram.c
  
+ PTP HARDWARE CLOCK SUPPORT
+ M:    Richard Cochran <richardcochran@gmail.com>
+ S:    Maintained
+ W:    http://linuxptp.sourceforge.net/
+ F:    Documentation/ABI/testing/sysfs-ptp
+ F:    Documentation/ptp/*
+ F:    drivers/net/gianfar_ptp.c
+ F:    drivers/net/phy/dp83640*
+ F:    drivers/ptp/*
+ F:    include/linux/ptp_cl*
  PTRACE SUPPORT
  M:    Roland McGrath <roland@redhat.com>
  M:    Oleg Nesterov <oleg@redhat.com>
@@@ -6212,8 -6222,8 +6222,8 @@@ L:      sparclinux@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
  S:    Maintained
 +F:    include/linux/sunserialcore.h
  F:    drivers/tty/serial/suncore.c
 -F:    drivers/tty/serial/suncore.h
  F:    drivers/tty/serial/sunhv.c
  F:    drivers/tty/serial/sunsab.c
  F:    drivers/tty/serial/sunsab.h
@@@ -6395,11 -6405,6 +6405,11 @@@ W:    http://wiki.laptop.org/go/DCO
  S:    Odd Fixes
  F:    drivers/staging/olpc_dcon/
  
 +STAGING - OZMO DEVICES USB OVER WIFI DRIVER
 +M:    Chris Kelly <ckelly@ozmodevices.com>
 +S:    Maintained
 +F:    drivers/staging/ozwpan/
 +
  STAGING - PARALLEL LCD/KEYPAD PANEL DRIVER
  M:    Willy Tarreau <willy@meta-x.org>
  S:    Odd Fixes
@@@ -7501,6 -7506,12 +7511,12 @@@ S:    Supporte
  F:    Documentation/filesystems/xfs.txt
  F:    fs/xfs/
  
+ XILINX AXI ETHERNET DRIVER
+ M:    Ariane Keller <ariane.keller@tik.ee.ethz.ch>
+ M:    Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
+ S:    Maintained
+ F:    drivers/net/ethernet/xilinx/xilinx_axienet*
  XILINX SYSTEMACE DRIVER
  M:    Grant Likely <grant.likely@secretlab.ca>
  W:    http://www.secretlab.ca/
@@@ -129,6 -129,17 +129,6 @@@ netdev_probe(char *name, unsigned char 
  
  
  static inline int
 -netdev_connect(int irq)
 -{
 -      /* XXX Fix me
 -       * this does not support multiple cards
 -       * also no return value
 -       */
 -      ia64_ssc_connect_irq(NETWORK_INTR, irq);
 -      return 0;
 -}
 -
 -static inline int
  netdev_attach(int fd, int irq, unsigned int ipaddr)
  {
        /* this puts the host interface in the right mode (start interrupting) */
@@@ -182,7 -193,7 +182,7 @@@ simeth_probe1(void
        unsigned char mac_addr[ETH_ALEN];
        struct simeth_local *local;
        struct net_device *dev;
-       int fd, i, err, rc;
+       int fd, err, rc;
  
        /*
         * XXX Fix me
                return err;
        }
  
 -      if ((rc = assign_irq_vector(AUTO_ASSIGN)) < 0)
 -              panic("%s: out of interrupt vectors!\n", __func__);
 -      dev->irq = rc;
 -
        /*
         * attach the interrupt in the simulator, this does enable interrupts
         * until a netdev_attach() is called
         */
 -      netdev_connect(dev->irq);
 +      if ((rc = hpsim_get_irq(NETWORK_INTR)) < 0)
 +              panic("%s: out of interrupt vectors!\n", __func__);
 +      dev->irq = rc;
  
-       printk(KERN_INFO "%s: hosteth=%s simfd=%d, HwAddr",
-              dev->name, simeth_device, local->simfd);
-       for(i = 0; i < ETH_ALEN; i++) {
-               printk(" %2.2x", dev->dev_addr[i]);
-       }
-       printk(", IRQ %d\n", dev->irq);
+       printk(KERN_INFO "%s: hosteth=%s simfd=%d, HwAddr=%pm, IRQ %d\n",
+              dev->name, simeth_device, local->simfd, dev->dev_addr, dev->irq);
  
        return 0;
  }
diff --combined drivers/isdn/capi/capi.c
@@@ -25,7 -25,7 +25,7 @@@
  #include <linux/tty.h>
  #include <linux/netdevice.h>
  #include <linux/ppp_defs.h>
- #include <linux/if_ppp.h>
+ #include <linux/ppp-ioctl.h>
  #include <linux/skbuff.h>
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
@@@ -164,7 -164,7 +164,7 @@@ static int capiminor_del_ack(struct cap
  
        spin_lock_bh(&mp->ackqlock);
        list_for_each_entry_safe(p, tmp, &mp->ackqueue, list) {
-               if (p->datahandle == datahandle) {
+               if (p->datahandle == datahandle) {
                        list_del(&p->list);
                        mp->nack--;
                        spin_unlock_bh(&mp->ackqlock);
@@@ -199,8 -199,8 +199,8 @@@ static struct capiminor *capiminor_allo
        unsigned int minor;
  
        mp = kzalloc(sizeof(*mp), GFP_KERNEL);
-       if (!mp) {
-               printk(KERN_ERR "capi: can't alloc capiminor\n");
+       if (!mp) {
+               printk(KERN_ERR "capi: can't alloc capiminor\n");
                return NULL;
        }
  
@@@ -391,7 -391,7 +391,7 @@@ gen_data_b3_resp_for(struct capiminor *
        struct sk_buff *nskb;
        nskb = alloc_skb(CAPI_DATA_B3_RESP_LEN, GFP_KERNEL);
        if (nskb) {
-               u16 datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4+4+2);
+               u16 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 4 + 2);
                unsigned char *s = skb_put(nskb, CAPI_DATA_B3_RESP_LEN);
                capimsg_setu16(s, 0, CAPI_DATA_B3_RESP_LEN);
                capimsg_setu16(s, 2, mp->ap->applid);
@@@ -418,7 -418,7 +418,7 @@@ static int handle_recv_skb(struct capim
                pr_debug("capi: currently no receiver\n");
                return -1;
        }
-       
        ld = tty_ldisc_ref(tty);
        if (!ld) {
                /* fatal error, do not requeue */
                ld->ops->receive_buf(tty, skb->data, NULL, skb->len);
        } else {
                printk(KERN_ERR "capi: send DATA_B3_RESP failed=%x\n",
-                               errcode);
+                      errcode);
                kfree_skb(nskb);
  
                if (errcode == CAPI_SENDQUEUEFULL)
@@@ -618,7 -618,7 +618,7 @@@ static void capi_recv_message(struct ca
                goto unlock_out;
        }
        if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_IND) {
-               datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+4+2);
+               datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 4 + 2);
                pr_debug("capi_signal: DATA_B3_IND %u len=%d\n",
                         datahandle, skb->len-CAPIMSG_LEN(skb->data));
                skb_queue_tail(&mp->inqueue, skb);
  
        } else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) {
  
-               datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4);
+               datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4);
                pr_debug("capi_signal: DATA_B3_CONF %u 0x%x\n",
                         datahandle,
-                        CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+2));
+                        CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 2));
                kfree_skb(skb);
                capiminor_del_ack(mp, datahandle);
                tty = tty_port_tty_get(&mp->port);
@@@ -669,7 -669,7 +669,7 @@@ capi_read(struct file *file, char __use
                if (file->f_flags & O_NONBLOCK)
                        return -EAGAIN;
                err = wait_event_interruptible(cdev->recvwait,
-                               (skb = skb_dequeue(&cdev->recvqueue)));
+                                              (skb = skb_dequeue(&cdev->recvqueue)));
                if (err)
                        return err;
        }
@@@ -736,7 -736,7 +736,7 @@@ capi_write(struct file *file, const cha
  }
  
  static unsigned int
- capi_poll(struct file *file, poll_table * wait)
+ capi_poll(struct file *file, poll_table *wait)
  {
        struct capidev *cdev = file->private_data;
        unsigned int mask = 0;
@@@ -786,75 -786,75 +786,75 @@@ register_out
                return retval;
  
        case CAPI_GET_VERSION:
-               {
-                       if (copy_from_user(&data.contr, argp,
-                                               sizeof(data.contr)))
-                               return -EFAULT;
-                       cdev->errcode = capi20_get_version(data.contr, &data.version);
-                       if (cdev->errcode)
-                               return -EIO;
-                       if (copy_to_user(argp, &data.version,
-                                        sizeof(data.version)))
-                               return -EFAULT;
-               }
-               return 0;
+       {
+               if (copy_from_user(&data.contr, argp,
+                                  sizeof(data.contr)))
+                       return -EFAULT;
+               cdev->errcode = capi20_get_version(data.contr, &data.version);
+               if (cdev->errcode)
+                       return -EIO;
+               if (copy_to_user(argp, &data.version,
+                                sizeof(data.version)))
+                       return -EFAULT;
+       }
+       return 0;
  
        case CAPI_GET_SERIAL:
-               {
-                       if (copy_from_user(&data.contr, argp,
-                                          sizeof(data.contr)))
-                               return -EFAULT;
-                       cdev->errcode = capi20_get_serial (data.contr, data.serial);
-                       if (cdev->errcode)
-                               return -EIO;
-                       if (copy_to_user(argp, data.serial,
-                                        sizeof(data.serial)))
-                               return -EFAULT;
-               }
-               return 0;
+       {
+               if (copy_from_user(&data.contr, argp,
+                                  sizeof(data.contr)))
+                       return -EFAULT;
+               cdev->errcode = capi20_get_serial(data.contr, data.serial);
+               if (cdev->errcode)
+                       return -EIO;
+               if (copy_to_user(argp, data.serial,
+                                sizeof(data.serial)))
+                       return -EFAULT;
+       }
+       return 0;
        case CAPI_GET_PROFILE:
-               {
-                       if (copy_from_user(&data.contr, argp,
-                                          sizeof(data.contr)))
-                               return -EFAULT;
+       {
+               if (copy_from_user(&data.contr, argp,
+                                  sizeof(data.contr)))
+                       return -EFAULT;
  
-                       if (data.contr == 0) {
-                               cdev->errcode = capi20_get_profile(data.contr, &data.profile);
-                               if (cdev->errcode)
-                                       return -EIO;
+               if (data.contr == 0) {
+                       cdev->errcode = capi20_get_profile(data.contr, &data.profile);
+                       if (cdev->errcode)
+                               return -EIO;
  
-                               retval = copy_to_user(argp,
-                                     &data.profile.ncontroller,
-                                      sizeof(data.profile.ncontroller));
+                       retval = copy_to_user(argp,
+                                             &data.profile.ncontroller,
+                                             sizeof(data.profile.ncontroller));
  
-                       } else {
-                               cdev->errcode = capi20_get_profile(data.contr, &data.profile);
-                               if (cdev->errcode)
-                                       return -EIO;
+               } else {
+                       cdev->errcode = capi20_get_profile(data.contr, &data.profile);
+                       if (cdev->errcode)
+                               return -EIO;
  
-                               retval = copy_to_user(argp, &data.profile,
-                                                  sizeof(data.profile));
-                       }
-                       if (retval)
-                               return -EFAULT;
+                       retval = copy_to_user(argp, &data.profile,
+                                             sizeof(data.profile));
                }
-               return 0;
+               if (retval)
+                       return -EFAULT;
+       }
+       return 0;
  
        case CAPI_GET_MANUFACTURER:
-               {
-                       if (copy_from_user(&data.contr, argp,
-                                          sizeof(data.contr)))
-                               return -EFAULT;
-                       cdev->errcode = capi20_get_manufacturer(data.contr, data.manufacturer);
-                       if (cdev->errcode)
-                               return -EIO;
+       {
+               if (copy_from_user(&data.contr, argp,
+                                  sizeof(data.contr)))
+                       return -EFAULT;
+               cdev->errcode = capi20_get_manufacturer(data.contr, data.manufacturer);
+               if (cdev->errcode)
+                       return -EIO;
  
-                       if (copy_to_user(argp, data.manufacturer,
-                                        sizeof(data.manufacturer)))
-                               return -EFAULT;
+               if (copy_to_user(argp, data.manufacturer,
+                                sizeof(data.manufacturer)))
+                       return -EFAULT;
  
-               }
-               return 0;
+       }
+       return 0;
        case CAPI_GET_ERRCODE:
                data.errcode = cdev->errcode;
                cdev->errcode = CAPI_NOERROR;
                return -ENXIO;
  
        case CAPI_MANUFACTURER_CMD:
-               {
-                       struct capi_manufacturer_cmd mcmd;
-                       if (!capable(CAP_SYS_ADMIN))
-                               return -EPERM;
-                       if (copy_from_user(&mcmd, argp, sizeof(mcmd)))
-                               return -EFAULT;
-                       return capi20_manufacturer(mcmd.cmd, mcmd.data);
-               }
-               return 0;
+       {
+               struct capi_manufacturer_cmd mcmd;
+               if (!capable(CAP_SYS_ADMIN))
+                       return -EPERM;
+               if (copy_from_user(&mcmd, argp, sizeof(mcmd)))
+                       return -EFAULT;
+               return capi20_manufacturer(mcmd.cmd, mcmd.data);
+       }
+       return 0;
  
        case CAPI_SET_FLAGS:
        case CAPI_CLR_FLAGS: {
@@@ -1013,12 -1013,16 +1013,12 @@@ static const struct file_operations cap
  static int
  capinc_tty_install(struct tty_driver *driver, struct tty_struct *tty)
  {
 -      int idx = tty->index;
 -      struct capiminor *mp = capiminor_get(idx);
 -      int ret = tty_init_termios(tty);
 +      struct capiminor *mp = capiminor_get(tty->index);
 +      int ret = tty_standard_install(driver, tty);
  
 -      if (ret == 0) {
 -              tty_driver_kref_get(driver);
 -              tty->count++;
 +      if (ret == 0)
                tty->driver_data = mp;
 -              driver->ttys[idx] = tty;
 -      } else
 +      else
                capiminor_put(mp);
        return ret;
  }
@@@ -1066,7 -1070,7 +1066,7 @@@ static int capinc_tty_write(struct tty_
                mp->outbytes += skb->len;
        }
  
-       skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+count, GFP_ATOMIC);
+       skb = alloc_skb(CAPI_DATA_B3_REQ_LEN + count, GFP_ATOMIC);
        if (!skb) {
                printk(KERN_ERR "capinc_tty_write: alloc_skb failed\n");
                spin_unlock_bh(&mp->outlock);
@@@ -1107,7 -1111,7 +1107,7 @@@ static int capinc_tty_put_char(struct t
                invoke_send = true;
        }
  
-       skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+CAPI_MAX_BLKSIZE, GFP_ATOMIC);
+       skb = alloc_skb(CAPI_DATA_B3_REQ_LEN + CAPI_MAX_BLKSIZE, GFP_ATOMIC);
        if (skb) {
                skb_reserve(skb, CAPI_DATA_B3_REQ_LEN);
                *(skb_put(skb, 1)) = ch;
@@@ -1171,12 -1175,12 +1171,12 @@@ static int capinc_tty_chars_in_buffer(s
  }
  
  static int capinc_tty_ioctl(struct tty_struct *tty,
-                   unsigned int cmd, unsigned long arg)
+                           unsigned int cmd, unsigned long arg)
  {
        return -ENOIOCTLCMD;
  }
  
- static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old)
+ static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
  {
        pr_debug("capinc_tty_set_termios\n");
  }
@@@ -1286,6 -1290,7 +1286,6 @@@ static int __init capinc_tty_init(void
                kfree(capiminors);
                return -ENOMEM;
        }
 -      drv->owner = THIS_MODULE;
        drv->driver_name = "capi_nc";
        drv->name = "capi";
        drv->major = 0;
@@@ -1339,18 -1344,18 +1339,18 @@@ static inline void capinc_tty_exit(void
   */
  static int capi20_proc_show(struct seq_file *m, void *v)
  {
-         struct capidev *cdev;
+       struct capidev *cdev;
        struct list_head *l;
  
        mutex_lock(&capidev_list_lock);
        list_for_each(l, &capidev_list) {
                cdev = list_entry(l, struct capidev, list);
                seq_printf(m, "0 %d %lu %lu %lu %lu\n",
-                       cdev->ap.applid,
-                       cdev->ap.nrecvctlpkt,
-                       cdev->ap.nrecvdatapkt,
-                       cdev->ap.nsentctlpkt,
-                       cdev->ap.nsentdatapkt);
+                          cdev->ap.applid,
+                          cdev->ap.nrecvctlpkt,
+                          cdev->ap.nrecvdatapkt,
+                          cdev->ap.nsentctlpkt,
+                          cdev->ap.nsentdatapkt);
        }
        mutex_unlock(&capidev_list_lock);
        return 0;
@@@ -1445,9 -1450,9 +1445,9 @@@ static int __init capi_init(void
        proc_init();
  
  #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
-         compileinfo = " (middleware)";
+       compileinfo = " (middleware)";
  #else
-         compileinfo = " (no middleware)";
+       compileinfo = " (no middleware)";
  #endif
        printk(KERN_NOTICE "CAPI 2.0 started up with major %d%s\n",
               capi_major, compileinfo);
@@@ -30,7 -30,7 +30,7 @@@
  /* Module parameters */
  int gigaset_debuglevel;
  EXPORT_SYMBOL_GPL(gigaset_debuglevel);
- module_param_named(debug, gigaset_debuglevel, int, S_IRUGO|S_IWUSR);
+ module_param_named(debug, gigaset_debuglevel, int, S_IRUGO | S_IWUSR);
  MODULE_PARM_DESC(debug, "debug level");
  
  /* driver state flags */
@@@ -123,7 -123,7 +123,7 @@@ int gigaset_enterconfigmode(struct card
                if (r < 0)
                        goto error;
        }
-       r = setflags(cs, TIOCM_RTS|TIOCM_DTR, 800);
+       r = setflags(cs, TIOCM_RTS | TIOCM_DTR, 800);
        if (r < 0)
                goto error;
  
  
  error:
        dev_err(cs->dev, "error %d on setuartbits\n", -r);
-       cs->control_state = TIOCM_RTS|TIOCM_DTR;
-       cs->ops->set_modem_ctrl(cs, 0, TIOCM_RTS|TIOCM_DTR);
+       cs->control_state = TIOCM_RTS | TIOCM_DTR;
+       cs->ops->set_modem_ctrl(cs, 0, TIOCM_RTS | TIOCM_DTR);
  
        return -1;
  }
@@@ -591,7 -591,7 +591,7 @@@ int gigaset_fill_inbuf(struct inbuf_t *
                if (head > tail)
                        n = head - 1 - tail;
                else if (head == 0)
-                       n = (RBUFSIZE-1) - tail;
+                       n = (RBUFSIZE - 1) - tail;
                else
                        n = RBUFSIZE - tail;
                if (!n) {
@@@ -720,11 -720,12 +720,11 @@@ struct cardstate *gigaset_initcs(struc
  
        tasklet_init(&cs->event_tasklet, gigaset_handle_event,
                     (unsigned long) cs);
 +      tty_port_init(&cs->port);
        cs->commands_pending = 0;
        cs->cur_at_seq = 0;
        cs->gotfwver = -1;
 -      cs->open_count = 0;
        cs->dev = NULL;
 -      cs->tty = NULL;
        cs->tty_dev = NULL;
        cs->cidmode = cidmode != 0;
        cs->tabnocid = gigaset_tab_nocid;
@@@ -910,10 -911,10 +910,10 @@@ int gigaset_start(struct cardstate *cs
        spin_unlock_irqrestore(&cs->lock, flags);
  
        if (cs->mstate != MS_LOCKED) {
-               cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR|TIOCM_RTS);
+               cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR | TIOCM_RTS);
                cs->ops->baud_rate(cs, B115200);
                cs->ops->set_line_ctrl(cs, CS8);
-               cs->control_state = TIOCM_DTR|TIOCM_RTS;
+               cs->control_state = TIOCM_DTR | TIOCM_RTS;
        }
  
        cs->waiting = 1;
@@@ -1050,6 -1051,8 +1050,6 @@@ static struct cardstate *gigaset_get_cs
  
  struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty)
  {
 -      if (tty->index < 0 || tty->index >= tty->driver->num)
 -              return NULL;
        return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start);
  }
  
@@@ -91,11 -91,11 +91,11 @@@ enum debuglevel 
  
  #ifdef CONFIG_GIGASET_DEBUG
  
- #define gig_dbg(level, format, arg...) \
-       do { \
+ #define gig_dbg(level, format, arg...)                                        \
+       do {                                                            \
                if (unlikely(((enum debuglevel)gigaset_debuglevel) & (level))) \
                        printk(KERN_DEBUG KBUILD_MODNAME ": " format "\n", \
-                              ## arg); \
+                              ## arg);                                 \
        } while (0)
  #define DEBUG_DEFAULT (DEBUG_TRANSCMD | DEBUG_CMD | DEBUG_USBREQ)
  
@@@ -164,7 -164,7 +164,7 @@@ void gigaset_dbg_buffer(enum debugleve
  #define BAS_CORRFRAMES        4       /* flow control multiplicator */
  
  #define BAS_INBUFSIZE (BAS_MAXFRAME * BAS_NUMFRAMES)
-                                       /* size of isoc in buf per URB */
+ /* size of isoc in buf per URB */
  #define BAS_OUTBUFSIZE        4096            /* size of common isoc out buffer */
  #define BAS_OUTBUFPAD BAS_MAXFRAME    /* size of pad area for isoc out buf */
  
@@@ -433,7 -433,8 +433,7 @@@ struct cardstate 
        spinlock_t cmdlock;
        unsigned curlen, cmdbytes;
  
 -      unsigned open_count;
 -      struct tty_struct *tty;
 +      struct tty_port port;
        struct tasklet_struct if_wake_tasklet;
        unsigned control_state;
  
        int commands_pending;           /* flag(s) in xxx.commands_pending have
                                           been set */
        struct tasklet_struct event_tasklet;
-                                       /* tasklet for serializing AT commands.
-                                        * Scheduled
-                                        *   -> for modem reponses (and
-                                        *      incoming data for M10x)
-                                        *   -> on timeout
-                                        *   -> after setting bits in
-                                        *      xxx.at_state.pending_command
-                                        *      (e.g. command from LL) */
+       /* tasklet for serializing AT commands.
+        * Scheduled
+        *   -> for modem reponses (and
+        *      incoming data for M10x)
+        *   -> on timeout
+        *   -> after setting bits in
+        *      xxx.at_state.pending_command
+        *      (e.g. command from LL) */
        struct tasklet_struct write_tasklet;
-                                       /* tasklet for serial output
-                                        * (not used in base driver) */
+       /* tasklet for serial output
+        * (not used in base driver) */
  
        /* event queue */
        struct event_t events[MAX_EVENTS];
        spinlock_t ev_lock;
  
        /* current modem response */
-       unsigned char respdata[MAX_RESP_SIZE+1];
+       unsigned char respdata[MAX_RESP_SIZE + 1];
        unsigned cbytes;
  
        /* private data of hardware drivers */
@@@ -33,10 -33,10 +33,10 @@@ static int if_lock(struct cardstate *cs
        }
  
        if (!cmd && cs->mstate == MS_LOCKED && cs->connected) {
-               cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR|TIOCM_RTS);
+               cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR | TIOCM_RTS);
                cs->ops->baud_rate(cs, B115200);
                cs->ops->set_line_ctrl(cs, CS8);
-               cs->control_state = TIOCM_DTR|TIOCM_RTS;
+               cs->control_state = TIOCM_DTR | TIOCM_RTS;
        }
  
        cs->waiting = 1;
@@@ -146,10 -146,13 +146,10 @@@ static const struct tty_operations if_o
  static int if_open(struct tty_struct *tty, struct file *filp)
  {
        struct cardstate *cs;
 -      unsigned long flags;
  
        gig_dbg(DEBUG_IF, "%d+%d: %s()",
                tty->driver->minor_start, tty->index, __func__);
  
 -      tty->driver_data = NULL;
 -
        cs = gigaset_get_cs_by_tty(tty);
        if (!cs || !try_module_get(cs->driver->owner))
                return -ENODEV;
        }
        tty->driver_data = cs;
  
 -      ++cs->open_count;
 +      ++cs->port.count;
  
 -      if (cs->open_count == 1) {
 -              spin_lock_irqsave(&cs->lock, flags);
 -              cs->tty = tty;
 -              spin_unlock_irqrestore(&cs->lock, flags);
 +      if (cs->port.count == 1) {
 +              tty_port_tty_set(&cs->port, tty);
                tty->low_latency = 1;
        }
  
  
  static void if_close(struct tty_struct *tty, struct file *filp)
  {
 -      struct cardstate *cs;
 -      unsigned long flags;
 +      struct cardstate *cs = tty->driver_data;
  
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 +      if (!cs) { /* happens if we didn't find cs in open */
 +              printk(KERN_DEBUG "%s: no cardstate\n", __func__);
                return;
        }
  
  
        if (!cs->connected)
                gig_dbg(DEBUG_IF, "not connected");     /* nothing to do */
 -      else if (!cs->open_count)
 +      else if (!cs->port.count)
                dev_warn(cs->dev, "%s: device not opened\n", __func__);
 -      else {
 -              if (!--cs->open_count) {
 -                      spin_lock_irqsave(&cs->lock, flags);
 -                      cs->tty = NULL;
 -                      spin_unlock_irqrestore(&cs->lock, flags);
 -              }
 -      }
 +      else if (!--cs->port.count)
 +              tty_port_tty_set(&cs->port, NULL);
  
        mutex_unlock(&cs->mutex);
  
  static int if_ioctl(struct tty_struct *tty,
                    unsigned int cmd, unsigned long arg)
  {
 -      struct cardstate *cs;
 +      struct cardstate *cs = tty->driver_data;
        int retval = -ENODEV;
        int int_arg;
        unsigned char buf[6];
        unsigned version[4];
  
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return -ENODEV;
 -      }
 -
        gig_dbg(DEBUG_IF, "%u: %s(0x%x)", cs->minor_index, __func__, cmd);
  
        if (mutex_lock_interruptible(&cs->mutex))
        if (!cs->connected) {
                gig_dbg(DEBUG_IF, "not connected");
                retval = -ENODEV;
 -      } else if (!cs->open_count)
 -              dev_warn(cs->dev, "%s: device not opened\n", __func__);
 -      else {
 +      } else {
                retval = 0;
                switch (cmd) {
                case GIGASET_REDIR:
                        break;
                case GIGASET_BRKCHARS:
                        retval = copy_from_user(&buf,
-                                       (const unsigned char __user *) arg, 6)
+                                               (const unsigned char __user *) arg, 6)
                                ? -EFAULT : 0;
                        if (retval >= 0) {
                                gigaset_dbg_buffer(DEBUG_IF, "GIGASET_BRKCHARS",
-                                               6, (const unsigned char *) arg);
+                                                  6, (const unsigned char *) arg);
                                retval = cs->ops->brkchars(cs, buf);
                        }
                        break;
                case GIGASET_VERSION:
                        retval = copy_from_user(version,
-                                       (unsigned __user *) arg, sizeof version)
+                                               (unsigned __user *) arg, sizeof version)
                                ? -EFAULT : 0;
                        if (retval >= 0)
                                retval = if_version(cs, version);
  
  static int if_tiocmget(struct tty_struct *tty)
  {
 -      struct cardstate *cs;
 +      struct cardstate *cs = tty->driver_data;
        int retval;
  
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return -ENODEV;
 -      }
 -
        gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);
  
        if (mutex_lock_interruptible(&cs->mutex))
                return -ERESTARTSYS;
  
-       retval = cs->control_state & (TIOCM_RTS|TIOCM_DTR);
+       retval = cs->control_state & (TIOCM_RTS | TIOCM_DTR);
  
        mutex_unlock(&cs->mutex);
  
  static int if_tiocmset(struct tty_struct *tty,
                       unsigned int set, unsigned int clear)
  {
 -      struct cardstate *cs;
 +      struct cardstate *cs = tty->driver_data;
        int retval;
        unsigned mc;
  
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return -ENODEV;
 -      }
 -
        gig_dbg(DEBUG_IF, "%u: %s(0x%x, 0x%x)",
                cs->minor_index, __func__, set, clear);
  
                gig_dbg(DEBUG_IF, "not connected");
                retval = -ENODEV;
        } else {
-               mc = (cs->control_state | set) & ~clear & (TIOCM_RTS|TIOCM_DTR);
+               mc = (cs->control_state | set) & ~clear & (TIOCM_RTS | TIOCM_DTR);
                retval = cs->ops->set_modem_ctrl(cs, cs->control_state, mc);
                cs->control_state = mc;
        }
  
  static int if_write(struct tty_struct *tty, const unsigned char *buf, int count)
  {
 -      struct cardstate *cs;
 +      struct cardstate *cs = tty->driver_data;
        struct cmdbuf_t *cb;
        int retval;
  
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return -ENODEV;
 -      }
 -
        gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);
  
        if (mutex_lock_interruptible(&cs->mutex))
                retval = -ENODEV;
                goto done;
        }
 -      if (!cs->open_count) {
 -              dev_warn(cs->dev, "%s: device not opened\n", __func__);
 -              retval = -ENODEV;
 -              goto done;
 -      }
        if (cs->mstate != MS_LOCKED) {
                dev_warn(cs->dev, "can't write to unlocked device\n");
                retval = -EBUSY;
@@@ -354,9 -397,15 +354,9 @@@ done
  
  static int if_write_room(struct tty_struct *tty)
  {
 -      struct cardstate *cs;
 +      struct cardstate *cs = tty->driver_data;
        int retval = -ENODEV;
  
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return -ENODEV;
 -      }
 -
        gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);
  
        if (mutex_lock_interruptible(&cs->mutex))
        if (!cs->connected) {
                gig_dbg(DEBUG_IF, "not connected");
                retval = -ENODEV;
 -      } else if (!cs->open_count)
 -              dev_warn(cs->dev, "%s: device not opened\n", __func__);
 -      else if (cs->mstate != MS_LOCKED) {
 +      } else if (cs->mstate != MS_LOCKED) {
                dev_warn(cs->dev, "can't write to unlocked device\n");
                retval = -EBUSY;
        } else
  
  static int if_chars_in_buffer(struct tty_struct *tty)
  {
 -      struct cardstate *cs;
 +      struct cardstate *cs = tty->driver_data;
        int retval = 0;
  
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return 0;
 -      }
 -
        gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);
  
        mutex_lock(&cs->mutex);
  
        if (!cs->connected)
                gig_dbg(DEBUG_IF, "not connected");
 -      else if (!cs->open_count)
 -              dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else if (cs->mstate != MS_LOCKED)
                dev_warn(cs->dev, "can't write to unlocked device\n");
        else
  
  static void if_throttle(struct tty_struct *tty)
  {
 -      struct cardstate *cs;
 -
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return;
 -      }
 +      struct cardstate *cs = tty->driver_data;
  
        gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);
  
  
        if (!cs->connected)
                gig_dbg(DEBUG_IF, "not connected");     /* nothing to do */
 -      else if (!cs->open_count)
 -              dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else
                gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__);
  
  
  static void if_unthrottle(struct tty_struct *tty)
  {
 -      struct cardstate *cs;
 -
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return;
 -      }
 +      struct cardstate *cs = tty->driver_data;
  
        gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);
  
  
        if (!cs->connected)
                gig_dbg(DEBUG_IF, "not connected");     /* nothing to do */
 -      else if (!cs->open_count)
 -              dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else
                gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__);
  
  
  static void if_set_termios(struct tty_struct *tty, struct ktermios *old)
  {
 -      struct cardstate *cs;
 +      struct cardstate *cs = tty->driver_data;
        unsigned int iflag;
        unsigned int cflag;
        unsigned int old_cflag;
        unsigned int control_state, new_state;
  
 -      cs = (struct cardstate *) tty->driver_data;
 -      if (!cs) {
 -              pr_err("%s: no cardstate\n", __func__);
 -              return;
 -      }
 -
        gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);
  
        mutex_lock(&cs->mutex);
                goto out;
        }
  
 -      if (!cs->open_count) {
 -              dev_warn(cs->dev, "%s: device not opened\n", __func__);
 -              goto out;
 -      }
 -
        iflag = tty->termios->c_iflag;
        cflag = tty->termios->c_cflag;
        old_cflag = old ? old->c_cflag : cflag;
@@@ -502,13 -588,10 +502,13 @@@ out
  /* wakeup tasklet for the write operation */
  static void if_wake(unsigned long data)
  {
 -      struct cardstate *cs = (struct cardstate *) data;
 +      struct cardstate *cs = (struct cardstate *)data;
 +      struct tty_struct *tty = tty_port_tty_get(&cs->port);
  
 -      if (cs->tty)
 -              tty_wakeup(cs->tty);
 +      if (tty) {
 +              tty_wakeup(tty);
 +              tty_kref_put(tty);
 +      }
  }
  
  /*** interface to common ***/
@@@ -561,16 -644,18 +561,16 @@@ void gigaset_if_free(struct cardstate *
  void gigaset_if_receive(struct cardstate *cs,
                        unsigned char *buffer, size_t len)
  {
 -      unsigned long flags;
 -      struct tty_struct *tty;
 +      struct tty_struct *tty = tty_port_tty_get(&cs->port);
  
 -      spin_lock_irqsave(&cs->lock, flags);
 -      tty = cs->tty;
 -      if (tty == NULL)
 +      if (tty == NULL) {
                gig_dbg(DEBUG_IF, "receive on closed device");
 -      else {
 -              tty_insert_flip_string(tty, buffer, len);
 -              tty_flip_buffer_push(tty);
 +              return;
        }
 -      spin_unlock_irqrestore(&cs->lock, flags);
 +
 +      tty_insert_flip_string(tty, buffer, len);
 +      tty_flip_buffer_push(tty);
 +      tty_kref_put(tty);
  }
  EXPORT_SYMBOL_GPL(gigaset_if_receive);
  
  void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname,
                           const char *devname)
  {
 -      unsigned minors = drv->minors;
        int ret;
        struct tty_driver *tty;
  
        drv->have_tty = 0;
  
 -      drv->tty = tty = alloc_tty_driver(minors);
 +      drv->tty = tty = alloc_tty_driver(drv->minors);
        if (tty == NULL)
                goto enomem;
  
-       tty->type =             TTY_DRIVER_TYPE_SERIAL,
-       tty->subtype =          SERIAL_TYPE_NORMAL,
 -      tty->magic =            TTY_DRIVER_MAGIC;
+       tty->type =             TTY_DRIVER_TYPE_SERIAL;
+       tty->subtype =          SERIAL_TYPE_NORMAL;
        tty->flags =            TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
  
        tty->driver_name =      procname;
        tty->name =             devname;
        tty->minor_start =      drv->minor;
 -      tty->num =              drv->minors;
 -
 -      tty->owner =            THIS_MODULE;
  
        tty->init_termios          = tty_std_termios;
        tty->init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
@@@ -61,7 -61,7 +61,7 @@@ char *isdn_tty_revision = "$Revision: 1
   *      isdn_tty_readmodem().
   */
  static int
- isdn_tty_try_read(modem_info * info, struct sk_buff *skb)
+ isdn_tty_try_read(modem_info *info, struct sk_buff *skb)
  {
        int c;
        int len;
@@@ -93,7 -93,7 +93,7 @@@
                                                last = *dp;
                                        } else {
  #endif
-                                               if(len > 1)
+                                               if (len > 1)
                                                        tty_insert_flip_string(tty, skb->data, len - 1);
                                                last = skb->data[len - 1];
  #ifdef CONFIG_ISDN_AUDIO
@@@ -179,7 -179,7 +179,7 @@@ isdn_tty_rcv_skb(int i, int di, int cha
        info = &dev->mdm.info[midx];
  #ifdef CONFIG_ISDN_AUDIO
        ifmt = 1;
-       
        if ((info->vonline) && (!info->emu.vpar[4]))
                isdn_audio_calc_dtmf(info, skb->data, skb->len, ifmt);
        if ((info->vonline & 1) && (info->emu.vpar[1]))
        if (info->vonline & 1) {
                /* voice conversion/compression */
                switch (info->emu.vpar[3]) {
-                       case 2:
-                       case 3:
-                       case 4:
-                               /* adpcm
-                                * Since compressed data takes less
-                                * space, we can overwrite the buffer.
-                                */
-                               skb_trim(skb, isdn_audio_xlaw2adpcm(info->adpcmr,
-                                                                   ifmt,
-                                                                   skb->data,
-                                                                   skb->data,
-                                                                   skb->len));
-                               break;
-                       case 5:
-                               /* a-law */
-                               if (!ifmt)
-                                       isdn_audio_ulaw2alaw(skb->data, skb->len);
-                               break;
-                       case 6:
-                               /* u-law */
-                               if (ifmt)
-                                       isdn_audio_alaw2ulaw(skb->data, skb->len);
-                               break;
+               case 2:
+               case 3:
+               case 4:
+                       /* adpcm
+                        * Since compressed data takes less
+                        * space, we can overwrite the buffer.
+                        */
+                       skb_trim(skb, isdn_audio_xlaw2adpcm(info->adpcmr,
+                                                           ifmt,
+                                                           skb->data,
+                                                           skb->data,
+                                                           skb->len));
+                       break;
+               case 5:
+                       /* a-law */
+                       if (!ifmt)
+                               isdn_audio_ulaw2alaw(skb->data, skb->len);
+                       break;
+               case 6:
+                       /* u-law */
+                       if (ifmt)
+                               isdn_audio_alaw2ulaw(skb->data, skb->len);
+                       break;
                }
                ISDN_AUDIO_SKB_DLECOUNT(skb) =
                        isdn_tty_countDLE(skb->data, skb->len);
  }
  
  static void
- isdn_tty_cleanup_xmit(modem_info * info)
+ isdn_tty_cleanup_xmit(modem_info *info)
  {
        skb_queue_purge(&info->xmit_queue);
  #ifdef CONFIG_ISDN_AUDIO
  }
  
  static void
- isdn_tty_tint(modem_info * info)
+ isdn_tty_tint(modem_info *info)
  {
        struct sk_buff *skb = skb_dequeue(&info->xmit_queue);
        int len, slen;
@@@ -325,7 -325,7 +325,7 @@@ isdn_tty_countDLE(unsigned char *buf, i
   * DLE-decoding when sending audio-data.
   */
  static int
- isdn_tty_handleDLEdown(modem_info * info, atemu * m, int len)
+ isdn_tty_handleDLEdown(modem_info *info, atemu *m, int len)
  {
        unsigned char *p = &info->xmit_buf[info->xmit_count];
        int count = 0;
                if (m->lastDLE) {
                        m->lastDLE = 0;
                        switch (*p) {
-                               case DLE:
-                                       /* Escape code */
-                                       if (len > 1)
-                                               memmove(p, p + 1, len - 1);
-                                       p--;
-                                       count++;
-                                       break;
-                               case ETX:
-                                       /* End of data */
-                                       info->vonline |= 4;
-                                       return count;
-                               case DC4:
-                                       /* Abort RX */
-                                       info->vonline &= ~1;
+                       case DLE:
+                               /* Escape code */
+                               if (len > 1)
+                                       memmove(p, p + 1, len - 1);
+                               p--;
+                               count++;
+                               break;
+                       case ETX:
+                               /* End of data */
+                               info->vonline |= 4;
+                               return count;
+                       case DC4:
+                               /* Abort RX */
+                               info->vonline &= ~1;
  #ifdef ISDN_DEBUG_MODEM_VOICE
-                                       printk(KERN_DEBUG
-                                              "DLEdown: got DLE-DC4, send DLE-ETX on ttyI%d\n",
-                                              info->line);
+                               printk(KERN_DEBUG
+                                      "DLEdown: got DLE-DC4, send DLE-ETX on ttyI%d\n",
+                                      info->line);
  #endif
-                                       isdn_tty_at_cout("\020\003", info);
-                                       if (!info->vonline) {
+                               isdn_tty_at_cout("\020\003", info);
+                               if (!info->vonline) {
  #ifdef ISDN_DEBUG_MODEM_VOICE
-                                               printk(KERN_DEBUG
-                                                      "DLEdown: send VCON on ttyI%d\n",
-                                                      info->line);
+                                       printk(KERN_DEBUG
+                                              "DLEdown: send VCON on ttyI%d\n",
+                                              info->line);
  #endif
-                                               isdn_tty_at_cout("\r\nVCON\r\n", info);
-                                       }
-                                       /* Fall through */
-                               case 'q':
-                               case 's':
-                                       /* Silence */
-                                       if (len > 1)
-                                               memmove(p, p + 1, len - 1);
-                                       p--;
-                                       break;
+                                       isdn_tty_at_cout("\r\nVCON\r\n", info);
+                               }
+                               /* Fall through */
+                       case 'q':
+                       case 's':
+                               /* Silence */
+                               if (len > 1)
+                                       memmove(p, p + 1, len - 1);
+                               p--;
+                               break;
                        }
                } else {
                        if (*p == DLE)
@@@ -416,7 -416,7 +416,7 @@@ static int voice_cf[7] 
   * T.70 if necessary, and finally queues it up for sending via isdn_tty_tint.
   */
  static void
- isdn_tty_senddown(modem_info * info)
+ isdn_tty_senddown(modem_info *info)
  {
        int buflen;
        int skb_res;
  #endif
        if (!(buflen = info->xmit_count))
                return;
-       if ((info->emu.mdmreg[REG_CTS] & BIT_CTS) != 0)
+       if ((info->emu.mdmreg[REG_CTS] & BIT_CTS) != 0)
                info->msr &= ~UART_MSR_CTS;
-       info->lsr &= ~UART_LSR_TEMT;    
+       info->lsr &= ~UART_LSR_TEMT;
        /* info->xmit_count is modified here and in isdn_tty_write().
         * So we return here if isdn_tty_write() is in the
         * critical section.
  
                /* voice conversion/decompression */
                switch (info->emu.vpar[3]) {
-                       case 2:
-                       case 3:
-                       case 4:
-                               /* adpcm, compatible to ZyXel 1496 modem
-                                * with ROM revision 6.01
-                                */
-                               audio_len = isdn_audio_adpcm2xlaw(info->adpcms,
-                                                                 ifmt,
-                                                                 skb->data,
-                                                   skb_put(skb, audio_len),
-                                                                 buflen);
-                               skb_pull(skb, buflen);
-                               skb_trim(skb, audio_len);
-                               break;
-                       case 5:
-                               /* a-law */
-                               if (!ifmt)
-                                       isdn_audio_alaw2ulaw(skb->data,
-                                                            buflen);
-                               break;
-                       case 6:
-                               /* u-law */
-                               if (ifmt)
-                                       isdn_audio_ulaw2alaw(skb->data,
-                                                            buflen);
-                               break;
+               case 2:
+               case 3:
+               case 4:
+                       /* adpcm, compatible to ZyXel 1496 modem
+                        * with ROM revision 6.01
+                        */
+                       audio_len = isdn_audio_adpcm2xlaw(info->adpcms,
+                                                         ifmt,
+                                                         skb->data,
+                                                         skb_put(skb, audio_len),
+                                                         buflen);
+                       skb_pull(skb, buflen);
+                       skb_trim(skb, audio_len);
+                       break;
+               case 5:
+                       /* a-law */
+                       if (!ifmt)
+                               isdn_audio_alaw2ulaw(skb->data,
+                                                    buflen);
+                       break;
+               case 6:
+                       /* u-law */
+                       if (ifmt)
+                               isdn_audio_ulaw2alaw(skb->data,
+                                                    buflen);
+                       break;
                }
        }
  #endif                          /* CONFIG_ISDN_AUDIO */
@@@ -550,7 -550,7 +550,7 @@@ isdn_tty_modem_do_ncarrier(unsigned lon
   * low.
   */
  static void
- isdn_tty_modem_ncarrier(modem_info * info)
+ isdn_tty_modem_ncarrier(modem_info *info)
  {
        if (info->ncarrier) {
                info->nc_timer.expires = jiffies + HZ;
@@@ -568,30 -568,30 +568,30 @@@ isdn_calc_usage(int si, int l2
  
  #ifdef CONFIG_ISDN_AUDIO
        if (si == 1) {
-               switch(l2) {
-                       case ISDN_PROTO_L2_MODEM: 
-                               usg = ISDN_USAGE_MODEM;
-                               break;
+               switch (l2) {
+               case ISDN_PROTO_L2_MODEM:
+                       usg = ISDN_USAGE_MODEM;
+                       break;
  #ifdef CONFIG_ISDN_TTY_FAX
-                       case ISDN_PROTO_L2_FAX: 
-                               usg = ISDN_USAGE_FAX;
-                               break;
+               case ISDN_PROTO_L2_FAX:
+                       usg = ISDN_USAGE_FAX;
+                       break;
  #endif
-                       case ISDN_PROTO_L2_TRANS: 
-                       default:
-                               usg = ISDN_USAGE_VOICE;
-                               break;
+               case ISDN_PROTO_L2_TRANS:
+               default:
+                       usg = ISDN_USAGE_VOICE;
+                       break;
                }
        }
  #endif
-       return(usg);
+       return (usg);
  }
  
  /* isdn_tty_dial() performs dialing of a tty an the necessary
   * setup of the lower levels before that.
   */
  static void
- isdn_tty_dial(char *n, modem_info * info, atemu * m)
+ isdn_tty_dial(char *n, modem_info *info, atemu *m)
  {
        int usg = ISDN_USAGE_MODEM;
        int si = 7;
                }
        usg = isdn_calc_usage(si, l2);
  #ifdef CONFIG_ISDN_AUDIO
-       if ((si == 1) && 
-               (l2 != ISDN_PROTO_L2_MODEM)
+       if ((si == 1) &&
+           (l2 != ISDN_PROTO_L2_MODEM)
  #ifdef CONFIG_ISDN_TTY_FAX
-               && (l2 != ISDN_PROTO_L2_FAX)
+           && (l2 != ISDN_PROTO_L2_FAX)
  #endif
                ) {
                l2 = ISDN_PROTO_L2_TRANS;
   * and some cleanup is done also.
   */
  void
- isdn_tty_modem_hup(modem_info * info, int local)
+ isdn_tty_modem_hup(modem_info *info, int local)
  {
        isdn_ctrl cmd;
        int di, ch;
        info->adpcmr = NULL;
  #endif
        if ((info->msr & UART_MSR_RI) &&
-               (info->emu.mdmreg[REG_RUNG] & BIT_RUNG))
+           (info->emu.mdmreg[REG_RUNG] & BIT_RUNG))
                isdn_tty_modem_result(RESULT_RUNG, info);
        info->msr &= ~(UART_MSR_DCD | UART_MSR_RI);
        info->lsr |= UART_LSR_TEMT;
  }
  
  /*
-  * Begin of a CAPI like interface, currently used only for 
+  * Begin of a CAPI like interface, currently used only for
   * supplementary service (CAPI 2.0 part III)
   */
  #include <linux/isdn/capicmd.h>
  
  int
  isdn_tty_capi_facility(capi_msg *cm) {
-       return(-1); /* dummy */
+       return (-1); /* dummy */
  }
  
  /* isdn_tty_suspend() tries to suspend the current tty connection
   */
  static void
- isdn_tty_suspend(char *id, modem_info * info, atemu * m)
+ isdn_tty_suspend(char *id, modem_info *info, atemu *m)
  {
        isdn_ctrl cmd;
-       
        int l;
  
        if (!info)
  #endif
        l = strlen(id);
        if ((info->isdn_driver >= 0)) {
-               cmd.parm.cmsg.Length = l+18;
+               cmd.parm.cmsg.Length = l + 18;
                cmd.parm.cmsg.Command = CAPI_FACILITY;
                cmd.parm.cmsg.Subcommand = CAPI_REQ;
                cmd.parm.cmsg.adr.Controller = info->isdn_driver + 1;
   */
  
  static void
- isdn_tty_resume(char *id, modem_info * info, atemu * m)
+ isdn_tty_resume(char *id, modem_info *info, atemu *m)
  {
        int usg = ISDN_USAGE_MODEM;
        int si = 7;
                }
        usg = isdn_calc_usage(si, l2);
  #ifdef CONFIG_ISDN_AUDIO
-       if ((si == 1) && 
-               (l2 != ISDN_PROTO_L2_MODEM)
+       if ((si == 1) &&
+           (l2 != ISDN_PROTO_L2_MODEM)
  #ifdef CONFIG_ISDN_TTY_FAX
-               && (l2 != ISDN_PROTO_L2_FAX)
+           && (l2 != ISDN_PROTO_L2_FAX)
  #endif
                ) {
                l2 = ISDN_PROTO_L2_TRANS;
                isdn_command(&cmd);
                cmd.driver = info->isdn_driver;
                cmd.arg = info->isdn_channel;
-               cmd.parm.cmsg.Length = l+18;
+               cmd.parm.cmsg.Length = l + 18;
                cmd.parm.cmsg.Command = CAPI_FACILITY;
                cmd.parm.cmsg.Subcommand = CAPI_REQ;
                cmd.parm.cmsg.adr.Controller = info->isdn_driver + 1;
                cmd.parm.cmsg.para[0] = 3; /* 16 bit 0x0003 suplementary service */
                cmd.parm.cmsg.para[1] = 0;
-               cmd.parm.cmsg.para[2] = l+3;
+               cmd.parm.cmsg.para[2] = l + 3;
                cmd.parm.cmsg.para[3] = 5; /* 16 bit 0x0005 Resume */
                cmd.parm.cmsg.para[4] = 0;
                cmd.parm.cmsg.para[5] = l;
                strncpy(&cmd.parm.cmsg.para[6], id, l);
-               cmd.command =CAPI_PUT_MESSAGE;
+               cmd.command = CAPI_PUT_MESSAGE;
                info->dialing = 1;
  //            strcpy(dev->num[i], n);
                isdn_info_update();
   */
  
  static void
- isdn_tty_send_msg(modem_info * info, atemu * m, char *msg)
+ isdn_tty_send_msg(modem_info *info, atemu *m, char *msg)
  {
        int usg = ISDN_USAGE_MODEM;
        int si = 7;
                }
        usg = isdn_calc_usage(si, l2);
  #ifdef CONFIG_ISDN_AUDIO
-       if ((si == 1) && 
-               (l2 != ISDN_PROTO_L2_MODEM)
+       if ((si == 1) &&
+           (l2 != ISDN_PROTO_L2_MODEM)
  #ifdef CONFIG_ISDN_TTY_FAX
-               && (l2 != ISDN_PROTO_L2_FAX)
+           && (l2 != ISDN_PROTO_L2_FAX)
  #endif
                ) {
                l2 = ISDN_PROTO_L2_TRANS;
                isdn_command(&cmd);
                cmd.driver = info->isdn_driver;
                cmd.arg = info->isdn_channel;
-               cmd.parm.cmsg.Length = l+14;
+               cmd.parm.cmsg.Length = l + 14;
                cmd.parm.cmsg.Command = CAPI_MANUFACTURER;
                cmd.parm.cmsg.Subcommand = CAPI_REQ;
                cmd.parm.cmsg.adr.Controller = info->isdn_driver + 1;
-               cmd.parm.cmsg.para[0] = l+1;
+               cmd.parm.cmsg.para[0] = l + 1;
                strncpy(&cmd.parm.cmsg.para[1], msg, l);
-               cmd.parm.cmsg.para[l+1] = 0xd;
-               cmd.command =CAPI_PUT_MESSAGE;
+               cmd.parm.cmsg.para[l + 1] = 0xd;
+               cmd.command = CAPI_PUT_MESSAGE;
  /*            info->dialing = 1;
                strcpy(dev->num[i], n);
                isdn_info_update();
@@@ -978,7 -978,7 +978,7 @@@ isdn_tty_paranoia_check(modem_info *inf
  #ifdef MODEM_PARANOIA_CHECK
        if (!info) {
                printk(KERN_WARNING "isdn_tty: null info_struct for %s in %s\n",
-                       name, routine);
+                      name, routine);
                return 1;
        }
        if (info->magic != ISDN_ASYNC_MAGIC) {
   * the specified baud rate for a serial port.
   */
  static void
- isdn_tty_change_speed(modem_info * info)
+ isdn_tty_change_speed(modem_info *info)
  {
        uint cflag,
-        cval,
-        quot;
+               cval,
+               quot;
        int i;
  
        if (!info->tty || !info->tty->termios)
  }
  
  static int
- isdn_tty_startup(modem_info * info)
+ isdn_tty_startup(modem_info *info)
  {
        if (info->flags & ISDN_ASYNC_INITIALIZED)
                return 0;
   * DTR is dropped if the hangup on close termio flag is on.
   */
  static void
- isdn_tty_shutdown(modem_info * info)
+ isdn_tty_shutdown(modem_info *info)
  {
        if (!(info->flags & ISDN_ASYNC_INITIALIZED))
                return;
   *  - If dialing, abort dial.
   */
  static int
- isdn_tty_write(struct tty_struct *tty, const u_char * buf, int count)
+ isdn_tty_write(struct tty_struct *tty, const u_char *buf, int count)
  {
        int c;
        int total = 0;
                                        }
                                }
                        } else
-                       if (TTY_IS_FCLASS1(info)) {
-                               int cc = isdn_tty_handleDLEdown(info, m, c);
-                               
-                               if (info->vonline & 4) { /* ETX seen */
-                                       isdn_ctrl c;
-                                       c.command = ISDN_CMD_FAXCMD;
-                                       c.driver = info->isdn_driver;
-                                       c.arg = info->isdn_channel;
-                                       c.parm.aux.cmd = ISDN_FAX_CLASS1_CTRL;
-                                       c.parm.aux.subcmd = ETX;
-                                       isdn_command(&c);
-                               }
-                               info->vonline = 0;
+                               if (TTY_IS_FCLASS1(info)) {
+                                       int cc = isdn_tty_handleDLEdown(info, m, c);
+                                       if (info->vonline & 4) { /* ETX seen */
+                                               isdn_ctrl c;
+                                               c.command = ISDN_CMD_FAXCMD;
+                                               c.driver = info->isdn_driver;
+                                               c.arg = info->isdn_channel;
+                                               c.parm.aux.cmd = ISDN_FAX_CLASS1_CTRL;
+                                               c.parm.aux.subcmd = ETX;
+                                               isdn_command(&c);
+                                       }
+                                       info->vonline = 0;
  #ifdef ISDN_DEBUG_MODEM_VOICE
-                               printk(KERN_DEBUG "fax dle cc/c %d/%d\n", cc, c);
+                                       printk(KERN_DEBUG "fax dle cc/c %d/%d\n", cc, c);
  #endif
-                               info->xmit_count += cc;
-                       } else
+                                       info->xmit_count += cc;
+                               } else
  #endif
-                               info->xmit_count += c;
+                                       info->xmit_count += c;
                } else {
                        info->msr |= UART_MSR_CTS;
                        info->lsr |= UART_LSR_TEMT;
@@@ -1332,7 -1332,7 +1332,7 @@@ isdn_tty_unthrottle(struct tty_struct *
   *          allows RS485 driver to be written in user space.
   */
  static int
- isdn_tty_get_lsr_info(modem_info * info, uint __user * value)
+ isdn_tty_get_lsr_info(modem_info *info, uint __user *value)
  {
        u_char status;
        uint result;
@@@ -1363,16 -1363,16 +1363,16 @@@ isdn_tty_tiocmget(struct tty_struct *tt
        status = info->msr;
        mutex_unlock(&modem_info_mutex);
        return ((control & UART_MCR_RTS) ? TIOCM_RTS : 0)
-           | ((control & UART_MCR_DTR) ? TIOCM_DTR : 0)
-           | ((status & UART_MSR_DCD) ? TIOCM_CAR : 0)
-           | ((status & UART_MSR_RI) ? TIOCM_RNG : 0)
-           | ((status & UART_MSR_DSR) ? TIOCM_DSR : 0)
-           | ((status & UART_MSR_CTS) ? TIOCM_CTS : 0);
+               | ((control & UART_MCR_DTR) ? TIOCM_DTR : 0)
+               | ((status & UART_MSR_DCD) ? TIOCM_CAR : 0)
+               | ((status & UART_MSR_RI) ? TIOCM_RNG : 0)
+               | ((status & UART_MSR_DSR) ? TIOCM_DSR : 0)
+               | ((status & UART_MSR_CTS) ? TIOCM_CTS : 0);
  }
  
  static int
  isdn_tty_tiocmset(struct tty_struct *tty,
-               unsigned int set, unsigned int clear)
+                 unsigned int set, unsigned int clear)
  {
        modem_info *info = (modem_info *) tty->driver_data;
  
@@@ -1422,34 -1422,34 +1422,34 @@@ isdn_tty_ioctl(struct tty_struct *tty, 
        if (tty->flags & (1 << TTY_IO_ERROR))
                return -EIO;
        switch (cmd) {
-               case TCSBRK:   /* SVID version: non-zero arg --> no break */
+       case TCSBRK:   /* SVID version: non-zero arg --> no break */
  #ifdef ISDN_DEBUG_MODEM_IOCTL
-                       printk(KERN_DEBUG "ttyI%d ioctl TCSBRK\n", info->line);
- #endif
-                       retval = tty_check_change(tty);
-                       if (retval)
-                               return retval;
-                       tty_wait_until_sent(tty, 0);
-                       return 0;
-               case TCSBRKP:  /* support for POSIX tcsendbreak() */
+               printk(KERN_DEBUG "ttyI%d ioctl TCSBRK\n", info->line);
+ #endif
+               retval = tty_check_change(tty);
+               if (retval)
+                       return retval;
+               tty_wait_until_sent(tty, 0);
+               return 0;
+       case TCSBRKP:  /* support for POSIX tcsendbreak() */
  #ifdef ISDN_DEBUG_MODEM_IOCTL
-                       printk(KERN_DEBUG "ttyI%d ioctl TCSBRKP\n", info->line);
- #endif
-                       retval = tty_check_change(tty);
-                       if (retval)
-                               return retval;
-                       tty_wait_until_sent(tty, 0);
-                       return 0;
-               case TIOCSERGETLSR:     /* Get line status register */
+               printk(KERN_DEBUG "ttyI%d ioctl TCSBRKP\n", info->line);
+ #endif
+               retval = tty_check_change(tty);
+               if (retval)
+                       return retval;
+               tty_wait_until_sent(tty, 0);
+               return 0;
+       case TIOCSERGETLSR:     /* Get line status register */
  #ifdef ISDN_DEBUG_MODEM_IOCTL
-                       printk(KERN_DEBUG "ttyI%d ioctl TIOCSERGETLSR\n", info->line);
+               printk(KERN_DEBUG "ttyI%d ioctl TIOCSERGETLSR\n", info->line);
  #endif
-                       return isdn_tty_get_lsr_info(info, (uint __user *) arg);
-               default:
+               return isdn_tty_get_lsr_info(info, (uint __user *) arg);
+       default:
  #ifdef ISDN_DEBUG_MODEM_IOCTL
-                       printk(KERN_DEBUG "UNKNOWN ioctl 0x%08x on ttyi%d\n", cmd, info->line);
+               printk(KERN_DEBUG "UNKNOWN ioctl 0x%08x on ttyi%d\n", cmd, info->line);
  #endif
-                       return -ENOIOCTLCMD;
+               return -ENOIOCTLCMD;
        }
        return 0;
  }
@@@ -1479,7 -1479,7 +1479,7 @@@ isdn_tty_set_termios(struct tty_struct 
   * ------------------------------------------------------------
   */
  static int
- isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info * info)
+ isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info *info)
  {
        DECLARE_WAITQUEUE(wait, NULL);
        int do_clocal = 0;
@@@ -1590,9 -1590,12 +1590,9 @@@ static in
  isdn_tty_open(struct tty_struct *tty, struct file *filp)
  {
        modem_info *info;
 -      int retval, line;
 +      int retval;
  
 -      line = tty->index;
 -      if (line < 0 || line >= ISDN_MAX_CHANNELS)
 -              return -ENODEV;
 -      info = &dev->mdm.info[line];
 +      info = &dev->mdm.info[tty->index];
        if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open"))
                return -ENODEV;
        if (!try_module_get(info->owner)) {
                return -ENODEV;
        }
  #ifdef ISDN_DEBUG_MODEM_OPEN
-       printk(KERN_DEBUG "isdn_tty_open %s, count = %d\n", tty->name, 
+       printk(KERN_DEBUG "isdn_tty_open %s, count = %d\n", tty->name,
               info->count);
  #endif
        info->count++;
@@@ -1700,7 -1703,7 +1700,7 @@@ isdn_tty_close(struct tty_struct *tty, 
                timeout = jiffies + HZ;
                while (!(info->lsr & UART_LSR_TEMT)) {
                        schedule_timeout_interruptible(20);
-                       if (time_after(jiffies,timeout))
+                       if (time_after(jiffies, timeout))
                                break;
                }
        }
@@@ -1743,7 -1746,7 +1743,7 @@@ isdn_tty_hangup(struct tty_struct *tty
  /* This routine initializes all emulator-data.
   */
  static void
- isdn_tty_reset_profile(atemu * m)
+ isdn_tty_reset_profile(atemu *m)
  {
        m->profile[0] = 0;
        m->profile[1] = 0;
  
  #ifdef CONFIG_ISDN_AUDIO
  static void
- isdn_tty_modem_reset_vpar(atemu * m)
+ isdn_tty_modem_reset_vpar(atemu *m)
  {
        m->vpar[0] = 2;         /* Voice-device            (2 = phone line) */
        m->vpar[1] = 0;         /* Silence detection level (0 = none      ) */
  
  #ifdef CONFIG_ISDN_TTY_FAX
  static void
- isdn_tty_modem_reset_faxpar(modem_info * info)
+ isdn_tty_modem_reset_faxpar(modem_info *info)
  {
        T30_s *f = info->fax;
  
  #endif
  
  static void
- isdn_tty_modem_reset_regs(modem_info * info, int force)
+ isdn_tty_modem_reset_regs(modem_info *info, int force)
  {
        atemu *m = &info->emu;
        if ((m->mdmreg[REG_DTRR] & BIT_DTRR) || force) {
  }
  
  static void
- modem_write_profile(atemu * m)
+ modem_write_profile(atemu *m)
  {
        memcpy(m->profile, m->mdmreg, ISDN_MODEM_NUMREG);
        memcpy(m->pmsn, m->msn, ISDN_MSNLEN);
  }
  
  static const struct tty_operations modem_ops = {
-         .open = isdn_tty_open,
+       .open = isdn_tty_open,
        .close = isdn_tty_close,
        .write = isdn_tty_write,
        .flush_chars = isdn_tty_flush_chars,
@@@ -1948,7 -1951,7 +1948,7 @@@ err_unregister
                kfree(info->xmit_buf - 4);
        }
        tty_unregister_driver(m->tty_modem);
-  err:
+ err:
        put_tty_driver(m->tty_modem);
        m->tty_modem = NULL;
        return retval;
@@@ -2018,8 -2021,8 +2018,8 @@@ isdn_tty_match_icall(char *cid, atemu *
                int tmp;
                tmp = isdn_msncmp(cid, isdn_map_eaz2msn(emu->msn, di));
  #ifdef ISDN_DEBUG_MODEM_ICALL
-                       printk(KERN_DEBUG "m_fi: mmsn=%s -> tmp=%d\n",
-                              isdn_map_eaz2msn(emu->msn, di), tmp);
+               printk(KERN_DEBUG "m_fi: mmsn=%s -> tmp=%d\n",
+                      isdn_map_eaz2msn(emu->msn, di), tmp);
  #endif
                return tmp;
        }
@@@ -2068,8 -2071,8 +2068,8 @@@ isdn_tty_find_icall(int di, int ch, set
        for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
                modem_info *info = &dev->mdm.info[i];
  
-                 if (info->count == 0)
-                     continue;
+               if (info->count == 0)
+                       continue;
                if ((info->emu.mdmreg[REG_SI1] & si2bit[si1]) &&  /* SI1 is matching */
                    (info->emu.mdmreg[REG_SI2] == si2)) {         /* SI2 is matching */
                        idx = isdn_dc2minor(di, ch);
                                        info->drv_index = idx;
                                        dev->m_idx[idx] = info->line;
                                        dev->usage[idx] &= ISDN_USAGE_EXCLUSIVE;
-                                       dev->usage[idx] |= isdn_calc_usage(si1, info->emu.mdmreg[REG_L2PROT]); 
+                                       dev->usage[idx] |= isdn_calc_usage(si1, info->emu.mdmreg[REG_L2PROT]);
                                        strcpy(dev->num[idx], nr);
                                        strcpy(info->emu.cpn, eaz);
                                        info->emu.mdmreg[REG_SI1I] = si2bit[si1];
        }
        spin_unlock_irqrestore(&dev->lock, flags);
        printk(KERN_INFO "isdn_tty: call from %s -> %s %s\n", nr, eaz,
-              ((dev->drv[di]->flags & DRV_FLAG_REJBUS) && (wret != 2))? "rejected" : "ignored");
-       return (wret == 2)?3:0;
+              ((dev->drv[di]->flags & DRV_FLAG_REJBUS) && (wret != 2)) ? "rejected" : "ignored");
+       return (wret == 2) ? 3 : 0;
  }
  
- #define TTY_IS_ACTIVE(info) \
+ #define TTY_IS_ACTIVE(info)                                           \
        (info->flags & (ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE))
  
  int
@@@ -2135,174 -2138,174 +2135,174 @@@ isdn_tty_stat_callback(int i, isdn_ctr
        if ((mi = dev->m_idx[i]) >= 0) {
                info = &dev->mdm.info[mi];
                switch (c->command) {
-                         case ISDN_STAT_CINF:
-                                 printk(KERN_DEBUG "CHARGEINFO on ttyI%d: %ld %s\n", info->line, c->arg, c->parm.num);
-                                 info->emu.charge = (unsigned) simple_strtoul(c->parm.num, &e, 10);
-                                 if (e == (char *)c->parm.num)
-                                       info->emu.charge = 0;
-                               
-                                 break;                        
-                       case ISDN_STAT_BSENT:
- #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_BSENT ttyI%d\n", info->line);
- #endif
-                               if ((info->isdn_driver == c->driver) &&
-                                   (info->isdn_channel == c->arg)) {
-                                       info->msr |= UART_MSR_CTS;
-                                       if (info->send_outstanding)
-                                               if (!(--info->send_outstanding))
-                                                       info->lsr |= UART_LSR_TEMT;
-                                       isdn_tty_tint(info);
-                                       return 1;
-                               }
-                               break;
-                       case ISDN_STAT_CAUSE:
+               case ISDN_STAT_CINF:
+                       printk(KERN_DEBUG "CHARGEINFO on ttyI%d: %ld %s\n", info->line, c->arg, c->parm.num);
+                       info->emu.charge = (unsigned) simple_strtoul(c->parm.num, &e, 10);
+                       if (e == (char *)c->parm.num)
+                               info->emu.charge = 0;
+                       break;
+               case ISDN_STAT_BSENT:
  #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_CAUSE ttyI%d\n", info->line);
+                       printk(KERN_DEBUG "tty_STAT_BSENT ttyI%d\n", info->line);
  #endif
-                               /* Signal cause to tty-device */
-                               strncpy(info->last_cause, c->parm.num, 5);
+                       if ((info->isdn_driver == c->driver) &&
+                           (info->isdn_channel == c->arg)) {
+                               info->msr |= UART_MSR_CTS;
+                               if (info->send_outstanding)
+                                       if (!(--info->send_outstanding))
+                                               info->lsr |= UART_LSR_TEMT;
+                               isdn_tty_tint(info);
                                return 1;
-                       case ISDN_STAT_DISPLAY:
+                       }
+                       break;
+               case ISDN_STAT_CAUSE:
  #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_DISPLAY ttyI%d\n", info->line);
- #endif
-                               /* Signal display to tty-device */
-                               if ((info->emu.mdmreg[REG_DISPLAY] & BIT_DISPLAY) && 
-                                       !(info->emu.mdmreg[REG_RESPNUM] & BIT_RESPNUM)) {
-                                 isdn_tty_at_cout("\r\n", info);
-                                 isdn_tty_at_cout("DISPLAY: ", info);
-                                 isdn_tty_at_cout(c->parm.display, info);
-                                 isdn_tty_at_cout("\r\n", info);
-                               }
-                               return 1;
-                       case ISDN_STAT_DCONN:
+                       printk(KERN_DEBUG "tty_STAT_CAUSE ttyI%d\n", info->line);
+ #endif
+                       /* Signal cause to tty-device */
+                       strncpy(info->last_cause, c->parm.num, 5);
+                       return 1;
+               case ISDN_STAT_DISPLAY:
  #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_DCONN ttyI%d\n", info->line);
+                       printk(KERN_DEBUG "tty_STAT_DISPLAY ttyI%d\n", info->line);
  #endif
-                               if (TTY_IS_ACTIVE(info)) {
-                                       if (info->dialing == 1) {
-                                               info->dialing = 2;
-                                               return 1;
-                                       }
+                       /* Signal display to tty-device */
+                       if ((info->emu.mdmreg[REG_DISPLAY] & BIT_DISPLAY) &&
+                           !(info->emu.mdmreg[REG_RESPNUM] & BIT_RESPNUM)) {
+                               isdn_tty_at_cout("\r\n", info);
+                               isdn_tty_at_cout("DISPLAY: ", info);
+                               isdn_tty_at_cout(c->parm.display, info);
+                               isdn_tty_at_cout("\r\n", info);
+                       }
+                       return 1;
+               case ISDN_STAT_DCONN:
+ #ifdef ISDN_TTY_STAT_DEBUG
+                       printk(KERN_DEBUG "tty_STAT_DCONN ttyI%d\n", info->line);
+ #endif
+                       if (TTY_IS_ACTIVE(info)) {
+                               if (info->dialing == 1) {
+                                       info->dialing = 2;
+                                       return 1;
                                }
-                               break;
-                       case ISDN_STAT_DHUP:
+                       }
+                       break;
+               case ISDN_STAT_DHUP:
  #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_DHUP ttyI%d\n", info->line);
+                       printk(KERN_DEBUG "tty_STAT_DHUP ttyI%d\n", info->line);
  #endif
-                               if (TTY_IS_ACTIVE(info)) {
-                                       if (info->dialing == 1) 
-                                               isdn_tty_modem_result(RESULT_BUSY, info);
-                                       if (info->dialing > 1) 
-                                               isdn_tty_modem_result(RESULT_NO_CARRIER, info);
-                                       info->dialing = 0;
+                       if (TTY_IS_ACTIVE(info)) {
+                               if (info->dialing == 1)
+                                       isdn_tty_modem_result(RESULT_BUSY, info);
+                               if (info->dialing > 1)
+                                       isdn_tty_modem_result(RESULT_NO_CARRIER, info);
+                               info->dialing = 0;
  #ifdef ISDN_DEBUG_MODEM_HUP
-                                       printk(KERN_DEBUG "Mhup in ISDN_STAT_DHUP\n");
+                               printk(KERN_DEBUG "Mhup in ISDN_STAT_DHUP\n");
  #endif
-                                       isdn_tty_modem_hup(info, 0);
-                                       return 1;
-                               }
-                               break;
-                       case ISDN_STAT_BCONN:
+                               isdn_tty_modem_hup(info, 0);
+                               return 1;
+                       }
+                       break;
+               case ISDN_STAT_BCONN:
  #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_BCONN ttyI%d\n", info->line);
- #endif
-                               /* Wake up any processes waiting
-                                * for incoming call of this device when
-                                * DCD follow the state of incoming carrier
-                                */
-                               if (info->blocked_open &&
-                                  (info->emu.mdmreg[REG_DCD] & BIT_DCD)) {
-                                       wake_up_interruptible(&info->open_wait);
-                               }
+                       printk(KERN_DEBUG "tty_STAT_BCONN ttyI%d\n", info->line);
+ #endif
+                       /* Wake up any processes waiting
+                        * for incoming call of this device when
+                        * DCD follow the state of incoming carrier
+                        */
+                       if (info->blocked_open &&
+                           (info->emu.mdmreg[REG_DCD] & BIT_DCD)) {
+                               wake_up_interruptible(&info->open_wait);
+                       }
  
-                               /* Schedule CONNECT-Message to any tty
-                                * waiting for it and
-                                * set DCD-bit of its modem-status.
-                                */
-                               if (TTY_IS_ACTIVE(info) ||
-                                   (info->blocked_open && (info->emu.mdmreg[REG_DCD] & BIT_DCD))) {
-                                       info->msr |= UART_MSR_DCD;
-                                       info->emu.charge = 0;
-                                       if (info->dialing & 0xf)
-                                               info->last_dir = 1;
-                                       else
-                                               info->last_dir = 0;
-                                       info->dialing = 0;
-                                       info->rcvsched = 1;
-                                       if (USG_MODEM(dev->usage[i])) {
-                                               if (info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM) {
-                                                       strcpy(info->emu.connmsg, c->parm.num);
-                                                       isdn_tty_modem_result(RESULT_CONNECT, info);
-                                               } else
-                                                       isdn_tty_modem_result(RESULT_CONNECT64000, info);
-                                       }
-                                       if (USG_VOICE(dev->usage[i]))
-                                               isdn_tty_modem_result(RESULT_VCON, info);
-                                       return 1;
+                       /* Schedule CONNECT-Message to any tty
+                        * waiting for it and
+                        * set DCD-bit of its modem-status.
+                        */
+                       if (TTY_IS_ACTIVE(info) ||
+                           (info->blocked_open && (info->emu.mdmreg[REG_DCD] & BIT_DCD))) {
+                               info->msr |= UART_MSR_DCD;
+                               info->emu.charge = 0;
+                               if (info->dialing & 0xf)
+                                       info->last_dir = 1;
+                               else
+                                       info->last_dir = 0;
+                               info->dialing = 0;
+                               info->rcvsched = 1;
+                               if (USG_MODEM(dev->usage[i])) {
+                                       if (info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM) {
+                                               strcpy(info->emu.connmsg, c->parm.num);
+                                               isdn_tty_modem_result(RESULT_CONNECT, info);
+                                       } else
+                                               isdn_tty_modem_result(RESULT_CONNECT64000, info);
                                }
-                               break;
-                       case ISDN_STAT_BHUP:
+                               if (USG_VOICE(dev->usage[i]))
+                                       isdn_tty_modem_result(RESULT_VCON, info);
+                               return 1;
+                       }
+                       break;
+               case ISDN_STAT_BHUP:
  #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_BHUP ttyI%d\n", info->line);
+                       printk(KERN_DEBUG "tty_STAT_BHUP ttyI%d\n", info->line);
  #endif
-                               if (TTY_IS_ACTIVE(info)) {
+                       if (TTY_IS_ACTIVE(info)) {
  #ifdef ISDN_DEBUG_MODEM_HUP
-                                       printk(KERN_DEBUG "Mhup in ISDN_STAT_BHUP\n");
+                               printk(KERN_DEBUG "Mhup in ISDN_STAT_BHUP\n");
  #endif
-                                       isdn_tty_modem_hup(info, 0);
-                                       return 1;
-                               }
-                               break;
-                       case ISDN_STAT_NODCH:
+                               isdn_tty_modem_hup(info, 0);
+                               return 1;
+                       }
+                       break;
+               case ISDN_STAT_NODCH:
  #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_NODCH ttyI%d\n", info->line);
- #endif
-                               if (TTY_IS_ACTIVE(info)) {
-                                       if (info->dialing) {
-                                               info->dialing = 0;
-                                               info->last_l2 = -1;
-                                               info->last_si = 0;
-                                               sprintf(info->last_cause, "0000");
-                                               isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
-                                       }
-                                       isdn_tty_modem_hup(info, 0);
-                                       return 1;
+                       printk(KERN_DEBUG "tty_STAT_NODCH ttyI%d\n", info->line);
+ #endif
+                       if (TTY_IS_ACTIVE(info)) {
+                               if (info->dialing) {
+                                       info->dialing = 0;
+                                       info->last_l2 = -1;
+                                       info->last_si = 0;
+                                       sprintf(info->last_cause, "0000");
+                                       isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
                                }
-                               break;
-                       case ISDN_STAT_UNLOAD:
+                               isdn_tty_modem_hup(info, 0);
+                               return 1;
+                       }
+                       break;
+               case ISDN_STAT_UNLOAD:
  #ifdef ISDN_TTY_STAT_DEBUG
-                               printk(KERN_DEBUG "tty_STAT_UNLOAD ttyI%d\n", info->line);
+                       printk(KERN_DEBUG "tty_STAT_UNLOAD ttyI%d\n", info->line);
  #endif
-                               for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-                                       info = &dev->mdm.info[i];
-                                       if (info->isdn_driver == c->driver) {
-                                               if (info->online)
-                                                       isdn_tty_modem_hup(info, 1);
-                                       }
+                       for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
+                               info = &dev->mdm.info[i];
+                               if (info->isdn_driver == c->driver) {
+                                       if (info->online)
+                                               isdn_tty_modem_hup(info, 1);
                                }
-                               return 1;
+                       }
+                       return 1;
  #ifdef CONFIG_ISDN_TTY_FAX
-                       case ISDN_STAT_FAXIND:
-                               if (TTY_IS_ACTIVE(info)) {
-                                       isdn_tty_fax_command(info, c); 
-                               }
-                               break;
+               case ISDN_STAT_FAXIND:
+                       if (TTY_IS_ACTIVE(info)) {
+                               isdn_tty_fax_command(info, c);
+                       }
+                       break;
  #endif
  #ifdef CONFIG_ISDN_AUDIO
-                       case ISDN_STAT_AUDIO:
-                               if (TTY_IS_ACTIVE(info)) {
-                                       switch(c->parm.num[0]) {
-                                               case ISDN_AUDIO_DTMF:
-                                                       if (info->vonline) {
-                                                               isdn_audio_put_dle_code(info,
+               case ISDN_STAT_AUDIO:
+                       if (TTY_IS_ACTIVE(info)) {
+                               switch (c->parm.num[0]) {
+                               case ISDN_AUDIO_DTMF:
+                                       if (info->vonline) {
+                                               isdn_audio_put_dle_code(info,
                                                                        c->parm.num[1]);
-                                                       }
-                                                       break;
                                        }
+                                       break;
                                }
-                               break;
+                       }
+                       break;
  #endif
                }
        }
  
  /*********************************************************************
   Modem-Emulator-Routines
-  *********************************************************************/
+ *********************************************************************/
  
- #define cmdchar(c) ((c>=' ')&&(c<=0x7f))
+ #define cmdchar(c) ((c >= ' ') && (c <= 0x7f))
  
  /*
   * Put a message from the AT-emulator into receive-buffer of tty,
   * convert CR, LF, and BS to values in modem-registers 3, 4 and 5.
   */
  void
- isdn_tty_at_cout(char *msg, modem_info * info)
+ isdn_tty_at_cout(char *msg, modem_info *info)
  {
        struct tty_struct *tty;
        atemu *m = &info->emu;
        /* use queue instead of direct, if online and */
        /* data is in queue or buffer is full */
        if (info->online && ((tty_buffer_request_room(tty, l) < l) ||
-           !skb_queue_empty(&dev->drv[info->isdn_driver]->rpqueue[info->isdn_channel]))) {
+                            !skb_queue_empty(&dev->drv[info->isdn_driver]->rpqueue[info->isdn_channel]))) {
                skb = alloc_skb(l, GFP_ATOMIC);
                if (!skb) {
                        spin_unlock_irqrestore(&info->readlock, flags);
  
        for (p = msg; *p; p++) {
                switch (*p) {
-                       case '\r':
-                               c = m->mdmreg[REG_CR];
-                               break;
-                       case '\n':
-                               c = m->mdmreg[REG_LF];
-                               break;
-                       case '\b':
-                               c = m->mdmreg[REG_BS];
-                               break;
-                       default:
-                               c = *p;
+               case '\r':
+                       c = m->mdmreg[REG_CR];
+                       break;
+               case '\n':
+                       c = m->mdmreg[REG_LF];
+                       break;
+               case '\b':
+                       c = m->mdmreg[REG_BS];
+                       break;
+               default:
+                       c = *p;
                }
                if (skb) {
                        *sp++ = c;
                } else {
-                       if(tty_insert_flip_char(tty, c, TTY_NORMAL) == 0)
+                       if (tty_insert_flip_char(tty, c, TTY_NORMAL) == 0)
                                break;
                }
        }
   * Perform ATH Hangup
   */
  static void
- isdn_tty_on_hook(modem_info * info)
+ isdn_tty_on_hook(modem_info *info)
  {
        if (info->isdn_channel >= 0) {
  #ifdef ISDN_DEBUG_MODEM_HUP
@@@ -2416,8 -2419,8 +2416,8 @@@ isdn_tty_off_hook(void
        printk(KERN_DEBUG "isdn_tty_off_hook\n");
  }
  
- #define PLUSWAIT1 (HZ/2)        /* 0.5 sec. */
- #define PLUSWAIT2 (HZ*3/2)      /* 1.5 sec */
+ #define PLUSWAIT1 (HZ / 2)      /* 0.5 sec. */
+ #define PLUSWAIT2 (HZ * 3 / 2)  /* 1.5 sec */
  
  /*
   * Check Buffer for Modem-escape-sequence, activate timer-callback to
   *   lastplus   timestamp of last character
   */
  static void
- isdn_tty_check_esc(const u_char * p, u_char plus, int count, int *pluscount,
+ isdn_tty_check_esc(const u_char *p, u_char plus, int count, int *pluscount,
                   u_long *lastplus)
  {
        if (plus > 127)
   */
  
  static void
- isdn_tty_modem_result(int code, modem_info * info)
+ isdn_tty_modem_result(int code, modem_info *info)
  {
        atemu *m = &info->emu;
        static char *msg[] =
-       {"OK", "CONNECT", "RING", "NO CARRIER", "ERROR",
-        "CONNECT 64000", "NO DIALTONE", "BUSY", "NO ANSWER",
-        "RINGING", "NO MSN/EAZ", "VCON", "RUNG"};
-       char s[ISDN_MSNLEN+10];
+               {"OK", "CONNECT", "RING", "NO CARRIER", "ERROR",
+                "CONNECT 64000", "NO DIALTONE", "BUSY", "NO ANSWER",
+                "RINGING", "NO MSN/EAZ", "VCON", "RUNG"};
+       char s[ISDN_MSNLEN + 10];
  
        switch (code) {
-               case RESULT_RING:
-                       m->mdmreg[REG_RINGCNT]++;
-                       if (m->mdmreg[REG_RINGCNT] == m->mdmreg[REG_RINGATA])
-                               /* Automatically accept incoming call */
-                               isdn_tty_cmd_ATA(info);
-                       break;
-               case RESULT_NO_CARRIER:
+       case RESULT_RING:
+               m->mdmreg[REG_RINGCNT]++;
+               if (m->mdmreg[REG_RINGCNT] == m->mdmreg[REG_RINGATA])
+                       /* Automatically accept incoming call */
+                       isdn_tty_cmd_ATA(info);
+               break;
+       case RESULT_NO_CARRIER:
  #ifdef ISDN_DEBUG_MODEM_HUP
-                       printk(KERN_DEBUG "modem_result: NO CARRIER %d %d\n",
-                              (info->flags & ISDN_ASYNC_CLOSING),
-                              (!info->tty));
- #endif
-                       m->mdmreg[REG_RINGCNT] = 0;
-                       del_timer(&info->nc_timer);
-                       info->ncarrier = 0;
-                       if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
-                               return;
-                       }
+               printk(KERN_DEBUG "modem_result: NO CARRIER %d %d\n",
+                      (info->flags & ISDN_ASYNC_CLOSING),
+                      (!info->tty));
+ #endif
+               m->mdmreg[REG_RINGCNT] = 0;
+               del_timer(&info->nc_timer);
+               info->ncarrier = 0;
+               if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
+                       return;
+               }
  #ifdef CONFIG_ISDN_AUDIO
-                       if (info->vonline & 1) {
+               if (info->vonline & 1) {
  #ifdef ISDN_DEBUG_MODEM_VOICE
-                               printk(KERN_DEBUG "res3: send DLE-ETX on ttyI%d\n",
-                                      info->line);
+                       printk(KERN_DEBUG "res3: send DLE-ETX on ttyI%d\n",
+                              info->line);
  #endif
-                               /* voice-recording, add DLE-ETX */
-                               isdn_tty_at_cout("\020\003", info);
-                       }
-                       if (info->vonline & 2) {
+                       /* voice-recording, add DLE-ETX */
+                       isdn_tty_at_cout("\020\003", info);
+               }
+               if (info->vonline & 2) {
  #ifdef ISDN_DEBUG_MODEM_VOICE
-                               printk(KERN_DEBUG "res3: send DLE-DC4 on ttyI%d\n",
-                                      info->line);
+                       printk(KERN_DEBUG "res3: send DLE-DC4 on ttyI%d\n",
+                              info->line);
  #endif
-                               /* voice-playing, add DLE-DC4 */
-                               isdn_tty_at_cout("\020\024", info);
-                       }
+                       /* voice-playing, add DLE-DC4 */
+                       isdn_tty_at_cout("\020\024", info);
+               }
  #endif
-                       break;
-               case RESULT_CONNECT:
-               case RESULT_CONNECT64000:
-                       sprintf(info->last_cause, "0000");
-                       if (!info->online)
-                               info->online = 2;
-                       break;
-               case RESULT_VCON:
+               break;
+       case RESULT_CONNECT:
+       case RESULT_CONNECT64000:
+               sprintf(info->last_cause, "0000");
+               if (!info->online)
+                       info->online = 2;
+               break;
+       case RESULT_VCON:
  #ifdef ISDN_DEBUG_MODEM_VOICE
-                       printk(KERN_DEBUG "res3: send VCON on ttyI%d\n",
-                              info->line);
+               printk(KERN_DEBUG "res3: send VCON on ttyI%d\n",
+                      info->line);
  #endif
-                       sprintf(info->last_cause, "0000");
-                       if (!info->online)
-                               info->online = 1;
-                       break;
-       } /* switch(code) */
+               sprintf(info->last_cause, "0000");
+               if (!info->online)
+                       info->online = 1;
+               break;
+       } /* switch (code) */
  
        if (m->mdmreg[REG_RESP] & BIT_RESP) {
                /* Show results */
                        isdn_tty_at_cout(s, info);
                } else {
                        if (code == RESULT_RING) {
-                           /* return if "show RUNG" and ringcounter>1 */
-                           if ((m->mdmreg[REG_RUNG] & BIT_RUNG) &&
+                               /* return if "show RUNG" and ringcounter>1 */
+                               if ((m->mdmreg[REG_RUNG] & BIT_RUNG) &&
                                    (m->mdmreg[REG_RINGCNT] > 1))
-                                               return;
-                           /* print CID, _before_ _every_ ring */
-                           if (!(m->mdmreg[REG_CIDONCE] & BIT_CIDONCE)) {
-                                   isdn_tty_at_cout("\r\nCALLER NUMBER: ", info);
-                                   isdn_tty_at_cout(dev->num[info->drv_index], info);
-                                   if (m->mdmreg[REG_CDN] & BIT_CDN) {
-                                           isdn_tty_at_cout("\r\nCALLED NUMBER: ", info);
-                                           isdn_tty_at_cout(info->emu.cpn, info);
-                                   }
-                           }
+                                       return;
+                               /* print CID, _before_ _every_ ring */
+                               if (!(m->mdmreg[REG_CIDONCE] & BIT_CIDONCE)) {
+                                       isdn_tty_at_cout("\r\nCALLER NUMBER: ", info);
+                                       isdn_tty_at_cout(dev->num[info->drv_index], info);
+                                       if (m->mdmreg[REG_CDN] & BIT_CDN) {
+                                               isdn_tty_at_cout("\r\nCALLED NUMBER: ", info);
+                                               isdn_tty_at_cout(info->emu.cpn, info);
+                                       }
+                               }
                        }
                        isdn_tty_at_cout("\r\n", info);
                        isdn_tty_at_cout(msg[code], info);
                        switch (code) {
-                               case RESULT_CONNECT:
-                                       switch (m->mdmreg[REG_L2PROT]) {
-                                               case ISDN_PROTO_L2_MODEM:
-                                                       isdn_tty_at_cout(" ", info);
-                                                       isdn_tty_at_cout(m->connmsg, info);
-                                                       break;
-                                       }
+                       case RESULT_CONNECT:
+                               switch (m->mdmreg[REG_L2PROT]) {
+                               case ISDN_PROTO_L2_MODEM:
+                                       isdn_tty_at_cout(" ", info);
+                                       isdn_tty_at_cout(m->connmsg, info);
                                        break;
-                               case RESULT_RING:
-                                       /* Append CPN, if enabled */
-                                       if ((m->mdmreg[REG_CPN] & BIT_CPN)) {
-                                               sprintf(s, "/%s", m->cpn);
-                                               isdn_tty_at_cout(s, info);
-                                       }
-                                       /* Print CID only once, _after_ 1st RING */
-                                       if ((m->mdmreg[REG_CIDONCE] & BIT_CIDONCE) &&
-                                           (m->mdmreg[REG_RINGCNT] == 1)) {
-                                               isdn_tty_at_cout("\r\n", info);
-                                               isdn_tty_at_cout("CALLER NUMBER: ", info);
-                                               isdn_tty_at_cout(dev->num[info->drv_index], info);
-                                               if (m->mdmreg[REG_CDN] & BIT_CDN) {
-                                                       isdn_tty_at_cout("\r\nCALLED NUMBER: ", info);
-                                                       isdn_tty_at_cout(info->emu.cpn, info);
-                                               }
+                               }
+                               break;
+                       case RESULT_RING:
+                               /* Append CPN, if enabled */
+                               if ((m->mdmreg[REG_CPN] & BIT_CPN)) {
+                                       sprintf(s, "/%s", m->cpn);
+                                       isdn_tty_at_cout(s, info);
+                               }
+                               /* Print CID only once, _after_ 1st RING */
+                               if ((m->mdmreg[REG_CIDONCE] & BIT_CIDONCE) &&
+                                   (m->mdmreg[REG_RINGCNT] == 1)) {
+                                       isdn_tty_at_cout("\r\n", info);
+                                       isdn_tty_at_cout("CALLER NUMBER: ", info);
+                                       isdn_tty_at_cout(dev->num[info->drv_index], info);
+                                       if (m->mdmreg[REG_CDN] & BIT_CDN) {
+                                               isdn_tty_at_cout("\r\nCALLED NUMBER: ", info);
+                                               isdn_tty_at_cout(info->emu.cpn, info);
                                        }
+                               }
+                               break;
+                       case RESULT_NO_CARRIER:
+                       case RESULT_NO_DIALTONE:
+                       case RESULT_BUSY:
+                       case RESULT_NO_ANSWER:
+                               m->mdmreg[REG_RINGCNT] = 0;
+                               /* Append Cause-Message if enabled */
+                               if (m->mdmreg[REG_RESPXT] & BIT_RESPXT) {
+                                       sprintf(s, "/%s", info->last_cause);
+                                       isdn_tty_at_cout(s, info);
+                               }
+                               break;
+                       case RESULT_CONNECT64000:
+                               /* Append Protocol to CONNECT message */
+                               switch (m->mdmreg[REG_L2PROT]) {
+                               case ISDN_PROTO_L2_X75I:
+                               case ISDN_PROTO_L2_X75UI:
+                               case ISDN_PROTO_L2_X75BUI:
+                                       isdn_tty_at_cout("/X.75", info);
                                        break;
-                               case RESULT_NO_CARRIER:
-                               case RESULT_NO_DIALTONE:
-                               case RESULT_BUSY:
-                               case RESULT_NO_ANSWER:
-                                       m->mdmreg[REG_RINGCNT] = 0;
-                                       /* Append Cause-Message if enabled */
-                                       if (m->mdmreg[REG_RESPXT] & BIT_RESPXT) {
-                                               sprintf(s, "/%s", info->last_cause);
-                                               isdn_tty_at_cout(s, info);
-                                       }
+                               case ISDN_PROTO_L2_HDLC:
+                                       isdn_tty_at_cout("/HDLC", info);
                                        break;
-                               case RESULT_CONNECT64000:
-                                       /* Append Protocol to CONNECT message */
-                                       switch (m->mdmreg[REG_L2PROT]) {
-                                               case ISDN_PROTO_L2_X75I:
-                                               case ISDN_PROTO_L2_X75UI:
-                                               case ISDN_PROTO_L2_X75BUI:
-                                                       isdn_tty_at_cout("/X.75", info);
-                                                       break;
-                                               case ISDN_PROTO_L2_HDLC:
-                                                       isdn_tty_at_cout("/HDLC", info);
-                                                       break;
-                                               case ISDN_PROTO_L2_V11096:
-                                                       isdn_tty_at_cout("/V110/9600", info);
-                                                       break;
-                                               case ISDN_PROTO_L2_V11019:
-                                                       isdn_tty_at_cout("/V110/19200", info);
-                                                       break;
-                                               case ISDN_PROTO_L2_V11038:
-                                                       isdn_tty_at_cout("/V110/38400", info);
-                                                       break;
-                                       }
-                                       if (m->mdmreg[REG_T70] & BIT_T70) {
-                                               isdn_tty_at_cout("/T.70", info);
-                                               if (m->mdmreg[REG_T70] & BIT_T70_EXT)
-                                                       isdn_tty_at_cout("+", info);
-                                       }
+                               case ISDN_PROTO_L2_V11096:
+                                       isdn_tty_at_cout("/V110/9600", info);
+                                       break;
+                               case ISDN_PROTO_L2_V11019:
+                                       isdn_tty_at_cout("/V110/19200", info);
+                                       break;
+                               case ISDN_PROTO_L2_V11038:
+                                       isdn_tty_at_cout("/V110/38400", info);
                                        break;
+                               }
+                               if (m->mdmreg[REG_T70] & BIT_T70) {
+                                       isdn_tty_at_cout("/T.70", info);
+                                       if (m->mdmreg[REG_T70] & BIT_T70_EXT)
+                                               isdn_tty_at_cout("+", info);
+                               }
+                               break;
                        }
                        isdn_tty_at_cout("\r\n", info);
                }
   * Display a modem-register-value.
   */
  static void
- isdn_tty_show_profile(int ridx, modem_info * info)
+ isdn_tty_show_profile(int ridx, modem_info *info)
  {
        char v[6];
  
@@@ -2664,7 -2667,7 +2664,7 @@@ isdn_tty_get_msnstr(char *n, char **p
        while (((*p[0] >= '0' && *p[0] <= '9') ||
                /* Why a comma ??? */
                (*p[0] == ',') || (*p[0] == ':')) &&
-               (limit--))
+              (limit--))
                *n++ = *p[0]++;
        *n = '\0';
  }
   * Get phone-number from modem-commandbuffer
   */
  static void
- isdn_tty_getdial(char *p, char *q,int cnt)
+ isdn_tty_getdial(char *p, char *q, int cnt)
  {
        int first = 1;
        int limit = ISDN_MSNLEN - 1;    /* MUST match the size of interface var to avoid
-                                       buffer overflow */
+                                          buffer overflow */
  
-       while (strchr(" 0123456789,#.*WPTSR-", *p) && *p && --cnt>0) {
+       while (strchr(" 0123456789,#.*WPTSR-", *p) && *p && --cnt > 0) {
                if ((*p >= '0' && *p <= '9') || ((*p == 'S') && first) ||
                    ((*p == 'R') && first) ||
                    (*p == '*') || (*p == '#')) {
                        *q++ = *p;
                        limit--;
                }
-               if(!limit)
+               if (!limit)
                        break;
                p++;
                first = 0;
  #define PARSE_ERROR1 { isdn_tty_modem_result(RESULT_ERROR, info); return 1; }
  
  static void
- isdn_tty_report(modem_info * info)
+ isdn_tty_report(modem_info *info)
  {
        atemu *m = &info->emu;
        char s[80];
        isdn_tty_at_cout(s, info);
        isdn_tty_at_cout("    Layer-2 Protocol: ", info);
        switch (info->last_l2) {
-               case ISDN_PROTO_L2_X75I:
-                       isdn_tty_at_cout("X.75i", info);
-                       break;
-               case ISDN_PROTO_L2_X75UI:
-                       isdn_tty_at_cout("X.75ui", info);
-                       break;
-               case ISDN_PROTO_L2_X75BUI:
-                       isdn_tty_at_cout("X.75bui", info);
-                       break;
-               case ISDN_PROTO_L2_HDLC:
-                       isdn_tty_at_cout("HDLC", info);
-                       break;
-               case ISDN_PROTO_L2_V11096:
-                       isdn_tty_at_cout("V.110 9600 Baud", info);
-                       break;
-               case ISDN_PROTO_L2_V11019:
-                       isdn_tty_at_cout("V.110 19200 Baud", info);
-                       break;
-               case ISDN_PROTO_L2_V11038:
-                       isdn_tty_at_cout("V.110 38400 Baud", info);
-                       break;
-               case ISDN_PROTO_L2_TRANS:
-                       isdn_tty_at_cout("transparent", info);
-                       break;
-               case ISDN_PROTO_L2_MODEM:
-                       isdn_tty_at_cout("modem", info);
-                       break;
-               case ISDN_PROTO_L2_FAX:
-                       isdn_tty_at_cout("fax", info);
-                       break;
-               default:
-                       isdn_tty_at_cout("unknown", info);
-                       break;
+       case ISDN_PROTO_L2_X75I:
+               isdn_tty_at_cout("X.75i", info);
+               break;
+       case ISDN_PROTO_L2_X75UI:
+               isdn_tty_at_cout("X.75ui", info);
+               break;
+       case ISDN_PROTO_L2_X75BUI:
+               isdn_tty_at_cout("X.75bui", info);
+               break;
+       case ISDN_PROTO_L2_HDLC:
+               isdn_tty_at_cout("HDLC", info);
+               break;
+       case ISDN_PROTO_L2_V11096:
+               isdn_tty_at_cout("V.110 9600 Baud", info);
+               break;
+       case ISDN_PROTO_L2_V11019:
+               isdn_tty_at_cout("V.110 19200 Baud", info);
+               break;
+       case ISDN_PROTO_L2_V11038:
+               isdn_tty_at_cout("V.110 38400 Baud", info);
+               break;
+       case ISDN_PROTO_L2_TRANS:
+               isdn_tty_at_cout("transparent", info);
+               break;
+       case ISDN_PROTO_L2_MODEM:
+               isdn_tty_at_cout("modem", info);
+               break;
+       case ISDN_PROTO_L2_FAX:
+               isdn_tty_at_cout("fax", info);
+               break;
+       default:
+               isdn_tty_at_cout("unknown", info);
+               break;
        }
        if (m->mdmreg[REG_T70] & BIT_T70) {
                isdn_tty_at_cout("/T.70", info);
        isdn_tty_at_cout("\r\n", info);
        isdn_tty_at_cout("    Service:          ", info);
        switch (info->last_si) {
-               case 1:
-                       isdn_tty_at_cout("audio\r\n", info);
-                       break;
-               case 5:
-                       isdn_tty_at_cout("btx\r\n", info);
-                       break;
-               case 7:
-                       isdn_tty_at_cout("data\r\n", info);
-                       break;
-               default:
-                       sprintf(s, "%d\r\n", info->last_si);
-                       isdn_tty_at_cout(s, info);
-                       break;
+       case 1:
+               isdn_tty_at_cout("audio\r\n", info);
+               break;
+       case 5:
+               isdn_tty_at_cout("btx\r\n", info);
+               break;
+       case 7:
+               isdn_tty_at_cout("data\r\n", info);
+               break;
+       default:
+               sprintf(s, "%d\r\n", info->last_si);
+               isdn_tty_at_cout(s, info);
+               break;
        }
        sprintf(s, "    Hangup location:  %s\r\n", info->last_lhup ? "local" : "remote");
        isdn_tty_at_cout(s, info);
   * Parse AT&.. commands.
   */
  static int
- isdn_tty_cmd_ATand(char **p, modem_info * info)
+ isdn_tty_cmd_ATand(char **p, modem_info *info)
  {
        atemu *m = &info->emu;
        int i;
  #define MAXRB (sizeof(rb) - 1)
  
        switch (*p[0]) {
-               case 'B':
-                       /* &B - Set Buffersize */
-                       p[0]++;
-                       i = isdn_getnum(p);
-                       if ((i < 0) || (i > ISDN_SERIAL_XMIT_MAX))
-                               PARSE_ERROR1;
+       case 'B':
+               /* &B - Set Buffersize */
+               p[0]++;
+               i = isdn_getnum(p);
+               if ((i < 0) || (i > ISDN_SERIAL_XMIT_MAX))
+                       PARSE_ERROR1;
  #ifdef CONFIG_ISDN_AUDIO
-                       if ((m->mdmreg[REG_SI1] & 1) && (i > VBUF))
-                               PARSE_ERROR1;
+               if ((m->mdmreg[REG_SI1] & 1) && (i > VBUF))
+                       PARSE_ERROR1;
  #endif
-                       m->mdmreg[REG_PSIZE] = i / 16;
-                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16;
-                       switch (m->mdmreg[REG_L2PROT]) {
-                               case ISDN_PROTO_L2_V11096:
-                               case ISDN_PROTO_L2_V11019:
-                               case ISDN_PROTO_L2_V11038:
-                                       info->xmit_size /= 10;          
-                       }
+               m->mdmreg[REG_PSIZE] = i / 16;
+               info->xmit_size = m->mdmreg[REG_PSIZE] * 16;
+               switch (m->mdmreg[REG_L2PROT]) {
+               case ISDN_PROTO_L2_V11096:
+               case ISDN_PROTO_L2_V11019:
+               case ISDN_PROTO_L2_V11038:
+                       info->xmit_size /= 10;
+               }
+               break;
+       case 'C':
+               /* &C - DCD Status */
+               p[0]++;
+               switch (isdn_getnum(p)) {
+               case 0:
+                       m->mdmreg[REG_DCD] &= ~BIT_DCD;
                        break;
-               case 'C':
-                       /* &C - DCD Status */
-                       p[0]++;
-                       switch (isdn_getnum(p)) {
-                               case 0:
-                                       m->mdmreg[REG_DCD] &= ~BIT_DCD;
-                                       break;
-                               case 1:
-                                       m->mdmreg[REG_DCD] |= BIT_DCD;
-                                       break;
-                               default:
-                                       PARSE_ERROR1
-                       }
+               case 1:
+                       m->mdmreg[REG_DCD] |= BIT_DCD;
                        break;
-               case 'D':
-                       /* &D - Set DTR-Low-behavior */
-                       p[0]++;
-                       switch (isdn_getnum(p)) {
-                               case 0:
-                                       m->mdmreg[REG_DTRHUP] &= ~BIT_DTRHUP;
-                                       m->mdmreg[REG_DTRR] &= ~BIT_DTRR;
-                                       break;
-                               case 2:
-                                       m->mdmreg[REG_DTRHUP] |= BIT_DTRHUP;
-                                       m->mdmreg[REG_DTRR] &= ~BIT_DTRR;
-                                       break;
-                               case 3:
-                                       m->mdmreg[REG_DTRHUP] |= BIT_DTRHUP;
-                                       m->mdmreg[REG_DTRR] |= BIT_DTRR;
-                                       break;
-                               default:
-                                       PARSE_ERROR1
-                       }
+               default:
+                       PARSE_ERROR1
+                               }
+               break;
+       case 'D':
+               /* &D - Set DTR-Low-behavior */
+               p[0]++;
+               switch (isdn_getnum(p)) {
+               case 0:
+                       m->mdmreg[REG_DTRHUP] &= ~BIT_DTRHUP;
+                       m->mdmreg[REG_DTRR] &= ~BIT_DTRR;
                        break;
-               case 'E':
-                       /* &E -Set EAZ/MSN */
-                       p[0]++;
-                       isdn_tty_get_msnstr(m->msn, p);
+               case 2:
+                       m->mdmreg[REG_DTRHUP] |= BIT_DTRHUP;
+                       m->mdmreg[REG_DTRR] &= ~BIT_DTRR;
                        break;
-               case 'F':
-                       /* &F -Set Factory-Defaults */
-                       p[0]++;
-                       if (info->msr & UART_MSR_DCD)
-                               PARSE_ERROR1;
-                       isdn_tty_reset_profile(m);
-                       isdn_tty_modem_reset_regs(info, 1);
+               case 3:
+                       m->mdmreg[REG_DTRHUP] |= BIT_DTRHUP;
+                       m->mdmreg[REG_DTRR] |= BIT_DTRR;
                        break;
+               default:
+                       PARSE_ERROR1
+                               }
+               break;
+       case 'E':
+               /* &E -Set EAZ/MSN */
+               p[0]++;
+               isdn_tty_get_msnstr(m->msn, p);
+               break;
+       case 'F':
+               /* &F -Set Factory-Defaults */
+               p[0]++;
+               if (info->msr & UART_MSR_DCD)
+                       PARSE_ERROR1;
+               isdn_tty_reset_profile(m);
+               isdn_tty_modem_reset_regs(info, 1);
+               break;
  #ifdef DUMMY_HAYES_AT
-               case 'K':
-                       /* only for be compilant with common scripts */
-                       /* &K Flowcontrol - no function */
-                       p[0]++;
-                       isdn_getnum(p);
+       case 'K':
+               /* only for be compilant with common scripts */
+               /* &K Flowcontrol - no function */
+               p[0]++;
+               isdn_getnum(p);
+               break;
+ #endif
+       case 'L':
+               /* &L -Set Numbers to listen on */
+               p[0]++;
+               i = 0;
+               while (*p[0] && (strchr("0123456789,-*[]?;", *p[0])) &&
+                      (i < ISDN_LMSNLEN - 1))
+                       m->lmsn[i++] = *p[0]++;
+               m->lmsn[i] = '\0';
+               break;
+       case 'R':
+               /* &R - Set V.110 bitrate adaption */
+               p[0]++;
+               i = isdn_getnum(p);
+               switch (i) {
+               case 0:
+                       /* Switch off V.110, back to X.75 */
+                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
+                       m->mdmreg[REG_SI2] = 0;
+                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16;
                        break;
- #endif
-               case 'L':
-                       /* &L -Set Numbers to listen on */
-                       p[0]++;
-                       i = 0;
-                       while (*p[0] && (strchr("0123456789,-*[]?;", *p[0])) &&
-                              (i < ISDN_LMSNLEN - 1))
-                               m->lmsn[i++] = *p[0]++;
-                       m->lmsn[i] = '\0';
-                       break;
-               case 'R':
-                       /* &R - Set V.110 bitrate adaption */
-                       p[0]++;
-                       i = isdn_getnum(p);
-                       switch (i) {
-                               case 0:
-                                       /* Switch off V.110, back to X.75 */
-                                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
-                                       m->mdmreg[REG_SI2] = 0;
-                                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16;
-                                       break;
-                               case 9600:
-                                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_V11096;
-                                       m->mdmreg[REG_SI2] = 197;
-                                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16 / 10;
-                                       break;
-                               case 19200:
-                                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_V11019;
-                                       m->mdmreg[REG_SI2] = 199;
-                                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16 / 10;
-                                       break;
-                               case 38400:
-                                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_V11038;
-                                       m->mdmreg[REG_SI2] = 198; /* no existing standard for this */
-                                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16 / 10;
-                                       break;
-                               default:
-                                       PARSE_ERROR1;
-                       }
-                       /* Switch off T.70 */
-                       m->mdmreg[REG_T70] &= ~(BIT_T70 | BIT_T70_EXT);
-                       /* Set Service 7 */
-                       m->mdmreg[REG_SI1] |= 4;
+               case 9600:
+                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_V11096;
+                       m->mdmreg[REG_SI2] = 197;
+                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16 / 10;
                        break;
-               case 'S':
-                       /* &S - Set Windowsize */
-                       p[0]++;
-                       i = isdn_getnum(p);
-                       if ((i > 0) && (i < 9))
-                               m->mdmreg[REG_WSIZE] = i;
-                       else
-                               PARSE_ERROR1;
+               case 19200:
+                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_V11019;
+                       m->mdmreg[REG_SI2] = 199;
+                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16 / 10;
                        break;
-               case 'V':
-                       /* &V - Show registers */
-                       p[0]++;
-                       isdn_tty_at_cout("\r\n", info);
-                       for (i = 0; i < ISDN_MODEM_NUMREG; i++) {
-                               sprintf(rb, "S%02d=%03d%s", i,
-                                       m->mdmreg[i], ((i + 1) % 10) ? " " : "\r\n");
-                               isdn_tty_at_cout(rb, info);
-                       }
-                       sprintf(rb, "\r\nEAZ/MSN: %.50s\r\n",
-                               strlen(m->msn) ? m->msn : "None");
-                       isdn_tty_at_cout(rb, info);
-                       if (strlen(m->lmsn)) {
-                               isdn_tty_at_cout("\r\nListen: ", info);
-                               isdn_tty_at_cout(m->lmsn, info);
-                               isdn_tty_at_cout("\r\n", info);
-                       }
+               case 38400:
+                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_V11038;
+                       m->mdmreg[REG_SI2] = 198; /* no existing standard for this */
+                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16 / 10;
                        break;
-               case 'W':
-                       /* &W - Write Profile */
+               default:
+                       PARSE_ERROR1;
+               }
+               /* Switch off T.70 */
+               m->mdmreg[REG_T70] &= ~(BIT_T70 | BIT_T70_EXT);
+               /* Set Service 7 */
+               m->mdmreg[REG_SI1] |= 4;
+               break;
+       case 'S':
+               /* &S - Set Windowsize */
+               p[0]++;
+               i = isdn_getnum(p);
+               if ((i > 0) && (i < 9))
+                       m->mdmreg[REG_WSIZE] = i;
+               else
+                       PARSE_ERROR1;
+               break;
+       case 'V':
+               /* &V - Show registers */
+               p[0]++;
+               isdn_tty_at_cout("\r\n", info);
+               for (i = 0; i < ISDN_MODEM_NUMREG; i++) {
+                       sprintf(rb, "S%02d=%03d%s", i,
+                               m->mdmreg[i], ((i + 1) % 10) ? " " : "\r\n");
+                       isdn_tty_at_cout(rb, info);
+               }
+               sprintf(rb, "\r\nEAZ/MSN: %.50s\r\n",
+                       strlen(m->msn) ? m->msn : "None");
+               isdn_tty_at_cout(rb, info);
+               if (strlen(m->lmsn)) {
+                       isdn_tty_at_cout("\r\nListen: ", info);
+                       isdn_tty_at_cout(m->lmsn, info);
+                       isdn_tty_at_cout("\r\n", info);
+               }
+               break;
+       case 'W':
+               /* &W - Write Profile */
+               p[0]++;
+               switch (*p[0]) {
+               case '0':
                        p[0]++;
-                       switch (*p[0]) {
-                               case '0':
-                                       p[0]++;
-                                       modem_write_profile(m);
-                                       break;
-                               default:
-                                       PARSE_ERROR1;
-                       }
+                       modem_write_profile(m);
                        break;
-               case 'X':
-                       /* &X - Switch to BTX-Mode and T.70 */
-                       p[0]++;
-                       switch (isdn_getnum(p)) {
-                               case 0:
-                                       m->mdmreg[REG_T70] &= ~(BIT_T70 | BIT_T70_EXT);
-                                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16;
-                                       break;
-                               case 1:
-                                       m->mdmreg[REG_T70] |= BIT_T70;
-                                       m->mdmreg[REG_T70] &= ~BIT_T70_EXT;
-                                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
-                                       info->xmit_size = 112;
-                                       m->mdmreg[REG_SI1] = 4;
-                                       m->mdmreg[REG_SI2] = 0;
-                                       break;
-                               case 2:
-                                       m->mdmreg[REG_T70] |= (BIT_T70 | BIT_T70_EXT);
-                                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
-                                       info->xmit_size = 112;
-                                       m->mdmreg[REG_SI1] = 4;
-                                       m->mdmreg[REG_SI2] = 0;
-                                       break;
-                               default:
-                                       PARSE_ERROR1;
-                       }
+               default:
+                       PARSE_ERROR1;
+               }
+               break;
+       case 'X':
+               /* &X - Switch to BTX-Mode and T.70 */
+               p[0]++;
+               switch (isdn_getnum(p)) {
+               case 0:
+                       m->mdmreg[REG_T70] &= ~(BIT_T70 | BIT_T70_EXT);
+                       info->xmit_size = m->mdmreg[REG_PSIZE] * 16;
+                       break;
+               case 1:
+                       m->mdmreg[REG_T70] |= BIT_T70;
+                       m->mdmreg[REG_T70] &= ~BIT_T70_EXT;
+                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
+                       info->xmit_size = 112;
+                       m->mdmreg[REG_SI1] = 4;
+                       m->mdmreg[REG_SI2] = 0;
+                       break;
+               case 2:
+                       m->mdmreg[REG_T70] |= (BIT_T70 | BIT_T70_EXT);
+                       m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
+                       info->xmit_size = 112;
+                       m->mdmreg[REG_SI1] = 4;
+                       m->mdmreg[REG_SI2] = 0;
                        break;
                default:
                        PARSE_ERROR1;
+               }
+               break;
+       default:
+               PARSE_ERROR1;
        }
        return 0;
  }
  
  static int
- isdn_tty_check_ats(int mreg, int mval, modem_info * info, atemu * m)
+ isdn_tty_check_ats(int mreg, int mval, modem_info *info, atemu *m)
  {
        /* Some plausibility checks */
        switch (mreg) {
-               case REG_L2PROT:
-                       if (mval > ISDN_PROTO_L2_MAX)
-                               return 1;
-                       break;
-               case REG_PSIZE:
-                       if ((mval * 16) > ISDN_SERIAL_XMIT_MAX)
-                               return 1;
+       case REG_L2PROT:
+               if (mval > ISDN_PROTO_L2_MAX)
+                       return 1;
+               break;
+       case REG_PSIZE:
+               if ((mval * 16) > ISDN_SERIAL_XMIT_MAX)
+                       return 1;
  #ifdef CONFIG_ISDN_AUDIO
-                       if ((m->mdmreg[REG_SI1] & 1) && (mval > VBUFX))
-                               return 1;
- #endif
-                       info->xmit_size = mval * 16;
-                       switch (m->mdmreg[REG_L2PROT]) {
-                               case ISDN_PROTO_L2_V11096:
-                               case ISDN_PROTO_L2_V11019:
-                               case ISDN_PROTO_L2_V11038:
-                                       info->xmit_size /= 10;          
-                       }
-                       break;
-               case REG_SI1I:
-               case REG_PLAN:
-               case REG_SCREEN:
-                       /* readonly registers */
+               if ((m->mdmreg[REG_SI1] & 1) && (mval > VBUFX))
                        return 1;
+ #endif
+               info->xmit_size = mval * 16;
+               switch (m->mdmreg[REG_L2PROT]) {
+               case ISDN_PROTO_L2_V11096:
+               case ISDN_PROTO_L2_V11019:
+               case ISDN_PROTO_L2_V11038:
+                       info->xmit_size /= 10;
+               }
+               break;
+       case REG_SI1I:
+       case REG_PLAN:
+       case REG_SCREEN:
+               /* readonly registers */
+               return 1;
        }
        return 0;
  }
   * Perform ATS command
   */
  static int
- isdn_tty_cmd_ATS(char **p, modem_info * info)
+ isdn_tty_cmd_ATS(char **p, modem_info *info)
  {
        atemu *m = &info->emu;
        int bitpos;
        if (mreg < 0 || mreg >= ISDN_MODEM_NUMREG)
                PARSE_ERROR1;
        switch (*p[0]) {
+       case '=':
+               p[0]++;
+               mval = isdn_getnum(p);
+               if (mval < 0 || mval > 255)
+                       PARSE_ERROR1;
+               if (isdn_tty_check_ats(mreg, mval, info, m))
+                       PARSE_ERROR1;
+               m->mdmreg[mreg] = mval;
+               break;
+       case '.':
+               /* Set/Clear a single bit */
+               p[0]++;
+               bitpos = isdn_getnum(p);
+               if ((bitpos < 0) || (bitpos > 7))
+                       PARSE_ERROR1;
+               switch (*p[0]) {
                case '=':
                        p[0]++;
-                       mval = isdn_getnum(p);
-                       if (mval < 0 || mval > 255)
+                       bval = isdn_getnum(p);
+                       if (bval < 0 || bval > 1)
                                PARSE_ERROR1;
+                       if (bval)
+                               mval = m->mdmreg[mreg] | (1 << bitpos);
+                       else
+                               mval = m->mdmreg[mreg] & ~(1 << bitpos);
                        if (isdn_tty_check_ats(mreg, mval, info, m))
                                PARSE_ERROR1;
                        m->mdmreg[mreg] = mval;
                        break;
-               case '.':
-                       /* Set/Clear a single bit */
-                       p[0]++;
-                       bitpos = isdn_getnum(p);
-                       if ((bitpos < 0) || (bitpos > 7))
-                               PARSE_ERROR1;
-                       switch (*p[0]) {
-                               case '=':
-                                       p[0]++;
-                                       bval = isdn_getnum(p);
-                                       if (bval < 0 || bval > 1)
-                                               PARSE_ERROR1;
-                                       if (bval)
-                                               mval = m->mdmreg[mreg] | (1 << bitpos);
-                                       else
-                                               mval = m->mdmreg[mreg] & ~(1 << bitpos);
-                                       if (isdn_tty_check_ats(mreg, mval, info, m))
-                                               PARSE_ERROR1;
-                                       m->mdmreg[mreg] = mval;
-                                       break;
-                               case '?':
-                                       p[0]++;
-                                       isdn_tty_at_cout("\r\n", info);
-                                       isdn_tty_at_cout((m->mdmreg[mreg] & (1 << bitpos)) ? "1" : "0",
-                                                        info);
-                                       break;
-                               default:
-                                       PARSE_ERROR1;
-                       }
-                       break;
                case '?':
                        p[0]++;
-                       isdn_tty_show_profile(mreg, info);
+                       isdn_tty_at_cout("\r\n", info);
+                       isdn_tty_at_cout((m->mdmreg[mreg] & (1 << bitpos)) ? "1" : "0",
+                                        info);
                        break;
                default:
                        PARSE_ERROR1;
-                       break;
+               }
+               break;
+       case '?':
+               p[0]++;
+               isdn_tty_show_profile(mreg, info);
+               break;
+       default:
+               PARSE_ERROR1;
+               break;
        }
        return 0;
  }
   * Perform ATA command
   */
  static void
- isdn_tty_cmd_ATA(modem_info * info)
+ isdn_tty_cmd_ATA(modem_info *info)
  {
        atemu *m = &info->emu;
        isdn_ctrl cmd;
   * Parse AT+F.. commands
   */
  static int
- isdn_tty_cmd_PLUSF(char **p, modem_info * info)
+ isdn_tty_cmd_PLUSF(char **p, modem_info *info)
  {
        atemu *m = &info->emu;
        char rs[20];
        if (!strncmp(p[0], "CLASS", 5)) {
                p[0] += 5;
                switch (*p[0]) {
-                       case '?':
-                               p[0]++;
-                               sprintf(rs, "\r\n%d",
-                                       (m->mdmreg[REG_SI1] & 1) ? 8 : 0);
+               case '?':
+                       p[0]++;
+                       sprintf(rs, "\r\n%d",
+                               (m->mdmreg[REG_SI1] & 1) ? 8 : 0);
  #ifdef CONFIG_ISDN_TTY_FAX
-                               if (TTY_IS_FCLASS2(info))
-                                               sprintf(rs, "\r\n2");
-                               else if (TTY_IS_FCLASS1(info))
-                                               sprintf(rs, "\r\n1");
+                       if (TTY_IS_FCLASS2(info))
+                               sprintf(rs, "\r\n2");
+                       else if (TTY_IS_FCLASS1(info))
+                               sprintf(rs, "\r\n1");
  #endif
-                               isdn_tty_at_cout(rs, info);
-                               break;
-                       case '=':
+                       isdn_tty_at_cout(rs, info);
+                       break;
+               case '=':
+                       p[0]++;
+                       switch (*p[0]) {
+                       case '0':
                                p[0]++;
-                               switch (*p[0]) {
-                                       case '0':
-                                               p[0]++;
-                                               m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
-                                               m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_TRANS;
-                                               m->mdmreg[REG_SI1] = 4;
-                                               info->xmit_size =
-                                                   m->mdmreg[REG_PSIZE] * 16;
-                                               break;
+                               m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
+                               m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_TRANS;
+                               m->mdmreg[REG_SI1] = 4;
+                               info->xmit_size =
+                                       m->mdmreg[REG_PSIZE] * 16;
+                               break;
  #ifdef CONFIG_ISDN_TTY_FAX
-                                       case '1':
-                                               p[0]++;
-                                               if (!(dev->global_features &
-                                                       ISDN_FEATURE_L3_FCLASS1))
-                                                       PARSE_ERROR1;
-                                               m->mdmreg[REG_SI1] = 1;
-                                               m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_FAX;
-                                               m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_FCLASS1;
-                                               info->xmit_size =
-                                                   m->mdmreg[REG_PSIZE] * 16;
-                                               break;
-                                       case '2':
-                                               p[0]++;
-                                               if (!(dev->global_features &
-                                                       ISDN_FEATURE_L3_FCLASS2))
-                                                       PARSE_ERROR1;
-                                               m->mdmreg[REG_SI1] = 1;
-                                               m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_FAX;
-                                               m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_FCLASS2;
-                                               info->xmit_size =
-                                                   m->mdmreg[REG_PSIZE] * 16;
-                                               break;
+                       case '1':
+                               p[0]++;
+                               if (!(dev->global_features &
+                                     ISDN_FEATURE_L3_FCLASS1))
+                                       PARSE_ERROR1;
+                               m->mdmreg[REG_SI1] = 1;
+                               m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_FAX;
+                               m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_FCLASS1;
+                               info->xmit_size =
+                                       m->mdmreg[REG_PSIZE] * 16;
+                               break;
+                       case '2':
+                               p[0]++;
+                               if (!(dev->global_features &
+                                     ISDN_FEATURE_L3_FCLASS2))
+                                       PARSE_ERROR1;
+                               m->mdmreg[REG_SI1] = 1;
+                               m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_FAX;
+                               m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_FCLASS2;
+                               info->xmit_size =
+                                       m->mdmreg[REG_PSIZE] * 16;
+                               break;
  #endif
-                                       case '8':
-                                               p[0]++;
-                                               /* L2 will change on dialout with si=1 */
-                                               m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
-                                               m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_TRANS;
-                                               m->mdmreg[REG_SI1] = 5;
-                                               info->xmit_size = VBUF;
-                                               break;
-                                       case '?':
-                                               p[0]++;
-                                               strcpy(rs, "\r\n0,");
+                       case '8':
+                               p[0]++;
+                               /* L2 will change on dialout with si=1 */
+                               m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
+                               m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_TRANS;
+                               m->mdmreg[REG_SI1] = 5;
+                               info->xmit_size = VBUF;
+                               break;
+                       case '?':
+                               p[0]++;
+                               strcpy(rs, "\r\n0,");
  #ifdef CONFIG_ISDN_TTY_FAX
-                                               if (dev->global_features &
-                                                       ISDN_FEATURE_L3_FCLASS1)
-                                                       strcat(rs, "1,");
-                                               if (dev->global_features &
-                                                       ISDN_FEATURE_L3_FCLASS2)
-                                                       strcat(rs, "2,");
- #endif
-                                               strcat(rs, "8");
-                                               isdn_tty_at_cout(rs, info);
-                                               break;
-                                       default:
-                                               PARSE_ERROR1;
-                               }
+                               if (dev->global_features &
+                                   ISDN_FEATURE_L3_FCLASS1)
+                                       strcat(rs, "1,");
+                               if (dev->global_features &
+                                   ISDN_FEATURE_L3_FCLASS2)
+                                       strcat(rs, "2,");
+ #endif
+                               strcat(rs, "8");
+                               isdn_tty_at_cout(rs, info);
                                break;
                        default:
                                PARSE_ERROR1;
+                       }
+                       break;
+               default:
+                       PARSE_ERROR1;
                }
                return 0;
        }
   * Parse AT+V.. commands
   */
  static int
- isdn_tty_cmd_PLUSV(char **p, modem_info * info)
+ isdn_tty_cmd_PLUSV(char **p, modem_info *info)
  {
        atemu *m = &info->emu;
        isdn_ctrl cmd;
        static char *vcmd[] =
-       {"NH", "IP", "LS", "RX", "SD", "SM", "TX", "DD", NULL};
+               {"NH", "IP", "LS", "RX", "SD", "SM", "TX", "DD", NULL};
        int i;
        int par1;
        int par2;
                i++;
        }
        switch (i) {
-               case 0:
-                       /* AT+VNH - Auto hangup feature */
+       case 0:
+               /* AT+VNH - Auto hangup feature */
+               switch (*p[0]) {
+               case '?':
+                       p[0]++;
+                       isdn_tty_at_cout("\r\n1", info);
+                       break;
+               case '=':
+                       p[0]++;
                        switch (*p[0]) {
-                               case '?':
-                                       p[0]++;
-                                       isdn_tty_at_cout("\r\n1", info);
-                                       break;
-                               case '=':
-                                       p[0]++;
-                                       switch (*p[0]) {
-                                               case '1':
-                                                       p[0]++;
-                                                       break;
-                                               case '?':
-                                                       p[0]++;
-                                                       isdn_tty_at_cout("\r\n1", info);
-                                                       break;
-                                               default:
-                                                       PARSE_ERROR1;
-                                       }
-                                       break;
-                               default:
-                                       PARSE_ERROR1;
+                       case '1':
+                               p[0]++;
+                               break;
+                       case '?':
+                               p[0]++;
+                               isdn_tty_at_cout("\r\n1", info);
+                               break;
+                       default:
+                               PARSE_ERROR1;
                        }
                        break;
-               case 1:
-                       /* AT+VIP - Reset all voice parameters */
-                       isdn_tty_modem_reset_vpar(m);
+               default:
+                       PARSE_ERROR1;
+               }
+               break;
+       case 1:
+               /* AT+VIP - Reset all voice parameters */
+               isdn_tty_modem_reset_vpar(m);
+               break;
+       case 2:
+               /* AT+VLS - Select device, accept incoming call */
+               switch (*p[0]) {
+               case '?':
+                       p[0]++;
+                       sprintf(rs, "\r\n%d", m->vpar[0]);
+                       isdn_tty_at_cout(rs, info);
                        break;
-               case 2:
-                       /* AT+VLS - Select device, accept incoming call */
+               case '=':
+                       p[0]++;
                        switch (*p[0]) {
-                               case '?':
-                                       p[0]++;
-                                       sprintf(rs, "\r\n%d", m->vpar[0]);
-                                       isdn_tty_at_cout(rs, info);
-                                       break;
-                               case '=':
-                                       p[0]++;
-                                       switch (*p[0]) {
-                                               case '0':
-                                                       p[0]++;
-                                                       m->vpar[0] = 0;
-                                                       break;
-                                               case '2':
-                                                       p[0]++;
-                                                       m->vpar[0] = 2;
-                                                       break;
-                                               case '?':
-                                                       p[0]++;
-                                                       isdn_tty_at_cout("\r\n0,2", info);
-                                                       break;
-                                               default:
-                                                       PARSE_ERROR1;
-                                       }
-                                       break;
-                               default:
-                                       PARSE_ERROR1;
-                       }
-                       break;
-               case 3:
-                       /* AT+VRX - Start recording */
-                       if (!m->vpar[0])
-                               PARSE_ERROR1;
-                       if (info->online != 1) {
-                               isdn_tty_modem_result(RESULT_NO_ANSWER, info);
-                               return 1;
-                       }
-                       info->dtmf_state = isdn_audio_dtmf_init(info->dtmf_state);
-                       if (!info->dtmf_state) {
-                               printk(KERN_WARNING "isdn_tty: Couldn't malloc dtmf state\n");
+                       case '0':
+                               p[0]++;
+                               m->vpar[0] = 0;
+                               break;
+                       case '2':
+                               p[0]++;
+                               m->vpar[0] = 2;
+                               break;
+                       case '?':
+                               p[0]++;
+                               isdn_tty_at_cout("\r\n0,2", info);
+                               break;
+                       default:
                                PARSE_ERROR1;
                        }
-                       info->silence_state = isdn_audio_silence_init(info->silence_state);
-                       if (!info->silence_state) {
-                               printk(KERN_WARNING "isdn_tty: Couldn't malloc silence state\n");
+                       break;
+               default:
+                       PARSE_ERROR1;
+               }
+               break;
+       case 3:
+               /* AT+VRX - Start recording */
+               if (!m->vpar[0])
+                       PARSE_ERROR1;
+               if (info->online != 1) {
+                       isdn_tty_modem_result(RESULT_NO_ANSWER, info);
+                       return 1;
+               }
+               info->dtmf_state = isdn_audio_dtmf_init(info->dtmf_state);
+               if (!info->dtmf_state) {
+                       printk(KERN_WARNING "isdn_tty: Couldn't malloc dtmf state\n");
+                       PARSE_ERROR1;
+               }
+               info->silence_state = isdn_audio_silence_init(info->silence_state);
+               if (!info->silence_state) {
+                       printk(KERN_WARNING "isdn_tty: Couldn't malloc silence state\n");
+                       PARSE_ERROR1;
+               }
+               if (m->vpar[3] < 5) {
+                       info->adpcmr = isdn_audio_adpcm_init(info->adpcmr, m->vpar[3]);
+                       if (!info->adpcmr) {
+                               printk(KERN_WARNING "isdn_tty: Couldn't malloc adpcm state\n");
                                PARSE_ERROR1;
                        }
-                       if (m->vpar[3] < 5) {
-                               info->adpcmr = isdn_audio_adpcm_init(info->adpcmr, m->vpar[3]);
-                               if (!info->adpcmr) {
-                                       printk(KERN_WARNING "isdn_tty: Couldn't malloc adpcm state\n");
-                                       PARSE_ERROR1;
-                               }
-                       }
+               }
  #ifdef ISDN_DEBUG_AT
-                       printk(KERN_DEBUG "AT: +VRX\n");
+               printk(KERN_DEBUG "AT: +VRX\n");
  #endif
-                       info->vonline |= 1;
-                       isdn_tty_modem_result(RESULT_CONNECT, info);
-                       return 0;
+               info->vonline |= 1;
+               isdn_tty_modem_result(RESULT_CONNECT, info);
+               return 0;
+               break;
+       case 4:
+               /* AT+VSD - Silence detection */
+               switch (*p[0]) {
+               case '?':
+                       p[0]++;
+                       sprintf(rs, "\r\n<%d>,<%d>",
+                               m->vpar[1],
+                               m->vpar[2]);
+                       isdn_tty_at_cout(rs, info);
                        break;
-               case 4:
-                       /* AT+VSD - Silence detection */
-                       switch (*p[0]) {
-                               case '?':
-                                       p[0]++;
-                                       sprintf(rs, "\r\n<%d>,<%d>",
-                                               m->vpar[1],
-                                               m->vpar[2]);
-                                       isdn_tty_at_cout(rs, info);
-                                       break;
-                               case '=':
-                                       p[0]++;
-                                       if ((*p[0]>='0') && (*p[0]<='9')) {
-                                               par1 = isdn_getnum(p);
-                                               if ((par1 < 0) || (par1 > 31))
-                                                       PARSE_ERROR1;
-                                               if (*p[0] != ',')
-                                                       PARSE_ERROR1;
-                                               p[0]++;
-                                               par2 = isdn_getnum(p);
-                                               if ((par2 < 0) || (par2 > 255))
-                                                       PARSE_ERROR1;
-                                               m->vpar[1] = par1;
-                                               m->vpar[2] = par2;
-                                               break;
-                                       } else 
-                                       if (*p[0] == '?') {
-                                               p[0]++;
-                                               isdn_tty_at_cout("\r\n<0-31>,<0-255>",
-                                                          info);
-                                               break;
-                                       } else
+               case '=':
+                       p[0]++;
+                       if ((*p[0] >= '0') && (*p[0] <= '9')) {
+                               par1 = isdn_getnum(p);
+                               if ((par1 < 0) || (par1 > 31))
                                        PARSE_ERROR1;
-                                       break;
-                               default:
+                               if (*p[0] != ',')
                                        PARSE_ERROR1;
-                       }
-                       break;
-               case 5:
-                       /* AT+VSM - Select compression */
-                       switch (*p[0]) {
-                               case '?':
-                                       p[0]++;
-                                       sprintf(rs, "\r\n<%d>,<%d><8000>",
-                                               m->vpar[3],
-                                               m->vpar[1]);
-                                       isdn_tty_at_cout(rs, info);
-                                       break;
-                               case '=':
+                               p[0]++;
+                               par2 = isdn_getnum(p);
+                               if ((par2 < 0) || (par2 > 255))
+                                       PARSE_ERROR1;
+                               m->vpar[1] = par1;
+                               m->vpar[2] = par2;
+                               break;
+                       } else
+                               if (*p[0] == '?') {
                                        p[0]++;
-                                       switch (*p[0]) {
-                                               case '2':
-                                               case '3':
-                                               case '4':
-                                               case '5':
-                                               case '6':
-                                                       par1 = isdn_getnum(p);
-                                                       if ((par1 < 2) || (par1 > 6))
-                                                               PARSE_ERROR1;
-                                                       m->vpar[3] = par1;
-                                                       break;
-                                               case '?':
-                                                       p[0]++;
-                                                       isdn_tty_at_cout("\r\n2;ADPCM;2;0;(8000)\r\n",
-                                                                  info);
-                                                       isdn_tty_at_cout("3;ADPCM;3;0;(8000)\r\n",
-                                                                  info);
-                                                       isdn_tty_at_cout("4;ADPCM;4;0;(8000)\r\n",
-                                                                  info);
-                                                       isdn_tty_at_cout("5;ALAW;8;0;(8000)\r\n",
-                                                                  info);
-                                                       isdn_tty_at_cout("6;ULAW;8;0;(8000)\r\n",
-                                                                  info);
-                                                       break;
-                                               default:
-                                                       PARSE_ERROR1;
-                                       }
+                                       isdn_tty_at_cout("\r\n<0-31>,<0-255>",
+                                                        info);
                                        break;
-                               default:
+                               } else
                                        PARSE_ERROR1;
-                       }
                        break;
-               case 6:
-                       /* AT+VTX - Start sending */
-                       if (!m->vpar[0])
+               default:
+                       PARSE_ERROR1;
+               }
+               break;
+       case 5:
+               /* AT+VSM - Select compression */
+               switch (*p[0]) {
+               case '?':
+                       p[0]++;
+                       sprintf(rs, "\r\n<%d>,<%d><8000>",
+                               m->vpar[3],
+                               m->vpar[1]);
+                       isdn_tty_at_cout(rs, info);
+                       break;
+               case '=':
+                       p[0]++;
+                       switch (*p[0]) {
+                       case '2':
+                       case '3':
+                       case '4':
+                       case '5':
+                       case '6':
+                               par1 = isdn_getnum(p);
+                               if ((par1 < 2) || (par1 > 6))
+                                       PARSE_ERROR1;
+                               m->vpar[3] = par1;
+                               break;
+                       case '?':
+                               p[0]++;
+                               isdn_tty_at_cout("\r\n2;ADPCM;2;0;(8000)\r\n",
+                                                info);
+                               isdn_tty_at_cout("3;ADPCM;3;0;(8000)\r\n",
+                                                info);
+                               isdn_tty_at_cout("4;ADPCM;4;0;(8000)\r\n",
+                                                info);
+                               isdn_tty_at_cout("5;ALAW;8;0;(8000)\r\n",
+                                                info);
+                               isdn_tty_at_cout("6;ULAW;8;0;(8000)\r\n",
+                                                info);
+                               break;
+                       default:
                                PARSE_ERROR1;
-                       if (info->online != 1) {
-                               isdn_tty_modem_result(RESULT_NO_ANSWER, info);
-                               return 1;
                        }
-                       info->dtmf_state = isdn_audio_dtmf_init(info->dtmf_state);
-                       if (!info->dtmf_state) {
-                               printk(KERN_WARNING "isdn_tty: Couldn't malloc dtmf state\n");
+                       break;
+               default:
+                       PARSE_ERROR1;
+               }
+               break;
+       case 6:
+               /* AT+VTX - Start sending */
+               if (!m->vpar[0])
+                       PARSE_ERROR1;
+               if (info->online != 1) {
+                       isdn_tty_modem_result(RESULT_NO_ANSWER, info);
+                       return 1;
+               }
+               info->dtmf_state = isdn_audio_dtmf_init(info->dtmf_state);
+               if (!info->dtmf_state) {
+                       printk(KERN_WARNING "isdn_tty: Couldn't malloc dtmf state\n");
+                       PARSE_ERROR1;
+               }
+               if (m->vpar[3] < 5) {
+                       info->adpcms = isdn_audio_adpcm_init(info->adpcms, m->vpar[3]);
+                       if (!info->adpcms) {
+                               printk(KERN_WARNING "isdn_tty: Couldn't malloc adpcm state\n");
                                PARSE_ERROR1;
                        }
-                       if (m->vpar[3] < 5) {
-                               info->adpcms = isdn_audio_adpcm_init(info->adpcms, m->vpar[3]);
-                               if (!info->adpcms) {
-                                       printk(KERN_WARNING "isdn_tty: Couldn't malloc adpcm state\n");
-                                       PARSE_ERROR1;
-                               }
-                       }
+               }
  #ifdef ISDN_DEBUG_AT
-                       printk(KERN_DEBUG "AT: +VTX\n");
+               printk(KERN_DEBUG "AT: +VTX\n");
  #endif
-                       m->lastDLE = 0;
-                       info->vonline |= 2;
-                       isdn_tty_modem_result(RESULT_CONNECT, info);
-                       return 0;
+               m->lastDLE = 0;
+               info->vonline |= 2;
+               isdn_tty_modem_result(RESULT_CONNECT, info);
+               return 0;
+               break;
+       case 7:
+               /* AT+VDD - DTMF detection */
+               switch (*p[0]) {
+               case '?':
+                       p[0]++;
+                       sprintf(rs, "\r\n<%d>,<%d>",
+                               m->vpar[4],
+                               m->vpar[5]);
+                       isdn_tty_at_cout(rs, info);
                        break;
-               case 7:
-                       /* AT+VDD - DTMF detection */
-                       switch (*p[0]) {
-                               case '?':
-                                       p[0]++;
-                                       sprintf(rs, "\r\n<%d>,<%d>",
-                                               m->vpar[4],
-                                               m->vpar[5]);
-                                       isdn_tty_at_cout(rs, info);
-                                       break;
-                               case '=':
-                                       p[0]++;
-                                       if ((*p[0]>='0') && (*p[0]<='9')) {
-                                               if (info->online != 1)
-                                                       PARSE_ERROR1;
-                                               par1 = isdn_getnum(p);
-                                               if ((par1 < 0) || (par1 > 15))
-                                                       PARSE_ERROR1;
-                                               if (*p[0] != ',')
-                                                       PARSE_ERROR1;
-                                               p[0]++;
-                                               par2 = isdn_getnum(p);
-                                               if ((par2 < 0) || (par2 > 255))
-                                                       PARSE_ERROR1;
-                                               m->vpar[4] = par1;
-                                               m->vpar[5] = par2;
-                                               cmd.driver = info->isdn_driver;
-                                               cmd.command = ISDN_CMD_AUDIO;
-                                               cmd.arg = info->isdn_channel + (ISDN_AUDIO_SETDD << 8);
-                                               cmd.parm.num[0] = par1;
-                                               cmd.parm.num[1] = par2;
-                                               isdn_command(&cmd);
-                                               break;
-                                       } else
-                                       if (*p[0] == '?') {
-                                               p[0]++;
-                                               isdn_tty_at_cout("\r\n<0-15>,<0-255>",
-                                                       info);
-                                               break;
-                                       } else
+               case '=':
+                       p[0]++;
+                       if ((*p[0] >= '0') && (*p[0] <= '9')) {
+                               if (info->online != 1)
                                        PARSE_ERROR1;
+                               par1 = isdn_getnum(p);
+                               if ((par1 < 0) || (par1 > 15))
+                                       PARSE_ERROR1;
+                               if (*p[0] != ',')
+                                       PARSE_ERROR1;
+                               p[0]++;
+                               par2 = isdn_getnum(p);
+                               if ((par2 < 0) || (par2 > 255))
+                                       PARSE_ERROR1;
+                               m->vpar[4] = par1;
+                               m->vpar[5] = par2;
+                               cmd.driver = info->isdn_driver;
+                               cmd.command = ISDN_CMD_AUDIO;
+                               cmd.arg = info->isdn_channel + (ISDN_AUDIO_SETDD << 8);
+                               cmd.parm.num[0] = par1;
+                               cmd.parm.num[1] = par2;
+                               isdn_command(&cmd);
+                               break;
+                       } else
+                               if (*p[0] == '?') {
+                                       p[0]++;
+                                       isdn_tty_at_cout("\r\n<0-15>,<0-255>",
+                                                        info);
                                        break;
-                               default:
+                               } else
                                        PARSE_ERROR1;
                        break;
                default:
                        PARSE_ERROR1;
+               }
+               break;
+       default:
+               PARSE_ERROR1;
        }
        return 0;
  }
   * Parse and perform an AT-command-line.
   */
  static void
- isdn_tty_parse_at(modem_info * info)
+ isdn_tty_parse_at(modem_info *info)
  {
        atemu *m = &info->emu;
        char *p;
  #endif
        for (p = &m->mdmcmd[2]; *p;) {
                switch (*p) {
-                       case ' ':
-                               p++;
+               case ' ':
+                       p++;
+                       break;
+               case 'A':
+                       /* A - Accept incoming call */
+                       p++;
+                       isdn_tty_cmd_ATA(info);
+                       return;
+                       break;
+               case 'D':
+                       /* D - Dial */
+                       if (info->msr & UART_MSR_DCD)
+                               PARSE_ERROR;
+                       if (info->msr & UART_MSR_RI) {
+                               isdn_tty_modem_result(RESULT_NO_CARRIER, info);
+                               return;
+                       }
+                       isdn_tty_getdial(++p, ds, sizeof ds);
+                       p += strlen(p);
+                       if (!strlen(m->msn))
+                               isdn_tty_modem_result(RESULT_NO_MSN_EAZ, info);
+                       else if (strlen(ds))
+                               isdn_tty_dial(ds, info, m);
+                       else
+                               PARSE_ERROR;
+                       return;
+               case 'E':
+                       /* E - Turn Echo on/off */
+                       p++;
+                       switch (isdn_getnum(&p)) {
+                       case 0:
+                               m->mdmreg[REG_ECHO] &= ~BIT_ECHO;
                                break;
-                       case 'A':
-                               /* A - Accept incoming call */
+                       case 1:
+                               m->mdmreg[REG_ECHO] |= BIT_ECHO;
+                               break;
+                       default:
+                               PARSE_ERROR;
+                       }
+                       break;
+               case 'H':
+                       /* H - On/Off-hook */
+                       p++;
+                       switch (*p) {
+                       case '0':
                                p++;
-                               isdn_tty_cmd_ATA(info);
-                               return;
+                               isdn_tty_on_hook(info);
                                break;
-                       case 'D':
-                               /* D - Dial */
-                               if (info->msr & UART_MSR_DCD)
-                                       PARSE_ERROR;
-                               if (info->msr & UART_MSR_RI) {
-                                       isdn_tty_modem_result(RESULT_NO_CARRIER, info);
-                                       return;
-                               }
-                               isdn_tty_getdial(++p, ds, sizeof ds);
-                               p += strlen(p);
-                               if (!strlen(m->msn))
-                                       isdn_tty_modem_result(RESULT_NO_MSN_EAZ, info);
-                               else if (strlen(ds))
-                                       isdn_tty_dial(ds, info, m);
-                               else
-                                       PARSE_ERROR;
-                               return;
-                       case 'E':
-                               /* E - Turn Echo on/off */
+                       case '1':
                                p++;
-                               switch (isdn_getnum(&p)) {
-                                       case 0:
-                                               m->mdmreg[REG_ECHO] &= ~BIT_ECHO;
-                                               break;
-                                       case 1:
-                                               m->mdmreg[REG_ECHO] |= BIT_ECHO;
-                                               break;
-                                       default:
-                                               PARSE_ERROR;
-                               }
+                               isdn_tty_off_hook();
                                break;
-                       case 'H':
-                               /* H - On/Off-hook */
+                       default:
+                               isdn_tty_on_hook(info);
+                               break;
+                       }
+                       break;
+               case 'I':
+                       /* I - Information */
+                       p++;
+                       isdn_tty_at_cout("\r\nLinux ISDN", info);
+                       switch (*p) {
+                       case '0':
+                       case '1':
                                p++;
-                               switch (*p) {
-                                       case '0':
-                                               p++;
-                                               isdn_tty_on_hook(info);
-                                               break;
-                                       case '1':
-                                               p++;
-                                               isdn_tty_off_hook();
-                                               break;
-                                       default:
-                                               isdn_tty_on_hook(info);
-                                               break;
-                               }
                                break;
-                       case 'I':
-                               /* I - Information */
+                       case '2':
                                p++;
-                               isdn_tty_at_cout("\r\nLinux ISDN", info);
-                               switch (*p) {
-                                       case '0':
-                                       case '1':
-                                               p++;
-                                               break;
-                                       case '2':
-                                               p++;
-                                               isdn_tty_report(info);
-                                               break;
-                                       case '3':
-                                                 p++;
-                                                 snprintf(ds, sizeof(ds), "\r\n%d", info->emu.charge);
-                                                 isdn_tty_at_cout(ds, info);
-                                                 break;
-                                       default:;
-                               }
+                               isdn_tty_report(info);
                                break;
- #ifdef DUMMY_HAYES_AT
-                       case 'L':
-                       case 'M':
-                               /* only for be compilant with common scripts */
-                               /* no function */
+                       case '3':
                                p++;
-                               isdn_getnum(&p);
+                               snprintf(ds, sizeof(ds), "\r\n%d", info->emu.charge);
+                               isdn_tty_at_cout(ds, info);
                                break;
+                       default:;
+                       }
+                       break;
+ #ifdef DUMMY_HAYES_AT
+               case 'L':
+               case 'M':
+                       /* only for be compilant with common scripts */
+                       /* no function */
+                       p++;
+                       isdn_getnum(&p);
+                       break;
  #endif
-                       case 'O':
-                               /* O - Go online */
-                               p++;
-                               if (info->msr & UART_MSR_DCD)
-                                       /* if B-Channel is up */
-                                       isdn_tty_modem_result((m->mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM) ? RESULT_CONNECT:RESULT_CONNECT64000, info);
-                               else
-                                       isdn_tty_modem_result(RESULT_NO_CARRIER, info);
+               case 'O':
+                       /* O - Go online */
+                       p++;
+                       if (info->msr & UART_MSR_DCD)
+                               /* if B-Channel is up */
+                               isdn_tty_modem_result((m->mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM) ? RESULT_CONNECT : RESULT_CONNECT64000, info);
+                       else
+                               isdn_tty_modem_result(RESULT_NO_CARRIER, info);
+                       return;
+               case 'Q':
+                       /* Q - Turn Emulator messages on/off */
+                       p++;
+                       switch (isdn_getnum(&p)) {
+                       case 0:
+                               m->mdmreg[REG_RESP] |= BIT_RESP;
+                               break;
+                       case 1:
+                               m->mdmreg[REG_RESP] &= ~BIT_RESP;
+                               break;
+                       default:
+                               PARSE_ERROR;
+                       }
+                       break;
+               case 'S':
+                       /* S - Set/Get Register */
+                       p++;
+                       if (isdn_tty_cmd_ATS(&p, info))
                                return;
-                       case 'Q':
-                               /* Q - Turn Emulator messages on/off */
-                               p++;
-                               switch (isdn_getnum(&p)) {
-                                       case 0:
-                                               m->mdmreg[REG_RESP] |= BIT_RESP;
-                                               break;
-                                       case 1:
-                                               m->mdmreg[REG_RESP] &= ~BIT_RESP;
-                                               break;
-                                       default:
-                                               PARSE_ERROR;
-                               }
+                       break;
+               case 'V':
+                       /* V - Numeric or ASCII Emulator-messages */
+                       p++;
+                       switch (isdn_getnum(&p)) {
+                       case 0:
+                               m->mdmreg[REG_RESP] |= BIT_RESPNUM;
+                               break;
+                       case 1:
+                               m->mdmreg[REG_RESP] &= ~BIT_RESPNUM;
                                break;
-                       case 'S':
-                               /* S - Set/Get Register */
+                       default:
+                               PARSE_ERROR;
+                       }
+                       break;
+               case 'Z':
+                       /* Z - Load Registers from Profile */
+                       p++;
+                       if (info->msr & UART_MSR_DCD) {
+                               info->online = 0;
+                               isdn_tty_on_hook(info);
+                       }
+                       isdn_tty_modem_reset_regs(info, 1);
+                       break;
+               case '+':
+                       p++;
+                       switch (*p) {
+ #ifdef CONFIG_ISDN_AUDIO
+                       case 'F':
                                p++;
-                               if (isdn_tty_cmd_ATS(&p, info))
+                               if (isdn_tty_cmd_PLUSF(&p, info))
                                        return;
                                break;
                        case 'V':
-                               /* V - Numeric or ASCII Emulator-messages */
+                               if ((!(m->mdmreg[REG_SI1] & 1)) ||
+                                   (m->mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM))
+                                       PARSE_ERROR;
                                p++;
-                               switch (isdn_getnum(&p)) {
-                                       case 0:
-                                               m->mdmreg[REG_RESP] |= BIT_RESPNUM;
-                                               break;
-                                       case 1:
-                                               m->mdmreg[REG_RESP] &= ~BIT_RESPNUM;
-                                               break;
-                                       default:
-                                               PARSE_ERROR;
-                               }
+                               if (isdn_tty_cmd_PLUSV(&p, info))
+                                       return;
                                break;
-                       case 'Z':
-                               /* Z - Load Registers from Profile */
+ #endif                          /* CONFIG_ISDN_AUDIO */
+                       case 'S':       /* SUSPEND */
                                p++;
-                               if (info->msr & UART_MSR_DCD) {
-                                       info->online = 0;
-                                       isdn_tty_on_hook(info);
-                               }
-                               isdn_tty_modem_reset_regs(info, 1);
+                               isdn_tty_get_msnstr(ds, &p);
+                               isdn_tty_suspend(ds, info, m);
                                break;
-                       case '+':
+                       case 'R':       /* RESUME */
                                p++;
-                               switch (*p) {
- #ifdef CONFIG_ISDN_AUDIO
-                                       case 'F':
-                                               p++;
-                                               if (isdn_tty_cmd_PLUSF(&p, info))
-                                                       return;
-                                               break;
-                                       case 'V':
-                                               if ((!(m->mdmreg[REG_SI1] & 1)) ||
-                                                       (m->mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM))
-                                                       PARSE_ERROR;
-                                               p++;
-                                               if (isdn_tty_cmd_PLUSV(&p, info))
-                                                       return;
-                                               break;
- #endif                          /* CONFIG_ISDN_AUDIO */
-                                       case 'S':       /* SUSPEND */
-                                               p++;
-                                               isdn_tty_get_msnstr(ds, &p);
-                                               isdn_tty_suspend(ds, info, m);
-                                               break;
-                                       case 'R':       /* RESUME */
-                                               p++;
-                                               isdn_tty_get_msnstr(ds, &p);
-                                               isdn_tty_resume(ds, info, m);
-                                               break;
-                                       case 'M':       /* MESSAGE */
-                                               p++;
-                                               isdn_tty_send_msg(info, m, p);
-                                               break;
-                                       default:
-                                               PARSE_ERROR;
-                               }
+                               isdn_tty_get_msnstr(ds, &p);
+                               isdn_tty_resume(ds, info, m);
                                break;
-                       case '&':
+                       case 'M':       /* MESSAGE */
                                p++;
-                               if (isdn_tty_cmd_ATand(&p, info))
-                                       return;
+                               isdn_tty_send_msg(info, m, p);
                                break;
                        default:
                                PARSE_ERROR;
+                       }
+                       break;
+               case '&':
+                       p++;
+                       if (isdn_tty_cmd_ATand(&p, info))
+                               return;
+                       break;
+               default:
+                       PARSE_ERROR;
                }
        }
  #ifdef CONFIG_ISDN_AUDIO
  /* Need own toupper() because standard-toupper is not available
   * within modules.
   */
- #define my_toupper(c) (((c>='a')&&(c<='z'))?(c&0xdf):c)
+ #define my_toupper(c) (((c >= 'a') && (c <= 'z')) ? (c & 0xdf) : c)
  
  /*
   * Perform line-editing of AT-commands
   *   channel  index to line (minor-device)
   */
  static int
- isdn_tty_edit_at(const char *p, int count, modem_info * info)
+ isdn_tty_edit_at(const char *p, int count, modem_info *info)
  {
        atemu *m = &info->emu;
        int total = 0;
                        if (m->mdmcmdl < 255) {
                                c = my_toupper(c);
                                switch (m->mdmcmdl) {
-                                       case 1:
-                                               if (c == 'T') {
-                                                       m->mdmcmd[m->mdmcmdl] = c;
-                                                       m->mdmcmd[++m->mdmcmdl] = 0;
-                                                       break;
-                                               } else
-                                                       m->mdmcmdl = 0;
-                                               /* Fall through, check for 'A' */
-                                       case 0:
-                                               if (c == 'A') {
-                                                       m->mdmcmd[m->mdmcmdl] = c;
-                                                       m->mdmcmd[++m->mdmcmdl] = 0;
-                                               }
+                               case 1:
+                                       if (c == 'T') {
+                                               m->mdmcmd[m->mdmcmdl] = c;
+                                               m->mdmcmd[++m->mdmcmdl] = 0;
                                                break;
-                                       default:
+                                       } else
+                                               m->mdmcmdl = 0;
+                                       /* Fall through, check for 'A' */
+                               case 0:
+                                       if (c == 'A') {
                                                m->mdmcmd[m->mdmcmdl] = c;
                                                m->mdmcmd[++m->mdmcmdl] = 0;
+                                       }
+                                       break;
+                               default:
+                                       m->mdmcmd[m->mdmcmdl] = c;
+                                       m->mdmcmd[++m->mdmcmdl] = 0;
                                }
                        }
                }
diff --combined drivers/ssb/main.c
@@@ -140,6 -140,19 +140,6 @@@ static void ssb_device_put(struct ssb_d
                put_device(dev->dev);
  }
  
 -static inline struct ssb_driver *ssb_driver_get(struct ssb_driver *drv)
 -{
 -      if (drv)
 -              get_driver(&drv->drv);
 -      return drv;
 -}
 -
 -static inline void ssb_driver_put(struct ssb_driver *drv)
 -{
 -      if (drv)
 -              put_driver(&drv->drv);
 -}
 -
  static int ssb_device_resume(struct device *dev)
  {
        struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
@@@ -237,9 -250,11 +237,9 @@@ int ssb_devices_freeze(struct ssb_bus *
                        ssb_device_put(sdev);
                        continue;
                }
 -              sdrv = ssb_driver_get(drv_to_ssb_drv(sdev->dev->driver));
 -              if (!sdrv || SSB_WARN_ON(!sdrv->remove)) {
 -                      ssb_device_put(sdev);
 +              sdrv = drv_to_ssb_drv(sdev->dev->driver);
 +              if (SSB_WARN_ON(!sdrv->remove))
                        continue;
 -              }
                sdrv->remove(sdev);
                ctx->device_frozen[i] = 1;
        }
@@@ -278,6 -293,7 +278,6 @@@ int ssb_devices_thaw(struct ssb_freeze_
                                   dev_name(sdev->dev));
                        result = err;
                }
 -              ssb_driver_put(sdrv);
                ssb_device_put(sdev);
        }
  
@@@ -1078,6 -1094,9 +1078,9 @@@ u32 ssb_clockspeed(struct ssb_bus *bus
        u32 plltype;
        u32 clkctl_n, clkctl_m;
  
+       if (bus->chipco.capabilities & SSB_CHIPCO_CAP_PMU)
+               return ssb_pmu_get_controlclock(&bus->chipco);
        if (ssb_extif_available(&bus->extif))
                ssb_extif_get_clockcontrol(&bus->extif, &plltype,
                                           &clkctl_n, &clkctl_m);
@@@ -21,7 -21,7 +21,7 @@@
  #include <linux/mutex.h>
  #include <linux/ppp_defs.h>
  #include <linux/if.h>
- #include <linux/if_ppp.h>
+ #include <linux/ppp-ioctl.h>
  #include <linux/sched.h>
  #include <linux/serial.h>
  #include <linux/slab.h>
@@@ -90,23 -90,33 +90,23 @@@ static void report_deregistering(struc
               tty->index);
  }
  
 -static struct ipw_tty *get_tty(int minor)
 +static struct ipw_tty *get_tty(int index)
  {
 -      if (minor < ipw_tty_driver->minor_start
 -                      || minor >= ipw_tty_driver->minor_start +
 -                      IPWIRELESS_PCMCIA_MINORS)
 +      /*
 +       * The 'ras_raw' channel is only available when 'loopback' mode
 +       * is enabled.
 +       * Number of minor starts with 16 (_RANGE * _RAS_RAW).
 +       */
 +      if (!ipwireless_loopback && index >=
 +                       IPWIRELESS_PCMCIA_MINOR_RANGE * TTYTYPE_RAS_RAW)
                return NULL;
 -      else {
 -              int minor_offset = minor - ipw_tty_driver->minor_start;
 -
 -              /*
 -               * The 'ras_raw' channel is only available when 'loopback' mode
 -               * is enabled.
 -               * Number of minor starts with 16 (_RANGE * _RAS_RAW).
 -               */
 -              if (!ipwireless_loopback &&
 -                              minor_offset >=
 -                               IPWIRELESS_PCMCIA_MINOR_RANGE * TTYTYPE_RAS_RAW)
 -                      return NULL;
 -
 -              return ttys[minor_offset];
 -      }
 +
 +      return ttys[index];
  }
  
  static int ipw_open(struct tty_struct *linux_tty, struct file *filp)
  {
 -      int minor = linux_tty->index;
 -      struct ipw_tty *tty = get_tty(minor);
 +      struct ipw_tty *tty = get_tty(linux_tty->index);
  
        if (!tty)
                return -ENODEV;
@@@ -500,7 -510,7 +500,7 @@@ static int add_tty(int j
                ipwireless_associate_network_tty(network,
                                                 secondary_channel_idx,
                                                 ttys[j]);
 -      if (get_tty(j + ipw_tty_driver->minor_start) == ttys[j])
 +      if (get_tty(j) == ttys[j])
                report_registering(ttys[j]);
        return 0;
  }
@@@ -560,7 -570,7 +560,7 @@@ void ipwireless_tty_free(struct ipw_tt
  
                if (ttyj) {
                        mutex_lock(&ttyj->ipw_tty_mutex);
 -                      if (get_tty(j + ipw_tty_driver->minor_start) == ttyj)
 +                      if (get_tty(j) == ttyj)
                                report_deregistering(ttyj);
                        ttyj->closing = 1;
                        if (ttyj->linux_tty != NULL) {
@@@ -604,6 -614,7 +604,6 @@@ int ipwireless_tty_init(void
        if (!ipw_tty_driver)
                return -ENOMEM;
  
 -      ipw_tty_driver->owner = THIS_MODULE;
        ipw_tty_driver->driver_name = IPWIRELESS_PCCARD_NAME;
        ipw_tty_driver->name = "ttyIPWp";
        ipw_tty_driver->major = 0;
@@@ -214,8 -214,8 +214,8 @@@ enum 
  #include <linux/skbuff.h>
  
  #ifdef CONFIG_RPS
 -#include <linux/jump_label.h>
 -extern struct jump_label_key rps_needed;
 +#include <linux/static_key.h>
 +extern struct static_key rps_needed;
  #endif
  
  struct neighbour;
@@@ -417,7 -417,7 +417,7 @@@ typedef rx_handler_result_t rx_handler_
  
  extern void __napi_schedule(struct napi_struct *n);
  
- static inline int napi_disable_pending(struct napi_struct *n)
+ static inline bool napi_disable_pending(struct napi_struct *n)
  {
        return test_bit(NAPI_STATE_DISABLE, &n->state);
  }
   * insure only one NAPI poll instance runs.  We also make
   * sure there is no pending NAPI disable.
   */
- static inline int napi_schedule_prep(struct napi_struct *n)
+ static inline bool napi_schedule_prep(struct napi_struct *n)
  {
        return !napi_disable_pending(n) &&
                !test_and_set_bit(NAPI_STATE_SCHED, &n->state);
@@@ -451,13 -451,13 +451,13 @@@ static inline void napi_schedule(struc
  }
  
  /* Try to reschedule poll. Called by dev->poll() after napi_complete().  */
- static inline int napi_reschedule(struct napi_struct *napi)
+ static inline bool napi_reschedule(struct napi_struct *napi)
  {
        if (napi_schedule_prep(napi)) {
                __napi_schedule(napi);
-               return 1;
+               return true;
        }
-       return 0;
+       return false;
  }
  
  /**
@@@ -1082,7 -1082,8 +1082,8 @@@ struct net_device 
        const struct header_ops *header_ops;
  
        unsigned int            flags;  /* interface flags (a la BSD)   */
-       unsigned int            priv_flags; /* Like 'flags' but invisible to userspace. */
+       unsigned int            priv_flags; /* Like 'flags' but invisible to userspace.
+                                            * See if.h for definitions. */
        unsigned short          gflags;
        unsigned short          padded; /* How much padding added by alloc_netdev() */
  
@@@ -1867,7 -1868,7 +1868,7 @@@ static inline void netif_tx_stop_all_qu
        }
  }
  
- static inline int netif_tx_queue_stopped(const struct netdev_queue *dev_queue)
+ static inline bool netif_tx_queue_stopped(const struct netdev_queue *dev_queue)
  {
        return test_bit(__QUEUE_STATE_DRV_XOFF, &dev_queue->state);
  }
   *
   *    Test if transmit queue on device is currently unable to send.
   */
- static inline int netif_queue_stopped(const struct net_device *dev)
+ static inline bool netif_queue_stopped(const struct net_device *dev)
  {
        return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0));
  }
  
- static inline int netif_xmit_stopped(const struct netdev_queue *dev_queue)
+ static inline bool netif_xmit_stopped(const struct netdev_queue *dev_queue)
  {
        return dev_queue->state & QUEUE_STATE_ANY_XOFF;
  }
  
- static inline int netif_xmit_frozen_or_stopped(const struct netdev_queue *dev_queue)
+ static inline bool netif_xmit_frozen_or_stopped(const struct netdev_queue *dev_queue)
  {
        return dev_queue->state & QUEUE_STATE_ANY_XOFF_OR_FROZEN;
  }
@@@ -1898,12 -1899,22 +1899,22 @@@ static inline void netdev_tx_sent_queue
  {
  #ifdef CONFIG_BQL
        dql_queued(&dev_queue->dql, bytes);
-       if (unlikely(dql_avail(&dev_queue->dql) < 0)) {
-               set_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state);
-               if (unlikely(dql_avail(&dev_queue->dql) >= 0))
-                       clear_bit(__QUEUE_STATE_STACK_XOFF,
-                           &dev_queue->state);
-       }
+       if (likely(dql_avail(&dev_queue->dql) >= 0))
+               return;
+       set_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state);
+       /*
+        * The XOFF flag must be set before checking the dql_avail below,
+        * because in netdev_tx_completed_queue we update the dql_completed
+        * before checking the XOFF flag.
+        */
+       smp_mb();
+       /* check again in case another CPU has just made room avail */
+       if (unlikely(dql_avail(&dev_queue->dql) >= 0))
+               clear_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state);
  #endif
  }
  
@@@ -1916,16 -1927,23 +1927,23 @@@ static inline void netdev_tx_completed_
                                             unsigned pkts, unsigned bytes)
  {
  #ifdef CONFIG_BQL
-       if (likely(bytes)) {
-               dql_completed(&dev_queue->dql, bytes);
-               if (unlikely(test_bit(__QUEUE_STATE_STACK_XOFF,
-                   &dev_queue->state) &&
-                   dql_avail(&dev_queue->dql) >= 0)) {
-                       if (test_and_clear_bit(__QUEUE_STATE_STACK_XOFF,
-                            &dev_queue->state))
-                               netif_schedule_queue(dev_queue);
-               }
-       }
+       if (unlikely(!bytes))
+               return;
+       dql_completed(&dev_queue->dql, bytes);
+       /*
+        * Without the memory barrier there is a small possiblity that
+        * netdev_tx_sent_queue will miss the update and cause the queue to
+        * be stopped forever
+        */
+       smp_mb();
+       if (dql_avail(&dev_queue->dql) < 0)
+               return;
+       if (test_and_clear_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state))
+               netif_schedule_queue(dev_queue);
  #endif
  }
  
@@@ -1938,6 -1956,7 +1956,7 @@@ static inline void netdev_completed_que
  static inline void netdev_tx_reset_queue(struct netdev_queue *q)
  {
  #ifdef CONFIG_BQL
+       clear_bit(__QUEUE_STATE_STACK_XOFF, &q->state);
        dql_reset(&q->dql);
  #endif
  }
@@@ -1953,7 -1972,7 +1972,7 @@@ static inline void netdev_reset_queue(s
   *
   *    Test if the device has been brought up.
   */
- static inline int netif_running(const struct net_device *dev)
+ static inline bool netif_running(const struct net_device *dev)
  {
        return test_bit(__LINK_STATE_START, &dev->state);
  }
@@@ -2003,16 -2022,16 +2022,16 @@@ static inline void netif_stop_subqueue(
   *
   * Check individual transmit queue of a device with multiple transmit queues.
   */
- static inline int __netif_subqueue_stopped(const struct net_device *dev,
-                                        u16 queue_index)
+ static inline bool __netif_subqueue_stopped(const struct net_device *dev,
+                                           u16 queue_index)
  {
        struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index);
  
        return netif_tx_queue_stopped(txq);
  }
  
- static inline int netif_subqueue_stopped(const struct net_device *dev,
-                                        struct sk_buff *skb)
+ static inline bool netif_subqueue_stopped(const struct net_device *dev,
+                                         struct sk_buff *skb)
  {
        return __netif_subqueue_stopped(dev, skb_get_queue_mapping(skb));
  }
@@@ -2051,7 -2070,7 +2070,7 @@@ static inline u16 skb_tx_hash(const str
   *
   * Check if device has multiple transmit queues
   */
- static inline int netif_is_multiqueue(const struct net_device *dev)
+ static inline bool netif_is_multiqueue(const struct net_device *dev)
  {
        return dev->num_tx_queues > 1;
  }
@@@ -2121,7 -2140,7 +2140,7 @@@ extern int netdev_rx_handler_register(s
                                      void *rx_handler_data);
  extern void netdev_rx_handler_unregister(struct net_device *dev);
  
- extern int            dev_valid_name(const char *name);
+ extern bool           dev_valid_name(const char *name);
  extern int            dev_ioctl(struct net *net, unsigned int cmd, void __user *);
  extern int            dev_ethtool(struct net *net, struct ifreq *);
  extern unsigned               dev_get_flags(const struct net_device *);
@@@ -2187,7 -2206,7 +2206,7 @@@ extern void linkwatch_forget_dev(struc
   *
   * Check if carrier is present on device
   */
- static inline int netif_carrier_ok(const struct net_device *dev)
+ static inline bool netif_carrier_ok(const struct net_device *dev)
  {
        return !test_bit(__LINK_STATE_NOCARRIER, &dev->state);
  }
@@@ -2239,7 -2258,7 +2258,7 @@@ static inline void netif_dormant_off(st
   *
   * Check if carrier is present on device
   */
- static inline int netif_dormant(const struct net_device *dev)
+ static inline bool netif_dormant(const struct net_device *dev)
  {
        return test_bit(__LINK_STATE_DORMANT, &dev->state);
  }
   *
   * Check if carrier is operational
   */
- static inline int netif_oper_up(const struct net_device *dev)
+ static inline bool netif_oper_up(const struct net_device *dev)
  {
        return (dev->operstate == IF_OPER_UP ||
                dev->operstate == IF_OPER_UNKNOWN /* backward compat */);
   *
   * Check if device has not been removed from system.
   */
- static inline int netif_device_present(struct net_device *dev)
+ static inline bool netif_device_present(struct net_device *dev)
  {
        return test_bit(__LINK_STATE_PRESENT, &dev->state);
  }
@@@ -2333,9 -2352,9 +2352,9 @@@ static inline void __netif_tx_lock_bh(s
        txq->xmit_lock_owner = smp_processor_id();
  }
  
- static inline int __netif_tx_trylock(struct netdev_queue *txq)
+ static inline bool __netif_tx_trylock(struct netdev_queue *txq)
  {
-       int ok = spin_trylock(&txq->_xmit_lock);
+       bool ok = spin_trylock(&txq->_xmit_lock);
        if (likely(ok))
                txq->xmit_lock_owner = smp_processor_id();
        return ok;
@@@ -2556,6 -2575,8 +2575,8 @@@ extern void             dev_load(struct net *net, 
  extern void           dev_mcast_init(void);
  extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
                                               struct rtnl_link_stats64 *storage);
+ extern void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64,
+                                   const struct net_device_stats *netdev_stats);
  
  extern int            netdev_max_backlog;
  extern int            netdev_tstamp_prequeue;
@@@ -2611,7 -2632,7 +2632,7 @@@ void netif_stacked_transfer_operstate(c
  
  netdev_features_t netif_skb_features(struct sk_buff *skb);
  
- static inline int net_gso_ok(netdev_features_t features, int gso_type)
+ static inline bool net_gso_ok(netdev_features_t features, int gso_type)
  {
        netdev_features_t feature = gso_type << NETIF_F_GSO_SHIFT;
  
        return (features & feature) == feature;
  }
  
- static inline int skb_gso_ok(struct sk_buff *skb, netdev_features_t features)
+ static inline bool skb_gso_ok(struct sk_buff *skb, netdev_features_t features)
  {
        return net_gso_ok(features, skb_shinfo(skb)->gso_type) &&
               (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST));
  }
  
- static inline int netif_needs_gso(struct sk_buff *skb,
-       netdev_features_t features)
+ static inline bool netif_needs_gso(struct sk_buff *skb,
+                                  netdev_features_t features)
  {
        return skb_is_gso(skb) && (!skb_gso_ok(skb, features) ||
-               unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
+               unlikely((skb->ip_summed != CHECKSUM_PARTIAL) &&
+                        (skb->ip_summed != CHECKSUM_UNNECESSARY)));
  }
  
  static inline void netif_set_gso_max_size(struct net_device *dev,
        dev->gso_max_size = size;
  }
  
- static inline int netif_is_bond_slave(struct net_device *dev)
+ static inline bool netif_is_bond_slave(struct net_device *dev)
  {
        return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING;
  }
  
+ static inline bool netif_supports_nofcs(struct net_device *dev)
+ {
+       return dev->priv_flags & IFF_SUPP_NOFCS;
+ }
  extern struct pernet_operations __net_initdata loopback_net_ops;
  
  /* Logging, debugging and troubleshooting/diagnostic helpers. */
@@@ -2687,14 -2714,14 +2714,14 @@@ int netdev_info(const struct net_devic
  #define MODULE_ALIAS_NETDEV(device) \
        MODULE_ALIAS("netdev-" device)
  
 -#if defined(DEBUG)
 -#define netdev_dbg(__dev, format, args...)                    \
 -      netdev_printk(KERN_DEBUG, __dev, format, ##args)
 -#elif defined(CONFIG_DYNAMIC_DEBUG)
 +#if defined(CONFIG_DYNAMIC_DEBUG)
  #define netdev_dbg(__dev, format, args...)                    \
  do {                                                          \
        dynamic_netdev_dbg(__dev, format, ##args);              \
  } while (0)
 +#elif defined(DEBUG)
 +#define netdev_dbg(__dev, format, args...)                    \
 +      netdev_printk(KERN_DEBUG, __dev, format, ##args)
  #else
  #define netdev_dbg(__dev, format, args...)                    \
  ({                                                            \
diff --combined include/net/sock.h
@@@ -55,7 -55,7 +55,7 @@@
  #include <linux/uaccess.h>
  #include <linux/memcontrol.h>
  #include <linux/res_counter.h>
 -#include <linux/jump_label.h>
 +#include <linux/static_key.h>
  
  #include <linux/filter.h>
  #include <linux/rculist_nulls.h>
@@@ -69,7 -69,7 +69,7 @@@ struct cgroup
  struct cgroup_subsys;
  #ifdef CONFIG_NET
  int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss);
 -void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss);
 +void mem_cgroup_sockets_destroy(struct cgroup *cgrp);
  #else
  static inline
  int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss)
@@@ -77,7 -77,7 +77,7 @@@
        return 0;
  }
  static inline
 -void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss)
 +void mem_cgroup_sockets_destroy(struct cgroup *cgrp)
  {
  }
  #endif
@@@ -357,6 -357,7 +357,7 @@@ struct sock 
        struct page             *sk_sndmsg_page;
        struct sk_buff          *sk_send_head;
        __u32                   sk_sndmsg_off;
+       __s32                   sk_peek_off;
        int                     sk_write_pending;
  #ifdef CONFIG_SECURITY
        void                    *sk_security;
        void                    (*sk_destruct)(struct sock *sk);
  };
  
+ static inline int sk_peek_offset(struct sock *sk, int flags)
+ {
+       if ((flags & MSG_PEEK) && (sk->sk_peek_off >= 0))
+               return sk->sk_peek_off;
+       else
+               return 0;
+ }
+ static inline void sk_peek_offset_bwd(struct sock *sk, int val)
+ {
+       if (sk->sk_peek_off >= 0) {
+               if (sk->sk_peek_off >= val)
+                       sk->sk_peek_off -= val;
+               else
+                       sk->sk_peek_off = 0;
+       }
+ }
+ static inline void sk_peek_offset_fwd(struct sock *sk, int val)
+ {
+       if (sk->sk_peek_off >= 0)
+               sk->sk_peek_off += val;
+ }
  /*
   * Hashed lists helper routines
   */
@@@ -590,6 -615,10 +615,10 @@@ enum sock_flags 
        SOCK_RXQ_OVFL,
        SOCK_ZEROCOPY, /* buffers from userspace */
        SOCK_WIFI_STATUS, /* push wifi status to userspace */
+       SOCK_NOFCS, /* Tell NIC not to do the Ethernet FCS.
+                    * Will use last 4 bytes of packet sent from
+                    * user-space instead.
+                    */
  };
  
  static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
@@@ -871,7 -900,8 +900,7 @@@ struct proto 
         */
        int                     (*init_cgroup)(struct cgroup *cgrp,
                                               struct cgroup_subsys *ss);
 -      void                    (*destroy_cgroup)(struct cgroup *cgrp,
 -                                                struct cgroup_subsys *ss);
 +      void                    (*destroy_cgroup)(struct cgroup *cgrp);
        struct cg_proto         *(*proto_cgroup)(struct mem_cgroup *memcg);
  #endif
  };
@@@ -923,13 -953,13 +952,13 @@@ inline void sk_refcnt_debug_release(con
  #endif /* SOCK_REFCNT_DEBUG */
  
  #if defined(CONFIG_CGROUP_MEM_RES_CTLR_KMEM) && defined(CONFIG_NET)
 -extern struct jump_label_key memcg_socket_limit_enabled;
 +extern struct static_key memcg_socket_limit_enabled;
  static inline struct cg_proto *parent_cg_proto(struct proto *proto,
                                               struct cg_proto *cg_proto)
  {
        return proto->proto_cgroup(parent_mem_cgroup(cg_proto->memcg));
  }
 -#define mem_cgroup_sockets_enabled static_branch(&memcg_socket_limit_enabled)
 +#define mem_cgroup_sockets_enabled static_key_false(&memcg_socket_limit_enabled)
  #else
  #define mem_cgroup_sockets_enabled 0
  static inline struct cg_proto *parent_cg_proto(struct proto *proto,
@@@ -196,7 -196,7 +196,7 @@@ static DEVICE_ATTR(channel, S_IRUGO, sh
  static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
  {
        struct rfcomm_dev *dev, *entry;
-       struct list_head *head = &rfcomm_dev_list, *p;
+       struct list_head *head = &rfcomm_dev_list;
        int err = 0;
  
        BT_DBG("id %d channel %d", req->dev_id, req->channel);
                                break;
  
                        dev->id++;
-                       head = p;
+                       head = &entry->list;
                }
        } else {
                dev->id = req->dev_id;
                        if (entry->id > dev->id - 1)
                                break;
  
-                       head = p;
+                       head = &entry->list;
                }
        }
  
@@@ -1157,6 -1157,7 +1157,6 @@@ int __init rfcomm_init_ttys(void
        if (!rfcomm_tty_driver)
                return -ENOMEM;
  
 -      rfcomm_tty_driver->owner        = THIS_MODULE;
        rfcomm_tty_driver->driver_name  = "rfcomm";
        rfcomm_tty_driver->name         = "rfcomm";
        rfcomm_tty_driver->major        = RFCOMM_TTY_MAJOR;
diff --combined net/core/dev.c
  #include <linux/inetdevice.h>
  #include <linux/cpu_rmap.h>
  #include <linux/net_tstamp.h>
 -#include <linux/jump_label.h>
 +#include <linux/static_key.h>
  #include <net/flow_keys.h>
  
  #include "net-sysfs.h"
@@@ -446,7 -446,7 +446,7 @@@ void __dev_remove_pack(struct packet_ty
                }
        }
  
-       printk(KERN_WARNING "dev_remove_pack: %p not found.\n", pt);
+       pr_warn("dev_remove_pack: %p not found\n", pt);
  out:
        spin_unlock(&ptype_lock);
  }
@@@ -848,21 -848,21 +848,21 @@@ EXPORT_SYMBOL(dev_get_by_flags_rcu)
   *    to allow sysfs to work.  We also disallow any kind of
   *    whitespace.
   */
- int dev_valid_name(const char *name)
+ bool dev_valid_name(const char *name)
  {
        if (*name == '\0')
-               return 0;
+               return false;
        if (strlen(name) >= IFNAMSIZ)
-               return 0;
+               return false;
        if (!strcmp(name, ".") || !strcmp(name, ".."))
-               return 0;
+               return false;
  
        while (*name) {
                if (*name == '/' || isspace(*name))
-                       return 0;
+                       return false;
                name++;
        }
-       return 1;
+       return true;
  }
  EXPORT_SYMBOL(dev_valid_name);
  
@@@ -1039,8 -1039,7 +1039,7 @@@ rollback
                        memcpy(dev->name, oldname, IFNAMSIZ);
                        goto rollback;
                } else {
-                       printk(KERN_ERR
-                              "%s: name change rollback failed: %d.\n",
+                       pr_err("%s: name change rollback failed: %d\n",
                               dev->name, ret);
                }
        }
@@@ -1139,9 -1138,8 +1138,8 @@@ void dev_load(struct net *net, const ch
                no_module = request_module("netdev-%s", name);
        if (no_module && capable(CAP_SYS_MODULE)) {
                if (!request_module("%s", name))
-                       pr_err("Loading kernel module for a network device "
- "with CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev-%s "
- "instead\n", name);
+                       pr_err("Loading kernel module for a network device with CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev-%s instead.\n",
+                              name);
        }
  }
  EXPORT_SYMBOL(dev_load);
@@@ -1441,11 -1439,11 +1439,11 @@@ int call_netdevice_notifiers(unsigned l
  }
  EXPORT_SYMBOL(call_netdevice_notifiers);
  
 -static struct jump_label_key netstamp_needed __read_mostly;
 +static struct static_key netstamp_needed __read_mostly;
  #ifdef HAVE_JUMP_LABEL
 -/* We are not allowed to call jump_label_dec() from irq context
 +/* We are not allowed to call static_key_slow_dec() from irq context
   * If net_disable_timestamp() is called from irq context, defer the
 - * jump_label_dec() calls.
 + * static_key_slow_dec() calls.
   */
  static atomic_t netstamp_needed_deferred;
  #endif
@@@ -1457,12 -1455,12 +1455,12 @@@ void net_enable_timestamp(void
  
        if (deferred) {
                while (--deferred)
 -                      jump_label_dec(&netstamp_needed);
 +         &