Okay so im trying to use wpa_supplcant with my atheros 9285 (ath9k) and i dont understand whats going on. If i do "wpa_supplicant -iwlp8s0 -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf" it will connect saying connection to: 1c:af:f7:d5:f5:09 completed. But then it just hangs there. I do ^C to get out and it says disconnected reason=3 locally_generated=1.
I just realized that wpa-supplicant is not clearing its settings when I disconnect, and is overriding iwconfig on my next connection.
I disconnect using a script which includes everything I could think of:
sudo dhcpcd --release "$INTERFACE"
sudo iwconfig "$INTERFACE" essid off
sudo iwconfig "$INTERFACE" ap off
sudo ifconfig "$INTERFACE" down
This worked well until I tried to integrate wpa-suppl