Commit 25aebdb1 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

staging: csr: remove CsrMemCpy()

It was just a wrapper around memcpy() 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 4bcb20f8
......@@ -42,7 +42,7 @@ EXPORT_SYMBOL_GPL(CsrUint32Des);
void CsrMemCpyDes(void *value, u8 *buffer, size_t *offset, size_t length)
{
CsrMemCpy(value, &buffer[*offset], length);
memcpy(value, &buffer[*offset], length);
*offset += length;
}
EXPORT_SYMBOL_GPL(CsrMemCpyDes);
......@@ -114,7 +114,7 @@ EXPORT_SYMBOL_GPL(CsrUint32Ser);
void CsrMemCpySer(u8 *buffer, size_t *offset, const void *value, size_t length)
{
CsrMemCpy(&buffer[*offset], value, length);
memcpy(&buffer[*offset], value, length);
*offset += length;
}
EXPORT_SYMBOL_GPL(CsrMemCpySer);
......
......@@ -151,7 +151,7 @@ u32 CsrUtf16StringToUint32(const u16 *unicodeString)
*********************************************************************************/
u16 *CsrUtf16MemCpy(u16 *dest, const u16 *src, u32 count)
{
return CsrMemCpy((u8 *) dest, (u8 *) src, count * sizeof(u16));
return memcpy((u8 *) dest, (u8 *) src, count * sizeof(u16));
}
/********************************************************************************
......@@ -706,7 +706,7 @@ u16 *CsrUtf16StrCpy(u16 *target, const u16 *source)
{
if (source) /* if source is not NULL*/
{
CsrMemCpy(target, source, (CsrUtf16StrLen(source) + 1) * sizeof(u16));
memcpy(target, source, (CsrUtf16StrLen(source) + 1) * sizeof(u16));
return target;
}
else
......@@ -736,7 +736,7 @@ u16 *CsrUtf16StringDuplicate(const u16 *source)
{
length = (CsrUtf16StrLen(source) + 1) * sizeof(u16);
target = (u16 *) CsrPmemAlloc(length);
CsrMemCpy(target, source, length);
memcpy(target, source, length);
}
return target;
}
......
......@@ -33,17 +33,6 @@ void CsrUInt16ToHex(u16 number, char *str)
str[4] = '\0';
}
/*------------------------------------------------------------------*/
/* String */
/*------------------------------------------------------------------*/
#ifndef CSR_USE_STDC_LIB
void *CsrMemCpy(void *dest, const void *src, size_t count)
{
return memcpy(dest, src, count);
}
EXPORT_SYMBOL_GPL(CsrMemCpy);
#endif
MODULE_DESCRIPTION("CSR Operating System Kernel Abstraction");
MODULE_AUTHOR("Cambridge Silicon Radio Ltd.");
MODULE_LICENSE("GPL and additional rights");
......@@ -23,15 +23,6 @@ extern "C" {
/*------------------------------------------------------------------*/
void CsrUInt16ToHex(u16 number, char *str);
/*------------------------------------------------------------------*/
/* Standard C Library functions */
/*------------------------------------------------------------------*/
#ifdef CSR_USE_STDC_LIB
#define CsrMemCpy memcpy
#else /* !CSR_USE_STDC_LIB */
void *CsrMemCpy(void *dest, const void *src, size_t count);
#endif /* !CSR_USE_STDC_LIB */
#define CsrOffsetOf(st, m) ((size_t) & ((st *) 0)->m)
#ifdef __cplusplus
......
......@@ -1750,7 +1750,7 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr,
return -1;
}
CsrMemCpy((void *)host_bulk_data_slot,
memcpy((void *)host_bulk_data_slot,
(void *)(bdslot->os_data_ptr + offset), len);
r = unifi_bulk_rw(card,
......@@ -2104,7 +2104,7 @@ static CsrResult process_fh_cmd_queue(card_t *card, s32 *processed)
card->fh_buffer.ptr[1] =
(u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4));
CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length);
memcpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length);
memset(card->fh_buffer.ptr + 2 + signal_length, 0,
total_length - (2 + signal_length));
......@@ -2382,7 +2382,7 @@ static CsrResult process_fh_traffic_queue(card_t *card, s32 *processed)
card->fh_buffer.ptr[1] =
(u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4));
CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length);
memcpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length);
memset(card->fh_buffer.ptr + 2 + signal_length, 0,
total_length - (2 + signal_length));
......
This diff is collapsed.
......@@ -129,7 +129,7 @@ static CsrResult send_signal(card_t *card, const u8 *sigptr, u32 siglen,
/* Make up the card_signal struct */
csptr->signal_length = (u16)siglen;
CsrMemCpy((void *)csptr->sigbuf, (void *)sigptr, siglen);
memcpy((void *)csptr->sigbuf, (void *)sigptr, siglen);
for (i = 0; i < UNIFI_MAX_DATA_REFERENCES; ++i)
{
......
......@@ -522,7 +522,7 @@ static s32 read_tag(card_t *card, ct_t *ct, tag_t *tag)
}
/* get section tag */
CsrMemCpy(tag->t_name, buf, 4);
memcpy(tag->t_name, buf, 4);
/* get section length */
tag->t_len = xbv2uint(buf + 4, 4);
......@@ -601,7 +601,7 @@ static u32 write_bytes(void *buf, const u32 offset, const u8 *data, const u32 le
static u32 write_tag(void *buf, const u32 offset, const char *tag_str)
{
u8 *dst = (u8 *)buf + offset;
CsrMemCpy(dst, tag_str, 4);
memcpy(dst, tag_str, 4);
return 4;
}
......
......@@ -404,8 +404,8 @@ extern const char *CsrWifiNmeApDownstreamPrimNames[CSR_WIFI_NME_AP_PRIM_DOWNSTRE
#define CsrWifiNmeApWmmParamUpdateReqCreate(msg__, dst__, src__, wmmApParams__, wmmApBcParams__) \
msg__ = (CsrWifiNmeApWmmParamUpdateReq *) CsrPmemAlloc(sizeof(CsrWifiNmeApWmmParamUpdateReq)); \
CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_REQ, dst__, src__); \
CsrMemCpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
CsrMemCpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
memcpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
memcpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
#define CsrWifiNmeApWmmParamUpdateReqSendTo(dst__, src__, wmmApParams__, wmmApBcParams__) \
{ \
......@@ -474,7 +474,7 @@ extern const char *CsrWifiNmeApDownstreamPrimNames[CSR_WIFI_NME_AP_PRIM_DOWNSTRE
msg__->interfaceTag = (interfaceTag__); \
msg__->selectedDevicePasswordId = (selectedDevicePasswordId__); \
msg__->selectedConfigMethod = (selectedConfigMethod__); \
CsrMemCpy(msg__->pin, (pin__), sizeof(u8) * 8);
memcpy(msg__->pin, (pin__), sizeof(u8) * 8);
#define CsrWifiNmeApWpsRegisterReqSendTo(dst__, src__, interfaceTag__, selectedDevicePasswordId__, selectedConfigMethod__, pin__) \
{ \
......
......@@ -789,8 +789,8 @@ extern const char *CsrWifiNmeDownstreamPrimNames[CSR_WIFI_NME_PRIM_DOWNSTREAM_CO
#define CsrWifiNmeSimUmtsAuthIndCreate(msg__, dst__, src__, rand__, autn__) \
msg__ = (CsrWifiNmeSimUmtsAuthInd *) CsrPmemAlloc(sizeof(CsrWifiNmeSimUmtsAuthInd)); \
CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_PRIM, CSR_WIFI_NME_SIM_UMTS_AUTH_IND, dst__, src__); \
CsrMemCpy(msg__->rand, (rand__), sizeof(u8) * 16); \
CsrMemCpy(msg__->autn, (autn__), sizeof(u8) * 16);
memcpy(msg__->rand, (rand__), sizeof(u8) * 16); \
memcpy(msg__->autn, (autn__), sizeof(u8) * 16);
#define CsrWifiNmeSimUmtsAuthIndSendTo(dst__, src__, rand__, autn__) \
{ \
......@@ -838,11 +838,11 @@ extern const char *CsrWifiNmeDownstreamPrimNames[CSR_WIFI_NME_PRIM_DOWNSTREAM_CO
CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_PRIM, CSR_WIFI_NME_SIM_UMTS_AUTH_RES, dst__, src__); \
msg__->status = (status__); \
msg__->result = (result__); \
CsrMemCpy(msg__->umtsCipherKey, (umtsCipherKey__), sizeof(u8) * 16); \
CsrMemCpy(msg__->umtsIntegrityKey, (umtsIntegrityKey__), sizeof(u8) * 16); \
memcpy(msg__->umtsCipherKey, (umtsCipherKey__), sizeof(u8) * 16); \
memcpy(msg__->umtsIntegrityKey, (umtsIntegrityKey__), sizeof(u8) * 16); \
msg__->resParameterLength = (resParameterLength__); \
msg__->resParameter = (resParameter__); \
CsrMemCpy(msg__->auts, (auts__), sizeof(u8) * 14);
memcpy(msg__->auts, (auts__), sizeof(u8) * 14);
#define CsrWifiNmeSimUmtsAuthResSendTo(dst__, src__, status__, result__, umtsCipherKey__, umtsIntegrityKey__, resParameterLength__, resParameter__, auts__) \
{ \
......@@ -1033,7 +1033,7 @@ extern const char *CsrWifiNmeDownstreamPrimNames[CSR_WIFI_NME_PRIM_DOWNSTREAM_CO
msg__ = (CsrWifiNmeWpsReq *) CsrPmemAlloc(sizeof(CsrWifiNmeWpsReq)); \
CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_PRIM, CSR_WIFI_NME_WPS_REQ, dst__, src__); \
msg__->interfaceTag = (interfaceTag__); \
CsrMemCpy(msg__->pin, (pin__), sizeof(u8) * 8); \
memcpy(msg__->pin, (pin__), sizeof(u8) * 8); \
msg__->ssid = (ssid__); \
msg__->bssid = (bssid__);
......
......@@ -2042,7 +2042,7 @@ extern const char *CsrWifiRouterCtrlDownstreamPrimNames[CSR_WIFI_ROUTER_CTRL_PRI
msg__->clientData = (clientData__); \
msg__->status = (status__); \
msg__->numInterfaceAddress = (numInterfaceAddress__); \
CsrMemCpy(msg__->stationMacAddress, (stationMacAddress__), sizeof(CsrWifiMacAddress) * 2); \
memcpy(msg__->stationMacAddress, (stationMacAddress__), sizeof(CsrWifiMacAddress) * 2); \
msg__->smeVersions = (smeVersions__); \
msg__->scheduledInterrupt = (scheduledInterrupt__);
......
......@@ -524,7 +524,7 @@ extern const char *CsrWifiSmeApDownstreamPrimNames[CSR_WIFI_SME_AP_PRIM_DOWNSTRE
msg__->secIeLength = (secIeLength__); \
msg__->secIe = (secIe__); \
msg__->groupKeyId = (groupKeyId__); \
CsrMemCpy(msg__->seqNumber, (seqNumber__), sizeof(u16) * 8);
memcpy(msg__->seqNumber, (seqNumber__), sizeof(u16) * 8);
#define CsrWifiSmeApStaNotifyIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
{ \
......@@ -556,8 +556,8 @@ extern const char *CsrWifiSmeApDownstreamPrimNames[CSR_WIFI_SME_AP_PRIM_DOWNSTRE
msg__ = (CsrWifiSmeApWmmParamUpdateReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApWmmParamUpdateReq)); \
CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_REQ, dst__, src__); \
msg__->interfaceTag = (interfaceTag__); \
CsrMemCpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
CsrMemCpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
memcpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
memcpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
#define CsrWifiSmeApWmmParamUpdateReqSendTo(dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
{ \
......
......@@ -1808,7 +1808,7 @@ extern const char *CsrWifiSmeDownstreamPrimNames[CSR_WIFI_SME_PRIM_DOWNSTREAM_CO
CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_INTERFACE_CAPABILITY_GET_CFM, dst__, src__); \
msg__->status = (status__); \
msg__->numInterfaces = (numInterfaces__); \
CsrMemCpy(msg__->capBitmap, (capBitmap__), sizeof(u8) * 2);
memcpy(msg__->capBitmap, (capBitmap__), sizeof(u8) * 2);
#define CsrWifiSmeInterfaceCapabilityGetCfmSendTo(dst__, src__, status__, numInterfaces__, capBitmap__) \
{ \
......@@ -3751,7 +3751,7 @@ extern const char *CsrWifiSmeDownstreamPrimNames[CSR_WIFI_SME_PRIM_DOWNSTREAM_CO
msg__ = (CsrWifiSmeStationMacAddressGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeStationMacAddressGetCfm)); \
CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_STATION_MAC_ADDRESS_GET_CFM, dst__, src__); \
msg__->status = (status__); \
CsrMemCpy(msg__->stationMacAddress, (stationMacAddress__), sizeof(CsrWifiMacAddress) * 2);
memcpy(msg__->stationMacAddress, (stationMacAddress__), sizeof(CsrWifiMacAddress) * 2);
#define CsrWifiSmeStationMacAddressGetCfmSendTo(dst__, src__, status__, stationMacAddress__) \
{ \
......
......@@ -149,7 +149,7 @@ void CsrWifiSmeScanResultsGetCfmHandler(void* drvpriv, CsrWifiFsmEvent* msg)
for (i = 0; i < cfm->scanResultsCount; ++i)
{
CsrWifiSmeScanResult *scan_result = &scanCopy[i];
CsrMemCpy(current_buff, scan_result->informationElements, scan_result->informationElementsLength);
memcpy(current_buff, scan_result->informationElements, scan_result->informationElementsLength);
scan_result->informationElements = current_buff;
current_buff += scan_result->informationElementsLength;
}
......
......@@ -130,7 +130,7 @@ sme_log_event(ul_client_t *pcli,
raddr = macHdrLocation + MAC_HEADER_ADDR1_OFFSET;
taddr = macHdrLocation + MAC_HEADER_ADDR2_OFFSET;
CsrMemCpy(peerMacAddress.a, taddr, ETH_ALEN);
memcpy(peerMacAddress.a, taddr, ETH_ALEN);
if(ind->ReceptionStatus == CSR_MICHAEL_MIC_ERROR)
{
......@@ -1218,7 +1218,7 @@ void uf_send_pkt_to_encrypt(struct work_struct *work)
spin_lock_irqsave(&priv->wapi_lock, flags);
/* Copy over the MA PKT REQ bulk data */
CsrMemCpy(pktBulkData, (u8*)interfacePriv->wapi_unicast_bulk_data.os_data_ptr, pktBulkDataLength);
memcpy(pktBulkData, (u8*)interfacePriv->wapi_unicast_bulk_data.os_data_ptr, pktBulkDataLength);
/* Free any bulk data buffers allocated for the WAPI Data pkt */
unifi_net_data_free(priv, &interfacePriv->wapi_unicast_bulk_data);
interfacePriv->wapi_unicast_bulk_data.net_buf_length = 0;
......
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