qcacld-3.0: Update the IPA interface context if device_mode is different

For wlan_ipa_setup_iface, if found the net_dev is already there,  but the
device_mode is different, will remove this obsolete record and update it
with new interface context for current IPA WLAN event.

Change-Id: Ib9ecd7f7b3b9603c37dc1d69cd0f3a2868c978ec
CRs-Fixed: 2567222
This commit is contained in:
Tiger Yu
2019-11-15 18:08:45 +08:00
committed by nshrivas
parent f90e91efed
commit 564aa84417

View File

@@ -1540,9 +1540,17 @@ static QDF_STATUS wlan_ipa_setup_iface(struct wlan_ipa_priv *ipa_ctx,
for (i = 0; i < WLAN_IPA_MAX_IFACE; i++) {
iface_context = &(ipa_ctx->iface_context[i]);
if (iface_context->dev == net_dev) {
ipa_debug("found iface %u device_mode %u",
i, device_mode);
return QDF_STATUS_SUCCESS;
if (iface_context->device_mode ==
device_mode) {
ipa_debug("found iface %u device_mode %u",
i, device_mode);
return QDF_STATUS_SUCCESS;
}
ipa_err("Obsolete iface %u found, device_mode %u, will remove it.",
i,
iface_context->device_mode);
wlan_ipa_cleanup_iface(iface_context);
}
}
}