[openwrt/openwrt] mac80211: fix IBSS/adhoc mode for brcmfmac

LEDE Commits lede-commits at lists.infradead.org
Tue Nov 23 09:44:14 PST 2021


nbd pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/91ba22e3a42f9db904e599161c2316f8e8cb5091

commit 91ba22e3a42f9db904e599161c2316f8e8cb5091
Author: Bastian Bittorf <bb at npl.de>
AuthorDate: Sun Sep 19 11:19:36 2021 +0000

    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 at npl.de>
    (cherry-picked from commit ea5fce3f4616df3e4331e6b4e8e79767bded442c)
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 17db5a0035..4828951bab 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -861,6 +861,7 @@ mac80211_setup_adhoc() {
 	mcval=
 	[ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
 
+	iw dev "$ifname" set type ibss
 	iw dev "$ifname" ibss join "$ssid" $freq $iw_htmode fixed-freq $bssid \
 		beacon-interval $beacon_int \
 		${brstr:+basic-rates $brstr} \



More information about the lede-commits mailing list