mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 22:43:04 +00:00
rtl8188eu: Replace synonyms for true and false with the real thing
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
b89e0320f5
commit
999a777041
91 changed files with 4692 additions and 4724 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -372,7 +372,7 @@ int rtw_mp_start(struct net_device *dev,
|
|||
LeaveAllPowerSaveMode(padapter);
|
||||
|
||||
if (rtw_mi_check_fwstate(padapter, _FW_UNDER_SURVEY))
|
||||
rtw_mi_scan_abort(padapter, _FALSE);
|
||||
rtw_mi_scan_abort(padapter, false);
|
||||
|
||||
if (rtw_mp_cmd(padapter, MP_START, RTW_CMDF_WAIT_ACK) != _SUCCESS)
|
||||
ret = -EPERM;
|
||||
|
@ -734,7 +734,7 @@ int rtw_mp_ctx(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
countPkTx = strncmp(extra, "count=", 5); /* strncmp TRUE is 0*/
|
||||
countPkTx = strncmp(extra, "count=", 5); /* strncmp true is 0*/
|
||||
cotuTx = strncmp(extra, "background", 20);
|
||||
CarrSprTx = strncmp(extra, "background,cs", 20);
|
||||
scTx = strncmp(extra, "background,sc", 20);
|
||||
|
@ -830,7 +830,7 @@ int rtw_mp_disable_bt_coexist(struct net_device *dev,
|
|||
RTW_INFO("Set OID_RT_SET_DISABLE_BT_COEXIST: disable BT_COEXIST\n");
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_HaltNotify(padapter);
|
||||
rtw_btcoex_SetManualControl(padapter, _TRUE);
|
||||
rtw_btcoex_SetManualControl(padapter, true);
|
||||
/* Force to switch Antenna to WiFi*/
|
||||
rtw_write16(padapter, 0x870, 0x300);
|
||||
rtw_write16(padapter, 0x860, 0x110);
|
||||
|
@ -838,7 +838,7 @@ int rtw_mp_disable_bt_coexist(struct net_device *dev,
|
|||
/* CONFIG_BT_COEXIST */
|
||||
} else {
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_SetManualControl(padapter, _FALSE);
|
||||
rtw_btcoex_SetManualControl(padapter, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -872,16 +872,16 @@ int rtw_mp_arx(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
bStartRx = (strncmp(input, "start", 5) == 0) ? 1 : 0; /* strncmp TRUE is 0*/
|
||||
bStopRx = (strncmp(input, "stop", 5) == 0) ? 1 : 0; /* strncmp TRUE is 0*/
|
||||
bQueryPhy = (strncmp(input, "phy", 3) == 0) ? 1 : 0; /* strncmp TRUE is 0*/
|
||||
bQueryMac = (strncmp(input, "mac", 3) == 0) ? 1 : 0; /* strncmp TRUE is 0*/
|
||||
bSetBssid = (strncmp(input, "setbssid=", 8) == 0) ? 1 : 0; /* strncmp TRUE is 0*/
|
||||
bStartRx = (strncmp(input, "start", 5) == 0) ? 1 : 0; /* strncmp true is 0*/
|
||||
bStopRx = (strncmp(input, "stop", 5) == 0) ? 1 : 0; /* strncmp true is 0*/
|
||||
bQueryPhy = (strncmp(input, "phy", 3) == 0) ? 1 : 0; /* strncmp true is 0*/
|
||||
bQueryMac = (strncmp(input, "mac", 3) == 0) ? 1 : 0; /* strncmp true is 0*/
|
||||
bSetBssid = (strncmp(input, "setbssid=", 8) == 0) ? 1 : 0; /* strncmp true is 0*/
|
||||
/*bfilter_init = (strncmp(input, "filter_init",11)==0)?1:0;*/
|
||||
bmac_filter = (strncmp(input, "accept_mac", 10) == 0) ? 1 : 0;
|
||||
bmon = (strncmp(input, "mon=", 4) == 0) ? 1 : 0;
|
||||
bSmpCfg = (strncmp(input , "smpcfg=" , 7) == 0) ? 1 : 0;
|
||||
pmppriv->bloopback = (strncmp(input, "loopbk", 6) == 0) ? 1 : 0; /* strncmp TRUE is 0*/
|
||||
pmppriv->bloopback = (strncmp(input, "loopbk", 6) == 0) ? 1 : 0; /* strncmp true is 0*/
|
||||
|
||||
if (bSetBssid == 1) {
|
||||
pch = input;
|
||||
|
@ -904,7 +904,7 @@ int rtw_mp_arx(struct net_device *dev,
|
|||
} else
|
||||
return -EFAULT;
|
||||
|
||||
pmppriv->bSetRxBssid = _TRUE;
|
||||
pmppriv->bSetRxBssid = true;
|
||||
}
|
||||
|
||||
if (bmac_filter) {
|
||||
|
@ -933,11 +933,11 @@ int rtw_mp_arx(struct net_device *dev,
|
|||
|
||||
if (bStartRx) {
|
||||
sprintf(extra, "start");
|
||||
SetPacketRx(padapter, bStartRx, _FALSE);
|
||||
SetPacketRx(padapter, bStartRx, false);
|
||||
} else if (bStopRx) {
|
||||
SetPacketRx(padapter, bStartRx, _FALSE);
|
||||
pmppriv->bmac_filter = _FALSE;
|
||||
pmppriv->bSetRxBssid = _FALSE;
|
||||
SetPacketRx(padapter, bStartRx, false);
|
||||
pmppriv->bmac_filter = false;
|
||||
pmppriv->bSetRxBssid = false;
|
||||
sprintf(extra, "Received packet OK:%d CRC error:%d ,Filter out:%d", padapter->mppriv.rx_pktcount, padapter->mppriv.rx_crcerrpktcount, padapter->mppriv.rx_pktcount_filter_out);
|
||||
} else if (bQueryPhy) {
|
||||
memset(&rx_counter, 0, sizeof(struct dbg_rx_counter));
|
||||
|
@ -960,10 +960,10 @@ int rtw_mp_arx(struct net_device *dev,
|
|||
ret = sscanf(input, "mon=%d", &bmon);
|
||||
|
||||
if (bmon == 1) {
|
||||
pmppriv->rx_bindicatePkt = _TRUE;
|
||||
pmppriv->rx_bindicatePkt = true;
|
||||
sprintf(extra, "Indicating Receive Packet to network start\n");
|
||||
} else {
|
||||
pmppriv->rx_bindicatePkt = _FALSE;
|
||||
pmppriv->rx_bindicatePkt = false;
|
||||
sprintf(extra, "Indicating Receive Packet to network Stop\n");
|
||||
}
|
||||
}
|
||||
|
@ -971,17 +971,17 @@ int rtw_mp_arx(struct net_device *dev,
|
|||
ret = sscanf(input, "smpcfg=%d", &bSmpCfg);
|
||||
|
||||
if (bSmpCfg == 1) {
|
||||
pmppriv->bRTWSmbCfg = _TRUE;
|
||||
pmppriv->bRTWSmbCfg = true;
|
||||
sprintf(extra , "Indicate By Simple Config Format\n");
|
||||
SetPacketRx(padapter, _TRUE, _TRUE);
|
||||
SetPacketRx(padapter, true, true);
|
||||
} else {
|
||||
pmppriv->bRTWSmbCfg = _FALSE;
|
||||
pmppriv->bRTWSmbCfg = false;
|
||||
sprintf(extra , "Indicate By Normal Format\n");
|
||||
SetPacketRx(padapter, _TRUE, _FALSE);
|
||||
SetPacketRx(padapter, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (pmppriv->bloopback == _TRUE) {
|
||||
if (pmppriv->bloopback == true) {
|
||||
sprintf(extra , "Enter MAC LoopBack mode\n");
|
||||
_rtw_write32(padapter, 0x100, 0xB0106FF);
|
||||
RTW_INFO("0x100 :0x%x" , _rtw_read32(padapter, 0x100));
|
||||
|
@ -1004,7 +1004,7 @@ int rtw_mp_trx_query(struct net_device *dev,
|
|||
PMPT_CONTEXT pMptCtx = &(padapter->mppriv.mpt_ctx);
|
||||
RT_PMAC_TX_INFO PMacTxInfo = pMptCtx->PMacTxInfo;
|
||||
|
||||
if (PMacTxInfo.bEnPMacTx == TRUE)
|
||||
if (PMacTxInfo.bEnPMacTx == true)
|
||||
txok = hal_mpt_query_phytxok(padapter);
|
||||
else
|
||||
txok = padapter->mppriv.tx.sended;
|
||||
|
@ -1102,13 +1102,13 @@ int rtw_mp_thermal(struct net_device *dev,
|
|||
if (copy_from_user(extra, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
bwrite = strncmp(extra, "write", 6);/* strncmp TRUE is 0*/
|
||||
bwrite = strncmp(extra, "write", 6);/* strncmp true is 0*/
|
||||
|
||||
GetThermalMeter(padapter, &val);
|
||||
|
||||
if (bwrite == 0) {
|
||||
/*RTW_INFO("to write val:%d",val);*/
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
|
||||
if (2 > max_available_size) {
|
||||
RTW_INFO("no available efuse!\n");
|
||||
return -EFAULT;
|
||||
|
@ -1227,19 +1227,19 @@ int rtw_mp_SetRFPath(struct net_device *dev,
|
|||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
bMain = strncmp(input, "1", 2); /* strncmp TRUE is 0*/
|
||||
bTurnoff = strncmp(input, "0", 3); /* strncmp TRUE is 0*/
|
||||
bMain = strncmp(input, "1", 2); /* strncmp true is 0*/
|
||||
bTurnoff = strncmp(input, "0", 3); /* strncmp true is 0*/
|
||||
|
||||
memset(extra, 0, wrqu->length);
|
||||
|
||||
if (bMain == 0) {
|
||||
MP_PHY_SetRFPathSwitch(padapter, _TRUE);
|
||||
RTW_INFO("%s:PHY_SetRFPathSwitch=TRUE\n", __func__);
|
||||
MP_PHY_SetRFPathSwitch(padapter, true);
|
||||
RTW_INFO("%s:PHY_SetRFPathSwitch=true\n", __func__);
|
||||
sprintf(extra, "mp_setrfpath Main\n");
|
||||
|
||||
} else if (bTurnoff == 0) {
|
||||
MP_PHY_SetRFPathSwitch(padapter, _FALSE);
|
||||
RTW_INFO("%s:PHY_SetRFPathSwitch=FALSE\n", __func__);
|
||||
MP_PHY_SetRFPathSwitch(padapter, false);
|
||||
RTW_INFO("%s:PHY_SetRFPathSwitch=false\n", __func__);
|
||||
sprintf(extra, "mp_setrfpath Aux\n");
|
||||
} else {
|
||||
bMain = MP_PHY_QueryRFPathSwitch(padapter);
|
||||
|
@ -1268,7 +1268,7 @@ int rtw_mp_QueryDrv(struct net_device *dev,
|
|||
return -EFAULT;
|
||||
RTW_INFO("%s:iwpriv in=%s\n", __func__, input);
|
||||
|
||||
qAutoLoad = strncmp(input, "autoload", 8); /* strncmp TRUE is 0*/
|
||||
qAutoLoad = strncmp(input, "autoload", 8); /* strncmp true is 0*/
|
||||
|
||||
if (qAutoLoad == 0) {
|
||||
RTW_INFO("%s:qAutoLoad\n", __func__);
|
||||
|
@ -1296,7 +1296,7 @@ int rtw_mp_PwrCtlDM(struct net_device *dev,
|
|||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
bstart = strncmp(input, "start", 5); /* strncmp TRUE is 0*/
|
||||
bstart = strncmp(input, "start", 5); /* strncmp true is 0*/
|
||||
if (bstart == 0) {
|
||||
sprintf(extra, "PwrCtlDM start\n");
|
||||
MPT_PwrCtlDM(padapter, 1);
|
||||
|
@ -1372,27 +1372,27 @@ int rtw_mp_mon(struct net_device *dev,
|
|||
RTW_INFO("%s: initialize MP private data Fail!\n", __func__);
|
||||
padapter->mppriv.channel = 6;
|
||||
|
||||
bstart = strncmp(extra, "start", 5); /* strncmp TRUE is 0*/
|
||||
bstop = strncmp(extra, "stop", 4); /* strncmp TRUE is 0*/
|
||||
bstart = strncmp(extra, "start", 5); /* strncmp true is 0*/
|
||||
bstop = strncmp(extra, "stop", 4); /* strncmp true is 0*/
|
||||
if (bstart == 0) {
|
||||
mp_join(padapter, WIFI_FW_ADHOC_STATE);
|
||||
SetPacketRx(padapter, _TRUE, _FALSE);
|
||||
SetPacketRx(padapter, true, false);
|
||||
SetChannel(padapter);
|
||||
pmp_priv->rx_bindicatePkt = _TRUE;
|
||||
pmp_priv->bRTWSmbCfg = _TRUE;
|
||||
pmp_priv->rx_bindicatePkt = true;
|
||||
pmp_priv->bRTWSmbCfg = true;
|
||||
sprintf(extra, "monitor mode start\n");
|
||||
} else if (bstop == 0) {
|
||||
SetPacketRx(padapter, _FALSE, _FALSE);
|
||||
pmp_priv->rx_bindicatePkt = _FALSE;
|
||||
pmp_priv->bRTWSmbCfg = _FALSE;
|
||||
SetPacketRx(padapter, false, false);
|
||||
pmp_priv->rx_bindicatePkt = false;
|
||||
pmp_priv->bRTWSmbCfg = false;
|
||||
padapter->registrypriv.mp_mode = 1;
|
||||
pHalFunc->hal_deinit(padapter);
|
||||
padapter->registrypriv.mp_mode = 0;
|
||||
pHalFunc->hal_init(padapter);
|
||||
/*rtw_disassoc_cmd(padapter, 0, _TRUE);*/
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
rtw_disassoc_cmd(padapter, 500, _TRUE);
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
/*rtw_disassoc_cmd(padapter, 0, true);*/
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
rtw_disassoc_cmd(padapter, 500, true);
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
/*rtw_free_assoc_resources(padapter, 1);*/
|
||||
}
|
||||
rtw_pm_set_ips(padapter, IPS_NORMAL);
|
||||
|
@ -1523,17 +1523,17 @@ int rtw_mp_tx(struct net_device *dev,
|
|||
if (strncmp(extra, "pmact=", 6) == 0) {
|
||||
memset(&pMptCtx->PMacTxInfo, 0, sizeof(pMptCtx->PMacTxInfo));
|
||||
if (strncmp(extra, "pmact=start", 11) == 0) {
|
||||
pMptCtx->PMacTxInfo.bEnPMacTx = _TRUE;
|
||||
pMptCtx->PMacTxInfo.bEnPMacTx = true;
|
||||
sprintf(extra, "Set PMac Tx Mode start\n");
|
||||
} else {
|
||||
pMptCtx->PMacTxInfo.bEnPMacTx = _FALSE;
|
||||
pMptCtx->PMacTxInfo.bEnPMacTx = false;
|
||||
sprintf(extra, "Set PMac Tx Mode Stop\n");
|
||||
}
|
||||
if (pMptCtx->bldpc == TRUE)
|
||||
pMptCtx->PMacTxInfo.bLDPC = _TRUE;
|
||||
if (pMptCtx->bldpc == true)
|
||||
pMptCtx->PMacTxInfo.bLDPC = true;
|
||||
|
||||
if (pMptCtx->bstbc == TRUE)
|
||||
pMptCtx->PMacTxInfo.bSTBC = _TRUE;
|
||||
if (pMptCtx->bstbc == true)
|
||||
pMptCtx->PMacTxInfo.bSTBC = true;
|
||||
|
||||
pMptCtx->PMacTxInfo.bSPreamble = pmp_priv->preamble;
|
||||
pMptCtx->PMacTxInfo.bSGI = pmp_priv->preamble;
|
||||
|
@ -1542,7 +1542,7 @@ int rtw_mp_tx(struct net_device *dev,
|
|||
|
||||
pMptCtx->PMacTxInfo.Mode = pMptCtx->HWTxmode;
|
||||
|
||||
pMptCtx->PMacTxInfo.NDP_sound = FALSE;/*(Adapter.PacketType == NDP_PKT)?TRUE:FALSE;*/
|
||||
pMptCtx->PMacTxInfo.NDP_sound = false;/*(Adapter.PacketType == NDP_PKT)?true:false;*/
|
||||
|
||||
if (padapter->mppriv.pktInterval == 0)
|
||||
pMptCtx->PMacTxInfo.PacketPeriod = 100;
|
||||
|
@ -1814,8 +1814,8 @@ int rtw_mp_rx(struct net_device *dev,
|
|||
|
||||
if (strncmp(extra, "stop", 4) == 0) {
|
||||
memset(extra, 0, wrqu->data.length);
|
||||
SetPacketRx(padapter, bStartRx, _FALSE);
|
||||
pmp_priv->bmac_filter = _FALSE;
|
||||
SetPacketRx(padapter, bStartRx, false);
|
||||
pmp_priv->bmac_filter = false;
|
||||
sprintf(extra, "Received packet OK:%d CRC error:%d ,Filter out:%d", padapter->mppriv.rx_pktcount, padapter->mppriv.rx_crcerrpktcount, padapter->mppriv.rx_pktcount_filter_out);
|
||||
wrqu->data.length = strlen(extra);
|
||||
return 0;
|
||||
|
@ -1902,7 +1902,7 @@ int rtw_mp_rx(struct net_device *dev,
|
|||
SetAntenna(padapter);
|
||||
|
||||
sprintf(extra, "%s\nstart Rx", extra);
|
||||
SetPacketRx(padapter, bStartRx, _FALSE);
|
||||
SetPacketRx(padapter, bStartRx, false);
|
||||
}
|
||||
wrqu->data.length = strlen(extra);
|
||||
return 0;
|
||||
|
@ -1966,8 +1966,8 @@ int rtw_efuse_mask_file(struct net_device *dev,
|
|||
if ((pch == NULL) || (strlen(pch) == 0))
|
||||
break;
|
||||
if (strlen(pch) != 2
|
||||
|| IsHexDigit(*pch) == _FALSE
|
||||
|| IsHexDigit(*(pch + 1)) == _FALSE
|
||||
|| IsHexDigit(*pch) == false
|
||||
|| IsHexDigit(*(pch + 1)) == false
|
||||
|| sscanf(pch, "%hhx", &tmp) != 1
|
||||
) {
|
||||
RTW_INFO("%s: invalid 8-bit hex! input format: data,01:23:45:67:89:ab:cd:ef...\n", __func__);
|
||||
|
@ -1980,7 +1980,7 @@ int rtw_efuse_mask_file(struct net_device *dev,
|
|||
for (i = 0; i < count; i++)
|
||||
sprintf(extra, "%s:%02x", extra, maskfileBuffer[i]);
|
||||
|
||||
padapter->registrypriv.bFileMaskEfuse = _TRUE;
|
||||
padapter->registrypriv.bFileMaskEfuse = true;
|
||||
|
||||
sprintf(extra, "%s\nLoad Efuse Mask data %d hex ok\n", extra, count);
|
||||
wrqu->data.length = strlen(extra);
|
||||
|
@ -1988,14 +1988,14 @@ int rtw_efuse_mask_file(struct net_device *dev,
|
|||
}
|
||||
rtw_efuse_mask_file_path = extra;
|
||||
|
||||
if (rtw_is_file_readable(rtw_efuse_mask_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_efuse_mask_file_path) == true) {
|
||||
RTW_INFO("%s do rtw_efuse_mask_file_read = %s! ,sizeof maskfileBuffer %zu\n", __func__, rtw_efuse_mask_file_path, sizeof(maskfileBuffer));
|
||||
Status = rtw_efuse_file_read(padapter, rtw_efuse_mask_file_path, maskfileBuffer, sizeof(maskfileBuffer));
|
||||
if (Status == _TRUE)
|
||||
padapter->registrypriv.bFileMaskEfuse = _TRUE;
|
||||
if (Status == true)
|
||||
padapter->registrypriv.bFileMaskEfuse = true;
|
||||
sprintf(extra, "efuse mask file read OK\n");
|
||||
} else {
|
||||
padapter->registrypriv.bFileMaskEfuse = _FALSE;
|
||||
padapter->registrypriv.bFileMaskEfuse = false;
|
||||
sprintf(extra, "efuse mask file readable FAIL\n");
|
||||
RTW_INFO("%s rtw_is_file_readable fail!\n", __func__);
|
||||
}
|
||||
|
@ -2023,14 +2023,14 @@ int rtw_efuse_file_map(struct net_device *dev,
|
|||
|
||||
memset(pEfuseHal->fakeEfuseModifiedMap, 0xFF, EFUSE_MAX_MAP_LEN);
|
||||
|
||||
if (rtw_is_file_readable(rtw_efuse_file_map_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_efuse_file_map_path) == true) {
|
||||
RTW_INFO("%s do rtw_efuse_mask_file_read = %s!\n", __func__, rtw_efuse_file_map_path);
|
||||
Status = rtw_efuse_file_read(padapter, rtw_efuse_file_map_path, pEfuseHal->fakeEfuseModifiedMap, sizeof(pEfuseHal->fakeEfuseModifiedMap));
|
||||
if (Status == _TRUE) {
|
||||
pmp_priv->bloadefusemap = _TRUE;
|
||||
if (Status == true) {
|
||||
pmp_priv->bloadefusemap = true;
|
||||
sprintf(extra, "efuse file file_read OK\n");
|
||||
} else {
|
||||
pmp_priv->bloadefusemap = _FALSE;
|
||||
pmp_priv->bloadefusemap = false;
|
||||
sprintf(extra, "efuse file file_read FAIL\n");
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -192,8 +192,8 @@ void rtw_os_indicate_connect(_adapter *adapter)
|
|||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true))
|
||||
rtw_cfg80211_ibss_indicate_connect(adapter);
|
||||
else
|
||||
rtw_cfg80211_indicate_connect(adapter);
|
||||
|
|
|
@ -160,9 +160,9 @@ static int rtw_low_power = 0;
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_DEFAULT_PATTERNS_EN
|
||||
static bool rtw_support_default_patterns = _TRUE;
|
||||
static bool rtw_support_default_patterns = true;
|
||||
#else
|
||||
static bool rtw_support_default_patterns = _FALSE;
|
||||
static bool rtw_support_default_patterns = false;
|
||||
#endif
|
||||
|
||||
static int rtw_special_rf_path = 0; /* 0: 2T2R ,1: only turn on path A 1T1R */
|
||||
|
@ -203,7 +203,7 @@ static int rtw_bt_sco = 3;/* 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy,
|
|||
static int rtw_bt_ampdu = 1 ; /* 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU. */
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
static int rtw_AcceptAddbaReq = _TRUE;/* 0:Reject AP's Add BA req, 1:Accept AP's Add BA req. */
|
||||
static int rtw_AcceptAddbaReq = true;/* 0:Reject AP's Add BA req, 1:Accept AP's Add BA req. */
|
||||
|
||||
static int rtw_antdiv_cfg = 2; /* 0:OFF , 1:ON, 2:decide by Efuse config */
|
||||
static int rtw_antdiv_type = 0
|
||||
|
@ -750,8 +750,8 @@ uint loadparam(_adapter *padapter)
|
|||
registry_par->wifi_spec = (u8)rtw_wifi_spec;
|
||||
|
||||
if (strlen(rtw_country_code) != 2
|
||||
|| is_alpha(rtw_country_code[0]) == _FALSE
|
||||
|| is_alpha(rtw_country_code[1]) == _FALSE
|
||||
|| is_alpha(rtw_country_code[0]) == false
|
||||
|| is_alpha(rtw_country_code[1]) == false
|
||||
) {
|
||||
if (rtw_country_code != rtw_country_unspecified)
|
||||
RTW_ERR("%s discard rtw_country_code not in alpha2\n", __func__);
|
||||
|
@ -937,7 +937,7 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
|
|||
int ret = -1;
|
||||
|
||||
/* only the net_device is in down state to permit modifying mac addr */
|
||||
if ((pnetdev->flags & IFF_UP) == _TRUE) {
|
||||
if ((pnetdev->flags & IFF_UP) == true) {
|
||||
RTW_INFO(FUNC_ADPT_FMT": The net_device's is not in down state\n"
|
||||
, FUNC_ADPT_ARG(padapter));
|
||||
|
||||
|
@ -955,7 +955,7 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
|
|||
}
|
||||
|
||||
/* check whether the input mac address is valid to permit modifying mac addr */
|
||||
if (rtw_check_invalid_mac_address(sa->sa_data, _FALSE) == _TRUE) {
|
||||
if (rtw_check_invalid_mac_address(sa->sa_data, false) == true) {
|
||||
RTW_INFO(FUNC_ADPT_FMT": Invalid Mac Addr for "MAC_FMT"\n"
|
||||
, FUNC_ADPT_ARG(padapter), MAC_ARG(sa->sa_data));
|
||||
|
||||
|
@ -1659,7 +1659,7 @@ u8 rtw_init_default_value(_adapter *padapter)
|
|||
RTW_ENABLE_FUNC(padapter, DF_RX_BIT);
|
||||
RTW_ENABLE_FUNC(padapter, DF_TX_BIT);
|
||||
padapter->bLinkInfoDump = 0;
|
||||
padapter->bNotifyChannelChange = _FALSE;
|
||||
padapter->bNotifyChannelChange = false;
|
||||
#ifdef CONFIG_P2P
|
||||
padapter->bShowGetP2PState = 1;
|
||||
#endif
|
||||
|
@ -1738,7 +1738,7 @@ struct dvobj_priv *devobj_init(void)
|
|||
memset(pdvobj->customer_str, 0xFF, RTW_CUSTOMER_STR_LEN);
|
||||
#endif
|
||||
|
||||
pdvobj->processing_dev_remove = _FALSE;
|
||||
pdvobj->processing_dev_remove = false;
|
||||
|
||||
ATOMIC_SET(&pdvobj->disable_func, 0);
|
||||
|
||||
|
@ -1874,9 +1874,9 @@ u8 rtw_reset_drv_sw(_adapter *padapter)
|
|||
padapter->xmitpriv.tx_pkts = 0;
|
||||
padapter->recvpriv.rx_pkts = 0;
|
||||
|
||||
pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE;
|
||||
pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
|
||||
|
||||
/* pmlmepriv->LinkDetectInfo.TrafficBusyState = _FALSE; */
|
||||
/* pmlmepriv->LinkDetectInfo.TrafficBusyState = false; */
|
||||
pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
|
||||
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0;
|
||||
|
||||
|
@ -2205,11 +2205,11 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
|
|||
goto _netdev_virtual_iface_open_error;
|
||||
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
if (padapter->bup == _FALSE) {
|
||||
if (padapter->bup == false) {
|
||||
u8 mac[ETH_ALEN];
|
||||
|
||||
/* get mac address from primary_padapter */
|
||||
if (primary_padapter->bup == _FALSE)
|
||||
if (primary_padapter->bup == false)
|
||||
rtw_macaddr_cfg(adapter_mac_addr(primary_padapter), get_hal_mac_addr(primary_padapter));
|
||||
|
||||
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
|
||||
|
@ -2230,15 +2230,15 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
|
|||
}
|
||||
#endif /*CONFIG_PLATFORM_INTEL_BYT*/
|
||||
|
||||
if (primary_padapter->bup == _FALSE || !rtw_is_hw_init_completed(primary_padapter))
|
||||
if (primary_padapter->bup == false || !rtw_is_hw_init_completed(primary_padapter))
|
||||
_netdev_open(primary_padapter->pnetdev);
|
||||
|
||||
if (padapter->bup == _FALSE && primary_padapter->bup == _TRUE &&
|
||||
if (padapter->bup == false && primary_padapter->bup == true &&
|
||||
rtw_is_hw_init_completed(primary_padapter)) {
|
||||
padapter->bFWReady = primary_padapter->bFWReady;
|
||||
}
|
||||
|
||||
if (padapter->bup == _FALSE) {
|
||||
if (padapter->bup == false) {
|
||||
if (rtw_start_drv_threads(padapter) == _FAIL)
|
||||
goto _netdev_virtual_iface_open_error;
|
||||
}
|
||||
|
@ -2255,9 +2255,9 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
|
|||
rtw_cfg80211_init_wdev_data(padapter);
|
||||
#endif
|
||||
|
||||
padapter->bup = _TRUE;
|
||||
padapter->bup = true;
|
||||
|
||||
padapter->net_closed = _FALSE;
|
||||
padapter->net_closed = false;
|
||||
|
||||
rtw_netif_wake_queue(pnetdev);
|
||||
|
||||
|
@ -2267,7 +2267,7 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
|
|||
|
||||
_netdev_virtual_iface_open_error:
|
||||
|
||||
padapter->bup = _FALSE;
|
||||
padapter->bup = false;
|
||||
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
if(padapter->napi_state == NAPI_ENABLE) {
|
||||
|
@ -2306,8 +2306,8 @@ static int netdev_vir_if_close(struct net_device *pnetdev)
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup);
|
||||
padapter->net_closed = _TRUE;
|
||||
pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE;
|
||||
padapter->net_closed = true;
|
||||
pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
|
||||
|
||||
if (pnetdev)
|
||||
rtw_netif_stop_queue(pnetdev);
|
||||
|
@ -2320,7 +2320,7 @@ static int netdev_vir_if_close(struct net_device *pnetdev)
|
|||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_scan_abort(padapter);
|
||||
rtw_cfg80211_wait_scan_req_empty(padapter, 200);
|
||||
adapter_wdev_data(padapter)->bandroid_scan = _FALSE;
|
||||
adapter_wdev_data(padapter)->bandroid_scan = false;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -2373,13 +2373,13 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
|
|||
_rtw_memcpy(padapter, primary_padapter, sizeof(_adapter));
|
||||
|
||||
/* */
|
||||
padapter->bup = _FALSE;
|
||||
padapter->net_closed = _TRUE;
|
||||
padapter->bup = false;
|
||||
padapter->net_closed = true;
|
||||
padapter->dir_dev = NULL;
|
||||
padapter->dir_odm = NULL;
|
||||
|
||||
/*set adapter_type/iface type*/
|
||||
padapter->isprimary = _FALSE;
|
||||
padapter->isprimary = false;
|
||||
padapter->adapter_type = VIRTUAL_ADAPTER;
|
||||
|
||||
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
||||
|
@ -2452,10 +2452,10 @@ void rtw_drv_stop_vir_if(_adapter *padapter)
|
|||
pnetdev = padapter->pnetdev;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
rtw_disassoc_cmd(padapter, 0, _FALSE);
|
||||
rtw_disassoc_cmd(padapter, 0, false);
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) {
|
||||
free_mlme_ap_info(padapter);
|
||||
#ifdef CONFIG_HOSTAPD_MLME
|
||||
hostapd_mode_unload(padapter);
|
||||
|
@ -2463,7 +2463,7 @@ void rtw_drv_stop_vir_if(_adapter *padapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (padapter->bup == _TRUE) {
|
||||
if (padapter->bup == true) {
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
if (padapter->xmitpriv.ack_tx)
|
||||
rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP);
|
||||
|
@ -2473,7 +2473,7 @@ void rtw_drv_stop_vir_if(_adapter *padapter)
|
|||
|
||||
rtw_stop_drv_threads(padapter);
|
||||
|
||||
padapter->bup = _FALSE;
|
||||
padapter->bup = false;
|
||||
}
|
||||
/* cancel timer after thread stop */
|
||||
rtw_cancel_all_timer(padapter);
|
||||
|
@ -2655,7 +2655,7 @@ void netdev_br_init(struct net_device *netdev)
|
|||
rcu_read_lock();
|
||||
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)) */
|
||||
|
||||
/* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) */
|
||||
/* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) */
|
||||
{
|
||||
/* struct net_bridge *br = netdev->br_port->br; */ /* ->dev->dev_addr; */
|
||||
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||
|
@ -2707,18 +2707,18 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
|
||||
RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup);
|
||||
|
||||
padapter->netif_up = _TRUE;
|
||||
padapter->netif_up = true;
|
||||
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
rtw_sdio_set_power(1);
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
if (pwrctrlpriv->ps_flag == _TRUE) {
|
||||
padapter->net_closed = _FALSE;
|
||||
if (pwrctrlpriv->ps_flag == true) {
|
||||
padapter->net_closed = false;
|
||||
goto netdev_open_normal_process;
|
||||
}
|
||||
|
||||
if (padapter->bup == _FALSE) {
|
||||
if (padapter->bup == false) {
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter));
|
||||
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
||||
|
@ -2762,8 +2762,8 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
|
||||
rtw_led_control(padapter, LED_CTL_NO_LINK);
|
||||
|
||||
padapter->bup = _TRUE;
|
||||
pwrctrlpriv->bips_processing = _FALSE;
|
||||
padapter->bup = true;
|
||||
pwrctrlpriv->bips_processing = false;
|
||||
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
|
@ -2771,7 +2771,7 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
#endif /* CONFIG_BT_COEXIST */
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
}
|
||||
padapter->net_closed = _FALSE;
|
||||
padapter->net_closed = false;
|
||||
|
||||
_set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000);
|
||||
|
||||
|
@ -2787,7 +2787,7 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
#endif /* CONFIG_BR_EXT */
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
if (is_primary_adapter(padapter) && (_TRUE == pHalData->EEPROMBluetoothCoexist)) {
|
||||
if (is_primary_adapter(padapter) && (true == pHalData->EEPROMBluetoothCoexist)) {
|
||||
rtw_btcoex_init_socket(padapter);
|
||||
padapter->coex_info.BtMgnt.ExtConfig.HCIExtensionVer = 0x04;
|
||||
rtw_btcoex_SetHciVersion(padapter, 0x04);
|
||||
|
@ -2803,7 +2803,7 @@ netdev_open_normal_process:
|
|||
_adapter *sec_adapter = adapter_to_dvobj(padapter)->padapters[IFACE_ID1];
|
||||
|
||||
#ifndef CONFIG_RTW_DYNAMIC_NDEV
|
||||
if (sec_adapter && (sec_adapter->bup == _FALSE))
|
||||
if (sec_adapter && (sec_adapter->bup == false))
|
||||
_netdev_vir_if_open(sec_adapter->pnetdev);
|
||||
#endif
|
||||
}
|
||||
|
@ -2815,7 +2815,7 @@ netdev_open_normal_process:
|
|||
|
||||
netdev_open_error:
|
||||
|
||||
padapter->bup = _FALSE;
|
||||
padapter->bup = false;
|
||||
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
if(padapter->napi_state == NAPI_ENABLE) {
|
||||
|
@ -2835,11 +2835,11 @@ netdev_open_error:
|
|||
|
||||
int netdev_open(struct net_device *pnetdev)
|
||||
{
|
||||
int ret = _FALSE;
|
||||
int ret = false;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
if (pwrctrlpriv->bInSuspend == _TRUE) {
|
||||
if (pwrctrlpriv->bInSuspend == true) {
|
||||
RTW_INFO(" [WARN] "ADPT_FMT" %s failed, bInSuspend=%d\n", ADPT_ARG(padapter), __func__, pwrctrlpriv->bInSuspend);
|
||||
return 0;
|
||||
}
|
||||
|
@ -2868,13 +2868,13 @@ static int ips_netdrv_open(_adapter *padapter)
|
|||
int status = _SUCCESS;
|
||||
/* struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); */
|
||||
|
||||
padapter->net_closed = _FALSE;
|
||||
padapter->net_closed = false;
|
||||
|
||||
RTW_INFO("===> %s.........\n", __func__);
|
||||
|
||||
|
||||
rtw_clr_drv_stopped(padapter);
|
||||
/* padapter->bup = _TRUE; */
|
||||
/* padapter->bup = true; */
|
||||
|
||||
status = rtw_hal_init(padapter);
|
||||
if (status == _FAIL) {
|
||||
|
@ -2890,7 +2890,7 @@ static int ips_netdrv_open(_adapter *padapter)
|
|||
return _SUCCESS;
|
||||
|
||||
netdev_open_error:
|
||||
/* padapter->bup = _FALSE; */
|
||||
/* padapter->bup = false; */
|
||||
RTW_INFO("-ips_netdrv_open - drv_open failure, bup=%d\n", padapter->bup);
|
||||
|
||||
return _FAIL;
|
||||
|
@ -2909,7 +2909,7 @@ int rtw_ips_pwr_up(_adapter *padapter)
|
|||
|
||||
#if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS)
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
if (psrtpriv->silent_reset_inprogress == _TRUE)
|
||||
if (psrtpriv->silent_reset_inprogress == true)
|
||||
#endif/* #ifdef DBG_CONFIG_ERROR_DETECT */
|
||||
#endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */
|
||||
rtw_reset_drv_sw(padapter);
|
||||
|
@ -2928,7 +2928,7 @@ void rtw_ips_pwr_down(_adapter *padapter)
|
|||
u32 start_time = rtw_get_current_time();
|
||||
RTW_INFO("===> rtw_ips_pwr_down...................\n");
|
||||
|
||||
padapter->net_closed = _TRUE;
|
||||
padapter->net_closed = true;
|
||||
|
||||
rtw_ips_dev_unload(padapter);
|
||||
RTW_INFO("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
|
||||
|
@ -2947,7 +2947,7 @@ void rtw_ips_dev_unload(_adapter *padapter)
|
|||
|
||||
#if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS)
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
if (psrtpriv->silent_reset_inprogress == _TRUE)
|
||||
if (psrtpriv->silent_reset_inprogress == true)
|
||||
#endif /* #ifdef DBG_CONFIG_ERROR_DETECT */
|
||||
#endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */
|
||||
{
|
||||
|
@ -2964,7 +2964,7 @@ int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
|
|||
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||
|
||||
if (_TRUE == bnormal) {
|
||||
if (true == bnormal) {
|
||||
_enter_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL);
|
||||
status = _netdev_open(pnetdev);
|
||||
_exit_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL);
|
||||
|
@ -2988,17 +2988,17 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
|
||||
RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup);
|
||||
#ifndef CONFIG_PLATFORM_INTEL_BYT
|
||||
if (pwrctl->bInternalAutoSuspend == _TRUE) {
|
||||
if (pwrctl->bInternalAutoSuspend == true) {
|
||||
/* rtw_pwr_wakeup(padapter); */
|
||||
if (pwrctl->rf_pwrstate == rf_off)
|
||||
pwrctl->ps_flag = _TRUE;
|
||||
pwrctl->ps_flag = true;
|
||||
}
|
||||
padapter->net_closed = _TRUE;
|
||||
padapter->netif_up = _FALSE;
|
||||
pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE;
|
||||
padapter->net_closed = true;
|
||||
padapter->netif_up = false;
|
||||
pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
|
||||
|
||||
/* if (!rtw_is_hw_init_completed(padapter)) {
|
||||
RTW_INFO("(1)871x_drv - drv_close, bup=%d, hw_init_completed=%s\n", padapter->bup, rtw_is_hw_init_completed(padapter)?"_TRUE":"_FALSE");
|
||||
RTW_INFO("(1)871x_drv - drv_close, bup=%d, hw_init_completed=%s\n", padapter->bup, rtw_is_hw_init_completed(padapter)?"true":"false");
|
||||
|
||||
rtw_set_drv_stopped(padapter);
|
||||
|
||||
|
@ -3006,7 +3006,7 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
}
|
||||
else*/
|
||||
if (pwrctl->rf_pwrstate == rf_on) {
|
||||
RTW_INFO("(2)871x_drv - drv_close, bup=%d, hw_init_completed=%s\n", padapter->bup, rtw_is_hw_init_completed(padapter) ? "_TRUE" : "_FALSE");
|
||||
RTW_INFO("(2)871x_drv - drv_close, bup=%d, hw_init_completed=%s\n", padapter->bup, rtw_is_hw_init_completed(padapter) ? "true" : "false");
|
||||
|
||||
/* s1. */
|
||||
if (pnetdev)
|
||||
|
@ -3015,13 +3015,13 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
#ifndef CONFIG_ANDROID
|
||||
/* s2. */
|
||||
LeaveAllPowerSaveMode(padapter);
|
||||
rtw_disassoc_cmd(padapter, 500, _FALSE);
|
||||
rtw_disassoc_cmd(padapter, 500, false);
|
||||
/* s2-2. indicate disconnect to os */
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
/* s2-3. */
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
/* s2-4. */
|
||||
rtw_free_network_queue(padapter, _TRUE);
|
||||
rtw_free_network_queue(padapter, true);
|
||||
#endif
|
||||
/* Close LED */
|
||||
rtw_led_control(padapter, LED_CTL_POWER_OFF);
|
||||
|
@ -3043,7 +3043,7 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_scan_abort(padapter);
|
||||
rtw_cfg80211_wait_scan_req_empty(padapter, 200);
|
||||
adapter_wdev_data(padapter)->bandroid_scan = _FALSE;
|
||||
adapter_wdev_data(padapter)->bandroid_scan = false;
|
||||
/* padapter->rtw_wdev->iftype = NL80211_IFTYPE_MONITOR; */ /* set this at the end */
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
|
@ -3051,14 +3051,14 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
rtw_wapi_disable_tx(padapter);
|
||||
#endif
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
if (is_primary_adapter(padapter) && (_TRUE == pHalData->EEPROMBluetoothCoexist))
|
||||
if (is_primary_adapter(padapter) && (true == pHalData->EEPROMBluetoothCoexist))
|
||||
rtw_btcoex_close_socket(padapter);
|
||||
else
|
||||
RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n");
|
||||
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
#else /* !CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
if (pwrctl->bInSuspend == _TRUE) {
|
||||
if (pwrctl->bInSuspend == true) {
|
||||
RTW_INFO("+871x_drv - drv_close, bInSuspend=%d\n", pwrctl->bInSuspend);
|
||||
return 0;
|
||||
}
|
||||
|
@ -3069,7 +3069,7 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
#endif
|
||||
|
||||
RTW_INFO("netdev_close, bips_processing=%d\n", pwrctl->bips_processing);
|
||||
while (pwrctl->bips_processing == _TRUE) /* waiting for ips_processing done before call rtw_dev_unload() */
|
||||
while (pwrctl->bips_processing == true) /* waiting for ips_processing done before call rtw_dev_unload() */
|
||||
rtw_msleep_os(1);
|
||||
|
||||
rtw_dev_unload(padapter);
|
||||
|
@ -3403,7 +3403,7 @@ void rtw_dev_unload(_adapter *padapter)
|
|||
u8 cnt = 0;
|
||||
|
||||
|
||||
if (padapter->bup == _TRUE) {
|
||||
if (padapter->bup == true) {
|
||||
RTW_INFO("==> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
|
||||
|
||||
rtw_set_drv_stopped(padapter);
|
||||
|
@ -3418,7 +3418,7 @@ void rtw_dev_unload(_adapter *padapter)
|
|||
if (!pwrctl->bInternalAutoSuspend)
|
||||
rtw_stop_drv_threads(padapter);
|
||||
|
||||
while (ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == _TRUE) {
|
||||
while (ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == true) {
|
||||
if (cnt > 5) {
|
||||
RTW_INFO("stop cmdthd timeout\n");
|
||||
break;
|
||||
|
@ -3431,7 +3431,7 @@ void rtw_dev_unload(_adapter *padapter)
|
|||
|
||||
|
||||
/* check the status of IPS */
|
||||
if (rtw_hal_check_ips_status(padapter) == _TRUE || pwrctl->rf_pwrstate == rf_off) { /* check HW status and SW state */
|
||||
if (rtw_hal_check_ips_status(padapter) == true || pwrctl->rf_pwrstate == rf_off) { /* check HW status and SW state */
|
||||
RTW_INFO("%s: driver in IPS-FWLPS\n", __func__);
|
||||
pdbgpriv->dbg_dev_unload_inIPS_cnt++;
|
||||
} else
|
||||
|
@ -3442,9 +3442,9 @@ void rtw_dev_unload(_adapter *padapter)
|
|||
rtw_btcoex_IpsNotify(padapter, pwrctl->ips_mode_req);
|
||||
#endif
|
||||
#ifdef CONFIG_WOWLAN
|
||||
if (pwrctl->bSupportRemoteWakeup == _TRUE &&
|
||||
pwrctl->wowlan_mode == _TRUE)
|
||||
RTW_INFO("%s bSupportRemoteWakeup==_TRUE do not run rtw_hal_deinit()\n", __func__);
|
||||
if (pwrctl->bSupportRemoteWakeup == true &&
|
||||
pwrctl->wowlan_mode == true)
|
||||
RTW_INFO("%s bSupportRemoteWakeup==true do not run rtw_hal_deinit()\n", __func__);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
@ -3454,11 +3454,11 @@ void rtw_dev_unload(_adapter *padapter)
|
|||
rtw_set_surprise_removed(padapter);
|
||||
}
|
||||
|
||||
padapter->bup = _FALSE;
|
||||
padapter->bup = false;
|
||||
|
||||
RTW_INFO("<== "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
|
||||
} else {
|
||||
RTW_INFO("%s: bup==_FALSE\n", __func__);
|
||||
RTW_INFO("%s: bup==false\n", __func__);
|
||||
}
|
||||
rtw_cancel_all_timer(padapter);
|
||||
}
|
||||
|
@ -3494,13 +3494,13 @@ int rtw_suspend_free_assoc_resource(_adapter *padapter)
|
|||
}
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && check_fwstate(pmlmepriv, _FW_LINKED)) {
|
||||
rtw_disassoc_cmd(padapter, 0, _FALSE);
|
||||
rtw_disassoc_cmd(padapter, 0, false);
|
||||
/* s2-2. indicate disconnect to os */
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
}
|
||||
#ifdef CONFIG_AP_MODE
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
|
||||
rtw_sta_flush(padapter, _TRUE);
|
||||
rtw_sta_flush(padapter, true);
|
||||
#endif
|
||||
|
||||
/* s2-3. */
|
||||
|
@ -3510,7 +3510,7 @@ int rtw_suspend_free_assoc_resource(_adapter *padapter)
|
|||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (is_primary_adapter(padapter) && (!adapter_to_pwrctl(padapter)->bInternalAutoSuspend))
|
||||
#endif
|
||||
rtw_free_network_queue(padapter, _TRUE);
|
||||
rtw_free_network_queue(padapter, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
|
||||
RTW_INFO("%s: fw_under_survey\n", __func__);
|
||||
|
@ -3518,9 +3518,9 @@ int rtw_suspend_free_assoc_resource(_adapter *padapter)
|
|||
clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
|
||||
}
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
|
||||
RTW_INFO("%s: fw_under_linking\n", __func__);
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
}
|
||||
|
||||
RTW_INFO("<== "FUNC_ADPT_FMT" exit....\n", FUNC_ADPT_ARG(padapter));
|
||||
|
@ -3552,14 +3552,14 @@ int rtw_suspend_wow(_adapter *padapter)
|
|||
RTW_INFO("wowlan_p2p_enable: %d\n", pwrpriv->wowlan_p2p_enable);
|
||||
#endif
|
||||
|
||||
if (pwrpriv->wowlan_mode == _TRUE) {
|
||||
if (pwrpriv->wowlan_mode == true) {
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND_KEEP_ANT);
|
||||
#endif
|
||||
|
||||
if (pnetdev)
|
||||
rtw_netif_stop_queue(pnetdev);
|
||||
rtw_mi_buddy_netif_stop_queue(padapter, _TRUE);
|
||||
rtw_mi_buddy_netif_stop_queue(padapter, true);
|
||||
|
||||
/* 0. Power off LED */
|
||||
rtw_led_control(padapter, LED_CTL_POWER_OFF);
|
||||
|
@ -3567,7 +3567,7 @@ int rtw_suspend_wow(_adapter *padapter)
|
|||
rtw_set_drv_stopped(padapter); /*for stop thread*/
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
iface = dvobj->padapters[i];
|
||||
if ((iface) && (iface->bup == _TRUE))
|
||||
if ((iface) && (iface->bup == true))
|
||||
rtw_stop_drv_threads(iface);
|
||||
}
|
||||
rtw_clr_drv_stopped(padapter); /*for 32k command*/
|
||||
|
@ -3607,7 +3607,7 @@ int rtw_suspend_wow(_adapter *padapter)
|
|||
|
||||
RTW_INFO("%s: wowmode suspending\n", __func__);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
RTW_INFO("%s: fw_under_survey\n", __func__);
|
||||
rtw_indicate_scan_done(padapter, 1);
|
||||
clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
|
||||
|
@ -3630,7 +3630,7 @@ int rtw_suspend_wow(_adapter *padapter)
|
|||
RTW_INFO("%s: pno: %d\n", __func__,
|
||||
pwrpriv->wowlan_pno_enable);
|
||||
#ifdef CONFIG_FWLPS_IN_IPS
|
||||
rtw_set_fw_in_ips_mode(padapter, _TRUE);
|
||||
rtw_set_fw_in_ips_mode(padapter, true);
|
||||
#endif
|
||||
}
|
||||
#ifdef CONFIG_LPS
|
||||
|
@ -3662,7 +3662,7 @@ int rtw_suspend_ap_wow(_adapter *padapter)
|
|||
|
||||
RTW_INFO("==> "FUNC_ADPT_FMT" entry....\n", FUNC_ADPT_ARG(padapter));
|
||||
|
||||
pwrpriv->wowlan_ap_mode = _TRUE;
|
||||
pwrpriv->wowlan_ap_mode = true;
|
||||
|
||||
RTW_INFO("wowlan_ap_mode: %d\n", pwrpriv->wowlan_ap_mode);
|
||||
|
||||
|
@ -3670,7 +3670,7 @@ int rtw_suspend_ap_wow(_adapter *padapter)
|
|||
rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND_KEEP_ANT);
|
||||
#endif
|
||||
|
||||
rtw_mi_netif_stop_queue(padapter, _FALSE);
|
||||
rtw_mi_netif_stop_queue(padapter, false);
|
||||
|
||||
/* 0. Power off LED */
|
||||
rtw_led_control(padapter, LED_CTL_POWER_OFF);
|
||||
|
@ -3678,7 +3678,7 @@ int rtw_suspend_ap_wow(_adapter *padapter)
|
|||
rtw_set_drv_stopped(padapter); /*for stop thread*/
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
iface = dvobj->padapters[i];
|
||||
if ((iface) && (iface->bup == _TRUE))
|
||||
if ((iface) && (iface->bup == true))
|
||||
rtw_stop_drv_threads(iface);
|
||||
}
|
||||
rtw_clr_drv_stopped(padapter); /*for 32k command*/
|
||||
|
@ -3743,13 +3743,13 @@ static int rtw_suspend_normal(_adapter *padapter)
|
|||
rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND);
|
||||
#endif
|
||||
|
||||
rtw_mi_netif_stop_queue(padapter, _TRUE);
|
||||
rtw_mi_netif_stop_queue(padapter, true);
|
||||
|
||||
rtw_mi_suspend_free_assoc_resource(padapter);
|
||||
|
||||
rtw_led_control(padapter, LED_CTL_POWER_OFF);
|
||||
|
||||
if ((rtw_hal_check_ips_status(padapter) == _TRUE)
|
||||
if ((rtw_hal_check_ips_status(padapter) == true)
|
||||
|| (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_off))
|
||||
RTW_INFO("%s: ### ERROR #### driver in IPS ####ERROR###!!!\n", __func__);
|
||||
|
||||
|
@ -3787,14 +3787,14 @@ int rtw_suspend_common(_adapter *padapter)
|
|||
|
||||
pdbgpriv->dbg_suspend_cnt++;
|
||||
|
||||
pwrpriv->bInSuspend = _TRUE;
|
||||
pwrpriv->bInSuspend = true;
|
||||
|
||||
while (pwrpriv->bips_processing == _TRUE)
|
||||
while (pwrpriv->bips_processing == true)
|
||||
rtw_msleep_os(1);
|
||||
|
||||
#ifdef CONFIG_IOL_READ_EFUSE_MAP
|
||||
if (!padapter->bup) {
|
||||
u8 bMacPwrCtrlOn = _FALSE;
|
||||
u8 bMacPwrCtrlOn = false;
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
|
||||
if (bMacPwrCtrlOn)
|
||||
rtw_hal_power_off(padapter);
|
||||
|
@ -3817,21 +3817,21 @@ int rtw_suspend_common(_adapter *padapter)
|
|||
|
||||
rtw_ps_deny_cancel(padapter, PS_DENY_SUSPEND);
|
||||
|
||||
if (rtw_mi_check_status(padapter, MI_AP_MODE) == _FALSE) {
|
||||
if (rtw_mi_check_status(padapter, MI_AP_MODE) == false) {
|
||||
#ifdef CONFIG_WOWLAN
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
pwrpriv->wowlan_mode = _TRUE;
|
||||
else if (pwrpriv->wowlan_pno_enable == _TRUE)
|
||||
pwrpriv->wowlan_mode = true;
|
||||
else if (pwrpriv->wowlan_pno_enable == true)
|
||||
pwrpriv->wowlan_mode |= pwrpriv->wowlan_pno_enable;
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE) || P2P_ROLE_DISABLE != padapter->wdinfo.role)
|
||||
pwrpriv->wowlan_p2p_mode = _TRUE;
|
||||
if (_TRUE == pwrpriv->wowlan_p2p_mode)
|
||||
pwrpriv->wowlan_p2p_mode = true;
|
||||
if (true == pwrpriv->wowlan_p2p_mode)
|
||||
pwrpriv->wowlan_mode |= pwrpriv->wowlan_p2p_mode;
|
||||
#endif /* CONFIG_P2P_WOWLAN */
|
||||
|
||||
if (pwrpriv->wowlan_mode == _TRUE)
|
||||
if (pwrpriv->wowlan_mode == true)
|
||||
rtw_suspend_wow(padapter);
|
||||
else
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
|
@ -3888,20 +3888,20 @@ int rtw_resume_process_wow(_adapter *padapter)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
pwrpriv->wowlan_in_resume = _TRUE;
|
||||
pwrpriv->wowlan_in_resume = true;
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
#ifdef CONFIG_FWLPS_IN_IPS
|
||||
if (pwrpriv->wowlan_pno_enable)
|
||||
rtw_set_fw_in_ips_mode(padapter, _FALSE);
|
||||
rtw_set_fw_in_ips_mode(padapter, false);
|
||||
#endif /* CONFIG_FWLPS_IN_IPS */
|
||||
#endif/* CONFIG_PNO_SUPPORT */
|
||||
|
||||
if (pwrpriv->wowlan_mode == _TRUE) {
|
||||
if (pwrpriv->wowlan_mode == true) {
|
||||
#ifdef CONFIG_LPS
|
||||
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "WOWLAN");
|
||||
#endif /* CONFIG_LPS */
|
||||
|
||||
pwrpriv->bFwCurrentInPSMode = _FALSE;
|
||||
pwrpriv->bFwCurrentInPSMode = false;
|
||||
|
||||
#if !(CONFIG_RTW_SDIO_KEEP_IRQ)
|
||||
/* if (sdio_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS) { */
|
||||
|
@ -3954,7 +3954,7 @@ int rtw_resume_process_wow(_adapter *padapter)
|
|||
|
||||
RTW_INFO("%s: disconnect reason: %02x\n", __func__,
|
||||
pwrpriv->wowlan_wake_reason);
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
|
||||
rtw_sta_media_status_rpt(padapter,
|
||||
rtw_get_stainfo(&padapter->stapriv,
|
||||
|
@ -3990,8 +3990,8 @@ int rtw_resume_process_wow(_adapter *padapter)
|
|||
rtw_lock_ext_suspend_timeout(10000);
|
||||
}
|
||||
|
||||
if (pwrpriv->wowlan_mode == _TRUE) {
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
if (pwrpriv->wowlan_mode == true) {
|
||||
pwrpriv->bips_processing = false;
|
||||
_set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000);
|
||||
#ifndef CONFIG_IPS_CHECK_IN_WD
|
||||
rtw_set_pwr_state_check_timer(pwrpriv);
|
||||
|
@ -3999,7 +3999,7 @@ int rtw_resume_process_wow(_adapter *padapter)
|
|||
} else
|
||||
RTW_INFO("do not reset timer\n");
|
||||
|
||||
pwrpriv->wowlan_mode = _FALSE;
|
||||
pwrpriv->wowlan_mode = false;
|
||||
|
||||
/* Power On LED */
|
||||
#ifdef CONFIG_SW_LED
|
||||
|
@ -4054,7 +4054,7 @@ int rtw_resume_process_ap_wow(_adapter *padapter)
|
|||
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "AP-WOWLAN");
|
||||
#endif /* CONFIG_LPS */
|
||||
|
||||
pwrpriv->bFwCurrentInPSMode = _FALSE;
|
||||
pwrpriv->bFwCurrentInPSMode = false;
|
||||
|
||||
rtw_hal_disable_interrupt(padapter);
|
||||
|
||||
|
@ -4069,7 +4069,7 @@ int rtw_resume_process_ap_wow(_adapter *padapter)
|
|||
/* Disable WOW, set H2C command */
|
||||
poidparam.subcode = WOWLAN_AP_DISABLE;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_WOWLAN, (u8 *)&poidparam);
|
||||
pwrpriv->wowlan_ap_mode = _FALSE;
|
||||
pwrpriv->wowlan_ap_mode = false;
|
||||
|
||||
rtw_clr_drv_stopped(padapter);
|
||||
RTW_INFO("%s: wowmode resuming, DriverStopped:%s\n", __func__, rtw_is_drv_stopped(padapter) ? "True" : "False");
|
||||
|
@ -4114,7 +4114,7 @@ int rtw_resume_process_ap_wow(_adapter *padapter)
|
|||
if (pwrpriv->wowlan_wake_reason == AP_OFFLOAD_WAKEUP)
|
||||
rtw_lock_ext_suspend_timeout(8000);
|
||||
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
pwrpriv->bips_processing = false;
|
||||
_set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000);
|
||||
#ifndef CONFIG_IPS_CHECK_IN_WD
|
||||
rtw_set_pwr_state_check_timer(pwrpriv);
|
||||
|
@ -4202,10 +4202,10 @@ static int rtw_resume_process_normal(_adapter *padapter)
|
|||
|
||||
rtw_mi_reset_drv_sw(padapter);
|
||||
|
||||
pwrpriv->bkeepfwalive = _FALSE;
|
||||
pwrpriv->bkeepfwalive = false;
|
||||
|
||||
RTW_INFO("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive);
|
||||
if (pm_netdev_open(pnetdev, _TRUE) != 0) {
|
||||
if (pm_netdev_open(pnetdev, true) != 0) {
|
||||
ret = -1;
|
||||
pdbgpriv->dbg_resume_error_cnt++;
|
||||
goto exit;
|
||||
|
@ -4241,15 +4241,15 @@ int rtw_resume_common(_adapter *padapter)
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
|
||||
if (pwrpriv->bInSuspend == _FALSE)
|
||||
if (pwrpriv->bInSuspend == false)
|
||||
return 0;
|
||||
|
||||
RTW_INFO("resume start\n");
|
||||
RTW_INFO("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
|
||||
|
||||
if (rtw_mi_check_status(padapter, WIFI_AP_STATE) == _FALSE) {
|
||||
if (rtw_mi_check_status(padapter, WIFI_AP_STATE) == false) {
|
||||
#ifdef CONFIG_WOWLAN
|
||||
if (pwrpriv->wowlan_mode == _TRUE)
|
||||
if (pwrpriv->wowlan_mode == true)
|
||||
rtw_resume_process_wow(padapter);
|
||||
else
|
||||
#endif
|
||||
|
@ -4264,9 +4264,9 @@ int rtw_resume_common(_adapter *padapter)
|
|||
}
|
||||
|
||||
if (pwrpriv) {
|
||||
pwrpriv->bInSuspend = _FALSE;
|
||||
pwrpriv->bInSuspend = false;
|
||||
#ifdef CONFIG_WOWLAN
|
||||
pwrpriv->wowlan_in_resume = _FALSE;
|
||||
pwrpriv->wowlan_in_resume = false;
|
||||
#endif
|
||||
}
|
||||
RTW_INFO("%s:%d in %d ms\n", __func__ , ret,
|
||||
|
|
|
@ -379,10 +379,10 @@ bool match_mstat_sniff_rules(const enum mstat_f flags, const size_t size)
|
|||
if (mstat_sniff_rules[i].flags == flags
|
||||
&& mstat_sniff_rules[i].lb <= size
|
||||
&& mstat_sniff_rules[i].hb >= size)
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline u8 *dbg_rtw_vmalloc(u32 sz, const enum mstat_f flags, const char *func, const int line)
|
||||
|
@ -707,9 +707,9 @@ int _rtw_memcmp(const void *dst, const void *src, u32 sz)
|
|||
{
|
||||
/* under Linux/GNU/GLibc, the return value of memcmp for two same mem. chunk is 0 */
|
||||
if (!(memcmp(dst, src, sz)))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void _rtw_init_listhead(_list *list)
|
||||
|
@ -726,9 +726,9 @@ Otherwise, there will be racing condition.
|
|||
u32 rtw_is_list_empty(_list *phead)
|
||||
{
|
||||
if (list_empty(phead))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtw_list_insert_head(_list *plist, _list *phead)
|
||||
|
@ -826,9 +826,9 @@ u32 _rtw_queue_empty(_queue *pqueue)
|
|||
u32 rtw_end_of_queue_search(_list *head, _list *plist)
|
||||
{
|
||||
if (head == plist)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1345,28 +1345,28 @@ static int storeToFile(const char *path, u8 *buf, u32 sz)
|
|||
/*
|
||||
* Test if the specifi @param path is a file and readable
|
||||
* @param path the path of the file to test
|
||||
* @return _TRUE or _FALSE
|
||||
* @return true or false
|
||||
*/
|
||||
int rtw_is_file_readable(const char *path)
|
||||
{
|
||||
if (isFileReadable(path, NULL) == 0)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test if the specifi @param path is a file and readable.
|
||||
* If readable, @param sz is got
|
||||
* @param path the path of the file to test
|
||||
* @return _TRUE or _FALSE
|
||||
* @return true or false
|
||||
*/
|
||||
int rtw_is_file_readable_with_size(const char *path, u32 *sz)
|
||||
{
|
||||
if (isFileReadable(path, sz) == 0)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1608,22 +1608,22 @@ keep_ori:
|
|||
* rtw_cbuf_full - test if cbuf is full
|
||||
* @cbuf: pointer of struct rtw_cbuf
|
||||
*
|
||||
* Returns: _TRUE if cbuf is full
|
||||
* Returns: true if cbuf is full
|
||||
*/
|
||||
inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf)
|
||||
{
|
||||
return (cbuf->write == cbuf->read - 1) ? _TRUE : _FALSE;
|
||||
return (cbuf->write == cbuf->read - 1) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* rtw_cbuf_empty - test if cbuf is empty
|
||||
* @cbuf: pointer of struct rtw_cbuf
|
||||
*
|
||||
* Returns: _TRUE if cbuf is empty
|
||||
* Returns: true if cbuf is empty
|
||||
*/
|
||||
inline bool rtw_cbuf_empty(struct rtw_cbuf *cbuf)
|
||||
{
|
||||
return (cbuf->write == cbuf->read) ? _TRUE : _FALSE;
|
||||
return (cbuf->write == cbuf->read) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1632,7 +1632,7 @@ inline bool rtw_cbuf_empty(struct rtw_cbuf *cbuf)
|
|||
* @buf: pointer to push in
|
||||
*
|
||||
* Lock free operation, be careful of the use scheme
|
||||
* Returns: _TRUE push success
|
||||
* Returns: true push success
|
||||
*/
|
||||
bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf)
|
||||
{
|
||||
|
@ -1789,74 +1789,74 @@ exit:
|
|||
/**
|
||||
* is_null -
|
||||
*
|
||||
* Return TRUE if c is null character
|
||||
* FALSE otherwise.
|
||||
* Return true if c is null character
|
||||
* false otherwise.
|
||||
*/
|
||||
inline bool is_null(char c)
|
||||
{
|
||||
if (c == '\0')
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* is_eol -
|
||||
*
|
||||
* Return TRUE if c is represent for EOL (end of line)
|
||||
* FALSE otherwise.
|
||||
* Return true if c is represent for EOL (end of line)
|
||||
* false otherwise.
|
||||
*/
|
||||
inline bool is_eol(char c)
|
||||
{
|
||||
if (c == '\r' || c == '\n')
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* is_space -
|
||||
*
|
||||
* Return TRUE if c is represent for space
|
||||
* FALSE otherwise.
|
||||
* Return true if c is represent for space
|
||||
* false otherwise.
|
||||
*/
|
||||
inline bool is_space(char c)
|
||||
{
|
||||
if (c == ' ' || c == '\t')
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* IsHexDigit -
|
||||
*
|
||||
* Return TRUE if chTmp is represent for hex digit
|
||||
* FALSE otherwise.
|
||||
* Return true if chTmp is represent for hex digit
|
||||
* false otherwise.
|
||||
*/
|
||||
inline bool IsHexDigit(char chTmp)
|
||||
{
|
||||
if ((chTmp >= '0' && chTmp <= '9') ||
|
||||
(chTmp >= 'a' && chTmp <= 'f') ||
|
||||
(chTmp >= 'A' && chTmp <= 'F'))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* is_alpha -
|
||||
*
|
||||
* Return TRUE if chTmp is represent for alphabet
|
||||
* FALSE otherwise.
|
||||
* Return true if chTmp is represent for alphabet
|
||||
* false otherwise.
|
||||
*/
|
||||
inline bool is_alpha(char chTmp)
|
||||
{
|
||||
if ((chTmp >= 'a' && chTmp <= 'z') ||
|
||||
(chTmp >= 'A' && chTmp <= 'Z'))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline char alpha_to_upper(char c)
|
||||
|
|
|
@ -201,7 +201,7 @@ int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
struct usb_device *pusbd = pdvobjpriv->pusbdev;
|
||||
|
||||
precvbuf->irp_pending = _FALSE;
|
||||
precvbuf->irp_pending = false;
|
||||
precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (precvbuf->purb == NULL)
|
||||
res = _FAIL;
|
||||
|
@ -324,21 +324,21 @@ static int napi_recv(_adapter *padapter, int budget)
|
|||
if (!pskb)
|
||||
break;
|
||||
|
||||
rx_ok = _FALSE;
|
||||
rx_ok = false;
|
||||
|
||||
#ifdef CONFIG_RTW_GRO
|
||||
if (pregistrypriv->en_gro) {
|
||||
if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
|
||||
rx_ok = _TRUE;
|
||||
rx_ok = true;
|
||||
goto next;
|
||||
}
|
||||
#endif /* CONFIG_RTW_GRO */
|
||||
|
||||
if (rtw_netif_receive_skb(padapter->pnetdev, pskb) == NET_RX_SUCCESS)
|
||||
rx_ok = _TRUE;
|
||||
rx_ok = true;
|
||||
|
||||
next:
|
||||
if (rx_ok == _TRUE) {
|
||||
if (rx_ok == true) {
|
||||
work_done++;
|
||||
DBG_COUNTER(padapter->rx_logs.os_netif_ok);
|
||||
} else {
|
||||
|
@ -383,7 +383,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri
|
|||
|
||||
/* Indicat the packets to upper layer */
|
||||
if (pkt) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||
_pkt *pskb2 = NULL;
|
||||
struct sta_info *psta = NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
@ -391,7 +391,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri
|
|||
|
||||
/* RTW_INFO("bmcast=%d\n", bmcast); */
|
||||
|
||||
if (_rtw_memcmp(pattrib->dst, adapter_mac_addr(padapter), ETH_ALEN) == _FALSE) {
|
||||
if (_rtw_memcmp(pattrib->dst, adapter_mac_addr(padapter), ETH_ALEN) == false) {
|
||||
/* RTW_INFO("not ap psta=%p, addr=%pM\n", psta, pattrib->dst); */
|
||||
|
||||
if (bmcast) {
|
||||
|
@ -438,7 +438,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri
|
|||
#endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */
|
||||
|
||||
|
||||
if (br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) == _TRUE)) {
|
||||
if (br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) == true)) {
|
||||
if (nat25_handle_frame(padapter, pkt) == -1) {
|
||||
/* priv->ext_stats.rx_data_drops++; */
|
||||
/* DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n"); */
|
||||
|
@ -512,7 +512,7 @@ void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, u8 bgroup
|
|||
cur_time = rtw_get_current_time();
|
||||
|
||||
if (cur_time - psecuritypriv->last_mic_err_time < 60 * HZ) {
|
||||
psecuritypriv->btkip_countermeasure = _TRUE;
|
||||
psecuritypriv->btkip_countermeasure = true;
|
||||
psecuritypriv->last_mic_err_time = 0;
|
||||
psecuritypriv->btkip_countermeasure_time = cur_time;
|
||||
} else
|
||||
|
@ -734,11 +734,11 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame)
|
|||
u8 *ip = pkt->data + 14;
|
||||
|
||||
if (GET_IPV4_PROTOCOL(ip) == 0x06 /* TCP */
|
||||
&& rtw_st_ctl_chk_reg_s_proto(&sta->st_ctl, 0x06) == _TRUE
|
||||
&& rtw_st_ctl_chk_reg_s_proto(&sta->st_ctl, 0x06) == true
|
||||
) {
|
||||
u8 *tcp = ip + GET_IPV4_IHL(ip) * 4;
|
||||
|
||||
if (rtw_st_ctl_chk_reg_rule(&sta->st_ctl, padapter, IPV4_DST(ip), TCP_DST(tcp), IPV4_SRC(ip), TCP_SRC(tcp)) == _TRUE) {
|
||||
if (rtw_st_ctl_chk_reg_rule(&sta->st_ctl, padapter, IPV4_DST(ip), TCP_DST(tcp), IPV4_SRC(ip), TCP_SRC(tcp)) == true) {
|
||||
if (GET_TCP_SYN(tcp) && GET_TCP_ACK(tcp)) {
|
||||
session_tracker_add_cmd(padapter, sta
|
||||
, IPV4_DST(ip), TCP_DST(tcp)
|
||||
|
@ -802,7 +802,7 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
|
||||
precvbuf->pskb = NULL;
|
||||
|
||||
if (precvbuf->irp_pending == _FALSE)
|
||||
if (precvbuf->irp_pending == false)
|
||||
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
||||
}
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
|
|
|
@ -167,7 +167,7 @@ typedef struct compat_android_wifi_priv_cmd {
|
|||
* time (only) in dhd_open, subsequential wifi on will be handled by
|
||||
* wl_android_wifi_on
|
||||
*/
|
||||
static int g_wifi_on = _TRUE;
|
||||
static int g_wifi_on = true;
|
||||
|
||||
static unsigned int oob_irq = 0;
|
||||
static unsigned int oob_gpio = 0;
|
||||
|
@ -370,7 +370,7 @@ static int rtw_android_get_rssi(struct net_device *net, char *command, int total
|
|||
struct wlan_network *pcur_network = &pmlmepriv->cur_network;
|
||||
int bytes_written = 0;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
bytes_written += snprintf(&command[bytes_written], total_len, "%s rssi %d",
|
||||
pcur_network->network.Ssid.Ssid, padapter->recvpriv.rssi);
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ static int rtw_android_set_block_scan(struct net_device *net, char *command, int
|
|||
char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK_SCAN]) + 1;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
adapter_wdev_data(adapter)->block_scan = (*block_value == '0') ? _FALSE : _TRUE;
|
||||
adapter_wdev_data(adapter)->block_scan = (*block_value == '0') ? false : true;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -441,7 +441,7 @@ static int rtw_android_set_block(struct net_device *net, char *command, int tota
|
|||
char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK]) + 1;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
adapter_wdev_data(adapter)->block = (*block_value == '0') ? _FALSE : _TRUE;
|
||||
adapter_wdev_data(adapter)->block = (*block_value == '0') ? false : true;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -555,7 +555,7 @@ int rtw_gtk_offload(struct net_device *net, u8 *cmd_ptr)
|
|||
printk(" %02x ", psta->kck[i]);
|
||||
*/
|
||||
_rtw_memcpy(psta->replay_ctr, cmd_ptr, RTW_REPLAY_CTR_LEN);
|
||||
psecuritypriv->binstallKCK_KEK = _TRUE;
|
||||
psecuritypriv->binstallKCK_KEK = true;
|
||||
|
||||
/* printk("\nREPLAY_CTR: "); */
|
||||
/* for(i=0;i<RTW_REPLAY_CTR_LEN; i++) */
|
||||
|
@ -677,7 +677,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||
/* rtw_set_scan_mode((_adapter *)rtw_netdev_priv(net), SCAN_ACTIVE); */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
adapter_wdev_data((_adapter *)rtw_netdev_priv(net))->bandroid_scan = _TRUE;
|
||||
adapter_wdev_data((_adapter *)rtw_netdev_priv(net))->bandroid_scan = true;
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
#endif /* CONFIG_PLATFORM_MSTAR */
|
||||
break;
|
||||
|
@ -712,11 +712,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||
break;
|
||||
case ANDROID_WIFI_CMD_RXFILTER_ADD:
|
||||
/* int filter_num = *(command + strlen(CMD_RXFILTER_ADD) + 1) - '0'; */
|
||||
/* bytes_written = net_os_rxfilter_add_remove(net, TRUE, filter_num); */
|
||||
/* bytes_written = net_os_rxfilter_add_remove(net, true, filter_num); */
|
||||
break;
|
||||
case ANDROID_WIFI_CMD_RXFILTER_REMOVE:
|
||||
/* int filter_num = *(command + strlen(CMD_RXFILTER_REMOVE) + 1) - '0'; */
|
||||
/* bytes_written = net_os_rxfilter_add_remove(net, FALSE, filter_num); */
|
||||
/* bytes_written = net_os_rxfilter_add_remove(net, false, filter_num); */
|
||||
break;
|
||||
|
||||
case ANDROID_WIFI_CMD_BTCOEXSCAN_START:
|
||||
|
|
|
@ -612,7 +612,7 @@ static int wl_cfgvendor_enable_full_scan_result(struct wiphy *wiphy,
|
|||
int err = 0;
|
||||
struct bcm_cfg80211 *cfg = wiphy_priv(wiphy);
|
||||
int type;
|
||||
bool real_time = FALSE;
|
||||
bool real_time = false;
|
||||
|
||||
type = nla_type(data);
|
||||
|
||||
|
|
|
@ -596,7 +596,7 @@ static int proc_get_rx_info_msg(struct seq_file *m, void *v)
|
|||
struct net_device *dev = m->private;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_RX_Dframe_INFO, m, _FALSE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_RX_Dframe_INFO, m, false);
|
||||
return 0;
|
||||
}
|
||||
static int proc_get_tx_info_msg(struct seq_file *m, void *v)
|
||||
|
@ -630,15 +630,15 @@ static int proc_get_tx_info_msg(struct seq_file *m, void *v)
|
|||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE)
|
||||
&& (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE)
|
||||
&& (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), 6) != _TRUE)) {
|
||||
if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != true)
|
||||
&& (_rtw_memcmp(psta->hwaddr, null_addr, 6) != true)
|
||||
&& (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), 6) != true)) {
|
||||
|
||||
switch (psta->bw_mode) {
|
||||
|
||||
|
@ -889,7 +889,7 @@ static ssize_t proc_set_macaddr_acl(struct file *file, const char __user *buffer
|
|||
if (sscanf(c, MAC_SFMT, MAC_SARG(addr)) != 6)
|
||||
break;
|
||||
|
||||
if (rtw_check_invalid_mac_address(addr, 0) == _FALSE)
|
||||
if (rtw_check_invalid_mac_address(addr, 0) == false)
|
||||
rtw_acl_add_sta(adapter, addr);
|
||||
|
||||
c = strsep(&next, " \t");
|
||||
|
@ -974,7 +974,7 @@ ssize_t proc_set_pre_link_sta(struct file *file, const char __user *buffer, size
|
|||
if (sscanf(c, MAC_SFMT, MAC_SARG(addr)) != 6)
|
||||
break;
|
||||
|
||||
if (rtw_check_invalid_mac_address(addr, 0) == _FALSE) {
|
||||
if (rtw_check_invalid_mac_address(addr, 0) == false) {
|
||||
if (cmd_id == PRE_LINK_STA_CMD_ADD)
|
||||
rtw_pre_link_sta_add(&adapter->stapriv, addr);
|
||||
else
|
||||
|
@ -1276,7 +1276,7 @@ static ssize_t proc_set_sec_cam(struct file *file, const char __user *buffer, si
|
|||
|
||||
if (strcmp("c", cmd) == 0) {
|
||||
_clear_cam_entry(adapter, id_1);
|
||||
adapter->securitypriv.hw_decrypted = _FALSE; /* temporarily set this for TX path to use SW enc */
|
||||
adapter->securitypriv.hw_decrypted = false; /* temporarily set this for TX path to use SW enc */
|
||||
} else if (strcmp("wfc", cmd) == 0)
|
||||
write_cam_from_cache(adapter, id_1);
|
||||
else if (strcmp("sw", cmd) == 0)
|
||||
|
@ -1368,7 +1368,7 @@ static ssize_t proc_set_tx_bw_mode(struct file *file, const char __user *buffer,
|
|||
|
||||
if (buffer && !copy_from_user(tmp, buffer, count)) {
|
||||
|
||||
u8 update = _FALSE;
|
||||
u8 update = false;
|
||||
int num = sscanf(tmp, "%hhx", &bw_mode);
|
||||
|
||||
if (num < 1 || bw_mode == adapter->driver_tx_bw_mode)
|
||||
|
@ -1379,11 +1379,11 @@ static ssize_t proc_set_tx_bw_mode(struct file *file, const char __user *buffer,
|
|||
|| (mlmeext->cur_channel >= 36 && BW_MODE_5G(bw_mode) != ADAPTER_TX_BW_5G(adapter)))
|
||||
) {
|
||||
/* RA mask update needed */
|
||||
update = _TRUE;
|
||||
update = true;
|
||||
}
|
||||
adapter->driver_tx_bw_mode = bw_mode;
|
||||
|
||||
if (update == _TRUE) {
|
||||
if (update == true) {
|
||||
struct sta_info *sta;
|
||||
int i;
|
||||
|
||||
|
@ -2146,9 +2146,9 @@ static ssize_t proc_set_acs(struct file *file, const char __user *buffer, size_t
|
|||
return -EINVAL;
|
||||
|
||||
if (1 == acs_satae)
|
||||
rtw_acs_start(padapter, _TRUE);
|
||||
rtw_acs_start(padapter, true);
|
||||
else
|
||||
rtw_acs_start(padapter, _FALSE);
|
||||
rtw_acs_start(padapter, false);
|
||||
|
||||
}
|
||||
return count;
|
||||
|
|
|
@ -50,8 +50,8 @@ static void rtw_dev_shutdown(struct device *dev)
|
|||
if (!rtw_is_surprise_removed(adapter)) {
|
||||
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter);
|
||||
#ifdef CONFIG_WOWLAN
|
||||
if (pwrctl->wowlan_mode == _TRUE)
|
||||
RTW_INFO("%s wowlan_mode ==_TRUE do not run rtw_hal_deinit()\n", __func__);
|
||||
if (pwrctl->wowlan_mode == true)
|
||||
RTW_INFO("%s wowlan_mode ==true do not run rtw_hal_deinit()\n", __func__);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
@ -435,10 +435,10 @@ static int usb_reprobe_switch_usb_mode(PADAPTER Adapter)
|
|||
{
|
||||
struct registry_priv *registry_par = &Adapter->registrypriv;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
u8 ret = _FALSE;
|
||||
u8 ret = false;
|
||||
|
||||
/* efuse not allow driver to switch usb mode */
|
||||
if (pHalData->EEPROMUsbSwitch == _FALSE)
|
||||
if (pHalData->EEPROMUsbSwitch == false)
|
||||
goto exit;
|
||||
|
||||
/* registry not allow driver to switch usb mode */
|
||||
|
@ -474,7 +474,7 @@ static void usb_intf_start(_adapter *padapter)
|
|||
PHAL_DATA_TYPE hal = GET_HAL_DATA(padapter);
|
||||
|
||||
rtw_hal_inirp_init(padapter);
|
||||
hal->usb_intf_start = _TRUE;
|
||||
hal->usb_intf_start = true;
|
||||
|
||||
|
||||
}
|
||||
|
@ -497,7 +497,7 @@ static void usb_intf_stop(_adapter *padapter)
|
|||
|
||||
/* todo:cancel other irps */
|
||||
|
||||
hal->usb_intf_start = _FALSE;
|
||||
hal->usb_intf_start = false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ int rtw_hw_suspend(_adapter *padapter)
|
|||
if (NULL == padapter)
|
||||
goto error_exit;
|
||||
|
||||
if ((_FALSE == padapter->bup) || RTW_CANNOT_RUN(padapter)) {
|
||||
if ((false == padapter->bup) || RTW_CANNOT_RUN(padapter)) {
|
||||
RTW_INFO("padapter->bup=%d bDriverStopped=%s bSurpriseRemoved = %s\n"
|
||||
, padapter->bup
|
||||
, rtw_is_drv_stopped(padapter) ? "True" : "False"
|
||||
|
@ -557,8 +557,8 @@ int rtw_hw_suspend(_adapter *padapter)
|
|||
|
||||
RTW_INFO("==> rtw_hw_suspend\n");
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
/* padapter->net_closed = _TRUE; */
|
||||
pwrpriv->bips_processing = true;
|
||||
/* padapter->net_closed = true; */
|
||||
/* s1. */
|
||||
if (pnetdev) {
|
||||
netif_carrier_off(pnetdev);
|
||||
|
@ -566,7 +566,7 @@ int rtw_hw_suspend(_adapter *padapter)
|
|||
}
|
||||
|
||||
/* s2. */
|
||||
rtw_disassoc_cmd(padapter, 500, _FALSE);
|
||||
rtw_disassoc_cmd(padapter, 500, false);
|
||||
|
||||
/* s2-2. indicate disconnect to os */
|
||||
/* rtw_indicate_disconnect(padapter); */
|
||||
|
@ -576,7 +576,7 @@ int rtw_hw_suspend(_adapter *padapter)
|
|||
_clr_fwstate_(pmlmepriv, _FW_LINKED);
|
||||
rtw_led_control(padapter, LED_CTL_NO_LINK);
|
||||
|
||||
rtw_os_indicate_disconnect(padapter, 0, _FALSE);
|
||||
rtw_os_indicate_disconnect(padapter, 0, false);
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
/* donnot enqueue cmd */
|
||||
|
@ -588,12 +588,12 @@ int rtw_hw_suspend(_adapter *padapter)
|
|||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
/* s2-4. */
|
||||
rtw_free_network_queue(padapter, _TRUE);
|
||||
rtw_free_network_queue(padapter, true);
|
||||
#ifdef CONFIG_IPS
|
||||
rtw_ips_dev_unload(padapter);
|
||||
#endif
|
||||
pwrpriv->rf_pwrstate = rf_off;
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
pwrpriv->bips_processing = false;
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
||||
return 0;
|
||||
|
@ -612,10 +612,10 @@ int rtw_hw_resume(_adapter *padapter)
|
|||
|
||||
RTW_INFO("==> rtw_hw_resume\n");
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
pwrpriv->bips_processing = true;
|
||||
rtw_reset_drv_sw(padapter);
|
||||
|
||||
if (pm_netdev_open(pnetdev, _FALSE) != 0) {
|
||||
if (pm_netdev_open(pnetdev, false) != 0) {
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
goto error_exit;
|
||||
}
|
||||
|
@ -624,11 +624,11 @@ int rtw_hw_resume(_adapter *padapter)
|
|||
|
||||
rtw_netif_wake_queue(pnetdev);
|
||||
|
||||
pwrpriv->bkeepfwalive = _FALSE;
|
||||
pwrpriv->brfoffbyhw = _FALSE;
|
||||
pwrpriv->bkeepfwalive = false;
|
||||
pwrpriv->brfoffbyhw = false;
|
||||
|
||||
pwrpriv->rf_pwrstate = rf_on;
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
pwrpriv->bips_processing = false;
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
||||
|
||||
|
@ -653,7 +653,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
|||
pdbgpriv = &dvobj->drv_dbg;
|
||||
padapter = dvobj_get_primary_adapter(dvobj);
|
||||
|
||||
if (pwrpriv->bInSuspend == _TRUE) {
|
||||
if (pwrpriv->bInSuspend == true) {
|
||||
RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend);
|
||||
pdbgpriv->dbg_suspend_error_cnt++;
|
||||
goto exit;
|
||||
|
@ -666,7 +666,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
|||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
/* The FW command register update must after MAC and FW init ready. */
|
||||
if ((padapter->bFWReady) && (pwrpriv->bHWPwrPindetect) && (padapter->registrypriv.usbss_enable)) {
|
||||
u8 bOpen = _TRUE;
|
||||
u8 bOpen = true;
|
||||
rtw_interface_ps_func(padapter, HAL_USB_SELECT_SUSPEND, &bOpen);
|
||||
}
|
||||
#endif/* SUPPORT_HW_RFOFF_DETECTED */
|
||||
|
@ -688,7 +688,7 @@ static int rtw_resume_process(_adapter *padapter)
|
|||
struct debug_priv *pdbgpriv = &pdvobj->drv_dbg;
|
||||
|
||||
|
||||
if (pwrpriv->bInSuspend == _FALSE) {
|
||||
if (pwrpriv->bInSuspend == false) {
|
||||
pdbgpriv->dbg_resume_error_cnt++;
|
||||
RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend);
|
||||
return -1;
|
||||
|
@ -704,9 +704,9 @@ static int rtw_resume_process(_adapter *padapter)
|
|||
#endif /* kernel < 2.6.32 */
|
||||
|
||||
RTW_INFO("pwrpriv->bAutoResume (%x)\n", pwrpriv->bAutoResume);
|
||||
if (_TRUE == pwrpriv->bAutoResume) {
|
||||
pwrpriv->bInternalAutoSuspend = _FALSE;
|
||||
pwrpriv->bAutoResume = _FALSE;
|
||||
if (true == pwrpriv->bAutoResume) {
|
||||
pwrpriv->bInternalAutoSuspend = false;
|
||||
pwrpriv->bAutoResume = false;
|
||||
RTW_INFO("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n", pwrpriv->bAutoResume, pwrpriv->bInternalAutoSuspend);
|
||||
|
||||
}
|
||||
|
@ -714,7 +714,7 @@ static int rtw_resume_process(_adapter *padapter)
|
|||
|
||||
/*
|
||||
* Due to usb wow suspend flow will cancel read/write port via intf_stop and
|
||||
* bReadPortCancel and bWritePortCancel are set _TRUE in intf_stop.
|
||||
* bReadPortCancel and bWritePortCancel are set true in intf_stop.
|
||||
* But they will not be clear in intf_start during wow resume flow.
|
||||
* It should move to os_intf in the feature.
|
||||
*/
|
||||
|
@ -728,22 +728,22 @@ static int rtw_resume_process(_adapter *padapter)
|
|||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
/* The FW command register update must after MAC and FW init ready. */
|
||||
if ((padapter->bFWReady) && (pwrpriv->bHWPwrPindetect) && (padapter->registrypriv.usbss_enable)) {
|
||||
u8 bOpen = _FALSE;
|
||||
u8 bOpen = false;
|
||||
rtw_interface_ps_func(padapter, HAL_USB_SELECT_SUSPEND, &bOpen);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_BT_COEXIST /* for 8723as-vau */
|
||||
RTW_INFO("pwrpriv->bAutoResume (%x)\n", pwrpriv->bAutoResume);
|
||||
if (_TRUE == pwrpriv->bAutoResume) {
|
||||
pwrpriv->bInternalAutoSuspend = _FALSE;
|
||||
pwrpriv->bAutoResume = _FALSE;
|
||||
if (true == pwrpriv->bAutoResume) {
|
||||
pwrpriv->bInternalAutoSuspend = false;
|
||||
pwrpriv->bAutoResume = false;
|
||||
RTW_INFO("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n", pwrpriv->bAutoResume, pwrpriv->bInternalAutoSuspend);
|
||||
}
|
||||
|
||||
#else /* #ifdef CONFIG_BT_COEXIST */
|
||||
pwrpriv->bInternalAutoSuspend = _FALSE;
|
||||
pwrpriv->bInternalAutoSuspend = false;
|
||||
#endif /* #ifdef CONFIG_BT_COEXIST */
|
||||
pwrpriv->brfoffbyhw = _FALSE;
|
||||
pwrpriv->brfoffbyhw = false;
|
||||
}
|
||||
#endif/* CONFIG_AUTOSUSPEND */
|
||||
|
||||
|
@ -783,7 +783,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
|
|||
#else
|
||||
if (rtw_is_earlysuspend_registered(pwrpriv)) {
|
||||
/* jeff: bypass resume here, do in late_resume */
|
||||
rtw_set_do_late_resume(pwrpriv, _TRUE);
|
||||
rtw_set_do_late_resume(pwrpriv, true);
|
||||
} else {
|
||||
rtw_resume_lock_suspend();
|
||||
ret = rtw_resume_process(padapter);
|
||||
|
@ -809,8 +809,8 @@ void autosuspend_enter(_adapter *padapter)
|
|||
|
||||
RTW_INFO("==>autosuspend_enter...........\n");
|
||||
|
||||
pwrpriv->bInternalAutoSuspend = _TRUE;
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
pwrpriv->bInternalAutoSuspend = true;
|
||||
pwrpriv->bips_processing = true;
|
||||
|
||||
if (rf_off == pwrpriv->change_rfpwrstate) {
|
||||
#ifndef CONFIG_BT_COEXIST
|
||||
|
@ -868,7 +868,7 @@ int autoresume_enter(_adapter *padapter)
|
|||
RTW_INFO("====> autoresume_enter\n");
|
||||
|
||||
if (rf_off == pwrpriv->rf_pwrstate) {
|
||||
pwrpriv->ps_flag = _FALSE;
|
||||
pwrpriv->ps_flag = false;
|
||||
#ifndef CONFIG_BT_COEXIST
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
|
||||
if (usb_autopm_get_interface(dvobj->pusbintf) < 0) {
|
||||
|
@ -888,7 +888,7 @@ int autoresume_enter(_adapter *padapter)
|
|||
RTW_INFO("...pm_usage_cnt(%d).....\n", dvobj->pusbintf->pm_usage_cnt);
|
||||
#endif
|
||||
#else /* #ifndef CONFIG_BT_COEXIST */
|
||||
pwrpriv->bAutoResume = _TRUE;
|
||||
pwrpriv->bAutoResume = true;
|
||||
if (0 == pwrpriv->autopm_cnt) {
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
|
||||
if (usb_autopm_get_interface(dvobj->pusbintf) < 0) {
|
||||
|
@ -953,7 +953,7 @@ static _adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj,
|
|||
padapter->iface_id = IFACE_ID0;
|
||||
|
||||
/* set adapter_type/iface type for primary padapter */
|
||||
padapter->isprimary = _TRUE;
|
||||
padapter->isprimary = true;
|
||||
padapter->adapter_type = PRIMARY_ADAPTER;
|
||||
#ifdef CONFIG_MI_WITH_MBSSID_CAM/*Configure all IFACE to PORT0-MBSSID*/
|
||||
padapter->hw_port = HW_PORT0;
|
||||
|
@ -1082,10 +1082,10 @@ static void rtw_usb_primary_adapter_deinit(_adapter *padapter)
|
|||
RTW_INFO(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
rtw_disassoc_cmd(padapter, 0, _FALSE);
|
||||
rtw_disassoc_cmd(padapter, 0, false);
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) {
|
||||
free_mlme_ap_info(padapter);
|
||||
#ifdef CONFIG_HOSTAPD_MLME
|
||||
hostapd_mode_unload(padapter);
|
||||
|
@ -1096,7 +1096,7 @@ static void rtw_usb_primary_adapter_deinit(_adapter *padapter)
|
|||
/*rtw_cancel_all_timer(if1);*/
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
pwrctl->wowlan_mode = _FALSE;
|
||||
pwrctl->wowlan_mode = false;
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
|
||||
rtw_dev_unload(padapter);
|
||||
|
@ -1160,7 +1160,7 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
|
|||
goto free_dvobj;
|
||||
}
|
||||
|
||||
if (usb_reprobe_switch_usb_mode(padapter) == _TRUE)
|
||||
if (usb_reprobe_switch_usb_mode(padapter) == true)
|
||||
goto free_if_prim;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
@ -1233,19 +1233,19 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
|
|||
|
||||
RTW_INFO("+rtw_dev_remove\n");
|
||||
|
||||
dvobj->processing_dev_remove = _TRUE;
|
||||
dvobj->processing_dev_remove = true;
|
||||
|
||||
/* TODO: use rtw_os_ndevs_deinit instead at the first stage of driver's dev deinit function */
|
||||
rtw_os_ndevs_unregister(dvobj);
|
||||
|
||||
if (usb_drv.drv_registered == _TRUE) {
|
||||
/* RTW_INFO("r871xu_dev_remove():padapter->bSurpriseRemoved == _TRUE\n"); */
|
||||
if (usb_drv.drv_registered == true) {
|
||||
/* RTW_INFO("r871xu_dev_remove():padapter->bSurpriseRemoved == true\n"); */
|
||||
rtw_set_surprise_removed(padapter);
|
||||
}
|
||||
/*else
|
||||
{
|
||||
|
||||
padapter->HalData->hw_init_completed = _FALSE;
|
||||
padapter->HalData->hw_init_completed = false;
|
||||
}*/
|
||||
|
||||
|
||||
|
@ -1253,7 +1253,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
|
|||
rtw_unregister_early_suspend(pwrctl);
|
||||
#endif
|
||||
|
||||
if (padapter->bFWReady == _TRUE) {
|
||||
if (padapter->bFWReady == true) {
|
||||
rtw_pm_set_ips(padapter, IPS_NONE);
|
||||
rtw_pm_set_lps(padapter, PS_MODE_ACTIVE);
|
||||
|
||||
|
@ -1306,7 +1306,7 @@ static int __init rtw_drv_entry(void)
|
|||
RTW_INFO(DRV_NAME" BT-Coex version = %s\n", BTCOEXVERSION);
|
||||
#endif /* BTCOEXVERSION */
|
||||
|
||||
usb_drv.drv_registered = _TRUE;
|
||||
usb_drv.drv_registered = true;
|
||||
rtw_suspend_lock_init();
|
||||
rtw_drv_proc_init();
|
||||
rtw_ndev_notifier_register();
|
||||
|
@ -1314,7 +1314,7 @@ static int __init rtw_drv_entry(void)
|
|||
ret = usb_register(&usb_drv.usbdrv);
|
||||
|
||||
if (ret != 0) {
|
||||
usb_drv.drv_registered = _FALSE;
|
||||
usb_drv.drv_registered = false;
|
||||
rtw_suspend_lock_uninit();
|
||||
rtw_drv_proc_deinit();
|
||||
rtw_ndev_notifier_unregister();
|
||||
|
@ -1330,7 +1330,7 @@ static void __exit rtw_drv_halt(void)
|
|||
{
|
||||
RTW_INFO("module exit start\n");
|
||||
|
||||
usb_drv.drv_registered = _FALSE;
|
||||
usb_drv.drv_registered = false;
|
||||
|
||||
usb_deregister(&usb_drv.usbdrv);
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 inde
|
|||
}
|
||||
}
|
||||
|
||||
if (rtw_inc_and_chk_continual_io_error(pdvobjpriv) == _TRUE) {
|
||||
if (rtw_inc_and_chk_continual_io_error(pdvobjpriv) == true) {
|
||||
rtw_set_surprise_removed(padapter);
|
||||
break;
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||
goto check_completion;
|
||||
} else {
|
||||
rtw_set_surprise_removed(padapter);
|
||||
RTW_INFO("bSurpriseRemoved=TRUE\n");
|
||||
RTW_INFO("bSurpriseRemoved=true\n");
|
||||
|
||||
goto check_completion;
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
|||
unsigned long irqL;
|
||||
unsigned int pipe;
|
||||
int status;
|
||||
u32 ret = _FAIL, bwritezero = _FALSE;
|
||||
u32 ret = _FAIL, bwritezero = false;
|
||||
PURB purb = NULL;
|
||||
_adapter *padapter = (_adapter *)pintfhdl->padapter;
|
||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
||||
|
@ -626,7 +626,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
|||
/* Commented by Albert 2009/10/13
|
||||
* We add the URB_ZERO_PACKET flag to urb so that the host will send the zero packet automatically. */
|
||||
/*
|
||||
if(bwritezero == _TRUE)
|
||||
if(bwritezero == true)
|
||||
{
|
||||
usb_bulkout_zero(pintfhdl, addr);
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||
|
||||
RTW_INFO("###=> usb_read_port_complete => urb.status(%d)\n", purb->status);
|
||||
|
||||
if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == _TRUE)
|
||||
if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == true)
|
||||
rtw_set_surprise_removed(padapter);
|
||||
|
||||
switch (purb->status) {
|
||||
|
@ -899,7 +899,7 @@ void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||
|
||||
RTW_INFO("###=> usb_read_port_complete => urb.status(%d)\n", purb->status);
|
||||
|
||||
if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == _TRUE)
|
||||
if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == true)
|
||||
rtw_set_surprise_removed(padapter);
|
||||
|
||||
switch (purb->status) {
|
||||
|
|
|
@ -62,11 +62,11 @@ sint rtw_endofpktfile(struct pkt_file *pfile)
|
|||
{
|
||||
|
||||
if (pfile->pkt_len == 0) {
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib)
|
||||
|
@ -189,27 +189,27 @@ static inline bool rtw_os_need_wake_queue(_adapter *padapter, u16 qidx)
|
|||
|
||||
if (padapter->registrypriv.wifi_spec) {
|
||||
if (pxmitpriv->hwxmits[qidx].accnt < WMM_XMIT_THRESHOLD)
|
||||
return _TRUE;
|
||||
return true;
|
||||
} else {
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
if (MCC_EN(padapter)) {
|
||||
if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)
|
||||
&& MCC_STOP(padapter))
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_MCC_MODE */
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
return _FALSE;
|
||||
return false;
|
||||
#else
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
if (MCC_EN(padapter)) {
|
||||
if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)
|
||||
&& MCC_STOP(padapter))
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_MCC_MODE */
|
||||
return _TRUE;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -220,16 +220,16 @@ static inline bool rtw_os_need_stop_queue(_adapter *padapter, u16 qidx)
|
|||
if (padapter->registrypriv.wifi_spec) {
|
||||
/* No free space for Tx, tx_worker is too slow */
|
||||
if (pxmitpriv->hwxmits[qidx].accnt > WMM_XMIT_THRESHOLD)
|
||||
return _TRUE;
|
||||
return true;
|
||||
} else {
|
||||
if (pxmitpriv->free_xmitframe_cnt <= 4)
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
if (pxmitpriv->free_xmitframe_cnt <= 4)
|
||||
return _TRUE;
|
||||
return true;
|
||||
#endif
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt)
|
||||
|
@ -282,7 +282,7 @@ void rtw_os_xmit_schedule(_adapter *padapter)
|
|||
|
||||
static bool rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
|
||||
{
|
||||
bool busy = _FALSE;
|
||||
bool busy = false;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
|
||||
u16 qidx;
|
||||
|
@ -292,14 +292,14 @@ static bool rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
|
|||
if (DBG_DUMP_OS_QUEUE_CTL)
|
||||
RTW_INFO(FUNC_ADPT_FMT": netif_stop_subqueue[%d]\n", FUNC_ADPT_ARG(padapter), qidx);
|
||||
netif_stop_subqueue(padapter->pnetdev, qidx);
|
||||
busy = _TRUE;
|
||||
busy = true;
|
||||
}
|
||||
#else
|
||||
if (rtw_os_need_stop_queue(padapter, 0)) {
|
||||
if (DBG_DUMP_OS_QUEUE_CTL)
|
||||
RTW_INFO(FUNC_ADPT_FMT": netif_stop_queue\n", FUNC_ADPT_ARG(padapter));
|
||||
rtw_netif_stop_queue(padapter->pnetdev);
|
||||
busy = _TRUE;
|
||||
busy = true;
|
||||
}
|
||||
#endif
|
||||
return busy;
|
||||
|
@ -355,7 +355,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
|||
plist = get_next(phead);
|
||||
|
||||
/* free sta asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
int stainfo_offset;
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
plist = get_next(plist);
|
||||
|
@ -374,9 +374,9 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
|||
}
|
||||
|
||||
/* avoid come from STA1 and send back STA1 */
|
||||
if (_rtw_memcmp(psta->hwaddr, &skb->data[6], 6) == _TRUE
|
||||
|| _rtw_memcmp(psta->hwaddr, null_addr, 6) == _TRUE
|
||||
|| _rtw_memcmp(psta->hwaddr, bc_addr, 6) == _TRUE
|
||||
if (_rtw_memcmp(psta->hwaddr, &skb->data[6], 6) == true
|
||||
|| _rtw_memcmp(psta->hwaddr, null_addr, 6) == true
|
||||
|| _rtw_memcmp(psta->hwaddr, bc_addr, 6) == true
|
||||
) {
|
||||
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_self);
|
||||
continue;
|
||||
|
@ -400,12 +400,12 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
|||
RTW_INFO("%s-%d: rtw_skb_copy() failed!\n", __func__, __LINE__);
|
||||
pxmitpriv->tx_drop++;
|
||||
/* rtw_skb_free(skb); */
|
||||
return _FALSE; /* Caller shall tx this multicast frame via normal way. */
|
||||
return false; /* Caller shall tx this multicast frame via normal way. */
|
||||
}
|
||||
}
|
||||
|
||||
rtw_skb_free(skb);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif /* CONFIG_TX_MCAST2UNI */
|
||||
|
||||
|
@ -429,7 +429,7 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
|||
}
|
||||
DBG_COUNTER(padapter->tx_logs.os_tx);
|
||||
|
||||
if (rtw_if_up(padapter) == _FALSE) {
|
||||
if (rtw_if_up(padapter) == false) {
|
||||
DBG_COUNTER(padapter->tx_logs.os_tx_err_up);
|
||||
#ifdef DBG_TX_DROP_FRAME
|
||||
RTW_INFO("DBG_TX_DROP_FRAME %s if_up fail\n", __func__);
|
||||
|
@ -441,7 +441,7 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
|||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
if (!rtw_mc2u_disable
|
||||
&& check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE
|
||||
&& check_fwstate(pmlmepriv, WIFI_AP_STATE) == true
|
||||
&& (IP_MCAST_MAC(pkt->data)
|
||||
|| ICMPV6_MCAST_MAC(pkt->data)
|
||||
#ifdef CONFIG_TX_BCAST2UNI
|
||||
|
@ -452,7 +452,7 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
|||
) {
|
||||
if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME / 4)) {
|
||||
res = rtw_mlcst2unicst(padapter, pkt);
|
||||
if (res == _TRUE)
|
||||
if (res == true)
|
||||
goto exit;
|
||||
} else {
|
||||
/* RTW_INFO("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */
|
||||
|
@ -489,7 +489,7 @@ int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
|||
int ret = 0;
|
||||
|
||||
if (pkt) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == true) {
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
|
||||
rtw_monitor_xmit_entry((struct sk_buff *)pkt, pnetdev);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue