Sfoglia il codice sorgente

qcacmn: Fix export symbol for multi drivers compile

Update qdf files to use qdf_export_symbol to facilitate multiple
driver module compilation support.

Change-Id: I3bd0068bc2002b48a42da2c8f72bf84d49a6170f
CRs-fixed: 2197751
Manikandan Mohan 7 anni fa
parent
commit
a18b86465c

+ 5 - 1
qdf/linux/src/i_qdf_module.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -55,7 +55,11 @@
 
 #define __qdf_virt_module_name(_name) MODULE_LICENSE("Dual BSD/GPL")
 
+#ifdef WLAN_DISABLE_EXPORT_SYMBOL
+#define __qdf_export_symbol(_sym)
+#else
 #define __qdf_export_symbol(_sym) EXPORT_SYMBOL(_sym)
+#endif
 
 #define __qdf_declare_param(_name, _type) \
 	module_param(_name, _type, 0600)

+ 4 - 3
qdf/linux/src/qdf_defer.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -36,6 +36,7 @@
 #include <linux/workqueue.h>
 
 #include "i_qdf_defer.h"
+#include <qdf_module.h>
 
 /**
  * __qdf_defer_func() - defer work handler
@@ -54,7 +55,7 @@ void __qdf_defer_func(struct work_struct *work)
 	}
 	ctx->fn(ctx->arg);
 }
-EXPORT_SYMBOL(__qdf_defer_func);
+qdf_export_symbol(__qdf_defer_func);
 
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
 /**
@@ -82,4 +83,4 @@ __qdf_defer_delayed_func(struct work_struct *dwork)
 	ctx->fn(ctx->arg);
 }
 #endif
-EXPORT_SYMBOL(__qdf_defer_delayed_func);
+qdf_export_symbol(__qdf_defer_delayed_func);

+ 12 - 12
qdf/linux/src/qdf_event.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -37,7 +37,7 @@
 /* Include Files */
 #include "qdf_event.h"
 #include "qdf_mc_timer.h"
-#include <linux/export.h>
+#include <qdf_module.h>
 
 #ifdef CONFIG_MCL
 static qdf_self_recovery_callback self_recovery_cb;
@@ -94,7 +94,7 @@ QDF_STATUS qdf_event_create(qdf_event_t *event)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_event_create);
+qdf_export_symbol(qdf_event_create);
 
 /**
  * qdf_event_set() - sets a QDF event
@@ -131,7 +131,7 @@ QDF_STATUS qdf_event_set(qdf_event_t *event)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_event_set);
+qdf_export_symbol(qdf_event_set);
 
 /**
  * qdf_event_reset() - resets a QDF event
@@ -170,7 +170,7 @@ QDF_STATUS qdf_event_reset(qdf_event_t *event)
 	INIT_COMPLETION(event->complete);
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_event_reset);
+qdf_export_symbol(qdf_event_reset);
 
 /**
  * qdf_event_destroy() - Destroys a QDF event
@@ -218,7 +218,7 @@ QDF_STATUS qdf_event_destroy(qdf_event_t *event)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_event_destroy);
+qdf_export_symbol(qdf_event_destroy);
 
 /**
  * qdf_wait_single_event() - Waits for a single event to be set.
@@ -275,7 +275,7 @@ QDF_STATUS qdf_wait_single_event(qdf_event_t *event, uint32_t timeout)
 	}
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_wait_single_event);
+qdf_export_symbol(qdf_wait_single_event);
 
 /**
  * qdf_complete_wait_events() - Sets all the events which are in the list.
@@ -314,7 +314,7 @@ void qdf_complete_wait_events(void)
 	}
 	qdf_spin_unlock(&qdf_wait_event_lock);
 }
-EXPORT_SYMBOL(qdf_complete_wait_events);
+qdf_export_symbol(qdf_complete_wait_events);
 
 /**
  * qdf_wait_for_event_completion() - Waits for an event to be set.
@@ -416,7 +416,7 @@ err_list_add:
 	qdf_mem_free(event_node);
 	return status;
 }
-EXPORT_SYMBOL(qdf_wait_for_event_completion);
+qdf_export_symbol(qdf_wait_for_event_completion);
 
 /**
  * qdf_event_list_init() - Creates a list and spinlock for events.
@@ -432,7 +432,7 @@ void qdf_event_list_init(void)
 	qdf_list_create(&qdf_wait_event_list, MAX_WAIT_EVENTS);
 	qdf_spinlock_create(&qdf_wait_event_lock);
 }
-EXPORT_SYMBOL(qdf_event_list_init);
+qdf_export_symbol(qdf_event_list_init);
 
 /**
  * qdf_event_list_destroy() - Destroys list and spinlock created for events.
@@ -447,7 +447,7 @@ void qdf_event_list_destroy(void)
 	qdf_list_destroy(&qdf_wait_event_list);
 	qdf_spinlock_destroy(&qdf_wait_event_lock);
 }
-EXPORT_SYMBOL(qdf_event_list_destroy);
+qdf_export_symbol(qdf_event_list_destroy);
 
 QDF_STATUS qdf_exit_thread(QDF_STATUS status)
 {
@@ -458,7 +458,7 @@ QDF_STATUS qdf_exit_thread(QDF_STATUS status)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_exit_thread);
+qdf_export_symbol(qdf_exit_thread);
 
 #ifdef CONFIG_MCL
 void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback)

+ 13 - 13
qdf/linux/src/qdf_list.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -35,7 +35,7 @@
 
 /* Include files */
 #include <qdf_list.h>
-#include <linux/export.h>
+#include <qdf_module.h>
 
 /* Function declarations and documenation */
 
@@ -47,7 +47,7 @@ QDF_STATUS qdf_list_insert_before(qdf_list_t *list,
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_insert_before);
+qdf_export_symbol(qdf_list_insert_before);
 
 QDF_STATUS qdf_list_insert_after(qdf_list_t *list,
 	qdf_list_node_t *new_node, qdf_list_node_t *node)
@@ -57,7 +57,7 @@ QDF_STATUS qdf_list_insert_after(qdf_list_t *list,
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_insert_after);
+qdf_export_symbol(qdf_list_insert_after);
 
 /**
  * qdf_list_insert_front() - insert input node at front of the list
@@ -72,7 +72,7 @@ QDF_STATUS qdf_list_insert_front(qdf_list_t *list, qdf_list_node_t *node)
 	list->count++;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_insert_front);
+qdf_export_symbol(qdf_list_insert_front);
 
 /**
  * qdf_list_insert_back() - insert input node at back of the list
@@ -87,7 +87,7 @@ QDF_STATUS qdf_list_insert_back(qdf_list_t *list, qdf_list_node_t *node)
 	list->count++;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_insert_back);
+qdf_export_symbol(qdf_list_insert_back);
 
 /**
  * qdf_list_insert_back_size() - insert input node at back of list and save
@@ -106,7 +106,7 @@ QDF_STATUS qdf_list_insert_back_size(qdf_list_t *list,
 	*p_size = list->count;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_insert_back_size);
+qdf_export_symbol(qdf_list_insert_back_size);
 
 /**
  * qdf_list_remove_front() - remove node from front of the list
@@ -129,7 +129,7 @@ QDF_STATUS qdf_list_remove_front(qdf_list_t *list, qdf_list_node_t **node2)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_remove_front);
+qdf_export_symbol(qdf_list_remove_front);
 
 /**
  * qdf_list_remove_back() - remove node from end of the list
@@ -152,7 +152,7 @@ QDF_STATUS qdf_list_remove_back(qdf_list_t *list, qdf_list_node_t **node2)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_remove_back);
+qdf_export_symbol(qdf_list_remove_back);
 
 /**
  * qdf_list_has_node() - check if a node is in a list
@@ -197,7 +197,7 @@ QDF_STATUS qdf_list_remove_node(qdf_list_t *list,
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_remove_node);
+qdf_export_symbol(qdf_list_remove_node);
 
 /**
  * qdf_list_peek_front() - peek front node from list
@@ -217,7 +217,7 @@ QDF_STATUS qdf_list_peek_front(qdf_list_t *list, qdf_list_node_t **node2)
 	*node2 = listptr;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_peek_front);
+qdf_export_symbol(qdf_list_peek_front);
 
 /**
  * qdf_list_peek_next() - peek next node of input node in the list
@@ -244,7 +244,7 @@ QDF_STATUS qdf_list_peek_next(qdf_list_t *list,
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_list_peek_next);
+qdf_export_symbol(qdf_list_peek_next);
 
 /**
  * qdf_list_empty() - check if the list is empty
@@ -256,4 +256,4 @@ bool qdf_list_empty(qdf_list_t *list)
 {
 	return list_empty(&list->anchor);
 }
-EXPORT_SYMBOL(qdf_list_empty);
+qdf_export_symbol(qdf_list_empty);

+ 29 - 28
qdf/linux/src/qdf_lock.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -28,6 +28,7 @@
 #include <linux/module.h>
 #include <qdf_lock.h>
 #include <qdf_trace.h>
+#include <qdf_module.h>
 
 #include <qdf_types.h>
 #ifdef CONFIG_MCL
@@ -79,7 +80,7 @@ QDF_STATUS qdf_mutex_create(qdf_mutex_t *lock, const char *func, int line)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_mutex_create);
+qdf_export_symbol(qdf_mutex_create);
 
 /**
  * qdf_mutex_acquire() - acquire a QDF lock
@@ -157,7 +158,7 @@ QDF_STATUS qdf_mutex_acquire(qdf_mutex_t *lock)
 	QDF_ASSERT(0);
 	return QDF_STATUS_E_FAILURE;
 }
-EXPORT_SYMBOL(qdf_mutex_acquire);
+qdf_export_symbol(qdf_mutex_acquire);
 
 /**
  * qdf_mutex_release() - release a QDF lock
@@ -238,7 +239,7 @@ QDF_STATUS qdf_mutex_release(qdf_mutex_t *lock)
 #endif
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_mutex_release);
+qdf_export_symbol(qdf_mutex_release);
 
 /**
  * qdf_wake_lock_name() - This function returns the name of the wakelock
@@ -261,7 +262,7 @@ const char *qdf_wake_lock_name(qdf_wake_lock_t *lock)
 	return "NO_WAKELOCK_SUPPORT";
 }
 #endif
-EXPORT_SYMBOL(qdf_wake_lock_name);
+qdf_export_symbol(qdf_wake_lock_name);
 
 /**
  * qdf_wake_lock_create() - initializes a wake lock
@@ -284,7 +285,7 @@ QDF_STATUS qdf_wake_lock_create(qdf_wake_lock_t *lock, const char *name)
 	return QDF_STATUS_SUCCESS;
 }
 #endif
-EXPORT_SYMBOL(qdf_wake_lock_create);
+qdf_export_symbol(qdf_wake_lock_create);
 
 /**
  * qdf_wake_lock_acquire() - acquires a wake lock
@@ -312,7 +313,7 @@ QDF_STATUS qdf_wake_lock_acquire(qdf_wake_lock_t *lock, uint32_t reason)
 	return QDF_STATUS_SUCCESS;
 }
 #endif
-EXPORT_SYMBOL(qdf_wake_lock_acquire);
+qdf_export_symbol(qdf_wake_lock_acquire);
 
 /**
  * qdf_wake_lock_timeout_acquire() - acquires a wake lock with a timeout
@@ -338,7 +339,7 @@ QDF_STATUS qdf_wake_lock_timeout_acquire(qdf_wake_lock_t *lock, uint32_t msec)
 	return QDF_STATUS_SUCCESS;
 }
 #endif
-EXPORT_SYMBOL(qdf_wake_lock_timeout_acquire);
+qdf_export_symbol(qdf_wake_lock_timeout_acquire);
 
 /**
  * qdf_wake_lock_release() - releases a wake lock
@@ -366,7 +367,7 @@ QDF_STATUS qdf_wake_lock_release(qdf_wake_lock_t *lock, uint32_t reason)
 	return QDF_STATUS_SUCCESS;
 }
 #endif
-EXPORT_SYMBOL(qdf_wake_lock_release);
+qdf_export_symbol(qdf_wake_lock_release);
 
 /**
  * qdf_wake_lock_destroy() - destroys a wake lock
@@ -388,7 +389,7 @@ QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock)
 	return QDF_STATUS_SUCCESS;
 }
 #endif
-EXPORT_SYMBOL(qdf_wake_lock_destroy);
+qdf_export_symbol(qdf_wake_lock_destroy);
 
 #ifdef CONFIG_MCL
 /**
@@ -424,7 +425,7 @@ QDF_STATUS qdf_runtime_pm_get(void)
 		return QDF_STATUS_E_FAILURE;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_runtime_pm_get);
+qdf_export_symbol(qdf_runtime_pm_get);
 
 /**
  * qdf_runtime_pm_put() - do a put opperation on the device
@@ -457,7 +458,7 @@ QDF_STATUS qdf_runtime_pm_put(void)
 		return QDF_STATUS_E_FAILURE;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_runtime_pm_put);
+qdf_export_symbol(qdf_runtime_pm_put);
 
 /**
  * qdf_runtime_pm_prevent_suspend() - prevent a runtime bus suspend
@@ -487,7 +488,7 @@ QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t *lock)
 		return QDF_STATUS_E_FAILURE;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_runtime_pm_prevent_suspend);
+qdf_export_symbol(qdf_runtime_pm_prevent_suspend);
 
 /**
  * qdf_runtime_pm_allow_suspend() - prevent a runtime bus suspend
@@ -516,7 +517,7 @@ QDF_STATUS qdf_runtime_pm_allow_suspend(qdf_runtime_lock_t *lock)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_runtime_pm_allow_suspend);
+qdf_export_symbol(qdf_runtime_pm_allow_suspend);
 
 /**
  * qdf_runtime_lock_init() - initialize runtime lock
@@ -537,7 +538,7 @@ QDF_STATUS __qdf_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_runtime_lock_init);
+qdf_export_symbol(__qdf_runtime_lock_init);
 
 /**
  * qdf_runtime_lock_deinit() - deinitialize runtime pm lock
@@ -552,7 +553,7 @@ void qdf_runtime_lock_deinit(qdf_runtime_lock_t *lock)
 	void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
 	hif_runtime_lock_deinit(hif_ctx, lock->lock);
 }
-EXPORT_SYMBOL(qdf_runtime_lock_deinit);
+qdf_export_symbol(qdf_runtime_lock_deinit);
 
 #else
 
@@ -560,36 +561,36 @@ QDF_STATUS qdf_runtime_pm_get(void)
 {
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_runtime_pm_get);
+qdf_export_symbol(qdf_runtime_pm_get);
 
 QDF_STATUS qdf_runtime_pm_put(void)
 {
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_runtime_pm_put);
+qdf_export_symbol(qdf_runtime_pm_put);
 
 QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t *lock)
 {
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_runtime_pm_prevent_suspend);
+qdf_export_symbol(qdf_runtime_pm_prevent_suspend);
 
 QDF_STATUS qdf_runtime_pm_allow_suspend(qdf_runtime_lock_t *lock)
 {
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_runtime_pm_allow_suspend);
+qdf_export_symbol(qdf_runtime_pm_allow_suspend);
 
 QDF_STATUS __qdf_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name)
 {
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_runtime_lock_init);
+qdf_export_symbol(__qdf_runtime_lock_init);
 
 void qdf_runtime_lock_deinit(qdf_runtime_lock_t *lock)
 {
 }
-EXPORT_SYMBOL(qdf_runtime_lock_deinit);
+qdf_export_symbol(qdf_runtime_lock_deinit);
 
 #endif /* CONFIG_MCL */
 
