Commit 55a27055 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

staging: csr: remove CsrPmemFree()

It's just a wrapper around kfree() so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4becf12d
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_panic.h" #include "csr_panic.h"
#include "csr_sched.h" #include "csr_sched.h"
...@@ -312,11 +313,11 @@ void CsrMsgConvDeinit(void) ...@@ -312,11 +313,11 @@ void CsrMsgConvDeinit(void)
{ {
CsrMsgConvPrimEntry *s_next; CsrMsgConvPrimEntry *s_next;
s_next = s->next; s_next = s->next;
CsrPmemFree(s); kfree(s);
s = s_next; s = s_next;
} }
CsrPmemFree(converter); kfree(converter);
converter = NULL; converter = NULL;
} }
EXPORT_SYMBOL_GPL(CsrMsgConvDeinit); EXPORT_SYMBOL_GPL(CsrMsgConvDeinit);
......
...@@ -38,14 +38,3 @@ void *CsrPmemAlloc(size_t size) ...@@ -38,14 +38,3 @@ void *CsrPmemAlloc(size_t size)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(CsrPmemAlloc); EXPORT_SYMBOL_GPL(CsrPmemAlloc);
void CsrPmemFree(void *ptr)
{
if (ptr == NULL)
{
return;
}
kfree(ptr);
}
EXPORT_SYMBOL_GPL(CsrPmemFree);
...@@ -45,20 +45,6 @@ void *CsrPmemAllocDebug(size_t size, ...@@ -45,20 +45,6 @@ void *CsrPmemAllocDebug(size_t size,
void *CsrPmemAlloc(size_t size); void *CsrPmemAlloc(size_t size);
#endif #endif
/*****************************************************************************
NAME
CsrPmemFree
DESCRIPTION
This function will deallocate a previously allocated block of memory.
PARAMETERS
ptr - Pointer to allocated memory.
*****************************************************************************/
void CsrPmemFree(void *ptr);
#endif #endif
/***************************************************************************** /*****************************************************************************
...@@ -131,7 +117,6 @@ void *CsrPmemDebugAlloc(size_t size, CsrPmemDebugAllocType type, const char* fil ...@@ -131,7 +117,6 @@ void *CsrPmemDebugAlloc(size_t size, CsrPmemDebugAllocType type, const char* fil
#define CsrPmemAlloc(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__) #define CsrPmemAlloc(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)
void CsrPmemDebugFree(void *ptr, CsrPmemDebugAllocType type, const char* file, u32 line); void CsrPmemDebugFree(void *ptr, CsrPmemDebugAllocType type, const char* file, u32 line);
#define CsrPmemFree(ptr) CsrPmemDebugFree(ptr, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)
#endif #endif
......
...@@ -125,7 +125,7 @@ void CsrSchedBgintSet(CsrSchedBgint bgint); ...@@ -125,7 +125,7 @@ void CsrSchedBgintSet(CsrSchedBgint bgint);
* obey the convention that when a message built with CsrPmemAlloc()ed memory * obey the convention that when a message built with CsrPmemAlloc()ed memory
* is given to CsrSchedMessagePut() then ownership of the memory is ceded to the * is given to CsrSchedMessagePut() then ownership of the memory is ceded to the
* scheduler - and eventually to the recipient task. I.e., the receiver of * scheduler - and eventually to the recipient task. I.e., the receiver of
* the message will be expected to CsrPmemFree() the message storage. * the message will be expected to kfree() the message storage.
* *
* RETURNS * RETURNS
* void. * void.
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*****************************************************************************/ *****************************************************************************/
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_unicode.h" #include "csr_unicode.h"
#include "csr_macro.h" #include "csr_macro.h"
...@@ -881,7 +882,7 @@ u16 *CsrUtf16String2XML(u16 *str) ...@@ -881,7 +882,7 @@ u16 *CsrUtf16String2XML(u16 *str)
*outputString++ = 0; *outputString++ = 0;
CsrPmemFree(str); kfree(str);
} }
} }
...@@ -1008,7 +1009,7 @@ u16 *CsrXML2Utf16String(u16 *str) ...@@ -1008,7 +1009,7 @@ u16 *CsrXML2Utf16String(u16 *str)
*outputString++ = 0; *outputString++ = 0;
CsrPmemFree(str); kfree(str);
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*****************************************************************************/ *****************************************************************************/
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_wifi_nme_ap_prim.h" #include "csr_wifi_nme_ap_prim.h"
#include "csr_wifi_nme_ap_lib.h" #include "csr_wifi_nme_ap_lib.h"
...@@ -41,7 +41,7 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message) ...@@ -41,7 +41,7 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_NME_AP_CONFIG_SET_REQ: case CSR_WIFI_NME_AP_CONFIG_SET_REQ:
{ {
CsrWifiNmeApConfigSetReq *p = (CsrWifiNmeApConfigSetReq *)message; CsrWifiNmeApConfigSetReq *p = (CsrWifiNmeApConfigSetReq *)message;
CsrPmemFree(p->apMacConfig.macAddressList); kfree(p->apMacConfig.macAddressList);
p->apMacConfig.macAddressList = NULL; p->apMacConfig.macAddressList = NULL;
break; break;
} }
...@@ -54,7 +54,7 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message) ...@@ -54,7 +54,7 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message)
switch (p->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase) switch (p->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase)
{ {
case CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE: case CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE:
CsrPmemFree(p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase); kfree(p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase);
p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase = NULL; p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase = NULL;
break; break;
default: default:
...@@ -68,11 +68,11 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message) ...@@ -68,11 +68,11 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message)
u16 i3; u16 i3;
for (i3 = 0; i3 < p->p2pGoParam.operatingChanList.channelEntryListCount; i3++) for (i3 = 0; i3 < p->p2pGoParam.operatingChanList.channelEntryListCount; i3++)
{ {
CsrPmemFree(p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel); kfree(p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel);
p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel = NULL; p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel = NULL;
} }
} }
CsrPmemFree(p->p2pGoParam.operatingChanList.channelEntryList); kfree(p->p2pGoParam.operatingChanList.channelEntryList);
p->p2pGoParam.operatingChanList.channelEntryList = NULL; p->p2pGoParam.operatingChanList.channelEntryList = NULL;
break; break;
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/string.h> #include <linux/string.h>
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_msgconv.h" #include "csr_msgconv.h"
#include "csr_unicode.h" #include "csr_unicode.h"
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
void CsrWifiNmeApPfree(void *ptr) void CsrWifiNmeApPfree(void *ptr)
{ {
CsrPmemFree(ptr); kfree(ptr);
} }
...@@ -221,8 +222,8 @@ void* CsrWifiNmeApConfigSetReqDes(u8 *buffer, size_t length) ...@@ -221,8 +222,8 @@ void* CsrWifiNmeApConfigSetReqDes(u8 *buffer, size_t length)
void CsrWifiNmeApConfigSetReqSerFree(void *voidPrimitivePointer) void CsrWifiNmeApConfigSetReqSerFree(void *voidPrimitivePointer)
{ {
CsrWifiNmeApConfigSetReq *primitive = (CsrWifiNmeApConfigSetReq *) voidPrimitivePointer; CsrWifiNmeApConfigSetReq *primitive = (CsrWifiNmeApConfigSetReq *) voidPrimitivePointer;
CsrPmemFree(primitive->apMacConfig.macAddressList); kfree(primitive->apMacConfig.macAddressList);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -555,7 +556,7 @@ void CsrWifiNmeApStartReqSerFree(void *voidPrimitivePointer) ...@@ -555,7 +556,7 @@ void CsrWifiNmeApStartReqSerFree(void *voidPrimitivePointer)
switch (primitive->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase) switch (primitive->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase)
{ {
case CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE: case CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE:
CsrPmemFree(primitive->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase); kfree(primitive->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase);
break; break;
default: default:
break; break;
...@@ -568,11 +569,11 @@ void CsrWifiNmeApStartReqSerFree(void *voidPrimitivePointer) ...@@ -568,11 +569,11 @@ void CsrWifiNmeApStartReqSerFree(void *voidPrimitivePointer)
u16 i3; u16 i3;
for (i3 = 0; i3 < primitive->p2pGoParam.operatingChanList.channelEntryListCount; i3++) for (i3 = 0; i3 < primitive->p2pGoParam.operatingChanList.channelEntryListCount; i3++)
{ {
CsrPmemFree(primitive->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel); kfree(primitive->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel);
} }
} }
CsrPmemFree(primitive->p2pGoParam.operatingChanList.channelEntryList); kfree(primitive->p2pGoParam.operatingChanList.channelEntryList);
CsrPmemFree(primitive); kfree(primitive);
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*****************************************************************************/ *****************************************************************************/
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_wifi_router_ctrl_prim.h" #include "csr_wifi_router_ctrl_prim.h"
#include "csr_wifi_router_ctrl_lib.h" #include "csr_wifi_router_ctrl_lib.h"
...@@ -41,62 +41,62 @@ void CsrWifiRouterCtrlFreeDownstreamMessageContents(u16 eventClass, void *messag ...@@ -41,62 +41,62 @@ void CsrWifiRouterCtrlFreeDownstreamMessageContents(u16 eventClass, void *messag
case CSR_WIFI_ROUTER_CTRL_HIP_REQ: case CSR_WIFI_ROUTER_CTRL_HIP_REQ:
{ {
CsrWifiRouterCtrlHipReq *p = (CsrWifiRouterCtrlHipReq *)message; CsrWifiRouterCtrlHipReq *p = (CsrWifiRouterCtrlHipReq *)message;
CsrPmemFree(p->mlmeCommand); kfree(p->mlmeCommand);
p->mlmeCommand = NULL; p->mlmeCommand = NULL;
CsrPmemFree(p->dataRef1); kfree(p->dataRef1);
p->dataRef1 = NULL; p->dataRef1 = NULL;
CsrPmemFree(p->dataRef2); kfree(p->dataRef2);
p->dataRef2 = NULL; p->dataRef2 = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_MULTICAST_ADDRESS_RES: case CSR_WIFI_ROUTER_CTRL_MULTICAST_ADDRESS_RES:
{ {
CsrWifiRouterCtrlMulticastAddressRes *p = (CsrWifiRouterCtrlMulticastAddressRes *)message; CsrWifiRouterCtrlMulticastAddressRes *p = (CsrWifiRouterCtrlMulticastAddressRes *)message;
CsrPmemFree(p->getAddresses); kfree(p->getAddresses);
p->getAddresses = NULL; p->getAddresses = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_TCLAS_ADD_REQ: case CSR_WIFI_ROUTER_CTRL_TCLAS_ADD_REQ:
{ {
CsrWifiRouterCtrlTclasAddReq *p = (CsrWifiRouterCtrlTclasAddReq *)message; CsrWifiRouterCtrlTclasAddReq *p = (CsrWifiRouterCtrlTclasAddReq *)message;
CsrPmemFree(p->tclas); kfree(p->tclas);
p->tclas = NULL; p->tclas = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_TCLAS_DEL_REQ: case CSR_WIFI_ROUTER_CTRL_TCLAS_DEL_REQ:
{ {
CsrWifiRouterCtrlTclasDelReq *p = (CsrWifiRouterCtrlTclasDelReq *)message; CsrWifiRouterCtrlTclasDelReq *p = (CsrWifiRouterCtrlTclasDelReq *)message;
CsrPmemFree(p->tclas); kfree(p->tclas);
p->tclas = NULL; p->tclas = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_WIFI_ON_REQ: case CSR_WIFI_ROUTER_CTRL_WIFI_ON_REQ:
{ {
CsrWifiRouterCtrlWifiOnReq *p = (CsrWifiRouterCtrlWifiOnReq *)message; CsrWifiRouterCtrlWifiOnReq *p = (CsrWifiRouterCtrlWifiOnReq *)message;
CsrPmemFree(p->data); kfree(p->data);
p->data = NULL; p->data = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_WIFI_ON_RES: case CSR_WIFI_ROUTER_CTRL_WIFI_ON_RES:
{ {
CsrWifiRouterCtrlWifiOnRes *p = (CsrWifiRouterCtrlWifiOnRes *)message; CsrWifiRouterCtrlWifiOnRes *p = (CsrWifiRouterCtrlWifiOnRes *)message;
CsrPmemFree(p->smeVersions.smeBuild); kfree(p->smeVersions.smeBuild);
p->smeVersions.smeBuild = NULL; p->smeVersions.smeBuild = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_WAPI_RX_PKT_REQ: case CSR_WIFI_ROUTER_CTRL_WAPI_RX_PKT_REQ:
{ {
CsrWifiRouterCtrlWapiRxPktReq *p = (CsrWifiRouterCtrlWapiRxPktReq *)message; CsrWifiRouterCtrlWapiRxPktReq *p = (CsrWifiRouterCtrlWapiRxPktReq *)message;
CsrPmemFree(p->signal); kfree(p->signal);
p->signal = NULL; p->signal = NULL;
CsrPmemFree(p->data); kfree(p->data);
p->data = NULL; p->data = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_WAPI_UNICAST_TX_PKT_REQ: case CSR_WIFI_ROUTER_CTRL_WAPI_UNICAST_TX_PKT_REQ:
{ {
CsrWifiRouterCtrlWapiUnicastTxPktReq *p = (CsrWifiRouterCtrlWapiUnicastTxPktReq *)message; CsrWifiRouterCtrlWapiUnicastTxPktReq *p = (CsrWifiRouterCtrlWapiUnicastTxPktReq *)message;
CsrPmemFree(p->data); kfree(p->data);
p->data = NULL; p->data = NULL;
break; break;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*****************************************************************************/ *****************************************************************************/
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_wifi_router_ctrl_prim.h" #include "csr_wifi_router_ctrl_prim.h"
#include "csr_wifi_router_ctrl_lib.h" #include "csr_wifi_router_ctrl_lib.h"
...@@ -41,41 +41,41 @@ void CsrWifiRouterCtrlFreeUpstreamMessageContents(u16 eventClass, void *message) ...@@ -41,41 +41,41 @@ void CsrWifiRouterCtrlFreeUpstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_ROUTER_CTRL_HIP_IND: case CSR_WIFI_ROUTER_CTRL_HIP_IND:
{ {
CsrWifiRouterCtrlHipInd *p = (CsrWifiRouterCtrlHipInd *)message; CsrWifiRouterCtrlHipInd *p = (CsrWifiRouterCtrlHipInd *)message;
CsrPmemFree(p->mlmeCommand); kfree(p->mlmeCommand);
p->mlmeCommand = NULL; p->mlmeCommand = NULL;
CsrPmemFree(p->dataRef1); kfree(p->dataRef1);
p->dataRef1 = NULL; p->dataRef1 = NULL;
CsrPmemFree(p->dataRef2); kfree(p->dataRef2);
p->dataRef2 = NULL; p->dataRef2 = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_MULTICAST_ADDRESS_IND: case CSR_WIFI_ROUTER_CTRL_MULTICAST_ADDRESS_IND:
{ {
CsrWifiRouterCtrlMulticastAddressInd *p = (CsrWifiRouterCtrlMulticastAddressInd *)message; CsrWifiRouterCtrlMulticastAddressInd *p = (CsrWifiRouterCtrlMulticastAddressInd *)message;
CsrPmemFree(p->setAddresses); kfree(p->setAddresses);
p->setAddresses = NULL; p->setAddresses = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_WIFI_ON_IND: case CSR_WIFI_ROUTER_CTRL_WIFI_ON_IND:
{ {
CsrWifiRouterCtrlWifiOnInd *p = (CsrWifiRouterCtrlWifiOnInd *)message; CsrWifiRouterCtrlWifiOnInd *p = (CsrWifiRouterCtrlWifiOnInd *)message;
CsrPmemFree(p->versions.routerBuild); kfree(p->versions.routerBuild);
p->versions.routerBuild = NULL; p->versions.routerBuild = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_WAPI_RX_MIC_CHECK_IND: case CSR_WIFI_ROUTER_CTRL_WAPI_RX_MIC_CHECK_IND:
{ {
CsrWifiRouterCtrlWapiRxMicCheckInd *p = (CsrWifiRouterCtrlWapiRxMicCheckInd *)message; CsrWifiRouterCtrlWapiRxMicCheckInd *p = (CsrWifiRouterCtrlWapiRxMicCheckInd *)message;
CsrPmemFree(p->signal); kfree(p->signal);
p->signal = NULL; p->signal = NULL;
CsrPmemFree(p->data); kfree(p->data);
p->data = NULL; p->data = NULL;
break; break;
} }
case CSR_WIFI_ROUTER_CTRL_WAPI_UNICAST_TX_ENCRYPT_IND: case CSR_WIFI_ROUTER_CTRL_WAPI_UNICAST_TX_ENCRYPT_IND:
{ {
CsrWifiRouterCtrlWapiUnicastTxEncryptInd *p = (CsrWifiRouterCtrlWapiUnicastTxEncryptInd *)message; CsrWifiRouterCtrlWapiUnicastTxEncryptInd *p = (CsrWifiRouterCtrlWapiUnicastTxEncryptInd *)message;
CsrPmemFree(p->data); kfree(p->data);
p->data = NULL; p->data = NULL;
break; break;
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/string.h> #include <linux/string.h>
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_msgconv.h" #include "csr_msgconv.h"
#include "csr_unicode.h" #include "csr_unicode.h"
...@@ -20,7 +21,7 @@ ...@@ -20,7 +21,7 @@
void CsrWifiRouterCtrlPfree(void *ptr) void CsrWifiRouterCtrlPfree(void *ptr)
{ {
CsrPmemFree(ptr); kfree(ptr);
} }
...@@ -148,10 +149,10 @@ void* CsrWifiRouterCtrlHipReqDes(u8 *buffer, size_t length) ...@@ -148,10 +149,10 @@ void* CsrWifiRouterCtrlHipReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlHipReqSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlHipReqSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlHipReq *primitive = (CsrWifiRouterCtrlHipReq *) voidPrimitivePointer; CsrWifiRouterCtrlHipReq *primitive = (CsrWifiRouterCtrlHipReq *) voidPrimitivePointer;
CsrPmemFree(primitive->mlmeCommand); kfree(primitive->mlmeCommand);
CsrPmemFree(primitive->dataRef1); kfree(primitive->dataRef1);
CsrPmemFree(primitive->dataRef2); kfree(primitive->dataRef2);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -269,8 +270,8 @@ void* CsrWifiRouterCtrlMulticastAddressResDes(u8 *buffer, size_t length) ...@@ -269,8 +270,8 @@ void* CsrWifiRouterCtrlMulticastAddressResDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlMulticastAddressResSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlMulticastAddressResSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlMulticastAddressRes *primitive = (CsrWifiRouterCtrlMulticastAddressRes *) voidPrimitivePointer; CsrWifiRouterCtrlMulticastAddressRes *primitive = (CsrWifiRouterCtrlMulticastAddressRes *) voidPrimitivePointer;
CsrPmemFree(primitive->getAddresses); kfree(primitive->getAddresses);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -457,8 +458,8 @@ void* CsrWifiRouterCtrlTclasAddReqDes(u8 *buffer, size_t length) ...@@ -457,8 +458,8 @@ void* CsrWifiRouterCtrlTclasAddReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlTclasAddReqSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlTclasAddReqSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlTclasAddReq *primitive = (CsrWifiRouterCtrlTclasAddReq *) voidPrimitivePointer; CsrWifiRouterCtrlTclasAddReq *primitive = (CsrWifiRouterCtrlTclasAddReq *) voidPrimitivePointer;
CsrPmemFree(primitive->tclas); kfree(primitive->tclas);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -555,8 +556,8 @@ void* CsrWifiRouterCtrlTclasDelReqDes(u8 *buffer, size_t length) ...@@ -555,8 +556,8 @@ void* CsrWifiRouterCtrlTclasDelReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlTclasDelReqSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlTclasDelReqSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlTclasDelReq *primitive = (CsrWifiRouterCtrlTclasDelReq *) voidPrimitivePointer; CsrWifiRouterCtrlTclasDelReq *primitive = (CsrWifiRouterCtrlTclasDelReq *) voidPrimitivePointer;
CsrPmemFree(primitive->tclas); kfree(primitive->tclas);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -710,8 +711,8 @@ void* CsrWifiRouterCtrlWifiOnReqDes(u8 *buffer, size_t length) ...@@ -710,8 +711,8 @@ void* CsrWifiRouterCtrlWifiOnReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWifiOnReqSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlWifiOnReqSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlWifiOnReq *primitive = (CsrWifiRouterCtrlWifiOnReq *) voidPrimitivePointer; CsrWifiRouterCtrlWifiOnReq *primitive = (CsrWifiRouterCtrlWifiOnReq *) voidPrimitivePointer;
CsrPmemFree(primitive->data); kfree(primitive->data);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -791,8 +792,8 @@ void* CsrWifiRouterCtrlWifiOnResDes(u8 *buffer, size_t length) ...@@ -791,8 +792,8 @@ void* CsrWifiRouterCtrlWifiOnResDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWifiOnResSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlWifiOnResSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlWifiOnRes *primitive = (CsrWifiRouterCtrlWifiOnRes *) voidPrimitivePointer; CsrWifiRouterCtrlWifiOnRes *primitive = (CsrWifiRouterCtrlWifiOnRes *) voidPrimitivePointer;
CsrPmemFree(primitive->smeVersions.smeBuild); kfree(primitive->smeVersions.smeBuild);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -1185,9 +1186,9 @@ void* CsrWifiRouterCtrlWapiRxPktReqDes(u8 *buffer, size_t length) ...@@ -1185,9 +1186,9 @@ void* CsrWifiRouterCtrlWapiRxPktReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWapiRxPktReqSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlWapiRxPktReqSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlWapiRxPktReq *primitive = (CsrWifiRouterCtrlWapiRxPktReq *) voidPrimitivePointer; CsrWifiRouterCtrlWapiRxPktReq *primitive = (CsrWifiRouterCtrlWapiRxPktReq *) voidPrimitivePointer;
CsrPmemFree(primitive->signal); kfree(primitive->signal);
CsrPmemFree(primitive->data); kfree(primitive->data);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -1245,8 +1246,8 @@ void* CsrWifiRouterCtrlWapiUnicastTxPktReqDes(u8 *buffer, size_t length) ...@@ -1245,8 +1246,8 @@ void* CsrWifiRouterCtrlWapiUnicastTxPktReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWapiUnicastTxPktReqSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlWapiUnicastTxPktReqSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlWapiUnicastTxPktReq *primitive = (CsrWifiRouterCtrlWapiUnicastTxPktReq *) voidPrimitivePointer; CsrWifiRouterCtrlWapiUnicastTxPktReq *primitive = (CsrWifiRouterCtrlWapiUnicastTxPktReq *) voidPrimitivePointer;
CsrPmemFree(primitive->data); kfree(primitive->data);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -1335,10 +1336,10 @@ void* CsrWifiRouterCtrlHipIndDes(u8 *buffer, size_t length) ...@@ -1335,10 +1336,10 @@ void* CsrWifiRouterCtrlHipIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlHipIndSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlHipIndSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlHipInd *primitive = (CsrWifiRouterCtrlHipInd *) voidPrimitivePointer; CsrWifiRouterCtrlHipInd *primitive = (CsrWifiRouterCtrlHipInd *) voidPrimitivePointer;
CsrPmemFree(primitive->mlmeCommand); kfree(primitive->mlmeCommand);
CsrPmemFree(primitive->dataRef1); kfree(primitive->dataRef1);
CsrPmemFree(primitive->dataRef2); kfree(primitive->dataRef2);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -1414,8 +1415,8 @@ void* CsrWifiRouterCtrlMulticastAddressIndDes(u8 *buffer, size_t length) ...@@ -1414,8 +1415,8 @@ void* CsrWifiRouterCtrlMulticastAddressIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlMulticastAddressIndSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlMulticastAddressIndSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlMulticastAddressInd *primitive = (CsrWifiRouterCtrlMulticastAddressInd *) voidPrimitivePointer; CsrWifiRouterCtrlMulticastAddressInd *primitive = (CsrWifiRouterCtrlMulticastAddressInd *) voidPrimitivePointer;
CsrPmemFree(primitive->setAddresses); kfree(primitive->setAddresses);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -1839,8 +1840,8 @@ void* CsrWifiRouterCtrlWifiOnIndDes(u8 *buffer, size_t length) ...@@ -1839,8 +1840,8 @@ void* CsrWifiRouterCtrlWifiOnIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWifiOnIndSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlWifiOnIndSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlWifiOnInd *primitive = (CsrWifiRouterCtrlWifiOnInd *) voidPrimitivePointer; CsrWifiRouterCtrlWifiOnInd *primitive = (CsrWifiRouterCtrlWifiOnInd *) voidPrimitivePointer;
CsrPmemFree(primitive->versions.routerBuild); kfree(primitive->versions.routerBuild);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -2482,9 +2483,9 @@ void* CsrWifiRouterCtrlWapiRxMicCheckIndDes(u8 *buffer, size_t length) ...@@ -2482,9 +2483,9 @@ void* CsrWifiRouterCtrlWapiRxMicCheckIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWapiRxMicCheckIndSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlWapiRxMicCheckIndSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlWapiRxMicCheckInd *primitive = (CsrWifiRouterCtrlWapiRxMicCheckInd *) voidPrimitivePointer; CsrWifiRouterCtrlWapiRxMicCheckInd *primitive = (CsrWifiRouterCtrlWapiRxMicCheckInd *) voidPrimitivePointer;
CsrPmemFree(primitive->signal); kfree(primitive->signal);
CsrPmemFree(primitive->data); kfree(primitive->data);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -2587,8 +2588,8 @@ void* CsrWifiRouterCtrlWapiUnicastTxEncryptIndDes(u8 *buffer, size_t length) ...@@ -2587,8 +2588,8 @@ void* CsrWifiRouterCtrlWapiUnicastTxEncryptIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWapiUnicastTxEncryptIndSerFree(void *voidPrimitivePointer) void CsrWifiRouterCtrlWapiUnicastTxEncryptIndSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterCtrlWapiUnicastTxEncryptInd *primitive = (CsrWifiRouterCtrlWapiUnicastTxEncryptInd *) voidPrimitivePointer; CsrWifiRouterCtrlWapiUnicastTxEncryptInd *primitive = (CsrWifiRouterCtrlWapiUnicastTxEncryptInd *) voidPrimitivePointer;
CsrPmemFree(primitive->data); kfree(primitive->data);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*****************************************************************************/ *****************************************************************************/
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_wifi_router_prim.h" #include "csr_wifi_router_prim.h"
#include "csr_wifi_router_lib.h" #include "csr_wifi_router_lib.h"
...@@ -41,7 +41,7 @@ void CsrWifiRouterFreeDownstreamMessageContents(u16 eventClass, void *message) ...@@ -41,7 +41,7 @@ void CsrWifiRouterFreeDownstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_ROUTER_MA_PACKET_REQ: case CSR_WIFI_ROUTER_MA_PACKET_REQ:
{ {
CsrWifiRouterMaPacketReq *p = (CsrWifiRouterMaPacketReq *)message; CsrWifiRouterMaPacketReq *p = (CsrWifiRouterMaPacketReq *)message;
CsrPmemFree(p->frame); kfree(p->frame);
p->frame = NULL; p->frame = NULL;
break; break;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*****************************************************************************/ *****************************************************************************/
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_wifi_router_prim.h" #include "csr_wifi_router_prim.h"
#include "csr_wifi_router_lib.h" #include "csr_wifi_router_lib.h"
...@@ -41,7 +41,7 @@ void CsrWifiRouterFreeUpstreamMessageContents(u16 eventClass, void *message) ...@@ -41,7 +41,7 @@ void CsrWifiRouterFreeUpstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_ROUTER_MA_PACKET_IND: case CSR_WIFI_ROUTER_MA_PACKET_IND:
{ {
CsrWifiRouterMaPacketInd *p = (CsrWifiRouterMaPacketInd *)message; CsrWifiRouterMaPacketInd *p = (CsrWifiRouterMaPacketInd *)message;
CsrPmemFree(p->frame); kfree(p->frame);
p->frame = NULL; p->frame = NULL;
break; break;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*****************************************************************************/ *****************************************************************************/
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_msgconv.h" #include "csr_msgconv.h"
#include "csr_unicode.h" #include "csr_unicode.h"
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
void CsrWifiRouterPfree(void *ptr) void CsrWifiRouterPfree(void *ptr)
{ {
CsrPmemFree(ptr); kfree(ptr);
} }
...@@ -136,8 +136,8 @@ void* CsrWifiRouterMaPacketReqDes(u8 *buffer, size_t length) ...@@ -136,8 +136,8 @@ void* CsrWifiRouterMaPacketReqDes(u8 *buffer, size_t length)
void CsrWifiRouterMaPacketReqSerFree(void *voidPrimitivePointer) void CsrWifiRouterMaPacketReqSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *) voidPrimitivePointer; CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *) voidPrimitivePointer;
CsrPmemFree(primitive->frame); kfree(primitive->frame);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -415,8 +415,8 @@ void* CsrWifiRouterMaPacketIndDes(u8 *buffer, size_t length) ...@@ -415,8 +415,8 @@ void* CsrWifiRouterMaPacketIndDes(u8 *buffer, size_t length)
void CsrWifiRouterMaPacketIndSerFree(void *voidPrimitivePointer) void CsrWifiRouterMaPacketIndSerFree(void *voidPrimitivePointer)
{ {
CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *) voidPrimitivePointer; CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *) voidPrimitivePointer;
CsrPmemFree(primitive->frame); kfree(primitive->frame);
CsrPmemFree(primitive); kfree(primitive);
} }
...@@ -155,7 +155,7 @@ void CsrWifiRouterTransportRecv(unifi_priv_t *priv, u8* buffer, size_t bufferLen ...@@ -155,7 +155,7 @@ void CsrWifiRouterTransportRecv(unifi_priv_t *priv, u8* buffer, size_t bufferLen
unifi_error(priv, "CsrWifiRouterTransportDeserialiseAndSend unhandled prim type 0x%.4X\n", primType); unifi_error(priv, "CsrWifiRouterTransportDeserialiseAndSend unhandled prim type 0x%.4X\n", primType);
break; break;
} }
CsrPmemFree(msg); kfree(msg);
} }
static void CsrWifiRouterTransportSerialiseAndSend(u16 primType, void* msg) static void CsrWifiRouterTransportSerialiseAndSend(u16 primType, void* msg)
...@@ -193,7 +193,7 @@ static void CsrWifiRouterTransportSerialiseAndSend(u16 primType, void* msg) ...@@ -193,7 +193,7 @@ static void CsrWifiRouterTransportSerialiseAndSend(u16 primType, void* msg)
uf_sme_queue_message(drvpriv, encodeBuffer, encodeBufferLen); uf_sme_queue_message(drvpriv, encodeBuffer, encodeBufferLen);
/* Do not use msgEntry->freeFunc because the memory is owned by the driver */ /* Do not use msgEntry->freeFunc because the memory is owned by the driver */
CsrPmemFree(msg); kfree(msg);
} }
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER) #if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*****************************************************************************/ *****************************************************************************/
/* Note: this is an auto-generated file. */ /* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h" #include "csr_pmem.h"
#include "csr_wifi_sme_prim.h" #include "csr_wifi_sme_prim.h"
#include "csr_wifi_sme_lib.h" #include "csr_wifi_sme_lib.h"
...@@ -41,90 +41,90 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message) ...@@ -41,90 +41,90 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_SME_BLACKLIST_REQ: case CSR_WIFI_SME_BLACKLIST_REQ:
{ {
CsrWifiSmeBlacklistReq *p = (CsrWifiSmeBlacklistReq *)message; CsrWifiSmeBlacklistReq *p = (CsrWifiSmeBlacklistReq *)message;
CsrPmemFree(p->setAddresses); kfree(p->setAddresses);
p->setAddresses = NULL; p->setAddresses = NULL;
break; break;
} }
case CSR_WIFI_SME_CALIBRATION_DATA_SET_REQ: case CSR_WIFI_SME_CALIBRATION_DATA_SET_REQ:
{ {
CsrWifiSmeCalibrationDataSetReq *p = (CsrWifiSmeCalibrationDataSetReq *)message; CsrWifiSmeCalibrationDataSetReq *p = (CsrWifiSmeCalibrationDataSetReq *)message;
CsrPmemFree(p->calibrationData); kfree(p->calibrationData);
p->calibrationData = NULL; p->calibrationData = NULL;
break; break;
} }
case CSR_WIFI_SME_CONNECT_REQ: case CSR_WIFI_SME_CONNECT_REQ:
{ {
CsrWifiSmeConnectReq *p = (CsrWifiSmeConnectReq *)message; CsrWifiSmeConnectReq *p = (CsrWifiSmeConnectReq *)message;
CsrPmemFree(p->connectionConfig.mlmeAssociateReqInformationElements); kfree(p->connectionConfig.mlmeAssociateReqInformationElements);
p->connectionConfig.mlmeAssociateReqInformationElements = NULL; p->connectionConfig.mlmeAssociateReqInformationElements = NULL;
break; break;
} }
case CSR_WIFI_SME_MIB_GET_NEXT_REQ: case CSR_WIFI_SME_MIB_GET_NEXT_REQ:
{ {
CsrWifiSmeMibGetNextReq *p = (CsrWifiSmeMibGetNextReq *)message; CsrWifiSmeMibGetNextReq *p = (CsrWifiSmeMibGetNextReq *)message;
CsrPmemFree(p->mibAttribute); kfree(p->mibAttribute);
p->mibAttribute = NULL; p->mibAttribute = NULL;
break; break;
} }
case CSR_WIFI_SME_MIB_GET_REQ: case CSR_WIFI_SME_MIB_GET_REQ:
{ {
CsrWifiSmeMibGetReq *p = (CsrWifiSmeMibGetReq *)message; CsrWifiSmeMibGetReq *p = (CsrWifiSmeMibGetReq *)message;
CsrPmemFree(p->mibAttribute); kfree(p->mibAttribute);
p->mibAttribute = NULL; p->mibAttribute = NULL;
break; break;
} }
case CSR_WIFI_SME_MIB_SET_REQ: case CSR_WIFI_SME_MIB_SET_REQ:
{ {
CsrWifiSmeMibSetReq *p = (CsrWifiSmeMibSetReq *)message; CsrWifiSmeMibSetReq *p = (CsrWifiSmeMibSetReq *)message;
CsrPmemFree(p->mibAttribute); kfree(p->mibAttribute);
p->mibAttribute = NULL; p->mibAttribute = NULL;
break; break;
} }
case CSR_WIFI_SME_MULTICAST_ADDRESS_REQ: case CSR_WIFI_SME_MULTICAST_ADDRESS_REQ:
{ {
CsrWifiSmeMulticastAddressReq *p = (CsrWifiSmeMulticastAddressReq *)message; CsrWifiSmeMulticastAddressReq *p = (CsrWifiSmeMulticastAddressReq *)message;
CsrPmemFree(p->setAddresses); kfree(p->setAddresses);
p->setAddresses = NULL; p->setAddresses = NULL;
break; break;
} }
case CSR_WIFI_SME_PACKET_FILTER_SET_REQ: case CSR_WIFI_SME_PACKET_FILTER_SET_REQ:
{ {
CsrWifiSmePacketFilterSetReq *p = (CsrWifiSmePacketFilterSetReq *)message; CsrWifiSmePacketFilterSetReq *p = (CsrWifiSmePacketFilterSetReq *)message;
CsrPmemFree(p->filter); kfree(p->filter);
p->filter = NULL; p->filter = NULL;
break; break;
} }
case CSR_WIFI_SME_PMKID_REQ: case CSR_WIFI_SME_PMKID_REQ:
{ {
CsrWifiSmePmkidReq *p = (CsrWifiSmePmkidReq *)message; CsrWifiSmePmkidReq *p = (CsrWifiSmePmkidReq *)message;
CsrPmemFree(p->setPmkids); kfree(p->setPmkids);
p->setPmkids = NULL; p->setPmkids = NULL;
break; break;
} }
case CSR_WIFI_SME_SCAN_CONFIG_SET_REQ: case CSR_WIFI_SME_SCAN_CONFIG_SET_REQ:
{ {
CsrWifiSmeScanConfigSetReq *p = (CsrWifiSmeScanConfigSetReq *)message; CsrWifiSmeScanConfigSetReq *p = (CsrWifiSmeScanConfigSetReq *)message;
CsrPmemFree(p->scanConfig.passiveChannelList); kfree(p->scanConfig.passiveChannelList);
p->scanConfig.passiveChannelList = NULL; p->scanConfig.passiveChannelList = NULL;
break; break;
} }
case CSR_WIFI_SME_SCAN_FULL_REQ: case CSR_WIFI_SME_SCAN_FULL_REQ:
{ {
CsrWifiSmeScanFullReq *p = (CsrWifiSmeScanFullReq *)message; CsrWifiSmeScanFullReq *p = (CsrWifiSmeScanFullReq *)message;
CsrPmemFree(p->ssid); kfree(p->ssid);
p->ssid = NULL; p->ssid = NULL;
CsrPmemFree(p->channelList); kfree(p->channelList);
p->channelList = NULL; p->channelList = NULL;
CsrPmemFree(p->probeIe); kfree(p->probeIe);
p->probeIe = NULL; p->probeIe = NULL;
break; break;
} }
case CSR_WIFI_SME_TSPEC_REQ: case CSR_WIFI_SME_TSPEC_REQ:
{ {
CsrWifiSmeTspecReq *p = (CsrWifiSmeTspecReq *)message; CsrWifiSmeTspecReq *p = (CsrWifiSmeTspecReq *)message;
CsrPmemFree(p->tspec); kfree(p->tspec);
p->tspec = NULL; p->tspec = NULL;
CsrPmemFree(p->tclas); kfree(p->tclas);
p->tclas = NULL; p->tclas = NULL;
break; break;
} }
...@@ -135,11 +135,11 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message) ...@@ -135,11 +135,11 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message)
u16 i1; u16 i1;
for (i1 = 0; i1 < p->mibFilesCount; i1++) for (i1 = 0; i1 < p->mibFilesCount; i1++)
{ {
CsrPmemFree(p->mibFiles[i1].data); kfree(p->mibFiles[i1].data);
p->mibFiles[i1].data = NULL; p->mibFiles[i1].data = NULL;
} }
} }
CsrPmemFree(p->mibFiles); kfree(p->mibFiles);
p->mibFiles = NULL; p->mibFiles = NULL;
break; break;
} }
...@@ -150,32 +150,32 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message) ...@@ -150,32 +150,32 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message)
u16 i1; u16 i1;
for (i1 = 0; i1 < p->mibFilesCount; i1++) for (i1 = 0; i1 < p->mibFilesCount; i1++)
{ {
CsrPmemFree(p->mibFiles[i1].data); kfree(p->mibFiles[i1].data);
p->mibFiles[i1].data = NULL; p->mibFiles[i1].data = NULL;
} }
} }
CsrPmemFree(p->mibFiles); kfree(p->mibFiles);
p->mibFiles = NULL; p->mibFiles = NULL;
break; break;
} }
case CSR_WIFI_SME_CLOAKED_SSIDS_SET_REQ: case CSR_WIFI_SME_CLOAKED_SSIDS_SET_REQ:
{ {
CsrWifiSmeCloakedSsidsSetReq *p = (CsrWifiSmeCloakedSsidsSetReq *)message; CsrWifiSmeCloakedSsidsSetReq *p = (CsrWifiSmeCloakedSsidsSetReq *)message;
CsrPmemFree(p->cloakedSsids.cloakedSsids); kfree(p->cloakedSsids.cloakedSsids);
p->cloakedSsids.cloakedSsids = NULL; p->cloakedSsids.cloakedSsids = NULL;
break; break;
} }
case CSR_WIFI_SME_WPS_CONFIGURATION_REQ: case CSR_WIFI_SME_WPS_CONFIGURATION_REQ:
{ {
CsrWifiSmeWpsConfigurationReq *p = (CsrWifiSmeWpsConfigurationReq *)message; CsrWifiSmeWpsConfigurationReq *p = (CsrWifiSmeWpsConfigurationReq *)message;
CsrPmemFree(p->wpsConfig.secondaryDeviceType); kfree(p->wpsConfig.secondaryDeviceType);
p->wpsConfig.secondaryDeviceType = NULL; p->wpsConfig.secondaryDeviceType = NULL;
break; break;
} }
case CSR_WIFI_SME_SET_REQ: case CSR_WIFI_SME_SET_REQ:
{ {
CsrWifiSmeSetReq *p = (CsrWifiSmeSetReq *)message; CsrWifiSmeSetReq *p = (CsrWifiSmeSetReq *)message;
CsrPmemFree(p->data); kfree(p->data);
p->data = NULL; p->data = NULL;
break; break;
} }
......
...@@ -1476,7 +1476,7 @@ unifi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -1476,7 +1476,7 @@ unifi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (pcli->snap_filter.count) { if (pcli->snap_filter.count) {
pcli->snap_filter.count = 0; pcli->snap_filter.count = 0;
CsrPmemFree(pcli->snap_filter.protocols); kfree(pcli->snap_filter.protocols);
} }
if (snap_filter.count == 0) { if (snap_filter.count == 0) {
...@@ -1492,7 +1492,7 @@ unifi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -1492,7 +1492,7 @@ unifi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
(void*)snap_filter.protocols, (void*)snap_filter.protocols,
snap_filter.count * sizeof(u16))) snap_filter.count * sizeof(u16)))
{ {
CsrPmemFree(pcli->snap_filter.protocols); kfree(pcli->snap_filter.protocols);
r = -EFAULT; r = -EFAULT;
goto out; goto out;
} }
...@@ -1938,7 +1938,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length) ...@@ -1938,7 +1938,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
if (logptr == NULL) { if (logptr == NULL) {
unifi_error(priv, "Failed to allocate %d bytes for an SME message\n", unifi_error(priv, "Failed to allocate %d bytes for an SME message\n",
sizeof(udi_log_t) + length); sizeof(udi_log_t) + length);
CsrPmemFree(buffer); kfree(buffer);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1956,7 +1956,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length) ...@@ -1956,7 +1956,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
down(&udi_mutex); down(&udi_mutex);
if (priv->sme_cli == NULL) { if (priv->sme_cli == NULL) {
kfree(logptr); kfree(logptr);
CsrPmemFree(buffer); kfree(buffer);
up(&udi_mutex); up(&udi_mutex);
unifi_info(priv, "Message for the SME dropped, SME has gone away\n"); unifi_info(priv, "Message for the SME dropped, SME has gone away\n");
return 0; return 0;
...@@ -1971,7 +1971,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length) ...@@ -1971,7 +1971,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
up(&udi_mutex); up(&udi_mutex);
/* It is our responsibility to free the buffer allocated in build_packed_*() */ /* It is our responsibility to free the buffer allocated in build_packed_*() */
CsrPmemFree(buffer); kfree(buffer);
func_exit(); func_exit();
......
...@@ -499,7 +499,7 @@ int unifi_putest_dl_fw_buff(unifi_priv_t *priv, unsigned char *arg) ...@@ -499,7 +499,7 @@ int unifi_putest_dl_fw_buff(unifi_priv_t *priv, unsigned char *arg)
fw_user_ptr = ((unsigned char*)arg) + sizeof(unifi_putest_command_t) + sizeof(unsigned int); fw_user_ptr = ((unsigned char*)arg) + sizeof(unifi_putest_command_t) + sizeof(unsigned int);
if (copy_from_user(fw_buf, (void*)fw_user_ptr, fw_length)) { if (copy_from_user(fw_buf, (void*)fw_user_ptr, fw_length)) {
unifi_error(priv, "unifi_putest_dl_fw_buff: Failed to get the buffer\n"); unifi_error(priv, "unifi_putest_dl_fw_buff: Failed to get the buffer\n");
CsrPmemFree(fw_buf); kfree(fw_buf);
return -EFAULT; return -EFAULT;
} }
...@@ -537,7 +537,7 @@ int unifi_putest_dl_fw_buff(unifi_priv_t *priv, unsigned char *arg) ...@@ -537,7 +537,7 @@ int unifi_putest_dl_fw_buff(unifi_priv_t *priv, unsigned char *arg)
free_fw: free_fw:
/* Finished with the putest f/w, so restore the station f/w */ /* Finished with the putest f/w, so restore the station f/w */
priv->fw_sta = temp_fw_sta; priv->fw_sta = temp_fw_sta;
CsrPmemFree(fw_buf); kfree(fw_buf);
return CsrHipResultToStatus(csrResult); return CsrHipResultToStatus(csrResult);
} }
......
...@@ -415,7 +415,7 @@ int sme_mgt_scan_results_get_async(unifi_priv_t *priv, ...@@ -415,7 +415,7 @@ int sme_mgt_scan_results_get_async(unifi_priv_t *priv,
scan_result, i+1); scan_result, i+1);
if (r < 0) { if (r < 0) {
CsrPmemFree(scan_result_list); kfree(scan_result_list);
priv->sme_reply.reply_scan_results_count = 0; priv->sme_reply.reply_scan_results_count = 0;
priv->sme_reply.reply_scan_results = NULL; priv->sme_reply.reply_scan_results = NULL;
return r; return r;
...@@ -429,7 +429,7 @@ int sme_mgt_scan_results_get_async(unifi_priv_t *priv, ...@@ -429,7 +429,7 @@ int sme_mgt_scan_results_get_async(unifi_priv_t *priv,
* and invalidate the reply_scan_results to avoid re-using * and invalidate the reply_scan_results to avoid re-using
* the freed pointers. * the freed pointers.
*/ */
CsrPmemFree(scan_result_list); kfree(scan_result_list);
priv->sme_reply.reply_scan_results_count = 0; priv->sme_reply.reply_scan_results_count = 0;
priv->sme_reply.reply_scan_results = NULL; priv->sme_reply.reply_scan_results = NULL;
......
...@@ -128,7 +128,7 @@ uf_sme_deinit(unifi_priv_t *priv) ...@@ -128,7 +128,7 @@ uf_sme_deinit(unifi_priv_t *priv)
/* Free any TCLASs previously allocated */ /* Free any TCLASs previously allocated */
if (priv->packet_filters.tclas_ies_length) { if (priv->packet_filters.tclas_ies_length) {
priv->packet_filters.tclas_ies_length = 0; priv->packet_filters.tclas_ies_length = 0;
CsrPmemFree(priv->filter_tclas_ies); kfree(priv->filter_tclas_ies);
priv->filter_tclas_ies = NULL; priv->filter_tclas_ies = NULL;
} }
......
...@@ -117,9 +117,9 @@ ul_register_client(unifi_priv_t *priv, unsigned int configuration, ...@@ -117,9 +117,9 @@ ul_register_client(unifi_priv_t *priv, unsigned int configuration,
/* If allocation fails, free allocated memory. */ /* If allocation fails, free allocated memory. */
if (ul_clients[id].reply_bulkdata[ref] == NULL) { if (ul_clients[id].reply_bulkdata[ref] == NULL) {
for (; ref > 0; ref --) { for (; ref > 0; ref --) {
CsrPmemFree(ul_clients[id].reply_bulkdata[ref - 1]); kfree(ul_clients[id].reply_bulkdata[ref - 1]);
} }
CsrPmemFree(ul_clients[id].reply_signal); kfree(ul_clients[id].reply_signal);
unifi_error(priv, "Failed to allocate bulk data buffers for client.\n"); unifi_error(priv, "Failed to allocate bulk data buffers for client.\n");
return NULL; return NULL;
} }
...@@ -164,14 +164,14 @@ ul_deregister_client(ul_client_t *ul_client) ...@@ -164,14 +164,14 @@ ul_deregister_client(ul_client_t *ul_client)
unifi_trace(priv, UDBG5, "UDI (0x%x) deregistered.\n", ul_client); unifi_trace(priv, UDBG5, "UDI (0x%x) deregistered.\n", ul_client);
/* Free memory allocated for the reply signal and its bulk data. */ /* Free memory allocated for the reply signal and its bulk data. */
CsrPmemFree(ul_client->reply_signal); kfree(ul_client->reply_signal);
for (ref = 0; ref < UNIFI_MAX_DATA_REFERENCES; ref ++) { for (ref = 0; ref < UNIFI_MAX_DATA_REFERENCES; ref ++) {
CsrPmemFree(ul_client->reply_bulkdata[ref]); kfree(ul_client->reply_bulkdata[ref]);
} }
if (ul_client->snap_filter.count) { if (ul_client->snap_filter.count) {
ul_client->snap_filter.count = 0; ul_client->snap_filter.count = 0;
CsrPmemFree(ul_client->snap_filter.protocols); kfree(ul_client->snap_filter.protocols);
} }
/* Free anything pending on the udi_log list */ /* Free anything pending on the udi_log list */
......
...@@ -423,7 +423,7 @@ uf_multicast_list_wq(struct work_struct *work) ...@@ -423,7 +423,7 @@ uf_multicast_list_wq(struct work_struct *work)
} }
if (priv->smepriv == NULL) { if (priv->smepriv == NULL) {
CsrPmemFree(multicast_address_list); kfree(multicast_address_list);
return; return;
} }
...@@ -433,7 +433,7 @@ uf_multicast_list_wq(struct work_struct *work) ...@@ -433,7 +433,7 @@ uf_multicast_list_wq(struct work_struct *work)
mc_count, multicast_address_list); mc_count, multicast_address_list);
/* The SME will take a copy of the addreses*/ /* The SME will take a copy of the addreses*/
CsrPmemFree(multicast_address_list); kfree(multicast_address_list);
} }
...@@ -572,7 +572,7 @@ int unifi_cfg_packet_filters(unifi_priv_t *priv, unsigned char *arg) ...@@ -572,7 +572,7 @@ int unifi_cfg_packet_filters(unifi_priv_t *priv, unsigned char *arg)
/* Free any TCLASs previously allocated */ /* Free any TCLASs previously allocated */
if (priv->packet_filters.tclas_ies_length) { if (priv->packet_filters.tclas_ies_length) {
CsrPmemFree(priv->filter_tclas_ies); kfree(priv->filter_tclas_ies);
priv->filter_tclas_ies = NULL; priv->filter_tclas_ies = NULL;
} }
...@@ -683,7 +683,7 @@ int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg) ...@@ -683,7 +683,7 @@ int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg)
rc = copy_from_user(addts_ie, addts_params, addts_ie_length); rc = copy_from_user(addts_ie, addts_params, addts_ie_length);
if (rc) { if (rc) {
unifi_error(priv, "unifi_cfg_wmm_addts: Failed to get the addts buffer\n"); unifi_error(priv, "unifi_cfg_wmm_addts: Failed to get the addts buffer\n");
CsrPmemFree(addts_ie); kfree(addts_ie);
return -EFAULT; return -EFAULT;
} }
...@@ -695,7 +695,7 @@ int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg) ...@@ -695,7 +695,7 @@ int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg)
rc = sme_mgt_tspec(priv, CSR_WIFI_SME_LIST_ACTION_ADD, addts_tid, rc = sme_mgt_tspec(priv, CSR_WIFI_SME_LIST_ACTION_ADD, addts_tid,
&tspec, &tclas); &tspec, &tclas);
CsrPmemFree(addts_ie); kfree(addts_ie);
return rc; return rc;
} }
...@@ -1229,7 +1229,7 @@ void uf_send_pkt_to_encrypt(struct work_struct *work) ...@@ -1229,7 +1229,7 @@ void uf_send_pkt_to_encrypt(struct work_struct *work)
CsrWifiRouterCtrlWapiUnicastTxEncryptIndSend(priv->CSR_WIFI_SME_IFACEQUEUE, 0, interfaceTag, pktBulkDataLength, pktBulkData); CsrWifiRouterCtrlWapiUnicastTxEncryptIndSend(priv->CSR_WIFI_SME_IFACEQUEUE, 0, interfaceTag, pktBulkDataLength, pktBulkData);
unifi_trace(priv, UDBG1, "WapiUnicastTxEncryptInd sent to SME\n"); unifi_trace(priv, UDBG1, "WapiUnicastTxEncryptInd sent to SME\n");
CsrPmemFree(pktBulkData); /* Would have been copied over by the SME Handler */ kfree(pktBulkData); /* Would have been copied over by the SME Handler */
func_exit(); func_exit();
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment