wifi: nl80211: refactor parsing CSA offsets
authorJohannes Berg <johannes.berg@intel.com>
Wed, 21 Feb 2024 11:48:18 +0000 (12:48 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 21 Feb 2024 14:19:05 +0000 (15:19 +0100)
commit81830c8f809c01f3780dc33f7d951be8e146ced1
tree6e7d3643798dd029935c87bf1b0ff05954427927
parent4f4d8be6dc37a28b8655d03918680d8ea8c82f75
wifi: nl80211: refactor parsing CSA offsets

The CSA offset parsing happens the same way for all of
beacon template offsets, probe response template offsets
and TX offsets (for using during probe response TX from
userspace directly).

Refactor the parsing here. There's an additional check
this introduces, which is that the number of counters in
TX offsets doesn't exceed the driver capability, but as
only two counters are used at most for anything, this is
hopefully OK.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c