@@ -605,7 +606,7 @@ QDF_STATUS qdf_spinlock_acquire(qdf_spinlock_t *lock)
 	spin_lock(&lock->lock.spinlock);
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_spinlock_acquire);
+qdf_export_symbol(qdf_spinlock_acquire);
 
 
 /**
@@ -620,7 +621,7 @@ QDF_STATUS qdf_spinlock_release(qdf_spinlock_t *lock)
 	spin_unlock(&lock->lock.spinlock);
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_spinlock_release);
+qdf_export_symbol(qdf_spinlock_release);
 
 /**
  * qdf_mutex_destroy() - destroy a QDF lock
@@ -679,7 +680,7 @@ QDF_STATUS qdf_mutex_destroy(qdf_mutex_t *lock)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_mutex_destroy);
+qdf_export_symbol(qdf_mutex_destroy);
 
 /**
  * qdf_spin_trylock_bh_outline() - spin trylock bottomhalf
@@ -690,7 +691,7 @@ int qdf_spin_trylock_bh_outline(qdf_spinlock_t *lock)
 {
 	return qdf_spin_trylock_bh(lock);
 }
-EXPORT_SYMBOL(qdf_spin_trylock_bh_outline);
+qdf_export_symbol(qdf_spin_trylock_bh_outline);
 
 /**
  * qdf_spin_lock_bh_outline() - locks the spinlock in soft irq context
@@ -701,7 +702,7 @@ void qdf_spin_lock_bh_outline(qdf_spinlock_t *lock)
 {
 	qdf_spin_lock_bh(lock);
 }
-EXPORT_SYMBOL(qdf_spin_lock_bh_outline);
+qdf_export_symbol(qdf_spin_lock_bh_outline);
 
 /**
  * qdf_spin_unlock_bh_outline() - unlocks spinlock in soft irq context
@@ -712,7 +713,7 @@ void qdf_spin_unlock_bh_outline(qdf_spinlock_t *lock)
 {
 	qdf_spin_unlock_bh(lock);
 }
-EXPORT_SYMBOL(qdf_spin_unlock_bh_outline);
+qdf_export_symbol(qdf_spin_unlock_bh_outline);
 
 #if QDF_LOCK_STATS_LIST
 struct qdf_lock_cookie {

+ 22 - 22
qdf/linux/src/qdf_mc_timer.c

@@ -37,7 +37,7 @@
 #include "qdf_lock.h"
 #include "qdf_list.h"
 #include "qdf_mem.h"
-#include <linux/export.h>
+#include <qdf_module.h>
 
 /* Preprocessor definitions and constants */
 #define LINUX_TIMER_COOKIE 0x12341234
@@ -55,13 +55,13 @@ inline void qdf_timer_set_multiplier(uint32_t multiplier)
 {
 	g_qdf_timer_multiplier = multiplier;
 }
-EXPORT_SYMBOL(qdf_timer_set_multiplier);
+qdf_export_symbol(qdf_timer_set_multiplier);
 
 inline uint32_t qdf_timer_get_multiplier(void)
 {
 	return g_qdf_timer_multiplier;
 }
-EXPORT_SYMBOL(qdf_timer_get_multiplier);
+qdf_export_symbol(qdf_timer_get_multiplier);
 
 /* Type declarations */
 
@@ -74,7 +74,7 @@ void qdf_register_mc_timer_callback(void (*callback) (unsigned long data))
 {
 	scheduler_timer_callback = callback;
 }
-EXPORT_SYMBOL(qdf_register_mc_timer_callback);
+qdf_export_symbol(qdf_register_mc_timer_callback);
 
 /* Function declarations and documenation */
 
@@ -100,7 +100,7 @@ void qdf_try_allowing_sleep(QDF_TIMER_TYPE type)
 		}
 	}
 }
