priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
/* Fix VT3226 DFC system timing issue */
- MACvRegBitsOn(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT);
+ vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT);
} else if ((priv->byRFType == RF_VT3342A0)) {
priv->byBBRxConf = abyVT3184_VT3226D0[10];
length = sizeof(abyVT3184_VT3226D0);
priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
/* Fix VT3226 DFC system timing issue */
- MACvRegBitsOn(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT);
+ vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT);
} else {
return true;
}
(priv->byRFType == RF_VT3342A0)) {
vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG,
MAC_REG_ITRTMSET, 0x23);
- MACvRegBitsOn(priv, MAC_REG_PAPEDELAY, 0x01);
+ vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01);
} else if (priv->byRFType == RF_VT3226D0) {
vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG,
MAC_REG_ITRTMSET, 0x11);
- MACvRegBitsOn(priv, MAC_REG_PAPEDELAY, 0x01);
+ vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01);
}
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x04, 0x7f);
}
/* clear NAV */
- MACvRegBitsOn(priv, MAC_REG_MACCR, MACCR_CLRNAV);
+ vnt_mac_reg_bits_on(priv, MAC_REG_MACCR, MACCR_CLRNAV);
/* Set Channel[7] = 0 to tell H/W channel is changing now. */
vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, 0xb0);
bool vnt_clear_current_tsf(struct vnt_private *priv)
{
- MACvRegBitsOn(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
+ vnt_mac_reg_bits_on(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
priv->qwCurrTSF = 0;
BBvExitDeepSleep(priv);
- MACvRegBitsOn(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
+ vnt_mac_reg_bits_on(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
switch (priv->byRFType) {
case RF_AL2230:
case RF_VT3226:
case RF_VT3226D0:
case RF_VT3342A0:
- MACvRegBitsOn(priv, MAC_REG_SOFTPWRCTL,
+ vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL,
(SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3));
break;
}
reg_ofs, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
}
-void MACvRegBitsOn(struct vnt_private *priv, u8 reg_ofs, u8 bits)
+void vnt_mac_reg_bits_on(struct vnt_private *priv, u8 reg_ofs, u8 bits)
{
u8 data[2];
void vnt_mac_disable_keyentry(struct vnt_private *, u8);
void vnt_mac_set_keyentry(struct vnt_private *, u16, u32, u32, u8 *, u8 *);
void vnt_mac_reg_bits_off(struct vnt_private *, u8, u8);
-void MACvRegBitsOn(struct vnt_private *, u8, u8);
+void vnt_mac_reg_bits_on(struct vnt_private *, u8, u8);
void MACvWriteWord(struct vnt_private *, u8, u16);
void MACvWriteBSSIDAddress(struct vnt_private *, u8 *);
void MACvEnableProtectMD(struct vnt_private *);
if ((byTmp & GPIO3_DATA) == 0) {
pDevice->bHWRadioOff = true;
- MACvRegBitsOn(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_GPIOCTL1,
+ GPIO3_INTMD);
} else {
vnt_mac_reg_bits_off(pDevice, MAC_REG_GPIOCTL1,
GPIO3_INTMD);
vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
- MACvRegBitsOn(pDevice, MAC_REG_GPIOCTL0, 0x01);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_GPIOCTL0, 0x01);
if ((pDevice->bHWRadioOff == true) ||
(pDevice->bRadioControlOff == true)) {
* PSEN->AUTOSLEEP->GO2DOZE
*/
/* enable power saving hw function */
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);
/* Set AutoSleep */
- MACvRegBitsOn(pDevice, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
/* Warren:MUST turn on this once before turn on AUTOSLEEP ,or the
* AUTOSLEEP doesn't work
*/
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
if (wListenInterval >= 2) {
vnt_mac_reg_bits_off(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
/* first time set listen next beacon */
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
pMgmt->wCountToWakeUp = wListenInterval;
} else {
/* always listen beacon */
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
pMgmt->wCountToWakeUp = 0;
}
vnt_mac_reg_bits_off(pDevice, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
/* set always listen beacon */
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
pDevice->bEnablePSMode = false;
if (pDevice->op_mode == NL80211_IFTYPE_STATION)
return false;
/* Froce PSEN on */
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);
if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
if (bCheckCountToWakeUp && (pMgmt->wCountToWakeUp == 0
pDevice->bPSRxBeacon = true;
/* no Tx, no Rx isr, now go to Doze */
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n");
return true;
}
if (pMgmt->wCountToWakeUp == 1) {
/* Turn on wake up to listen next beacon */
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
pDevice->bPSRxBeacon = false;
bWakeUp = true;
} else if (!pDevice->bPSRxBeacon) {
/* Listen until RxBeacon */
- MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
}
}
return bWakeUp;
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
(pMgmt->eCurrState >= WMAC_STATE_STARTED)) {
//PMESG(("RESTART_BEACON\n"));
- MACvRegBitsOn(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
}
}
vnt_set_channel(pDevice, pMgmt->uCurrChannel);
// Set Filter
if (pMgmt->bCurrBSSIDFilterOn) {
- MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_RCR, RCR_BSSID);
pDevice->byRxMode |= RCR_BSSID;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel);
netif_stop_queue(pDevice->dev);
vnt_radio_power_off(pDevice);
- MACvRegBitsOn(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_OFF);
vnt_clear_current_tsf(pDevice);
// enable TSF counter
- MACvRegBitsOn(pDevice,MAC_REG_TFTCTL,TFTCTL_TSFCNTREN);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_TFTCTL, TFTCTL_TSFCNTREN);
// set Next TBTT
vnt_reset_next_tbtt(pDevice, pMgmt->wIBSSBeaconPeriod);
vnt_set_bss_mode(pDevice);
if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
- MACvRegBitsOn(pDevice, MAC_REG_HOSTCR, HOSTCR_AP);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_HOSTCR, HOSTCR_AP);
pMgmt->eCurrMode = WMAC_MODE_ESS_AP;
}
if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) {
- MACvRegBitsOn(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC);
pMgmt->eCurrMode = WMAC_MODE_IBSS_STA;
}
MACvWriteBSSIDAddress(pDevice, pMgmt->abyCurrBSSID);
memcpy(pDevice->abyBSSID, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN);
- MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_RCR, RCR_BSSID);
pDevice->byRxMode |= RCR_BSSID;
pMgmt->bCurrBSSIDFilterOn = true;
if (uBSSMode == WMAC_MODE_ESS_STA) {
vnt_mac_reg_bits_off(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC);
- MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_RCR, RCR_BSSID);
pDevice->byRxMode |= RCR_BSSID;
pMgmt->bCurrBSSIDFilterOn = true;
}
// 2. In Infra mode : Supposed we already synchronized with AP right now.
if (uBSSMode == WMAC_MODE_IBSS_STA) {
- MACvRegBitsOn(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC);
- MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_RCR, RCR_BSSID);
pDevice->byRxMode |= RCR_BSSID;
pMgmt->bCurrBSSIDFilterOn = true;
}
spin_unlock_irqrestore(&pDevice->lock, flags);
- MACvRegBitsOn(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
+ vnt_mac_reg_bits_on(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
return true;
}