zephyr/drivers/modem
Marcin Niestroj 67976f8686 drivers: modem: verify send semaphore before taking any action
Semaphore argument is checked only after requested command is already
sent over modem interface. It makes little sense to return -EINVAL when
half of the requested operation (send) has already been done.

Check timeout and semaphore arguments just on the beginning of
function. Return -EINVAL early, before sending any data or taking any
locks.

Clear out 'sem' variable when there is no need to wait. Use this
variable later on as an indication to actually wait on semaphore or not.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-01 11:15:19 -05:00
..
CMakeLists.txt drivers: modem: add Sierra Wireless HL7800 Modem Driver 2020-08-31 10:46:33 +02:00
gsm_ppp.c drivers: modem: gsm_ppp: constify modem_cmd and setup_cmd structures 2020-11-24 12:59:50 +02:00
hl7800.c drivers: modem: hl7800: don't cleaup net_context members 2020-12-01 11:13:48 -05:00
Kconfig drivers: modem: add Sierra Wireless HL7800 Modem Driver 2020-08-31 10:46:33 +02:00
Kconfig.gsm net: ppp: Convert PPP driver to use normal UART APIs 2020-04-17 10:15:54 +03:00
Kconfig.hl7800 drivers: modem: hl7800: Make RX net_bufs configurable 2020-10-30 10:09:48 +02:00
Kconfig.ublox-sara-r4 drivers: modem: ublox-sara-r4: automatic setting of APN 2020-05-07 23:36:10 -05:00
Kconfig.wncm14a2a kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
modem_cmd_handler.c drivers: modem: verify send semaphore before taking any action 2020-12-01 11:15:19 -05:00
modem_cmd_handler.h drivers: modem: constify modem_cmd and setup_cmd structures 2020-11-24 12:59:50 +02:00
modem_context.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
modem_context.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
modem_iface_uart.c net: ppp: Avoid wrapping each byte in muxing headers 2020-10-19 18:29:02 +02:00
modem_iface_uart.h modem: iface_uart: improve RX flow with HW flow control 2020-10-05 17:04:52 +03:00
modem_pin.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
modem_receiver.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
modem_receiver.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
modem_shell.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
modem_socket.c drivers: modem: use zsock_ variants of socket API 2020-06-10 09:27:51 +03:00
modem_socket.h drivers: modem: use zsock_ variants of socket API 2020-06-10 09:27:51 +03:00
ublox-sara-r4.c drivers: modem: ublox-sara-r4: constify modem_cmd and setup_cmd structures 2020-11-24 12:59:50 +02:00
wncm14a2a.c drivers: modem: wncm14a2a: don't cleaup net_context members 2020-12-01 11:13:48 -05:00