-EXPORT_SYMBOL(qdf_try_allowing_sleep);
+qdf_export_symbol(qdf_try_allowing_sleep);
 
 /**
  * qdf_mc_timer_get_current_state() - get the current state of the timer
@@ -127,7 +127,7 @@ QDF_TIMER_STATE qdf_mc_timer_get_current_state(qdf_mc_timer_t *timer)
 		return QDF_TIMER_STATE_UNUSED;
 	}
 }
-EXPORT_SYMBOL(qdf_mc_timer_get_current_state);
+qdf_export_symbol(qdf_mc_timer_get_current_state);
 
 /**
  * qdf_timer_module_init() - initializes a QDF timer module.
@@ -143,7 +143,7 @@ void qdf_timer_module_init(void)
 		  "Initializing the QDF MC timer module");
 	qdf_mutex_create(&persistent_timer_count_lock);
 }
-EXPORT_SYMBOL(qdf_timer_module_init);
+qdf_export_symbol(qdf_timer_module_init);
 
 #ifdef TIMER_MANAGER
 
@@ -170,7 +170,7 @@ void qdf_mc_timer_manager_init(void)
 		qdf_list_create(&qdf_timer_domains[i], 1000);
 	qdf_spinlock_create(&qdf_timer_list_lock);
 }
-EXPORT_SYMBOL(qdf_mc_timer_manager_init);
+qdf_export_symbol(qdf_mc_timer_manager_init);
 
 static inline void qdf_mc_timer_panic(void)
 {
@@ -264,7 +264,7 @@ static void qdf_timer_clean(void)
 	for (i = 0; i < QDF_DEBUG_DOMAIN_COUNT; ++i)
 		qdf_mc_timer_free_leaked_timers(&qdf_timer_domains[i]);
 }
-EXPORT_SYMBOL(qdf_timer_clean);
+qdf_export_symbol(qdf_timer_clean);
 
 /**
  * qdf_mc_timer_manager_exit() - exit QDF timer debug functionality
@@ -284,7 +284,7 @@ void qdf_mc_timer_manager_exit(void)
 
 	qdf_spinlock_destroy(&qdf_timer_list_lock);
 }
-EXPORT_SYMBOL(qdf_mc_timer_manager_exit);
+qdf_export_symbol(qdf_mc_timer_manager_exit);
 #endif
 
 /**
@@ -380,7 +380,7 @@ QDF_STATUS qdf_mc_timer_init_debug(qdf_mc_timer_t *timer,
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_mc_timer_init_debug);
+qdf_export_symbol(qdf_mc_timer_init_debug);
 #else
 QDF_STATUS qdf_mc_timer_init(qdf_mc_timer_t *timer, QDF_TIMER_TYPE timer_type,
 			     qdf_mc_timer_callback_t callback,
@@ -413,7 +413,7 @@ QDF_STATUS qdf_mc_timer_init(qdf_mc_timer_t *timer, QDF_TIMER_TYPE timer_type,
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_mc_timer_init);
+qdf_export_symbol(qdf_mc_timer_init);
 #endif
 
 /**
@@ -513,7 +513,7 @@ QDF_STATUS qdf_mc_timer_destroy(qdf_mc_timer_t *timer)
 
 	return v_status;
 }
-EXPORT_SYMBOL(qdf_mc_timer_destroy);
+qdf_export_symbol(qdf_mc_timer_destroy);
 
 #else
 
@@ -600,7 +600,7 @@ QDF_STATUS qdf_mc_timer_destroy(qdf_mc_timer_t *timer)
 
 	return v_status;
 }
-EXPORT_SYMBOL(qdf_mc_timer_destroy);
+qdf_export_symbol(qdf_mc_timer_destroy);
 #endif
 
 /**
@@ -686,7 +686,7 @@ QDF_STATUS qdf_mc_timer_start(qdf_mc_timer_t *timer, uint32_t expiration_time)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_mc_timer_start);
+qdf_export_symbol(qdf_mc_timer_start);
 
 /**
  * qdf_mc_timer_stop() - stop a QDF timer
@@ -741,7 +741,7 @@ QDF_STATUS qdf_mc_timer_stop(qdf_mc_timer_t *timer)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_mc_timer_stop);
+qdf_export_symbol(qdf_mc_timer_stop);
 
 /**
  * qdf_mc_timer_get_system_ticks() - get the system time in 10ms ticks
@@ -759,7 +759,7 @@ unsigned long qdf_mc_timer_get_system_ticks(void)
 {
 	return jiffies_to_msecs(jiffies) / 10;
 }
-EXPORT_SYMBOL(qdf_mc_timer_get_system_ticks);
+qdf_export_symbol(qdf_mc_timer_get_system_ticks);
 
 /**
  * qdf_mc_timer_get_system_time() - Get the system time in milliseconds
@@ -777,7 +777,7 @@ unsigned long qdf_mc_timer_get_system_time(void)
 	do_gettimeofday(&tv);
 	return tv.tv_sec * 1000 + tv.tv_usec / 1000;
 }
-EXPORT_SYMBOL(qdf_mc_timer_get_system_time);
+qdf_export_symbol(qdf_mc_timer_get_system_time);
 
 s64 qdf_get_monotonic_boottime_ns(void)
 {
@@ -786,7 +786,7 @@ s64 qdf_get_monotonic_boottime_ns(void)
 	ktime_get_ts(&ts);
 	return timespec_to_ns(&ts);
 }
-EXPORT_SYMBOL(qdf_get_monotonic_boottime_ns);
+qdf_export_symbol(qdf_get_monotonic_boottime_ns);
 
 qdf_time_t qdf_get_time_of_the_day_ms(void)
 {
@@ -802,7 +802,7 @@ qdf_time_t qdf_get_time_of_the_day_ms(void)
 		(tm.tm_min * 60 * 1000) + (tm.tm_sec * 1000) +
 		(tv.tv_usec / 1000);
 }
-EXPORT_SYMBOL(qdf_get_time_of_the_day_ms);
+qdf_export_symbol(qdf_get_time_of_the_day_ms);
 
 /**
  * qdf_timer_module_deinit() - Deinitializes a QDF timer module.
@@ -816,7 +816,7 @@ void qdf_timer_module_deinit(void)
 		  "De-Initializing the QDF MC timer module");
 	qdf_mutex_destroy(&persistent_timer_count_lock);
 }
-EXPORT_SYMBOL(qdf_timer_module_deinit);
+qdf_export_symbol(qdf_timer_module_deinit);
 
 void qdf_get_time_of_the_day_in_hr_min_sec_usec(char *tbuf, int len)
 {
@@ -833,4 +833,4 @@ void qdf_get_time_of_the_day_in_hr_min_sec_usec(char *tbuf, int len)
 		"[%02d:%02d:%02d.%06lu]",
 		tm.tm_hour, tm.tm_min, tm.tm_sec, tv.tv_usec);
 }
-EXPORT_SYMBOL(qdf_get_time_of_the_day_in_hr_min_sec_usec);
+qdf_export_symbol(qdf_get_time_of_the_day_in_hr_min_sec_usec);

+ 22 - 22
qdf/linux/src/qdf_mem.c

@@ -281,7 +281,7 @@ qdf_mem_header_assert_valid(struct qdf_mem_header *header,
 
 u_int8_t prealloc_disabled = 1;
 qdf_declare_param(prealloc_disabled, byte);
-EXPORT_SYMBOL(prealloc_disabled);
+qdf_export_symbol(prealloc_disabled);
 
 #if defined WLAN_DEBUGFS
 
@@ -770,7 +770,7 @@ int __qdf_mempool_init(qdf_device_t osdev, __qdf_mempool_t *pool_addr,
 	*pool_addr = new_pool;
 	return 0;
 }
-EXPORT_SYMBOL(__qdf_mempool_init);
+qdf_export_symbol(__qdf_mempool_init);
 
 /**
  * __qdf_mempool_destroy() - Destroy memory pool
@@ -798,7 +798,7 @@ void __qdf_mempool_destroy(qdf_device_t osdev, __qdf_mempool_t pool)
 	kfree(pool);
 	osdev->mem_pool[pool_id] = NULL;
 }
-EXPORT_SYMBOL(__qdf_mempool_destroy);
+qdf_export_symbol(__qdf_mempool_destroy);
 
 /**
  * __qdf_mempool_alloc() - Allocate an element memory pool
@@ -831,7 +831,7 @@ void *__qdf_mempool_alloc(qdf_device_t osdev, __qdf_mempool_t pool)
 
 	return buf;
 }
-EXPORT_SYMBOL(__qdf_mempool_alloc);
+qdf_export_symbol(__qdf_mempool_alloc);
 
 /**
  * __qdf_mempool_free() - Free a memory pool element
@@ -857,7 +857,7 @@ void __qdf_mempool_free(qdf_device_t osdev, __qdf_mempool_t pool, void *buf)
 		(&pool->free_list, (mempool_elem_t *)buf, mempool_entry);
 	spin_unlock_bh(&pool->lock);
 }
-EXPORT_SYMBOL(__qdf_mempool_free);
+qdf_export_symbol(__qdf_mempool_free);
 
 /**
  * qdf_mem_alloc_outline() - allocation QDF memory
@@ -877,7 +877,7 @@ qdf_mem_alloc_outline(qdf_device_t osdev, size_t size)
 {
 	return qdf_mem_malloc(size);
 }
-EXPORT_SYMBOL(qdf_mem_alloc_outline);
+qdf_export_symbol(qdf_mem_alloc_outline);
 
 /**
  * qdf_mem_free_outline() - QDF memory free API
@@ -893,7 +893,7 @@ qdf_mem_free_outline(void *buf)
 {
 	qdf_mem_free(buf);
 }
-EXPORT_SYMBOL(qdf_mem_free_outline);
+qdf_export_symbol(qdf_mem_free_outline);
 
 /**
  * qdf_mem_zero_outline() - zero out memory
@@ -910,7 +910,7 @@ qdf_mem_zero_outline(void *buf, qdf_size_t size)
 {
 	qdf_mem_zero(buf, size);
 }
-EXPORT_SYMBOL(qdf_mem_zero_outline);
+qdf_export_symbol(qdf_mem_zero_outline);
 
 #ifdef CONFIG_WCNSS_MEM_PRE_ALLOC
 /**
@@ -1173,7 +1173,7 @@ void *qdf_mem_malloc(size_t size)
 
 	return ptr;
 }
-EXPORT_SYMBOL(qdf_mem_malloc);
+qdf_export_symbol(qdf_mem_malloc);
 
 /**
  * qdf_mem_free() - free QDF memory
@@ -1195,7 +1195,7 @@ void qdf_mem_free(void *ptr)
 
 	kfree(ptr);
 }
-EXPORT_SYMBOL(qdf_mem_free);
+qdf_export_symbol(qdf_mem_free);
 #endif
 
 /**
@@ -1303,7 +1303,7 @@ out_fail:
 	pages->num_pages = 0;
 	return;
 }
-EXPORT_SYMBOL(qdf_mem_multi_pages_alloc);
+qdf_export_symbol(qdf_mem_multi_pages_alloc);
 
 /**
  * qdf_mem_multi_pages_free() - free large size of kernel memory
@@ -1343,7 +1343,7 @@ void qdf_mem_multi_pages_free(qdf_device_t osdev,
 	pages->num_pages = 0;
 	return;
 }
-EXPORT_SYMBOL(qdf_mem_multi_pages_free);
+qdf_export_symbol(qdf_mem_multi_pages_free);
 
 /**
  * qdf_mem_multi_page_link() - Make links for multi page elements
@@ -1405,7 +1405,7 @@ int qdf_mem_multi_page_link(qdf_device_t osdev,
 
 	return 0;
 }
-EXPORT_SYMBOL(qdf_mem_multi_page_link);
+qdf_export_symbol(qdf_mem_multi_page_link);
 
 /**
  * qdf_mem_copy() - copy memory
@@ -1438,7 +1438,7 @@ void qdf_mem_copy(void *dst_addr, const void *src_addr, uint32_t num_bytes)
 	}
 	memcpy(dst_addr, src_addr, num_bytes);
 }
-EXPORT_SYMBOL(qdf_mem_copy);
+qdf_export_symbol(qdf_mem_copy);
 
 /**
  * qdf_mem_zero() - zero out memory
@@ -1464,7 +1464,7 @@ void qdf_mem_zero(void *ptr, uint32_t num_bytes)
 	}
 	memset(ptr, 0, num_bytes);
 }
-EXPORT_SYMBOL(qdf_mem_zero);
+qdf_export_symbol(qdf_mem_zero);
 
 /**
  * qdf_mem_set() - set (fill) memory with a specified byte value.
@@ -1482,7 +1482,7 @@ void qdf_mem_set(void *ptr, uint32_t num_bytes, uint32_t value)
 	}
 	memset(ptr, value, num_bytes);
 }
-EXPORT_SYMBOL(qdf_mem_set);
+qdf_export_symbol(qdf_mem_set);
 
 /**
  * qdf_mem_move() - move memory
@@ -1512,7 +1512,7 @@ void qdf_mem_move(void *dst_addr, const void *src_addr, uint32_t num_bytes)
 	}
 	memmove(dst_addr, src_addr, num_bytes);
 }
-EXPORT_SYMBOL(qdf_mem_move);
+qdf_export_symbol(qdf_mem_move);
 
 #if defined(A_SIMOS_DEVHOST) || defined(HIF_SDIO) || defined(HIF_USB)
 /**
@@ -1716,7 +1716,7 @@ void qdf_mem_dma_sync_single_for_device(qdf_device_t osdev,
 {
 	dma_sync_single_for_device(osdev->dev, bus_addr,  size, direction);
 }
-EXPORT_SYMBOL(qdf_mem_dma_sync_single_for_device);
+qdf_export_symbol(qdf_mem_dma_sync_single_for_device);
 
 /**
  * qdf_mem_dma_sync_single_for_cpu() - assign memory to CPU
@@ -1736,7 +1736,7 @@ void qdf_mem_dma_sync_single_for_cpu(qdf_device_t osdev,
 {
 	dma_sync_single_for_cpu(osdev->dev, bus_addr,  size, direction);
 }
-EXPORT_SYMBOL(qdf_mem_dma_sync_single_for_cpu);
+qdf_export_symbol(qdf_mem_dma_sync_single_for_cpu);
 
 void qdf_mem_init(void)
 {
@@ -1744,7 +1744,7 @@ void qdf_mem_init(void)
 	qdf_mem_debugfs_init();
 	qdf_mem_debug_debugfs_init();
 }
-EXPORT_SYMBOL(qdf_mem_init);
+qdf_export_symbol(qdf_mem_init);
 
 void qdf_mem_exit(void)
 {
@@ -1752,7 +1752,7 @@ void qdf_mem_exit(void)
 	qdf_mem_debugfs_exit();
 	qdf_mem_debug_exit();
 }
-EXPORT_SYMBOL(qdf_mem_exit);
+qdf_export_symbol(qdf_mem_exit);
 
 /**
  * qdf_ether_addr_copy() - copy an Ethernet address
@@ -1775,5 +1775,5 @@ void qdf_ether_addr_copy(void *dst_addr, const void *src_addr)
 	}
 	ether_addr_copy(dst_addr, src_addr);
 }
-EXPORT_SYMBOL(qdf_ether_addr_copy);
+qdf_export_symbol(qdf_ether_addr_copy);
 

+ 65 - 64
qdf/linux/src/qdf_nbuf.c

@@ -48,6 +48,7 @@
 #include <qdf_module.h>
 #include <qdf_atomic.h>
 #include <pld_common.h>
+#include <qdf_module.h>
 
 #if defined(FEATURE_TSO)
 #include <net/ipv6.h>
@@ -165,7 +166,7 @@ void qdf_nbuf_tx_desc_count_display(void)
 			 nbuf_tx_mgmt[QDF_NBUF_TX_PKT_FREE],
 		nbuf_tx_mgmt[QDF_NBUF_TX_PKT_FREE]);
 }
-EXPORT_SYMBOL(qdf_nbuf_tx_desc_count_display);
+qdf_export_symbol(qdf_nbuf_tx_desc_count_display);
 
 /**
  * qdf_nbuf_tx_desc_count_update() - Updates the layer packet counter
@@ -188,7 +189,7 @@ static inline void qdf_nbuf_tx_desc_count_update(uint8_t packet_type,
 		break;
 	}
 }
-EXPORT_SYMBOL(qdf_nbuf_tx_desc_count_update);
+qdf_export_symbol(qdf_nbuf_tx_desc_count_update);
 
 /**
  * qdf_nbuf_tx_desc_count_clear() - Clears packet counter for both data, mgmt
@@ -200,7 +201,7 @@ void qdf_nbuf_tx_desc_count_clear(void)
 	memset(nbuf_tx_mgmt, 0, sizeof(nbuf_tx_mgmt));
 	memset(nbuf_tx_data, 0, sizeof(nbuf_tx_data));
 }
-EXPORT_SYMBOL(qdf_nbuf_tx_desc_count_clear);
+qdf_export_symbol(qdf_nbuf_tx_desc_count_clear);
 
 /**
  * qdf_nbuf_set_state() - Updates the packet state
@@ -230,7 +231,7 @@ void qdf_nbuf_set_state(qdf_nbuf_t nbuf, uint8_t current_state)
 	qdf_nbuf_tx_desc_count_update(packet_type,
 					current_state);
 }
-EXPORT_SYMBOL(qdf_nbuf_set_state);
+qdf_export_symbol(qdf_nbuf_set_state);
 
 #ifdef CONFIG_MCL
 /**
@@ -331,7 +332,7 @@ int __qdf_nbuf_count_get(void)
 {
 	return qdf_atomic_read(&nbuf_count);
 }
-EXPORT_SYMBOL(__qdf_nbuf_count_get);
+qdf_export_symbol(__qdf_nbuf_count_get);
 
 /**
  * __qdf_nbuf_count_inc() - increment nbuf global count
@@ -344,7 +345,7 @@ void __qdf_nbuf_count_inc(qdf_nbuf_t nbuf)
 {
 	qdf_atomic_inc(&nbuf_count);
 }
-EXPORT_SYMBOL(__qdf_nbuf_count_inc);
+qdf_export_symbol(__qdf_nbuf_count_inc);
 
 /**
  * __qdf_nbuf_count_dec() - decrement nbuf global count
@@ -357,7 +358,7 @@ void __qdf_nbuf_count_dec(__qdf_nbuf_t nbuf)
 {
 	qdf_atomic_dec(&nbuf_count);
 }
-EXPORT_SYMBOL(__qdf_nbuf_count_dec);
+qdf_export_symbol(__qdf_nbuf_count_dec);
 #endif
 
 
@@ -506,7 +507,7 @@ skb_alloc:
 	return skb;
 }
 #endif
-EXPORT_SYMBOL(__qdf_nbuf_alloc);
+qdf_export_symbol(__qdf_nbuf_alloc);
 
 /**
  * __qdf_nbuf_free() - free the nbuf its interrupt safe
@@ -538,7 +539,7 @@ void __qdf_nbuf_free(struct sk_buff *skb)
 }
 #endif
 
-EXPORT_SYMBOL(__qdf_nbuf_free);
+qdf_export_symbol(__qdf_nbuf_free);
 
 #ifdef MEMORY_DEBUG
 enum qdf_nbuf_event_type {
@@ -867,7 +868,7 @@ __qdf_nbuf_map(qdf_device_t osdev, struct sk_buff *skb, qdf_dma_dir_t dir)
 
 	return __qdf_nbuf_map_single(osdev, skb, dir);
 }
-EXPORT_SYMBOL(__qdf_nbuf_map);
+qdf_export_symbol(__qdf_nbuf_map);
 
 #else
 QDF_STATUS
@@ -875,7 +876,7 @@ __qdf_nbuf_map(qdf_device_t osdev, struct sk_buff *skb, qdf_dma_dir_t dir)
 {
 	return __qdf_nbuf_map_single(osdev, skb, dir);
 }
-EXPORT_SYMBOL(__qdf_nbuf_map);
+qdf_export_symbol(__qdf_nbuf_map);
 #endif
 /**
  * __qdf_nbuf_unmap() - to unmap a previously mapped buf
@@ -898,7 +899,7 @@ __qdf_nbuf_unmap(qdf_device_t osdev, struct sk_buff *skb,
 	 */
 	__qdf_nbuf_unmap_single(osdev, skb, dir);
 }
