qcacld-3.0: send CLIENT_CONNECT message to IPA after enable WDI pipes

qcacld-2.0 to qcacld-3.0 propagation

Since CLIENT_CONNECT message is sent to IPA before enabling WDI pipes,
CLIENT_CONNECT message count could be more than CLIENT_DISCONNECT
count, and this could cause an abnormal behavior in the IPACM.

Change-Id: I03d30c7f82aadf83979084b7e65b8ed14565588d
CRs-fixed: 941894
This commit is contained in:
Yun Park 2015-12-08 10:22:42 -08:00 • committed by Satish Singh
commit 312f71a503

View file

@ -3795,6 +3795,24 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
cdf_mutex_release(&hdd_ipa->event_lock);
return 0;
}
/* Enable IPA UC Data PIPEs when first STA connected */
if ((0 == hdd_ipa->sap_num_connected_sta) &&
(!hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) ||
!hdd_ipa->sta_connected)) {
ret = hdd_ipa_uc_handle_first_con(hdd_ipa);
if (ret) {
cdf_mutex_release(&hdd_ipa->event_lock);
HDD_IPA_LOG(CDF_TRACE_LEVEL_ERROR,
"%s: handle 1st con ret %d",
adapter->dev->name, ret);
return ret;
}
}
hdd_ipa->sap_num_connected_sta++;
hdd_ipa->pending_cons_req = false;
cdf_mutex_release(&hdd_ipa->event_lock);
meta.msg_type = type;
@ -3830,27 +3848,6 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
return ret;
}
hdd_ipa->stats.num_send_msg++;
cdf_mutex_acquire(&hdd_ipa->event_lock);
/* Enable IPA UC Data PIPEs when first STA connected */
if ((0 == hdd_ipa->sap_num_connected_sta)
&& (!hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx)
|| !hdd_ipa->sta_connected)) {
ret = hdd_ipa_uc_handle_first_con(hdd_ipa);
if (ret) {
cdf_mutex_release(&hdd_ipa->event_lock);
HDD_IPA_LOG(CDF_TRACE_LEVEL_ERROR,
"%s: handle 1st con ret %d",
adapter->dev->name, ret);
return ret;
}
}
hdd_ipa->sap_num_connected_sta++;
hdd_ipa->pending_cons_req = false;
cdf_mutex_release(&hdd_ipa->event_lock);
return ret;
case WLAN_CLIENT_DISCONNECT: