How can I control / switch between different WiFi modes on Laird WiFi modules in a Linux system? E.g. Access Point, Ad-hoc, Client, Wi-Fi direct/P2P when available?

Answer

All this can be controlled through standard Linux commands/programs like ?iw?, ?hostapd?, ?wpa_supplicant?, ?wpa_cli?, etc.