-EXPORT_SYMBOL(__qdf_nbuf_unmap);
+qdf_export_symbol(__qdf_nbuf_unmap);
 
 /**
  * __qdf_nbuf_map_single() - map a single buffer to local bus address space
@@ -919,7 +920,7 @@ __qdf_nbuf_map_single(qdf_device_t osdev, qdf_nbuf_t buf, qdf_dma_dir_t dir)
 	BUILD_BUG_ON(sizeof(QDF_NBUF_CB_PADDR(buf)) < sizeof(buf->data));
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_nbuf_map_single);
+qdf_export_symbol(__qdf_nbuf_map_single);
 #else
 QDF_STATUS
 __qdf_nbuf_map_single(qdf_device_t osdev, qdf_nbuf_t buf, qdf_dma_dir_t dir)
@@ -935,7 +936,7 @@ __qdf_nbuf_map_single(qdf_device_t osdev, qdf_nbuf_t buf, qdf_dma_dir_t dir)
 		? QDF_STATUS_E_FAILURE
 		: QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_nbuf_map_single);
+qdf_export_symbol(__qdf_nbuf_map_single);
 #endif
 /**
  * __qdf_nbuf_unmap_single() -  unmap a previously mapped buf
@@ -960,7 +961,7 @@ void __qdf_nbuf_unmap_single(qdf_device_t osdev, qdf_nbuf_t buf,
 			__qdf_dma_dir_to_os(dir));
 }
 #endif
-EXPORT_SYMBOL(__qdf_nbuf_unmap_single);
+qdf_export_symbol(__qdf_nbuf_unmap_single);
 
 /**
  * __qdf_nbuf_set_rx_cksum() - set rx checksum
@@ -990,7 +991,7 @@ __qdf_nbuf_set_rx_cksum(struct sk_buff *skb, qdf_nbuf_rx_cksum_t *cksum)
 	}
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_nbuf_set_rx_cksum);
+qdf_export_symbol(__qdf_nbuf_set_rx_cksum);
 
 /**
  * __qdf_nbuf_get_tx_cksum() - get tx checksum
@@ -1011,7 +1012,7 @@ qdf_nbuf_tx_cksum_t __qdf_nbuf_get_tx_cksum(struct sk_buff *skb)
 		return QDF_NBUF_TX_CKSUM_NONE;
 	}
 }
-EXPORT_SYMBOL(__qdf_nbuf_get_tx_cksum);
+qdf_export_symbol(__qdf_nbuf_get_tx_cksum);
 
 /**
  * __qdf_nbuf_get_tid() - get tid
@@ -1023,7 +1024,7 @@ uint8_t __qdf_nbuf_get_tid(struct sk_buff *skb)
 {
 	return skb->priority;
 }
-EXPORT_SYMBOL(__qdf_nbuf_get_tid);
+qdf_export_symbol(__qdf_nbuf_get_tid);
 
 /**
  * __qdf_nbuf_set_tid() - set tid
@@ -1035,7 +1036,7 @@ void __qdf_nbuf_set_tid(struct sk_buff *skb, uint8_t tid)
 {
 	skb->priority = tid;
 }
-EXPORT_SYMBOL(__qdf_nbuf_set_tid);
+qdf_export_symbol(__qdf_nbuf_set_tid);
 
 /**
  * __qdf_nbuf_set_tid() - set tid
@@ -1047,7 +1048,7 @@ uint8_t __qdf_nbuf_get_exemption_type(struct sk_buff *skb)
 {
 	return QDF_NBUF_EXEMPT_NO_EXEMPTION;
 }
-EXPORT_SYMBOL(__qdf_nbuf_get_exemption_type);
+qdf_export_symbol(__qdf_nbuf_get_exemption_type);
 
 /**
  * __qdf_nbuf_reg_trace_cb() - register trace callback
@@ -1059,7 +1060,7 @@ void __qdf_nbuf_reg_trace_cb(qdf_nbuf_trace_update_t cb_func_ptr)
 {
 	qdf_trace_update_cb = cb_func_ptr;
 }
-EXPORT_SYMBOL(__qdf_nbuf_reg_trace_cb);
+qdf_export_symbol(__qdf_nbuf_reg_trace_cb);
 
 /**
  * __qdf_nbuf_data_get_dhcp_subtype() - get the subtype
@@ -1325,7 +1326,7 @@ bool __qdf_nbuf_data_is_ipv4_pkt(uint8_t *data)
 	else
 		return false;
 }
-EXPORT_SYMBOL(__qdf_nbuf_data_is_ipv4_pkt);
+qdf_export_symbol(__qdf_nbuf_data_is_ipv4_pkt);
 
 /**
  * __qdf_nbuf_data_is_ipv4_dhcp_pkt() - check if skb data is a dhcp packet
@@ -1355,7 +1356,7 @@ bool __qdf_nbuf_data_is_ipv4_dhcp_pkt(uint8_t *data)
 	else
 		return false;
 }
-EXPORT_SYMBOL(__qdf_nbuf_data_is_ipv4_dhcp_pkt);
+qdf_export_symbol(__qdf_nbuf_data_is_ipv4_dhcp_pkt);
 
 /**
  * __qdf_nbuf_data_is_ipv4_eapol_pkt() - check if skb data is a eapol packet
@@ -1378,7 +1379,7 @@ bool __qdf_nbuf_data_is_ipv4_eapol_pkt(uint8_t *data)
 	else
 		return false;
 }
-EXPORT_SYMBOL(__qdf_nbuf_data_is_ipv4_eapol_pkt);
+qdf_export_symbol(__qdf_nbuf_data_is_ipv4_eapol_pkt);
 
 /**
  * __qdf_nbuf_is_ipv4_wapi_pkt() - check if skb data is a wapi packet
@@ -1401,7 +1402,7 @@ bool __qdf_nbuf_is_ipv4_wapi_pkt(struct sk_buff *skb)
 	else
 		return false;
 }
-EXPORT_SYMBOL(__qdf_nbuf_is_ipv4_wapi_pkt);
+qdf_export_symbol(__qdf_nbuf_is_ipv4_wapi_pkt);
 
 /**
  * __qdf_nbuf_is_ipv4_tdls_pkt() - check if skb data is a tdls packet
@@ -1424,7 +1425,7 @@ bool __qdf_nbuf_is_ipv4_tdls_pkt(struct sk_buff *skb)
 	else
 		return false;
 }
-EXPORT_SYMBOL(__qdf_nbuf_is_ipv4_tdls_pkt);
+qdf_export_symbol(__qdf_nbuf_is_ipv4_tdls_pkt);
 
 /**
  * __qdf_nbuf_data_is_ipv4_arp_pkt() - check if skb data is a arp packet
@@ -1447,7 +1448,7 @@ bool __qdf_nbuf_data_is_ipv4_arp_pkt(uint8_t *data)
 	else
 		return false;
 }
-EXPORT_SYMBOL(__qdf_nbuf_data_is_ipv4_arp_pkt);
+qdf_export_symbol(__qdf_nbuf_data_is_ipv4_arp_pkt);
 
 /**
  * __qdf_nbuf_data_is_arp_req() - check if skb data is a arp request
@@ -1800,7 +1801,7 @@ bool __qdf_nbuf_data_is_ipv6_pkt(uint8_t *data)
 	else
 		return false;
 }
-EXPORT_SYMBOL(__qdf_nbuf_data_is_ipv6_pkt);
+qdf_export_symbol(__qdf_nbuf_data_is_ipv6_pkt);
 
 /**
  * __qdf_nbuf_data_is_ipv6_dhcp_pkt() - check if skb data is a dhcp packet
@@ -1830,7 +1831,7 @@ bool __qdf_nbuf_data_is_ipv6_dhcp_pkt(uint8_t *data)
 	else
 		return false;
 }
-EXPORT_SYMBOL(__qdf_nbuf_data_is_ipv6_dhcp_pkt);
+qdf_export_symbol(__qdf_nbuf_data_is_ipv6_dhcp_pkt);
 
 /**
  * __qdf_nbuf_data_is_ipv4_mcast_pkt() - check if it is IPV4 multicast packet.
@@ -2347,7 +2348,7 @@ void qdf_net_buf_debug_init(void)
 		spin_lock_init(&g_qdf_net_buf_track_lock[i]);
 	}
 }
-EXPORT_SYMBOL(qdf_net_buf_debug_init);
+qdf_export_symbol(qdf_net_buf_debug_init);
 
 /**
  * qdf_net_buf_debug_init() - exit network buffer debug functionality
@@ -2391,7 +2392,7 @@ void qdf_net_buf_debug_exit(void)
 	}
 #endif
 }
-EXPORT_SYMBOL(qdf_net_buf_debug_exit);
+qdf_export_symbol(qdf_net_buf_debug_exit);
 
 /**
  * qdf_net_buf_debug_hash() - hash network buffer pointer
@@ -2475,7 +2476,7 @@ void qdf_net_buf_debug_add_node(qdf_nbuf_t net_buf, size_t size,
 
 	spin_unlock_irqrestore(&g_qdf_net_buf_track_lock[i], irq_flag);
 }
-EXPORT_SYMBOL(qdf_net_buf_debug_add_node);
+qdf_export_symbol(qdf_net_buf_debug_add_node);
 
 /**
  * qdf_net_buf_debug_delete_node() - remove skb from debug hash table
@@ -2528,7 +2529,7 @@ done:
 		QDF_BUG(0);
 	}
 }
-EXPORT_SYMBOL(qdf_net_buf_debug_delete_node);
+qdf_export_symbol(qdf_net_buf_debug_delete_node);
 
 void qdf_net_buf_debug_acquire_skb(qdf_nbuf_t net_buf,
 			uint8_t *file_name, uint32_t line_num)
@@ -2548,7 +2549,7 @@ void qdf_net_buf_debug_acquire_skb(qdf_nbuf_t net_buf,
 	}
 	qdf_net_buf_debug_add_node(net_buf, 0, file_name, line_num);
 }
-EXPORT_SYMBOL(qdf_net_buf_debug_acquire_skb);
+qdf_export_symbol(qdf_net_buf_debug_acquire_skb);
 
 /**
  * qdf_net_buf_debug_release_skb() - release skb to avoid memory leak
@@ -2588,7 +2589,7 @@ void qdf_net_buf_debug_release_skb(qdf_nbuf_t net_buf)
 
 	qdf_net_buf_debug_delete_node(net_buf);
 }
-EXPORT_SYMBOL(qdf_net_buf_debug_release_skb);
+qdf_export_symbol(qdf_net_buf_debug_release_skb);
 
 qdf_nbuf_t qdf_nbuf_alloc_debug(qdf_device_t osdev, qdf_size_t size,
 				int reserve, int align, int prio,
@@ -2760,7 +2761,7 @@ void __qdf_dmaaddr_to_32s(qdf_dma_addr_t dmaaddr,
 		*hi = 0;
 	}
 }
-EXPORT_SYMBOL(__qdf_dmaaddr_to_32s);
+qdf_export_symbol(__qdf_dmaaddr_to_32s);
 
 /**
  * __qdf_nbuf_fill_tso_cmn_seg_info() - Init function for each TSO nbuf segment
@@ -3022,7 +3023,7 @@ uint32_t __qdf_nbuf_get_tso_info(qdf_device_t osdev, struct sk_buff *skb,
 	}
 	return tso_info->num_segs;
 }
-EXPORT_SYMBOL(__qdf_nbuf_get_tso_info);
+qdf_export_symbol(__qdf_nbuf_get_tso_info);
 
 /**
  * __qdf_nbuf_unmap_tso_segment() - function to dma unmap TSO segment element
@@ -3081,7 +3082,7 @@ void __qdf_nbuf_unmap_tso_segment(qdf_device_t osdev,
 		tso_seg->seg.tso_frags[0].paddr = 0;
 	}
 }
-EXPORT_SYMBOL(__qdf_nbuf_unmap_tso_segment);
+qdf_export_symbol(__qdf_nbuf_unmap_tso_segment);
 
 /**
  * __qdf_nbuf_get_tso_num_seg() - function to divide a TSO nbuf
@@ -3241,7 +3242,7 @@ fail:
 	return 0;
 }
 #endif
-EXPORT_SYMBOL(__qdf_nbuf_get_tso_num_seg);
+qdf_export_symbol(__qdf_nbuf_get_tso_num_seg);
 
 #endif /* FEATURE_TSO */
 
