aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-01-25 14:44:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-02 13:11:28 -0500
commit632f32e2107d37598e3f6816dcf00c7cab4081ca (patch)
treeb706ec2b89cc27832f19caff0c50bc500cab252e /drivers/bluetooth
parent348f9bb31c56909f9098a598b6ecdc94a560816e (diff)
tty: Remove external interface for tty_set_termios()
tty_set_termios() is an internal helper intended for file scope use. UART drivers which are capable of driving the RTS pin must properly handle the tiocmset() method, regardless of termios settings. A failure to do so is a UART driver bug and should be fixed there. Do not use this interface to workaround UART driver bugs. Cc: Johan Hedberg <johan.hedberg@gmail.com> Cc: <linux-bluetooth@vger.kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/hci_ath.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/bluetooth/hci_ath.c b/drivers/bluetooth/hci_ath.c
index 2ff6dfd2d3f0..9c4dcf4c62ea 100644
--- a/drivers/bluetooth/hci_ath.c
+++ b/drivers/bluetooth/hci_ath.c
@@ -51,33 +51,22 @@ struct ath_struct {
51 51
52static int ath_wakeup_ar3k(struct tty_struct *tty) 52static int ath_wakeup_ar3k(struct tty_struct *tty)
53{ 53{
54 struct ktermios ktermios;
55 int status = tty->driver->ops->tiocmget(tty); 54 int status = tty->driver->ops->tiocmget(tty);
56 55
57 if (status & TIOCM_CTS) 56 if (status & TIOCM_CTS)
58 return status; 57 return status;
59 58
60 /* Disable Automatic RTSCTS */
61 ktermios = tty->termios;
62 ktermios.c_cflag &= ~CRTSCTS;
63 tty_set_termios(tty, &ktermios);
64
65 /* Clear RTS first */ 59 /* Clear RTS first */
66 status = tty->driver->ops->tiocmget(tty); 60 tty->driver->ops->tiocmget(tty);
67 tty->driver->ops->tiocmset(tty, 0x00, TIOCM_RTS); 61 tty->driver->ops->tiocmset(tty, 0x00, TIOCM_RTS);
68 mdelay(20); 62 mdelay(20);
69 63
70 /* Set RTS, wake up board */ 64 /* Set RTS, wake up board */
71 status = tty->driver->ops->tiocmget(tty); 65 tty->driver->ops->tiocmget(tty);
72 tty->driver->ops->tiocmset(tty, TIOCM_RTS, 0x00); 66 tty->driver->ops->tiocmset(tty, TIOCM_RTS, 0x00);
73 mdelay(20); 67 mdelay(20);
74 68
75 status = tty->driver->ops->tiocmget(tty); 69 status = tty->driver->ops->tiocmget(tty);
76
77 /* Enable Automatic RTSCTS */
78 ktermios.c_cflag |= CRTSCTS;
79 status = tty_set_termios(tty, &ktermios);
80
81 return status; 70 return status;
82} 71}
83 72