Mwifiex crashes when creating an accesspoint

Hi @jeremias.tx,
I am creating an accesspoint with hostapd (see config script below) on my iMX8. Once the AP is started a Raspberry Pi scans for this specific SSID and connects. As far as i remember the connection always works at the first time. Then the connection is closed and the AP is reconfigured for another channel. Starting the AP again does also work. Typically the next connection attempt causes this issue on the iMX8 site. I was never able to do that procedure more than three times before the mwifiex driver crashes.
Sometimes the driver reloads automatically - in that case my program can be rerun but it will trigger that issue again.

BR

interface=uap0
driver=nl80211
macaddr_acl=0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
channel=48
ssid=ktwifi_a_48
beacon_int=100
ieee80211h=0
ieee80211d=1
country_code=KT
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=1234trivial
hw_mode=a
logger_syslog=2
logger_stdout=-1
logger_stdout_level=0