nss-packages-qosmio/qca-nss-clients/patches-11.4/0019-wifi-meshmgr-fix-uninitialized-and-implicit.patch
2024-03-11 15:53:55 -04:00

226 lines
9.9 KiB
Diff

--- a/wifi_meshmgr/nss_wifi_meshmgr.c
+++ b/wifi_meshmgr/nss_wifi_meshmgr.c
@@ -49,7 +49,7 @@ static bool nss_wifi_meshmgr_verify_if_n
*/
static nss_wifi_meshmgr_status_t nss_wifi_meshmgr_tx_msg(struct nss_wifi_mesh_msg *msg)
{
- return nss_wifi_mesh_tx_msg(wmgr_ctx.nss_ctx, msg);
+ return (nss_wifi_meshmgr_status_t)nss_wifi_mesh_tx_msg(wmgr_ctx.nss_ctx, msg);
}
/*
@@ -126,7 +126,7 @@ static void nss_wifi_meshmgr_cleanup(str
* Unregister and dealloc decap DI.
*/
nss_unregister_wifi_mesh_if(decap_ifnum);
- nss_status = nss_dynamic_interface_dealloc_node(decap_ifnum, NSS_DYNAMIC_INTERFACE_TYPE_WIFI_MESH_OUTER);
+ nss_status = (nss_wifi_meshmgr_status_t)nss_dynamic_interface_dealloc_node(decap_ifnum, NSS_DYNAMIC_INTERFACE_TYPE_WIFI_MESH_OUTER);
if (nss_status != NSS_WIFI_MESHMGR_SUCCESS) {
nss_wifi_meshmgr_warn("%px: Failed to dealloc decap: %d\n", &wmgr_ctx, nss_status);
}
@@ -135,7 +135,7 @@ static void nss_wifi_meshmgr_cleanup(str
* Unregister and dealloc encap DI.
*/
nss_unregister_wifi_mesh_if(encap_ifnum);
- nss_status = nss_dynamic_interface_dealloc_node(encap_ifnum, NSS_DYNAMIC_INTERFACE_TYPE_WIFI_MESH_INNER);
+ nss_status = (nss_wifi_meshmgr_status_t)nss_dynamic_interface_dealloc_node(encap_ifnum, NSS_DYNAMIC_INTERFACE_TYPE_WIFI_MESH_INNER);
if (nss_status != NSS_WIFI_MESHMGR_SUCCESS) {
nss_wifi_meshmgr_warn("%px: Failed to dealloc encap: %d\n", &wmgr_ctx, nss_status);
}
@@ -253,10 +253,10 @@ static void nss_wifi_meshmgr_tx_msg_cb(v
/*
* FIXME: The wmesh_ctx can be invalid if the memory goes away with the caller being timedout.
*/
- wmesh_ctx->response = NSS_WIFI_MESHMGR_SUCCESS;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_SUCCESS;
if (ncm->response != NSS_CMN_RESPONSE_ACK) {
nss_wifi_meshmgr_warn("%px: WiFi-Mesh error response %d error_code: %u\n", &wmgr_ctx, ncm->response, error_code);
- wmesh_ctx->response = nss_wifi_meshmgr_remap_error(error_code);
+ wmesh_ctx->response = (nss_tx_status_t)nss_wifi_meshmgr_remap_error(error_code);
}
complete(&wmesh_ctx->complete);
@@ -285,10 +285,10 @@ static nss_wifi_meshmgr_status_t nss_wif
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- status = wmesh_ctx->response;
+ status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
return status;
}
@@ -320,7 +320,7 @@ nss_wifi_meshmgr_status_t nss_wifi_meshm
return NSS_WIFI_MESHMGR_FAILURE;
}
- nss_status = nss_wifi_mesh_tx_buf(wmgr_ctx.nss_ctx, os_buf, encap_ifnum);
+ nss_status = (nss_wifi_meshmgr_status_t)nss_wifi_mesh_tx_buf(wmgr_ctx.nss_ctx, os_buf, encap_ifnum);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
return nss_status;
}
@@ -544,10 +544,10 @@ nss_wifi_meshmgr_dump_mesh_path_sync(nss
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -639,10 +639,10 @@ nss_wifi_meshmgr_dump_mesh_proxy_path_sy
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -711,7 +711,7 @@ nss_wifi_meshmgr_assoc_link_vap(nss_wifi
/*
* Send the link vap mesage to the NSS synchronously.
*/
- nss_status = nss_wifi_vdev_tx_msg(wmgr_ctx.nss_ctx, wifivdevmsg);
+ nss_status = (nss_wifi_meshmgr_status_t)nss_wifi_vdev_tx_msg(wmgr_ctx.nss_ctx, wifivdevmsg);
if (nss_status != NSS_WIFI_MESHMGR_SUCCESS) {
nss_wifi_meshmgr_warn("%px: Mesh link vap association failed: %d.\n", &wmgr_ctx, nss_status);
}
@@ -757,10 +757,10 @@ nss_wifi_meshmgr_assoc_link_vap_sync(nss
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -882,10 +882,10 @@ nss_wifi_meshmgr_mesh_config_update_sync
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -981,10 +981,10 @@ nss_wifi_meshmgr_mesh_proxy_path_delete_
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -1080,10 +1080,10 @@ nss_wifi_meshmgr_mesh_proxy_path_update_
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -1179,10 +1179,10 @@ nss_wifi_meshmgr_mesh_proxy_path_add_syn
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -1278,10 +1278,10 @@ nss_wifi_meshmgr_mesh_path_delete_sync(n
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -1377,10 +1377,10 @@ nss_wifi_meshmgr_mesh_path_add_sync(nss_
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
return nss_status;
@@ -1475,10 +1475,10 @@ nss_wifi_meshmgr_mesh_path_update_sync(n
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -1574,10 +1574,10 @@ nss_wifi_meshmgr_mesh_path_exception_syn
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
if (!ret) {
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
}
- nss_status = wmesh_ctx->response;
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
up(&wmesh_ctx->sem);
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
@@ -1791,7 +1791,7 @@ nss_wifi_mesh_handle_t nss_wifi_meshmgr_
int32_t encap_ifnum, decap_ifnum;
uint32_t features = 0;
nss_wifi_mesh_handle_t mesh_handle;
- nss_wifi_meshmgr_status_t nss_status;
+ nss_wifi_meshmgr_status_t nss_status = NSS_WIFI_MESHMGR_SUCCESS;
struct nss_wifi_meshmgr_mesh_ctx *wmesh_ctx;
spin_lock_bh(&wmgr_ctx.ref_lock);