[qca-nss-clients] Modify capwapmgr & profiler for compilation
Modify internal variables and header file inclusion for capwapmgr
& profiler for successful compilation of the modules.
Change-Id: I4bb23fe013f154125a47bf2e3e82c02efa2bea5f
Signed-off-by: Sundarajan Srinivasan <sundaraj@codeaurora.org>
diff --git a/capwapmgr/nss_capwapmgr.c b/capwapmgr/nss_capwapmgr.c
index 4e8bb6b..b877d72 100644
--- a/capwapmgr/nss_capwapmgr.c
+++ b/capwapmgr/nss_capwapmgr.c
@@ -35,7 +35,6 @@
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <nss_api_if.h>
-#include "nss_core.h"
#include <linux/in.h>
#include <nss_api_if.h>
#include <nss_cmn.h>
@@ -60,6 +59,9 @@
/*
* NSS capwap mgr debug macros
*/
+
+#define NSS_CAPWAPMGR_NORMAL_FRAME_MTU 1500
+
#if (NSS_CAPWAPMGR_DEBUG_LEVEL < 1)
#define nss_capwapmgr_assert(fmt, args...)
#else
@@ -415,7 +417,7 @@
int i;
int err;
- ndev = alloc_netdev(sizeof(struct netdev_priv_instance),
+ ndev = alloc_netdev(sizeof(struct nss_capwapmgr_priv),
"nsscapwap%d", nss_capwapmgr_dummpy_netdev_setup);
if (!ndev) {
nss_capwapmgr_warn("Error allocating netdev\n");
@@ -738,7 +740,7 @@
*/
if (r->response != NSS_CMN_RESPONSE_ACK) {
up(&r->sem);
- nss_warning("%p: CAPWAP command msg response : %d, error:%d\n", ctx,
+ nss_capwapmgr_warn("%p: CAPWAP command msg response : %d, error:%d\n", ctx,
r->response, r->error);
return nss_capwap_remap_error(r->error);
}
@@ -786,7 +788,7 @@
}
if (msg->decap.max_buffer_size == 0) {
- msg->decap.max_buffer_size = htonl(ctx->max_buf_size);
+ msg->decap.max_buffer_size = htonl(nss_capwap_get_max_buf_size(ctx));
}
if (ntohl(msg->encap.path_mtu) > NSS_CAPWAP_MAX_MTU) {
@@ -794,7 +796,7 @@
}
if (msg->encap.path_mtu == 0) {
- msg->encap.path_mtu = htonl(NSS_GMAC_NORMAL_FRAME_MTU);
+ msg->encap.path_mtu = htonl(NSS_CAPWAPMGR_NORMAL_FRAME_MTU);
}
/*
diff --git a/profiler/profile.c b/profiler/profile.c
index e082bd7..b9c5d24 100644
--- a/profiler/profile.c
+++ b/profiler/profile.c
@@ -33,9 +33,7 @@
#include <asm/uaccess.h>
#include <asm/page.h>
#include <asm/thread_info.h>
-
-#define NSS_PKT_STATS_ENABLED 0 /* nss_core.h has no default DEF for NSS_PKT_STATS_ENABLED */
-#include "nss_core.h" /* needs only the number of NSS CORES */
+#include <nss_api_if.h>
#include "profilenode.h"
#include "profpkt.h"
@@ -720,7 +718,7 @@
{
switch (ncm->response) {
default:
- nss_warning("%p: profiler had error response %d\n", nss_ctx, ncm->response);
+ profileWarn("%p: profiler had error response %d\n", nss_ctx, ncm->response);
/*
* fail through -- no plan to do anything yet
*/