Commit Graph

12 Commits

Author SHA1 Message Date
Richard Röjfors 66cd5df5d7 huawei: Fix implicit enum conversion
GCC 10 warns about this implicit conversion:

drivers/huaweimodem/radio-settings.c: In function ‘band_gsm_from_huawei’:
drivers/huaweimodem/radio-settings.c:107:10: error: implicit conversion from ‘enum ofono_radio_band_umts’ to ‘enum ofono_radio_band_gsm’ [-Werror=enum-conversion]
  107 |   return OFONO_RADIO_BAND_UMTS_ANY;

Member from the incorrect enum was returned, both had the value 0, so
the code would still work.
2020-12-22 09:43:36 -06:00
Jimmy Gysens b513bf8d33 huawei: fix AT^SYSCFGEX acqorder "0201"
Commit 6c574ee24a ("huawei: the AT^SYSCFGEX
command supports additional modes") has a mistake for acqorder "0201". It
should be UMTS and GSM preferred.
2020-06-26 10:30:10 -05:00
Jimmy Gysens 6c574ee24a huawei: the AT^SYSCFGEX command supports additional modes
- LTE and UMTS preferred (acqorder = 0302);
AT^SYSCFGEX="0302",40000000,2,4,40000000

- UMTS and GSM preferred (acqorder = 0201);
AT^SYSCFGEX="0201",40000000,2,4,40000000

For AT^SYSCFG, the modes are not available.
2020-06-25 11:33:58 -05:00
Christophe Ronco 6cc1851b18 huawei: use AT^SYSCFG for radio setting operations on 3G only modems
AT^SYSCFGEX must be used on LTE Huawei modems to enable LTE support.
But some modems (or firmwares?) do not support this command and AT^SYSCFG
must be used to get/set radio settings.
This has been introduced in commit:
22adf6402c

There is a bug in this commit and AT^SYSCFGEX commands are used even on
modems not supporting it.
2020-06-11 09:30:04 -05:00
Jonas Bonn 3beeff758d treewide: Remove superfluous use of _GNU_SOURCE
There are a large number of files in the tree that define _GNU_SOURCE
despite not actually using features hidden behind this flag.  This patch
removes all these definitions in one fell swoop...
2018-10-17 10:01:57 -05:00
Jonas Bonn 67701b1c40 drivers: constify vtables
The driver vtables are read-only structures.  This patch declares them as
'const' allowing the compiler to (optionally) put them in the RELRO
section.  RELRO pages may be marked as read-only by the linker after
the relocations have been done ensuring that they aren't inadvertently
or maliciously altered at runtime.
2018-10-17 09:56:27 -05:00
Christophe Ronco 22adf6402c huawei: add LTE support
Huawei LTE modems use AT^SYSCFGEX and AT^SYSINFOEX instead of
AT^SYSCFG and AT^SYSINFO.
If we want to be able to attach on LTE with this modem, we must use
AT^SYSCFGEX to configure rat mode and band. Using AT^SYSCFG, mode any
means UMTS or GSM.
2017-09-14 20:05:54 -05:00
Marcel Holtmann 4e77afffb3 drivers: Update copyright information 2011-10-10 13:39:48 -07:00
Jeevaka Badrappan 6e2b614e64 huaweimodem: M15 coding style fix 2011-01-12 08:06:58 -08:00
Denis Kenzior 378135621a huawei: Minor style fixes 2010-12-23 18:47:47 -06:00
Lucas De Marchi 90d9bd3f2b huaweimodem: add frequency band selection support 2010-12-23 18:44:39 -06:00
Lucas De Marchi 32f250470a huaweimodem: Add support for radio settings 2010-12-21 16:02:52 -06:00