Re: [MM] [PATCH] sierra: add support for new !SELRAT values in newer Sierra LTE modems
- From: Marius Kotsbak <marius kotsbak gmail com>
- To: Dan Williams <dcbw redhat com>
- Cc: "networkmanager-list gnome org" <networkmanager-list gnome org>
- Subject: Re: [MM] [PATCH] sierra: add support for new !SELRAT values in newer Sierra LTE modems
- Date: Mon, 10 Sep 2012 23:39:32 +0200
On 10. sep. 2012 18:54, Dan Williams wrote:
On Sat, 2012-09-08 at 00:49 +0200, Marius Kotsbak wrote:
2012/9/7 Dan Williams<dcbw redhat com>
On Mon, 2012-09-03 at 18:24 +0200, Marius Kotsbak wrote:
> Patch attached again in right format.
Backported and pushed to 0.6.
Great! Now it seems we just need to add support for 4G preference in
nm-applet to actually use this?
Yes.
It seemed to actually work with this and the patches I sent for NM and
nm-applet. There are probably other modem plugins that needs to be
updated as well.
The backport is though slightly wrong:
case MM_MODEM_GSM_ALLOWED_MODE_2G_PREFERRED:
idx = 4;
break;
case MM_MODEM_GSM_ALLOWED_MODE_3G_PREFERRED:
idx = 3;
break;
Modes 3 and 4 will include LTE, so it is probably better to use mode 5
for both of these (and maybe refuse 2G preferred) for LTE modem, else
it is impossible to select 2G/3G mode (exclude LTE).
Any chance you could do a quick patch for that?
Attached.
--
Marius
>From 6dac4c370b2cd5b742b9e1d7e738435be721c333 Mon Sep 17 00:00:00 2001
From: "Marius B. Kotsbak" <marius kotsbak com>
Date: Mon, 10 Sep 2012 22:51:40 +0200
Subject: [PATCH 2/2] sierra: fix 2G/3G preferred modes for LTE modems
3G preferred not supported, but use 2G/3G (exclude LTE) mode instead.
2G preferred not supported, so use 2G mode instead.
---
plugins/mm-modem-sierra-gsm.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/plugins/mm-modem-sierra-gsm.c b/plugins/mm-modem-sierra-gsm.c
index 23ed029..7a241b3 100644
--- a/plugins/mm-modem-sierra-gsm.c
+++ b/plugins/mm-modem-sierra-gsm.c
@@ -230,8 +230,11 @@ set_allowed_mode (MMGenericGsm *gsm,
MMAtSerialPort *primary;
char *command;
int idx = 0;
+ MMModemSierraGsmPrivate *priv;
- if (MM_MODEM_SIERRA_GSM_GET_PRIVATE (self)->is_icera) {
+ priv = MM_MODEM_SIERRA_GSM_GET_PRIVATE (self);
+
+ if (priv->is_icera) {
mm_modem_icera_set_allowed_mode (MM_MODEM_ICERA (self), mode, callback, user_data);
return;
}
@@ -247,7 +250,7 @@ set_allowed_mode (MMGenericGsm *gsm,
return;
}
- if ( MM_MODEM_SIERRA_GSM_GET_PRIVATE (self)->has_lte == FALSE
+ if ( priv->has_lte == FALSE
&& ( mode == MM_MODEM_GSM_ALLOWED_MODE_4G_ONLY
|| mode == MM_MODEM_GSM_ALLOWED_MODE_4G_PREFERRED)) {
g_set_error_literal (&info->error, MM_MODEM_ERROR, MM_MODEM_ERROR_OPERATION_NOT_SUPPORTED,
@@ -267,10 +270,16 @@ set_allowed_mode (MMGenericGsm *gsm,
idx = 6;
break;
case MM_MODEM_GSM_ALLOWED_MODE_2G_PREFERRED:
- idx = 4;
+ if (priv->has_lte)
+ idx = 2; /* 2G preferred not supported, use 2G mode instead */
+ else
+ idx = 4;
break;
case MM_MODEM_GSM_ALLOWED_MODE_3G_PREFERRED:
- idx = 3;
+ if (priv->has_lte)
+ idx = 5; /* 3G preferred not supported, use 2G/3G mode instead */
+ else
+ idx = 3;
break;
case MM_MODEM_GSM_ALLOWED_MODE_4G_PREFERRED:
idx = 7;
--
1.7.9.5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]