Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317560
b: refs/heads/master
c: fa6173a
h: refs/heads/master
v: v3
  • Loading branch information
Lauri Hintsala authored and Greg Kroah-Hartman committed Jun 25, 2012
1 parent d19688e commit a4d3105
Show file tree
Hide file tree
Showing 9 changed files with 1,143 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c3337fec4c78f796767459de6429eecf2dc35c9
refs/heads/master: fa6173a0be1844ccea58afb2247f71abab1e53c5
4 changes: 3 additions & 1 deletion trunk/drivers/staging/csr/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
config CSR_WIFI
tristate "CSR wireless driver"
depends on PCI && MMC
depends on PCI && MMC && CFG80211_WEXT
select WIRELESS_EXT
select WEXT_PRIV
help
Driver for the CSR wireless SDIO device.

Expand Down
13 changes: 11 additions & 2 deletions trunk/drivers/staging/csr/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
obj-$(CONFIG_CSR_WIFI) += oska/

ccflags-y := -DCSR_SME_USERSPACE -DCSR_SUPPORT_SME -DREMOTE_SYS_SAP -DCSR_WIFI_SECURITY_WAPI_ENABLE -DENABLE_SHUTDOWN
ccflags-y := -DCSR_SME_USERSPACE -DCSR_SUPPORT_SME -DREMOTE_SYS_SAP -DCSR_WIFI_SECURITY_WAPI_ENABLE -DENABLE_SHUTDOWN -DUNIFI_DEBUG
ccflags-y += -DSDIO_EXPORTS_STRUCT_DEVICE -DCSR_WIFI_SUPPORT_MMC_DRIVER -DCSR_WIFI_SINGLE_FUNCTION -DCSR_WIFI_SPLIT_PATCH
ccflags-y += -DCSR_SUPPORT_WEXT -DREMOTE_SYS_SAP -DREMOTE_MGT_SAP -DCSR_WIFI_SECURITY_WAPI_ENABLE -DCSR_WIFI_SECURITY_WAPI_QOSCTRL_MIC_WORKAROUND -DENABLE_SHUTDOWN -DCSR_WIFI_NME_ENABLE -DCSR_WIFI_AP_ENABLE -DCSR_SUPPORT_WEXT_AP -DCSR_WIFI_REQUEUE_PACKET_TO_HAL

obj-$(CONFIG_CSR_WIFI) += csr_wifi.o
obj-$(CONFIG_CSR_WIFI) += csr_helper.o
Expand Down Expand Up @@ -40,6 +42,11 @@ csr_wifi-y := bh.o \
csr_wifi_hip_udi.o \
csr_wifi_hip_unifi_signal_names.o \
csr_wifi_hip_xbv.o \
csr_wifi_nme_ap_converter_init.o \
csr_wifi_nme_ap_free_downstream_contents.o \
csr_wifi_nme_ap_free_upstream_contents.o \
csr_wifi_nme_ap_serialize.o \
csr_wifi_nme_ap_sef.o \
csr_wifi_router_ctrl_sef.o \
csr_wifi_router_sef.o \
csr_wifi_router_transport.o \
Expand All @@ -58,7 +65,9 @@ csr_wifi-y := bh.o \
csr_wifi_router_serialize.o \
sme_mgt.o \
sme_sys.o \
sme_userspace.o
sme_userspace.o \
sme_wext.o \
wext_events.o

csr_helper-y := csr_time.o \
csr_util.o \
Expand Down
91 changes: 91 additions & 0 deletions trunk/drivers/staging/csr/csr_wifi_nme_ap_converter_init.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*****************************************************************************
(c) Cambridge Silicon Radio Limited 2012
All rights reserved and confidential information of CSR
Refer to LICENSE.txt included with this source for details
on the license terms.
*****************************************************************************/

/* Note: this is an auto-generated file. */

#include "csr_msgconv.h"
#include "csr_pmem.h"
#include "csr_util.h"

#ifdef CSR_WIFI_NME_ENABLE
#ifdef CSR_WIFI_AP_ENABLE

#ifdef CSR_LOG_ENABLE
#include "csr_log.h"
#endif

#ifndef EXCLUDE_CSR_WIFI_NME_AP_MODULE
#include "csr_wifi_nme_ap_serialize.h"
#include "csr_wifi_nme_ap_prim.h"

