qcacmn: Fix compilation errors in QDF for Big Endian platform

Fix compilation issues faced on the WIN big endian
platform due to QDF convergence related changes.

Change-Id: I33b2a4bbe063acb4585b86e12fa79f96dc12ac73
CRs-Fixed: 1039318
This commit is contained in:
Sathish Kumar
2016-09-21 10:22:21 +05:30
committed by qcabuildsw
parent b1ea5f82ad
commit 79c2bf597e
8 changed files with 67 additions and 2 deletions

View File

@@ -192,6 +192,7 @@ static inline uint64_t __qdf_get_monotonic_boottime(void)
}
#ifdef QCA_WIFI_3_0_ADRASTEA
#include <asm/arch_timer.h>
/**
* __qdf_get_log_timestamp() - get QTIMER ticks

View File

@@ -37,7 +37,7 @@
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <errno.h>
#include <linux/errno.h>
#include <linux/random.h>

View File

@@ -36,6 +36,7 @@
/* Include Files */
#include "qdf_event.h"
#include <linux/export.h>
/* Function Definitions and Documentation */

View File

@@ -35,6 +35,7 @@
/* Include files */
#include <qdf_list.h>
#include <linux/export.h>
/* Function declarations and documenation */

View File

@@ -244,12 +244,19 @@ EXPORT_SYMBOL(qdf_mutex_release);
*
* Return: Pointer to the name if it is valid or a default string
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
const char *qdf_wake_lock_name(qdf_wake_lock_t *lock)
{
if (lock->name)
return lock->name;
return "UNNAMED_WAKELOCK";
}
#else
const char *qdf_wake_lock_name(qdf_wake_lock_t *lock)
{
return "NO_WAKELOCK_SUPPORT";
}
#endif
EXPORT_SYMBOL(qdf_wake_lock_name);
/**
@@ -261,11 +268,18 @@ EXPORT_SYMBOL(qdf_wake_lock_name);
* QDF status success: if wake lock is initialized
* QDF status failure: if wake lock was not initialized
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
QDF_STATUS qdf_wake_lock_create(qdf_wake_lock_t *lock, const char *name)
{
wakeup_source_init(lock, name);
return QDF_STATUS_SUCCESS;
}
#else
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);
/**
@@ -277,6 +291,7 @@ EXPORT_SYMBOL(qdf_wake_lock_create);
* QDF status success: if wake lock is acquired
* QDF status failure: if wake lock was not acquired
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
QDF_STATUS qdf_wake_lock_acquire(qdf_wake_lock_t *lock, uint32_t reason)
{
#ifdef CONFIG_MCL
@@ -287,6 +302,12 @@ QDF_STATUS qdf_wake_lock_acquire(qdf_wake_lock_t *lock, uint32_t reason)
__pm_stay_awake(lock);
return QDF_STATUS_SUCCESS;
}
#else
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);
/**
@@ -298,6 +319,7 @@ EXPORT_SYMBOL(qdf_wake_lock_acquire);
* QDF status success: if wake lock is acquired
* QDF status failure: if wake lock was not acquired
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
QDF_STATUS qdf_wake_lock_timeout_acquire(qdf_wake_lock_t *lock, uint32_t msec)
{
/* Wakelock for Rx is frequent.
@@ -306,6 +328,12 @@ QDF_STATUS qdf_wake_lock_timeout_acquire(qdf_wake_lock_t *lock, uint32_t msec)
__pm_wakeup_event(lock, msec);
return QDF_STATUS_SUCCESS;
}
#else
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);
/**
@@ -317,6 +345,7 @@ EXPORT_SYMBOL(qdf_wake_lock_timeout_acquire);
* QDF status success: if wake lock is acquired
* QDF status failure: if wake lock was not acquired
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
QDF_STATUS qdf_wake_lock_release(qdf_wake_lock_t *lock, uint32_t reason)
{
#ifdef CONFIG_MCL
@@ -327,6 +356,12 @@ QDF_STATUS qdf_wake_lock_release(qdf_wake_lock_t *lock, uint32_t reason)
__pm_relax(lock);
return QDF_STATUS_SUCCESS;
}
#else
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);
/**
@@ -337,11 +372,18 @@ EXPORT_SYMBOL(qdf_wake_lock_release);
* QDF status success: if wake lock is acquired
* QDF status failure: if wake lock was not acquired
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock)
{
wakeup_source_trash(lock);
return QDF_STATUS_SUCCESS;
}
#else
QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock)
{
return QDF_STATUS_SUCCESS;
}
#endif
EXPORT_SYMBOL(qdf_wake_lock_destroy);
#ifdef CONFIG_MCL

View File

@@ -36,6 +36,7 @@
#include "qdf_lock.h"
#include "qdf_list.h"
#include "qdf_mem.h"
#include <linux/export.h>
#ifdef CONFIG_MCL
#include <cds_mc_timer.h>
#endif

View File

@@ -2300,6 +2300,7 @@ __qdf_nbuf_sync_for_cpu(qdf_device_t osdev,
EXPORT_SYMBOL(__qdf_nbuf_sync_for_cpu);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
/**
* qdf_nbuf_update_radiotap_vht_flags() - Update radiotap header VHT flags
* @rx_status: Pointer to rx_status.
@@ -2373,7 +2374,7 @@ static unsigned int qdf_nbuf_update_radiotap_vht_flags(
* Return: length of rtap_len updated.
*/
unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status,
qdf_nbuf_t nbuf, u_int32_t headroom_sz)
qdf_nbuf_t nbuf, uint32_t headroom_sz)
{
uint8_t rtap_buf[RADIOTAP_HEADER_LEN] = {0};
struct ieee80211_radiotap_header *rthdr =
@@ -2436,3 +2437,20 @@ unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status,
qdf_mem_copy(qdf_nbuf_data(nbuf), rtap_buf, rtap_len);
return rtap_len;
}
#else
static unsigned int qdf_nbuf_update_radiotap_vht_flags(
struct mon_rx_status *rx_status,
int8_t *rtap_buf,
uint32_t rtap_len)
{
qdf_print("ERROR: struct ieee80211_radiotap_header not supported");
return 0;
}
unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status,
qdf_nbuf_t nbuf, uint32_t headroom_sz)
{
qdf_print("ERROR: struct ieee80211_radiotap_header not supported");
return 0;
}
#endif

View File

@@ -38,6 +38,7 @@
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/export.h>
/* Function declarations and documenation */