diff options
| author | Johannes Berg <[email protected]> | 2024-01-29 19:34:47 +0100 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2024-02-08 13:07:38 +0100 |
| commit | 8f251a0a1566e3e1da0f1d9322c8ffae808a7509 (patch) | |
| tree | 10fef1e9013c21821b8135183245c1672bda3948 /tools/perf/scripts/python | |
| parent | b9d908dc3a294d25c7d6c2f54ca3987cbd98f040 (diff) | |
wifi: cfg80211: simplify cfg80211_chandef_compatible()
Simplify cfg80211_chandef_compatible() a bit by switching
c1 and c2 around so that c1 is always the narrower one
(once they're not identical or narrow/S1G). Then we can
just check the various primary channels and exit with the
wider one (c2), or NULL.
Also refactor the primary 40/80/160 function to not have
all the calculations hard-coded, and use a wrapper around
it to check primary 40/80/160 compatibility.
While at it, add some kunit tests for this functionality.
Also expose the new cfg80211_chandef_primary_freq() to
drivers, mac80211 will use it.
Link: https://msgid.link/20240129194108.be3e6eccaba3.I8399c2ff1435d7378e5837794cb5aa6dd2ee1416@changeid
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions