connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Set regdom to follow timezone setting as optional feature
@ 2022-04-05 14:31 Jussi Laakkonen
  2022-04-05 14:31 ` [PATCH 1/4] main: Add path to localtime to config options Jussi Laakkonen
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jussi Laakkonen @ 2022-04-05 14:31 UTC (permalink / raw)
  To: connman

This patchset adds an optional feature to make regdom follow the timezone set
on the system. This feature is useful on systems where no cellular is available
or there is no SIM present, as the regdom on WLAN would stay on default (US)
and some channels would be unreachable. Enabling the "RegdomFollowsTimezone"
config option makes Ofono plugin not to change regdom when the cellular network
has indicated a change on country. By following the timezone, which can be
also updated by the cellular stack if set to automatic configuration (might
need a external service to do this), would then eventually propagate to ConnMan.

In order to fully faciliate this on different configurations also the watching
of the localtime is improved. This is done by allowing to configure it as on
some systems there may be an external service controlling localtime setting,
e.g, by defining /etc/localtime a permanent symlink to the service's own
changeable symlink. Furthermore, inotify then needed to react also to IN_CREATE
event in timezone.c in order to detect changes on symlink.

Regdom is read from /usr/share/zoneinfo/zone1970.tab and the first ISO3166
country code set for the current timezone is used. This is done both on startup
and when the content/link of the localtime set has changed.

Jussi Laakkonen (4):
  main: Add path to localtime to config options.
  main: Add RegdomFollowsTimezone option for regdom changes
  timezone: Change regdom along timezone, use localtime config
  ofono: Do not change regdom when it follows timezone

 doc/connman.conf.5.in |   9 ++++
 plugins/ofono.c       |   5 +++
 src/main.c            |  32 ++++++++++++++
 src/timezone.c        | 100 +++++++++++++++++++++++++++++++++++++++---
 4 files changed, 141 insertions(+), 5 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-08  7:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 14:31 [PATCH 0/4] Set regdom to follow timezone setting as optional feature Jussi Laakkonen
2022-04-05 14:31 ` [PATCH 1/4] main: Add path to localtime to config options Jussi Laakkonen
2022-04-05 14:31 ` [PATCH 2/4] main: Add RegdomFollowsTimezone option for regdom changes Jussi Laakkonen
2022-04-05 14:31 ` [PATCH 3/4] timezone: Change regdom along timezone, use localtime config Jussi Laakkonen
2022-04-07  9:27   ` [PATCH v2 " Jussi Laakkonen
2022-04-05 14:31 ` [PATCH 4/4] ofono: Do not change regdom when it follows timezone Jussi Laakkonen
2022-04-08  7:20 ` [PATCH 0/4] Set regdom to follow timezone setting as optional feature Daniel Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).