Can't add Wave2 QCA9984 radio in Client mode

First off. Adding the radio in AP mode works fine but I want to have another board with the same radio in client mode connect to the AP board. The board is able to see the AP network but when I try to connect to it I see no communication happening. Below is the debug info I've collected so far. Any advice would be greatly appreciated.

root@LEDE:~# less /etc/config/wireless 
config wifi-device 'radio0'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path 'soc0/soc/1ffc000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:05.0/0000:05:00.0'
	option disabled '0'
	option country 'US'
	option htmode 'VHT20'

config wifi-iface
	option ssid 'Wave2VTMiltope'
	option encryption 'none'
	option device 'radio0'
	option mode 'sta'
	option network 'wwan'
	option bssid '04:F0:21:31:EE:45'

.

root@LEDE:~# logread
Thu Jan 29 23:22:06 1970 daemon.notice netifd: radio0 (2382): command failed: No such device (-19)
Thu Jan 29 23:22:06 1970 daemon.notice netifd: radio0 (2473): command failed: Not supported (-95)
Thu Jan 29 23:22:09 1970 kern.warn kernel: [  209.571882] ath10k_pci 0000:05:00.0: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96
Thu Jan 29 23:22:09 1970 kern.warn kernel: [  209.579522] ath10k_pci 0000:05:00.0: msdu-desc: 2500  skid: 32
Thu Jan 29 23:22:10 1970 kern.info kernel: [  209.661549] ath10k_pci 0000:05:00.0: wmi print 'P 48/48 V 16 K 144 PH 176 T 186  msdu-desc: 2500  sw-crypt: 0'
Thu Jan 29 23:22:10 1970 kerninfo kernel: [  209.672208] ath10k_pci 0000:05:00.0: wmi print 'free: 90140 iram: 17044 sram: 23936'
Thu Jan 29 23:22:10 1970 kern.info kernel: [  209.969919] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Thu Jan 29 23:22:10 1970 daemon.notice netifd: radio0 (2473): ./mac80211.sh: eval: line 1: /usr/sbin/wpa_supplicant: not found
Thu Jan 29 23:22:10 1970 daemon.notice netifd: radio0 (2473): cat: can't open '/var/run/wpa_supplicant-wlan0.pid': No such file or directory
Thu Jan 29 23:22:10 1970 daemon.notice netifd: radio0 (2473): WARNING (wireless_add_process): executable path /usr/sbin/wpa_supplicant does not match process  path ()
Thu Jan 29 23:22:10 1970 daemon.notice netifd: radio0 (2473): Command failed: Invalid argument
Thu Jan 29 23:22:10 1970 daemon.notice netifd: radio0 (2473): Interface 0 setup failed: WPA_SUPPLICANT_FAILED
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568839] ath10k_pci 0000:05:00.0: ath10k_pci ATH10K_DBG_BUFFER:
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568855] ath10k: [0000]: 00000AFE 13FC0007 60002070 00000010 00000030 00060001 00000B4A 17FC582E
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568865] ath10k: [0008]: 00000003 0000001E 0000094C 0000094C 00000000 00000B4A 17FC582E 00000012
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568877] ath10k: [0016]: 0000001E 0000094C 0000094C 00000000 00000B4A 17FC582E 00000045 0000001E
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568886] ath10k: [0024]: 0000094C 0000094C 00000000 00000B4A 17FC582E 00000067 0000001E 0000094C
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568894] ath10k: [0032]: 0000094C 00000000 00000B7E 13FC5822 9110B000 00000001 00000001 00000001
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568902] ath10k: [0040]: 00000B98 13FC5822 9110B000 00000001 00000001 00000001 00000BB2 13FC5822
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568910] ath10k: [0048]: 9110B000 00000001 00000001 00000001 00000BCC 13FC5822 9110B000 00000001
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568919] ath10k: [0056]: 00000001 00000001 00000BE5 13FC5822 9110B000 00000001 00000001 00000001
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568927] ath10k: [0064]: 00000BFF 13FC5822 9110B000 00000001 00000001 00000001 00000C19 13FC5822
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568935] ath10k: [0072]: 9110B000 00000001 00000001 00000001 00000C33 13FC5822 9110B000 00000001
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568942] ath10k: [0080]: 00000001 00000001 00000C4D 13FC5822 9110B000 00000001 00000001 00000001
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568951] ath10k: [0088]: 00000C67 13FC5822 9110B000 00000001 00000001 00000001 00000C81 13FC5822
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568961] ath10k: [0096]: 9110B000 00000001 00000001 00000001 00000C81 17FC5837 0000003A 0000003A
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568969] ath10k: [0104]: 0000003A 00000010 00000010 00000C82 14005853 51100001 000F49BC 000003FC
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568977] ath10k: [0112]: 00000001 0045493C 00000C82 14005856 71109990 00430FF4 00000000 0045A3C0
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568986] ath10k: [0120]: 00001200 00000C82 14005856 71109990 00430FF4 00000000 0045A3AC 00098000
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.568994] ath10k: [0128]: 00000C82 0C005851 00430FF4 0045493C 00000001 00000C82 0C006403 00000000
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.569002] ath10k: [0136]: 00000100 00000000 00000C82 04003C25 00000000 00000C82 14005856 71109990
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.569010] ath10k: [0144]: 00430FF4 00000000 0045A398 01000000 00000C83 10005858 31100002 00430FF4
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.569019] ath10k: [0152]: 00000003 FFFFFFFF 00000C86 10005858 31100002 00430FF4 0000000A 00000000
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.569026] ath10k: [0160]: 00000C86 10005858 31100002 00430FF4 0000000E 00000000
Thu Jan 29 23:22:10 1970 kern.debug kernel: [  210.569035] ath10k_pci 0000:05:00.0: ATH10K_END

So I've found some new information.

  1. wpa_supplicant is not being installed in the generic build. I manually had to add that in make menuconfig
  2. It seems that wpa_supplicant is being called with the wrong option
    wpa_supplicant -B -s -P /var/run/wpa_supplicant-wlan0.pid -D nl80211 -i wlan0 -c /var/run/wpa_supplicant-wlan0.conf
    I called this command from the command line removing -s and the radio came up.
    wpa_supplicant -B -P /var/run/wpa_supplicant-wlan0.pid -D nl80211 -i wlan0 -c /var/run/wpa_supplicant-wlan0.conf

I'm not sure where this is being called from but I think it might be from /lib/netifd/wireless/mac80211.sh

Would nice to see if LEDE could get a fix for this. In the meantime I will have to put a hack in my own build.