Network restart cause the RTL wifi driver unregisterd

I have build the Realtek 8822be driver from vendor into kernel and it seems working fine. The driver create a new wlan0 interface. Then I type 'wifi config' command to create /etc/config/wireless and modify the option disable to 0. Now I type '/etc/init.d/network restart'. The error message shows:
root@OpenWrt:/# /etc/init.d/network restart
[ 58.789806] device eth0 left promiscuous mode
[ 58.794180] br-lan: port 1(eth0) entered disabled state
[ 58.836228] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 60.200993] br-lan: port 1(eth0) entered blocking state
[ 60.206224] br-lan: port 1(eth0) entered disabled state
[ 60.211558] device eth0 entered promiscuous mode
[ 60.216516] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 60.328806] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 60.889955] RTW: cfg80211_rtw_del_virtual_intf(wlan0) unregister ndev
[ 60.896397] RTW: rtw_wdev_unregister(wdev=ffff800971ff7800)
[ 60.924232] RTW: rtw_ndev_notifier_call(wlan0) state:6
[ 60.929377] RTW: rtw_ndev_uninit(wlan0) if1
[ 60.933939] RTW: rtw_wiphy_unregister(phy0)
[ 60.938150] RTW: Vendor: Unregister RTW cfg80211 vendor interface

I have tried to use hostapd to build an AP and use wpa_supplication to connnect to an AP. It seems work fine too. So I think the problem is not about RTL driver.

Can any one give me some suggestion?

If you're trying to use AP mode, that won't be possible (8822be does not support nl80211 (just a minimal cfg80211 emulation layer, barely sufficient to fool network-manager) at most)).

Hi slh,
When I using the web page to set up wifi configuration, I can scan the wifi ssid.
But if I enable the interface, the same error message occurs. Your meaning is 8822be driver from vendor does not support nl80211? And regular openwrt use nl80211?

Correct, it only has a (shim) cfg80211 emulation.

But I have got a driver that support nl80211 from Realtek. The document from this driver tells me that there is a marco CONFIG_IOCTL_CFG80211:
It is used for driver to enable nl80211/cfg80211 ioctl interface. If kernel version is after 2.6.35, we recommend user to use the new nl80211 API. If you don't define this marco, driver default is wext ioctol interface.

And I define the marco already.

Hi slh,
I have found the point. When issue the command "iw dev wlan0 del", the system hangs. I have report it to the Realtek and I got the reply that they don't support completely nl80211. But I also found some reference:

But I still fail after modifying two files according to the reference.