wifi: support multi-BSS PMK cache

The wifi framework stores opaque data and might not eliminate
duplicate entries for the same BSS. While setting a PMK cache,
check the expiration of existing entry to avoid overriding the latest one.

Bug: 203492843
Test: connect to multi-BSS SAE networks and PMK caches are found
      and work on reconnecting them.
      * setup two BSSes with the same SSID.
      * connect to the first BSS and check PMK cache is added.
      * connect to another SSID and re-connect to the first BSS,
        PMK cache is found and works.
      * connect to the second BSS and check PMK cache is added.
      * connect to another SSID and re-connect to the second BSS,
        PMK cache is found and works.
      * connect to the first BSS and PMK cache is found and works.
      * connect to the second BSS and PMK cache is found and works.
Change-Id: Id50dd1b87826dfda232a27db0965dbf5de526b84
1 file changed