本文整理汇总了C++中zmw_get_wlan_dev函数的典型用法代码示例。如果您正苦于以下问题:C++ zmw_get_wlan_dev函数的具体用法?C++ zmw_get_wlan_dev怎么用?C++ zmw_get_wlan_dev使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zmw_get_wlan_dev函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: zfiWlanClose
/* WLAN hardware will be shutdown and all resource will be release */
u16_t zfiWlanClose(zdev_t *dev)
{
zmw_get_wlan_dev(dev);
zm_msg0_init(ZM_LV_0, "enter");
wd->state = ZM_WLAN_STATE_CLOSEDED;
/* zfiWlanDisable(dev, 1); */
zfWlanReset(dev);
zfHpStopRecv(dev);
/* Disable MAC */
/* Disable PHY */
/* Disable RF */
zfHpRelease(dev);
zfQueueDestroy(dev, wd->ap.uapsdQ);
zfQueueDestroy(dev, wd->sta.uapsdQ);
zfBssInfoDestroy(dev);
#ifdef ZM_ENABLE_AGGREGATION
/* add by honda */
zfAggRxFreeBuf(dev, 1); /* 1 for release structure memory */
/* end of add by honda */
#endif
zm_msg0_init(ZM_LV_0, "exit");
return 0;
}
示例2: zfGetCmd
u16_t zfGetCmd(zdev_t* dev, u32_t* cmd, u16_t* cmdLen, u16_t* src, u8_t** buf)
{
u16_t i;
struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
hpPriv=wd->hpPrivate;
if (hpPriv->cmdTail == hpPriv->cmdHead)
{
return 3;
}
*cmdLen = hpPriv->cmdQ[hpPriv->cmdHead].cmdLen;
*src = hpPriv->cmdQ[hpPriv->cmdHead].src;
*buf = hpPriv->cmdQ[hpPriv->cmdHead].buf;
for (i=0; i<((*cmdLen)>>2); i++)
{
cmd[i] = hpPriv->cmdQ[hpPriv->cmdHead].cmd[i];
}
hpPriv->cmdHead = (hpPriv->cmdHead+1) & (ZM_CMD_QUEUE_SIZE-1);
return 0;
}
示例3: zfPutCmd
u16_t zfPutCmd(zdev_t* dev, u32_t* cmd, u16_t cmdLen, u16_t src, u8_t* buf)
{
u16_t i;
struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
hpPriv=wd->hpPrivate;
/* Make sure command length < ZM_MAX_CMD_SIZE */
zm_assert(cmdLen <= ZM_MAX_CMD_SIZE);
/* Make sure command queue not full */
//zm_assert(((hpPriv->cmdTail+1) & (ZM_CMD_QUEUE_SIZE-1)) != hpPriv->cmdHead);
if (((hpPriv->cmdTail+1) & (ZM_CMD_QUEUE_SIZE-1)) == hpPriv->cmdHead ) {
zm_debug_msg0("CMD queue full!!");
return 0;
}
hpPriv->cmdQ[hpPriv->cmdTail].cmdLen = cmdLen;
hpPriv->cmdQ[hpPriv->cmdTail].src = src;
hpPriv->cmdQ[hpPriv->cmdTail].buf = buf;
for (i=0; i<(cmdLen>>2); i++)
{
hpPriv->cmdQ[hpPriv->cmdTail].cmd[i] = cmd[i];
}
hpPriv->cmdTail = (hpPriv->cmdTail+1) & (ZM_CMD_QUEUE_SIZE-1);
return 0;
}
示例4: zfSendCmdEx
void zfSendCmdEx(zdev_t* dev)
{
u32_t ncmd[ZM_MAX_CMD_SIZE/4];
u16_t ncmdLen = 0;
u16_t cmdFlag = 0;
u16_t i;
struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
zmw_enter_critical_section(dev);
if (hpPriv->cmdPending == 0)
{
if (hpPriv->cmdTail != hpPriv->cmdSend)
{
cmdFlag = 1;
/* Get queueing command */
ncmdLen= hpPriv->cmdQ[hpPriv->cmdSend].cmdLen;
for (i=0; i<(ncmdLen>>2); i++)
{
ncmd[i] = hpPriv->cmdQ[hpPriv->cmdSend].cmd[i];
}
hpPriv->cmdSend = (hpPriv->cmdSend+1) & (ZM_CMD_QUEUE_SIZE-1);
hpPriv->cmdPending = 1;
}
}
示例5: zfDeAmsdu
void zfDeAmsdu(zdev_t* dev, zbuf_t* buf, u16_t vap, u8_t encryMode)
{
u16_t offset = ZM_SIZE_OF_WLAN_DATA_HEADER+ZM_SIZE_OF_QOS_CTRL;
zbuf_t* subframeBuf;
zmw_get_wlan_dev(dev);
ZM_BUFFER_TRACE(dev, buf)
if (encryMode == ZM_AES || encryMode == ZM_TKIP)
{
offset += (ZM_SIZE_OF_IV + ZM_SIZE_OF_EXT_IV);
}
else if (encryMode == ZM_WEP64 || encryMode == ZM_WEP128)
{
offset += ZM_SIZE_OF_IV;
}
/* Repeatly calling zfGetAmsduSubFrame() until NULL returned */
while ((subframeBuf = zfGetAmsduSubFrame(dev, buf, &offset)) != NULL)
{
wd->commTally.NotifyNDISRxFrmCnt++;
if (wd->zfcbRecvEth != NULL)
{
wd->zfcbRecvEth(dev, subframeBuf, (u8_t)vap);
ZM_PERFORMANCE_RX_MSDU(dev, wd->tick);
}
}
zfwBufFree(dev, buf, 0);
return;
}
示例6: zfHpAniAttach
void zfHpAniAttach(zdev_t *dev)
{
#define N(a) (sizeof(a) / sizeof(a[0]))
u32_t i;
struct zsHpPriv *HpPriv;
const int totalSizeDesired[] = { -55, -55, -55, -55, -62 };
const int coarseHigh[] = { -14, -14, -14, -14, -12 };
const int coarseLow[] = { -64, -64, -64, -64, -70 };
const int firpwr[] = { -78, -78, -78, -78, -80 };
zmw_get_wlan_dev(dev);
HpPriv = (struct zsHpPriv *)wd->hpPrivate;
for (i = 0; i < 5; i++) {
HpPriv->totalSizeDesired[i] = totalSizeDesired[i];
HpPriv->coarseHigh[i] = coarseHigh[i];
HpPriv->coarseLow[i] = coarseLow[i];
HpPriv->firpwr[i] = firpwr[i];
}
/* owl has phy counters */
HpPriv->hasHwPhyCounters = 1;
memset((char *)&HpPriv->ani, 0, sizeof(HpPriv->ani));
for (i = 0; i < ARRAY_SIZE(HpPriv->ani); i++) {
/* New ANI stuff */
HpPriv->ani[i].ofdmTrigHigh = ZM_HAL_ANI_OFDM_TRIG_HIGH;
HpPriv->ani[i].ofdmTrigLow = ZM_HAL_ANI_OFDM_TRIG_LOW;
HpPriv->ani[i].cckTrigHigh = ZM_HAL_ANI_CCK_TRIG_HIGH;
HpPriv->ani[i].cckTrigLow = ZM_HAL_ANI_CCK_TRIG_LOW;
HpPriv->ani[i].rssiThrHigh = ZM_HAL_ANI_RSSI_THR_HIGH;
HpPriv->ani[i].rssiThrLow = ZM_HAL_ANI_RSSI_THR_LOW;
HpPriv->ani[i].ofdmWeakSigDetectOff = !ZM_HAL_ANI_USE_OFDM_WEAK_SIG;
HpPriv->ani[i].cckWeakSigThreshold = ZM_HAL_ANI_CCK_WEAK_SIG_THR;
HpPriv->ani[i].spurImmunityLevel = ZM_HAL_ANI_SPUR_IMMUNE_LVL;
HpPriv->ani[i].firstepLevel = ZM_HAL_ANI_FIRSTEP_LVL;
if (HpPriv->hasHwPhyCounters) {
HpPriv->ani[i].ofdmPhyErrBase = 0;//AR_PHY_COUNTMAX - ZM_HAL_ANI_OFDM_TRIG_HIGH;
HpPriv->ani[i].cckPhyErrBase = 0;//AR_PHY_COUNTMAX - ZM_HAL_ANI_CCK_TRIG_HIGH;
}
}
if (HpPriv->hasHwPhyCounters) {
//zm_debug_msg2("Setting OfdmErrBase = 0x", HpPriv->ani[0].ofdmPhyErrBase);
//zm_debug_msg2("Setting cckErrBase = 0x", HpPriv->ani[0].cckPhyErrBase);
//OS_REG_WRITE(ah, AR_PHY_ERR_1, HpPriv->ani[0].ofdmPhyErrBase);
//OS_REG_WRITE(ah, AR_PHY_ERR_2, HpPriv->ani[0].cckPhyErrBase);
}
HpPriv->aniPeriod = ZM_HAL_ANI_PERIOD;
//if (ath_hal_enableANI)
HpPriv->procPhyErr |= ZM_HAL_PROCESS_ANI;
HpPriv->stats.ast_nodestats.ns_avgbrssi = ZM_RSSI_DUMMY_MARKER;
HpPriv->stats.ast_nodestats.ns_avgrssi = ZM_RSSI_DUMMY_MARKER;
HpPriv->stats.ast_nodestats.ns_avgtxrssi = ZM_RSSI_DUMMY_MARKER;
#undef N
}
示例7: zfScanMgrInit
void zfScanMgrInit(zdev_t* dev)
{
zmw_get_wlan_dev(dev);
wd->sta.scanMgr.scanReqs[0] = 0;
wd->sta.scanMgr.scanReqs[1] = 0;
wd->sta.scanMgr.currScanType = ZM_SCAN_MGR_SCAN_NONE;
wd->sta.scanMgr.scanStartDelay = 3;
//wd->sta.scanMgr.scanStartDelay = 0;
}
示例8: BEACON_RSSI
s32_t BEACON_RSSI(zdev_t *dev)
{
s32_t rssi;
struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
HpPriv = (struct zsHpPriv *)wd->hpPrivate;
rssi = ZM_HAL_EP_RND(HpPriv->stats.ast_nodestats.ns_avgbrssi, ZM_HAL_RSSI_EP_MULTIPLIER);
return rssi;
}
示例9: zfScanMgrScanAck
void zfScanMgrScanAck(zdev_t* dev)
{
zmw_get_wlan_dev(dev);
zmw_declare_for_critical_section();
zmw_enter_critical_section(dev);
wd->sta.scanMgr.scanStartDelay = 3;
//wd->sta.scanMgr.scanStartDelay = 0;
zmw_leave_critical_section(dev);
return;
}
示例10: zfHpAniCckErrTrigger
void zfHpAniCckErrTrigger(zdev_t* dev)
{
struct zsAniState *aniState;
s32_t rssi;
struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
HpPriv = (struct zsHpPriv*)wd->hpPrivate;
//HALASSERT(chan != NULL);
if ((HpPriv->procPhyErr & ZM_HAL_PROCESS_ANI) == 0)
return;
/* first, raise noise immunity level, up to max */
aniState = HpPriv->curani;
if (aniState->noiseImmunityLevel < ZM_HAL_NOISE_IMMUNE_MAX)
{
zfHpAniControl(dev, ZM_HAL_ANI_NOISE_IMMUNITY_LEVEL,
aniState->noiseImmunityLevel + 1);
return;
}
rssi = BEACON_RSSI(dev);
if (rssi > aniState->rssiThrLow)
{
/*
* Beacon signal in mid and high range, raise firsteplevel.
*/
if (aniState->firstepLevel < ZM_HAL_FIRST_STEP_MAX)
zfHpAniControl(dev, ZM_HAL_ANI_FIRSTEP_LEVEL, aniState->firstepLevel + 1);
}
else
{
/*
* Beacon rssi is low, zero firstepLevel to maximize
* CCK sensitivity.
*/
if (wd->frequency < 3000)
{
if (aniState->firstepLevel > 0)
zfHpAniControl(dev, ZM_HAL_ANI_FIRSTEP_LEVEL, 0);
}
}
}
示例11: zfScanMgrScanEventRetry
void zfScanMgrScanEventRetry(zdev_t* dev)
{
zmw_get_wlan_dev(dev);
if ( !wd->sta.bChannelScan )
{
return;
}
if ( !wd->sta.bPassiveScan )
{
zfScanSendProbeRequest(dev);
#if 0
zmw_enter_critical_section(dev);
zfTimerSchedule(dev, ZM_EVENT_IN_SCAN, ZM_TICK_IN_SCAN);
zmw_leave_critical_section(dev);
#endif
}
}
示例12: zfInitCmdQueue
void zfInitCmdQueue(zdev_t* dev)
{
struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
hpPriv = (struct zsHpPriv*)(wd->hpPrivate);
zmw_declare_for_critical_section();
zmw_enter_critical_section(dev);
#ifdef ZM_XP_USB_MULTCMD
hpPriv->cmdTail = hpPriv->cmdHead = hpPriv->cmdSend = 0;
#else
hpPriv->cmdTail = hpPriv->cmdHead = 0;
#endif
hpPriv->cmdPending = 0;
hpPriv->cmd.delayWcmdCount = 0;
zmw_leave_critical_section(dev);
}
示例13: zfCoreCwmBusy
void zfCoreCwmBusy(zdev_t* dev, u16_t busy)
{
zmw_get_wlan_dev(dev);
zm_msg1_mm(ZM_LV_0, "CwmBusy=", busy);
if(wd->cwm.cw_mode == CWM_MODE20) {
wd->cwm.cw_width = CWM_WIDTH20;
return;
}
if(wd->cwm.cw_mode == CWM_MODE40) {
wd->cwm.cw_width = CWM_WIDTH40;
return;
}
if (busy) {
wd->cwm.cw_width = CWM_WIDTH20;
return;
}
if((wd->wlanMode == ZM_MODE_INFRASTRUCTURE || wd->wlanMode == ZM_MODE_PSEUDO ||
wd->wlanMode == ZM_MODE_IBSS)) {
if (wd->sta.ie.HtCap.HtCapInfo && HTCAP_SupChannelWidthSet != 0 &&
wd->sta.ie.HtInfo.ChannelInfo && ExtHtCap_RecomTxWidthSet != 0 &&
(wd->sta.ie.HtInfo.ChannelInfo && ExtHtCap_ExtChannelOffsetAbove) == 1) {
wd->cwm.cw_width = CWM_WIDTH40;
}
else {
wd->cwm.cw_width = CWM_WIDTH20;
}
return;
}
if(wd->wlanMode == ZM_MODE_AP) {
wd->cwm.cw_width = CWM_WIDTH40;
}
}