@@ -3250,13 +3251,13 @@ struct sk_buff *__qdf_nbuf_inc_users(struct sk_buff *skb)
 	qdf_nbuf_users_inc(&skb->users);
 	return skb;
 }
-EXPORT_SYMBOL(__qdf_nbuf_inc_users);
+qdf_export_symbol(__qdf_nbuf_inc_users);
 
 int __qdf_nbuf_get_users(struct sk_buff *skb)
 {
 	return qdf_nbuf_users_read(&skb->users);
 }
-EXPORT_SYMBOL(__qdf_nbuf_get_users);
+qdf_export_symbol(__qdf_nbuf_get_users);
 
 /**
  * __qdf_nbuf_ref() - Reference the nbuf so it can get held until the last free.
@@ -3269,7 +3270,7 @@ void __qdf_nbuf_ref(struct sk_buff *skb)
 {
 	skb_get(skb);
 }
-EXPORT_SYMBOL(__qdf_nbuf_ref);
+qdf_export_symbol(__qdf_nbuf_ref);
 
 /**
  * __qdf_nbuf_shared() - Check whether the buffer is shared
@@ -3281,7 +3282,7 @@ int __qdf_nbuf_shared(struct sk_buff *skb)
 {
 	return skb_shared(skb);
 }
-EXPORT_SYMBOL(__qdf_nbuf_shared);
+qdf_export_symbol(__qdf_nbuf_shared);
 
 /**
  * __qdf_nbuf_dmamap_create() - create a DMA map.
@@ -3309,7 +3310,7 @@ __qdf_nbuf_dmamap_create(qdf_device_t osdev, __qdf_dma_map_t *dmap)
 
 	return error;
 }
-EXPORT_SYMBOL(__qdf_nbuf_dmamap_create);
+qdf_export_symbol(__qdf_nbuf_dmamap_create);
 /**
  * __qdf_nbuf_dmamap_destroy() - delete a dma map
  * @osdev: qdf device handle
@@ -3322,7 +3323,7 @@ __qdf_nbuf_dmamap_destroy(qdf_device_t osdev, __qdf_dma_map_t dmap)
 {
 	kfree(dmap);
 }
-EXPORT_SYMBOL(__qdf_nbuf_dmamap_destroy);
+qdf_export_symbol(__qdf_nbuf_dmamap_destroy);
 
 /**
  * __qdf_nbuf_map_nbytes_single() - map nbytes
@@ -3343,7 +3344,7 @@ QDF_STATUS __qdf_nbuf_map_nbytes_single(
 	QDF_NBUF_CB_PADDR(buf) = paddr = buf->data;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_nbuf_map_nbytes_single);
+qdf_export_symbol(__qdf_nbuf_map_nbytes_single);
 #else
 QDF_STATUS __qdf_nbuf_map_nbytes_single(
 		qdf_device_t osdev, struct sk_buff *buf,
@@ -3358,7 +3359,7 @@ QDF_STATUS __qdf_nbuf_map_nbytes_single(
 	return dma_mapping_error(osdev->dev, paddr) ?
 		QDF_STATUS_E_FAULT : QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_nbuf_map_nbytes_single);
+qdf_export_symbol(__qdf_nbuf_map_nbytes_single);
 #endif
 /**
  * __qdf_nbuf_unmap_nbytes_single() - unmap nbytes
@@ -3375,7 +3376,7 @@ __qdf_nbuf_unmap_nbytes_single(
 	qdf_device_t osdev, struct sk_buff *buf, qdf_dma_dir_t dir, int nbytes)
 {
 }
-EXPORT_SYMBOL(__qdf_nbuf_unmap_nbytes_single);
+qdf_export_symbol(__qdf_nbuf_unmap_nbytes_single);
 
 #else
 void
@@ -3389,7 +3390,7 @@ __qdf_nbuf_unmap_nbytes_single(
 	dma_unmap_single(osdev->dev, QDF_NBUF_CB_PADDR(buf),
 			nbytes, __qdf_dma_dir_to_os(dir));
 }
-EXPORT_SYMBOL(__qdf_nbuf_unmap_nbytes_single);
+qdf_export_symbol(__qdf_nbuf_unmap_nbytes_single);
 #endif
 /**
  * __qdf_nbuf_map_nbytes() - get the dma map of the nbuf
@@ -3423,7 +3424,7 @@ __qdf_nbuf_map_nbytes(
 
 	return __qdf_nbuf_map_nbytes_single(osdev, skb, dir, nbytes);
 }
-EXPORT_SYMBOL(__qdf_nbuf_map_nbytes);
+qdf_export_symbol(__qdf_nbuf_map_nbytes);
 #else
 QDF_STATUS
 __qdf_nbuf_map_nbytes(
@@ -3434,7 +3435,7 @@ __qdf_nbuf_map_nbytes(
 {
 	return __qdf_nbuf_map_nbytes_single(osdev, skb, dir, nbytes);
 }
-EXPORT_SYMBOL(__qdf_nbuf_map_nbytes);
+qdf_export_symbol(__qdf_nbuf_map_nbytes);
 #endif
 /**
  * __qdf_nbuf_unmap_nbytes() - to unmap a previously mapped buf
@@ -3460,7 +3461,7 @@ __qdf_nbuf_unmap_nbytes(
 	 */
 	__qdf_nbuf_unmap_nbytes_single(osdev, skb, dir, nbytes);
 }
