qmimodem: use a default RAT when registering

When registering to an operator ofono uses the old RAT.
In the case the modem is not connected to any network, this would use
QMI_NAS_NETWORK_RAT_NONE which results in the error OP_DEVICE_UNSUPPORTED.

Use QMI_NAS_NETWORK_RAT_NO_CHANGE instead to not define any preference.
This commit is contained in:
Alexander Couzens 2017-07-25 15:17:49 +02:00 committed by Denis Kenzior
parent a0a95be334
commit 49a7d0aa1b
2 changed files with 2 additions and 1 deletions

View File

@ -97,6 +97,7 @@ struct qmi_nas_network_rat {
} __attribute__((__packed__)) info[0];
} __attribute__((__packed__));
#define QMI_NAS_NETWORK_RAT_NONE 0x00
#define QMI_NAS_NETWORK_RAT_GSM 0x04
#define QMI_NAS_NETWORK_RAT_UMTS 0x05
#define QMI_NAS_NETWORK_RAT_LTE 0x08

View File

@ -356,7 +356,7 @@ static void qmi_register_manual(struct ofono_netreg *netreg,
info.mcc = atoi(mcc);
info.mnc = atoi(mnc);
info.rat = data->current_rat;
info.rat = QMI_NAS_NETWORK_RAT_NO_CHANGE;
qmi_param_append(param, QMI_NAS_PARAM_REGISTER_MANUAL_INFO,
sizeof(info), &info);