3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-18 09:12:43 +01:00
Commit Graph

7299 Commits

Author SHA1 Message Date
James Prestwood
7ba5b0f924 netdev: store signal threshold in netdev object, not globally
This prepares for the ability to toggle between two signal
thresholds in netdev. Since each netdev may not need/want the
same threshold store it in the netdev object rather than globally.
2024-08-27 21:40:29 -05:00
James Prestwood
54b6330845 netdev: define netdev settings in netdev.h
Following knownnetworks, this moves the settings into a header file
which is easier to maintain/read.
2024-08-27 21:40:05 -05:00
James Prestwood
b5aff74e3b dpp: scale PKEX timeout by the number of frequencies used
If the number of frequencies used is very small reduce the timeout
to avoid waiting for extended periods of time.
2024-08-27 21:25:21 -05:00
James Prestwood
294426b450 dpp: allow PKEX configurators to run without multicast RX support
Since IWD enrollees can send unicast frames, a PKEX configurator could
still run without multicast support. Using this combination basically
allows any driver to utilize DPP/PKEX assuming the MAC address can
be communicated using some out of band mechanism.
2024-08-27 21:25:15 -05:00
James Prestwood
4482b8dc24 dpp: add Address/Frequency as parameters to PKEX enrollees
The DPP spec allows for obtaining frequency and MAC addresses up
to the implementation. IWD already takes advantage of this by
first scanning for nearby APs and using only those frequencies.
For further optimization an enrollee may be able to determine the
configurators frequency and MAC ahead of time which would make
finding the configurator much faster.
2024-08-27 21:24:48 -05:00
James Prestwood
bf2441e311 dpp: factor out key derivation and starting PKEX into functions
This will make things a bit easier in future patches, and reduces
some of the length/complexity of these functions.
2024-08-27 21:24:33 -05:00
James Prestwood
95a9e052de scan: remove legacy "Ghz" band modifier settings 2024-08-27 21:23:46 -05:00
James Prestwood
5c7777ff0f manager: deprecate UseDefaultInterface 2024-08-27 21:22:54 -05:00
James Prestwood
d223f49fbc doc: deprecate UseDefaultInterface in docs 2024-08-27 21:22:49 -05:00
Denis Kenzior
e5c0e18751 monitor: Print rmnet flags 2024-08-23 12:30:57 -05:00
Denis Kenzior
5f74ed75e7 nl80211util: Add builder for CMD_EXTERNAL_AUTH
This is for sending status from the STA to the driver
2024-08-23 11:18:15 -05:00
Denis Kenzior
17fbab110c nl80211util: support attributes in CMD_EXTERNAL_AUTH 2024-08-23 11:18:10 -05:00
Denis Kenzior
02ec70e290 monitor: Don't skip genl control Done,Error messages 2024-08-23 11:17:30 -05:00
Denis Kenzior
5118f08d79 monitor: Don't dump survey results with noscan
Survey is used after each scan, creating quite a bit of spam.  Silence
survey results if noscan is set.
2024-08-23 11:17:26 -05:00
Denis Kenzior
e565b75032 defs: Add defs.h to hold certain global definitions
This will help to get rid of magic number use throughout the project.
The definitions should be limited to global magic numbers that are used
throughout the project, for example SSID length, MAC address length,
etc.
2024-08-23 11:17:20 -05:00
James Prestwood
db9c0480ef station: emit property changed for ConnectedAccessPoint
This was missed in a prior patch set. When station is connecting
or disconnecting ConnectedAccessPoint property change should be
emitted.
2024-08-23 11:09:59 -05:00
Marcel Holtmann
10f5bc9be7 build: Require at least version 0.68 when building with external ELL 2024-08-22 17:13:48 +02:00
James Prestwood
548ef00291 auto-t: Add test for BasicServiceSets 2024-08-19 11:43:30 -05:00
James Prestwood
93806cd522 auto-t: Add ExtendedServiceSet property 2024-08-19 11:43:27 -05:00
James Prestwood
1a3a035404 network: add back network_bss_list_clear
Rename network_bss_update_start back to network_bss_list_clear, since
this is what its now doing again.
2024-08-19 11:43:24 -05:00
James Prestwood
6d94599977 network: remove BasicServiceSet DBus registration code
This was moved into station.
2024-08-19 11:43:24 -05:00
James Prestwood
c639bf0b19 station: move BasicServiceSet DBus management into station
Due to an unnoticed bug after adding the BasicServiceSet object into
network, it became clear that since station already owns the scan_bss
objects it makes sense for it to manage the associated DBus objects
as well. This way network doesn't have to jump through hoops to
determine if the scan_bss object was remove, added, or updated. It
can just manage its list as it did prior.

From the station side this makes things very easy. When scan results
come in we either update or add a new DBus object. And any time a
scan_bss is freed we remove the DBus object.
2024-08-19 11:43:24 -05:00
James Prestwood
514e483bc3 network: add __network_path_append_bss
To reduce code duplication and prepare for moving the BSS interface
to station, add a new API so station can create a BSS path without
a network object directly.
2024-08-19 11:43:24 -05:00
Denis Kenzior
7604762013 eapol: Fix bogus warning
src/eapol.c:1041:9: error: ‘buf’ may be used uninitialized [-Werror=maybe-uninitialized]
 1041 |         l_put_be16(0, &frame->header.packet_len);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This warning is bogus since the buffer is initialized through use of
eapol_frame members.  EAPoL-Start is a very simple frame.
2024-08-19 11:43:24 -05:00
James Prestwood
f81855349a auto-t: add SAE-H2E test for setting the default ECC group 2024-08-12 16:19:16 -05:00
James Prestwood
1455988efb sae: support default group for H2E
This was seemingly trivial at face value but doing so ended up
pointing out a bug with how group_retry is set when forcing
the default group. Since group_retry is initialized to -1 the
increment in the force_default_group block results in it being
set to zero, which is actually group 20, not 19. This did not
matter for hunt and peck, but H2E actually uses the retry value
to index its pre-generated points which then breaks SAE if
forcing the default group with H2E.

To handle H2E and force_default_group, the group selection
logic will always begin iterating the group array regardless of
SAE type.
2024-08-12 13:13:00 -05:00
James Prestwood
d2f14b2951 client: add station command "get-bsses"
This command will get the BasicServiceSet list for a given network.
If no network is supplied, its assumed to be the current network.
2024-08-12 12:10:58 -05:00
James Prestwood
73c79dbd41 client: refactor cmd_connect() and add find_network()
This will do all the lookup/searching needed to find a network
proxy object.
2024-08-12 12:10:58 -05:00
James Prestwood
0d7ff8ebd9 client: add BasicServiceSet interface 2024-08-12 12:10:58 -05:00
James Prestwood
05166d0999 client: Add BasicServiceSets property to network
The property itself is an array of paths, but this is difficult
to fit nicely within a terminal. Instead just display the count
of BSS's. Displaying a detailed list of BSS's will be done via
a separate command.
2024-08-12 12:10:58 -05:00
James Prestwood
0e3322b5da client: add net.connman.iwd.BasicServiceSet definition 2024-08-12 12:10:55 -05:00
James Prestwood
a7d8b9a068 client: separate property header and values into two functions
There are certain cases where we may not want to display the entire
header for a given set of properties. For example displaying a list
of proxy interfaces. Add finer control by separating out the header
and the prop/value display into two functions.
2024-08-12 12:10:50 -05:00
James Prestwood
b31e298df4 doc: document BasicServiceSet API 2024-08-12 12:10:47 -05:00
James Prestwood
a73b877c5b station: add ConnectedAccessPoint property
This property is a path that corresponds to a BasicServiceSet
object, the one the station is currently connected to.
2024-08-12 12:10:44 -05:00
James Prestwood
68e1d055dd network: remove network_bss_list_clear 2024-08-12 12:10:40 -05:00
James Prestwood
aca92df19b network: add ExtendedServiceSet DBus property
This contains a list of all BasicServiceSet objects (paths) that
exist for a network.
2024-08-12 12:10:28 -05:00
James Prestwood
560ad581ad station: use network_bss_{start,stop}_update
This will tell network the BSS list is being updated and it can
act accordingly as far as the BSS DBus registrations/unregistration.