static CsrMsgConvMsgEntry csrwifinmeap_conv_lut[] = {
{ CSR_WIFI_NME_AP_CONFIG_SET_REQ, CsrWifiNmeApConfigSetReqSizeof, CsrWifiNmeApConfigSetReqSer, CsrWifiNmeApConfigSetReqDes, CsrWifiNmeApConfigSetReqSerFree },
{ CSR_WIFI_NME_AP_WPS_REGISTER_REQ, CsrWifiNmeApWpsRegisterReqSizeof, CsrWifiNmeApWpsRegisterReqSer, CsrWifiNmeApWpsRegisterReqDes, CsrWifiNmeApWpsRegisterReqSerFree },
{ CSR_WIFI_NME_AP_START_REQ, CsrWifiNmeApStartReqSizeof, CsrWifiNmeApStartReqSer, CsrWifiNmeApStartReqDes, CsrWifiNmeApStartReqSerFree },
{ CSR_WIFI_NME_AP_STOP_REQ, CsrWifiNmeApStopReqSizeof, CsrWifiNmeApStopReqSer, CsrWifiNmeApStopReqDes, CsrWifiNmeApStopReqSerFree },
{ CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_REQ, CsrWifiNmeApWmmParamUpdateReqSizeof, CsrWifiNmeApWmmParamUpdateReqSer, CsrWifiNmeApWmmParamUpdateReqDes, CsrWifiNmeApWmmParamUpdateReqSerFree },
{ CSR_WIFI_NME_AP_STA_REMOVE_REQ, CsrWifiNmeApStaRemoveReqSizeof, CsrWifiNmeApStaRemoveReqSer, CsrWifiNmeApStaRemoveReqDes, CsrWifiNmeApStaRemoveReqSerFree },
{ CSR_WIFI_NME_AP_CONFIG_SET_CFM, CsrWifiNmeApConfigSetCfmSizeof, CsrWifiNmeApConfigSetCfmSer, CsrWifiNmeApConfigSetCfmDes, CsrWifiNmeApConfigSetCfmSerFree },
{ CSR_WIFI_NME_AP_WPS_REGISTER_CFM, CsrWifiNmeApWpsRegisterCfmSizeof, CsrWifiNmeApWpsRegisterCfmSer, CsrWifiNmeApWpsRegisterCfmDes, CsrWifiNmeApWpsRegisterCfmSerFree },
{ CSR_WIFI_NME_AP_START_CFM, CsrWifiNmeApStartCfmSizeof, CsrWifiNmeApStartCfmSer, CsrWifiNmeApStartCfmDes, CsrWifiNmeApStartCfmSerFree },
{ CSR_WIFI_NME_AP_STOP_CFM, CsrWifiNmeApStopCfmSizeof, CsrWifiNmeApStopCfmSer, CsrWifiNmeApStopCfmDes, CsrWifiNmeApStopCfmSerFree },
{ CSR_WIFI_NME_AP_STOP_IND, CsrWifiNmeApStopIndSizeof, CsrWifiNmeApStopIndSer, CsrWifiNmeApStopIndDes, CsrWifiNmeApStopIndSerFree },
{ CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_CFM, CsrWifiNmeApWmmParamUpdateCfmSizeof, CsrWifiNmeApWmmParamUpdateCfmSer, CsrWifiNmeApWmmParamUpdateCfmDes, CsrWifiNmeApWmmParamUpdateCfmSerFree },
{ CSR_WIFI_NME_AP_STATION_IND, CsrWifiNmeApStationIndSizeof, CsrWifiNmeApStationIndSer, CsrWifiNmeApStationIndDes, CsrWifiNmeApStationIndSerFree },

{ 0, NULL, NULL, NULL, NULL },
};

CsrMsgConvMsgEntry* CsrWifiNmeApConverterLookup(CsrMsgConvMsgEntry *ce, CsrUint16 msgType)
{
if (msgType & CSR_PRIM_UPSTREAM)
{
CsrUint16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_COUNT;
if (idx < (CSR_WIFI_NME_AP_PRIM_UPSTREAM_COUNT + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_COUNT) &&
csrwifinmeap_conv_lut[idx].msgType == msgType)
{
return &csrwifinmeap_conv_lut[idx];
}
}
else
{
if (msgType < CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_COUNT &&
csrwifinmeap_conv_lut[msgType].msgType == msgType)
{
return &csrwifinmeap_conv_lut[msgType];
}
}
return NULL;
}


