Skip to content

Commit

Permalink
Merge branch 'force-gsm' into 'master'
Browse files Browse the repository at this point in the history
Add ForceGsmForNonDataSlots configuration option

See merge request mer-core/ofono!239
  • Loading branch information
monich committed Oct 10, 2019
2 parents 4458fbf + ae29a08 commit 53233b4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ofono/drivers/ril/ril_data.c
Expand Up @@ -2,6 +2,7 @@
* oFono - Open Source Telephony - RIL-based devices
*
* Copyright (C) 2016-2019 Jolla Ltd.
* Copyright (C) 2019 Open Mobile Platform LLC.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -1646,7 +1647,8 @@ static void ril_data_manager_check_network_mode(struct ril_data_manager *self)
{
GSList *l;

if (ril_data_manager_handover(self)) {
if ((self->flags & RIL_DATA_MANAGER_FORCE_GSM_ON_OTHER_SLOTS) &&
ril_data_manager_handover(self)) {
struct ril_network *lte_network = NULL;
int non_gsm_count = 0;

Expand Down
4 changes: 3 additions & 1 deletion ofono/drivers/ril/ril_data.h
Expand Up @@ -2,6 +2,7 @@
* oFono - Open Source Telephony - RIL-based devices
*
* Copyright (C) 2016-2019 Jolla Ltd.
* Copyright (C) 2019 Open Mobile Platform LLC.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -54,7 +55,8 @@ struct ril_data {
};

enum ril_data_manager_flags {
RIL_DATA_MANAGER_3GLTE_HANDOVER = 0x01
RIL_DATA_MANAGER_3GLTE_HANDOVER = 0x01,
RIL_DATA_MANAGER_FORCE_GSM_ON_OTHER_SLOTS = 0x02
};

enum ril_data_allow_data_opt {
Expand Down
11 changes: 10 additions & 1 deletion ofono/drivers/ril/ril_plugin.c
Expand Up @@ -2,6 +2,7 @@
* oFono - Open Source Telephony - RIL-based devices
*
* Copyright (C) 2015-2019 Jolla Ltd.
* Copyright (C) 2019 Open Mobile Platform LLC.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -76,7 +77,8 @@
#define RILMODEM_DEFAULT_TIMEOUT 0 /* No timeout */
#define RILMODEM_DEFAULT_SIM_FLAGS RIL_SIM_CARD_V9_UICC_SUBSCRIPTION_WORKAROUND
#define RILMODEM_DEFAULT_DATA_OPT RIL_ALLOW_DATA_AUTO
#define RILMODEM_DEFAULT_DM_FLAGS RIL_DATA_MANAGER_3GLTE_HANDOVER
#define RILMODEM_DEFAULT_DM_FLAGS (RIL_DATA_MANAGER_3GLTE_HANDOVER | \
RIL_DATA_MANAGER_FORCE_GSM_ON_OTHER_SLOTS)
#define RILMODEM_DEFAULT_START_TIMEOUT 20000 /* ms */
#define RILMODEM_DEFAULT_DATA_CALL_FORMAT RIL_DATA_CALL_FORMAT_AUTO
#define RILMODEM_DEFAULT_DATA_CALL_RETRY_LIMIT 4
Expand Down Expand Up @@ -106,6 +108,7 @@
#define RILCONF_SETTINGS_EMPTY "EmptyConfig"
#define RILCONF_SETTINGS_IDENTITY "Identity"
#define RILCONF_SETTINGS_3GHANDOVER "3GLTEHandover"
#define RILCONF_SETTINGS_GSM_NON_DATA_SLOTS "ForceGsmForNonDataSlots"
#define RILCONF_SETTINGS_SET_RADIO_CAP "SetRadioCapability"

#define RILCONF_MODEM_PREFIX "ril_"
Expand Down Expand Up @@ -1817,6 +1820,12 @@ static GSList *ril_plugin_parse_config_file(GKeyFile *file,
RIL_DATA_MANAGER_3GLTE_HANDOVER,
&ps->dm_flags);

/* ForceGsmForNonDataSlots */
ril_config_get_flag(file, group,
RILCONF_SETTINGS_GSM_NON_DATA_SLOTS,
RIL_DATA_MANAGER_FORCE_GSM_ON_OTHER_SLOTS,
&ps->dm_flags);

/* SetRadioCapability */
if (ril_config_get_enum(file, group,
RILCONF_SETTINGS_SET_RADIO_CAP, &ival,
Expand Down
7 changes: 7 additions & 0 deletions ofono/drivers/ril/ril_subscription.conf
Expand Up @@ -42,6 +42,13 @@
#
#3GLTEHandover=true

# If this option is on, preferred technology is set to GSM for non-data
# slots.
#
# Default true (for historical reasons)
#
#ForceGsmForNonDataSlots=true

# RIL_REQUEST_SET_RADIO_CAPABILITY may or may not be supported by your RIL.
# This option allows you to forcibly enable or disable use of this request.
# It's involved in 3G/LTE handover between the modems, meaning that it only
Expand Down

0 comments on commit 53233b4

Please sign in to comment.