aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/6pack.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2007-11-07 04:27:34 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-11-07 07:14:24 -0500
commitd0127539ea9b5fcfe1a1d7d4d57f12384da5190c (patch)
treeea533cf6c337c9d2fdd9641fb6e67bf895e3b5c8 /drivers/net/hamradio/6pack.c
parent0fc00e2440b717e19bab1ae0015f03936bdf7967 (diff)
[TTY]: Use tty_mode_ioctl() in network drivers.
We conciously make a change here - we permit mode and speed setting to be done in things like SLIP mode. There isn't actually a technical reason to disallow this. It's usually a silly thing to do but we can do it and soemone might wish to do so. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio/6pack.c')
-rw-r--r--drivers/net/hamradio/6pack.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index e0119f6a3319..580cb4ab2af1 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -762,26 +762,20 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file,
762 762
763 if (copy_from_user(&addr, 763 if (copy_from_user(&addr,
764 (void __user *) arg, AX25_ADDR_LEN)) { 764 (void __user *) arg, AX25_ADDR_LEN)) {
765 err = -EFAULT; 765 err = -EFAULT;
766 break; 766 break;
767 } 767 }
768 768
769 netif_tx_lock_bh(dev); 769 netif_tx_lock_bh(dev);
770 memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN); 770 memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN);
771 netif_tx_unlock_bh(dev); 771 netif_tx_unlock_bh(dev);
772 772
773 err = 0; 773 err = 0;
774 break; 774 break;
775 } 775 }
776
777 /* Allow stty to read, but not set, the serial port */
778 case TCGETS:
779 case TCGETA:
780 err = n_tty_ioctl(tty, (struct file *) file, cmd, arg);
781 break;
782 776
783 default: 777 default:
784 err = -ENOIOCTLCMD; 778 err = tty_mode_ioctl(tty, file, cmd, arg);
785 } 779 }
786 780
787 sp_put(sp); 781 sp_put(sp);