diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-02-15 00:43:15 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-02-15 00:43:15 +0100 |
commit | b2f9771b8559c9cb877d1f44189b390b9704bc1e (patch) | |
tree | 87c65f3507fffb261417a715fab9a9e50013c24d /src/mm-modem-helpers-mbim.c | |
parent | 3a32409000ad584ec67b0ddd43b312a37ea5a369 (diff) |
broadband-modem-mbim: detect 5G support in custom data class
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/301
Diffstat (limited to 'src/mm-modem-helpers-mbim.c')
-rw-r--r-- | src/mm-modem-helpers-mbim.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mm-modem-helpers-mbim.c b/src/mm-modem-helpers-mbim.c index 0d5ff5f9..8dfc2420 100644 --- a/src/mm-modem-helpers-mbim.c +++ b/src/mm-modem-helpers-mbim.c @@ -22,8 +22,9 @@ /*****************************************************************************/ MMModemCapability -mm_modem_capability_from_mbim_device_caps (MbimCellularClass caps_cellular_class, - MbimDataClass caps_data_class) +mm_modem_capability_from_mbim_device_caps (MbimCellularClass caps_cellular_class, + MbimDataClass caps_data_class, + const gchar *caps_custom_data_class) { MMModemCapability mask = 0; @@ -38,6 +39,12 @@ mm_modem_capability_from_mbim_device_caps (MbimCellularClass caps_cellular_class if (caps_data_class & MBIM_DATA_CLASS_LTE) mask |= MM_MODEM_CAPABILITY_LTE; + if ((caps_data_class & MBIM_DATA_CLASS_CUSTOM) && caps_custom_data_class) { + /* e.g. Gosuncn GM800 reports MBIM custom data class "5G/TDS" */ + if (strstr (caps_custom_data_class, "5G")) + mask |= MM_MODEM_CAPABILITY_5GNR; + } + return mask; } |