wlan: Copy current profile to previous without connection state check

After every new connection, we check if the current AP profile
(SSID & security type) matches previous AP profile.
if yes, then we don't clear the learned channel history about
the AP (prev and current same in this case)
If not, then user has connected to new AP. There is no point in
storing the channel learned history for the old AP. so we clear it.

Root cause for this CR:
One every disconnect, we free up previous profile and copy the
current profile to previous profile, but the problem is after
freeing, during the copyCurrentProfile, there is a check for
csrIsConnStateConnected() only if SUCCESS, it copies, but by this
time connection state is already disconnected it returns FAILURE,
so copy won't happen. That means previous profile is Empty here.

On next connect, during full scan, since the previous profile
is empty we try to build channel list all over again and
if we find both the APs in the scan results, both channels
will be added in the list (new learning). But the issue we are
seeing only one channel some time because at that instant we are
already away from AP, and scan results does not have both the APs.

Hence, the fix is to copy the current profile to previous profile
unconditionally (in csrNeighborRoamIndicateDisconnect)

Change-Id: Icefb89ed4eaa50daa93797c4675c71a334b992c7
CRs-Fixed: 499630
1 file changed
tree: 07f047673ca2f0ac6542c5b3413dacffe3eaae79
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig