Commit graph

11 commits

Author SHA1 Message Date
Pablo Correa Gómez
5d10656689 wwan: wait for apn_list to exist to add SIM providers
This avoids the situation where a duplicate entry is created if
Settings is started with the wwan panel disabled, a previous connection
exists, and the panel is later enabled.

Fixes #1468
2022-11-08 16:12:22 +00:00
Mohammed Sadiq
d45bda09d2 wwan: Update operator code when 3gpp operator code changes
And update APN list if they are not populated yet

Fixes #1468
2022-11-08 16:12:22 +00:00
Mohammed Sadiq
3cdc27dcc7 wwan: Set apn access method before adding to list
So that accessing APN details returns the right values when
they are inquired immediately after they are added to the list.
2022-11-08 16:12:22 +00:00
Mohammed Sadiq
55fda5b569 wwan: Update apn list only if device is available
Otherwise APN list from mobile-provider-info may not be
properly loaded
2022-11-08 16:12:22 +00:00
Mohammed Sadiq
05371feaf3 wwan: Track apn list updates 2022-11-08 16:12:22 +00:00
Lubomir Rintel
dad011062b wwan: do not insist SIM ID being present
It is perfectly possible for mm_sim_dup_identifier() to return NULL if
the SIM ID wasn't provided by the modem for any reason, leading to an
assertion failure:

  (gnome-control-center:910641): cc-wwan-data-CRITICAL **: 12:43:51.573:
    cc_wwan_data_set_default_apn: assertion 'self->sim_id != NULL' failed

Handle the NULL SIM ID gracefully.
2022-06-20 23:48:31 +00:00
Robert Ancell
a793e49acd wwan: Replace deprecated nm_device_disconnect 2022-06-20 02:29:39 +00:00
Mohammed Sadiq
8dc39c8831 wwan: Remove a never reached code
Since we return early, the code followed is never run.
Also, the password for GSM APNs are not actually sensitive
secrets.  So Remove the lines that are never reached.
2022-02-15 16:34:30 +00:00
Pablo Correa Gómez
c5ca6717e5 wwan: Make sure secrets are set when querying connection APN password
Otherwise the comparison in wwan_data_apn_are_same will always be False
due to nm_setting_gsm_get_password always returning NULL.

Helps #1468
Relates !1059
2022-02-15 13:46:48 +00:00
Kyle Rankin
585fe8c94a Lower WWAN DNS Priority
The current DNS priority settings for WWAN were set far too low. Most
connections (including WiFi) do not set DNS priority (set to 0) and per
https://developer.gnome.org/NetworkManager/stable/nm-settings.html :

"A lower value is better (higher priority). Zero selects a globally
configured default value. If the latter is missing or zero too, it
defaults to 50 for VPNs and 100 for other connections."

By setting both the "low" and "high" settings to 15 and 20 respectively,
the WWAN DNS servers were always appearing above WiFi, even though WiFi
had routing priority. This caused latency and other problems when the
wwan connection was slow because the system would query those DNS
servers before WiFi ones. Beyond that, it would even cause WWAN to
override VPN DNS settings which isn't what we want.

This change puts the "low priority" setting above the default 100 that
connections get when they don't otherwise set a priority, and the "high
priority" slightly below 100. I did this instead of setting the values
to 0 because I noticed that NM doesn't seem to be aware it should
prioritize WiFi in that case so WWAN DNS servers were still sometimes
taking precedence.
2021-08-13 19:25:41 +00:00
Mohammed Sadiq
dc840f0aec wwan: Add new panel for modem management
The panel supports 2G/3G/4G GSM/LTE modems. CDMA2000 Modems are not supported.
If a supported modem is present, the panel will be shown and the modem will be
handled, else, network-panel shall manage the modem as it did in the past.

If more than one modem with data enabled is present, the user is allowed to set
priority of one SIM over the other (the priority is for SIM, not modem).

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/132
2021-08-13 19:25:41 +00:00