X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fnet%2Fhamradio%2Fmkiss.c;h=3ebbbe56b6e94be8c9fd7ec3be2b7d3486f7c51d;hb=d0b952a9837f81cd89e756b1b34293fa6e1cb59d;hp=3e9accf137e717ac47fe209cfc3621e7bf32960c;hpb=2ecc26b87a2b3e8650d3c7fe3fc85a8c73d5560d;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 3e9accf137e..3ebbbe56b6e 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -357,9 +357,9 @@ static int ax_set_mac_address(struct net_device *dev, void *addr) { struct sockaddr_ax25 *sa = addr; - spin_lock_irq(&dev->xmit_lock); + netif_tx_lock_bh(dev); memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN); - spin_unlock_irq(&dev->xmit_lock); + netif_tx_unlock_bh(dev); return 0; } @@ -515,6 +515,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len) count = kiss_esc(p, (unsigned char *)ax->xbuff, len); } } + spin_unlock_bh(&ax->buflock); set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags); actual = ax->tty->driver->write(ax->tty, ax->xbuff, count); @@ -752,6 +753,7 @@ static int mkiss_open(struct tty_struct *tty) ax->tty = tty; tty->disc_data = ax; + tty->receive_room = 65535; if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); @@ -884,9 +886,9 @@ static int mkiss_ioctl(struct tty_struct *tty, struct file *file, break; } - spin_lock_irq(&dev->xmit_lock); + netif_tx_lock_bh(dev); memcpy(dev->dev_addr, addr, AX25_ADDR_LEN); - spin_unlock_irq(&dev->xmit_lock); + netif_tx_unlock_bh(dev); err = 0; break; @@ -939,11 +941,6 @@ static void mkiss_receive_buf(struct tty_struct *tty, const unsigned char *cp, tty->driver->unthrottle(tty); } -static int mkiss_receive_room(struct tty_struct *tty) -{ - return 65536; /* We can handle an infinite amount of data. :-) */ -} - /* * Called by the driver when there's room for more data. If we have * more packets to send, we send them here. @@ -982,7 +979,6 @@ static struct tty_ldisc ax_ldisc = { .close = mkiss_close, .ioctl = mkiss_ioctl, .receive_buf = mkiss_receive_buf, - .receive_room = mkiss_receive_room, .write_wakeup = mkiss_write_wakeup }; @@ -1016,7 +1012,7 @@ static void __exit mkiss_exit_driver(void) MODULE_AUTHOR("Ralf Baechle DL5RB "); MODULE_DESCRIPTION("KISS driver for AX.25 over TTYs"); -MODULE_PARM(crc_force, "i"); +module_param(crc_force, int, 0); MODULE_PARM_DESC(crc_force, "crc [0 = auto | 1 = none | 2 = flexnet | 3 = smack]"); MODULE_LICENSE("GPL"); MODULE_ALIAS_LDISC(N_AX25);