mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 08:12:53 +00:00
To keep fork as closely synced with upstream, move NSS packages back into repository. Not sure why they were moved out from my original fork. * nss-firmware * qca-nss-crypto * qca-nss-cfi Removed the following: * mhz (already available in packages repo) * qrtr (unecessary, and has been broken for years) Also moved packages out of `qca` and back into root directory.
241 lines
11 KiB
Diff
241 lines
11 KiB
Diff
diff --git a/wifi_meshmgr/nss_wifi_meshmgr.c b/wifi_meshmgr/nss_wifi_meshmgr.c
|
|
index 498ed35..c8002c8 100644
|
|
--- 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_num(int32_t if_num, enum nss_dynamic_inte
|
|
*/
|
|
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(struct nss_wifi_meshmgr_mesh_ctx *wmesh_ctx
|
|
* 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(struct nss_wifi_meshmgr_mesh_ctx *wmesh_ctx
|
|
* 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);
|
|
}
|
|
@@ -257,10 +257,10 @@ static void nss_wifi_meshmgr_tx_msg_cb(void *app_data, struct nss_cmn_msg *ncm)
|
|
/*
|
|
* 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);
|
|
@@ -289,10 +289,10 @@ static nss_wifi_meshmgr_status_t nss_wifi_meshmgr_tx_msg_sync(struct nss_wifi_me
|
|
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;
|
|
}
|
|
@@ -324,7 +324,7 @@ nss_wifi_meshmgr_status_t nss_wifi_meshmgr_tx_buf(nss_wifi_mesh_handle_t mesh_ha
|
|
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;
|
|
}
|
|
@@ -548,10 +548,10 @@ nss_wifi_meshmgr_dump_mesh_path_sync(nss_wifi_mesh_handle_t mesh_handle)
|
|
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);
|
|
@@ -643,10 +643,10 @@ nss_wifi_meshmgr_dump_mesh_proxy_path_sync(nss_wifi_mesh_handle_t mesh_handle)
|
|
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);
|
|
@@ -715,7 +715,7 @@ nss_wifi_meshmgr_assoc_link_vap(nss_wifi_mesh_handle_t mesh_handle, struct nss_w
|
|
/*
|
|
* 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);
|
|
}
|
|
@@ -761,10 +761,10 @@ nss_wifi_meshmgr_assoc_link_vap_sync(nss_wifi_mesh_handle_t mesh_handle, struct
|
|
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);
|
|
@@ -886,10 +886,10 @@ nss_wifi_meshmgr_mesh_config_update_sync(nss_wifi_mesh_handle_t mesh_handle, str
|
|
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);
|
|
@@ -985,10 +985,10 @@ nss_wifi_meshmgr_mesh_proxy_path_delete_sync(nss_wifi_mesh_handle_t mesh_handle,
|
|
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);
|
|
@@ -1084,10 +1084,10 @@ nss_wifi_meshmgr_mesh_proxy_path_update_sync(nss_wifi_mesh_handle_t mesh_handle,
|
|
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);
|
|
@@ -1183,10 +1183,10 @@ nss_wifi_meshmgr_mesh_proxy_path_add_sync(nss_wifi_mesh_handle_t mesh_handle, st
|
|
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);
|
|
@@ -1282,10 +1282,10 @@ nss_wifi_meshmgr_mesh_path_delete_sync(nss_wifi_mesh_handle_t mesh_handle, struc
|
|
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);
|
|
@@ -1381,10 +1381,10 @@ nss_wifi_meshmgr_mesh_path_add_sync(nss_wifi_mesh_handle_t mesh_handle, struct 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);
|
|
return nss_status;
|
|
@@ -1479,10 +1479,10 @@ nss_wifi_meshmgr_mesh_path_update_sync(nss_wifi_mesh_handle_t mesh_handle, struc
|
|
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);
|
|
@@ -1578,10 +1578,10 @@ nss_wifi_meshmgr_mesh_path_exception_sync(nss_wifi_mesh_handle_t mesh_handle,str
|
|
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);
|
|
@@ -1702,10 +1702,10 @@ nss_wifi_meshmgr_config_mesh_exception_sync(nss_wifi_mesh_handle_t mesh_handle,s
|
|
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);
|
|
@@ -1795,7 +1795,7 @@ nss_wifi_mesh_handle_t nss_wifi_meshmgr_if_create_sync(struct net_device *dev, s
|
|
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);
|