In addition any scan_bss object needing to be freed has to wait
until after network_bss_stop_update() because network has to be able
to iterate its old list and unregister any BSS's that were not seen
in the scan results. This is done by pushing each BSS needing to be
freed into a queue, then destroying them after the BSS's are all
added.
2024-08-12 12:10:10 -05:00
James Prestwood
fe2a91ae11 network: Add BasicServiceSet object
This adds a new DBus object/interface for tracking BSS's for
a given network. Since scanning replaces scan_bss objects some
new APIs were added to avoid tearing down the associated DBus
object for each BSS.

network_bss_start_update() should be called before any new BSS's
are added to the network object. This will keep track of the old
list and create a new network->bss_list where more entries can
be added. This is effectively replacing network_bss_list_clear,
except it keeps the old list around until...

network_bss_stop_update() is called when all BSS's have been
added to the network object. This will then iterate the old list
and lookup if any BSS DBus objects need to be destroyed. Once
completed the old list is destroyed.
2024-08-12 12:01:57 -05:00
James Prestwood
cd1507620f dbus: Add net.connman.iwd.BasicServiceSet interface 2024-08-12 12:01:34 -05:00
Denis Kenzior
7ee7848a96 netdev: Simplify FILS handling in netdev_connect_common 2024-08-05 09:07:02 -05:00
Denis Kenzior
be7b19d587 fils: Ensure capability checks are consistent
iwd supports FILS only on softmac drivers.  Ensure the capability check
is consistent between wiphy and netdev, both the softmac and the
relevant EXT_FEATURE bit must be checked.

CMD_EXTERNAL_AUTH could potentially be used for FILS for FullMAC cards,
but no hardware supporting this has been identified yet.
2024-08-05 09:06:54 -05:00
Denis Kenzior
16f5bbc20a netdev: Create owe_sm for fullmac connections
Somehow this ability was lost in the refactoring.  OWE was intended to
be used on fullmac cards, but the state machine is only actually created
if the connection type ends up being softmac.

Fixes: 8b6ad5d3b9 ("owe: netdev: refactor to remove OWE as an auth-proto")
2024-08-05 09:06:43 -05:00
Denis Kenzior
8a27cff8c0 ie: Add IE_AKM_IS_OWE
Similarly to IE_AKM_IS_SAE, IE_AKM_IS_FILS, etc
2024-08-05 09:06:39 -05:00
Denis Kenzior
d43f05224d wiphy: Fix use of wiphy_has_feature
Features with the _EXT_ in the name must be queried using the
wiphy_has_ext_feature method.

Fixes: bc7b12d1a4 ("wiphy: handle FILS AKMs")
2024-08-05 09:06:31 -05:00
Denis Kenzior
96492483ee monitor: Mask flags from attribute identifier
Certain flags (for example, NLA_F_NESTED) are ORed with the netlink
attribute type identifier prior to being sent on the wire.  Such flags
need to be masked off and not taken into consideration when attribute
type is being compared against known values.
2024-08-05 09:06:25 -05:00
Denis Kenzior
194d8a3052 monitor: Decode RMNet Mux Identifier 2024-08-05 09:06:20 -05:00
James Prestwood
d500a44ff3 station: improve zero oper class neighbor report workaround
The workaround for Cisco APs reporting an operating class of zero
is still a bug that remains in Cisco equipment. This is made even
worse with the introduction of 6GHz where the channel numbers
overlap with both 2.4 and 5GHz bands. This makes it impossible to
definitively choose a frequency given only a channel number.

To improve this workaround and cover the 6GHz band we can calculate
a frequency for each band and see what is successful. Then append
each frequency we get to the list. This will result in more
frequencies scanned, but this tradeoff is better than potentially
avoiding a roam to 6GHz or high order 5ghz channel numbers.
2024-08-05 09:05:49 -05:00
Denis Kenzior
faa6a392e4 monitor: Update to the new ell l_netlink_send API 2024-07-26 17:37:29 -05:00
Denis Kenzior
e33fa63243 netdev: Update to the new l_netlink_send API 2024-07-26 17:37:29 -05:00
Denis Kenzior
d7f669dd7c wired: Update to the new l_netlink_send API 2024-07-26 17:37:29 -05:00