Commit 95edd09e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Staging: csr: update to version 5.1.0 of the driver



This brings the in-kernel driver up to the level of the
csr-linux-wifi-5.1.0-oss.tar.gz tarball.

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 635d2b00
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line
@@ -211,3 +211,38 @@ void CsrMemFree(void *pointer)
    kfree(pointer);
}
EXPORT_SYMBOL_GPL(CsrMemFree);

/*----------------------------------------------------------------------------*
 *  NAME
 *      CsrMemAllocDma
 *
 *  DESCRIPTION
 *      Allocate DMA capable dynamic memory of a given size.
 *
 *  RETURNS
 *      Pointer to allocated memory, or NULL in case of failure.
 *      Allocated memory is not initialised.
 *
 *----------------------------------------------------------------------------*/
void *CsrMemAllocDma(CsrSize size)
{
    return kmalloc(size, GFP_KERNEL | GFP_DMA);
}
EXPORT_SYMBOL_GPL(CsrMemAllocDma);

/*----------------------------------------------------------------------------*
 *  NAME
 *      CsrMemFreeDma
 *
 *  DESCRIPTION
 *      Free DMA capable dynamic allocated memory.
 *
 *  RETURNS
 *      void
 *
 *----------------------------------------------------------------------------*/
void CsrMemFreeDma(void *pointer)
{
    kfree(pointer);
}
EXPORT_SYMBOL_GPL(CsrMemFreeDma);
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <stddef.h>
#include <sys/types.h>
#include <stdarg.h>
#include <string.h>
#endif

#ifdef __cplusplus
+4 −0
Original line number Diff line number Diff line
@@ -221,6 +221,7 @@ void CsrUInt32ToHex(CsrUint32 number, CsrCharString *str)
/*------------------------------------------------------------------*/
/*  String */
/*------------------------------------------------------------------*/
#ifndef CSR_USE_STDC_LIB
void *CsrMemCpy(void *dest, const void *src, CsrSize count)
{
    return memcpy(dest, src, count);
@@ -257,7 +258,9 @@ void *CsrMemDup(const void *buf1, CsrSize count)

    return buf2;
}
#endif

#ifndef CSR_USE_STDC_LIB
CsrCharString *CsrStrCpy(CsrCharString *dest, const CsrCharString *src)
{
    return strcpy(dest, src);
@@ -303,6 +306,7 @@ CsrCharString *CsrStrChr(const CsrCharString *string, CsrCharString c)
{
    return strchr(string, c);
}
#endif

CsrInt32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args)
{
+36 −9
Original line number Diff line number Diff line
@@ -35,26 +35,53 @@ void CsrUInt16ToHex(CsrUint16 number, CsrCharString *str);
void CsrUInt32ToHex(CsrUint32 number, CsrCharString *str);

/*------------------------------------------------------------------*/
/*  String */
/* Standard C Library functions */
/*------------------------------------------------------------------*/
#ifdef CSR_USE_STDC_LIB
#define CsrMemCpy memcpy
#define CsrMemMove memmove
#define CsrStrCpy strcpy
#define CsrStrNCpy strncpy
#define CsrStrCat strcat
#define CsrStrNCat strncat
#define CsrMemCmp(s1, s2, n) ((CsrInt32) memcmp((s1), (s2), (n)))
#define CsrStrCmp(s1, s2) ((CsrInt32) strcmp((s1), (s2)))
#define CsrStrNCmp(s1, s2, n) ((CsrInt32) strncmp((s1), (s2), (n)))
/*#define CsrMemChr memchr*/
#define CsrStrChr strchr
/*#define CsrStrCSpn strcspn*/
/*#define CsrStrPBrk strpbrk*/
/*#define CsrStrRChr strrchr*/
/*#define CsrStrSpn strspn*/
#define CsrStrStr strstr
/*#define CsrStrTok strtok*/
#define CsrMemSet memset
#define CsrStrLen strlen
/*#define CsrVsnprintf(s, n, format, arg) ((CsrInt32) vsnprintf((s), (n), (format), (arg)))*/
#else /* !CSR_USE_STDC_LIB */
void *CsrMemCpy(void *dest, const void *src, CsrSize count);
void *CsrMemSet(void *dest, CsrUint8 c, CsrSize count);
void *CsrMemMove(void *dest, const void *src, CsrSize count);
CsrInt32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count);
void *CsrMemDup(const void *buf1, CsrSize count);
CsrCharString *CsrStrCpy(CsrCharString *dest, const CsrCharString *src);
CsrCharString *CsrStrNCpy(CsrCharString *dest, const CsrCharString *src, CsrSize count);
int CsrStrNICmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count);
CsrCharString *CsrStrCat(CsrCharString *dest, const CsrCharString *src);
CsrCharString *CsrStrNCat(CsrCharString *dest, const CsrCharString *src, CsrSize count);
CsrCharString *CsrStrStr(const CsrCharString *string1, const CsrCharString *string2);
CsrSize CsrStrLen(const CsrCharString *string);
CsrInt32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count);
CsrInt32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2);
CsrInt32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count);
CsrCharString *CsrStrDup(const CsrCharString *string);
CsrCharString *CsrStrChr(const CsrCharString *string, CsrCharString c);
CsrUint32 CsrStrToInt(const CsrCharString *string);
CsrCharString *CsrStrStr(const CsrCharString *string1, const CsrCharString *string2);
void *CsrMemSet(void *dest, CsrUint8 c, CsrSize count);
CsrSize CsrStrLen(const CsrCharString *string);
#endif /* !CSR_USE_STDC_LIB */
CsrInt32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args);

/*------------------------------------------------------------------*/
/* Non-standard utility functions */
/*------------------------------------------------------------------*/
void *CsrMemDup(const void *buf1, CsrSize count);
int CsrStrNICmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count);
CsrCharString *CsrStrDup(const CsrCharString *string);
CsrUint32 CsrStrToInt(const CsrCharString *string);
CsrCharString *CsrStrNCpyZero(CsrCharString *dest, const CsrCharString *src, CsrSize count);

/*------------------------------------------------------------------*/
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ typedef struct
#define CSR_WIFI_RESULT_INVALID_INTERFACE_TAG     ((CsrResult) 0x000B)
#define CSR_WIFI_RESULT_P2P_NOA_CONFIG_CONFLICT   ((CsrResult) 0x000C)

#define CSR_WIFI_VERSION	"5.0.3.0"
#define CSR_WIFI_VERSION	"5.1.0.0"

#ifdef __cplusplus
}
Loading