mac80211: mwl8k: inject DSSS Parameter Set element into beacons if missing
Some Marvell AP firmware used with mwl8k misbehaves when beacons do not
contain the DSSS Parameter Set (WLAN_EID_DS_PARAMS) with the current
channel. When hostapd/mac80211 omits this element (which is valid on
some bands), the firmware may report bogus RX channel information and AP
mode becomes unusable.
Backport the upstream fix that ensures beacons always carry the DSSS
Parameter Set for mwl8k: when setting the beacon, detect if the element
is missing and inject it after SSID and Supported Rates (per spec
ordering). This mirrors behaviour in newer Marvell drivers and restores
stable operation.
Tested on Linksys EA4500 (88W8366).
Fixes: openwrt/openwrt#19088
Link: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git/commit/?id=c4e1ac09ee1c750890e36cb1f841f25518f23589
Signed-off-by: Pawel Dembicki <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20757
Signed-off-by: Hauke Mehrtens <[email protected]>