mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-17 00:33:40 +00:00
There are significant changes between NSS version 11.4.0.5 and 12.1 (12.0.5), that it doesn't really make sense to use it with older firmware (i.e. using mesh releated features). This change will explicitly link building the proper driver and client packages when FW 12.1 or 11.4 is selected, while also backporting patches from 12.4.
226 lines
9.9 KiB
Diff
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);
|
|
}
|
|
@@ -249,10 +249,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);
|
|
@@ -281,10 +281,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;
|
|
}
|
|
@@ -316,7 +316,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;
|
|
}
|
|
@@ -540,10 +540,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);
|
|
@@ -635,10 +635,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);
|
|
@@ -707,7 +707,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);
|
|
}
|
|
@@ -753,10 +753,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);
|
|
@@ -878,10 +878,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);
|
|
@@ -977,10 +977,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);
|
|
@@ -1076,10 +1076,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);
|
|
@@ -1175,10 +1175,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);
|
|
@@ -1274,10 +1274,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);
|
|
@@ -1373,10 +1373,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;
|
|
@@ -1471,10 +1471,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);
|
|
@@ -1570,10 +1570,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);
|
|
@@ -1663,7 +1663,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);
|