wlan: constify MAC address in cfg80211 for 3.18 support
The following cfg80211 interfaces constify the MAC addr params.
So make the corresonding changes to adapt the new interface.
.add_station
.change_station
.del_station
.get_station
Change-Id: I09c64a33039db6bd7c3c72afd1d30486ea03d142
CRs-fixed: 882885
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h
index b1774bc..93e0931 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg80211.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h
@@ -969,6 +969,13 @@
void* wlan_hdd_change_country_code_cb(void *pAdapter);
void hdd_select_cbmode( hdd_adapter_t *pAdapter,v_U8_t operationChannel);
+v_U8_t* wlan_hdd_cfg80211_get_ie_ptr(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const v_U8_t *pIes,
+#else
+ v_U8_t *pIes,
+#endif
+ int length, v_U8_t eid);
#ifdef FEATURE_WLAN_CH_AVOID
int wlan_hdd_send_avoid_freq_event(hdd_context_t *pHddCtx,
diff --git a/CORE/HDD/inc/wlan_hdd_tdls.h b/CORE/HDD/inc/wlan_hdd_tdls.h
index b7da352..3d3627b 100644
--- a/CORE/HDD/inc/wlan_hdd_tdls.h
+++ b/CORE/HDD/inc/wlan_hdd_tdls.h
@@ -149,7 +149,12 @@
WIFI_TDLS_FAILED /* Direct link failed */
} tdls_state_t;
-typedef int (*cfg80211_exttdls_callback)(tANI_U8* mac,
+typedef int (*cfg80211_exttdls_callback)(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tANI_U8* mac,
+#else
+ tANI_U8* mac,
+#endif
tANI_S32 state,
tANI_S32 reason,
void *ctx);
@@ -247,13 +252,25 @@
int wlan_hdd_tdls_set_sta_id(hdd_adapter_t *pAdapter, u8 *mac, u8 staId);
-hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter, u8 *mac, tANI_BOOLEAN mutexLock);
+hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
+ tANI_BOOLEAN mutexLock);
hddTdlsPeer_t *wlan_hdd_tdls_find_all_peer(hdd_context_t *pHddCtx, u8 *mac);
int wlan_hdd_tdls_get_link_establish_params(hdd_adapter_t *pAdapter, u8 *mac,
tCsrTdlsLinkEstablishParams* tdlsLinkEstablishParams);
-hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, u8 *mac);
+hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac
+#else
+ u8 *mac
+#endif
+ );
int wlan_hdd_tdls_set_cap(hdd_adapter_t *pAdapter, u8* mac, tTDLSCapType cap);
@@ -261,14 +278,22 @@
tTDLSLinkStatus status,
tTDLSLinkReason reason);
void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter,
- u8* mac,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
tTDLSLinkStatus linkStatus,
tTDLSLinkReason reason);
int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter, u8 *mac);
int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
u8 *mac,
+#endif
tCsrStaParams *StaParams,
tANI_BOOLEAN isBufSta,
tANI_BOOLEAN isOffChannelSupported);
@@ -303,7 +328,12 @@
u8 wlan_hdd_tdls_is_peer_progress(hdd_adapter_t *pAdapter, u8 *mac);
-hddTdlsPeer_t *wlan_hdd_tdls_is_progress(hdd_context_t *pHddCtx, u8* mac,
+hddTdlsPeer_t *wlan_hdd_tdls_is_progress(hdd_context_t *pHddCtx,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
u8 skip_self, tANI_BOOLEAN mutexLock);
void wlan_hdd_tdls_set_mode(hdd_context_t *pHddCtx,
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 9123028..9a4ed7b 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -4707,7 +4707,12 @@
return ret;
}
-static int wlan_hdd_cfg80211_exttdls_callback(tANI_U8* mac,
+static int wlan_hdd_cfg80211_exttdls_callback(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tANI_U8* mac,
+#else
+ tANI_U8* mac,
+#endif
tANI_S32 state,
tANI_S32 reason,
void *ctx)
@@ -6316,10 +6321,16 @@
}
-v_U8_t* wlan_hdd_cfg80211_get_ie_ptr(v_U8_t *pIes, int length, v_U8_t eid)
+v_U8_t* wlan_hdd_cfg80211_get_ie_ptr(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
+ const v_U8_t *pIes,
+#else
+ v_U8_t *pIes,
+#endif
+ int length, v_U8_t eid)
{
int left = length;
- v_U8_t *ptr = pIes;
+ v_U8_t *ptr = (v_U8_t *)pIes;
v_U8_t elem_id,elem_len;
while(left >= 2)
@@ -8548,7 +8559,13 @@
#ifdef FEATURE_WLAN_TDLS
static int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
- struct net_device *dev, u8 *mac, bool update, tCsrStaParams *StaParams)
+ struct net_device *dev,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
+ bool update, tCsrStaParams *StaParams)
{
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
hddTdlsPeer_t *pTdlsPeer;
@@ -8767,7 +8784,11 @@
static int __wlan_hdd_change_station(struct wiphy *wiphy,
struct net_device *dev,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
u8 *mac,
+#endif
struct station_parameters *params)
{
VOS_STATUS status = VOS_STATUS_SUCCESS;
@@ -8940,10 +8961,17 @@
return status;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
+static int wlan_hdd_change_station(struct wiphy *wiphy,
+ struct net_device *dev,
+ const u8 *mac,
+ struct station_parameters *params)
+#else
static int wlan_hdd_change_station(struct wiphy *wiphy,
struct net_device *dev,
u8 *mac,
struct station_parameters *params)
+#endif
{
int ret;
@@ -11602,12 +11630,20 @@
* This function is used to parse WPA/RSN IE's.
*/
int wlan_hdd_cfg80211_set_ie( hdd_adapter_t *pAdapter,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *ie,
+#else
u8 *ie,
+#endif
size_t ie_len
)
{
hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *genie = ie;
+#else
u8 *genie = ie;
+#endif
v_U16_t remLen = ie_len;
#ifdef FEATURE_WLAN_WAPI
v_U32_t akmsuite[MAX_NUM_AKM_SUITES];
@@ -11768,7 +11804,7 @@
/* populating as ADDIE in beacon frames */
if (ccmCfgSetStr(WLAN_HDD_GET_HAL_CTX(pAdapter),
- WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA, genie - 2, eLen + 2,
+ WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA, (u8 *)genie - 2, eLen + 2,
NULL, eANI_BOOLEAN_FALSE)== eHAL_STATUS_SUCCESS)
{
if (ccmCfgSetInt(WLAN_HDD_GET_HAL_CTX(pAdapter),
@@ -11975,7 +12011,13 @@
* Parse the received IE to find the WPA IE
*
*/
-static bool hdd_isWPAIEPresent(u8 *ie, u8 ie_len)
+static bool hdd_isWPAIEPresent(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
+ const u8 *ie,
+#else
+ u8 *ie,
+#endif
+ u8 ie_len)
{
v_U8_t eLen = 0;
v_U16_t remLen = ie_len;
@@ -12011,9 +12053,9 @@
* This function is used to initialize the security
* parameters during connect operation.
*/
-int wlan_hdd_cfg80211_set_privacy( hdd_adapter_t *pAdapter,
+int wlan_hdd_cfg80211_set_privacy(hdd_adapter_t *pAdapter,
struct cfg80211_connect_params *req
- )
+ )
{
int status = 0;
hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
@@ -12675,9 +12717,9 @@
hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
tCsrRoamProfile *pRoamProfile;
int status;
- bool alloc_bssid = VOS_FALSE;
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ tSirMacAddr bssid;
ENTER();
@@ -12733,6 +12775,7 @@
"%s:ccmCfgStInt faild for WNI_CFG_IBSS_AUTO_BSSID", __func__);
return -EIO;
}
+ vos_mem_copy((v_U8_t *)bssid, (v_U8_t *)params->bssid, sizeof(bssid));
}
else if(pHddCtx->cfg_ini->isCoalesingInIBSSAllowed == 0)
{
@@ -12743,17 +12786,10 @@
"%s:ccmCfgStInt faild for WNI_CFG_IBSS_AUTO_BSSID", __func__);
return -EIO;
}
- params->bssid = vos_mem_malloc(VOS_MAC_ADDR_SIZE);
- if (!params->bssid)
- {
- hddLog (VOS_TRACE_LEVEL_ERROR,
- "%s:Failed memory allocation", __func__);
- return -EIO;
- }
- vos_mem_copy((v_U8_t *)params->bssid,
+
+ vos_mem_copy((v_U8_t *)bssid,
(v_U8_t *)&pHddCtx->cfg_ini->IbssBssid.bytes[0],
- VOS_MAC_ADDR_SIZE);
- alloc_bssid = VOS_TRUE;
+ sizeof(bssid));
}
/* Set Channel */
@@ -12824,19 +12860,10 @@
pHddStaCtx->conn_info.operationChannel);
if (0 > status)
- {
hddLog(VOS_TRACE_LEVEL_ERROR, "%s: connect failed", __func__);
- return status;
- }
- if (NULL != params->bssid &&
- pHddCtx->cfg_ini->isCoalesingInIBSSAllowed == 0 &&
- alloc_bssid == VOS_TRUE)
- {
- vos_mem_free(params->bssid);
- }
EXIT();
- return 0;
+ return status;
}
static int wlan_hdd_cfg80211_join_ibss( struct wiphy *wiphy,
@@ -13224,9 +13251,13 @@
return ret;
}
-
static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
- u8* mac, struct station_info *sinfo)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8* mac,
+#else
+ u8* mac,
+#endif
+ struct station_info *sinfo)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( dev );
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
@@ -13677,9 +13708,13 @@
EXIT();
return 0;
}
-
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
+static int wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+ const u8* mac, struct station_info *sinfo)
+#else
static int wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
u8* mac, struct station_info *sinfo)
+#endif
{
int ret;
@@ -13946,9 +13981,14 @@
struct net_device *dev,
struct station_del_parameters *param)
#else
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
+static int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
+ struct net_device *dev, const u8 *mac)
+#else
static int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
struct net_device *dev, u8 *mac)
#endif
+#endif
{
int ret;
struct tagCsrDelStaParams delStaParams;
@@ -13977,7 +14017,13 @@
}
static int __wlan_hdd_cfg80211_add_station(struct wiphy *wiphy,
- struct net_device *dev, u8 *mac, struct station_parameters *params)
+ struct net_device *dev,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
+ struct station_parameters *params)
{
hdd_adapter_t *pAdapter;
hdd_context_t *pHddCtx;
@@ -14022,8 +14068,14 @@
return status;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
+static int wlan_hdd_cfg80211_add_station(struct wiphy *wiphy,
+ struct net_device *dev, const u8 *mac,
+ struct station_parameters *params)
+#else
static int wlan_hdd_cfg80211_add_station(struct wiphy *wiphy,
struct net_device *dev, u8 *mac, struct station_parameters *params)
+#endif
{
int ret;
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c
index 01230f0..d080820 100644
--- a/CORE/HDD/src/wlan_hdd_tdls.c
+++ b/CORE/HDD/src/wlan_hdd_tdls.c
@@ -56,7 +56,13 @@
static void wlan_hdd_tdls_implicit_send_discovery_request(tdlsCtx_t *pHddTdlsCtx);
#endif
-static u8 wlan_hdd_tdls_hash_key (u8 *mac)
+static u8 wlan_hdd_tdls_hash_key (
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac
+#else
+ u8 *mac
+#endif
+ )
{
int i;
u8 key = 0;
@@ -1172,7 +1178,13 @@
if mac address doesn't exist, create a list and add, return pointer
return NULL if fails to get new mac address
*/
-hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, u8 *mac)
+hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac
+#else
+ u8 *mac
+#endif
+ )
{
struct list_head *head;
hddTdlsPeer_t *peer;
@@ -1303,7 +1315,11 @@
}
void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter,
- u8* mac,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
tTDLSLinkStatus linkStatus,
tTDLSLinkReason reason)
{
@@ -1438,7 +1454,11 @@
}
int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
u8 *mac,
+#endif
tCsrStaParams *StaParams,
tANI_BOOLEAN isBufSta,
tANI_BOOLEAN isOffChannelSupported)
@@ -1821,7 +1841,12 @@
/* if peerMac is found, then it returns pointer to hddTdlsPeer_t
otherwise, it returns NULL
*/
-hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter, u8 *mac,
+hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
tANI_BOOLEAN mutexLock)
{
u8 key;
@@ -2343,7 +2368,13 @@
* skip_self - if TRUE, skip this mac. otherwise, check all the peer list. if
mac is NULL, this argument is ignored, and check for all the peer list.
*/
-static hddTdlsPeer_t *wlan_hdd_tdls_find_progress_peer(hdd_adapter_t *pAdapter, u8 *mac, u8 skip_self)
+static hddTdlsPeer_t *wlan_hdd_tdls_find_progress_peer(hdd_adapter_t *pAdapter,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
+ u8 skip_self)
{
int i;
struct list_head *head;
@@ -2380,7 +2411,12 @@
return NULL;
}
-hddTdlsPeer_t *wlan_hdd_tdls_is_progress(hdd_context_t *pHddCtx, u8 *mac,
+hddTdlsPeer_t *wlan_hdd_tdls_is_progress(hdd_context_t *pHddCtx,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const u8 *mac,
+#else
+ u8 *mac,
+#endif
u8 skip_self, tANI_BOOLEAN mutexLock)
{
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
diff --git a/CORE/SME/inc/smeInside.h b/CORE/SME/inc/smeInside.h
index e983d01..3329d3f 100644
--- a/CORE/SME/inc/smeInside.h
+++ b/CORE/SME/inc/smeInside.h
@@ -302,8 +302,20 @@
tANI_U8 sessionId,
tSirMacAddr peerMac,
tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
-eHalStatus csrTdlsAddPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
-eHalStatus csrTdlsChangePeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac, tCsrStaParams *pstaParams);
+eHalStatus csrTdlsAddPeerSta(tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tSirMacAddr peerMac
+#else
+ tSirMacAddr peerMac
+#endif
+ );
+eHalStatus csrTdlsChangePeerSta(tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tSirMacAddr peerMac,
+#else
+ tSirMacAddr peerMac,
+#endif
+ tCsrStaParams *pstaParams);
eHalStatus csrTdlsDelPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
eHalStatus csrTdlsProcessCmd(tpAniSirGlobal pMac,tSmeCmd *pCommand );
eHalStatus csrTdlsProcessLinkEstablish( tpAniSirGlobal pMac, tSmeCmd *cmd );
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index d8defd9..5a52661 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -46,6 +46,7 @@
/*--------------------------------------------------------------------------
Include Files
------------------------------------------------------------------------*/
+#include <linux/version.h>
#include "ccmApi.h"
#include "csrApi.h"
#include "pmcApi.h"
@@ -3270,7 +3271,12 @@
\param staParams - Peer Station Parameters.
\- return VOS_STATUS_SUCCES
-------------------------------------------------------------------------*/
-VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
+VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tSirMacAddr peerMac,
+#else
+ tSirMacAddr peerMac,
+#endif
tCsrStaParams *pstaParams);
/* ---------------------------------------------------------------------------
\fn sme_AddTdlsPeerSta
@@ -3279,7 +3285,13 @@
\param peerMac - peer's Mac Adress.
\- return VOS_STATUS_SUCCES
-------------------------------------------------------------------------*/
-VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
+VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tSirMacAddr peerMac
+#else
+ tSirMacAddr peerMac
+#endif
+ );
/* ---------------------------------------------------------------------------
\fn sme_DeleteTdlsPeerSta
\brief API to Delete TDLS peer sta entry.
@@ -3500,7 +3512,11 @@
tANI_U8 channel);
eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tANI_U8 *pBSSId,
+#else
tANI_U8 *pBSSId,
+#endif
tANI_BOOLEAN flush_cache );
void smeGetCommandQStatus( tHalHandle hHal );
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 7ecfffe..8c84356 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -12455,7 +12455,11 @@
}
eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tANI_U8 *pBSSId,
+#else
tANI_U8 *pBSSId,
+#endif
tANI_BOOLEAN flush_cache )
{
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h
index 74471c1..0a81326 100644
--- a/CORE/SME/src/csr/csrInsideApi.h
+++ b/CORE/SME/src/csr/csrInsideApi.h
@@ -37,6 +37,7 @@
#define CSR_INSIDE_API_H__
+#include <linux/version.h>
#include "csrSupport.h"
#include "smeInside.h"
#include "vos_nvitem.h"
@@ -1026,7 +1027,12 @@
eHalStatus csrUpdateChannelList(tpAniSirGlobal pMac);
eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
- tANI_U8 *pBSSId, tANI_BOOLEAN flush_cache );
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tANI_U8 *pBSSId,
+#else
+ tANI_U8 *pBSSId,
+#endif
+ tANI_BOOLEAN flush_cache );
tANI_BOOLEAN csrElectedCountryInfo(tpAniSirGlobal pMac);
void csrAddVoteForCountryInfo(tpAniSirGlobal pMac, tANI_U8 *pCountryCode);
void csrClearVotesForCountryInfo(tpAniSirGlobal pMac);
diff --git a/CORE/SME/src/csr/csrTdlsProcess.c b/CORE/SME/src/csr/csrTdlsProcess.c
index 06596a6..b670225 100644
--- a/CORE/SME/src/csr/csrTdlsProcess.c
+++ b/CORE/SME/src/csr/csrTdlsProcess.c
@@ -155,7 +155,12 @@
/*
* TDLS request API, called from HDD to modify an existing TDLS peer
*/
-eHalStatus csrTdlsChangePeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
+eHalStatus csrTdlsChangePeerSta(tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tSirMacAddr peerMac,
+#else
+ tSirMacAddr peerMac,
+#endif
tCsrStaParams *pstaParams)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -289,7 +294,13 @@
/*
* TDLS request API, called from HDD to add a TDLS peer
*/
-eHalStatus csrTdlsAddPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac)
+eHalStatus csrTdlsAddPeerSta(tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tSirMacAddr peerMac
+#else
+ tSirMacAddr peerMac
+#endif
+ )
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
tSmeCmd *tdlsAddStaCmd ;
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 5633259..01db3fa 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -3928,7 +3928,11 @@
}
eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tANI_U8 *pBSSId,
+#else
tANI_U8 *pBSSId,
+#endif
tANI_BOOLEAN flush_cache )
{
eHalStatus status = eHAL_STATUS_FAILURE;
@@ -10637,7 +10641,12 @@
\param staParams - Peer Station Parameters
\- return VOS_STATUS_SUCCES
-------------------------------------------------------------------------*/
-VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
+VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tSirMacAddr peerMac,
+#else
+ tSirMacAddr peerMac,
+#endif
tCsrStaParams *pstaParams)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -10656,7 +10665,7 @@
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
- status = csrTdlsChangePeerSta(hHal, sessionId, peerMac,pstaParams);
+ status = csrTdlsChangePeerSta(hHal, sessionId, peerMac, pstaParams);
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -10672,7 +10681,13 @@
\param peerMac - peer's Mac Adress.
\- return VOS_STATUS_SUCCES
-------------------------------------------------------------------------*/
-VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac)
+VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const tSirMacAddr peerMac
+#else
+ tSirMacAddr peerMac
+#endif
+ )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
diff --git a/CORE/VOSS/inc/vos_memory.h b/CORE/VOSS/inc/vos_memory.h
index 2c518e9..c6de77e 100644
--- a/CORE/VOSS/inc/vos_memory.h
+++ b/CORE/VOSS/inc/vos_memory.h
@@ -45,7 +45,7 @@
Include Files
------------------------------------------------------------------------*/
#include <vos_types.h>
-
+#include <linux/version.h>
/*--------------------------------------------------------------------------
Preprocessor definitions and constants
------------------------------------------------------------------------*/
@@ -210,7 +210,18 @@
locations are equal or not equal.
-------------------------------------------------------------------------------*/
-v_BOOL_t vos_mem_compare( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numBytes );
+v_BOOL_t vos_mem_compare(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const v_VOID_t *pMemory1,
+#else
+ v_VOID_t *pMemory1,
+#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const v_VOID_t *pMemory2,
+#else
+ v_VOID_t *pMemory2,
+#endif
+ v_U32_t numBytes);
/** ---------------------------------------------------------------------------
diff --git a/CORE/VOSS/src/vos_memory.c b/CORE/VOSS/src/vos_memory.c
index ed57298..39d46c2 100644
--- a/CORE/VOSS/src/vos_memory.c
+++ b/CORE/VOSS/src/vos_memory.c
@@ -426,7 +426,18 @@
memmove(pDst, pSrc, numBytes);
}
-v_BOOL_t vos_mem_compare( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numBytes )
+v_BOOL_t vos_mem_compare(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const v_VOID_t *pMemory1,
+#else
+ v_VOID_t *pMemory1,
+#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+ const v_VOID_t *pMemory2,
+#else
+ v_VOID_t *pMemory2,
+#endif
+ v_U32_t numBytes )
{
if (0 == numBytes)
{