Age | Commit message (Collapse) | Author | Files | Lines |
|
We save offline mode status in init so that settings
file gets created if it was missing.
|
|
So we save the technology status if the settings file does not
contain it.
|
|
By defalt offline mode is OFF if settings file
is not found or OfflineMode entry is not found
in settings file.
|
|
Ethernet is enabled by default if settings file is not found
or the Wired entry is not found in the file.
|
|
|
|
|
|
connman_technology_add_device() calls __connman_device_enable()
but since the device is already enabled, the calls does not propagate
through to __connman_technology_enabled via connman_device_set_powered.
|
|
__sync_fetch_and_sub() gives the value that had previously been in memory
which gives the older refount.
technology_find() does not refcount the technology.
__connman_technology_update_rfkill() was using technology_get() which
was refcounting the technology. Every technology_get() must be matched
with a corresponding technology_put() for accurate refcounting.
|
|
When Technology Scan D-Bus method call is called, add caller to a scan
list and start a scan for the service type. When a device reports scan
completed, check whether it was the last device scanning and reply to
the callers accordingly.
Also check for scanning status when removing devices and technology
objects.
|
|
technology_add_device and technology_add_rfkill should increment
technology refcount. The refcount denotes the total number of devices
and rfkill switches in the technology. Similarly technology_remove_device
and technology_remove_rfkill should decrement technology refcount.
Once the refcount is 0, which means that there are no devices and rfkill
switches in this technology, technology should be freed.
|
|
If we get a rfkill switch before the technology driver was registered we
would lose track of it as we currently ignoed it. Adding a global rfkill
hash table which can keep a track of technologyless switches untill the
driver for them is loaded. If the driver is not compiled in the switches
will remain in the hash but will not be handled by connman.
|
|
If we get a device before the technology driver was registered we
would lose track of it as we ignoed it. Adding a device list which
can keep a track of technologyless devices untill the driver for
them is loaded. If the driver is not compiled in the devices will
remain in the list.
|
|
|
|
Set Technology property 'Connected' to true if at least one service
for the Technology is connected; false otherwise.
|
|
As it is described in the manager-api.txt document.
|
|
Fixes BMC#24636
|
|
|
|
Remove __connman_technology_enable/disable functions but reuse
their contents for 'Powered' property implementation. As a result
move code around as the new functions are now static.
|
|
Connman should not handle technologies whose drivers are not compiled in.
This patch also avoids connman controlling the rfkill switches for
technologies not compiled in.
Fixes BMC#24549.
|
|
No need to assign driver to technolog during driver registration.
|
|
Open argument list has to be terminated.
|
|
|
|
|
|
Remove 'Technologies' property from Manager API and the
code updating the property.
|
|
|
|
|
|
|
|
The message would be NULL when setting offline mode on and off.
Fixes BMC#24314
|
|
For ethernet device, there is no need to save a pending reply as
the technology enablement is synchronous.
Fixes BMC#24249
|
|
g_atomic_int_exchange_and_add() has been removed from glib 2.30
and g_atomic_int_add() should be used. Though there are still
quite a few distros out which do not ship a glib version with
g_atomic_int_add().
Instead of maintaing a compatiblilty glib layer we just use
the built-in functions for atomic memory access.
|
|
|
|
If a technology was rfkilled before connman ran, we need to register
it. If such tech was enabled, technology->device_list will be empty.
We save the state, rfkill unblock the type and exit. When the devices
get unblocked, they are automatically enabled since we saved the enable
state.
|
|
When notifying that a technology is not tethering anymore, go
through the list of technologies and disable tethering only if
no other technology is tethering.
|
|
|
|
Move bridge checking into set_tethering(), as the bridge
information is not used elsewhere.
|
|
All the global settings would reside in /var/lib/connman/settings.
We also migrate global keys from /var/lib/connman/default.profile
to /var/lib/connman/settings for a smooth transition.
|
|
|
|
Load/Save offlinemode in technology.c instead of profile.c.
|
|
Connman now stores technology states persistently. Hence
there is no reason to store device states persistently.
|
|
|
|
When there are multiple devices, the technology enable notifier
was invoked multiple times. But when disabling the technology, the
disable notifier was invoked just once, hence there was a mismatch
in the technology states.
|
|
The connman technology state machine is simplified.
It now has 3 states:
Offline: Technology is disabled.
Enabled: Technology is enabled.
Connected: Technology is connected.
|
|
Traverse the list of technologies and enable/disable each instead of
traversing the device list.
|
|
Save the technology state persistently. This will help in resuming
the technology state after offlinemode or during startup. This patch
just saves the states.
|
|
There is a device list per technology. Hence removing the global
device hash.
|
|
Remove the global rfkill_table and maintain a per technology
rfkill table.
|
|
Add the pending dbus message per technology. Also move the pending
timeout from manager to technology.
|
|
|
|
connman_technology_enable: Enable a technology. Enables all the
devices in the device_list of the technology.
connman_technology_enabled: Callback for connman_technology_enable.
Changes the state of the technology to ENABLED.
Ditto for connman_technology_disable/connman_technology_disabled.
|
|
|