]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
wifi: cfg80211: rewrite merging of inherited elements
authorBenjamin Berg <benjamin.berg@intel.com>
Fri, 16 Jun 2023 06:54:03 +0000 (09:54 +0300)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:19:36 +0000 (17:19 +0200)
commit95e7f903b0f4353e504e8edfe680f9f5c3b6cfff
treea49b06c86f46f62f3fcde192975d47f197a46041
parent30bab51b2cca77efa8f85b4c36a84a02c33e5233
wifi: cfg80211: rewrite merging of inherited elements

BugLink: https://bugs.launchpad.net/bugs/2034469
[ Upstream commit dfd9aa3e7a456d57b18021d66472ab7ff8373ab7 ]

The cfg80211_gen_new_ie function merges the IEs using inheritance rules.
Rewrite this function to fix issues around inheritance rules. In
particular, vendor elements do not require any special handling, as they
are either all inherited or overridden by the subprofile.
Also, add fragmentation handling as this may be needed in some cases.

This also changes the function to not require making a copy. The new
version could be optimized a bit by explicitly tracking which IEs have
been handled already rather than looking that up again every time.

Note that a small behavioural change is the removal of the SSID special
handling. This should be fine for the MBSSID element, as the SSID must
be included in the subelement.

Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230616094949.bc6152e146db.I2b5f3bc45085e1901e5b5192a674436adaf94748@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/wireless/scan.c