qcacmn: Unlink hidden bss entry from kernel

Kernel maintains a list of bss and it adds/updates the bss
entries whenever driver informs it. When driver receives
beacon or probe response from any ap it informs kernel to
update the bss list and whenever it disconnects with the
AP driver unlink the bss in the kernel.

If the AP is hidden, when driver gets beacon from this
hidden AP it informs the kernel to update the bss list.
kernel add this entry to it's bss list with NULL SSID.
Now when driver receives probe response from this hidden
AP it again informs the kernel to update the bss list,
as this is probe response and ssid is not hidden,
kernel treats this entry as new entry and adds it to
its bss list and links this entry to the older hidden
AP entry (But still these are two entries for hidden AP).

When driver gets disconnect from the AP it unlink the
bss entry corresponding to this AP from kernel's bss
list, but since there are two entries for the same AP
as the AP is a hidden AP, driver should clear hidden AP
entry (Which was added as part of beacon) which is
not happening currently.
Now when AP moves from hidden to broadcasting SSID
in it's beacon, kernel drops this beacon entry as its
confusing because there is already a beacon entry with
hidden bss for this AP. During connection driver tries
to update the entry in the kernel and it fails as kernel
drops the beacon resulting into the connection failure.

To resolve this issue, whenever driver unlink the bss
entries from the kernel bss list unlink the hidden bss
entries also from the kernel's bss list.

Change-Id: I629475db8e8f10a6bc403314a984939e38d0a4da
CRs-Fixed: 2488955
2 files changed