TDLS: Check for the connected state while extracing the first peer.

commit I6dad95ce4f453d774b4f6bea99cccca46b95aa5f did not consider peer link
connection status while extracting first peer from the peer list.

Address this issue by checking if peer link status is connected.

Klockwork Issue: pAdapter NULL Pointer Dereference in
wlan_hdd_tdls_indicate_teardown function is also fixed as part of this
commit.

CRs-Fixed: 685956
Change-Id: I5ef55f91dd20c0bb934e9dad90fe901a63480853
1 file changed
tree: 200f63c8294516b8caf9232aa0775120c530ddbe
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig