Commit graph

19 commits

Author SHA1 Message Date
Guðni Már Gilbert 6145ab537f drivers: modem: fix coverity issue
Added (void) cast to supress coverity report. The usage of K_FOREVER
tells me we're not interested in the returned value.

Coverity-CID: 219653
Fixes #33034

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2021-03-11 10:08:19 -05:00
Marcin Niestroj a2d940ab80 drivers: modem: hl7800: Convert driver to new DT device macros
Convert hl7800 driver:

    NET_DEVICE_OFFLOAD_INIT -> NET_DEVICE_DT_INST_OFFLOAD_DEFINE

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-02-15 08:31:52 -05:00
Ryan Erickson f1f309d56b drivers: modem: hl7800: fix buffer null termination
Fix possibility of no_id_resp_cmd buffer missing a
null terminator.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2021-01-27 08:03:45 -05:00
Ryan Erickson a7b61fa2a8 drivers: modem: hl7800: fix possible null reference
Ensure sock is not referenced if it is null.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2021-01-27 08:03:24 -05:00
Anas Nashif dd931f93a2 power: standarize PM Kconfigs and cleanup
- Remove SYS_ prefix
- shorten POWER_MANAGEMENT to just PM
- DEVICE_POWER_MANAGEMENT -> PM_DEVICE

and use PM_ as the prefix for all PM related Kconfigs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-09 15:18:29 -05:00
Marcin Niestroj 5e3d542862 drivers: modem: hl7800: don't cleaup net_context members
There is no reason to clenaup members of net_context structure, as those
should be (and are) managed by net_context_put() implementation.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-01 11:13:48 -05:00
Ryan Erickson d3dcf49735 drivers: modem: hl7800: Make RX net_bufs configurable
Make receive network buffer count and size
configurable via kconfig.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-10-30 10:09:48 +02:00
Ryan Erickson 0e86699223 drivers: modem: hl7800: only set DNS addr if not set
Only set the DNS resolver server address if one has not been specified.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-10-19 15:22:33 +03:00
Ryan Erickson e36fc53fa6 drivers: modem: hl7800: fix file open in fw update
File open function for firmware update
requires a flags parameter to be passed in.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-10-15 08:46:41 -05:00
Ryan Erickson 72d54055a3 drivers: modem: hl7800: UDP socket not closed
Ensure UDP socket is always closed when offload_put is called.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-10-14 12:30:45 +03:00
Ryan Erickson 2d7ccb59a9 drivers: modem: hl7800: Fix cases where socket would not close
There are cases where the socket would not be closed.
offload_put function will now always close the socket
properly.

Remove error log messages as they are redundant.
on_cmd_sock_error_code handles printing errors.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-10-05 15:41:03 -05:00
Ryan Erickson 5ac21bd604 drivers: modem: hl7800: fix dts binding
Fix hl7800 vendor prefix to match existing Sierra Wireless entry.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson 7b5714669c drivers: modem: hl7800: add IPv6 support
Add support for dual mode IPv4/IPv6 stack.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson ad04354110 drivers: modem: hl7800: remove VLA
Remove variable length array from function to comply with MISRA checks.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson c74166ed5e drivers: modem: hl7800: modem receiver IMEI
Modem receiver IMEI data field is only available
when CONFIG_MODEM_SIM_NUMBERS.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson 2e7b263013 drivers: modem: hl7800: struct device data renamed
change struct device->driver_data to new name of struct device->data.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson 61ce2dc681 drivers: modem: hl7800: RTC only available with newlibc
RTC API is only available if NEWLIB_LIBC is available.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.

A coccinelle rule is used for this:

@r_const_dev_1
  disable optional_qualifier
@
@@
-struct device *
+const struct device *

@r_const_dev_2
 disable optional_qualifier
@
@@
-struct device * const
+const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Ryan Erickson eca8842b67 drivers: modem: add Sierra Wireless HL7800 Modem Driver
The driver utilizes the CONFIG_NET_OFFLOAD setting to avoid the
normal handling of IP packets, and instead uses a socket-like
UART interface to handle incoming and outgoing data via AT commands.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-08-31 10:46:33 +02:00