-EXPORT_SYMBOL(__qdf_nbuf_unmap_nbytes);
+qdf_export_symbol(__qdf_nbuf_unmap_nbytes);
 
 /**
  * __qdf_nbuf_dma_map_info() - return the dma map info
@@ -3479,7 +3480,7 @@ __qdf_nbuf_dma_map_info(__qdf_dma_map_t bmap, qdf_dmamap_info_t *sg)
 			sizeof(struct __qdf_segment));
 	sg->nsegs = bmap->nsegs;
 }
-EXPORT_SYMBOL(__qdf_nbuf_dma_map_info);
+qdf_export_symbol(__qdf_nbuf_dma_map_info);
 /**
  * __qdf_nbuf_frag_info() - return the frag data & len, where frag no. is
  *			specified by the index
@@ -3509,7 +3510,7 @@ __qdf_nbuf_frag_info(struct sk_buff *skb, qdf_sglist_t  *sg)
 	sg->nsegs += i;
 
 }
-EXPORT_SYMBOL(__qdf_nbuf_frag_info);
+qdf_export_symbol(__qdf_nbuf_frag_info);
 #else
 #ifdef QDF_OS_DEBUG
 void
@@ -3525,7 +3526,7 @@ __qdf_nbuf_frag_info(struct sk_buff *skb, qdf_sglist_t  *sg)
 
 	qdf_assert(sh->nr_frags == 0);
 }
-EXPORT_SYMBOL(__qdf_nbuf_frag_info);
+qdf_export_symbol(__qdf_nbuf_frag_info);
 #else
 void
 __qdf_nbuf_frag_info(struct sk_buff *skb, qdf_sglist_t  *sg)
@@ -3534,7 +3535,7 @@ __qdf_nbuf_frag_info(struct sk_buff *skb, qdf_sglist_t  *sg)
 	sg->sg_segs[0].len   = skb->len;
 	sg->nsegs            = 1;
 }
-EXPORT_SYMBOL(__qdf_nbuf_frag_info);
+qdf_export_symbol(__qdf_nbuf_frag_info);
 #endif
 #endif
 /**
@@ -3552,7 +3553,7 @@ __qdf_nbuf_get_frag_size(__qdf_nbuf_t nbuf, uint32_t cur_frag)
 
 	return skb_frag_size(frag);
 }
-EXPORT_SYMBOL(__qdf_nbuf_get_frag_size);
+qdf_export_symbol(__qdf_nbuf_get_frag_size);
 
 /**
  * __qdf_nbuf_frag_map() - dma map frag
@@ -3574,7 +3575,7 @@ QDF_STATUS __qdf_nbuf_frag_map(
 	QDF_NBUF_CB_PADDR(nbuf) = paddr = nbuf->data;
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_nbuf_frag_map);
+qdf_export_symbol(__qdf_nbuf_frag_map);
 #else
 QDF_STATUS __qdf_nbuf_frag_map(
 	qdf_device_t osdev, __qdf_nbuf_t nbuf,
@@ -3592,7 +3593,7 @@ QDF_STATUS __qdf_nbuf_frag_map(
 	return dma_mapping_error(osdev->dev, paddr) ?
 			QDF_STATUS_E_FAULT : QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(__qdf_nbuf_frag_map);
+qdf_export_symbol(__qdf_nbuf_frag_map);
 #endif
 /**
  * __qdf_nbuf_dmamap_set_cb() - setup the map callback for a dma map
@@ -3607,7 +3608,7 @@ __qdf_nbuf_dmamap_set_cb(__qdf_dma_map_t dmap, void *cb, void *arg)
 {
 	return;
 }
-EXPORT_SYMBOL(__qdf_nbuf_dmamap_set_cb);
+qdf_export_symbol(__qdf_nbuf_dmamap_set_cb);
 
 
 /**
@@ -3658,7 +3659,7 @@ __qdf_nbuf_sync_for_cpu(qdf_device_t osdev,
 	 */
 	__qdf_nbuf_sync_single_for_cpu(osdev, skb, dir);
 }
-EXPORT_SYMBOL(__qdf_nbuf_sync_for_cpu);
+qdf_export_symbol(__qdf_nbuf_sync_for_cpu);
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
 /**
@@ -4113,7 +4114,7 @@ void qdf_nbuf_classify_pkt(struct sk_buff *skb)
 		QDF_NBUF_CB_GET_PACKET_TYPE(skb) =
 			QDF_NBUF_CB_PACKET_TYPE_WAPI;
 }
-EXPORT_SYMBOL(qdf_nbuf_classify_pkt);
+qdf_export_symbol(qdf_nbuf_classify_pkt);
 
 void __qdf_nbuf_init(__qdf_nbuf_t nbuf)
 {
@@ -4121,7 +4122,7 @@ void __qdf_nbuf_init(__qdf_nbuf_t nbuf)
 	nbuf->data = nbuf->head + NET_SKB_PAD;
 	skb_reset_tail_pointer(nbuf);
 }
-EXPORT_SYMBOL(__qdf_nbuf_init);
+qdf_export_symbol(__qdf_nbuf_init);
 
 #ifdef WLAN_FEATURE_FASTPATH
 void qdf_nbuf_init_fast(qdf_nbuf_t nbuf)
@@ -4130,7 +4131,7 @@ void qdf_nbuf_init_fast(qdf_nbuf_t nbuf)
 	nbuf->data = nbuf->head + NET_SKB_PAD;
 	skb_reset_tail_pointer(nbuf);
 }
-EXPORT_SYMBOL(qdf_nbuf_init_fast);
+qdf_export_symbol(qdf_nbuf_init_fast);
 #endif /* WLAN_FEATURE_FASTPATH */
 
 

+ 8 - 7
qdf/linux/src/qdf_perf.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -40,6 +40,7 @@
 #include <linux/spinlock.h>
 
 #include <qdf_perf.h>
+#include <qdf_module.h>
 #ifdef QCA_PERF_PROFILING
 
 qdf_perf_entry_t     perf_root = {{0, 0} };
@@ -59,7 +60,7 @@ qdf_perfmod_init(void)
 	perf_root.proc = proc_mkdir(PROCFS_PERF_DIRNAME, 0);
 	return 0;
 }
-EXPORT_SYMBOL(qdf_perfmod_init);
+qdf_export_symbol(qdf_perfmod_init);
 
 /**
  * qdf_perfmod_exit() - Module exit
@@ -73,7 +74,7 @@ qdf_perfmod_exit(void)
 		  "Perf Debug Module Exit");
 	remove_proc_entry(PROCFS_PERF_DIRNAME, 0);
 }
-EXPORT_SYMBOL(qdf_perfmod_exit);
+qdf_export_symbol(qdf_perfmod_exit);
 
 /**
  * __qdf_perf_init() - Create the perf entry
@@ -138,7 +139,7 @@ __qdf_perf_init(qdf_perf_id_t parent, uint8_t *id_name,
 done:
 	return entry;
 }
-EXPORT_SYMBOL(__qdf_perf_init);
+qdf_export_symbol(__qdf_perf_init);
 
 /**
  * __qdf_perf_destroy - Destroy the perf entry
@@ -165,7 +166,7 @@ bool __qdf_perf_destroy(qdf_perf_id_t  id)
 
 	return true;
 }
-EXPORT_SYMBOL(__qdf_perf_destroy);
+qdf_export_symbol(__qdf_perf_destroy);
 
 /**
  * __qdf_perf_start - Start the sampling
@@ -179,7 +180,7 @@ void __qdf_perf_start(qdf_perf_id_t id)
 
 	api_tbl[entry->type].sample(entry, 0);
 }
-EXPORT_SYMBOL(__qdf_perf_start);
+qdf_export_symbol(__qdf_perf_start);
 
 /**
  * __qdf_perf_end - Stop sampling
@@ -193,6 +194,6 @@ void __qdf_perf_end(qdf_perf_id_t id)
 
 	api_tbl[entry->type].sample(entry, 1);
 }
-EXPORT_SYMBOL(__qdf_perf_end);
+qdf_export_symbol(__qdf_perf_end);
 
 #endif /* QCA_PERF_PROFILING */

+ 10 - 10
qdf/linux/src/qdf_threads.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -42,10 +42,10 @@
 #endif /* KERNEL_VERSION(4, 11, 0) */
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/export.h>
 #include <linux/kthread.h>
 #include <linux/stacktrace.h>
 #include <qdf_defer.h>
+#include <qdf_module.h>
 
 /* Function declarations and documenation */
 
@@ -69,7 +69,7 @@ void qdf_sleep(uint32_t ms_interval)
 	}
 	msleep_interruptible(ms_interval);
 }
-EXPORT_SYMBOL(qdf_sleep);
+qdf_export_symbol(qdf_sleep);
 
 /**
  *  qdf_sleep_us() - sleep
@@ -95,7 +95,7 @@ void qdf_sleep_us(uint32_t us_interval)
 	while (timeout && !signal_pending(current))
 		timeout = schedule_timeout_interruptible(timeout);
 }
-EXPORT_SYMBOL(qdf_sleep_us);
+qdf_export_symbol(qdf_sleep_us);
 
 /**
  *  qdf_busy_wait() - busy wait
@@ -111,26 +111,26 @@ void qdf_busy_wait(uint32_t us_interval)
 {
 	udelay(us_interval);
 }
-EXPORT_SYMBOL(qdf_busy_wait);
+qdf_export_symbol(qdf_busy_wait);
 
 void qdf_set_user_nice(qdf_thread_t *thread, long nice)
 {
 	set_user_nice(thread, nice);
 }
-EXPORT_SYMBOL(qdf_set_user_nice);
+qdf_export_symbol(qdf_set_user_nice);
 
 qdf_thread_t *qdf_create_thread(int (*thread_handler)(void *data), void *data,
 				const char thread_name[])
 {
 	return kthread_create(thread_handler, data, thread_name);
 }
-EXPORT_SYMBOL(qdf_create_thread);
+qdf_export_symbol(qdf_create_thread);
 
 int qdf_wake_up_process(qdf_thread_t *thread)
 {
 	return wake_up_process(thread);
 }
-EXPORT_SYMBOL(qdf_wake_up_process);
+qdf_export_symbol(qdf_wake_up_process);
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) || \
 	defined(BACKPORTED_EXPORT_SAVE_STACK_TRACE_TSK_ARM)
@@ -153,10 +153,10 @@ void qdf_print_thread_trace(qdf_thread_t *thread)
 #else
 void qdf_print_thread_trace(qdf_thread_t *thread) { }
 #endif /* KERNEL_VERSION(4, 14, 0) */
-EXPORT_SYMBOL(qdf_print_thread_trace);
+qdf_export_symbol(qdf_print_thread_trace);
 
 qdf_thread_t *qdf_get_current_task(void)
 {
 	return current;
 }
-EXPORT_SYMBOL(qdf_get_current_task);
+qdf_export_symbol(qdf_get_current_task);

+ 63 - 63
qdf/linux/src/qdf_trace.c

@@ -34,7 +34,7 @@
 /* Include Files */
 #include "qdf_str.h"
 #include <qdf_trace.h>
-#include <linux/export.h>
+#include <qdf_module.h>
 
 /* macro to map qdf trace levels into the bitmask */
 #define QDF_TRACE_LEVEL_TO_MODULE_BITMASK(_level) ((1 << (_level)))
@@ -167,7 +167,7 @@ void qdf_trace_set_level(QDF_MODULE_ID module, QDF_TRACE_LEVEL level)
 		g_qdf_trace_info[module].module_trace_level |=
 			QDF_TRACE_LEVEL_TO_MODULE_BITMASK(level);
 }
-EXPORT_SYMBOL(qdf_trace_set_level);
+qdf_export_symbol(qdf_trace_set_level);
 
 /**
  * qdf_trace_set_module_trace_level() - Set module trace level
@@ -186,7 +186,7 @@ void qdf_trace_set_module_trace_level(QDF_MODULE_ID module, uint32_t level)
 	}
 	g_qdf_trace_info[module].module_trace_level = level;
 }
-EXPORT_SYMBOL(qdf_trace_set_module_trace_level);
+qdf_export_symbol(qdf_trace_set_module_trace_level);
 
 /**
  * qdf_trace_set_value() - Set module trace value
@@ -240,7 +240,7 @@ void qdf_trace_set_value(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
 				~(QDF_TRACE_LEVEL_TO_MODULE_BITMASK(level));
 	}
 }
-EXPORT_SYMBOL(qdf_trace_set_value);
+qdf_export_symbol(qdf_trace_set_value);
 
 /**
  * qdf_trace_get_level() - get the trace level
@@ -274,7 +274,7 @@ bool qdf_trace_get_level(QDF_MODULE_ID module, QDF_TRACE_LEVEL level)
 
 	return trace_on;
 }
-EXPORT_SYMBOL(qdf_trace_get_level);
+qdf_export_symbol(qdf_trace_get_level);
 
 /**
  * qdf_snprintf() - wrapper function to snprintf
@@ -294,7 +294,7 @@ void qdf_snprintf(char *str_buffer, unsigned int size, char *str_format, ...)
 	snprintf(str_buffer, size, str_format, val);
 	va_end(val);
 }
-EXPORT_SYMBOL(qdf_snprintf);
+qdf_export_symbol(qdf_snprintf);
 
 #ifdef QDF_ENABLE_TRACING
 
@@ -322,14 +322,14 @@ void qdf_trace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
 	qdf_trace_msg_cmn(qdf_pidx, module, level, str_format, val);
 	va_end(val);
 }
-EXPORT_SYMBOL(qdf_trace_msg);
+qdf_export_symbol(qdf_trace_msg);
 
 void qdf_vtrace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
 		    char *str_format, va_list val)
 {
 	qdf_trace_msg_cmn(qdf_pidx, module, level, str_format, val);
 }
-EXPORT_SYMBOL(qdf_vtrace_msg);
+qdf_export_symbol(qdf_vtrace_msg);
 
 #define ROW_SIZE 16
 /* Buffer size = data bytes(2 hex chars plus space) + NULL */
@@ -372,7 +372,7 @@ void qdf_trace_hex_dump(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
 		i += ROW_SIZE;
 	}
 }
-EXPORT_SYMBOL(qdf_trace_hex_dump);
+qdf_export_symbol(qdf_trace_hex_dump);
 
 #endif
 
@@ -433,7 +433,7 @@ void qdf_trace_enable(uint32_t bitmask_of_module_id, uint8_t enable)
 		}
 	}
 }
-EXPORT_SYMBOL(qdf_trace_enable);
+qdf_export_symbol(qdf_trace_enable);
 
 /**
  * qdf_trace_init() - initializes qdf trace structures and variables
@@ -459,7 +459,7 @@ void qdf_trace_init(void)
 		qdf_trace_restore_cb_table[i] = NULL;
 	}
 }
-EXPORT_SYMBOL(qdf_trace_init);
+qdf_export_symbol(qdf_trace_init);
 
 /**
  * qdf_trace() - puts the messages in to ring-buffer
@@ -528,7 +528,7 @@ void qdf_trace(uint8_t module, uint8_t code, uint16_t session, uint32_t data)
 	g_qdf_trace_data.num_since_last_dump++;
 	spin_unlock_irqrestore(&ltrace_lock, flags);
 }
-EXPORT_SYMBOL(qdf_trace);
+qdf_export_symbol(qdf_trace);
 
 /**
  * qdf_trace_spin_lock_init() - initializes the lock variable before use
@@ -544,7 +544,7 @@ QDF_STATUS qdf_trace_spin_lock_init(void)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_trace_spin_lock_init);
+qdf_export_symbol(qdf_trace_spin_lock_init);
 
 /**
  * qdf_trace_register() - registers the call back functions
@@ -564,7 +564,7 @@ void qdf_trace_register(QDF_MODULE_ID module_iD,
 {
 	qdf_trace_cb_table[module_iD] = qdf_trace_callback;
 }
-EXPORT_SYMBOL(qdf_trace_register);
+qdf_export_symbol(qdf_trace_register);
 
 /**
  * qdf_trace_dump_all() - Dump data from ring buffer via call back functions
@@ -667,7 +667,7 @@ void qdf_trace_dump_all(void *p_mac, uint8_t code, uint8_t session,
 		spin_unlock(&ltrace_lock);
 	}
 }
-EXPORT_SYMBOL(qdf_trace_dump_all);
+qdf_export_symbol(qdf_trace_dump_all);
 #endif
 
 /**
@@ -683,7 +683,7 @@ void qdf_register_debugcb_init(void)
 	for (i = 0; i < QDF_MODULE_ID_MAX; i++)
 		qdf_state_info_table[i] = NULL;
 }
-EXPORT_SYMBOL(qdf_register_debugcb_init);
+qdf_export_symbol(qdf_register_debugcb_init);
 
 /**
  * qdf_register_debug_callback() - stores callback handlers to print
@@ -701,7 +701,7 @@ void qdf_register_debug_callback(QDF_MODULE_ID module_id,
 {
 	qdf_state_info_table[module_id] = qdf_state_infocb;
 }
-EXPORT_SYMBOL(qdf_register_debug_callback);
+qdf_export_symbol(qdf_register_debug_callback);
 
 /**
  * qdf_state_info_dump_all() - it invokes callback of layer which registered
@@ -732,7 +732,7 @@ QDF_STATUS qdf_state_info_dump_all(char *buf, uint16_t size,
 	*driver_dump_size = size - buf_len;
 	return ret;
 }
-EXPORT_SYMBOL(qdf_state_info_dump_all);
+qdf_export_symbol(qdf_state_info_dump_all);
 
 #ifdef CONFIG_DP_TRACE
 static void qdf_dp_unused(struct qdf_dp_trace_record_s *record,
@@ -798,7 +798,7 @@ void qdf_dp_trace_init(bool live_mode_config, uint8_t thresh,
 
 	qdf_dp_trace_cb_table[QDF_DP_TRACE_MAX] = qdf_dp_unused;
 }
-EXPORT_SYMBOL(qdf_dp_trace_init);
+qdf_export_symbol(qdf_dp_trace_init);
 
 /**
  * qdf_dp_trace_set_value() - Configure the value to control DP trace
@@ -815,7 +815,7 @@ void qdf_dp_trace_set_value(uint8_t proto_bitmap, uint8_t no_of_record,
 	g_qdf_dp_trace_data.no_of_record = no_of_record;
 	g_qdf_dp_trace_data.verbosity    = verbosity;
 }
-EXPORT_SYMBOL(qdf_dp_trace_set_value);
+qdf_export_symbol(qdf_dp_trace_set_value);
 
 /**
  * qdf_dp_trace_set_verbosity() - set verbosity value
@@ -828,7 +828,7 @@ void qdf_dp_trace_set_verbosity(uint32_t val)
 {
 	g_qdf_dp_trace_data.verbosity = val;
 }
-EXPORT_SYMBOL(qdf_dp_trace_set_verbosity);
+qdf_export_symbol(qdf_dp_trace_set_verbosity);
 
 /**
  * qdf_dp_get_verbosity) - get verbosity value
@@ -839,7 +839,7 @@ uint8_t qdf_dp_get_verbosity(void)
 {
 	return g_qdf_dp_trace_data.verbosity;
 }
-EXPORT_SYMBOL(qdf_dp_get_verbosity);
+qdf_export_symbol(qdf_dp_get_verbosity);
 
 /**
  * qdf_dp_set_proto_bitmap() - set dp trace proto bitmap
@@ -852,7 +852,7 @@ void qdf_dp_set_proto_bitmap(uint32_t val)
 {
 	g_qdf_dp_trace_data.proto_bitmap = val;
 }
-EXPORT_SYMBOL(qdf_dp_set_proto_bitmap);
+qdf_export_symbol(qdf_dp_set_proto_bitmap);
 
 /**
  * qdf_dp_set_no_of_record() - set dp trace no_of_record
@@ -865,7 +865,7 @@ void qdf_dp_set_no_of_record(uint32_t val)
 {
 	g_qdf_dp_trace_data.no_of_record = val;
 }
-EXPORT_SYMBOL(qdf_dp_set_no_of_record);
+qdf_export_symbol(qdf_dp_set_no_of_record);
 
 /**
  * qdf_dp_get_no_of_record() - get dp trace no_of_record
@@ -876,7 +876,7 @@ uint8_t qdf_dp_get_no_of_record(void)
 {
 	return g_qdf_dp_trace_data.no_of_record;
 }
-EXPORT_SYMBOL(qdf_dp_get_no_of_record);
+qdf_export_symbol(qdf_dp_get_no_of_record);
 
 
 /**
@@ -911,7 +911,7 @@ static bool qdf_dp_trace_enable_track(enum QDF_DP_TRACE_ID code)
 		return false;
 	}
 }
-EXPORT_SYMBOL(qdf_dp_trace_enable_track);
+qdf_export_symbol(qdf_dp_trace_enable_track);
 
 /**
  * qdf_dp_get_proto_bitmap() - get dp trace proto bitmap
@@ -955,7 +955,7 @@ void qdf_dp_trace_set_track(qdf_nbuf_t nbuf, enum qdf_proto_dir dir)
 	}
 	spin_unlock_bh(&l_dp_trace_lock);
 }
-EXPORT_SYMBOL(qdf_dp_trace_set_track);
+qdf_export_symbol(qdf_dp_trace_set_track);
 
 #define DPTRACE_PRINT(args...) \
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_DEBUG, ## args)
@@ -1568,7 +1568,7 @@ bool qdf_dp_trace_log_pkt(uint8_t session_id, struct sk_buff *skb,
 		return true;
 	return false;
 }
-EXPORT_SYMBOL(qdf_dp_trace_log_pkt);
+qdf_export_symbol(qdf_dp_trace_log_pkt);
 
 /**
  * qdf_dp_display_mgmt_pkt() - display proto packet
@@ -1592,7 +1592,7 @@ void qdf_dp_display_mgmt_pkt(struct qdf_dp_trace_record_s *record,
 		qdf_dp_type_to_str(buf->type),
 		qdf_dp_subtype_to_str(buf->subtype));
 }
-EXPORT_SYMBOL(qdf_dp_display_mgmt_pkt);
+qdf_export_symbol(qdf_dp_display_mgmt_pkt);
 
 /**
  * qdf_dp_trace_mgmt_pkt() - record mgmt packet
@@ -1622,7 +1622,7 @@ void qdf_dp_trace_mgmt_pkt(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
 	buf.vdev_id = vdev_id;
 	qdf_dp_add_record(code, (uint8_t *)&buf, buf_size, pdev_id, true);
 }
-EXPORT_SYMBOL(qdf_dp_trace_mgmt_pkt);
+qdf_export_symbol(qdf_dp_trace_mgmt_pkt);
 
 /**
  * qdf_dp_display_event_record() - display event records
@@ -1646,7 +1646,7 @@ void qdf_dp_display_event_record(struct qdf_dp_trace_record_s *record,
 		qdf_dp_type_to_str(buf->type),
 		qdf_dp_subtype_to_str(buf->subtype));
 }
-EXPORT_SYMBOL(qdf_dp_display_event_record);
+qdf_export_symbol(qdf_dp_display_event_record);
 
 /**
  * qdf_dp_trace_record_event() - record events
@@ -1676,7 +1676,7 @@ void qdf_dp_trace_record_event(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
 	buf.vdev_id = vdev_id;
 	qdf_dp_add_record(code, (uint8_t *)&buf, buf_size, pdev_id, true);
 }
-EXPORT_SYMBOL(qdf_dp_trace_record_event);
+qdf_export_symbol(qdf_dp_trace_record_event);
 
 /**
  * qdf_dp_display_proto_pkt() - display proto packet
@@ -1702,7 +1702,7 @@ void qdf_dp_display_proto_pkt(struct qdf_dp_trace_record_s *record,
 		QDF_MAC_ADDR_ARRAY(buf->sa.bytes),
 		qdf_dp_dir_to_str(buf->dir), QDF_MAC_ADDR_ARRAY(buf->da.bytes));
 }
-EXPORT_SYMBOL(qdf_dp_display_proto_pkt);
+qdf_export_symbol(qdf_dp_display_proto_pkt);
 
 /**
  * qdf_dp_trace_proto_pkt() - record proto packet
@@ -1740,7 +1740,7 @@ void qdf_dp_trace_proto_pkt(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
 	buf.vdev_id = vdev_id;
 	qdf_dp_add_record(code, (uint8_t *)&buf, buf_size, pdev_id, print);
 }
-EXPORT_SYMBOL(qdf_dp_trace_proto_pkt);
+qdf_export_symbol(qdf_dp_trace_proto_pkt);
 
 /**
  * qdf_dp_display_ptr_record() - display record
@@ -1774,7 +1774,7 @@ void qdf_dp_display_ptr_record(struct qdf_dp_trace_record_s *record,
 			sizeof(buf->cookie));
 	}
 }
-EXPORT_SYMBOL(qdf_dp_display_ptr_record);
+qdf_export_symbol(qdf_dp_display_ptr_record);
 
 /**
  * qdf_dp_trace_ptr() - record dptrace
@@ -1806,7 +1806,7 @@ void qdf_dp_trace_ptr(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code,
 	qdf_dp_add_record(code, (uint8_t *)&buf, buf_size, pdev_id,
 				QDF_NBUF_CB_DP_TRACE_PRINT(nbuf));
 }
-EXPORT_SYMBOL(qdf_dp_trace_ptr);
+qdf_export_symbol(qdf_dp_trace_ptr);
 
 /**
  * qdf_dp_display_trace() - Displays a record in DP trace
@@ -1850,7 +1850,7 @@ void qdf_dp_display_record(struct qdf_dp_trace_record_s *pRecord,
 		break;
 	};
 }
-EXPORT_SYMBOL(qdf_dp_display_record);
+qdf_export_symbol(qdf_dp_display_record);
 
 
 /**
@@ -1873,7 +1873,7 @@ void qdf_dp_trace(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
 	qdf_dp_add_record(code, data, size, pdev_id,
 		(nbuf != NULL) ? QDF_NBUF_CB_DP_TRACE_PRINT(nbuf) : false);
 }
-EXPORT_SYMBOL(qdf_dp_trace);
+qdf_export_symbol(qdf_dp_trace);
 
 /**
  * qdf_dp_trace_spin_lock_init() - initializes the lock variable before use
@@ -1886,7 +1886,7 @@ void qdf_dp_trace_spin_lock_init(void)
 {
 	spin_lock_init(&l_dp_trace_lock);
 }
-EXPORT_SYMBOL(qdf_dp_trace_spin_lock_init);
+qdf_export_symbol(qdf_dp_trace_spin_lock_init);
 
 /**
  * qdf_dp_trace_disable_live_mode - disable live mode for dptrace
@@ -1897,7 +1897,7 @@ void qdf_dp_trace_disable_live_mode(void)
 {
 	g_qdf_dp_trace_data.live_mode = 0;
 }
-EXPORT_SYMBOL(qdf_dp_trace_disable_live_mode);
+qdf_export_symbol(qdf_dp_trace_disable_live_mode);
 
 /**
  * qdf_dp_trace_enable_live_mode() - enable live mode for dptrace
@@ -1908,7 +1908,7 @@ void qdf_dp_trace_enable_live_mode(void)
 {
 	g_qdf_dp_trace_data.live_mode = 1;
 }
-EXPORT_SYMBOL(qdf_dp_trace_enable_live_mode);
+qdf_export_symbol(qdf_dp_trace_enable_live_mode);
 
 /**
  * qdf_dp_trace_clear_buffer() - clear dp trace buffer
@@ -1923,7 +1923,7 @@ void qdf_dp_trace_clear_buffer(void)
 	memset(g_qdf_dp_trace_tbl, 0,
 	   MAX_QDF_DP_TRACE_RECORDS * sizeof(struct qdf_dp_trace_record_s));
 }
-EXPORT_SYMBOL(qdf_dp_trace_clear_buffer);
+qdf_export_symbol(qdf_dp_trace_clear_buffer);
 
 void qdf_dp_trace_dump_stats(void)
 {
@@ -2023,7 +2023,7 @@ void qdf_dp_trace_dump_all(uint32_t count, uint8_t pdev_id)
 		spin_unlock_bh(&l_dp_trace_lock);
 	}
 }
-EXPORT_SYMBOL(qdf_dp_trace_dump_all);
+qdf_export_symbol(qdf_dp_trace_dump_all);
 
 #endif
 
@@ -2126,7 +2126,7 @@ struct category_name_info g_qdf_category_name[MAX_SUPPORTED_CATEGORY] = {
 	[QDF_MODULE_ID_CONFIG] = {"CONFIG"},
 	[QDF_MODULE_ID_ANY] = {"ANY"},
 };
-EXPORT_SYMBOL(g_qdf_category_name);
+qdf_export_symbol(g_qdf_category_name);
 
 /**
  * qdf_trace_display() - Display trace
@@ -2160,7 +2160,7 @@ void qdf_trace_display(void)
 			       QDF_TRACE_LEVEL_DEBUG) ? "X" : " ");
 	}
 }
-EXPORT_SYMBOL(qdf_trace_display);
+qdf_export_symbol(qdf_trace_display);
 
 #ifdef CONFIG_MCL
 #define print_to_console(str)
@@ -2241,7 +2241,7 @@ void qdf_trace_msg_cmn(unsigned int idx,
 		va_end(val);
 	}
 }
-EXPORT_SYMBOL(qdf_trace_msg_cmn);
+qdf_export_symbol(qdf_trace_msg_cmn);
 
 /**
  * qdf_dp_trace_throttle_live_mode() - Throttle DP Trace live mode
@@ -2288,7 +2288,7 @@ void qdf_dp_trace_throttle_live_mode(bool high_bw_request)
 	}
 
 }
-EXPORT_SYMBOL(qdf_dp_trace_throttle_live_mode);
+qdf_export_symbol(qdf_dp_trace_throttle_live_mode);
 
 QDF_STATUS qdf_print_setup(void)
 {
@@ -2301,7 +2301,7 @@ QDF_STATUS qdf_print_setup(void)
 	}
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_print_setup);
+qdf_export_symbol(qdf_print_setup);
 
 QDF_STATUS qdf_print_ctrl_cleanup(unsigned int idx)
 {
@@ -2329,7 +2329,7 @@ QDF_STATUS qdf_print_ctrl_cleanup(unsigned int idx)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_print_ctrl_cleanup);
+qdf_export_symbol(qdf_print_ctrl_cleanup);
 
 int qdf_print_ctrl_register(const struct category_info *cinfo,
 			    void *custom_print_handler,
@@ -2401,21 +2401,21 @@ int qdf_print_ctrl_register(const struct category_info *cinfo,
 		__func__, idx);
 	return idx;
 }
-EXPORT_SYMBOL(qdf_print_ctrl_register);
+qdf_export_symbol(qdf_print_ctrl_register);
 
 #ifndef CONFIG_MCL
 void qdf_shared_print_ctrl_cleanup(void)
 {
 	qdf_print_ctrl_cleanup(qdf_pidx);
 }
-EXPORT_SYMBOL(qdf_shared_print_ctrl_cleanup);
+qdf_export_symbol(qdf_shared_print_ctrl_cleanup);
 
 /*
  * Set this to invalid value to differentiate with user-provided
  * value.
  */
 int qdf_dbg_mask = 0;
