qcacld-3.0: Fix IPA iface not initilized
There is a race condition of vdev_to_iface, it is referenced in IPA W2I callback routine, but it's updated after IPA enable operation. If frames received right after IPA enabled, callback function will return failure due to vdev_to_iface value is not filled. Change-Id: Iff831b66771539d1de4af89e395821dc50d13af3 CRs-Fixed: 2517515
This commit is contained in:
@@ -1865,6 +1865,9 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ipa_ctx->vdev_to_iface[session_id] =
|
||||||
|
wlan_ipa_get_ifaceid(ipa_ctx, session_id);
|
||||||
|
|
||||||
if (wlan_ipa_uc_sta_is_enabled(ipa_ctx->config) &&
|
if (wlan_ipa_uc_sta_is_enabled(ipa_ctx->config) &&
|
||||||
(ipa_ctx->sap_num_connected_sta > 0 ||
|
(ipa_ctx->sap_num_connected_sta > 0 ||
|
||||||
wlan_ipa_is_sta_only_offload_enabled()) &&
|
wlan_ipa_is_sta_only_offload_enabled()) &&
|
||||||
@@ -1890,13 +1893,12 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
|
|||||||
SIR_STA_RX_DATA_OFFLOAD,
|
SIR_STA_RX_DATA_OFFLOAD,
|
||||||
session_id,
|
session_id,
|
||||||
false);
|
false);
|
||||||
|
ipa_ctx->vdev_to_iface[session_id] =
|
||||||
|
WLAN_IPA_MAX_SESSION;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ipa_ctx->vdev_to_iface[session_id] =
|
|
||||||
wlan_ipa_get_ifaceid(ipa_ctx, session_id);
|
|
||||||
|
|
||||||
ipa_ctx->sta_connected = 1;
|
ipa_ctx->sta_connected = 1;
|
||||||
|
|
||||||
qdf_mutex_release(&ipa_ctx->event_lock);
|
qdf_mutex_release(&ipa_ctx->event_lock);
|
||||||
|
Reference in New Issue
Block a user