Commit Graph

12 Commits

Author SHA1 Message Date
Denis Kenzior fe95cbe077 treewide: Various style fixups
- Mostly problems with whitespace:
	- Use of spaces instead of tabs
	- Stray spaces before closing ')
	- Missing spaces

- Missing 'void' from function declarations & definitions that
  take no arguments.

- Wrong indentation level
2022-01-11 11:07:05 -06:00
James Prestwood f3c9b66f08 band: move several scan utilities into band
This will allow unit testing modules which depend on these
APIs:

scan_channel_to_freq
scan_freq_to_channel
scan_oper_class_to_band
2021-11-29 17:07:10 -06:00
Denis Kenzior a2990443d2 band: add oci_from_chandef
This adds a utility to convert a chandef obtained from the kernel into a
3 byte OCI element format containing the operating class, primary
  channel and secondary channel center frequency index.
2021-09-23 11:52:56 -05:00
Denis Kenzior b41106d359 band: Add oci_verify
Add a utility that will verify a peer's OCI element and validate it
given the current chandef obtained from the driver.
2021-09-21 15:34:40 -05:00
Denis Kenzior ca767aa857 band: Add oci_to_frequency
This adds a utility that can convert an operating class + channel
combination to a frequency.  Operating class is assumed to be a global
operating class from 802.11 Appendix E4.

This information can be found in Operating Channel Information (OCI) IEs,
as well as OWE Transition Mode IEs.
2021-09-21 15:34:40 -05:00
Denis Kenzior 30d32e4a58 treewide: Remove non-ascii characters 2021-07-28 10:03:27 -05:00
Denis Kenzior 78b9328db6 scan: Quiet down warning
Under certain conditions, access points with very low signal could be
detected.  This signal is too low to estimate a data rate and causes
this L_WARN to fire.  Fix this by returning a -ENETUNREACH error code in
case the signal is too low for any of the supported rates.
2021-07-28 09:53:21 -05:00
Denis Kenzior 2d480f12e1 band: Add utility for estimating non-ht data rate 2021-06-04 10:14:04 -05:00
Denis Kenzior 575f603f89 band: Add HT RX rate estimation
Similarly to commit
27d302a0 ("band: Add a utility to estimate VHT rx data rate"), this
commit adds an RX data rate estimation utility for HT connections.
2021-06-04 10:14:04 -05:00
Denis Kenzior a17745661e band: Add a utility to estimate VHT rx data rate
This function is meant to supercede a similar function in ie.c.  The
current approach results in very optimistic data rate estimates since it
only takes into account the VHT/HT Capabilities IEs.  It does not take
into account any local hardware limitations (such as no VHT/HT support),
limited RX MCS sets & number of spatial streams.  It also does not take
into account that the AP might not be actually operating on higher
bandwidth channels.

This function is meant to address that by matching peer TX MCS sets with
the local hardware RX MCS set capability.  It also takes into account
channel bandwidth capabilities of the local hardware, as well as whether
the AP is actually operating on a wider channel.
2021-06-04 10:14:04 -05:00
Denis Kenzior 842a70a307 band: Move ht/vht data rate calculation out of ie.c 2021-06-04 10:14:04 -05:00
Denis Kenzior e41bee377d band: Add band.[ch]
Move the band definition out of wiphy.c and into band.[ch].  This is
done to make certain utilities that depend on band information capable
of being tested from unit tests.

The band concept will most likely grow over time.  For now, the only
user will be wiphy.c and unit tests, so the structures are kept public.
2021-06-04 10:14:04 -05:00