qcacld-3.0: Avoid failing driver when cesium_nl_sock failed

qcacld-2.0 to qcacld-3.0 propagation

In the dual wifi instances, the 2nd cesium_nl_sock initialization
will fail due to the first driver has registered the socket.

This doesn't have to fail the driver to be up running, so simply
print a warning in this case.

Also add a check in the case to use the cesium_nl_sock to make sure
it is properly used only when it is initialized.

Change-Id: Ia62d606c1400b437f08c28951d6a6a77428f73b1
CRs-fixed: 995038
Cette révision appartient à :
Ryan Hsu
2016-04-28 10:19:38 -07:00
révisé par Gerrit - the friendly Code Review server
Parent da5a6823b1
révision 5e2e20529e
2 fichiers modifiés avec 3 ajouts et 6 suppressions

Voir le fichier

@@ -2422,7 +2422,7 @@ static void hdd_tx_fail_ind_callback(uint8_t *MacAddr, uint8_t seqNo)
payload_len = ETH_ALEN;
if (0 == cesium_pid) {
if (0 == cesium_pid || cesium_nl_srv_sock == NULL) {
hdd_err("cesium process not registered");
return;
}

Voir le fichier

@@ -3935,10 +3935,8 @@ static int hdd_init_netlink_services(hdd_context_t *hdd_ctx)
}
ret = hdd_open_cesium_nl_sock();
if (ret) {
hdd_alert("hdd_open_cesium_nl_sock failed");
goto err_ptt_deactivate;
}
if (ret)
hdd_warn("hdd_open_cesium_nl_sock failed");
ret = cnss_diag_activate_service();
if (ret) {
@@ -3950,7 +3948,6 @@ static int hdd_init_netlink_services(hdd_context_t *hdd_ctx)
err_close_cesium:
hdd_close_cesium_nl_sock();
err_ptt_deactivate:
ptt_sock_deactivate_svc();
err_nl_srv:
nl_srv_exit();