-EXPORT_SYMBOL(qdf_dbg_mask);
+qdf_export_symbol(qdf_dbg_mask);
 qdf_declare_param(qdf_dbg_mask, int);
 
 /*
@@ -2646,7 +2646,7 @@ void qdf_shared_print_ctrl_init(void)
 			"LOG_SHARED_OBJ");
 	qdf_mem_free(cinfo);
 }
-EXPORT_SYMBOL(qdf_shared_print_ctrl_init);
+qdf_export_symbol(qdf_shared_print_ctrl_init);
 #endif
 
 QDF_STATUS qdf_print_set_category_verbose(unsigned int idx,
@@ -2710,7 +2710,7 @@ QDF_STATUS qdf_print_set_category_verbose(unsigned int idx,
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_print_set_category_verbose);
+qdf_export_symbol(qdf_print_set_category_verbose);
 
 bool qdf_print_is_category_enabled(unsigned int idx, QDF_MODULE_ID category)
 {
@@ -2742,7 +2742,7 @@ bool qdf_print_is_category_enabled(unsigned int idx, QDF_MODULE_ID category)
 	else
 		return true;
 }
-EXPORT_SYMBOL(qdf_print_is_category_enabled);
+qdf_export_symbol(qdf_print_is_category_enabled);
 
 bool qdf_print_is_verbose_enabled(unsigned int idx, QDF_MODULE_ID category,
 				  QDF_TRACE_LEVEL verbose)
@@ -2782,7 +2782,7 @@ bool qdf_print_is_verbose_enabled(unsigned int idx, QDF_MODULE_ID category,
 
 	return verbose_enabled;
 }
-EXPORT_SYMBOL(qdf_print_is_verbose_enabled);
+qdf_export_symbol(qdf_print_is_verbose_enabled);
 
 #ifdef DBG_LVL_MAC_FILTERING
 
@@ -2813,7 +2813,7 @@ QDF_STATUS qdf_print_set_node_flag(unsigned int idx, uint8_t enable)
 
 	return QDF_STATUS_SUCCESS;
 }
-EXPORT_SYMBOL(qdf_print_set_node_flag);
+qdf_export_symbol(qdf_print_set_node_flag);
 
 bool qdf_print_get_node_flag(unsigned int idx)
 {
@@ -2836,7 +2836,7 @@ bool qdf_print_get_node_flag(unsigned int idx)
 
 	return node_flag;
 }
-EXPORT_SYMBOL(qdf_print_get_node_flag);
+qdf_export_symbol(qdf_print_get_node_flag);
 
 void qdf_print_clean_node_flag(unsigned int idx)
 {
@@ -2868,7 +2868,7 @@ void QDF_PRINT_INFO(unsigned int idx, QDF_MODULE_ID module,
 	qdf_vprint(str_format, args);
 	va_end(args);
 }
-EXPORT_SYMBOL(QDF_PRINT_INFO);
+qdf_export_symbol(QDF_PRINT_INFO);
 
 #ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
 void qdf_logging_init(void)
@@ -2907,19 +2907,19 @@ int qdf_sprint_symbol(char *buffer, void *addr)
 	return 1;
 }
 #endif
-EXPORT_SYMBOL(qdf_sprint_symbol);
+qdf_export_symbol(qdf_sprint_symbol);
 
 void qdf_set_pidx(int pidx)
 {
 	qdf_pidx = pidx;
 }
-EXPORT_SYMBOL(qdf_set_pidx);
+qdf_export_symbol(qdf_set_pidx);
 
 int qdf_get_pidx(void)
 {
 	return qdf_pidx;
 }
-EXPORT_SYMBOL(qdf_get_pidx);
+qdf_export_symbol(qdf_get_pidx);
 
 #ifdef PANIC_ON_BUG
 #ifdef CONFIG_SLUB_DEBUG
@@ -2927,7 +2927,7 @@ void QDF_DEBUG_PANIC(void)
 {
 	BUG();
 }
-EXPORT_SYMBOL(QDF_DEBUG_PANIC);
+qdf_export_symbol(QDF_DEBUG_PANIC);
 #endif /* CONFIG_SLUB_DEBUG */
 #endif /* PANIC_ON_BUG */