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 @@
#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_panic.h"
#include "csr_sched.h"
......@@ -312,11 +313,11 @@ void CsrMsgConvDeinit(void)
{
CsrMsgConvPrimEntry *s_next;
s_next = s->next;
CsrPmemFree(s);
kfree(s);
s = s_next;
}
CsrPmemFree(converter);
kfree(converter);
converter = NULL;
}
EXPORT_SYMBOL_GPL(CsrMsgConvDeinit);
......
......@@ -38,14 +38,3 @@ void *CsrPmemAlloc(size_t size)
return ret;
}
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,
void *CsrPmemAlloc(size_t size);
#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
/*****************************************************************************
......@@ -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__)
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
......
......@@ -125,7 +125,7 @@ void CsrSchedBgintSet(CsrSchedBgint bgint);
* 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
* 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
* void.
......
......@@ -8,6 +8,7 @@
*****************************************************************************/
#include <linux/module.h>
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_unicode.h"
#include "csr_macro.h"
......@@ -881,7 +882,7 @@ u16 *CsrUtf16String2XML(u16 *str)
*outputString++ = 0;
CsrPmemFree(str);
kfree(str);
}
}
......@@ -1008,7 +1009,7 @@ u16 *CsrXML2Utf16String(u16 *str)
*outputString++ = 0;
CsrPmemFree(str);
kfree(str);
}
}
......
......@@ -9,7 +9,7 @@
*****************************************************************************/
/* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_wifi_nme_ap_prim.h"
#include "csr_wifi_nme_ap_lib.h"
......@@ -41,7 +41,7 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_NME_AP_CONFIG_SET_REQ:
{
CsrWifiNmeApConfigSetReq *p = (CsrWifiNmeApConfigSetReq *)message;
CsrPmemFree(p->apMacConfig.macAddressList);
kfree(p->apMacConfig.macAddressList);
p->apMacConfig.macAddressList = NULL;
break;
}
......@@ -54,7 +54,7 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message)
switch (p->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase)
{
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;
break;
default:
......@@ -68,11 +68,11 @@ void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message)
u16 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;
}
}
CsrPmemFree(p->p2pGoParam.operatingChanList.channelEntryList);
kfree(p->p2pGoParam.operatingChanList.channelEntryList);
p->p2pGoParam.operatingChanList.channelEntryList = NULL;
break;
}
......
......@@ -10,6 +10,7 @@
/* Note: this is an auto-generated file. */
#include <linux/string.h>
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_msgconv.h"
#include "csr_unicode.h"
......@@ -22,7 +23,7 @@
void CsrWifiNmeApPfree(void *ptr)
{
CsrPmemFree(ptr);
kfree(ptr);
}
......@@ -221,8 +222,8 @@ void* CsrWifiNmeApConfigSetReqDes(u8 *buffer, size_t length)
void CsrWifiNmeApConfigSetReqSerFree(void *voidPrimitivePointer)
{
CsrWifiNmeApConfigSetReq *primitive = (CsrWifiNmeApConfigSetReq *) voidPrimitivePointer;
CsrPmemFree(primitive->apMacConfig.macAddressList);
CsrPmemFree(primitive);
kfree(primitive->apMacConfig.macAddressList);
kfree(primitive);
}
......@@ -555,7 +556,7 @@ void CsrWifiNmeApStartReqSerFree(void *voidPrimitivePointer)
switch (primitive->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase)
{
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;
default:
break;
......@@ -568,11 +569,11 @@ void CsrWifiNmeApStartReqSerFree(void *voidPrimitivePointer)
u16 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);
CsrPmemFree(primitive);
kfree(primitive->p2pGoParam.operatingChanList.channelEntryList);
kfree(primitive);
}
......
......@@ -9,7 +9,7 @@
*****************************************************************************/
/* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_wifi_router_ctrl_prim.h"
#include "csr_wifi_router_ctrl_lib.h"
......@@ -41,62 +41,62 @@ void CsrWifiRouterCtrlFreeDownstreamMessageContents(u16 eventClass, void *messag
case CSR_WIFI_ROUTER_CTRL_HIP_REQ:
{
CsrWifiRouterCtrlHipReq *p = (CsrWifiRouterCtrlHipReq *)message;
CsrPmemFree(p->mlmeCommand);
kfree(p->mlmeCommand);
p->mlmeCommand = NULL;
CsrPmemFree(p->dataRef1);
kfree(p->dataRef1);
p->dataRef1 = NULL;
CsrPmemFree(p->dataRef2);
kfree(p->dataRef2);
p->dataRef2 = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_MULTICAST_ADDRESS_RES:
{
CsrWifiRouterCtrlMulticastAddressRes *p = (CsrWifiRouterCtrlMulticastAddressRes *)message;
CsrPmemFree(p->getAddresses);
kfree(p->getAddresses);
p->getAddresses = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_TCLAS_ADD_REQ:
{
CsrWifiRouterCtrlTclasAddReq *p = (CsrWifiRouterCtrlTclasAddReq *)message;
CsrPmemFree(p->tclas);
kfree(p->tclas);
p->tclas = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_TCLAS_DEL_REQ:
{
CsrWifiRouterCtrlTclasDelReq *p = (CsrWifiRouterCtrlTclasDelReq *)message;
CsrPmemFree(p->tclas);
kfree(p->tclas);
p->tclas = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_WIFI_ON_REQ:
{
CsrWifiRouterCtrlWifiOnReq *p = (CsrWifiRouterCtrlWifiOnReq *)message;
CsrPmemFree(p->data);
kfree(p->data);
p->data = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_WIFI_ON_RES:
{
CsrWifiRouterCtrlWifiOnRes *p = (CsrWifiRouterCtrlWifiOnRes *)message;
CsrPmemFree(p->smeVersions.smeBuild);
kfree(p->smeVersions.smeBuild);
p->smeVersions.smeBuild = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_WAPI_RX_PKT_REQ:
{
CsrWifiRouterCtrlWapiRxPktReq *p = (CsrWifiRouterCtrlWapiRxPktReq *)message;
CsrPmemFree(p->signal);
kfree(p->signal);
p->signal = NULL;
CsrPmemFree(p->data);
kfree(p->data);
p->data = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_WAPI_UNICAST_TX_PKT_REQ:
{
CsrWifiRouterCtrlWapiUnicastTxPktReq *p = (CsrWifiRouterCtrlWapiUnicastTxPktReq *)message;
CsrPmemFree(p->data);
kfree(p->data);
p->data = NULL;
break;
}
......
......@@ -9,7 +9,7 @@
*****************************************************************************/
/* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_wifi_router_ctrl_prim.h"
#include "csr_wifi_router_ctrl_lib.h"
......@@ -41,41 +41,41 @@ void CsrWifiRouterCtrlFreeUpstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_ROUTER_CTRL_HIP_IND:
{
CsrWifiRouterCtrlHipInd *p = (CsrWifiRouterCtrlHipInd *)message;
CsrPmemFree(p->mlmeCommand);
kfree(p->mlmeCommand);
p->mlmeCommand = NULL;
CsrPmemFree(p->dataRef1);
kfree(p->dataRef1);
p->dataRef1 = NULL;
CsrPmemFree(p->dataRef2);
kfree(p->dataRef2);
p->dataRef2 = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_MULTICAST_ADDRESS_IND:
{
CsrWifiRouterCtrlMulticastAddressInd *p = (CsrWifiRouterCtrlMulticastAddressInd *)message;
CsrPmemFree(p->setAddresses);
kfree(p->setAddresses);
p->setAddresses = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_WIFI_ON_IND:
{
CsrWifiRouterCtrlWifiOnInd *p = (CsrWifiRouterCtrlWifiOnInd *)message;
CsrPmemFree(p->versions.routerBuild);
kfree(p->versions.routerBuild);
p->versions.routerBuild = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_WAPI_RX_MIC_CHECK_IND:
{
CsrWifiRouterCtrlWapiRxMicCheckInd *p = (CsrWifiRouterCtrlWapiRxMicCheckInd *)message;
CsrPmemFree(p->signal);
kfree(p->signal);
p->signal = NULL;
CsrPmemFree(p->data);
kfree(p->data);
p->data = NULL;
break;
}
case CSR_WIFI_ROUTER_CTRL_WAPI_UNICAST_TX_ENCRYPT_IND:
{
CsrWifiRouterCtrlWapiUnicastTxEncryptInd *p = (CsrWifiRouterCtrlWapiUnicastTxEncryptInd *)message;
CsrPmemFree(p->data);
kfree(p->data);
p->data = NULL;
break;
}
......
......@@ -10,6 +10,7 @@
/* Note: this is an auto-generated file. */
#include <linux/string.h>
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_msgconv.h"
#include "csr_unicode.h"
......@@ -20,7 +21,7 @@
void CsrWifiRouterCtrlPfree(void *ptr)
{
CsrPmemFree(ptr);
kfree(ptr);
}
......@@ -148,10 +149,10 @@ void* CsrWifiRouterCtrlHipReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlHipReqSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlHipReq *primitive = (CsrWifiRouterCtrlHipReq *) voidPrimitivePointer;
CsrPmemFree(primitive->mlmeCommand);
CsrPmemFree(primitive->dataRef1);
CsrPmemFree(primitive->dataRef2);
CsrPmemFree(primitive);
kfree(primitive->mlmeCommand);
kfree(primitive->dataRef1);
kfree(primitive->dataRef2);
kfree(primitive);
}
......@@ -269,8 +270,8 @@ void* CsrWifiRouterCtrlMulticastAddressResDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlMulticastAddressResSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlMulticastAddressRes *primitive = (CsrWifiRouterCtrlMulticastAddressRes *) voidPrimitivePointer;
CsrPmemFree(primitive->getAddresses);
CsrPmemFree(primitive);
kfree(primitive->getAddresses);
kfree(primitive);
}
......@@ -457,8 +458,8 @@ void* CsrWifiRouterCtrlTclasAddReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlTclasAddReqSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlTclasAddReq *primitive = (CsrWifiRouterCtrlTclasAddReq *) voidPrimitivePointer;
CsrPmemFree(primitive->tclas);
CsrPmemFree(primitive);
kfree(primitive->tclas);
kfree(primitive);
}
......@@ -555,8 +556,8 @@ void* CsrWifiRouterCtrlTclasDelReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlTclasDelReqSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlTclasDelReq *primitive = (CsrWifiRouterCtrlTclasDelReq *) voidPrimitivePointer;
CsrPmemFree(primitive->tclas);
CsrPmemFree(primitive);
kfree(primitive->tclas);
kfree(primitive);
}
......@@ -710,8 +711,8 @@ void* CsrWifiRouterCtrlWifiOnReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWifiOnReqSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlWifiOnReq *primitive = (CsrWifiRouterCtrlWifiOnReq *) voidPrimitivePointer;
CsrPmemFree(primitive->data);
CsrPmemFree(primitive);
kfree(primitive->data);
kfree(primitive);
}
......@@ -791,8 +792,8 @@ void* CsrWifiRouterCtrlWifiOnResDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWifiOnResSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlWifiOnRes *primitive = (CsrWifiRouterCtrlWifiOnRes *) voidPrimitivePointer;
CsrPmemFree(primitive->smeVersions.smeBuild);
CsrPmemFree(primitive);
kfree(primitive->smeVersions.smeBuild);
kfree(primitive);
}
......@@ -1185,9 +1186,9 @@ void* CsrWifiRouterCtrlWapiRxPktReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWapiRxPktReqSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlWapiRxPktReq *primitive = (CsrWifiRouterCtrlWapiRxPktReq *) voidPrimitivePointer;
CsrPmemFree(primitive->signal);
CsrPmemFree(primitive->data);
CsrPmemFree(primitive);
kfree(primitive->signal);
kfree(primitive->data);
kfree(primitive);
}
......@@ -1245,8 +1246,8 @@ void* CsrWifiRouterCtrlWapiUnicastTxPktReqDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWapiUnicastTxPktReqSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlWapiUnicastTxPktReq *primitive = (CsrWifiRouterCtrlWapiUnicastTxPktReq *) voidPrimitivePointer;
CsrPmemFree(primitive->data);
CsrPmemFree(primitive);
kfree(primitive->data);
kfree(primitive);
}
......@@ -1335,10 +1336,10 @@ void* CsrWifiRouterCtrlHipIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlHipIndSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlHipInd *primitive = (CsrWifiRouterCtrlHipInd *) voidPrimitivePointer;
CsrPmemFree(primitive->mlmeCommand);
CsrPmemFree(primitive->dataRef1);
CsrPmemFree(primitive->dataRef2);
CsrPmemFree(primitive);
kfree(primitive->mlmeCommand);
kfree(primitive->dataRef1);
kfree(primitive->dataRef2);
kfree(primitive);
}
......@@ -1414,8 +1415,8 @@ void* CsrWifiRouterCtrlMulticastAddressIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlMulticastAddressIndSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlMulticastAddressInd *primitive = (CsrWifiRouterCtrlMulticastAddressInd *) voidPrimitivePointer;
CsrPmemFree(primitive->setAddresses);
CsrPmemFree(primitive);
kfree(primitive->setAddresses);
kfree(primitive);
}
......@@ -1839,8 +1840,8 @@ void* CsrWifiRouterCtrlWifiOnIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWifiOnIndSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlWifiOnInd *primitive = (CsrWifiRouterCtrlWifiOnInd *) voidPrimitivePointer;
CsrPmemFree(primitive->versions.routerBuild);
CsrPmemFree(primitive);
kfree(primitive->versions.routerBuild);
kfree(primitive);
}
......@@ -2482,9 +2483,9 @@ void* CsrWifiRouterCtrlWapiRxMicCheckIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWapiRxMicCheckIndSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlWapiRxMicCheckInd *primitive = (CsrWifiRouterCtrlWapiRxMicCheckInd *) voidPrimitivePointer;
CsrPmemFree(primitive->signal);
CsrPmemFree(primitive->data);
CsrPmemFree(primitive);
kfree(primitive->signal);
kfree(primitive->data);
kfree(primitive);
}
......@@ -2587,8 +2588,8 @@ void* CsrWifiRouterCtrlWapiUnicastTxEncryptIndDes(u8 *buffer, size_t length)
void CsrWifiRouterCtrlWapiUnicastTxEncryptIndSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterCtrlWapiUnicastTxEncryptInd *primitive = (CsrWifiRouterCtrlWapiUnicastTxEncryptInd *) voidPrimitivePointer;
CsrPmemFree(primitive->data);
CsrPmemFree(primitive);
kfree(primitive->data);
kfree(primitive);
}
......@@ -9,7 +9,7 @@
*****************************************************************************/
/* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_wifi_router_prim.h"
#include "csr_wifi_router_lib.h"
......@@ -41,7 +41,7 @@ void CsrWifiRouterFreeDownstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_ROUTER_MA_PACKET_REQ:
{
CsrWifiRouterMaPacketReq *p = (CsrWifiRouterMaPacketReq *)message;
CsrPmemFree(p->frame);
kfree(p->frame);
p->frame = NULL;
break;
}
......
......@@ -9,7 +9,7 @@
*****************************************************************************/
/* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_wifi_router_prim.h"
#include "csr_wifi_router_lib.h"
......@@ -41,7 +41,7 @@ void CsrWifiRouterFreeUpstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_ROUTER_MA_PACKET_IND:
{
CsrWifiRouterMaPacketInd *p = (CsrWifiRouterMaPacketInd *)message;
CsrPmemFree(p->frame);
kfree(p->frame);
p->frame = NULL;
break;
}
......
......@@ -9,7 +9,7 @@
*****************************************************************************/
/* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_msgconv.h"
#include "csr_unicode.h"
......@@ -20,7 +20,7 @@
void CsrWifiRouterPfree(void *ptr)
{
CsrPmemFree(ptr);
kfree(ptr);
}
......@@ -136,8 +136,8 @@ void* CsrWifiRouterMaPacketReqDes(u8 *buffer, size_t length)
void CsrWifiRouterMaPacketReqSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *) voidPrimitivePointer;
CsrPmemFree(primitive->frame);
CsrPmemFree(primitive);
kfree(primitive->frame);
kfree(primitive);
}
......@@ -415,8 +415,8 @@ void* CsrWifiRouterMaPacketIndDes(u8 *buffer, size_t length)
void CsrWifiRouterMaPacketIndSerFree(void *voidPrimitivePointer)
{
CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *) voidPrimitivePointer;
CsrPmemFree(primitive->frame);
CsrPmemFree(primitive);
kfree(primitive->frame);
kfree(primitive);
}
......@@ -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);
break;
}
CsrPmemFree(msg);
kfree(msg);
}
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);
/* 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)
......
......@@ -9,7 +9,7 @@
*****************************************************************************/
/* Note: this is an auto-generated file. */
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_wifi_sme_prim.h"
#include "csr_wifi_sme_lib.h"
......@@ -41,90 +41,90 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message)
case CSR_WIFI_SME_BLACKLIST_REQ:
{
CsrWifiSmeBlacklistReq *p = (CsrWifiSmeBlacklistReq *)message;
CsrPmemFree(p->setAddresses);
kfree(p->setAddresses);
p->setAddresses = NULL;
break;
}
case CSR_WIFI_SME_CALIBRATION_DATA_SET_REQ:
{
CsrWifiSmeCalibrationDataSetReq *p = (CsrWifiSmeCalibrationDataSetReq *)message;
CsrPmemFree(p->calibrationData);
kfree(p->calibrationData);
p->calibrationData = NULL;
break;
}
case CSR_WIFI_SME_CONNECT_REQ:
{
CsrWifiSmeConnectReq *p = (CsrWifiSmeConnectReq *)message;
CsrPmemFree(p->connectionConfig.mlmeAssociateReqInformationElements);
kfree(p->connectionConfig.mlmeAssociateReqInformationElements);
p->connectionConfig.mlmeAssociateReqInformationElements = NULL;
break;
}
case CSR_WIFI_SME_MIB_GET_NEXT_REQ:
{
CsrWifiSmeMibGetNextReq *p = (CsrWifiSmeMibGetNextReq *)message;
CsrPmemFree(p->mibAttribute);
kfree(p->mibAttribute);
p->mibAttribute = NULL;
break;
}
case CSR_WIFI_SME_MIB_GET_REQ:
{
CsrWifiSmeMibGetReq *p = (CsrWifiSmeMibGetReq *)message;
CsrPmemFree(p->mibAttribute);
kfree(p->mibAttribute);
p->mibAttribute = NULL;
break;
}
case CSR_WIFI_SME_MIB_SET_REQ:
{
CsrWifiSmeMibSetReq *p = (CsrWifiSmeMibSetReq *)message;
CsrPmemFree(p->mibAttribute);
kfree(p->mibAttribute);
p->mibAttribute = NULL;
break;
}
case CSR_WIFI_SME_MULTICAST_ADDRESS_REQ:
{
CsrWifiSmeMulticastAddressReq *p = (CsrWifiSmeMulticastAddressReq *)message;
CsrPmemFree(p->setAddresses);
kfree(p->setAddresses);
p->setAddresses = NULL;
break;
}
case CSR_WIFI_SME_PACKET_FILTER_SET_REQ:
{
CsrWifiSmePacketFilterSetReq *p = (CsrWifiSmePacketFilterSetReq *)message;
CsrPmemFree(p->filter);
kfree(p->filter);
p->filter = NULL;
break;
}
case CSR_WIFI_SME_PMKID_REQ:
{
CsrWifiSmePmkidReq *p = (CsrWifiSmePmkidReq *)message;
CsrPmemFree(p->setPmkids);
kfree(p->setPmkids);
p->setPmkids = NULL;
break;
}
case CSR_WIFI_SME_SCAN_CONFIG_SET_REQ:
{
CsrWifiSmeScanConfigSetReq *p = (CsrWifiSmeScanConfigSetReq *)message;
CsrPmemFree(p->scanConfig.passiveChannelList);
kfree(p->scanConfig.passiveChannelList);
p->scanConfig.passiveChannelList = NULL;
break;
}
case CSR_WIFI_SME_SCAN_FULL_REQ:
{
CsrWifiSmeScanFullReq *p = (CsrWifiSmeScanFullReq *)message;
CsrPmemFree(p->ssid);
kfree(p->ssid);
p->ssid = NULL;
CsrPmemFree(p->channelList);
kfree(p->channelList);
p->channelList = NULL;
CsrPmemFree(p->probeIe);
kfree(p->probeIe);
p->probeIe = NULL;
break;
}
case CSR_WIFI_SME_TSPEC_REQ:
{
CsrWifiSmeTspecReq *p = (CsrWifiSmeTspecReq *)message;
CsrPmemFree(p->tspec);
kfree(p->tspec);
p->tspec = NULL;
CsrPmemFree(p->tclas);
kfree(p->tclas);
p->tclas = NULL;
break;
}
......@@ -135,11 +135,11 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message)
u16 i1;
for (i1 = 0; i1 < p->mibFilesCount; i1++)
{
CsrPmemFree(p->mibFiles[i1].data);
kfree(p->mibFiles[i1].data);
p->mibFiles[i1].data = NULL;
}
}
CsrPmemFree(p->mibFiles);
kfree(p->mibFiles);
p->mibFiles = NULL;
break;
}
......@@ -150,32 +150,32 @@ void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message)
u16 i1;
for (i1 = 0; i1 < p->mibFilesCount; i1++)
{
CsrPmemFree(p->mibFiles[i1].data);
kfree(p->mibFiles[i1].data);
p->mibFiles[i1].data = NULL;
}
}
CsrPmemFree(p->mibFiles);
kfree(p->mibFiles);
p->mibFiles = NULL;
break;
}
case CSR_WIFI_SME_CLOAKED_SSIDS_SET_REQ:
{
CsrWifiSmeCloakedSsidsSetReq *p = (CsrWifiSmeCloakedSsidsSetReq *)message;
CsrPmemFree(p->cloakedSsids.cloakedSsids);
kfree(p->cloakedSsids.cloakedSsids);
p->cloakedSsids.cloakedSsids = NULL;
break;
}
case CSR_WIFI_SME_WPS_CONFIGURATION_REQ:
{
CsrWifiSmeWpsConfigurationReq *p = (CsrWifiSmeWpsConfigurationReq *)message;
CsrPmemFree(p->wpsConfig.secondaryDeviceType);
kfree(p->wpsConfig.secondaryDeviceType);
p->wpsConfig.secondaryDeviceType = NULL;
break;
}
case CSR_WIFI_SME_SET_REQ:
{
CsrWifiSmeSetReq *p = (CsrWifiSmeSetReq *)message;
CsrPmemFree(p->data);
kfree(p->data);
p->data = NULL;
break;
}
......
......@@ -1476,7 +1476,7 @@ unifi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (pcli->snap_filter.count) {
pcli->snap_filter.count = 0;
CsrPmemFree(pcli->snap_filter.protocols);
kfree(pcli->snap_filter.protocols);
}
if (snap_filter.count == 0) {
......@@ -1492,7 +1492,7 @@ unifi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
(void*)snap_filter.protocols,
snap_filter.count * sizeof(u16)))
{
CsrPmemFree(pcli->snap_filter.protocols);
kfree(pcli->snap_filter.protocols);
r = -EFAULT;
goto out;
}
......@@ -1938,7 +1938,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
if (logptr == NULL) {
unifi_error(priv, "Failed to allocate %d bytes for an SME message\n",
sizeof(udi_log_t) + length);
CsrPmemFree(buffer);
kfree(buffer);
return -ENOMEM;
}
......@@ -1956,7 +1956,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
down(&udi_mutex);
if (priv->sme_cli == NULL) {
kfree(logptr);
CsrPmemFree(buffer);
kfree(buffer);
up(&udi_mutex);
unifi_info(priv, "Message for the SME dropped, SME has gone away\n");
return 0;
......@@ -1971,7 +1971,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
up(&udi_mutex);
/* It is our responsibility to free the buffer allocated in build_packed_*() */
CsrPmemFree(buffer);
kfree(buffer);
func_exit();
......
......@@ -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);
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");
CsrPmemFree(fw_buf);
kfree(fw_buf);
return -EFAULT;
}
......@@ -537,7 +537,7 @@ int unifi_putest_dl_fw_buff(unifi_priv_t *priv, unsigned char *arg)
free_fw:
/* Finished with the putest f/w, so restore the station f/w */
priv->fw_sta = temp_fw_sta;
CsrPmemFree(fw_buf);
kfree(fw_buf);
return CsrHipResultToStatus(csrResult);
}
......
......@@ -415,7 +415,7 @@ int sme_mgt_scan_results_get_async(unifi_priv_t *priv,
scan_result, i+1);
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 = NULL;
return r;
......@@ -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
* 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 = NULL;
......
......@@ -128,7 +128,7 @@ uf_sme_deinit(unifi_priv_t *priv)
/* Free any TCLASs previously allocated */
if (priv->packet_filters.tclas_ies_length) {
priv->packet_filters.tclas_ies_length = 0;
CsrPmemFree(priv->filter_tclas_ies);
kfree(priv->filter_tclas_ies);
priv->filter_tclas_ies = NULL;
}
......
......@@ -117,9 +117,9 @@ ul_register_client(unifi_priv_t *priv, unsigned int configuration,
/* If allocation fails, free allocated memory. */
if (ul_clients[id].reply_bulkdata[ref] == NULL) {
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");
return NULL;
}
......@@ -164,14 +164,14 @@ ul_deregister_client(ul_client_t *ul_client)
unifi_trace(priv, UDBG5, "UDI (0x%x) deregistered.\n", ul_client);
/* 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 ++) {
CsrPmemFree(ul_client->reply_bulkdata[ref]);
kfree(ul_client->reply_bulkdata[ref]);
}
if (ul_client->snap_filter.count) {
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 */
......
......@@ -423,7 +423,7 @@ uf_multicast_list_wq(struct work_struct *work)
}
if (priv->smepriv == NULL) {
CsrPmemFree(multicast_address_list);
kfree(multicast_address_list);
return;
}
......@@ -433,7 +433,7 @@ uf_multicast_list_wq(struct work_struct *work)
mc_count, multicast_address_list);
/* 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)
/* Free any TCLASs previously allocated */
if (priv->packet_filters.tclas_ies_length) {
CsrPmemFree(priv->filter_tclas_ies);
kfree(priv->filter_tclas_ies);
priv->filter_tclas_ies = NULL;
}
......@@ -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);
if (rc) {
unifi_error(priv, "unifi_cfg_wmm_addts: Failed to get the addts buffer\n");
CsrPmemFree(addts_ie);
kfree(addts_ie);
return -EFAULT;
}
......@@ -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,
&tspec, &tclas);
CsrPmemFree(addts_ie);
kfree(addts_ie);
return rc;
}
......@@ -1229,7 +1229,7 @@ void uf_send_pkt_to_encrypt(struct work_struct *work)
CsrWifiRouterCtrlWapiUnicastTxEncryptIndSend(priv->CSR_WIFI_SME_IFACEQUEUE, 0, interfaceTag, pktBulkDataLength, pktBulkData);
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();
} 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