Commit Graph

2 Commits (4da5ba4a6bd91ecd528d4b78287aa7ac1e0fb3e4)

Author SHA1 Message Date
John Crispin 291e04ee8f comgt: Use TCGETS and TCSETS ioctls for struct termios
When passing struct termios to ioctl TCGETS and TCSETS should be
used instead of TCGETA and TCSETA, which are meant for the older
struct termio. Should fix https://dev.openwrt.org/ticket/19012

Signed-off-by: Matti Laakso <malaakso@elisanet.fi>

SVN-Revision: 44506
9 years ago
John Crispin eb6acdf6b4 comgt: Allow using non-TTY devices
Some Huawei mobile broadband sticks utilizing the NCM protocol expose
the control channel as a cdc-wdm device node instead of a virtual TTY.
This device node does not support the terminal ioctls. This patch
adds a check whether the provided device is a TTY or not and does not
attempt to use the terminal ioctls if they are not supported.

v2: reduce diffstat by simplifying code a little
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>

SVN-Revision: 44054
10 years ago