broadband-modem-qmi: fix disabling of signal strength events
Attempting to disable the signal strength events was failing because
the protocol handler expects a valid set of thresholds also during the
disabling. So, just pass always the thresholds.
ModemManager[274522]: [/dev/cdc-wdm1] sent generic request (translated)...
<<<<<< QMUX:
<<<<<< length = 17
<<<<<< flags = 0x00
<<<<<< service = "nas"
<<<<<< client = 3
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 7
<<<<<< tlv_length = 5
<<<<<< message = "Set Event Report" (0x0002)
<<<<<< TLV:
<<<<<< type = "Signal Strength Indicator" (0x10)
<<<<<< length = 2
<<<<<< value = 00:00
<<<<<< translated = [ report = 'no' thresholds = '{}' ]
ModemManager[274522]: [/dev/cdc-wdm1] received generic response (translated)...
<<<<<< QMUX:
<<<<<< length = 19
<<<<<< flags = 0x80
<<<<<< service = "nas"
<<<<<< client = 3
<<<<<< QMI:
<<<<<< flags = "response"
<<<<<< transaction = 7
<<<<<< tlv_length = 7
<<<<<< message = "Set Event Report" (0x0002)
<<<<<< TLV:
<<<<<< type = "Result" (0x02)
<<<<<< length = 4
<<<<<< value = 01:00:08:00
<<<<<< translated = FAILURE: NoThresholdsProvided
This commit is contained in:
@@ -4805,11 +4805,10 @@ common_enable_disable_unsolicited_events_signal_strength (GTask *task)
|
||||
|
||||
ctx = g_task_get_task_data (task);
|
||||
|
||||
/* Only set thresholds during enable, but always create the array anyway,
|
||||
* as the TLV setter expects it */
|
||||
/* Always set thresholds, both in enable and disable, or otherwise the protocol will
|
||||
* complain with FAILURE: NoThresholdsProvided */
|
||||
thresholds = g_array_sized_new (FALSE, FALSE, sizeof (gint8), G_N_ELEMENTS (thresholds_data));
|
||||
if (ctx->enable)
|
||||
g_array_append_vals (thresholds, thresholds_data, G_N_ELEMENTS (thresholds_data));
|
||||
g_array_append_vals (thresholds, thresholds_data, G_N_ELEMENTS (thresholds_data));
|
||||
|
||||
input = qmi_message_nas_set_event_report_input_new ();
|
||||
qmi_message_nas_set_event_report_input_set_signal_strength_indicator (
|
||||
|
||||
Reference in New Issue
Block a user