title: wpa_supplicant / wpa_cli not able to detect wrong key of access point
body: <p>I am developing a handheld device based on IMX233 running embedded linux and is using Unifi CSR6026 for connecting to the WiFi networks. I have got the basic WiFi connectivity running using the wpa_supplicant and wpa_cli utilities. But i'm not able to detect when the user has entered a wrong key for the access point. The 'wpa_cli status' shows 'wpa_state=COMPLETED' and the iwconfig also returns the correct ESSID and MAC address of the access point as currently connected. Is there any other way to find out whether the user has entered a wrong key or not ??</p>
  
  <pre><code>root@freescale ~$ wpa_cli status
  
  Selected interface 'eth0'
  bssid=00:24:01:6a:3f:26
  ssid=FirstFloorBGN
  id=1
  pairwise_cipher=WEP-40
  group_cipher=WEP-40
  key_mgmt=NONE
  wpa_state=COMPLETED
  
  
  root@freescale ~$ iwconfig
  
  lo        no wireless extensionsunifi1: unifi_giwencode: Surprise, do not have a
   valid key index (0)
  .
  
  eth0      IEEE 802.11-b/g  ESSID:"FirstFloorBGN"
            Mode:Managed  Frequency:2.422 GHz  Access Point: 00:24:01:6A:3F:26
            Bit Rate=24 Mb/s
            RTS thr=0 B   Fragment thr:off
            Encryption key:off
            Power Management period:500ms  mode:All packets received
            Link Quality=25/40  Signal level=-47 dBm  Noise level=-72 dBm
            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
            Tx excessive retries:0  Invalid misc:0   Missed beacon:0
  </code></pre>