Parcourir la source

qcacld-3.0: Cleanup iface if net_dev changed for same vdev

If adapter is changed for a particular vdev and
QDF_IPA_AP_DISCONNECT event was not sent to IPA event
handler when the earlier adapter went down, iface is not
cleaned up.
To fix this, cleaning up the interface when new interface
is being setup for the same vdev and net_dev is not matching.

Change-Id: Icb227df8ef31e9c2c904873559e3b33f05fc03b5
CRs-Fixed: 2777672
Ananya Gupta il y a 4 ans
Parent
commit
ed8fecee78
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      components/ipa/core/src/wlan_ipa_core.c

+ 5 - 2
components/ipa/core/src/wlan_ipa_core.c

@@ -1525,8 +1525,11 @@ static QDF_STATUS wlan_ipa_setup_iface(struct wlan_ipa_priv *ipa_ctx,
 				}
 
 				ipa_err("Obsolete iface %u found, device_mode %u, will remove it.",
-					i,
-					iface_context->device_mode);
+					i, iface_context->device_mode);
+				wlan_ipa_cleanup_iface(iface_context);
+			} else if (iface_context->session_id == session_id) {
+				ipa_err("Obsolete iface %u found, net_dev %pK, will remove it.",
+					i, iface_context->dev);
 				wlan_ipa_cleanup_iface(iface_context);
 			}
 		}