USB: serial: ir-usb: fix link-speed handling
authorJohan Hovold <johan@kernel.org>
Wed, 22 Jan 2020 10:15:27 +0000 (11:15 +0100)
committerJohan Hovold <johan@kernel.org>
Thu, 23 Jan 2020 08:11:16 +0000 (09:11 +0100)
commit17a0184ca17e288decdca8b2841531e34d49285f
tree6961885e31ffd475a9f1f52bc8d387c4e4569d84
parent2988a8ae7476fe9535ab620320790d1714bdad1d
USB: serial: ir-usb: fix link-speed handling

Commit e0d795e4f36c ("usb: irda: cleanup on ir-usb module") added a USB
IrDA header with common defines, but mistakingly switched to using the
class-descriptor baud-rate bitmask values for the outbound header.

This broke link-speed handling for rates above 9600 baud, but a device
would also be able to operate at the default 9600 baud until a
link-speed request was issued (e.g. using the TCGETS ioctl).

Fixes: e0d795e4f36c ("usb: irda: cleanup on ir-usb module")
Cc: stable <stable@vger.kernel.org> # 2.6.27
Cc: Felipe Balbi <balbi@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ir-usb.c
include/linux/usb/irda.h