root@bpi-r2:~# iw wlp1s0 set type ibss
root@bpi-r2:~# ip link set wlp1s0 up
RTNETLINK answers: Input/output error
root@bpi-r2:~# dmesg | grep wlp1s0
[ 15.208512] mt7615e 0000:01:00.0 wlp1s0: renamed from wlan0
root@bpi-r2:~# uname -a
Linux bpi-r2 5.15.0-rc4-bpi-r2 #1 SMP Sat Oct 16 20:43:57 CEST 2021 armv7l GNU/Linux
I think you probably have already an instance of wpa_supplicant running (usually this happens when people forget that NetworkManager takes care of all their interfaces and they will either have to stop NetworkManager or use NetworkManager for all configuration…)
It is my r2,using mt7615 card.but not interal wifi (ap0)
and no wpa_supplicant/ hostapd running…but network-config done with systemd
tried stopping it, but error comes again
root@bpi-r2:~# service systemd-networkd stop
Warning: Stopping systemd-networkd.service, but it can still be activated by:
systemd-networkd.socket
root@bpi-r2:~# iw wlp1s0 set type ibss
root@bpi-r2:~# ip link set wlp1s0 up
RTNETLINK answers: Input/output error
root@bpi-r2:~#
maybe i need to set ip address first?
edit: wpa_supplicant is not installed in my (nearly fresh) bullseye image, hostapd is installed, but not running. i got the same error without the patch…so at least not related to the patch…
The most important thing is to test it on internal mt7622 wifi, since it fixes adhoc and mesh point there. However, thanks for testing, you can just also try to use wpa_supplicant with
i missed firmware-files…after installing them, i don’t get the error
apt install firmware-misc-nonfree
looks like i can now start the mesh
iw wlp1s0 set type ibss
ip link set wlp1s0 up
iw wlp1s0 ibss join bpi-mesh 2412
[ 129.828378] wlp1s0: Trigger new scan to find an IBSS to join
[ 135.274604] wlp1s0: Creating new IBSS network, BSSID 3e:4d:88:d8:1d:45
[ 135.282649] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
[ 165.361006] wlp1s0: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)
now compiling kernel for r64…
root@bpi-r64:~# apt install iw
root@bpi-r64:~# iw wlan0 set type ibss
root@bpi-r64:~# ip link set wlan0 up
root@bpi-r64:~# iw wlan0 ibss join bpi-mesh 2412
root@bpi-r64:~# [ 188.468176] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
and it looks like there is no scanning anymore, seems like they are connected…
root@bpi-r64:~# iw dev wlan0 station dump
Station 00:0a:52:05:c9:e2 (on wlan0)
inactive time: 80 ms
rx bytes: 68796
rx packets: 1764
tx bytes: 0
tx packets: 0
tx retries: 0
tx failed: 0
rx drop misc: 0
signal: -38 [-38, -64, -76, -69] dBm
signal avg: -37 [-37, -64, -75, -69] dBm
tx bitrate: 1.0 MBit/s
rx duration: 0 us
authorized: yes
authenticated: yes
associated: yes
preamble: long
WMM/WME: yes
MFP: no
TDLS peer: no
DTIM period: 0
beacon interval:100
connected time: 177 seconds
and it seems to work…after adding layer3 (ip address), i can ping each other
ap-mode on r2 (mt7615) and r64 (mt7622_wmac) still works
root@bpi-r2:~# wpa_supplicant -i wlp1s0 -c /etc/wpa_supplicant/meshpoint.conf &
[1] 500
Successfully initialized wpa_supplicant
Line 3: unknown global field 'user_mpm=1'.
Line 3: Invalid configuration line 'user_mpm=1'.
Line 8: too large mode (value=5 max_value=4)
Line 8: failed to parse mode '5'.
Line 11: failed to parse network block.
Failed to read or parse configuration '/etc/wpa_supplicant/meshpoint.conf'.
iw list does not show mesh-point…maybe i need a kernel-option (MAC80211_MESH [=n],…)
edit: after adding MAC80211_MESH i see mesh point and can execute the iw line…wpa_supplicant still show error
iw list | grep -i 'phy\|mesh'
Wiphy phy0
wiphy index: 0
* mesh point
* set_mesh_config
* join_mesh
* set_wiphy_netns
* #{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-G
O } <= 16,
* mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90
0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* mesh point: 0xb0 0xc0 0xd0
iw phy phy0 interface add mesh0 type mp
iw mesh0 info
Interface mesh0
ifindex 16
wdev 0x2
addr 00:0a:52:05:c9:e2
type mesh point
wiphy 0
txpower 6.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytet
x-packets
0 0 0 0 0 0 0 0 0
ip addr add 192.168.80.1/24 dev mesh0
ip link set mesh0 up
wpa_supplicant -i mesh0 -c /etc/wpa_supplicant/meshpoint.conf &
[1] 504
Successfully initialized wpa_supplicant
Line 3: unknown global field 'user_mpm=1'.
Line 3: Invalid configuration line 'user_mpm=1'.
Line 8: too large mode (value=5 max_value=4)
Line 8: failed to parse mode '5'.
Line 11: failed to parse network block.
Failed to read or parse configuration '/etc/wpa_supplicant/meshpoint.conf'.
It looks like debians wpa_supplicant is compiled without mesh (like defaultconfig from gitrepo)…but i did not found yet why user_mpm is not recognized (but in source it looks like it’s part from mash)
Looks like driver issue (there it is ath10k) where dev_alloc_skb needs to be replaced by netdev_alloc_skb including net device…but i did not found both in drivers/net/wireless/mediatek/mt76
mhm, looks like it’s related to ip assignment…after i added an ip-adress i see skb-sk is temporarily set, but the reset to zero again. looks like at this time the trace pops up on r64
so i tried this order:
#r64
modprobe mt7615e
iw phy phy0 interface add mesh0 type mp
ip addr add 192.168.80.2/24 dev mesh0
./wpa_supplicant_arm64 -i mesh0 -c /etc/wpa_supplicant/meshpoint.conf &
#r2
iw phy phy0 interface add mesh0 type mp
ip addr add 192.168.80.1/24 dev mesh0
./wpa_supplicant -i mesh0 -c /etc/wpa_supplicant/meshpoint.conf &
while i have not started wpa_supplicant on r64, i see at least skb.dev is set…but after connection this is NULL
strange that it takes some time to appear on r64, i can trigger the trace on r64 with a ping, if i do not ping, the trace is not shown
i tried to set skb->dev to &dev->napi_dev in drivers/net/wireless/mediatek/mt76/mcu.c:mt76_mcu_msg_alloc but still got the trace at one point the dev is not set (maybe skb created differently)
I realized that there is another issue when using more than 2 stations in 802.11s. 2 work fine, but if a third joins everything freezes. Adhoc stills works perfectly.
Also there was another commit:
Dangowrt said is is not that important, but at least it should fix warnings bringing up a mesh interface. (at least how I understood it).
I did not get any response to bug report yet. Only information that mt76 team is busy with other bugs and this:
for mesh-issue, we used openwrt UI to establish 11s mesh (iw+hostapd) and it’s ok.
we guess it was caused by you tried to use wpa_supplicant to setup mesh
directly?
Patch above is only a script fix for openwrt so not related to my warning