'hostapd_cli enable' results in 'cannot change wiphy params when connected' on Colibri iMX6ULL

Dear Toradex community,
when I enable hostapd via hostapd_cli, I get the following error:

hostapd_cli enable
Selected interface 'uap0'
[  297.502940] mwifiex_sdio mmc1:0001:1: cannot change wiphy params when connected
FAIL

In this case,

  • I have to disable the wifi-network like this:
wpa_cli disable_network 0
Selected interface 'mlan0'
[ 2585.909879] mwifiex_sdio mmc1:0001:1: info: successfully disconnected from 7a:ac:b9:04:eb:39: reason code 3
OK

  • Enable the hostapd
hostapd_cli enable
Selected interface 'uap0'
OK

  • and re-enable the wifi-network again
wpa_cli enable_network 0
Selected interface 'mlan0'
OK

Is this normal, or is there a better way to do that?

My environment:

  • Viola Plus carrier board
  • Yocto-build as follows
Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-tdx-linux-gnueabi"
MACHINE              = "colibri-imx6ull"
DISTRO               = "tdx-none"
DISTRO_VERSION       = "5.7.0-devel-20220809070425+build.0"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta-toradex-nxp     = "HEAD:ee63c90fde9fde0229bff9ac1c5cffe356fc4f41"
meta-freescale       = "HEAD:c4347b507c2ba0d7eb3917303f83631244bf5048"
meta-freescale-3rdparty = "HEAD:88773cbb6367496b1a2ddca683afcd352be3cd58"
meta-toradex-tegra   = "HEAD:f5753af4a5b9d33f0f474b320a74c2e29a66ec39"
meta-toradex-bsp-common = "HEAD:029a663150449a5e71b84dd4000476754d525c8c"
meta-oe
meta-filesystems
meta-initramfs
meta-networking
meta-multimedia
meta-python
meta-webserver       = "HEAD:52cee67833d1975a5bd52e4556c4cd312425a017"
meta-freescale-distro = "HEAD:5d882cdf079b3bde0bd9869ce3ca3db411acbf3b"
meta-checkbox        = "HEAD:770ccb49ac3d2a335a9e60da841f732c4885d566"
  • wpa_supplicant.service
cat /lib/systemd/system/wpa_supplicant.service
[Unit]
Description=WPA supplicant
Requires=sys-subsystem-net-devices-mlan0.device
After=sys-subsystem-net-devices-mlan0.device
Before=network.target
Wants=network.target

[Service]
Type=dbus
BusName=fi.w1.wpa_supplicant1
ExecStart=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant.conf -i mlan0 -u

[Install]
WantedBy=multi-user.target
Alias=dbus-fi.w1.wpa_supplicant1.service
  • hostapd.service
cat /lib/systemd/system/hostapd.service
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
After=network.target

[Service]
Type=forking
PIDFile=/run/hostapd.pid
ExecStart=/usr/sbin/hostapd /etc/hostapd.conf -P /run/hostapd.pid -B

[Install]
WantedBy=multi-user.target

  • wpa_supplicant.conf
cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
config_methods=push_button

network={
        ssid="solveNet-TestRoom"
        psk="psk"
}

  • hostapd.conf (only my changed properties)
interface=uap0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=MySSID
country_code=AT
hw_mode=g
channel=2

  • mwifiex
[   16.586764] mwifiex_sdio mmc1:0001:1: info: MWIFIEX VERSION: mwifiex 1.0 (16.68.1.p197)
[   16.595019] mwifiex_sdio mmc1:0001:1: driver_version = mwifiex 1.0 (16.68.1.p197)