Răsfoiți Sursa

qcacld-3.0: Fix set_mac_address failure

Host driver opens adapter with ML-support having 2 vdevs and
1 MLD self peer. Now, during runtime, the country changes to
a non-11be supported region. This is followed by a set mac
address request from userspace, but since the EHT support
is disabled due to country change, the driver tries to
lookup the self peer using link mac address. But, since the
peer is created using MLD mac, the set mac address fails
leading to issues with DP-peer creation during connection.

To fix this, remove the EHT capability check from the adapter
routine and look up the peers and mac address only based on
the ML adapter configuration.

Change-Id: Iaabdf6c6b59d3b168c719b6dc0afd272a5725912
CRs-Fixed: 3800291
Surya Prakash Sivaraj 1 an în urmă
părinte
comite
8cf3cbfcd7
2 a modificat fișierele cu 5 adăugiri și 7 ștergeri
  1. 3 3
      core/hdd/src/wlan_hdd_mlo.c
  2. 2 4
      core/sme/src/common/sme_api.c

+ 3 - 3
core/hdd/src/wlan_hdd_mlo.c

@@ -456,7 +456,7 @@ int hdd_update_vdev_mac_address(struct hdd_adapter *adapter,
 				struct qdf_mac_addr mac_addr)
 {
 	int idx, i, ret = 0;
-	bool eht_capab, update_self_peer;
+	bool update_self_peer;
 	QDF_STATUS status;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	struct wlan_hdd_link_info *link_info;
@@ -467,8 +467,8 @@ int hdd_update_vdev_mac_address(struct hdd_adapter *adapter,
 	 * For SAP mode, hdd_hostapd_set_mac_address() is the entry point for
 	 * MAC address update.
 	 */
-	ucfg_psoc_mlme_get_11be_capab(hdd_ctx->psoc, &eht_capab);
-	if (!(eht_capab && hdd_adapter_is_ml_adapter(adapter))) {
+
+	if (!hdd_adapter_is_ml_adapter(adapter)) {
 		struct qdf_mac_addr mld_addr = QDF_MAC_ADDR_ZERO_INIT;
 
 		ret = hdd_dynamic_mac_address_set(adapter->deflink, mac_addr,

+ 2 - 4
core/sme/src/common/sme_api.c

@@ -16809,7 +16809,6 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_vdev *vdev,
 	struct wlan_objmgr_peer *peer;
 	struct vdev_mlme_obj *vdev_mlme;
 	struct wlan_objmgr_psoc *psoc;
-	bool eht_enab = false;
 
 	psoc = wlan_vdev_get_psoc(vdev);
 
@@ -16818,9 +16817,8 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_vdev *vdev,
 	if (req_status)
 		goto p2p_self_peer_create;
 
-	ucfg_psoc_mlme_get_11be_capab(psoc, &eht_enab);
 	if (vdev_opmode == QDF_STA_MODE && update_sta_self_peer) {
-		if (eht_enab && update_mld_addr) {
+		if (update_mld_addr) {
 			old_macaddr = wlan_vdev_mlme_get_mldaddr(vdev);
 			new_macaddr = mld_addr.bytes;
 		} else {
@@ -16849,7 +16847,7 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_vdev *vdev,
 	}
 
 	/* Update VDEV MAC address */
-	if (eht_enab && update_mld_addr) {
+	if (update_mld_addr) {
 		if (update_sta_self_peer || vdev_opmode == QDF_SAP_MODE) {
 			qdf_ret_status = wlan_mlo_mgr_update_mld_addr(
 					    (struct qdf_mac_addr *)