build: apply_profile: calculate config_mode (e.g. ap, adhoc, hybrid) from system-var, not from first wireless interface