title: wpa_supplicant throws reason=0 locally_generated=1
body: <p>I am running wpa_supplicant on my pi3 board. If I provide credentials using wpa_cli, it tries to connect to the AP but throws out an error as below</p>
  
  <pre><code>pi@adityapi:~/Desktop/WifiConnectApp/Rust/latest $ sudo wpa_supplicant -i wlan0 -Dnl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
  
  Successfully initialized wpa_supplicant
  
  wlan0: Trying to associate with 58:6d:8f:3d:27:f4 (SSID='STAP-0' freq=2437 MHz)
  wlan0: Associated with 58:6d:8f:3d:27:f4
  
  wlan0: WPA: Key negotiation completed with 58:6d:8f:3d:27:f4  [PTK=CCMP GTK=CCMP]
  wlan0: CTRL-EVENT-CONNECTED - Connection to 58:6d:8f:3d:27:f4 completed [id=0 id_str=]
  wlan0: CTRL-EVENT-DISCONNECTED bssid=58:6d:8f:3d:27:f4 reason=0 locally_generated=1
  wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
  wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=IN
  
  wlan0: Trying to associate with 58:6d:8f:3d:27:f4 (SSID='STAP-0' freq=2437 MHz)
  wlan0: Associated with 58:6d:8f:3d:27:f4
  
  wlan0: CTRL-EVENT-DISCONNECTED bssid=58:6d:8f:3d:27:f4 reason=0 locally_generated=1
  wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
  wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=IN
  
  wlan0: Trying to associate with 58:6d:8f:3d:27:f4 (SSID='STAP-0' freq=2437 MHz)
  wlan0: Associated with 58:6d:8f:3d:27:f4
  
  wlan0: CTRL-EVENT-DISCONNECTED bssid=58:6d:8f:3d:27:f4 reason=0 locally_generated=1
  wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
  wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=IN
  
  wlan0: Trying to associate with 58:6d:8f:3d:27:f4 (SSID='STAP-0' freq=2437 MHz)
  wlan0: Associated with 58:6d:8f:3d:27:f4
  
  wlan0: CTRL-EVENT-DISCONNECTED bssid=58:6d:8f:3d:27:f4 reason=0 locally_generated=1
  wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="STAP-0" auth_failures=1 duration=10 reason=CONN_FAILED
  wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
  wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=IN
  </code></pre>
  
  <p>How to solve this issue, I referred other places for disabling the 
  a) network manager: As I did that, it did not solve this </p>