2019-02-07 18:30:56

by Chaoxing Lin

[permalink] [raw]
Subject: Help: 4-address interface NL80211_IFTYPE_AP_VLAN not supported any more??

Hello Linux wireless maintainers,

I was testing hostapd 4-address mode and found out the interface of type NL80211_IFTYPE_AP_VLAN is no longer created in recent kernel version.

Setup
Hostapd version 2.6
Wpa_supplicant version 2.6
Linux kernel 4.19.20

"wds_sta=1" is added in hostapd.conf
"iw wlan0 set 4addr on" is set on client side.

For kernel 4.14.16,
wpa_supplicant connects to hostapd well and hostapd would create wlan0.sta1 interface with type NL80211_IFTYPE_AP_VLAN. The traffic runs well over the AP<---->client. Everything is good.

For kernel 4.19.20,
wpa_supplicant connects to hostapd well, but hostapd fail to create wlan0.sta1 interface with type NL80211_IFTYPE_AP_VLAN. No traffic is possible between AP and client.
GDB shows that when creating wlan0.sta1 interface with type NL80211_IFTYPE_AP_VLAN, kernel return -95 (EOPNOTSUPP) to hostapd.
Inside kernel, this - EOPNOTSUPP seems to be returned from
nl80211_new_interface()--> nl80211_valid_4addr() which complains WIPHY_FLAG_4ADDR_AP flag is not set.

Reading kernel 4.19.20 source, I found that WIPHY_FLAG_4ADDR_AP flag is only possible in simulated hardware.
The only place that sets WIPHY_FLAG_4ADDR_AP flag is ieee80211_alloc_hw_nm()
The only place that calls ieee80211_alloc_hw_nm() is from drivers/net/wireless/mac80211_hwsim.c

So, does it mean that interface with type NL80211_IFTYPE_AP_VLAN will no longer be supported in any real hardware radio?
Or I did not understand kernel source right?

Please help.

For many years, we have been using this 4-address mode interface in our wireless bridge(proprietary mesh) product. To be backward compatible, we have to maintain the same feature in our new product. This 4-address AP<---->client connection is very import to us.


Thanks for your help,

Chaoxing