diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-02-21 10:23:08 +0100 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-02-21 10:23:44 +0100 |
commit | 0bdb080c70495ea4efbed7661b4fe6100bd5adde (patch) | |
tree | 9b0e0278c74c56b724540c9c12621f2fed70a6ff /patches/0020-tty-termios | |
parent | e5561ba59729bf97f11bc11bb61fd4ef5c08c3b9 (diff) |
Revert "backports: Remove unused parts"
This reverts commit ab3fd3b9a801a9faa2619e2e65207e736f859a6d.
Diffstat (limited to 'patches/0020-tty-termios')
-rw-r--r-- | patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch | 67 | ||||
-rw-r--r-- | patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch | 14 |
2 files changed, 81 insertions, 0 deletions
diff --git a/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch b/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch new file mode 100644 index 00000000..81371523 --- /dev/null +++ b/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch @@ -0,0 +1,67 @@ +--- a/drivers/bluetooth/hci_ldisc.c ++++ b/drivers/bluetooth/hci_ldisc.c +@@ -24,6 +24,7 @@ + */ + + #include <linux/module.h> ++#include <linux/version.h> + + #include <linux/kernel.h> + #include <linux/init.h> +@@ -269,7 +270,11 @@ void hci_uart_set_flow_control(struct hc + + if (enable) { + /* Disable hardware flow control */ ++#if LINUX_VERSION_IS_GEQ(3,7,0) + ktermios = tty->termios; ++#else ++ ktermios = *tty->termios; ++#endif + ktermios.c_cflag &= ~CRTSCTS; + status = tty_set_termios(tty, &ktermios); + BT_DBG("Disabling hardware flow control: %s", +@@ -303,7 +308,11 @@ void hci_uart_set_flow_control(struct hc + BT_DBG("Setting RTS: %s", status ? "failed" : "success"); + + /* Re-enable hardware flow control */ ++#if LINUX_VERSION_IS_GEQ(3,7,0) + ktermios = tty->termios; ++#else ++ ktermios = *tty->termios; ++#endif + ktermios.c_cflag |= CRTSCTS; + status = tty_set_termios(tty, &ktermios); + BT_DBG("Enabling hardware flow control: %s", +@@ -324,7 +333,11 @@ void hci_uart_init_tty(struct hci_uart * + struct ktermios ktermios; + + /* Bring the UART into a known 8 bits no parity hw fc state */ ++#if LINUX_VERSION_IS_GEQ(3,7,0) + ktermios = tty->termios; ++#else ++ ktermios = *tty->termios; ++#endif + ktermios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | + INLCR | IGNCR | ICRNL | IXON); + ktermios.c_oflag &= ~OPOST; +@@ -342,7 +355,11 @@ void hci_uart_set_baudrate(struct hci_ua + struct tty_struct *tty = hu->tty; + struct ktermios ktermios; + ++#if LINUX_VERSION_IS_GEQ(3,7,0) + ktermios = tty->termios; ++#else ++ ktermios = *tty->termios; ++#endif + ktermios.c_cflag &= ~CBAUD; + tty_termios_encode_baud_rate(&ktermios, speed, speed); + +@@ -350,7 +367,7 @@ void hci_uart_set_baudrate(struct hci_ua + tty_set_termios(tty, &ktermios); + + BT_DBG("%s: New tty speeds: %d/%d", hu->hdev->name, +- tty->termios.c_ispeed, tty->termios.c_ospeed); ++ ktermios.c_ispeed, ktermios.c_ospeed); + } + + static int hci_uart_setup(struct hci_dev *hdev) diff --git a/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch b/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch new file mode 100644 index 00000000..71aa75dd --- /dev/null +++ b/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch @@ -0,0 +1,14 @@ +--- a/net/bluetooth/rfcomm/tty.c ++++ b/net/bluetooth/rfcomm/tty.c +@@ -869,7 +869,11 @@ static int rfcomm_tty_ioctl(struct tty_s + + static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old) + { ++#if LINUX_VERSION_IS_GEQ(3,7,0) + struct ktermios *new = &tty->termios; ++#else ++ struct ktermios *new = tty->termios; ++#endif + int old_baud_rate = tty_termios_baud_rate(old); + int new_baud_rate = tty_termios_baud_rate(new); + |