aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-modem.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/mmcli-modem.c')
-rw-r--r--cli/mmcli-modem.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c
index 188fab8a..7ab46244 100644
--- a/cli/mmcli-modem.c
+++ b/cli/mmcli-modem.c
@@ -235,7 +235,9 @@ print_modem_info (void)
{
gchar *drivers_string;
gchar *prefixed_revision;
- gchar *modem_capabilities_string;
+ gchar *supported_capabilities_string;
+ MMModemCapability *capabilities = NULL;
+ guint n_capabilities = 0;
gchar *current_capabilities_string;
gchar *access_technologies_string;
MMModemModeCombination *modes = NULL;
@@ -264,8 +266,9 @@ print_modem_info (void)
#define VALIDATE_PATH(str) ((str && !g_str_equal (str, "/")) ? str : "none")
/* Strings in heap */
- modem_capabilities_string = mm_modem_capability_build_string_from_mask (
- mm_modem_get_modem_capabilities (ctx->modem));
+ mm_modem_get_supported_capabilities (ctx->modem, &capabilities, &n_capabilities);
+ supported_capabilities_string = mm_common_build_capabilities_string (capabilities, n_capabilities);
+ g_free (capabilities);
current_capabilities_string = mm_modem_capability_build_string_from_mask (
mm_modem_get_current_capabilities (ctx->modem));
access_technologies_string = mm_modem_access_technology_build_string_from_mask (
@@ -324,6 +327,15 @@ print_modem_info (void)
supported_modes_string = prefixed;
}
+ if (supported_capabilities_string) {
+ gchar *prefixed;
+
+ prefixed = mmcli_prefix_newlines (" | ",
+ supported_capabilities_string);
+ g_free (supported_capabilities_string);
+ supported_capabilities_string = prefixed;
+ }
+
/* Get signal quality info */
signal_quality = mm_modem_get_signal_quality (ctx->modem, &signal_quality_recent);
@@ -338,13 +350,13 @@ print_modem_info (void)
" Hardware | manufacturer: '%s'\n"
" | model: '%s'\n"
" | revision: '%s'\n"
- " | capabilities: '%s'\n"
+ " | supported: '%s'\n"
" | current: '%s'\n"
" | equipment id: '%s'\n",
VALIDATE_UNKNOWN (mm_modem_get_manufacturer (ctx->modem)),
VALIDATE_UNKNOWN (mm_modem_get_model (ctx->modem)),
VALIDATE_UNKNOWN (prefixed_revision),
- VALIDATE_UNKNOWN (modem_capabilities_string),
+ VALIDATE_UNKNOWN (supported_capabilities_string),
VALIDATE_UNKNOWN (current_capabilities_string),
VALIDATE_UNKNOWN (mm_modem_get_equipment_identifier (ctx->modem)));
@@ -475,7 +487,7 @@ print_modem_info (void)
g_free (current_bands_string);
g_free (supported_bands_string);
g_free (access_technologies_string);
- g_free (modem_capabilities_string);
+ g_free (supported_capabilities_string);
g_free (current_capabilities_string);
g_free (prefixed_revision);
g_free (allowed_modes_string);