mac80211: fix IBSS/adhoc mode for brcmfmac
authorBastian Bittorf <bb@npl.de>
Sun, 19 Sep 2021 11:19:36 +0000 (11:19 +0000)
committerFelix Fietkau <nbd@nbd.name>
Tue, 23 Nov 2021 17:30:04 +0000 (18:30 +0100)
commit91ba22e3a42f9db904e599161c2316f8e8cb5091
treede61b46978024dc37c38f322d95b07a387af0398
parent27e4c5cf47ba25b8866ff69e89aef9948b45dd15
mac80211: fix IBSS/adhoc mode for brcmfmac

On systems using brmcfmac (e.g. Raspberry Pi Zero W) without this fix,
the final setup-call:
iw dev wlan0 ibss join ...

fails with returncode 161 and message:
"command failed: Not supported (-95)"

So this patch calls an explicit:
iw dev wlan0 set type ibss
just prior to the 'ibss join' command.

I have tested several ath9k and mt76xx devices
with different revisions: this patch does not harm.

please also apply to stable branch.

Signed-off-by: Bastian Bittorf <bb@npl.de>
(cherry-picked from commit ea5fce3f4616df3e4331e6b4e8e79767bded442c)
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh