Commit Graph

12 Commits

Author SHA1 Message Date
James Prestwood 28f484ddb8 network: knownnetworks: introduce network_info_ops
The known network APIs all revolved around the ssid/security matching
to do any operations on the provisioning file. In the near future
hotspot provisioning files (managed by hotspot.c) will be incorporated
into the known network list. Since these hotspot files do not use the
ssid as the file name hotspot.c will need other ways of matching.

This patch adds network_info_ops to the network object. This ops
structure will hold function pointers which operate on network_info
rather than ssid/security. This will allow hotspot and known networks
to both register their own operation routines.

For now open, touch, sync, remove, free, and get_path were added.

Wrappers were added for accessing these operations outside of
knownnetworks.c.
2019-08-16 11:03:06 -05:00
James Prestwood 5caf8796cd knownnetworks: move network_info into knownnetworks 2019-08-16 10:58:25 -05:00
James Prestwood e3e641dff9 knownnetworks: add watch API's
Modules can watch for known network addition and removal.
2019-08-09 14:56:49 -05:00
Denis Kenzior 227bcce40b network: Move known_frequency queue management
Isolate the known_frequency queue management to a function and place
that function in knownnetworks.c where it now belongs.  Since we no
longer have network_info objects for unknown networks, only frequencies
for known networks are tracked
2019-08-09 14:56:49 -05:00
Denis Kenzior 72a8f2888a network: Move network offset calculation
network_find_rank_index was used to find the offset of the selected
network_info among known networks so as to compute a modifier based on
the rankmod table.  Instead of using known_networks_foreach for this,
moove it to knownnetworks.c where it can be coded and optimized
separately.

For now provide a simple for loop implementation.
2019-08-09 01:11:49 -05:00
Tim Kourt 5c9138ed7d knownnetworks: Add lookup API for recent frequencies
The returned scan_freq_set contains the known frequencies from
the top most recently connected networks.
2019-04-16 18:14:35 -05:00
Tim Kourt c3e79a4f2a network: Introduce a concept of known frequencies
Each known network (previously connected) will have a set
of known frequencies associated with it, e.g. a set of
frequencies from all BSSs observed. The list of known
frequencies is sorted with the most recently observed
frequency in the head.
2019-04-15 12:29:48 -05:00
Denis Kenzior 1c27aa5f1d knownnetworks: move known_networks_init/exit to iwd.h 2018-08-14 13:36:48 -05:00
Denis Kenzior e6b3691c9e knownnetworks: Expose known_network_get_path
So that it can be used to implement Network.KnownNetwork property
2018-08-14 13:35:23 -05:00
Andrew Zaborowski ca270e9de2 network: Drop actions to be handled by filesystem watch 2018-08-09 10:27:28 -05:00
Andrew Zaborowski 97913c6f9a network: Refactor and move Known Networks management
Until now network.c managed the list of network_info structs including
for known networks and networks that are seen in at least one device's
scan results, with the is_known flag to distinguish known networks.
Each time the list was processed though the code was either interested
in one subset of networks or the other.  Split the list into a Known
Networks list and the list of other networks seen in scans.  Move all
code related to Known Networks to knownnetworks.c, this simplifies
network.h.  It also gets rid of network_info_get_known which actually
returned the list of all network_infos (not just for known networks),
which logically should have been private to network.c.  Update device.c
and scan.c to use functions specific to Known Networks instead of
filtering the lists by the is_known flag.

This will also allow knownnetworks.c to export DBus objects and/or
properties for the Known Networks information because it now knows when
Known Networks are added, removed or modified by IWD.
2018-07-25 09:40:14 -05:00
Andrew Zaborowski c3f863f2da knownnetworks: Implement KnownNetworks interface
knownnetworks.c/.h implements the KnownNetworks interface and loads the
known networks from storage on startup.  The list of all the networks
including information on whether a network is known is managed in
network.c to avoid having two separate lists of network_info structures
and keeping them in sync.  That turns out to be difficult because the
network.c list is sorted by connected_time and connected_time changes
can be triggered in both network.c or knownnetworks.c.  Both can also
trigger a network_info to be removed completely.
2016-06-21 11:41:37 -05:00