void CsrWifiNmeApConverterInit(void)
{
CsrMsgConvInsert(CSR_WIFI_NME_AP_PRIM, csrwifinmeap_conv_lut);
CsrMsgConvCustomLookupRegister(CSR_WIFI_NME_AP_PRIM, CsrWifiNmeApConverterLookup);
}


#ifdef CSR_LOG_ENABLE
static const CsrLogPrimitiveInformation csrwifinmeap_conv_info = {
CSR_WIFI_NME_AP_PRIM,
(CsrCharString *)"CSR_WIFI_NME_AP_PRIM",
csrwifinmeap_conv_lut
};
const CsrLogPrimitiveInformation* CsrWifiNmeApTechInfoGet(void)
{
return &csrwifinmeap_conv_info;
}


#endif /* CSR_LOG_ENABLE */
#endif /* EXCLUDE_CSR_WIFI_NME_AP_MODULE */
#endif /* CSR_WIFI_NME_ENABLE */
#endif /* CSR_WIFI_AP_ENABLE */
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*****************************************************************************
(c) Cambridge Silicon Radio Limited 2012
All rights reserved and confidential information of CSR
Refer to LICENSE.txt included with this source for details
on the license terms.
*****************************************************************************/

/* Note: this is an auto-generated file. */

#include "csr_pmem.h"
#include "csr_wifi_nme_ap_prim.h"
#include "csr_wifi_nme_ap_lib.h"

/*----------------------------------------------------------------------------*
* NAME
* CsrWifiNmeApFreeDownstreamMessageContents
*
* DESCRIPTION
*
*
* PARAMETERS
* eventClass: only the value CSR_WIFI_NME_AP_PRIM will be handled
* message: the message to free
*----------------------------------------------------------------------------*/
void CsrWifiNmeApFreeDownstreamMessageContents(CsrUint16 eventClass, void *message)
{
if (eventClass != CSR_WIFI_NME_AP_PRIM)
{
return;
}
if (NULL == message)
{
return;
}

switch (*((CsrWifiNmeApPrim *) message))
{
case CSR_WIFI_NME_AP_CONFIG_SET_REQ:
{
CsrWifiNmeApConfigSetReq *p = (CsrWifiNmeApConfigSetReq *)message;
CsrPmemFree(p->apMacConfig.macAddressList);
p->apMacConfig.macAddressList = NULL;
break;
}
case CSR_WIFI_NME_AP_START_REQ:
{
CsrWifiNmeApStartReq *p = (CsrWifiNmeApStartReq *)message;
switch (p->apCredentials.authType)
{
case CSR_WIFI_SME_AP_AUTH_TYPE_PERSONAL:
switch (p->apCredentials.nmeAuthType.authTypePersonal.pskOrPassphrase)
{
case CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE:
CsrPmemFree(p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase);
p->apCredentials.nmeAuthType.authTypePersonal.authPers_credentials.passphrase.passphrase = NULL;
break;
default:
break;
}
break;
default:
break;
}
{
CsrUint16 i3;
for (i3 = 0; i3 < p->p2pGoParam.operatingChanList.channelEntryListCount; i3++)
{
CsrPmemFree(p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel);
p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel = NULL;
}
}
CsrPmemFree(p->p2pGoParam.operatingChanList.channelEntryList);
p->p2pGoParam.operatingChanList.channelEntryList = NULL;
break;
}

default:
break;
}
}


40 changes: 40 additions & 0 deletions trunk/drivers/staging/csr/csr_wifi_nme_ap_free_upstream_contents.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*****************************************************************************
(c) Cambridge Silicon Radio Limited 2012
All rights reserved and confidential information of CSR
Refer to LICENSE.txt included with this source for details
on the license terms.
*****************************************************************************/

/* Note: this is an auto-generated file. */

#include "csr_pmem.h"
#include "csr_wifi_nme_ap_prim.h"
#include "csr_wifi_nme_ap_lib.h"

/*----------------------------------------------------------------------------*
* NAME
* CsrWifiNmeApFreeUpstreamMessageContents
*
* DESCRIPTION
*
*
* PARAMETERS
* eventClass: only the value CSR_WIFI_NME_AP_PRIM will be handled
* message: the message to free
*----------------------------------------------------------------------------*/
void CsrWifiNmeApFreeUpstreamMessageContents(CsrUint16 eventClass, void *message)
{
if (eventClass != CSR_WIFI_NME_AP_PRIM)
{
return;
}
if (NULL == message)
{
return;
}
}


Loading

0 comments on commit a4d3105

Please sign in to comment.