Browse Source

qcacld-3.0: Fetch link mac addr from assoc rsp only for connect

Currently, link mac addr is fetched for initial connection from
MLO IE present in assoc response. But it's still trying to fetch
the mac addr from reassoc rsp and failing as it's not present.
Then it tries to check if bss peer is created for the link to
use it to store the keys in crypto with that mac address.

This also fails if link connect has just started and got keys
from userspace before link connect reaches bss creation state.
There is no issue if bss peer for the link is already created.

Once mac address is read from assoc rsp, don't read again from
reassoc to avoid this failure.

Change-Id: I8e1ba0c9290e73ae808d5ff411b4d6d0a338ced3
CRs-Fixed: 3437611
Srinivas Dasari 2 years ago
parent
commit
0172b1fa3a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 2 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -21367,6 +21367,7 @@ static int wlan_hdd_add_key_vdev(mac_handle_t mac_handle,
 				hdd_err("Failed to get peer address from ML IEs");
 				return qdf_status_to_os_return(status);
 			}
+			goto done;
 		} else {
 			hdd_err("Peer is null return");
 			return -EINVAL;
@@ -21392,6 +21393,7 @@ static int wlan_hdd_add_key_vdev(mac_handle_t mac_handle,
 				     QDF_MAC_ADDR_SIZE);
 	}
 
+done:
 	wlan_hdd_mlo_link_free_keys(adapter, vdev, pairwise);
 
 	errno = wlan_cfg80211_store_key(vdev, key_index,