mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-14 09:09:35 +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
592
core/rtw_ap.c
592
core/rtw_ap.c
File diff suppressed because it is too large
Load diff
|
@ -62,8 +62,8 @@ static void _get_txvector_parameter(PADAPTER adapter, struct sta_info *sta, u8 *
|
|||
/* (dec(AID[0:8]) + dec(BSSID)*2^5) mod 2^9 */
|
||||
*p_aid = (aid + (val16 << 5)) & 0x1FF;
|
||||
*g_id = 63;
|
||||
} else if ((check_fwstate(mlme, WIFI_ADHOC_STATE) == _TRUE)
|
||||
|| (check_fwstate(mlme, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
} else if ((check_fwstate(mlme, WIFI_ADHOC_STATE) == true)
|
||||
|| (check_fwstate(mlme, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
/*
|
||||
* Otherwise, includes
|
||||
* 1. Sent to an IBSS STA
|
||||
|
@ -110,7 +110,7 @@ static void _get_sta_beamform_cap(PADAPTER adapter, struct sta_info *sta,
|
|||
info = GET_BEAMFORM_INFO(adapter);
|
||||
ht = &adapter->mlmepriv.htpriv;
|
||||
|
||||
if (is_supported_ht(sta->wireless_mode) == _TRUE) {
|
||||
if (is_supported_ht(sta->wireless_mode) == true) {
|
||||
/* HT */
|
||||
bf_cap = ht->beamform_cap;
|
||||
|
||||
|
@ -156,13 +156,13 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, CHANNEL_WIDTH bw)
|
|||
bfee = rtw_bf_bfee_get_entry_by_addr(adapter, ra);
|
||||
if (!bfee) {
|
||||
RTW_ERR("%s: Cann't find beamformee entry!\n", __func__);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
if (!pmgntframe) {
|
||||
RTW_ERR("%s: alloc mgnt frame fail!\n", __func__);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
txrate = beamforming_get_htndp_tx_rate(GET_PDM_ODM(adapter), bfee->comp_steering_num_of_bfer);
|
||||
|
@ -222,7 +222,7 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, CHANNEL_WIDTH bw)
|
|||
|
||||
dump_mgntframe(adapter, pmgntframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw)
|
||||
|
@ -252,13 +252,13 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH
|
|||
bfee = rtw_bf_bfee_get_entry_by_addr(adapter, ra);
|
||||
if (!bfee) {
|
||||
RTW_ERR("%s: Cann't find beamformee entry!\n", __func__);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
if (!pmgntframe) {
|
||||
RTW_ERR("%s: alloc mgnt frame fail!\n", __func__);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
txrate = beamforming_get_vht_ndp_tx_rate(GET_PDM_ODM(adapter), bfee->comp_steering_num_of_bfer);
|
||||
|
@ -314,7 +314,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH
|
|||
* "AID12" Equal to 0 if the STA is an AP, mesh STA or
|
||||
* STA that is a member of an IBSS
|
||||
*/
|
||||
if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == _FALSE)
|
||||
if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == false)
|
||||
aid = 0;
|
||||
sta_info.aid = aid;
|
||||
/* "Feedback Type" set to 0 for SU */
|
||||
|
@ -328,7 +328,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH
|
|||
|
||||
dump_mgntframe(adapter, pmgntframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, CHANNEL_WIDTH bw)
|
||||
|
@ -373,7 +373,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, CHANNEL_WIDTH bw)
|
|||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
if (!pmgntframe) {
|
||||
RTW_ERR("%s: alloc mgnt frame fail!\n", __func__);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* update attribute */
|
||||
|
@ -445,7 +445,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, CHANNEL_WIDTH bw)
|
|||
|
||||
dump_mgntframe(adapter, pmgntframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
|
||||
|
@ -466,7 +466,7 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
|
|||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
if (!pmgntframe) {
|
||||
RTW_ERR("%s: alloc mgnt frame fail!\n", __func__);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* update attribute */
|
||||
|
@ -507,7 +507,7 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
|
|||
|
||||
dump_mgntframe(adapter, pmgntframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void _sounding_update_min_period(PADAPTER adapter, u16 period, u8 leave)
|
||||
|
@ -520,7 +520,7 @@ static void _sounding_update_min_period(PADAPTER adapter, u16 period, u8 leave)
|
|||
|
||||
info = GET_BEAMFORM_INFO(adapter);
|
||||
|
||||
if (_TRUE == leave) {
|
||||
if (true == leave) {
|
||||
/*
|
||||
* When a BFee left,
|
||||
* we need to find the latest min sounding period
|
||||
|
@ -528,7 +528,7 @@ static void _sounding_update_min_period(PADAPTER adapter, u16 period, u8 leave)
|
|||
*/
|
||||
for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
|
||||
bfee = &info->bfee_entry[i];
|
||||
if ((bfee->used == _TRUE)
|
||||
if ((bfee->used == true)
|
||||
&& (bfee->sound_period < min_val))
|
||||
min_val = bfee->sound_period;
|
||||
}
|
||||
|
@ -572,10 +572,10 @@ static void _sounding_reset_vars(PADAPTER adapter)
|
|||
|
||||
/* Clear bSound flag for the new period */
|
||||
for (idx = 0; idx < MAX_BEAMFORMEE_ENTRY_NUM; idx++) {
|
||||
if ((info->bfee_entry[idx].used == _TRUE)
|
||||
&& (info->bfee_entry[idx].sounding == _TRUE)) {
|
||||
info->bfee_entry[idx].sounding = _FALSE;
|
||||
info->bfee_entry[idx].bCandidateSoundingPeer = _FALSE;
|
||||
if ((info->bfee_entry[idx].used == true)
|
||||
&& (info->bfee_entry[idx].sounding == true)) {
|
||||
info->bfee_entry[idx].sounding = false;
|
||||
info->bfee_entry[idx].bCandidateSoundingPeer = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -602,7 +602,7 @@ static int _sounding_get_list(PADAPTER adapter)
|
|||
/* Add MU BFee list first because MU priority is higher than SU */
|
||||
for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
|
||||
bfee = &info->bfee_entry[i];
|
||||
if (bfee->used == _FALSE)
|
||||
if (bfee->used == false)
|
||||
continue;
|
||||
|
||||
if (bfee->state != BEAMFORM_ENTRY_HW_STATE_ADDED) {
|
||||
|
@ -635,8 +635,8 @@ static int _sounding_get_list(PADAPTER adapter)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (bfee->bApplySounding == _TRUE) {
|
||||
bfee->bCandidateSoundingPeer = _TRUE;
|
||||
if (bfee->bApplySounding == true) {
|
||||
bfee->bCandidateSoundingPeer = true;
|
||||
bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, sounding->min_sounding_period);
|
||||
sounding->mu_sounding_list[mu_idx] = i;
|
||||
mu_idx++;
|
||||
|
@ -648,12 +648,12 @@ static int _sounding_get_list(PADAPTER adapter)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (bfee->bDeleteSounding == _TRUE) {
|
||||
if (bfee->bDeleteSounding == true) {
|
||||
sounding->su_sounding_list[su_idx] = i;
|
||||
su_idx++;
|
||||
} else if ((bfee->bApplySounding == _TRUE)
|
||||
&& (bfee->bSuspendSUCap == _FALSE)) {
|
||||
bfee->bCandidateSoundingPeer = _TRUE;
|
||||
} else if ((bfee->bApplySounding == true)
|
||||
&& (bfee->bSuspendSUCap == false)) {
|
||||
bfee->bCandidateSoundingPeer = true;
|
||||
bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, sounding->min_sounding_period);
|
||||
sounding->su_sounding_list[su_idx] = i;
|
||||
su_idx++;
|
||||
|
@ -681,7 +681,7 @@ static void _sounding_handler(PADAPTER adapter)
|
|||
struct beamformee_entry *bfee;
|
||||
u8 su_idx, i;
|
||||
u32 timeout_period = 0;
|
||||
u8 set_timer = _FALSE;
|
||||
u8 set_timer = false;
|
||||
int ret = 0;
|
||||
static u16 wait_cnt = 0;
|
||||
|
||||
|
@ -735,7 +735,7 @@ static void _sounding_handler(PADAPTER adapter)
|
|||
|
||||
wait_cnt = 0;
|
||||
|
||||
if (check_fwstate(&adapter->mlmepriv, WIFI_SITE_MONITOR) == _TRUE) {
|
||||
if (check_fwstate(&adapter->mlmepriv, WIFI_SITE_MONITOR) == true) {
|
||||
RTW_INFO("%s: Sounding abort! scanning APs...\n", __func__);
|
||||
info->sounding_running--;
|
||||
return;
|
||||
|
@ -751,7 +751,7 @@ static void _sounding_handler(PADAPTER adapter)
|
|||
if (su_idx >= MAX_BEAMFORMEE_ENTRY_NUM)
|
||||
continue;
|
||||
bfee = &info->bfee_entry[su_idx];
|
||||
if (_FALSE == bfee->sounding)
|
||||
if (false == bfee->sounding)
|
||||
break;
|
||||
}
|
||||
if (i < MAX_NUM_BEAMFORMEE_SU) {
|
||||
|
@ -760,12 +760,12 @@ static void _sounding_handler(PADAPTER adapter)
|
|||
sounding->state = SOUNDING_STATE_SU_START;
|
||||
RTW_DBG("%s: Set to SOUNDING_STATE_SU_START\n", __func__);
|
||||
|
||||
bfee->sounding = _TRUE;
|
||||
bfee->sounding = true;
|
||||
/* Reset sounding timeout flag for the new sounding */
|
||||
bfee->bSoundingTimeout = _FALSE;
|
||||
bfee->bSoundingTimeout = false;
|
||||
|
||||
if (_TRUE == bfee->bDeleteSounding) {
|
||||
u8 res = _FALSE;
|
||||
if (true == bfee->bDeleteSounding) {
|
||||
u8 res = false;
|
||||
rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -793,7 +793,7 @@ static void _sounding_handler(PADAPTER adapter)
|
|||
/* Update MU BFee info */
|
||||
for (i = 0; i < sounding->candidate_mu_bfee_cnt; i++) {
|
||||
bfee = &info->bfee_entry[sounding->mu_sounding_list[i]];
|
||||
bfee->sounding = _TRUE;
|
||||
bfee->sounding = true;
|
||||
}
|
||||
|
||||
/* Send MU NDPA */
|
||||
|
@ -805,9 +805,9 @@ static void _sounding_handler(PADAPTER adapter)
|
|||
bfee = &info->bfee_entry[sounding->mu_sounding_list[i]];
|
||||
|
||||
if (i == (sounding->candidate_mu_bfee_cnt - 1))/* The last STA*/
|
||||
_send_bf_report_poll(adapter, bfee->mac_addr, _TRUE);
|
||||
_send_bf_report_poll(adapter, bfee->mac_addr, true);
|
||||
else
|
||||
_send_bf_report_poll(adapter, bfee->mac_addr, _FALSE);
|
||||
_send_bf_report_poll(adapter, bfee->mac_addr, false);
|
||||
}
|
||||
|
||||
sounding->candidate_mu_bfee_cnt = 0;
|
||||
|
@ -835,7 +835,7 @@ static void _sounding_force_stop(PADAPTER adapter)
|
|||
|
||||
if ((sounding->state == SOUNDING_STATE_SU_START)
|
||||
|| (sounding->state == SOUNDING_STATE_MU_START)) {
|
||||
u8 res = _FALSE;
|
||||
u8 res = false;
|
||||
_cancel_timer(&info->sounding_timeout_timer, &cancelled);
|
||||
rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 1);
|
||||
return;
|
||||
|
@ -910,7 +910,7 @@ static void _sounding_timeout_timer_handler(void *FunctionContext)
|
|||
RTW_ERR("%s: Set to SU SOUNDING_STATE_SOUNDING_TIMEOUT\n", __func__);
|
||||
/* SU BFee */
|
||||
bfee = &info->bfee_entry[sounding->su_bfee_curidx];
|
||||
bfee->bSoundingTimeout = _TRUE;
|
||||
bfee->bSoundingTimeout = true;
|
||||
RTW_WARN("%s: The BFee entry[%d] is Sounding Timeout!\n", __func__, sounding->su_bfee_curidx);
|
||||
} else if (SOUNDING_STATE_MU_START == sounding->state) {
|
||||
sounding->state = SOUNDING_STATE_SOUNDING_TIMEOUT;
|
||||
|
@ -934,7 +934,7 @@ static struct beamformer_entry *_bfer_get_free_entry(PADAPTER adapter)
|
|||
|
||||
for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) {
|
||||
bfer = &info->bfer_entry[i];
|
||||
if (bfer->used == _FALSE)
|
||||
if (bfer->used == false)
|
||||
return bfer;
|
||||
}
|
||||
|
||||
|
@ -952,9 +952,9 @@ static struct beamformer_entry *_bfer_get_entry_by_addr(PADAPTER adapter, u8 *ra
|
|||
|
||||
for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) {
|
||||
bfer = &info->bfer_entry[i];
|
||||
if (bfer->used == _FALSE)
|
||||
if (bfer->used == false)
|
||||
continue;
|
||||
if (_rtw_memcmp(ra, bfer->mac_addr, ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(ra, bfer->mac_addr, ETH_ALEN) == true)
|
||||
return bfer;
|
||||
}
|
||||
|
||||
|
@ -982,7 +982,7 @@ static struct beamformer_entry *_bfer_add_entry(PADAPTER adapter,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bfer->used = _TRUE;
|
||||
bfer->used = true;
|
||||
_get_txvector_parameter(adapter, sta, &bfer->g_id, &bfer->p_aid);
|
||||
_rtw_memcpy(bfer->mac_addr, sta->hwaddr, ETH_ALEN);
|
||||
bfer->cap = bf_cap;
|
||||
|
@ -1066,7 +1066,7 @@ static struct beamformee_entry *_bfee_get_free_entry(PADAPTER adapter)
|
|||
|
||||
for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
|
||||
bfee = &info->bfee_entry[i];
|
||||
if (bfee->used == _FALSE)
|
||||
if (bfee->used == false)
|
||||
return bfee;
|
||||
}
|
||||
|
||||
|
@ -1084,9 +1084,9 @@ static struct beamformee_entry *_bfee_get_entry_by_addr(PADAPTER adapter, u8 *ra
|
|||
|
||||
for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
|
||||
bfee = &info->bfee_entry[i];
|
||||
if (bfee->used == _FALSE)
|
||||
if (bfee->used == false)
|
||||
continue;
|
||||
if (_rtw_memcmp(ra, bfee->mac_addr, ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(ra, bfee->mac_addr, ETH_ALEN) == true)
|
||||
return bfee;
|
||||
}
|
||||
|
||||
|
@ -1106,7 +1106,7 @@ static u8 _bfee_get_first_su_entry_idx(PADAPTER adapter, struct beamformee_entry
|
|||
bfee = &info->bfee_entry[i];
|
||||
if (ignore && (bfee == ignore))
|
||||
continue;
|
||||
if (bfee->used == _FALSE)
|
||||
if (bfee->used == false)
|
||||
continue;
|
||||
if ((!TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_MU))
|
||||
&& TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT))
|
||||
|
@ -1139,7 +1139,7 @@ static u8 _bfee_get_first_mu_entry_idx(PADAPTER adapter, struct beamformee_entry
|
|||
bfee = &info->bfee_entry[i];
|
||||
if (ignore && (bfee == ignore))
|
||||
continue;
|
||||
if (bfee->used == _FALSE)
|
||||
if (bfee->used == false)
|
||||
continue;
|
||||
if (TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_MU))
|
||||
return i;
|
||||
|
@ -1169,7 +1169,7 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bfee->used = _TRUE;
|
||||
bfee->used = true;
|
||||
bfee->aid = sta->aid;
|
||||
bfee->mac_id = sta->mac_id;
|
||||
bfee->sound_bw = sta->bw_mode;
|
||||
|
@ -1179,18 +1179,18 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
|
|||
sta->txbf_paid = bfee->p_aid;
|
||||
|
||||
_rtw_memcpy(bfee->mac_addr, sta->hwaddr, ETH_ALEN);
|
||||
bfee->txbf = _FALSE;
|
||||
bfee->sounding = _FALSE;
|
||||
bfee->txbf = false;
|
||||
bfee->sounding = false;
|
||||
bfee->sound_period = 40;
|
||||
_sounding_update_min_period(adapter, bfee->sound_period, _FALSE);
|
||||
_sounding_update_min_period(adapter, bfee->sound_period, false);
|
||||
bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, info->sounding_info.min_sounding_period);
|
||||
bfee->cap = bf_cap;
|
||||
bfee->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT;
|
||||
|
||||
bfee->bCandidateSoundingPeer = _FALSE;
|
||||
bfee->bSoundingTimeout = _FALSE;
|
||||
bfee->bDeleteSounding = _FALSE;
|
||||
bfee->bApplySounding = _TRUE;
|
||||
bfee->bCandidateSoundingPeer = false;
|
||||
bfee->bSoundingTimeout = false;
|
||||
bfee->bDeleteSounding = false;
|
||||
bfee->bApplySounding = true;
|
||||
|
||||
bfee->tx_timestamp = 0;
|
||||
bfee->tx_bytes = 0;
|
||||
|
@ -1198,18 +1198,18 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
|
|||
bfee->LogStatusFailCnt = 0;
|
||||
bfee->NumofSoundingDim = sounding_dim;
|
||||
bfee->comp_steering_num_of_bfer = comp_steering;
|
||||
bfee->bSuspendSUCap = _FALSE;
|
||||
bfee->bSuspendSUCap = false;
|
||||
|
||||
if (TEST_FLAG(bf_cap, BEAMFORMEE_CAP_VHT_MU)) {
|
||||
info->beamformee_mu_cnt += 1;
|
||||
info->first_mu_bfee_index = _bfee_get_first_mu_entry_idx(adapter, NULL);
|
||||
|
||||
if (_TRUE == info->bEnableSUTxBFWorkAround) {
|
||||
if (true == info->bEnableSUTxBFWorkAround) {
|
||||
/* When the first MU BFee added, discard SU BFee bfee's capability */
|
||||
if ((info->beamformee_mu_cnt == 1) && (info->beamformee_su_cnt > 0)) {
|
||||
if (info->TargetSUBFee) {
|
||||
info->TargetSUBFee->bSuspendSUCap = _TRUE;
|
||||
info->TargetSUBFee->bDeleteSounding = _TRUE;
|
||||
info->TargetSUBFee->bSuspendSUCap = true;
|
||||
info->TargetSUBFee->bDeleteSounding = true;
|
||||
} else {
|
||||
RTW_ERR("%s: UNEXPECTED!! info->TargetSUBFee is NULL!", __func__);
|
||||
}
|
||||
|
@ -1233,14 +1233,14 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
|
|||
} else if (TEST_FLAG(bf_cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT)) {
|
||||
info->beamformee_su_cnt += 1;
|
||||
|
||||
if (_TRUE == info->bEnableSUTxBFWorkAround) {
|
||||
if (true == info->bEnableSUTxBFWorkAround) {
|
||||
/* Record the first SU BFee index. We only allow the first SU BFee to be sound */
|
||||
if ((info->beamformee_su_cnt == 1) && (info->beamformee_mu_cnt == 0)) {
|
||||
info->TargetSUBFee = bfee;
|
||||
memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO));
|
||||
bfee->bSuspendSUCap = _FALSE;
|
||||
bfee->bSuspendSUCap = false;
|
||||
} else {
|
||||
bfee->bSuspendSUCap = _TRUE;
|
||||
bfee->bSuspendSUCap = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1273,21 +1273,21 @@ static void _bfee_remove_entry(PADAPTER adapter, struct beamformee_entry *entry)
|
|||
info->beamformee_mu_cnt -= 1;
|
||||
info->first_mu_bfee_index = _bfee_get_first_mu_entry_idx(adapter, entry);
|
||||
|
||||
if (_TRUE == info->bEnableSUTxBFWorkAround) {
|
||||
if (true == info->bEnableSUTxBFWorkAround) {
|
||||
if ((info->beamformee_mu_cnt == 0) && (info->beamformee_su_cnt > 0)) {
|
||||
idx = _bfee_get_first_su_entry_idx(adapter, NULL);
|
||||
info->TargetSUBFee = &info->bfee_entry[idx];
|
||||
memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO));
|
||||
info->TargetSUBFee->bSuspendSUCap = _FALSE;
|
||||
info->TargetSUBFee->bSuspendSUCap = false;
|
||||
}
|
||||
}
|
||||
} else if (TEST_FLAG(entry->cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT)) {
|
||||
info->beamformee_su_cnt -= 1;
|
||||
|
||||
/* When the target SU BFee leaves, disable workaround */
|
||||
if ((_TRUE == info->bEnableSUTxBFWorkAround)
|
||||
if ((true == info->bEnableSUTxBFWorkAround)
|
||||
&& (entry == info->TargetSUBFee)) {
|
||||
entry->bSuspendSUCap = _TRUE;
|
||||
entry->bSuspendSUCap = true;
|
||||
info->TargetSUBFee = NULL;
|
||||
memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO));
|
||||
rtw_bf_cmd(adapter, BEAMFORMING_CTRL_SET_CSI_REPORT, (u8*)&info->TargetCSIInfo, sizeof(struct _RT_CSI_INFO), 0);
|
||||
|
@ -1299,7 +1299,7 @@ static void _bfee_remove_entry(PADAPTER adapter, struct beamformee_entry *entry)
|
|||
if (info->beamformee_su_cnt == 0)
|
||||
info->beamforming_cap &= ~(BEAMFORMER_CAP_VHT_SU|BEAMFORMER_CAP_HT_EXPLICIT);
|
||||
|
||||
_sounding_update_min_period(adapter, 0, _TRUE);
|
||||
_sounding_update_min_period(adapter, 0, true);
|
||||
}
|
||||
|
||||
static enum beamforming_cap _bfee_get_entry_cap_by_macid(PADAPTER adapter, u8 macid)
|
||||
|
@ -1313,7 +1313,7 @@ static enum beamforming_cap _bfee_get_entry_cap_by_macid(PADAPTER adapter, u8 ma
|
|||
|
||||
for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) {
|
||||
bfee = &info->bfee_entry[i];
|
||||
if (bfee->used == _FALSE)
|
||||
if (bfee->used == false)
|
||||
continue;
|
||||
if (bfee->mac_id == macid)
|
||||
return bfee->cap;
|
||||
|
@ -1356,8 +1356,8 @@ static void _beamforming_enter(PADAPTER adapter, void *p)
|
|||
|
||||
/* The current setting does not support Beaforming */
|
||||
wireless_mode = sta->wireless_mode;
|
||||
if ((is_supported_ht(wireless_mode) == _FALSE)
|
||||
&& (is_supported_vht(wireless_mode) == _FALSE)) {
|
||||
if ((is_supported_ht(wireless_mode) == false)
|
||||
&& (is_supported_vht(wireless_mode) == false)) {
|
||||
RTW_WARN("%s: Not support HT or VHT mode\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
@ -1419,7 +1419,7 @@ static void _beamforming_leave(PADAPTER adapter, u8 *ra)
|
|||
struct beamforming_info *info;
|
||||
struct beamformer_entry *bfer = NULL;
|
||||
struct beamformee_entry *bfee = NULL;
|
||||
u8 bHwStateAddInit = _FALSE;
|
||||
u8 bHwStateAddInit = false;
|
||||
|
||||
|
||||
RTW_INFO("+%s\n", __func__);
|
||||
|
@ -1483,21 +1483,21 @@ static void _beamforming_sounding_down(PADAPTER adapter, u8 status)
|
|||
* old sound down event happens in the new sounding period.
|
||||
* 2015.12.10
|
||||
*/
|
||||
if (_TRUE == bfee->bSoundingTimeout) {
|
||||
if (true == bfee->bSoundingTimeout) {
|
||||
RTW_WARN("%s: The entry[%d] is bSoundingTimeout!\n", __func__, sounding->su_bfee_curidx);
|
||||
bfee->bSoundingTimeout = _FALSE;
|
||||
bfee->bSoundingTimeout = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_TRUE == status) {
|
||||
if (true == status) {
|
||||
/* success */
|
||||
bfee->LogStatusFailCnt = 0;
|
||||
info->SetHalSoundownOnDemandCnt++;
|
||||
rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_STATUS, &status);
|
||||
} else if (_TRUE == bfee->bDeleteSounding) {
|
||||
} else if (true == bfee->bDeleteSounding) {
|
||||
RTW_WARN("%s: Delete entry[%d] sounding info!\n", __func__, sounding->su_bfee_curidx);
|
||||
rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_STATUS, &status);
|
||||
bfee->bDeleteSounding = _FALSE;
|
||||
bfee->bDeleteSounding = false;
|
||||
} else {
|
||||
bfee->LogStatusFailCnt++;
|
||||
RTW_WARN("%s: LogStatusFailCnt=%d\n", __func__, bfee->LogStatusFailCnt);
|
||||
|
@ -1525,8 +1525,8 @@ static void _c2h_snd_txbf(PADAPTER adapter, u8 *buf, u8 buf_len)
|
|||
|
||||
_cancel_timer(&info->sounding_timeout_timer, &cancelled);
|
||||
|
||||
res = C2H_SND_TXBF_GET_SND_RESULT(buf) ? _TRUE : _FALSE;
|
||||
RTW_INFO("+%s: %s\n", __func__, res==_TRUE?"Success":"Fail!");
|
||||
res = C2H_SND_TXBF_GET_SND_RESULT(buf) ? true : false;
|
||||
RTW_INFO("+%s: %s\n", __func__, res==true?"Success":"Fail!");
|
||||
|
||||
rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 1);
|
||||
}
|
||||
|
@ -1607,7 +1607,7 @@ u32 rtw_bf_get_report_packet(PADAPTER adapter, union recv_frame *precv_frame)
|
|||
*/
|
||||
pCSIMatrix = pMIMOCtrlField + 3 + Nc;
|
||||
CSIMatrixLen = frame_len - 26 - 3 - Nc;
|
||||
info->TargetCSIInfo.bVHT = _TRUE;
|
||||
info->TargetCSIInfo.bVHT = true;
|
||||
} else if ((category == RTW_WLAN_CATEGORY_HT)
|
||||
&& (action == RTW_WLAN_ACTION_HT_COMPRESS_BEAMFORMING)) {
|
||||
pMIMOCtrlField = pframe + 26;
|
||||
|
@ -1622,11 +1622,11 @@ u32 rtw_bf_get_report_packet(PADAPTER adapter, union recv_frame *precv_frame)
|
|||
*/
|
||||
pCSIMatrix = pMIMOCtrlField + 6 + Nr;
|
||||
CSIMatrixLen = frame_len - 26 - 6 - Nr;
|
||||
info->TargetCSIInfo.bVHT = _FALSE;
|
||||
info->TargetCSIInfo.bVHT = false;
|
||||
}
|
||||
|
||||
/* Update current CSI report info */
|
||||
if ((_TRUE == info->bEnableSUTxBFWorkAround)
|
||||
if ((true == info->bEnableSUTxBFWorkAround)
|
||||
&& (info->TargetSUBFee == bfee)) {
|
||||
if ((info->TargetCSIInfo.Nc != Nc) || (info->TargetCSIInfo.Nr != Nr) ||
|
||||
(info->TargetCSIInfo.ChnlWidth != CH_W) || (info->TargetCSIInfo.Ng != Ng) ||
|
||||
|
@ -1664,7 +1664,7 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi
|
|||
|
||||
pmgntframe = alloc_mgtxmitframe(xmitpriv);
|
||||
if (!pmgntframe)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
/* update attribute */
|
||||
attrib = &pmgntframe->attrib;
|
||||
|
@ -1702,7 +1702,7 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi
|
|||
|
||||
dump_mgntframe(adapter, pmgntframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1763,7 +1763,7 @@ void rtw_bf_init(PADAPTER adapter)
|
|||
info->SetHalBFLeaveOnDemandCnt = 0;
|
||||
info->SetHalSoundownOnDemandCnt = 0;
|
||||
|
||||
info->bEnableSUTxBFWorkAround = _TRUE;
|
||||
info->bEnableSUTxBFWorkAround = true;
|
||||
info->TargetSUBFee = NULL;
|
||||
|
||||
info->sounding_running = 0;
|
||||
|
@ -1888,7 +1888,7 @@ void rtw_bf_update_traffic(PADAPTER adapter)
|
|||
u8 tx_rate[MAX_BEAMFORMEE_ENTRY_NUM] = {0};
|
||||
u64 tx_bytes, last_bytes;
|
||||
u32 time, last_timestamp;
|
||||
u8 set_timer = _FALSE;
|
||||
u8 set_timer = false;
|
||||
|
||||
|
||||
info = GET_BEAMFORM_INFO(adapter);
|
||||
|
@ -1901,7 +1901,7 @@ void rtw_bf_update_traffic(PADAPTER adapter)
|
|||
|
||||
for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
|
||||
bfee = &info->bfee_entry[i];
|
||||
if (_FALSE == bfee->used)
|
||||
if (false == bfee->used)
|
||||
continue;
|
||||
|
||||
sta = rtw_get_stainfo(&adapter->stapriv, bfee->mac_addr);
|
||||
|
@ -1932,29 +1932,29 @@ void rtw_bf_update_traffic(PADAPTER adapter)
|
|||
|
||||
for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
|
||||
bfee = &info->bfee_entry[i];
|
||||
if (_FALSE == bfee->used) {
|
||||
if (false == bfee->used) {
|
||||
if (sounding_idx & BIT(i))
|
||||
RTW_WARN("%s: bfee(%d) not in used but need sounding?!\n", __func__, i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sounding_idx & BIT(i)) {
|
||||
if (_FALSE == bfee->bApplySounding) {
|
||||
bfee->bApplySounding = _TRUE;
|
||||
if (false == bfee->bApplySounding) {
|
||||
bfee->bApplySounding = true;
|
||||
bfee->SoundCnt = 0;
|
||||
set_timer = _TRUE;
|
||||
set_timer = true;
|
||||
}
|
||||
} else {
|
||||
if (_TRUE == bfee->bApplySounding) {
|
||||
bfee->bApplySounding = _FALSE;
|
||||
bfee->bDeleteSounding = _TRUE;
|
||||
if (true == bfee->bApplySounding) {
|
||||
bfee->bApplySounding = false;
|
||||
bfee->bDeleteSounding = true;
|
||||
bfee->SoundCnt = 0;
|
||||
set_timer = _TRUE;
|
||||
set_timer = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_TRUE == set_timer) {
|
||||
if (true == set_timer) {
|
||||
if (SOUNDING_STATE_NONE == info->sounding_info.state) {
|
||||
info->sounding_info.state = SOUNDING_STATE_INIT;
|
||||
_set_timer(&info->sounding_timer, 0);
|
||||
|
@ -2004,7 +2004,7 @@ struct beamforming_entry *beamforming_get_free_entry(struct mlme_priv *pmlmepriv
|
|||
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
|
||||
|
||||
for (i = 0; i < BEAMFORMING_ENTRY_NUM; i++) {
|
||||
if (pBeamInfo->beamforming_entry[i].bUsed == _FALSE) {
|
||||
if (pBeamInfo->beamforming_entry[i].bUsed == false) {
|
||||
*idx = i;
|
||||
return &(pBeamInfo->beamforming_entry[i]);
|
||||
}
|
||||
|
@ -2020,7 +2020,7 @@ struct beamforming_entry *beamforming_add_entry(PADAPTER adapter, u8 *ra, u16 ai
|
|||
struct beamforming_entry *pEntry = beamforming_get_free_entry(pmlmepriv, idx);
|
||||
|
||||
if (pEntry != NULL) {
|
||||
pEntry->bUsed = _TRUE;
|
||||
pEntry->bUsed = true;
|
||||
pEntry->aid = aid;
|
||||
pEntry->mac_id = mac_id;
|
||||
pEntry->sound_bw = bw;
|
||||
|
@ -2038,7 +2038,7 @@ struct beamforming_entry *beamforming_add_entry(PADAPTER adapter, u8 *ra, u16 ai
|
|||
pEntry->g_id = 0;
|
||||
}
|
||||
_rtw_memcpy(pEntry->mac_addr, ra, ETH_ALEN);
|
||||
pEntry->bSound = _FALSE;
|
||||
pEntry->bSound = false;
|
||||
|
||||
/* 3 TODO SW/FW sound period */
|
||||
pEntry->sound_period = 200;
|
||||
|
@ -2063,12 +2063,12 @@ bool beamforming_remove_entry(struct mlme_priv *pmlmepriv, u8 *ra, u8 *idx)
|
|||
struct beamforming_entry *pEntry = beamforming_get_entry_by_addr(pmlmepriv, ra, idx);
|
||||
|
||||
if (pEntry != NULL) {
|
||||
pEntry->bUsed = _FALSE;
|
||||
pEntry->bUsed = false;
|
||||
pEntry->beamforming_entry_cap = BEAMFORMING_CAP_NONE;
|
||||
pEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_UNINITIALIZE;
|
||||
return _TRUE;
|
||||
return true;
|
||||
} else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Used for BeamformingStart_V1 */
|
||||
|
@ -2090,7 +2090,7 @@ void beamforming_dym_ndpa_rate(PADAPTER adapter)
|
|||
void beamforming_dym_period(PADAPTER Adapter)
|
||||
{
|
||||
u8 Idx;
|
||||
bool bChangePeriod = _FALSE;
|
||||
bool bChangePeriod = false;
|
||||
u16 SoundPeriod_SW, SoundPeriod_FW;
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(Adapter);
|
||||
|
@ -2119,7 +2119,7 @@ void beamforming_dym_period(PADAPTER Adapter)
|
|||
if (pSoundInfo->sound_mode == SOUNDING_FW_VHT_TIMER || pSoundInfo->sound_mode == SOUNDING_FW_HT_TIMER) {
|
||||
if (pBeamformEntry->sound_period != SoundPeriod_FW) {
|
||||
pBeamformEntry->sound_period = SoundPeriod_FW;
|
||||
bChangePeriod = _TRUE; /* Only FW sounding need to send H2C packet to change sound period. */
|
||||
bChangePeriod = true; /* Only FW sounding need to send H2C packet to change sound period. */
|
||||
}
|
||||
} else if (pBeamformEntry->sound_period != SoundPeriod_SW)
|
||||
pBeamformEntry->sound_period = SoundPeriod_SW;
|
||||
|
@ -2152,7 +2152,7 @@ bool issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx
|
|||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
|
||||
if (pmgntframe == NULL)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
/*update attribute*/
|
||||
pattrib = &pmgntframe->attrib;
|
||||
|
@ -2205,7 +2205,7 @@ bool issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx
|
|||
|
||||
dump_mgntframe(Adapter, pmgntframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
@ -2226,7 +2226,7 @@ bool issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx)
|
|||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
|
||||
if (pmgntframe == NULL)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
/*update attribute*/
|
||||
pattrib = &pmgntframe->attrib;
|
||||
|
@ -2281,7 +2281,7 @@ bool issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx)
|
|||
|
||||
dump_mgntframe(Adapter, pmgntframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool beamforming_send_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx)
|
||||
|
@ -2315,7 +2315,7 @@ bool issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH b
|
|||
|
||||
if (pmgntframe == NULL) {
|
||||
RTW_INFO("%s, alloc mgnt frame fail\n", __func__);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*update attribute*/
|
||||
|
@ -2379,7 +2379,7 @@ bool issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH b
|
|||
dump_mgntframe(Adapter, pmgntframe);
|
||||
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, u8 qidx)
|
||||
|
@ -2400,7 +2400,7 @@ bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw,
|
|||
|
||||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
if (pmgntframe == NULL)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
/*update attribute*/
|
||||
pattrib = &pmgntframe->attrib;
|
||||
|
@ -2465,7 +2465,7 @@ bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw,
|
|||
|
||||
dump_mgntframe(Adapter, pmgntframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool beamforming_send_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, u8 qidx)
|
||||
|
@ -2475,12 +2475,12 @@ bool beamforming_send_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL
|
|||
|
||||
bool beamfomring_bSounding(struct beamforming_info *pBeamInfo)
|
||||
{
|
||||
bool bSounding = _FALSE;
|
||||
bool bSounding = false;
|
||||
|
||||
if ((beamforming_get_beamform_cap(pBeamInfo) & BEAMFORMER_CAP) == 0)
|
||||
bSounding = _FALSE;
|
||||
bSounding = false;
|
||||
else
|
||||
bSounding = _TRUE;
|
||||
bSounding = true;
|
||||
|
||||
return bSounding;
|
||||
}
|
||||
|
@ -2492,7 +2492,7 @@ u8 beamforming_sounding_idx(struct beamforming_info *pBeamInfo)
|
|||
|
||||
for (i = 0; i < BEAMFORMING_ENTRY_NUM; i++) {
|
||||
if (pBeamInfo->beamforming_entry[i].bUsed &&
|
||||
(_FALSE == pBeamInfo->beamforming_entry[i].bSound)) {
|
||||
(false == pBeamInfo->beamforming_entry[i].bSound)) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
|
@ -2548,11 +2548,11 @@ bool beamforming_select_beam_entry(struct beamforming_info *pBeamInfo)
|
|||
pSoundInfo->sound_mode = SOUNDING_STOP_All_TIMER;
|
||||
|
||||
if (SOUNDING_STOP_All_TIMER == pSoundInfo->sound_mode)
|
||||
return _FALSE;
|
||||
return false;
|
||||
else {
|
||||
pSoundInfo->sound_bw = beamforming_sounding_bw(pBeamInfo, pSoundInfo->sound_mode, pSoundInfo->sound_idx);
|
||||
pSoundInfo->sound_period = beamforming_sounding_time(pBeamInfo, pSoundInfo->sound_mode, pSoundInfo->sound_idx);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2560,21 +2560,21 @@ bool beamforming_start_fw(PADAPTER adapter, u8 idx)
|
|||
{
|
||||
u8 *RA = NULL;
|
||||
struct beamforming_entry *pEntry;
|
||||
bool ret = _TRUE;
|
||||
bool ret = true;
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
|
||||
|
||||
pEntry = &(pBeamInfo->beamforming_entry[idx]);
|
||||
if (pEntry->bUsed == _FALSE) {
|
||||
if (pEntry->bUsed == false) {
|
||||
RTW_INFO("Skip Beamforming, no entry for Idx =%d\n", idx);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
pEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_PROGRESSING;
|
||||
pEntry->bSound = _TRUE;
|
||||
pEntry->bSound = true;
|
||||
rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&idx);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void beamforming_end_fw(PADAPTER adapter)
|
||||
|
@ -2588,7 +2588,7 @@ void beamforming_end_fw(PADAPTER adapter)
|
|||
|
||||
bool beamforming_start_period(PADAPTER adapter)
|
||||
{
|
||||
bool ret = _TRUE;
|
||||
bool ret = true;
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
|
||||
struct sounding_info *pSoundInfo = &(pBeamInfo->sounding_info);
|
||||
|
@ -2600,7 +2600,7 @@ bool beamforming_start_period(PADAPTER adapter)
|
|||
if (pSoundInfo->sound_mode == SOUNDING_FW_VHT_TIMER || pSoundInfo->sound_mode == SOUNDING_FW_HT_TIMER)
|
||||
ret = beamforming_start_fw(adapter, pSoundInfo->sound_idx);
|
||||
else
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
RTW_INFO("%s Idx %d Mode %d BW %d Period %d\n", __func__,
|
||||
pSoundInfo->sound_idx, pSoundInfo->sound_mode, pSoundInfo->sound_bw, pSoundInfo->sound_period);
|
||||
|
@ -2623,19 +2623,19 @@ void beamforming_end_period(PADAPTER adapter)
|
|||
|
||||
void beamforming_notify(PADAPTER adapter)
|
||||
{
|
||||
bool bSounding = _FALSE;
|
||||
bool bSounding = false;
|
||||
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(&(adapter->mlmepriv));
|
||||
|
||||
bSounding = beamfomring_bSounding(pBeamInfo);
|
||||
|
||||
if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_IDLE) {
|
||||
if (bSounding) {
|
||||
if (beamforming_start_period(adapter) == _TRUE)
|
||||
if (beamforming_start_period(adapter) == true)
|
||||
pBeamInfo->beamforming_state = BEAMFORMING_STATE_START;
|
||||
}
|
||||
} else if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_START) {
|
||||
if (bSounding) {
|
||||
if (beamforming_start_period(adapter) == _FALSE)
|
||||
if (beamforming_start_period(adapter) == false)
|
||||
pBeamInfo->beamforming_state = BEAMFORMING_STATE_END;
|
||||
} else {
|
||||
beamforming_end_period(adapter);
|
||||
|
@ -2643,7 +2643,7 @@ void beamforming_notify(PADAPTER adapter)
|
|||
}
|
||||
} else if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_END) {
|
||||
if (bSounding) {
|
||||
if (beamforming_start_period(adapter) == _TRUE)
|
||||
if (beamforming_start_period(adapter) == true)
|
||||
pBeamInfo->beamforming_state = BEAMFORMING_STATE_START;
|
||||
}
|
||||
} else
|
||||
|
@ -2668,7 +2668,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
|
|||
/* The current setting does not support Beaforming */
|
||||
if (0 == phtpriv->beamform_cap) {
|
||||
RTW_INFO("The configuration disabled Beamforming! Skip...\n");
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
aid = psta->aid;
|
||||
|
@ -2692,7 +2692,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
|
|||
beamform_cap = (BEAMFORMING_CAP)(beamform_cap | BEAMFORMER_CAP_HT_EXPLICIT);
|
||||
|
||||
if (beamform_cap == BEAMFORMING_CAP_NONE)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
RTW_INFO("Beamforming Config Capability = 0x%02X\n", beamform_cap);
|
||||
|
||||
|
@ -2700,7 +2700,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
|
|||
if (pBeamformEntry == NULL) {
|
||||
pBeamformEntry = beamforming_add_entry(adapter, ra, aid, mac_id, bw, beamform_cap, idx);
|
||||
if (pBeamformEntry == NULL)
|
||||
return _FALSE;
|
||||
return false;
|
||||
else
|
||||
pBeamformEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_INITIALIZEING;
|
||||
} else {
|
||||
|
@ -2708,7 +2708,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
|
|||
if (pBeamformEntry->beamforming_entry_state != BEAMFORMING_ENTRY_STATE_INITIALIZED &&
|
||||
pBeamformEntry->beamforming_entry_state != BEAMFORMING_ENTRY_STATE_PROGRESSED) {
|
||||
RTW_INFO("Error State of Beamforming");
|
||||
return _FALSE;
|
||||
return false;
|
||||
} else
|
||||
pBeamformEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_INITIALIZEING;
|
||||
}
|
||||
|
@ -2719,7 +2719,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
|
|||
|
||||
RTW_INFO("%s Idx %d\n", __func__, *idx);
|
||||
} else
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -2729,7 +2729,7 @@ void beamforming_deinit_entry(PADAPTER adapter, u8 *ra)
|
|||
u8 idx = 0;
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
|
||||
if (beamforming_remove_entry(pmlmepriv, ra, &idx) == _TRUE)
|
||||
if (beamforming_remove_entry(pmlmepriv, ra, &idx) == true)
|
||||
rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_LEAVE, (u8 *)&idx);
|
||||
|
||||
RTW_INFO("%s Idx %d\n", __func__, idx);
|
||||
|
@ -2742,8 +2742,8 @@ void beamforming_reset(PADAPTER adapter)
|
|||
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
|
||||
|
||||
for (idx = 0; idx < BEAMFORMING_ENTRY_NUM; idx++) {
|
||||
if (pBeamInfo->beamforming_entry[idx].bUsed == _TRUE) {
|
||||
pBeamInfo->beamforming_entry[idx].bUsed = _FALSE;
|
||||
if (pBeamInfo->beamforming_entry[idx].bUsed == true) {
|
||||
pBeamInfo->beamforming_entry[idx].bUsed = false;
|
||||
pBeamInfo->beamforming_entry[idx].beamforming_entry_cap = BEAMFORMING_CAP_NONE;
|
||||
pBeamInfo->beamforming_entry[idx].beamforming_entry_state = BEAMFORMING_ENTRY_STATE_UNINITIALIZE;
|
||||
rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_LEAVE, (u8 *)&idx);
|
||||
|
@ -2759,7 +2759,7 @@ void beamforming_sounding_fail(PADAPTER Adapter)
|
|||
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
|
||||
struct beamforming_entry *pEntry = &(pBeamInfo->beamforming_entry[pBeamInfo->beamforming_cur_idx]);
|
||||
|
||||
pEntry->bSound = _FALSE;
|
||||
pEntry->bSound = false;
|
||||
rtw_hal_set_hwreg(Adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&pBeamInfo->beamforming_cur_idx);
|
||||
beamforming_deinit_entry(Adapter, pEntry->mac_addr);
|
||||
}
|
||||
|
@ -2778,7 +2778,7 @@ void beamforming_check_sounding_success(PADAPTER Adapter, bool status)
|
|||
}
|
||||
if (pEntry->LogStatusFailCnt > 20) {
|
||||
RTW_INFO("%s LogStatusFailCnt > 20, Stop SOUNDING\n", __func__);
|
||||
/* pEntry->bSound = _FALSE; */
|
||||
/* pEntry->bSound = false; */
|
||||
/* rtw_hal_set_hwreg(Adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&pBeamInfo->beamforming_cur_idx); */
|
||||
/* beamforming_deinit_entry(Adapter, pEntry->mac_addr); */
|
||||
beamforming_wk_cmd(Adapter, BEAMFORMING_CTRL_SOUNDING_FAIL, NULL, 0, 1);
|
||||
|
@ -2808,8 +2808,8 @@ void beamforming_leave(PADAPTER adapter, u8 *ra)
|
|||
BEAMFORMING_CAP beamforming_get_beamform_cap(struct beamforming_info *pBeamInfo)
|
||||
{
|
||||
u8 i;
|
||||
bool bSelfBeamformer = _FALSE;
|
||||
bool bSelfBeamformee = _FALSE;
|
||||
bool bSelfBeamformer = false;
|
||||
bool bSelfBeamformee = false;
|
||||
struct beamforming_entry beamforming_entry;
|
||||
BEAMFORMING_CAP beamform_cap = BEAMFORMING_CAP_NONE;
|
||||
|
||||
|
@ -2819,10 +2819,10 @@ BEAMFORMING_CAP beamforming_get_beamform_cap(struct beamforming_info *pBeamInfo)
|
|||
if (beamforming_entry.bUsed) {
|
||||
if ((beamforming_entry.beamforming_entry_cap & BEAMFORMEE_CAP_VHT_SU) ||
|
||||
(beamforming_entry.beamforming_entry_cap & BEAMFORMEE_CAP_HT_EXPLICIT))
|
||||
bSelfBeamformee = _TRUE;
|
||||
bSelfBeamformee = true;
|
||||
if ((beamforming_entry.beamforming_entry_cap & BEAMFORMER_CAP_VHT_SU) ||
|
||||
(beamforming_entry.beamforming_entry_cap & BEAMFORMER_CAP_HT_EXPLICIT))
|
||||
bSelfBeamformer = _TRUE;
|
||||
bSelfBeamformer = true;
|
||||
}
|
||||
|
||||
if (bSelfBeamformer && bSelfBeamformee)
|
||||
|
@ -2880,19 +2880,19 @@ u32 rtw_beamforming_get_report_frame(PADAPTER Adapter, union recv_frame *precv_
|
|||
|
||||
/*RTW_INFO("%s MacId %d offset=%d\n", __func__, pBeamformEntry->mac_id, offset);*/
|
||||
|
||||
if (_rtw_memcmp(pBeamformEntry->PreCsiReport + offset, pframe + offset, frame_len - offset) == _FALSE)
|
||||
if (_rtw_memcmp(pBeamformEntry->PreCsiReport + offset, pframe + offset, frame_len - offset) == false)
|
||||
pBeamformEntry->DefaultCsiCnt = 0;
|
||||
else
|
||||
pBeamformEntry->DefaultCsiCnt++;
|
||||
|
||||
_rtw_memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len);
|
||||
|
||||
pBeamformEntry->bDefaultCSI = _FALSE;
|
||||
pBeamformEntry->bDefaultCSI = false;
|
||||
|
||||
if (pBeamformEntry->DefaultCsiCnt > 20)
|
||||
pBeamformEntry->bDefaultCSI = _TRUE;
|
||||
pBeamformEntry->bDefaultCSI = true;
|
||||
else
|
||||
pBeamformEntry->bDefaultCSI = _FALSE;
|
||||
pBeamformEntry->bDefaultCSI = false;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
@ -2914,7 +2914,7 @@ void rtw_beamforming_get_ndpa_frame(PADAPTER Adapter, union recv_frame *precv_f
|
|||
|
||||
/*RTW_INFO("rtw_beamforming_get_ndpa_frame\n");*/
|
||||
|
||||
if (IS_HARDWARE_TYPE_8812(Adapter) == _FALSE)
|
||||
if (IS_HARDWARE_TYPE_8812(Adapter) == false)
|
||||
return;
|
||||
else if (get_frame_sub_type(pframe) != WIFI_NDPA)
|
||||
return;
|
||||
|
|
|
@ -49,7 +49,7 @@ void rtw_btcoex_IpsNotify(PADAPTER padapter, u8 type)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
hal_btcoex_IpsNotify(padapter, type);
|
||||
|
@ -60,7 +60,7 @@ void rtw_btcoex_LpsNotify(PADAPTER padapter, u8 type)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
hal_btcoex_LpsNotify(padapter, type);
|
||||
|
@ -75,10 +75,10 @@ void rtw_btcoex_ScanNotify(PADAPTER padapter, u8 type)
|
|||
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
if (_FALSE == type) {
|
||||
if (false == type) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_mi_buddy_check_fwstate(padapter, WIFI_SITE_MONITOR))
|
||||
return;
|
||||
|
@ -102,11 +102,11 @@ void rtw_btcoex_ConnectNotify(PADAPTER padapter, u8 action)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_RESET
|
||||
if (_TRUE == rtw_hal_sreset_inprogress(padapter)) {
|
||||
if (true == rtw_hal_sreset_inprogress(padapter)) {
|
||||
RTW_INFO(FUNC_ADPT_FMT ": [BTCoex] under reset, skip notify!\n",
|
||||
FUNC_ADPT_ARG(padapter));
|
||||
return;
|
||||
|
@ -114,7 +114,7 @@ void rtw_btcoex_ConnectNotify(PADAPTER padapter, u8 action)
|
|||
#endif /* DBG_CONFIG_ERROR_RESET */
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (_FALSE == action) {
|
||||
if (false == action) {
|
||||
if (rtw_mi_buddy_check_fwstate(padapter, WIFI_UNDER_LINKING))
|
||||
return;
|
||||
}
|
||||
|
@ -128,11 +128,11 @@ void rtw_btcoex_MediaStatusNotify(PADAPTER padapter, u8 mediaStatus)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_RESET
|
||||
if (_TRUE == rtw_hal_sreset_inprogress(padapter)) {
|
||||
if (true == rtw_hal_sreset_inprogress(padapter)) {
|
||||
RTW_INFO(FUNC_ADPT_FMT ": [BTCoex] under reset, skip notify!\n",
|
||||
FUNC_ADPT_ARG(padapter));
|
||||
return;
|
||||
|
@ -147,7 +147,7 @@ void rtw_btcoex_MediaStatusNotify(PADAPTER padapter, u8 mediaStatus)
|
|||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
if ((RT_MEDIA_CONNECT == mediaStatus)
|
||||
&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE))
|
||||
&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true))
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
|
||||
|
||||
hal_btcoex_MediaStatusNotify(padapter, mediaStatus);
|
||||
|
@ -158,7 +158,7 @@ void rtw_btcoex_SpecialPacketNotify(PADAPTER padapter, u8 pktType)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
hal_btcoex_SpecialPacketNotify(padapter, pktType);
|
||||
|
@ -169,7 +169,7 @@ void rtw_btcoex_IQKNotify(PADAPTER padapter, u8 state)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
hal_btcoex_IQKNotify(padapter, state);
|
||||
|
@ -180,7 +180,7 @@ void rtw_btcoex_BtInfoNotify(PADAPTER padapter, u8 length, u8 *tmpBuf)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
hal_btcoex_BtInfoNotify(padapter, length, tmpBuf);
|
||||
|
@ -191,7 +191,7 @@ void rtw_btcoex_BtMpRptNotify(PADAPTER padapter, u8 length, u8 *tmpBuf)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
|
@ -205,7 +205,7 @@ void rtw_btcoex_SuspendNotify(PADAPTER padapter, u8 state)
|
|||
PHAL_DATA_TYPE pHalData;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
hal_btcoex_SuspendNotify(padapter, state);
|
||||
|
@ -217,10 +217,10 @@ void rtw_btcoex_HaltNotify(PADAPTER padapter)
|
|||
u8 do_halt = 1;
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
do_halt = 0;
|
||||
|
||||
if (_FALSE == padapter->bup) {
|
||||
if (false == padapter->bup) {
|
||||
RTW_INFO(FUNC_ADPT_FMT ": bup=%d Skip!\n",
|
||||
FUNC_ADPT_ARG(padapter), padapter->bup);
|
||||
do_halt = 0;
|
||||
|
@ -261,7 +261,7 @@ void rtw_btcoex_Handler(PADAPTER padapter)
|
|||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if (_FALSE == pHalData->EEPROMBluetoothCoexist)
|
||||
if (false == pHalData->EEPROMBluetoothCoexist)
|
||||
return;
|
||||
|
||||
hal_btcoex_Hanlder(padapter);
|
||||
|
@ -296,10 +296,10 @@ u32 rtw_btcoex_GetAMPDUSize(PADAPTER padapter)
|
|||
|
||||
void rtw_btcoex_SetManualControl(PADAPTER padapter, u8 manual)
|
||||
{
|
||||
if (_TRUE == manual)
|
||||
hal_btcoex_SetManualControl(padapter, _TRUE);
|
||||
if (true == manual)
|
||||
hal_btcoex_SetManualControl(padapter, true);
|
||||
else
|
||||
hal_btcoex_SetManualControl(padapter, _FALSE);
|
||||
hal_btcoex_SetManualControl(padapter, false);
|
||||
}
|
||||
|
||||
u8 rtw_btcoex_1Ant(PADAPTER padapter)
|
||||
|
@ -398,7 +398,7 @@ void rtw_btcoex_LPS_Enter(PADAPTER padapter)
|
|||
|
||||
pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
pwrpriv->bpower_saving = _TRUE;
|
||||
pwrpriv->bpower_saving = true;
|
||||
lpsVal = rtw_btcoex_LpsVal(padapter);
|
||||
rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lpsVal, "BTCOEX");
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ void rtw_btcoex_LPS_Leave(PADAPTER padapter)
|
|||
if (pwrpriv->pwr_mode != PS_MODE_ACTIVE) {
|
||||
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "BTCOEX");
|
||||
LPS_RF_ON_check(padapter, 100);
|
||||
pwrpriv->bpower_saving = _FALSE;
|
||||
pwrpriv->bpower_saving = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -464,7 +464,7 @@ u8 rtw_btcoex_get_pg_rfe_type(PADAPTER padapter)
|
|||
|
||||
u8 rtw_btcoex_is_tfbga_package_type(PADAPTER padapter)
|
||||
{
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 rtw_btcoex_get_ant_div_cfg(PADAPTER padapter)
|
||||
|
@ -473,7 +473,7 @@ u8 rtw_btcoex_get_ant_div_cfg(PADAPTER padapter)
|
|||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
return (pHalData->AntDivCfg == 0) ? _FALSE : _TRUE;
|
||||
return (pHalData->AntDivCfg == 0) ? false : true;
|
||||
}
|
||||
|
||||
/* ==================================================
|
||||
|
@ -550,7 +550,7 @@ u8 rtw_btcoex_send_event_to_BT(_adapter *padapter, u8 status, u8 event_code, u8
|
|||
|
||||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ u8 rtw_btcoex_parse_BT_info_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen)
|
|||
|
||||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
|
@ -670,7 +670,7 @@ u8 rtw_btcoex_parse_BT_patch_ver_info_cmd(_adapter *padapter, u8 *pcmd, u16 cmdl
|
|||
|
||||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -716,7 +716,7 @@ u8 rtw_btcoex_parse_HCI_Ver_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen)
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -758,7 +758,7 @@ u8 rtw_btcoex_parse_WIFI_scan_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdle
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -787,8 +787,8 @@ u8 rtw_btcoex_parse_HCI_link_status_notify_cmd(_adapter *padapter, u8 *pcmd, u16
|
|||
RTW_INFO("BTLinkStatusNotify\n");
|
||||
|
||||
/* Current only RTL8723 support this command. */
|
||||
/* pBtMgnt->bSupportProfile = TRUE; */
|
||||
pBtMgnt->bSupportProfile = _FALSE;
|
||||
/* pBtMgnt->bSupportProfile = true; */
|
||||
pBtMgnt->bSupportProfile = false;
|
||||
|
||||
pBtMgnt->ExtConfig.NumberOfACL = 0;
|
||||
pBtMgnt->ExtConfig.NumberOfSCO = 0;
|
||||
|
@ -861,7 +861,7 @@ u8 rtw_btcoex_parse_HCI_link_status_notify_cmd(_adapter *padapter, u8 *pcmd, u16
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -897,7 +897,7 @@ u8 rtw_btcoex_parse_HCI_BT_coex_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmd
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -970,7 +970,7 @@ u8 rtw_btcoex_parse_HCI_BT_operation_notify_cmd(_adapter *padapter, u8 *pcmd, u1
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -1004,7 +1004,7 @@ u8 rtw_btcoex_parse_BT_AFH_MAP_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdl
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -1039,7 +1039,7 @@ u8 rtw_btcoex_parse_BT_register_val_notify_cmd(_adapter *padapter, u8 *pcmd, u16
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -1073,7 +1073,7 @@ u8 rtw_btcoex_parse_HCI_BT_abnormal_notify_cmd(_adapter *padapter, u8 *pcmd, u16
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -1107,7 +1107,7 @@ u8 rtw_btcoex_parse_HCI_query_RF_status_cmd(_adapter *padapter, u8 *pcmd, u16 cm
|
|||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
return status;
|
||||
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
|
||||
}
|
||||
|
@ -1213,21 +1213,21 @@ u16 rtw_btcoex_parse_recv_data(u8 *msg, u8 msg_size)
|
|||
u8 cmp_msg6[32] = invite_rsp;
|
||||
u8 res = OTHER;
|
||||
|
||||
if (_rtw_memcmp(cmp_msg1, msg, msg_size) == _TRUE) {
|
||||
if (_rtw_memcmp(cmp_msg1, msg, msg_size) == true) {
|
||||
/*RTW_INFO("%s, msg:%s\n",__func__,msg);*/
|
||||
res = RX_ATTEND_ACK;
|
||||
} else if (_rtw_memcmp(cmp_msg2, msg, msg_size) == _TRUE) {
|
||||
} else if (_rtw_memcmp(cmp_msg2, msg, msg_size) == true) {
|
||||
/*RTW_INFO("%s, msg:%s\n",__func__,msg);*/
|
||||
res = RX_LEAVE_ACK;
|
||||
} else if (_rtw_memcmp(cmp_msg3, msg, msg_size) == _TRUE) {
|
||||
} else if (_rtw_memcmp(cmp_msg3, msg, msg_size) == true) {
|
||||
/*RTW_INFO("%s, msg:%s\n",__func__,msg);*/
|
||||
res = RX_BT_LEAVE;
|
||||
} else if (_rtw_memcmp(cmp_msg4, msg, msg_size) == _TRUE) {
|
||||
} else if (_rtw_memcmp(cmp_msg4, msg, msg_size) == true) {
|
||||
/*RTW_INFO("%s, msg:%s\n",__func__,msg);*/
|
||||
res = RX_INVITE_REQ;
|
||||
} else if (_rtw_memcmp(cmp_msg5, msg, msg_size) == _TRUE)
|
||||
} else if (_rtw_memcmp(cmp_msg5, msg, msg_size) == true)
|
||||
res = RX_ATTEND_REQ;
|
||||
else if (_rtw_memcmp(cmp_msg6, msg, msg_size) == _TRUE)
|
||||
else if (_rtw_memcmp(cmp_msg6, msg, msg_size) == true)
|
||||
res = RX_INVITE_RSP;
|
||||
else {
|
||||
/*RTW_INFO("%s, %s\n", __func__, msg);*/
|
||||
|
@ -1279,50 +1279,50 @@ void rtw_btcoex_recvmsgbysocket(void *data)
|
|||
switch (parse_res) {
|
||||
case RX_ATTEND_ACK:
|
||||
/* attend ack */
|
||||
pcoex_info->BT_attend = _TRUE;
|
||||
pcoex_info->BT_attend = true;
|
||||
RTW_INFO("RX_ATTEND_ACK!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
|
||||
rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
|
||||
break;
|
||||
|
||||
case RX_ATTEND_REQ:
|
||||
pcoex_info->BT_attend = _TRUE;
|
||||
pcoex_info->BT_attend = true;
|
||||
RTW_INFO("RX_BT_ATTEND_REQ!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
|
||||
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, attend_ack, sizeof(attend_ack), _FALSE);
|
||||
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, attend_ack, sizeof(attend_ack), false);
|
||||
rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
|
||||
break;
|
||||
|
||||
case RX_INVITE_REQ:
|
||||
/* invite req from BT */
|
||||
pcoex_info->BT_attend = _TRUE;
|
||||
pcoex_info->BT_attend = true;
|
||||
RTW_INFO("RX_INVITE_REQ!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
|
||||
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, invite_rsp, sizeof(invite_rsp), _FALSE);
|
||||
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, invite_rsp, sizeof(invite_rsp), false);
|
||||
rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
|
||||
break;
|
||||
|
||||
case RX_INVITE_RSP:
|
||||
/*invite rsp*/
|
||||
pcoex_info->BT_attend = _TRUE;
|
||||
pcoex_info->BT_attend = true;
|
||||
RTW_INFO("RX_INVITE_RSP!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
|
||||
rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
|
||||
break;
|
||||
|
||||
case RX_LEAVE_ACK:
|
||||
/* mean BT know wifi will leave */
|
||||
pcoex_info->BT_attend = _FALSE;
|
||||
pcoex_info->BT_attend = false;
|
||||
RTW_INFO("RX_LEAVE_ACK!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
|
||||
rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
|
||||
break;
|
||||
|
||||
case RX_BT_LEAVE:
|
||||
/* BT leave */
|
||||
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, leave_ack, sizeof(leave_ack), _FALSE); /* no ack */
|
||||
pcoex_info->BT_attend = _FALSE;
|
||||
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, leave_ack, sizeof(leave_ack), false); /* no ack */
|
||||
pcoex_info->BT_attend = false;
|
||||
RTW_INFO("RX_BT_LEAVE!sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
|
||||
rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (_TRUE == pcoex_info->BT_attend)
|
||||
if (true == pcoex_info->BT_attend)
|
||||
rtw_btcoex_parse_hci_cmd(pbtcoexadapter, recv_data, recv_length);
|
||||
else
|
||||
RTW_INFO("ERROR!! BT is UP\n");
|
||||
|
@ -1363,9 +1363,9 @@ u8 rtw_btcoex_sendmsgbysocket(_adapter *padapter, u8 *msg, u8 msg_size, bool for
|
|||
struct iovec iov;
|
||||
struct bt_coex_info *pcoex_info = &padapter->coex_info;
|
||||
|
||||
/* RTW_INFO("%s: msg:%s, force:%s\n", __func__, msg, force == _TRUE?"TRUE":"FALSE"); */
|
||||
if (_FALSE == force) {
|
||||
if (_FALSE == pcoex_info->BT_attend) {
|
||||
/* RTW_INFO("%s: msg:%s, force:%s\n", __func__, msg, force == true?"true":"false"); */
|
||||
if (false == force) {
|
||||
if (false == pcoex_info->BT_attend) {
|
||||
RTW_INFO("TX Blocked: WiFi-BT disconnected\n");
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -1443,12 +1443,12 @@ u8 rtw_btcoex_create_kernel_socket(_adapter *padapter)
|
|||
RTW_INFO("binding socket success\n");
|
||||
pcoex_info->udpsock->sk->sk_data_ready = rtw_btcoex_recvmsg_init;
|
||||
pcoex_info->sock_open |= KERNEL_SOCKET_OK;
|
||||
pcoex_info->BT_attend = _FALSE;
|
||||
pcoex_info->BT_attend = false;
|
||||
RTW_INFO("WIFI sending attend_req\n");
|
||||
rtw_btcoex_sendmsgbysocket(padapter, attend_req, sizeof(attend_req), _TRUE);
|
||||
rtw_btcoex_sendmsgbysocket(padapter, attend_req, sizeof(attend_req), true);
|
||||
status = _SUCCESS;
|
||||
} else {
|
||||
pcoex_info->BT_attend = _FALSE;
|
||||
pcoex_info->BT_attend = false;
|
||||
sock_release(pcoex_info->udpsock); /* bind fail release socket */
|
||||
RTW_INFO("Error binding socket: %d\n", kernel_socket_err);
|
||||
status = _FAIL;
|
||||
|
@ -1466,8 +1466,8 @@ void rtw_btcoex_close_kernel_socket(_adapter *padapter)
|
|||
RTW_INFO("release kernel socket\n");
|
||||
sock_release(pcoex_info->udpsock);
|
||||
pcoex_info->sock_open &= ~(KERNEL_SOCKET_OK);
|
||||
if (_TRUE == pcoex_info->BT_attend)
|
||||
pcoex_info->BT_attend = _FALSE;
|
||||
if (true == pcoex_info->BT_attend)
|
||||
pcoex_info->BT_attend = false;
|
||||
|
||||
RTW_INFO("sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
|
||||
}
|
||||
|
@ -1476,10 +1476,10 @@ void rtw_btcoex_close_kernel_socket(_adapter *padapter)
|
|||
void rtw_btcoex_init_socket(_adapter *padapter)
|
||||
{
|
||||
|
||||
u8 is_invite = _FALSE;
|
||||
u8 is_invite = false;
|
||||
struct bt_coex_info *pcoex_info = &padapter->coex_info;
|
||||
RTW_INFO("%s\n", __func__);
|
||||
if (_FALSE == pcoex_info->is_exist) {
|
||||
if (false == pcoex_info->is_exist) {
|
||||
memset(pcoex_info, 0, sizeof(struct bt_coex_info));
|
||||
pcoex_info->btcoex_wq = create_workqueue("BTCOEX");
|
||||
INIT_DELAYED_WORK(&pcoex_info->recvmsg_work,
|
||||
|
@ -1487,16 +1487,16 @@ void rtw_btcoex_init_socket(_adapter *padapter)
|
|||
pbtcoexadapter = padapter;
|
||||
/* We expect BT is off if BT don't send ack to wifi */
|
||||
RTW_INFO("We expect BT is off if BT send ack to wifi\n");
|
||||
rtw_btcoex_pta_off_on_notify(pbtcoexadapter, _FALSE);
|
||||
rtw_btcoex_pta_off_on_notify(pbtcoexadapter, false);
|
||||
if (rtw_btcoex_create_kernel_socket(padapter) == _SUCCESS)
|
||||
pcoex_info->is_exist = _TRUE;
|
||||
pcoex_info->is_exist = true;
|
||||
else {
|
||||
pcoex_info->is_exist = _FALSE;
|
||||
pcoex_info->is_exist = false;
|
||||
pbtcoexadapter = NULL;
|
||||
}
|
||||
|
||||
RTW_INFO("%s: pbtcoexadapter:%p, coex_info->is_exist: %s\n"
|
||||
, __func__, pbtcoexadapter, pcoex_info->is_exist == _TRUE ? "TRUE" : "FALSE");
|
||||
, __func__, pbtcoexadapter, pcoex_info->is_exist == true ? "true" : "false");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1505,12 +1505,12 @@ void rtw_btcoex_close_socket(_adapter *padapter)
|
|||
struct bt_coex_info *pcoex_info = &padapter->coex_info;
|
||||
|
||||
RTW_INFO("%s--coex_info->is_exist: %s, pcoex_info->BT_attend:%s\n"
|
||||
, __func__, pcoex_info->is_exist == _TRUE ? "TRUE" : "FALSE", pcoex_info->BT_attend == _TRUE ? "TRUE" : "FALSE");
|
||||
, __func__, pcoex_info->is_exist == true ? "true" : "false", pcoex_info->BT_attend == true ? "true" : "false");
|
||||
|
||||
if (_TRUE == pcoex_info->is_exist) {
|
||||
if (_TRUE == pcoex_info->BT_attend) {
|
||||
if (true == pcoex_info->is_exist) {
|
||||
if (true == pcoex_info->BT_attend) {
|
||||
/*inform BT wifi leave*/
|
||||
rtw_btcoex_sendmsgbysocket(padapter, wifi_leave, sizeof(wifi_leave), _FALSE);
|
||||
rtw_btcoex_sendmsgbysocket(padapter, wifi_leave, sizeof(wifi_leave), false);
|
||||
msleep(50);
|
||||
}
|
||||
|
||||
|
@ -1521,7 +1521,7 @@ void rtw_btcoex_close_socket(_adapter *padapter)
|
|||
|
||||
rtw_btcoex_close_kernel_socket(padapter);
|
||||
pbtcoexadapter = NULL;
|
||||
pcoex_info->is_exist = _FALSE;
|
||||
pcoex_info->is_exist = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1568,7 +1568,7 @@ void rtw_btcoex_SendEventExtBtCoexControl(PADAPTER padapter, u8 bNeedDbgRsp, u8
|
|||
|
||||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
}
|
||||
|
||||
/* Porting from Windows team */
|
||||
|
@ -1606,7 +1606,7 @@ void rtw_btcoex_SendEventExtBtInfoControl(PADAPTER padapter, u8 dataLen, void *p
|
|||
|
||||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
}
|
||||
|
||||
void rtw_btcoex_SendScanNotify(PADAPTER padapter, u8 scanType)
|
||||
|
@ -1642,7 +1642,7 @@ void rtw_btcoex_SendScanNotify(PADAPTER padapter, u8 scanType)
|
|||
|
||||
/* total tx event length + EventCode length + sizeof(length) */
|
||||
tx_event_length = pEvent->Length + 2;
|
||||
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
|
||||
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, false);
|
||||
}
|
||||
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
|
188
core/rtw_cmd.c
188
core/rtw_cmd.c
|
@ -85,7 +85,7 @@ static void c2h_wk_callback(_workitem *work)
|
|||
u8 id, seq, plen;
|
||||
u8 *payload;
|
||||
|
||||
evtpriv->c2h_wk_alive = _TRUE;
|
||||
evtpriv->c2h_wk_alive = true;
|
||||
|
||||
while (!rtw_cbuf_empty(evtpriv->c2h_queue)) {
|
||||
c2h_evt = (u8 *)rtw_cbuf_pop(evtpriv->c2h_queue);
|
||||
|
@ -117,7 +117,7 @@ static void c2h_wk_callback(_workitem *work)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (direct_hdl_filter(adapter, id, seq, plen, payload) == _TRUE) {
|
||||
if (direct_hdl_filter(adapter, id, seq, plen, payload) == true) {
|
||||
/* Handle directly */
|
||||
rtw_hal_c2h_handler(adapter, id, seq, plen, payload);
|
||||
rtw_mfree(c2h_evt, C2H_REG_LEN);
|
||||
|
@ -128,7 +128,7 @@ static void c2h_wk_callback(_workitem *work)
|
|||
}
|
||||
}
|
||||
|
||||
evtpriv->c2h_wk_alive = _FALSE;
|
||||
evtpriv->c2h_wk_alive = false;
|
||||
}
|
||||
#endif /* CONFIG_C2H_WK */
|
||||
|
||||
|
@ -181,7 +181,7 @@ exit:
|
|||
|
||||
#ifdef CONFIG_C2H_WK
|
||||
_init_workitem(&pevtpriv->c2h_wk, c2h_wk_callback, NULL);
|
||||
pevtpriv->c2h_wk_alive = _FALSE;
|
||||
pevtpriv->c2h_wk_alive = false;
|
||||
pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
|
||||
#endif
|
||||
|
||||
|
@ -400,7 +400,7 @@ void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
|
|||
int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj);
|
||||
int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||
{
|
||||
u8 bAllow = _FALSE; /* set to _TRUE to allow enqueuing cmd when hw_init_completed is _FALSE */
|
||||
u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
/* To decide allow or not */
|
||||
|
@ -411,20 +411,20 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
|||
struct drvextra_cmd_parm *pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)cmd_obj->parmbuf;
|
||||
if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID) {
|
||||
/* RTW_INFO("==>enqueue POWER_SAVING_CTRL_WK_CID\n"); */
|
||||
bAllow = _TRUE;
|
||||
bAllow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
|
||||
bAllow = _TRUE;
|
||||
bAllow = true;
|
||||
|
||||
if (cmd_obj->no_io)
|
||||
bAllow = _TRUE;
|
||||
bAllow = true;
|
||||
|
||||
if ((!rtw_is_hw_init_completed(pcmdpriv->padapter) && (bAllow == _FALSE))
|
||||
|| ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == _FALSE /* com_thread not running */
|
||||
if ((!rtw_is_hw_init_completed(pcmdpriv->padapter) && (bAllow == false))
|
||||
|| ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == false /* com_thread not running */
|
||||
) {
|
||||
if (DBG_CMD_EXECUTE)
|
||||
RTW_INFO(ADPT_FMT" drop "CMD_FMT" hw_init_completed:%u, cmdthd_running:%u\n", ADPT_ARG(cmd_obj->padapter)
|
||||
|
@ -524,7 +524,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd)
|
|||
void rtw_stop_cmd_thread(_adapter *adapter)
|
||||
{
|
||||
if (adapter->cmdThread &&
|
||||
ATOMIC_READ(&(adapter->cmdpriv.cmdthd_running)) == _TRUE &&
|
||||
ATOMIC_READ(&(adapter->cmdpriv.cmdthd_running)) == true &&
|
||||
adapter->cmdpriv.stop_req == 0) {
|
||||
adapter->cmdpriv.stop_req = 1;
|
||||
_rtw_up_sema(&adapter->cmdpriv.cmd_queue_sema);
|
||||
|
@ -552,7 +552,7 @@ thread_return rtw_cmd_thread(thread_context context)
|
|||
prspbuf = pcmdpriv->rsp_buf;
|
||||
|
||||
pcmdpriv->stop_req = 0;
|
||||
ATOMIC_SET(&(pcmdpriv->cmdthd_running), _TRUE);
|
||||
ATOMIC_SET(&(pcmdpriv->cmdthd_running), true);
|
||||
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
|
||||
|
||||
|
||||
|
@ -712,7 +712,7 @@ post_process:
|
|||
#endif
|
||||
|
||||
/* to avoid enqueue cmd after free all cmd_obj */
|
||||
ATOMIC_SET(&(pcmdpriv->cmdthd_running), _FALSE);
|
||||
ATOMIC_SET(&(pcmdpriv->cmdthd_running), false);
|
||||
|
||||
/* free all cmd_obj resources */
|
||||
do {
|
||||
|
@ -864,12 +864,12 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
|||
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
|
||||
#endif /* CONFIG_P2P_PS */
|
||||
|
||||
|
@ -883,7 +883,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
rtw_free_network_queue(padapter, _FALSE);
|
||||
rtw_free_network_queue(padapter, false);
|
||||
|
||||
|
||||
init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_SiteSurvey));
|
||||
|
@ -1231,7 +1231,7 @@ void rtw_getbbrfreg_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd)
|
|||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted = _TRUE;
|
||||
padapter->mppriv.workparam.bcompleted = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1243,7 +1243,7 @@ void rtw_readtssi_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd)
|
|||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted = _TRUE;
|
||||
padapter->mppriv.workparam.bcompleted = true;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -1375,7 +1375,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||
|
||||
|
||||
/* for hidden ap to set fw_state here */
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) != _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) != true) {
|
||||
switch (ndis_network_mode) {
|
||||
case Ndis802_11IBSS:
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
|
@ -1429,7 +1429,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||
/* If not, we have to copy the connecting AP's MAC address to it so that */
|
||||
/* the driver just has the bssid information for PMKIDList searching. */
|
||||
|
||||
if (pmlmepriv->assoc_by_bssid == _FALSE)
|
||||
if (pmlmepriv->assoc_by_bssid == false)
|
||||
_rtw_memcpy(&pmlmepriv->assoc_bssid[0], &pnetwork->network.MacAddress[0], ETH_ALEN);
|
||||
|
||||
psecnetwork->IELength = rtw_restruct_sec_ie(padapter, &pnetwork->network.IEs[0], &psecnetwork->IEs[0], pnetwork->network.IELength);
|
||||
|
@ -1448,7 +1448,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||
}
|
||||
}
|
||||
|
||||
phtpriv->ht_option = _FALSE;
|
||||
phtpriv->ht_option = false;
|
||||
ptmp = rtw_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_, &tmp_len, pnetwork->network.IELength - 12);
|
||||
if (pregistrypriv->ht_enable && ptmp && tmp_len > 0) {
|
||||
/* Added by Albert 2010/06/23 */
|
||||
|
@ -1482,7 +1482,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||
|
||||
RTW_INFO("FT: Target AP "MAC_FMT" MDID=(0x%2x), capacity=(0x%2x)\n", MAC_ARG(pnetwork->network.MacAddress), pftpriv->mdid, pftpriv->ft_cap);
|
||||
rtw_set_ft_flags(padapter, RTW_FT_SUPPORTED);
|
||||
if ((rtw_chk_ft_flags(padapter, RTW_FT_STA_OVER_DS_SUPPORTED)) && (pftpriv->ft_roam_on_expired == _FALSE) && (pftpriv->ft_cap & 0x01))
|
||||
if ((rtw_chk_ft_flags(padapter, RTW_FT_STA_OVER_DS_SUPPORTED)) && (pftpriv->ft_roam_on_expired == false) && (pftpriv->ft_cap & 0x01))
|
||||
rtw_set_ft_flags(padapter, RTW_FT_OVER_DS_SUPPORTED);
|
||||
} else {
|
||||
/*Don't use FT roaming if Target AP cannot support FT*/
|
||||
|
@ -1607,7 +1607,7 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
|
|||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
|
||||
psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
|
||||
else
|
||||
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, _FALSE);
|
||||
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false);
|
||||
|
||||
if (key_type == GROUP_KEY)
|
||||
_rtw_memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16);
|
||||
|
@ -1621,7 +1621,7 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
|
|||
#endif /* CONFIG_TDLS */
|
||||
|
||||
/* jeff: set this becasue at least sw key is ready */
|
||||
padapter->securitypriv.busetkipkey = _TRUE;
|
||||
padapter->securitypriv.busetkipkey = true;
|
||||
|
||||
if (enqueue) {
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
|
@ -2080,7 +2080,7 @@ static u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const str
|
|||
|
||||
|
||||
/* check if allow software config */
|
||||
if (swconfig && rtw_hal_is_disable_sw_channel_plan(adapter) == _TRUE) {
|
||||
if (swconfig && rtw_hal_is_disable_sw_channel_plan(adapter) == true) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -2151,8 +2151,8 @@ inline u8 rtw_set_country_cmd(_adapter *adapter, int flags, const char *country_
|
|||
{
|
||||
const struct country_chplan *ent;
|
||||
|
||||
if (is_alpha(country_code[0]) == _FALSE
|
||||
|| is_alpha(country_code[1]) == _FALSE
|
||||
if (is_alpha(country_code[0]) == false
|
||||
|| is_alpha(country_code[1]) == false
|
||||
) {
|
||||
RTW_PRINT("%s input country_code is not alpha2\n", __func__);
|
||||
return _FAIL;
|
||||
|
@ -2319,12 +2319,12 @@ exit:
|
|||
/* from_timer == 1 means driver is in LPS */
|
||||
u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
||||
{
|
||||
u8 bEnterPS = _FALSE;
|
||||
u8 bEnterPS = false;
|
||||
u16 BusyThresholdHigh;
|
||||
u16 BusyThresholdLow;
|
||||
u16 BusyThreshold;
|
||||
u8 bBusyTraffic = _FALSE, bTxBusyTraffic = _FALSE, bRxBusyTraffic = _FALSE;
|
||||
u8 bHigherBusyTraffic = _FALSE, bHigherBusyRxTraffic = _FALSE, bHigherBusyTxTraffic = _FALSE;
|
||||
u8 bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false;
|
||||
u8 bHigherBusyTraffic = false, bHigherBusyRxTraffic = false, bHigherBusyTxTraffic = false;
|
||||
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
#ifdef CONFIG_TDLS
|
||||
|
@ -2351,7 +2351,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
|||
/* */
|
||||
/* Determine if our traffic is busy now */
|
||||
/* */
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
/*&& !MgntInitAdapterInProgress(pMgntInfo)*/) {
|
||||
/* if we raise bBusyTraffic in last watchdog, using lower threshold. */
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
|
||||
|
@ -2359,23 +2359,23 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
|||
|
||||
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold ||
|
||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) {
|
||||
bBusyTraffic = _TRUE;
|
||||
bBusyTraffic = true;
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
|
||||
bRxBusyTraffic = _TRUE;
|
||||
bRxBusyTraffic = true;
|
||||
else
|
||||
bTxBusyTraffic = _TRUE;
|
||||
bTxBusyTraffic = true;
|
||||
}
|
||||
|
||||
/* Higher Tx/Rx data. */
|
||||
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
|
||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) {
|
||||
bHigherBusyTraffic = _TRUE;
|
||||
bHigherBusyTraffic = true;
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
|
||||
bHigherBusyRxTraffic = _TRUE;
|
||||
bHigherBusyRxTraffic = true;
|
||||
else
|
||||
bHigherBusyTxTraffic = _TRUE;
|
||||
bHigherBusyTxTraffic = true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TRAFFIC_PROTECT
|
||||
|
@ -2399,7 +2399,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
|||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_AUTOSETUP
|
||||
/* TDLS_WATCHDOG_PERIOD * 2sec, periodically send */
|
||||
if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _TRUE) {
|
||||
if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == true) {
|
||||
if ((ptdlsinfo->watchdog_count % TDLS_WATCHDOG_PERIOD) == 0) {
|
||||
_rtw_memcpy(txmgmt.peer, baddr, ETH_ALEN);
|
||||
issue_tdls_dis_req(padapter, &txmgmt);
|
||||
|
@ -2422,9 +2422,9 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
|||
if (padapter->dump_rx_cnt_mode & DUMP_DRV_TRX_COUNTER_DATA)
|
||||
RTW_INFO("(-)Tx = %d, Rx = %d\n", pmlmepriv->LinkDetectInfo.NumTxOkInPeriod, pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod);
|
||||
#endif
|
||||
bEnterPS = _FALSE;
|
||||
bEnterPS = false;
|
||||
#ifdef CONFIG_LPS_SLOW_TRANSITION
|
||||
if (bBusyTraffic == _TRUE) {
|
||||
if (bBusyTraffic == true) {
|
||||
if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount <= 4)
|
||||
pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 4;
|
||||
|
||||
|
@ -2449,15 +2449,15 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
|||
pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount == 0)
|
||||
bEnterPS = _TRUE;
|
||||
bEnterPS = true;
|
||||
#else /* CONFIG_LPS_SLOW_TRANSITION */
|
||||
bEnterPS = _TRUE;
|
||||
bEnterPS = true;
|
||||
#endif /* CONFIG_LPS_SLOW_TRANSITION */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DYNAMIC_DTIM
|
||||
if (pmlmepriv->LinkDetectInfo.LowPowerTransitionCount == 8)
|
||||
bEnterPS = _FALSE;
|
||||
bEnterPS = false;
|
||||
|
||||
RTW_INFO("LowPowerTransitionCount=%d\n", pmlmepriv->LinkDetectInfo.LowPowerTransitionCount);
|
||||
#endif /* CONFIG_DYNAMIC_DTIM */
|
||||
|
@ -2478,7 +2478,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
|||
/* rtw_hal_dm_watchdog_in_lps(padapter); */
|
||||
}
|
||||
#ifdef CONFIG_DYNAMIC_DTIM
|
||||
if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == _TRUE)
|
||||
if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true)
|
||||
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount++;
|
||||
#endif /* CONFIG_DYNAMIC_DTIM */
|
||||
} else {
|
||||
|
@ -2559,28 +2559,28 @@ static void dynamic_update_bcn_check(_adapter *padapter)
|
|||
if (count % 10 == 0) {
|
||||
count = 1;
|
||||
|
||||
if (_FALSE == ATOMIC_READ(&pmlmepriv->olbc)
|
||||
&& _FALSE == ATOMIC_READ(&pmlmepriv->olbc_ht)) {
|
||||
if (false == ATOMIC_READ(&pmlmepriv->olbc)
|
||||
&& false == ATOMIC_READ(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, false);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* In 2s, there are any legacy AP, update HT info, and then reset count */
|
||||
|
||||
if (_FALSE != ATOMIC_READ(&pmlmepriv->olbc)
|
||||
&& _FALSE != ATOMIC_READ(&pmlmepriv->olbc_ht)) {
|
||||
if (false != ATOMIC_READ(&pmlmepriv->olbc)
|
||||
&& false != ATOMIC_READ(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, false);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true);
|
||||
|
||||
}
|
||||
ATOMIC_SET(&pmlmepriv->olbc, _FALSE);
|
||||
ATOMIC_SET(&pmlmepriv->olbc_ht, _FALSE);
|
||||
ATOMIC_SET(&pmlmepriv->olbc, false);
|
||||
ATOMIC_SET(&pmlmepriv->olbc_ht, false);
|
||||
count = 0;
|
||||
}
|
||||
|
||||
|
@ -2593,7 +2593,7 @@ void rtw_iface_dynamic_chk_wk_hdl(_adapter *padapter)
|
|||
|
||||
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
|
||||
#ifdef CONFIG_AP_MODE
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
expire_timeout_chk(padapter);
|
||||
#endif
|
||||
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */
|
||||
|
@ -2623,7 +2623,7 @@ static void rtw_dynamic_chk_wk_hdl(_adapter *padapter)
|
|||
rtw_hal_sreset_linked_status_check(padapter);
|
||||
#endif
|
||||
|
||||
/* if(check_fwstate(pmlmepriv, _FW_UNDER_LINKING|_FW_UNDER_SURVEY)==_FALSE) */
|
||||
/* if(check_fwstate(pmlmepriv, _FW_UNDER_LINKING|_FW_UNDER_SURVEY)==false) */
|
||||
{
|
||||
#ifdef DBG_RX_COUNTER_DUMP
|
||||
rtw_dump_rx_counters(padapter);
|
||||
|
@ -2660,17 +2660,17 @@ void lps_ctrl_wk_hdl(_adapter *padapter, u8 lps_ctrl_type)
|
|||
u8 mstatus;
|
||||
|
||||
|
||||
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))
|
||||
return;
|
||||
|
||||
switch (lps_ctrl_type) {
|
||||
case LPS_CTRL_SCAN:
|
||||
/* RTW_INFO("LPS_CTRL_SCAN\n"); */
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_ScanNotify(padapter, _TRUE);
|
||||
rtw_btcoex_ScanNotify(padapter, true);
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
/* connect */
|
||||
LPS_Leave(padapter, "LPS_CTRL_SCAN");
|
||||
}
|
||||
|
@ -2823,7 +2823,7 @@ static void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim)
|
|||
return;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == true)
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
@ -2838,7 +2838,7 @@ static void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim)
|
|||
pwrpriv->dtim = dtim;
|
||||
}
|
||||
|
||||
if ((pwrpriv->bFwCurrentInPSMode == _TRUE) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
|
||||
if ((pwrpriv->bFwCurrentInPSMode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
|
||||
u8 ps_mode = pwrpriv->pwr_mode;
|
||||
|
||||
/* RTW_INFO("change DTIM from %d to %d, ps_mode=%d\n", pwrpriv->dtim, dtim, ps_mode); */
|
||||
|
@ -2941,7 +2941,7 @@ exit:
|
|||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||
void antenna_select_wk_hdl(_adapter *padapter, u8 antenna)
|
||||
{
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_ANTDIV_SELECT, &antenna, _TRUE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_ANTDIV_SELECT, &antenna, true);
|
||||
}
|
||||
|
||||
u8 rtw_antenna_select_cmd(_adapter *padapter, u8 antenna, u8 enqueue)
|
||||
|
@ -2950,12 +2950,12 @@ u8 rtw_antenna_select_cmd(_adapter *padapter, u8 antenna, u8 enqueue)
|
|||
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
u8 bSupportAntDiv = _FALSE;
|
||||
u8 bSupportAntDiv = false;
|
||||
u8 res = _SUCCESS;
|
||||
int i;
|
||||
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv));
|
||||
if (_FALSE == bSupportAntDiv)
|
||||
if (false == bSupportAntDiv)
|
||||
return _FAIL;
|
||||
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
|
@ -2963,7 +2963,7 @@ u8 rtw_antenna_select_cmd(_adapter *padapter, u8 antenna, u8 enqueue)
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
if (_TRUE == enqueue) {
|
||||
if (true == enqueue) {
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
|
@ -3239,7 +3239,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
|||
struct sta_info *psta_bmc;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
u32 start = rtw_get_current_time();
|
||||
u8 empty = _FALSE;
|
||||
u8 empty = false;
|
||||
|
||||
psta_bmc = rtw_get_bcmc_stainfo(padapter);
|
||||
if (!psta_bmc)
|
||||
|
@ -3247,23 +3247,23 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
|||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty);
|
||||
|
||||
while (_FALSE == empty && rtw_get_passing_time_ms(start) < rtw_get_wait_hiq_empty_ms()) {
|
||||
while (false == empty && rtw_get_passing_time_ms(start) < rtw_get_wait_hiq_empty_ms()) {
|
||||
rtw_msleep_os(100);
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty);
|
||||
}
|
||||
|
||||
if (psta_bmc->sleepq_len == 0) {
|
||||
if (empty == _SUCCESS) {
|
||||
bool update_tim = _FALSE;
|
||||
bool update_tim = false;
|
||||
|
||||
if (pstapriv->tim_bitmap & BIT(0))
|
||||
update_tim = _TRUE;
|
||||
update_tim = true;
|
||||
|
||||
pstapriv->tim_bitmap &= ~BIT(0);
|
||||
pstapriv->sta_dz_bitmap &= ~BIT(0);
|
||||
|
||||
if (update_tim == _TRUE)
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "bmc sleepq and HIQ empty");
|
||||
if (update_tim == true)
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, true, "bmc sleepq and HIQ empty");
|
||||
} else /* re check again */
|
||||
rtw_chk_hi_queue_cmd(padapter);
|
||||
|
||||
|
@ -3328,7 +3328,7 @@ u8 rtw_dfs_master_hdl(_adapter *adapter)
|
|||
}
|
||||
|
||||
if (!rfctl->dbg_dfs_master_fake_radar_detect_cnt
|
||||
&& rtw_odm_radar_detect(adapter) != _TRUE)
|
||||
&& rtw_odm_radar_detect(adapter) != true)
|
||||
goto cac_status_chk;
|
||||
|
||||
if (rfctl->dbg_dfs_master_fake_radar_detect_cnt != 0) {
|
||||
|
@ -3432,7 +3432,7 @@ void rtw_dfs_master_timer_hdl(strust timer_list *t)
|
|||
#else
|
||||
_adapter *adapter = from_timer(adapter, t, dfs_master_timer);
|
||||
#endif
|
||||
rtw_dfs_master_cmd(adapter, _TRUE);
|
||||
rtw_dfs_master_cmd(adapter, true);
|
||||
}
|
||||
|
||||
void rtw_dfs_master_enable(_adapter *adapter, u8 ch, u8 bw, u8 offset)
|
||||
|
@ -3444,10 +3444,10 @@ void rtw_dfs_master_enable(_adapter *adapter, u8 ch, u8 bw, u8 offset)
|
|||
|
||||
RTW_INFO(FUNC_ADPT_FMT" on %u,%u,%u\n", FUNC_ADPT_ARG(adapter), ch, bw, offset);
|
||||
|
||||
if (rtw_is_cac_reset_needed(adapter, ch, bw, offset) == _TRUE)
|
||||
if (rtw_is_cac_reset_needed(adapter, ch, bw, offset) == true)
|
||||
rtw_reset_cac(adapter, ch, bw, offset);
|
||||
|
||||
rfctl->radar_detect_by_others = _FALSE;
|
||||
rfctl->radar_detect_by_others = false;
|
||||
rfctl->radar_detect_ch = ch;
|
||||
rfctl->radar_detect_bw = bw;
|
||||
rfctl->radar_detect_offset = offset;
|
||||
|
@ -3512,14 +3512,14 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action)
|
|||
struct mlme_ext_priv *mlmeext = &adapter->mlmeextpriv;
|
||||
struct mi_state mstate;
|
||||
u8 u_ch, u_bw, u_offset;
|
||||
bool ld_sta_in_dfs = _FALSE;
|
||||
bool sync_ch = _FALSE; /* _FALSE: asign channel directly */
|
||||
bool needed = _FALSE;
|
||||
bool ld_sta_in_dfs = false;
|
||||
bool sync_ch = false; /* false: asign channel directly */
|
||||
bool needed = false;
|
||||
|
||||
rtw_mi_status_no_self(adapter, &mstate);
|
||||
rtw_mi_get_ch_setting_union_no_self(adapter, &u_ch, &u_bw, &u_offset);
|
||||
if (u_ch != 0)
|
||||
sync_ch = _TRUE;
|
||||
sync_ch = true;
|
||||
|
||||
switch (self_action) {
|
||||
case MLME_STA_CONNECTING:
|
||||
|
@ -3537,7 +3537,7 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action)
|
|||
break;
|
||||
}
|
||||
|
||||
if (sync_ch == _TRUE) {
|
||||
if (sync_ch == true) {
|
||||
if (!rtw_is_chbw_grouped(mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset, u_ch, u_bw, u_offset)) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" can't sync %u,%u,%u with %u,%u,%u\n", FUNC_ADPT_ARG(adapter)
|
||||
, mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset, u_ch, u_bw, u_offset);
|
||||
|
@ -3555,7 +3555,7 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action)
|
|||
if (MSTATE_STA_LD_NUM(&mstate) > 0) {
|
||||
/* rely on AP on which STA mode connects */
|
||||
if (rtw_is_dfs_ch(u_ch, u_bw, u_offset))
|
||||
ld_sta_in_dfs = _TRUE;
|
||||
ld_sta_in_dfs = true;
|
||||
goto apply;
|
||||
}
|
||||
|
||||
|
@ -3570,7 +3570,7 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action)
|
|||
}
|
||||
|
||||
if (rtw_is_dfs_ch(u_ch, u_bw, u_offset))
|
||||
needed = _TRUE;
|
||||
needed = true;
|
||||
|
||||
apply:
|
||||
|
||||
|
@ -3580,7 +3580,7 @@ apply:
|
|||
, FUNC_ADPT_ARG(adapter), MSTATE_STA_LD_NUM(&mstate), MSTATE_STA_LG_NUM(&mstate), MSTATE_AP_NUM(&mstate)
|
||||
, u_ch, u_bw, u_offset);
|
||||
|
||||
if (needed == _TRUE)
|
||||
if (needed == true)
|
||||
rtw_dfs_master_enable(adapter, u_ch, u_bw, u_offset);
|
||||
else
|
||||
rtw_dfs_master_disable(adapter, u_ch, u_bw, u_offset, ld_sta_in_dfs);
|
||||
|
@ -3821,7 +3821,7 @@ static s32 rtw_mp_cmd_hdl(_adapter *padapter, u8 mp_cmd_id)
|
|||
padapter->mppriv.mode = MP_ON;
|
||||
MPT_PwrCtlDM(padapter, 0);
|
||||
}
|
||||
padapter->mppriv.bmac_filter = _FALSE;
|
||||
padapter->mppriv.bmac_filter = false;
|
||||
odm_write_dig(&pHalData->odmpriv, 0x20);
|
||||
} else if (mp_cmd_id == MP_STOP) {
|
||||
if (padapter->registrypriv.mp_mode == 1) {
|
||||
|
@ -4097,7 +4097,7 @@ s32 c2h_evt_hdl(_adapter *adapter, u8 *c2h_evt, c2h_id_filter filter)
|
|||
|
||||
rtw_hal_c2h_reg_hdr_parse(adapter, c2h_evt, &id, &seq, &plen, &payload);
|
||||
|
||||
if (filter && filter(adapter, id, seq, plen, payload) == _FALSE)
|
||||
if (filter && filter(adapter, id, seq, plen, payload) == false)
|
||||
goto exit;
|
||||
|
||||
ret = rtw_hal_c2h_handler(adapter, id, seq, plen, payload);
|
||||
|
@ -4203,7 +4203,7 @@ static void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
|
|||
phead = &st_ctl->tracker_q.queue;
|
||||
plist = get_next(phead);
|
||||
pnext = get_next(plist);
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = pnext;
|
||||
pnext = get_next(pnext);
|
||||
|
@ -4235,7 +4235,7 @@ static void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
|
|||
_exit_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
|
||||
plist = get_next(&dlist);
|
||||
while (rtw_end_of_queue_search(&dlist, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(&dlist, plist) == false) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = get_next(plist);
|
||||
rtw_mfree((u8 *)st, sizeof(struct session_tracker));
|
||||
|
@ -4266,7 +4266,7 @@ static void session_tracker_chk_for_adapter(_adapter *adapter)
|
|||
phead = &(stapriv->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) {
|
||||
sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
|
||||
|
@ -4324,7 +4324,7 @@ static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
|
|||
|
||||
phead = &st_ctl->tracker_q.queue;
|
||||
plist = get_next(phead);
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
|
||||
if (st->local_naddr == local_naddr
|
||||
|
@ -4336,7 +4336,7 @@ static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
|
|||
plist = get_next(plist);
|
||||
}
|
||||
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
st = NULL;
|
||||
|
||||
switch (cmd) {
|
||||
|
@ -4617,7 +4617,7 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status)
|
|||
|
||||
pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network);
|
||||
_rtw_memcpy(&(pwlan->network), pdev_network, pdev_network->Length);
|
||||
/* pwlan->fixed = _TRUE; */
|
||||
/* pwlan->fixed = true; */
|
||||
|
||||
/* copy pdev_network information to pmlmepriv->cur_network */
|
||||
_rtw_memcpy(&mlme_cur_network->network, pdev_network, (get_WLAN_BSSID_EX_sz(pdev_network)));
|
||||
|
@ -4673,7 +4673,7 @@ void rtw_setassocsta_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd)
|
|||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true))
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
set_fwstate(pmlmepriv, _FW_LINKED);
|
||||
|
@ -4691,7 +4691,7 @@ void rtw_getrttbl_cmd_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd)
|
|||
rtw_free_cmd_obj(pcmd);
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted = _TRUE;
|
||||
padapter->mppriv.workparam.bcompleted = true;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
122
core/rtw_debug.c
122
core/rtw_debug.c
|
@ -255,9 +255,9 @@ bool rtw_fwdl_test_trigger_chksum_fail(void)
|
|||
if (fwdl_test_chksum_fail) {
|
||||
RTW_PRINT("fwdl test case: trigger chksum_fail\n");
|
||||
fwdl_test_chksum_fail--;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool rtw_fwdl_test_trigger_wintint_rdy_fail(void)
|
||||
|
@ -265,9 +265,9 @@ bool rtw_fwdl_test_trigger_wintint_rdy_fail(void)
|
|||
if (fwdl_test_wintint_rdy_fail) {
|
||||
RTW_PRINT("fwdl test case: trigger wintint_rdy_fail\n");
|
||||
fwdl_test_wintint_rdy_fail--;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static u32 g_wait_hiq_empty_ms = 0;
|
||||
|
@ -284,9 +284,9 @@ bool rtw_del_rx_ampdu_test_trigger_no_tx_fail(void)
|
|||
if (del_rx_ampdu_test_no_tx_fail) {
|
||||
RTW_PRINT("del_rx_ampdu test case: trigger no_tx_fail\n");
|
||||
del_rx_ampdu_test_no_tx_fail--;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtw_sink_rtp_seq_dbg(_adapter *adapter, _pkt *pkt)
|
||||
|
@ -684,16 +684,16 @@ int proc_get_rx_stat(struct seq_file *m, void *v)
|
|||
for (i = 0; i < NUM_STA; i++) {
|
||||
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);
|
||||
pstats = &psta->sta_stats;
|
||||
|
||||
if (pstats == NULL)
|
||||
continue;
|
||||
if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE)
|
||||
&& (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE)
|
||||
&& (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(adapter), 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(adapter), 6) != true)) {
|
||||
RTW_PRINT_SEL(m, "MAC :\t\t"MAC_FMT "\n", MAC_ARG(psta->hwaddr));
|
||||
RTW_PRINT_SEL(m, "data_rx_cnt :\t%llu\n", pstats->rx_data_pkts - pstats->rx_data_last_pkts);
|
||||
pstats->rx_data_last_pkts = pstats->rx_data_pkts;
|
||||
|
@ -734,12 +734,12 @@ int proc_get_tx_stat(struct seq_file *m, void *v)
|
|||
sta_rec[i] = NULL;
|
||||
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(adapter), 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(adapter), 6) != true)) {
|
||||
sta_rec[macid_rec_idx++] = psta;
|
||||
}
|
||||
}
|
||||
|
@ -1255,14 +1255,14 @@ int proc_get_survey_info(struct seq_file *m, void *v)
|
|||
|
||||
RTW_PRINT_SEL(m, "%5s %-17s %3s %-3s %-4s %-4s %5s %32s %32s\n", "index", "bssid", "ch", "RSSI", "SdBm", "Noise", "age", "flag", "ssid");
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
if (!pnetwork)
|
||||
break;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE &&
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true &&
|
||||
is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) {
|
||||
notify_signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);/* dbm */
|
||||
} else {
|
||||
|
@ -1311,8 +1311,8 @@ ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
bool need_indicate_scan_done = _FALSE;
|
||||
u8 _status = _FALSE;
|
||||
bool need_indicate_scan_done = false;
|
||||
u8 _status = false;
|
||||
NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
|
||||
if (count < 1)
|
||||
|
@ -1338,8 +1338,8 @@ ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_
|
|||
goto cancel_ps_deny;
|
||||
}
|
||||
|
||||
if (rtw_mi_busy_traffic_check(padapter, _FALSE)) {
|
||||
RTW_INFO("scan abort!! BusyTraffic == _TRUE\n");
|
||||
if (rtw_mi_busy_traffic_check(padapter, false)) {
|
||||
RTW_INFO("scan abort!! BusyTraffic == true\n");
|
||||
goto cancel_ps_deny;
|
||||
}
|
||||
|
||||
|
@ -1347,7 +1347,7 @@ ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_
|
|||
RTW_INFO("scan abort!! AP mode process WPS\n");
|
||||
goto cancel_ps_deny;
|
||||
}
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == true) {
|
||||
RTW_INFO("scan abort!! fwstate=0x%x\n", pmlmepriv->fw_state);
|
||||
goto cancel_ps_deny;
|
||||
}
|
||||
|
@ -1476,7 +1476,7 @@ int proc_get_dis_pwt(struct seq_file *m, void *v)
|
|||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
u8 dis_pwt = 0;
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DIS_PWT, &(dis_pwt));
|
||||
RTW_PRINT_SEL(m, " Tx Power training mode:%s\n", (dis_pwt == _TRUE) ? "Disable" : "Enable");
|
||||
RTW_PRINT_SEL(m, " Tx Power training mode:%s\n", (dis_pwt == true) ? "Disable" : "Enable");
|
||||
return 0;
|
||||
}
|
||||
ssize_t proc_set_dis_pwt(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data)
|
||||
|
@ -1497,7 +1497,7 @@ ssize_t proc_set_dis_pwt(struct file *file, const char __user *buffer, size_t co
|
|||
if (buffer && !copy_from_user(tmp, buffer, count)) {
|
||||
|
||||
int num = sscanf(tmp, "%hhx", &dis_pwt);
|
||||
RTW_INFO("Set Tx Power training mode:%s\n", (dis_pwt == _TRUE) ? "Disable" : "Enable");
|
||||
RTW_INFO("Set Tx Power training mode:%s\n", (dis_pwt == true) ? "Disable" : "Enable");
|
||||
|
||||
if (num >= 1)
|
||||
rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DIS_PWT, &(dis_pwt));
|
||||
|
@ -2169,7 +2169,7 @@ int proc_get_trx_info_debug(struct seq_file *m, void *v)
|
|||
rtw_hal_get_def_var(padapter, HW_DEF_RA_INFO_DUMP, m);
|
||||
|
||||
/*============ rx info ============ */
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_RX_INFO_DUMP, m, _FALSE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_RX_INFO_DUMP, m, false);
|
||||
|
||||
|
||||
return 0;
|
||||
|
@ -2997,7 +2997,7 @@ int proc_get_all_sta_info(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);
|
||||
|
@ -3410,7 +3410,7 @@ ssize_t proc_set_pattern_info(struct file *file, const char __user *buffer,
|
|||
pwrpriv->patterns[index].content,
|
||||
&pwrpriv->patterns[index].len,
|
||||
pwrpriv->patterns[index].mask);
|
||||
if (ret == _TRUE)
|
||||
if (ret == true)
|
||||
pwrpriv->wowlan_pattern_idx++;
|
||||
}
|
||||
}
|
||||
|
@ -3494,8 +3494,8 @@ int proc_get_p2p_wowlan_info(struct seq_file *m, void *v)
|
|||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
struct p2p_wowlan_info peerinfo = pwdinfo->p2p_wow_info;
|
||||
if (_TRUE == peerinfo.is_trigger) {
|
||||
RTW_PRINT_SEL(m, "is_trigger: TRUE\n");
|
||||
if (true == peerinfo.is_trigger) {
|
||||
RTW_PRINT_SEL(m, "is_trigger: true\n");
|
||||
switch (peerinfo.wowlan_recv_frame_type) {
|
||||
case P2P_WOWLAN_RECV_NEGO_REQ:
|
||||
RTW_PRINT_SEL(m, "Frame Type: Nego Request\n");
|
||||
|
@ -3608,15 +3608,15 @@ static int proc_tdls_display_tdls_function_info(struct seq_file *m)
|
|||
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
||||
u8 SpaceBtwnItemAndValue = TDLS_DBG_INFO_SPACE_BTWN_ITEM_AND_VALUE;
|
||||
u8 SpaceBtwnItemAndValueTmp = 0;
|
||||
bool FirstMatchFound = _FALSE;
|
||||
bool FirstMatchFound = false;
|
||||
int j = 0;
|
||||
|
||||
RTW_PRINT_SEL(m, "============[TDLS Function Info]============\n");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Prohibited", (ptdlsinfo->ap_prohibited == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Channel Switch Prohibited", (ptdlsinfo->ch_switch_prohibited == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Link Established", (ptdlsinfo->link_established == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Prohibited", (ptdlsinfo->ap_prohibited == true) ? "true" : "false");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Channel Switch Prohibited", (ptdlsinfo->ch_switch_prohibited == true) ? "true" : "false");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Link Established", (ptdlsinfo->link_established == true) ? "true" : "false");
|
||||
RTW_PRINT_SEL(m, "%-*s = %d/%d\n", SpaceBtwnItemAndValue, "TDLS STA Num (Linked/Allowed)", ptdlsinfo->sta_cnt, MAX_ALLOWED_TDLS_STA_NUM);
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Allowed STA Num Reached", (ptdlsinfo->sta_maximum == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Allowed STA Num Reached", (ptdlsinfo->sta_maximum == true) ? "true" : "false");
|
||||
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
RTW_PRINT_SEL(m, "%-*s =", SpaceBtwnItemAndValue, "TDLS CH SW State");
|
||||
|
@ -3625,9 +3625,9 @@ static int proc_tdls_display_tdls_function_info(struct seq_file *m)
|
|||
else {
|
||||
for (j = 0; j < 32; j++) {
|
||||
if (ptdlsinfo->chsw_info.ch_sw_state & BIT(j)) {
|
||||
if (FirstMatchFound == _FALSE) {
|
||||
if (FirstMatchFound == false) {
|
||||
SpaceBtwnItemAndValueTmp = 1;
|
||||
FirstMatchFound = _TRUE;
|
||||
FirstMatchFound = true;
|
||||
} else
|
||||
SpaceBtwnItemAndValueTmp = SpaceBtwnItemAndValue + 3;
|
||||
switch (BIT(j)) {
|
||||
|
@ -3666,17 +3666,17 @@ static int proc_tdls_display_tdls_function_info(struct seq_file *m)
|
|||
}
|
||||
}
|
||||
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS CH SW On", (ATOMIC_READ(&ptdlsinfo->chsw_info.chsw_on) == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS CH SW On", (ATOMIC_READ(&ptdlsinfo->chsw_info.chsw_on) == true) ? "true" : "false");
|
||||
RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Off-Channel Num", ptdlsinfo->chsw_info.off_ch_num);
|
||||
RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Channel Offset", ptdlsinfo->chsw_info.ch_offset);
|
||||
RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Current Time", ptdlsinfo->chsw_info.cur_time);
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS CH SW Delay Switch Back", (ptdlsinfo->chsw_info.delay_switch_back == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS CH SW Delay Switch Back", (ptdlsinfo->chsw_info.delay_switch_back == true) ? "true" : "false");
|
||||
RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Dump Back", ptdlsinfo->chsw_info.dump_stack);
|
||||
#endif
|
||||
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Device Discovered", (ptdlsinfo->dev_discovered == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Enable", (ptdlsinfo->tdls_enable == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Driver Setup", (ptdlsinfo->driver_setup == _TRUE) ? "_TRUE" : "_FALSE");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Device Discovered", (ptdlsinfo->dev_discovered == true) ? "true" : "false");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Enable", (ptdlsinfo->tdls_enable == true) ? "true" : "false");
|
||||
RTW_PRINT_SEL(m, "%-*s = %s\n", SpaceBtwnItemAndValue, "TDLS Driver Setup", (ptdlsinfo->driver_setup == true) ? "true" : "false");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -3812,14 +3812,14 @@ static int proc_tdls_display_tdls_sta_info(struct seq_file *m)
|
|||
u8 SpaceBtwnItemAndValue = TDLS_DBG_INFO_SPACE_BTWN_ITEM_AND_VALUE;
|
||||
u8 SpaceBtwnItemAndValueTmp = 0;
|
||||
u8 NumOfTdlsStaToShow = 0;
|
||||
bool FirstMatchFound = _FALSE;
|
||||
bool FirstMatchFound = false;
|
||||
|
||||
/* Search for TDLS sta info to display */
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
for (i = 0; i < NUM_STA; i++) {
|
||||
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 (psta->tdls_sta_state != TDLS_STATE_NONE) {
|
||||
|
@ -3828,12 +3828,12 @@ static int proc_tdls_display_tdls_sta_info(struct seq_file *m)
|
|||
RTW_PRINT_SEL(m, "%-*s = "MAC_FMT"\n", SpaceBtwnItemAndValue, "Mac Address", MAC_ARG(psta->hwaddr));
|
||||
RTW_PRINT_SEL(m, "%-*s =", SpaceBtwnItemAndValue, "TDLS STA State");
|
||||
SpaceBtwnItemAndValueTmp = 0;
|
||||
FirstMatchFound = _FALSE;
|
||||
FirstMatchFound = false;
|
||||
for (j = 0; j < 32; j++) {
|
||||
if (psta->tdls_sta_state & BIT(j)) {
|
||||
if (FirstMatchFound == _FALSE) {
|
||||
if (FirstMatchFound == false) {
|
||||
SpaceBtwnItemAndValueTmp = 1;
|
||||
FirstMatchFound = _TRUE;
|
||||
FirstMatchFound = true;
|
||||
} else
|
||||
SpaceBtwnItemAndValueTmp = SpaceBtwnItemAndValue + 3;
|
||||
switch (BIT(j)) {
|
||||
|
@ -3984,9 +3984,9 @@ int proc_get_tdls_info(struct seq_file *m, void *v)
|
|||
u8 SpaceBtwnItemAndValue = 41;
|
||||
u8 SpaceBtwnItemAndValueTmp = 0;
|
||||
u8 NumOfTdlsStaToShow = 0;
|
||||
bool FirstMatchFound = _FALSE;
|
||||
bool FirstMatchFound = false;
|
||||
|
||||
if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _FALSE) {
|
||||
if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == false) {
|
||||
RTW_PRINT_SEL(m, "No tdls info can be shown since hal doesn't support tdls\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -4061,7 +4061,7 @@ int proc_get_efuse_map(struct seq_file *m, void *v)
|
|||
u8 ips_mode = IPS_NUM;
|
||||
u16 mapLen;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
if (mapLen > EFUSE_MAX_MAP_LEN)
|
||||
mapLen = EFUSE_MAX_MAP_LEN;
|
||||
|
||||
|
@ -4153,12 +4153,12 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_
|
|||
RTW_INFO("0: set sa query request , key_type=%d\n", key_type);
|
||||
}
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) && padapter->securitypriv.binstallBIPkey == _TRUE) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == true) && padapter->securitypriv.binstallBIPkey == true) {
|
||||
RTW_INFO("STA:"MAC_FMT"\n", MAC_ARG(get_my_bssid(&(pmlmeinfo->network))));
|
||||
/* TX unicast sa_query to AP */
|
||||
issue_action_SA_Query(padapter, get_my_bssid(&(pmlmeinfo->network)), 0, 0, (u8)key_type);
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE && padapter->securitypriv.binstallBIPkey == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true && padapter->securitypriv.binstallBIPkey == true) {
|
||||
/* TX unicast sa_query to every client STA */
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
for (index = 0; index < NUM_STA; index++) {
|
||||
|
@ -4167,7 +4167,7 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_
|
|||
phead = &(pstapriv->sta_hash[index]);
|
||||
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);
|
||||
_rtw_memcpy(&mac_addr[psta->mac_id][0], psta->hwaddr, ETH_ALEN);
|
||||
|
@ -4236,13 +4236,13 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t
|
|||
if (key_type < 0 || key_type > 4)
|
||||
return count;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
|
||||
if (key_type == 3) /* key_type 3 only for AP mode */
|
||||
return count;
|
||||
/* TX unicast deauth to AP */
|
||||
issue_deauth_11w(padapter, get_my_bssid(&(pmlmeinfo->network)), 0, (u8)key_type);
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||
|
||||
if (key_type == 3)
|
||||
issue_deauth_11w(padapter, bc_addr, 0, IEEE80211W_RIGHT_KEY);
|
||||
|
@ -4255,7 +4255,7 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t
|
|||
phead = &(pstapriv->sta_hash[index]);
|
||||
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);
|
||||
_rtw_memcpy(&mac_addr[psta->mac_id][0], psta->hwaddr, ETH_ALEN);
|
||||
|
@ -4271,13 +4271,13 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t
|
|||
|
||||
psta = rtw_get_stainfo(pstapriv, &mac_addr[index][0]);
|
||||
if (psta && key_type != IEEE80211W_WRONG_KEY && key_type != IEEE80211W_NO_KEY) {
|
||||
u8 updated = _FALSE;
|
||||
u8 updated = false;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&psta->asoc_list) == _FALSE) {
|
||||
if (rtw_is_list_empty(&psta->asoc_list) == false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, _FALSE, WLAN_REASON_PREV_AUTH_NOT_VALID, _TRUE);
|
||||
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_PREV_AUTH_NOT_VALID, true);
|
||||
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
|
@ -4339,8 +4339,8 @@ ssize_t proc_set_tx_auth(struct file *file, const char __user *buffer, size_t co
|
|||
RTW_INFO("1: setnd auth, 2: send assoc request. tx_auth=%d\n", tx_auth);
|
||||
}
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
|
||||
if (tx_auth == 1) {
|
||||
/* TX unicast auth to AP */
|
||||
issue_auth(padapter, NULL, 0);
|
||||
|
|
132
core/rtw_efuse.c
132
core/rtw_efuse.c
|
@ -50,7 +50,7 @@ static bool rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset)
|
|||
int result = 0;
|
||||
|
||||
if (pAdapter->registrypriv.boffefusemask)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (c < 4) /* Upper double word */
|
||||
result = (maskfileBuffer[r] & (0x10 << c));
|
||||
|
@ -65,12 +65,12 @@ static bool efuse_IsMasked(PADAPTER pAdapter, u16 Offset)
|
|||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);
|
||||
|
||||
if (pAdapter->registrypriv.boffefusemask)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (IS_HARDWARE_TYPE_8188E(pAdapter))
|
||||
return (IS_MASKED(8188E, _MUSB, Offset)) ? TRUE : FALSE;
|
||||
return (IS_MASKED(8188E, _MUSB, Offset)) ? true : false;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtw_efuse_mask_array(PADAPTER pAdapter, u8 *pArray)
|
||||
|
@ -95,14 +95,14 @@ u8 rtw_efuse_mask_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
u8 ret = _SUCCESS;
|
||||
u16 mapLen = 0, i = 0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
ret = rtw_efuse_map_read(padapter, addr, cnts , data);
|
||||
|
||||
if (padapter->registrypriv.boffefusemask == 0) {
|
||||
|
||||
for (i = 0; i < cnts; i++) {
|
||||
if (padapter->registrypriv.bFileMaskEfuse == _TRUE) {
|
||||
if (padapter->registrypriv.bFileMaskEfuse == true) {
|
||||
if (rtw_file_efuse_IsMasked(padapter, addr + i)) /*use file efuse mask.*/
|
||||
data[i] = 0xff;
|
||||
} else {
|
||||
|
@ -150,13 +150,13 @@ Efuse_Read1ByteFromFakeContent(
|
|||
u8 *Value)
|
||||
{
|
||||
if (Offset >= EFUSE_MAX_HW_SIZE)
|
||||
return _FALSE;
|
||||
return false;
|
||||
/* DbgPrint("Read fake content, offset = %d\n", Offset); */
|
||||
if (fakeEfuseBank == 0)
|
||||
*Value = fakeEfuseContent[Offset];
|
||||
else
|
||||
*Value = fakeBTEfuseContent[fakeEfuseBank - 1][Offset];
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -171,12 +171,12 @@ Efuse_Write1ByteToFakeContent(
|
|||
u8 Value)
|
||||
{
|
||||
if (Offset >= EFUSE_MAX_HW_SIZE)
|
||||
return _FALSE;
|
||||
return false;
|
||||
if (fakeEfuseBank == 0)
|
||||
fakeEfuseContent[Offset] = Value;
|
||||
else
|
||||
fakeBTEfuseContent[fakeEfuseBank - 1][Offset] = Value;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -401,10 +401,10 @@ efuse_OneByteRead(
|
|||
}
|
||||
if (tmpidx < 100) {
|
||||
*data = rtw_read8(pAdapter, EFUSE_CTRL);
|
||||
bResult = _TRUE;
|
||||
bResult = true;
|
||||
} else {
|
||||
*data = 0xff;
|
||||
bResult = _FALSE;
|
||||
bResult = false;
|
||||
RTW_INFO("%s: [ERROR] addr=0x%x bResult=%d time out 1s !!!\n", __func__, addr, bResult);
|
||||
RTW_INFO("%s: [ERROR] EFUSE_CTRL =0x%08x !!!\n", __func__, rtw_read32(pAdapter, EFUSE_CTRL));
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ efuse_OneByteWrite(
|
|||
bool bPseudoTest)
|
||||
{
|
||||
u8 tmpidx = 0;
|
||||
u8 bResult = _FALSE;
|
||||
u8 bResult = false;
|
||||
u32 efuseValue = 0;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||
|
||||
|
@ -433,7 +433,7 @@ efuse_OneByteWrite(
|
|||
return bResult;
|
||||
}
|
||||
|
||||
Efuse_PowerSwitch(pAdapter, _TRUE, _TRUE);
|
||||
Efuse_PowerSwitch(pAdapter, true, true);
|
||||
|
||||
/* -----------------e-fuse reg ctrl --------------------------------- */
|
||||
/* address */
|
||||
|
@ -463,9 +463,9 @@ efuse_OneByteWrite(
|
|||
}
|
||||
|
||||
if (tmpidx < 100)
|
||||
bResult = _TRUE;
|
||||
bResult = true;
|
||||
else {
|
||||
bResult = _FALSE;
|
||||
bResult = false;
|
||||
RTW_INFO("%s: [ERROR] addr=0x%x ,efuseValue=0x%x ,bResult=%d time out 1s !!!\n",
|
||||
__func__, addr, efuseValue, bResult);
|
||||
RTW_INFO("%s: [ERROR] EFUSE_CTRL =0x%08x !!!\n", __func__, rtw_read32(pAdapter, EFUSE_CTRL));
|
||||
|
@ -476,7 +476,7 @@ efuse_OneByteWrite(
|
|||
(IS_CHIP_VENDOR_SMIC(pHalData->version_id)))
|
||||
phy_set_mac_reg(pAdapter, EFUSE_TEST, BIT(11), 0);
|
||||
|
||||
Efuse_PowerSwitch(pAdapter, _TRUE, _FALSE);
|
||||
Efuse_PowerSwitch(pAdapter, true, false);
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
@ -540,12 +540,12 @@ Efuse_WordEnableDataWrite(PADAPTER pAdapter,
|
|||
|
||||
static u8 efuse_read8(PADAPTER padapter, u16 address, u8 *value)
|
||||
{
|
||||
return efuse_OneByteRead(padapter, address, value, _FALSE);
|
||||
return efuse_OneByteRead(padapter, address, value, false);
|
||||
}
|
||||
|
||||
static u8 efuse_write8(PADAPTER padapter, u16 address, u8 *value)
|
||||
{
|
||||
return efuse_OneByteWrite(padapter, address, *value, _FALSE);
|
||||
return efuse_OneByteWrite(padapter, address, *value, false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -560,13 +560,13 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
|||
u32 backupRegs[4] = {0};
|
||||
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, false);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
|
||||
|
||||
if (start_addr > real_content_len)
|
||||
return _FAIL;
|
||||
|
||||
if (_TRUE == bWrite) {
|
||||
if (true == bWrite) {
|
||||
if ((start_addr + cnts) > max_available_size)
|
||||
return _FAIL;
|
||||
rw8 = &efuse_write8;
|
||||
|
@ -575,7 +575,7 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
|||
|
||||
efuse_PreUpdateAction(padapter, backupRegs);
|
||||
|
||||
Efuse_PowerSwitch(padapter, bWrite, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, bWrite, true);
|
||||
|
||||
/* e-fuse one byte read / write */
|
||||
for (i = 0; i < cnts; i++) {
|
||||
|
@ -589,7 +589,7 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
|||
break;
|
||||
}
|
||||
|
||||
Efuse_PowerSwitch(padapter, bWrite, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, bWrite, false);
|
||||
|
||||
efuse_PostUpdateAction(padapter, backupRegs);
|
||||
|
||||
|
@ -601,15 +601,15 @@ u16 efuse_GetMaxSize(PADAPTER padapter)
|
|||
u16 max_size;
|
||||
|
||||
max_size = 0;
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false);
|
||||
return max_size;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
u8 efuse_GetCurrentSize(PADAPTER padapter, u16 *size)
|
||||
{
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _TRUE);
|
||||
*size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, false, true);
|
||||
*size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
|
||||
Efuse_PowerSwitch(padapter, false, false);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -619,15 +619,15 @@ u16 efuse_bt_GetMaxSize(PADAPTER padapter)
|
|||
u16 max_size;
|
||||
|
||||
max_size = 0;
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false);
|
||||
return max_size;
|
||||
}
|
||||
|
||||
u8 efuse_bt_GetCurrentSize(PADAPTER padapter, u16 *size)
|
||||
{
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _TRUE);
|
||||
*size = Efuse_GetCurrentSize(padapter, EFUSE_BT, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, false, true);
|
||||
*size = Efuse_GetCurrentSize(padapter, EFUSE_BT, false);
|
||||
Efuse_PowerSwitch(padapter, false, false);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -636,16 +636,16 @@ u8 rtw_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
{
|
||||
u16 mapLen = 0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
if ((addr + cnts) > mapLen)
|
||||
return _FAIL;
|
||||
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, false, true);
|
||||
|
||||
efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, _FALSE);
|
||||
efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
|
||||
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, false, false);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -654,16 +654,16 @@ u8 rtw_BT_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
{
|
||||
u16 mapLen = 0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
if ((addr + cnts) > mapLen)
|
||||
return _FAIL;
|
||||
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, false, true);
|
||||
|
||||
efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, _FALSE);
|
||||
efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
|
||||
|
||||
Efuse_PowerSwitch(padapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, false, false);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -689,8 +689,8 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
PEFUSE_HAL pEfuseHal = &pHalData->EfuseHal;
|
||||
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, &efuse_max_available_len, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, &efuse_max_available_len, false);
|
||||
|
||||
if ((addr + cnts) > mapLen)
|
||||
return _FAIL;
|
||||
|
@ -710,7 +710,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
|
||||
if (padapter->registrypriv.boffefusemask == 0) {
|
||||
for (i = 0; i < cnts; i++) {
|
||||
if (padapter->registrypriv.bFileMaskEfuse == _TRUE) {
|
||||
if (padapter->registrypriv.bFileMaskEfuse == true) {
|
||||
if (rtw_file_efuse_IsMasked(padapter, addr + i)) /*use file efuse mask. */
|
||||
data[i] = map[addr + i];
|
||||
} else {
|
||||
|
@ -720,7 +720,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
RTW_INFO("%s , data[%d] = %x, map[addr+i]= %x\n", __func__, i, data[i], map[addr + i]);
|
||||
}
|
||||
}
|
||||
/*Efuse_PowerSwitch(padapter, _TRUE, _TRUE);*/
|
||||
/*Efuse_PowerSwitch(padapter, true, true);*/
|
||||
|
||||
chk_total_byte = 0;
|
||||
idx = 0;
|
||||
|
@ -750,7 +750,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
rtw_hal_get_hwreg(padapter, HW_VAR_EFUSE_BYTES, (u8 *)&startAddr);
|
||||
|
||||
if (startAddr == 0) {
|
||||
startAddr = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, _FALSE);
|
||||
startAddr = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
|
||||
RTW_INFO("%s: Efuse_GetCurrentSize startAddr=%#X\n", __func__, startAddr);
|
||||
}
|
||||
RTW_DBG("%s: startAddr=%#X\n", __func__, startAddr);
|
||||
|
@ -778,7 +778,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
}
|
||||
|
||||
if (word_en != 0xF) {
|
||||
ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, _FALSE);
|
||||
ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false);
|
||||
RTW_INFO("offset=%x\n", offset);
|
||||
RTW_INFO("word_en=%x\n", word_en);
|
||||
|
||||
|
@ -791,7 +791,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
offset++;
|
||||
}
|
||||
|
||||
/*Efuse_PowerSwitch(padapter, _TRUE, _FALSE);*/
|
||||
/*Efuse_PowerSwitch(padapter, true, false);*/
|
||||
|
||||
efuse_PostUpdateAction(padapter, backupRegs);
|
||||
|
||||
|
@ -819,7 +819,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
u8 ret = _SUCCESS;
|
||||
u16 mapLen = 0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
if ((addr + cnts) > mapLen)
|
||||
return _FAIL;
|
||||
|
@ -845,7 +845,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
RTW_INFO("\n");
|
||||
}
|
||||
RTW_INFO("\n");
|
||||
Efuse_PowerSwitch(padapter, _TRUE, _TRUE);
|
||||
Efuse_PowerSwitch(padapter, true, true);
|
||||
|
||||
idx = 0;
|
||||
offset = (addr >> 3);
|
||||
|
@ -867,7 +867,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
for (i = 0; i < PGPKT_DATA_SIZE; i++)
|
||||
RTW_INFO("0x%02X ", newdata[i]);
|
||||
RTW_INFO("\n");
|
||||
ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, _FALSE);
|
||||
ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, false);
|
||||
if (ret == _FAIL)
|
||||
break;
|
||||
}
|
||||
|
@ -875,7 +875,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||
offset++;
|
||||
}
|
||||
|
||||
Efuse_PowerSwitch(padapter, _TRUE, _FALSE);
|
||||
Efuse_PowerSwitch(padapter, true, false);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -915,13 +915,13 @@ Efuse_ReadAllMap(
|
|||
{
|
||||
u16 mapLen = 0;
|
||||
|
||||
Efuse_PowerSwitch(pAdapter, _FALSE, _TRUE);
|
||||
Efuse_PowerSwitch(pAdapter, false, true);
|
||||
|
||||
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
|
||||
|
||||
efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, bPseudoTest);
|
||||
|
||||
Efuse_PowerSwitch(pAdapter, _FALSE, _FALSE);
|
||||
Efuse_PowerSwitch(pAdapter, false, false);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -1233,7 +1233,7 @@ void EFUSE_ShadowMapUpdate(
|
|||
u16 mapLen = 0;
|
||||
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
|
||||
|
||||
if (pHalData->bautoload_fail_flag == _TRUE)
|
||||
if (pHalData->bautoload_fail_flag == true)
|
||||
memset(pHalData->efuse_eeprom_data, 0xFF, mapLen);
|
||||
else {
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
|
@ -1289,7 +1289,7 @@ u8 mac_hidden_wl_func_to_hal_wl_func(u8 func)
|
|||
|
||||
int isAdaptorInfoFileValid(void)
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int storeAdaptorInfoFile(char *path, u8 *efuse_data)
|
||||
|
@ -1341,13 +1341,13 @@ u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len)
|
|||
|
||||
ptmpbuf = rtw_zmalloc(bufsize);
|
||||
if (ptmpbuf == NULL)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
count = rtw_retrieve_from_file(filepatch, ptmpbuf, bufsize);
|
||||
if (count <= 100) {
|
||||
rtw_mfree(ptmpbuf, bufsize);
|
||||
RTW_ERR("%s, filepatch %s, size=%d, FAIL!!\n", __func__, filepatch, count);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
|
@ -1384,7 +1384,7 @@ u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len)
|
|||
|
||||
rtw_mfree(ptmpbuf, bufsize);
|
||||
RTW_INFO("%s, filepatch %s, size=%d, done\n", __func__, filepatch, count);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
||||
|
@ -1394,14 +1394,14 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
|
|||
u8 c;
|
||||
u8 temp[3];
|
||||
u8 temp_i;
|
||||
u8 end = _FALSE;
|
||||
u8 end = false;
|
||||
u32 ret = _FAIL;
|
||||
|
||||
u8 *file_data = NULL;
|
||||
u32 file_size, read_size, pos = 0;
|
||||
u8 *map = NULL;
|
||||
|
||||
if (rtw_is_file_readable_with_size(path, &file_size) != _TRUE) {
|
||||
if (rtw_is_file_readable_with_size(path, &file_size) != true) {
|
||||
RTW_PRINT("%s %s is not readable\n", __func__, path);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1432,16 +1432,16 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
|
|||
|
||||
while (1) {
|
||||
if (pos >= read_size) {
|
||||
end = _TRUE;
|
||||
end = true;
|
||||
break;
|
||||
}
|
||||
c = file_data[pos++];
|
||||
|
||||
/* bypass spece or eol or null before first hex digit */
|
||||
if (temp_i == 0 && (is_eol(c) == _TRUE || is_space(c) == _TRUE || is_null(c) == _TRUE))
|
||||
if (temp_i == 0 && (is_eol(c) == true || is_space(c) == true || is_null(c) == true))
|
||||
continue;
|
||||
|
||||
if (IsHexDigit(c) == _FALSE) {
|
||||
if (IsHexDigit(c) == false) {
|
||||
RTW_ERR("%s invalid 8-bit hex format for offset:0x%03x\n", __func__, i);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1458,7 +1458,7 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
|
|||
}
|
||||
}
|
||||
|
||||
if (end == _TRUE) {
|
||||
if (end == true) {
|
||||
if (temp_i != 0) {
|
||||
RTW_ERR("%s incomplete 8-bit hex format for offset:0x%03x\n", __func__, i);
|
||||
goto exit;
|
||||
|
@ -1492,7 +1492,7 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
|
|||
u32 read_size, pos = 0;
|
||||
u8 addr[ETH_ALEN];
|
||||
|
||||
if (rtw_is_file_readable(path) != _TRUE) {
|
||||
if (rtw_is_file_readable(path) != true) {
|
||||
RTW_PRINT("%s %s is not readable\n", __func__, path);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1506,7 +1506,7 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
|
|||
temp[2] = 0; /* end of string '\0' */
|
||||
|
||||
for (i = 0 ; i < ETH_ALEN ; i++) {
|
||||
if (IsHexDigit(file_data[i * 3]) == _FALSE || IsHexDigit(file_data[i * 3 + 1]) == _FALSE) {
|
||||
if (IsHexDigit(file_data[i * 3]) == false || IsHexDigit(file_data[i * 3 + 1]) == false) {
|
||||
RTW_ERR("%s invalid 8-bit hex format for address offset:%u\n", __func__, i);
|
||||
goto exit;
|
||||
}
|
||||
|
|
|
@ -140,11 +140,11 @@ uint rtw_is_cckrates_included(u8 *rate)
|
|||
while (rate[i] != 0) {
|
||||
if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
|
||||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22))
|
||||
return _TRUE;
|
||||
return true;
|
||||
i++;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
uint rtw_is_cckratesonly_included(u8 *rate)
|
||||
|
@ -155,26 +155,26 @@ uint rtw_is_cckratesonly_included(u8 *rate)
|
|||
while (rate[i] != 0) {
|
||||
if ((((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) &&
|
||||
(((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
|
||||
{
|
||||
if (channel > 14) {
|
||||
if ((rtw_is_cckrates_included(rate)) == _TRUE)
|
||||
if ((rtw_is_cckrates_included(rate)) == true)
|
||||
return WIRELESS_INVALID;
|
||||
else
|
||||
return WIRELESS_11A;
|
||||
} else { /* could be pure B, pure G, or B/G */
|
||||
if ((rtw_is_cckratesonly_included(rate)) == _TRUE)
|
||||
if ((rtw_is_cckratesonly_included(rate)) == true)
|
||||
return WIRELESS_11B;
|
||||
else if ((rtw_is_cckrates_included(rate)) == _TRUE)
|
||||
else if ((rtw_is_cckrates_included(rate)) == true)
|
||||
return WIRELESS_11BG;
|
||||
else
|
||||
return WIRELESS_11G;
|
||||
|
@ -322,7 +322,7 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
|
|||
|
||||
while (cnt < in_len) {
|
||||
if (eid == in_ie[cnt]
|
||||
&& (!oui || _rtw_memcmp(&in_ie[cnt + 2], oui, oui_len) == _TRUE)) {
|
||||
&& (!oui || _rtw_memcmp(&in_ie[cnt + 2], oui, oui_len) == true)) {
|
||||
target_ie = &in_ie[cnt];
|
||||
|
||||
if (ie)
|
||||
|
@ -500,7 +500,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
|||
|
||||
/* HT Cap. */
|
||||
if (((pregistrypriv->wireless_mode & WIRELESS_11_5N) || (pregistrypriv->wireless_mode & WIRELESS_11_24N))
|
||||
&& (pregistrypriv->ht_enable == _TRUE)) {
|
||||
&& (pregistrypriv->ht_enable == true)) {
|
||||
/* todo: */
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
|||
pbuf = rtw_get_ie(pbuf, _WPA_IE_ID_, &len, limit_new);
|
||||
if (pbuf) {
|
||||
/* check if oui matches... */
|
||||
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)) == _FALSE)
|
||||
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)) == false)
|
||||
goto check_next_ie;
|
||||
/* check version... */
|
||||
_rtw_memcpy((u8 *)&leval16, (pbuf + 6), sizeof(val16));
|
||||
|
@ -564,15 +564,15 @@ unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit)
|
|||
|
||||
int rtw_get_wpa_cipher_suite(u8 *s)
|
||||
{
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_NONE, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_NONE, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_NONE;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP40, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP40, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP40;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_TKIP, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_TKIP, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_TKIP;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_CCMP, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_CCMP, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_CCMP;
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP104, WPA_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, WPA_CIPHER_SUITE_WEP104, WPA_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP104;
|
||||
|
||||
return 0;
|
||||
|
@ -580,15 +580,15 @@ int rtw_get_wpa_cipher_suite(u8 *s)
|
|||
|
||||
int rtw_get_wpa2_cipher_suite(u8 *s)
|
||||
{
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_NONE;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP40;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_TKIP;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_CCMP;
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN) == _TRUE)
|
||||
if (_rtw_memcmp(s, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN) == true)
|
||||
return WPA_CIPHER_WEP104;
|
||||
|
||||
return 0;
|
||||
|
@ -609,7 +609,7 @@ int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
|
||||
|
||||
if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie + 1) != (u8)(wpa_ie_len - 2)) ||
|
||||
(_rtw_memcmp(wpa_ie + 2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != _TRUE))
|
||||
(_rtw_memcmp(wpa_ie + 2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != true))
|
||||
return _FAIL;
|
||||
|
||||
pos = wpa_ie;
|
||||
|
@ -757,8 +757,8 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len)
|
|||
authmode = in_ie[cnt];
|
||||
|
||||
/* if(authmode==_WAPI_IE_) */
|
||||
if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE ||
|
||||
_rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == _TRUE)) {
|
||||
if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == true ||
|
||||
_rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == true)) {
|
||||
if (wapi_ie)
|
||||
_rtw_memcpy(wapi_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||
|
||||
|
@ -796,7 +796,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
|
|||
while (cnt < in_len) {
|
||||
authmode = in_ie[cnt];
|
||||
|
||||
if ((authmode == _WPA_IE_ID_) && (_rtw_memcmp(&in_ie[cnt + 2], &wpa_oui[0], 4) == _TRUE)) {
|
||||
if ((authmode == _WPA_IE_ID_) && (_rtw_memcmp(&in_ie[cnt + 2], &wpa_oui[0], 4) == true)) {
|
||||
|
||||
if (wpa_ie)
|
||||
_rtw_memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||
|
@ -825,7 +825,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
|
|||
|
||||
u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen)
|
||||
{
|
||||
u8 match = _FALSE;
|
||||
u8 match = false;
|
||||
u8 eid, wps_oui[4] = {0x0, 0x50, 0xf2, 0x04};
|
||||
|
||||
if (ie_ptr == NULL)
|
||||
|
@ -833,10 +833,10 @@ u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen)
|
|||
|
||||
eid = ie_ptr[0];
|
||||
|
||||
if ((eid == _WPA_IE_ID_) && (_rtw_memcmp(&ie_ptr[2], wps_oui, 4) == _TRUE)) {
|
||||
if ((eid == _WPA_IE_ID_) && (_rtw_memcmp(&ie_ptr[2], wps_oui, 4) == true)) {
|
||||
/* RTW_INFO("==> found WPS_IE.....\n"); */
|
||||
*wps_ielen = ie_ptr[1] + 2;
|
||||
match = _TRUE;
|
||||
match = true;
|
||||
}
|
||||
return match;
|
||||
}
|
||||
|
@ -898,7 +898,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], wps_oui, 4) == _TRUE) {
|
||||
if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], wps_oui, 4) == true) {
|
||||
wpsie_ptr = in_ie + cnt;
|
||||
|
||||
if (wps_ie)
|
||||
|
@ -936,7 +936,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at
|
|||
*len_attr = 0;
|
||||
|
||||
if ((wps_ie[0] != _VENDOR_SPECIFIC_IE_) ||
|
||||
(_rtw_memcmp(wps_ie + 2, wps_oui , 4) != _TRUE))
|
||||
(_rtw_memcmp(wps_ie + 2, wps_oui , 4) != true))
|
||||
return attr_ptr;
|
||||
|
||||
/* 6 = 1(Element ID) + 1(Length) + 4(WPS OUI) */
|
||||
|
@ -1322,8 +1322,8 @@ int rtw_get_mac_addr_intel(unsigned char *buf)
|
|||
* check_local_bit: check locally bit or not.
|
||||
*
|
||||
* Output:
|
||||
* _TRUE: The mac address is invalid.
|
||||
* _FALSE: The mac address is valid.
|
||||
* true: The mac address is invalid.
|
||||
* false: The mac address is valid.
|
||||
*
|
||||
* Auther: Isaac.Li
|
||||
*/
|
||||
|
@ -1331,26 +1331,26 @@ u8 rtw_check_invalid_mac_address(u8 *mac_addr, u8 check_local_bit)
|
|||
{
|
||||
u8 null_mac_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
|
||||
u8 multi_mac_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
u8 res = _FALSE;
|
||||
u8 res = false;
|
||||
|
||||
if (_rtw_memcmp(mac_addr, null_mac_addr, ETH_ALEN)) {
|
||||
res = _TRUE;
|
||||
res = true;
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(mac_addr, multi_mac_addr, ETH_ALEN)) {
|
||||
res = _TRUE;
|
||||
res = true;
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
if (mac_addr[0] & BIT0) {
|
||||
res = _TRUE;
|
||||
res = true;
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
if (check_local_bit == _TRUE) {
|
||||
if (check_local_bit == true) {
|
||||
if (mac_addr[0] & BIT1) {
|
||||
res = _TRUE;
|
||||
res = true;
|
||||
goto func_exit;
|
||||
}
|
||||
}
|
||||
|
@ -1397,7 +1397,7 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr)
|
|||
}
|
||||
|
||||
err_chk:
|
||||
if (rtw_check_invalid_mac_address(mac, _TRUE) == _TRUE) {
|
||||
if (rtw_check_invalid_mac_address(mac, true) == true) {
|
||||
#if DEFAULT_RANDOM_MACADDR
|
||||
RTW_ERR("invalid mac addr:"MAC_FMT", assign random MAC\n", MAC_ARG(mac));
|
||||
*((u32 *)(&mac[2])) = rtw_random32();
|
||||
|
@ -1582,7 +1582,7 @@ void rtw_bss_get_chbw(WLAN_BSSID_EX *bss, u8 *ch, u8 *bw, u8 *offset)
|
|||
bool rtw_is_chbw_grouped(u8 ch_a, u8 bw_a, u8 offset_a
|
||||
, u8 ch_b, u8 bw_b, u8 offset_b)
|
||||
{
|
||||
bool is_grouped = _FALSE;
|
||||
bool is_grouped = false;
|
||||
|
||||
if (ch_a != ch_b) {
|
||||
/* ch is different */
|
||||
|
@ -1594,7 +1594,7 @@ bool rtw_is_chbw_grouped(u8 ch_a, u8 bw_a, u8 offset_a
|
|||
goto exit;
|
||||
}
|
||||
|
||||
is_grouped = _TRUE;
|
||||
is_grouped = true;
|
||||
|
||||
exit:
|
||||
return is_grouped;
|
||||
|
@ -1786,7 +1786,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], p2p_oui, 4) == _TRUE) {
|
||||
if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], p2p_oui, 4) == true) {
|
||||
p2p_ie_ptr = in_ie + cnt;
|
||||
|
||||
if (p2p_ie)
|
||||
|
@ -1826,7 +1826,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id , u8 *buf_att
|
|||
if (!p2p_ie
|
||||
|| p2p_ielen <= 6
|
||||
|| (p2p_ie[0] != WLAN_EID_VENDOR_SPECIFIC)
|
||||
|| (_rtw_memcmp(p2p_ie + 2, p2p_oui, 4) != _TRUE))
|
||||
|| (_rtw_memcmp(p2p_ie + 2, p2p_oui, 4) != true))
|
||||
return attr_ptr;
|
||||
|
||||
/* 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type) */
|
||||
|
@ -2130,7 +2130,7 @@ u8 *rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], wfd_oui, 4) == _TRUE) {
|
||||
if (eid == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(&in_ie[cnt + 2], wfd_oui, 4) == true) {
|
||||
wfd_ie_ptr = in_ie + cnt;
|
||||
|
||||
if (wfd_ie)
|
||||
|
@ -2170,7 +2170,7 @@ u8 *rtw_get_wfd_attr(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *buf_attr
|
|||
if (!wfd_ie
|
||||
|| wfd_ielen <= 6
|
||||
|| (wfd_ie[0] != WLAN_EID_VENDOR_SPECIFIC)
|
||||
|| (_rtw_memcmp(wfd_ie + 2, wfd_oui, 4) != _TRUE))
|
||||
|| (_rtw_memcmp(wfd_ie + 2, wfd_oui, 4) != true))
|
||||
return attr_ptr;
|
||||
|
||||
/* 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type) */
|
||||
|
@ -2642,7 +2642,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
|
|||
if ((fc & (RTW_IEEE80211_FCTL_FTYPE | RTW_IEEE80211_FCTL_STYPE))
|
||||
!= (RTW_IEEE80211_FTYPE_MGMT | RTW_IEEE80211_STYPE_ACTION)
|
||||
)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
c = frame_body[0];
|
||||
|
||||
|
@ -2658,7 +2658,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
|
|||
if (action)
|
||||
*action = a;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static const char *_action_public_str[] = {
|
||||
|
|
|
@ -320,18 +320,18 @@ int rtw_init_io_priv(_adapter *padapter, void (*set_intf_ops)(_adapter *padapter
|
|||
|
||||
/*
|
||||
* Increase and check if the continual_io_error of this @param dvobjprive is larger than MAX_CONTINUAL_IO_ERR
|
||||
* @return _TRUE:
|
||||
* @return _FALSE:
|
||||
* @return true:
|
||||
* @return false:
|
||||
*/
|
||||
int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
|
||||
{
|
||||
int ret = _FALSE;
|
||||
int ret = false;
|
||||
int value;
|
||||
|
||||
value = ATOMIC_INC_RETURN(&dvobj->continual_io_error);
|
||||
if (value > MAX_CONTINUAL_IO_ERR) {
|
||||
RTW_INFO("[dvobj:%p][ERROR] continual_io_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_IO_ERR);
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
} else {
|
||||
/* RTW_INFO("[dvobj:%p] continual_io_error:%d\n", dvobj, value); */
|
||||
}
|
||||
|
@ -365,10 +365,10 @@ bool match_read_sniff_ranges(u32 addr, u16 len)
|
|||
int i;
|
||||
for (i = 0; i < read_sniff_num; i++) {
|
||||
if (addr + len > read_sniff_ranges[i][0] && addr <= read_sniff_ranges[i][1])
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool match_write_sniff_ranges(u32 addr, u16 len)
|
||||
|
@ -376,10 +376,10 @@ bool match_write_sniff_ranges(u32 addr, u16 len)
|
|||
int i;
|
||||
for (i = 0; i < write_sniff_num; i++) {
|
||||
if (addr + len > write_sniff_ranges[i][0] && addr <= write_sniff_ranges[i][1])
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
struct rf_sniff_ent {
|
||||
|
@ -408,10 +408,10 @@ bool match_rf_read_sniff_ranges(u8 path, u32 addr, u32 mask)
|
|||
for (i = 0; i < rf_read_sniff_num; i++) {
|
||||
if (rf_read_sniff_ranges[i].path == MAX_RF_PATH || rf_read_sniff_ranges[i].path == path)
|
||||
if (addr == rf_read_sniff_ranges[i].reg && (mask & rf_read_sniff_ranges[i].mask))
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool match_rf_write_sniff_ranges(u8 path, u32 addr, u32 mask)
|
||||
|
@ -421,10 +421,10 @@ bool match_rf_write_sniff_ranges(u8 path, u32 addr, u32 mask)
|
|||
for (i = 0; i < rf_write_sniff_num; i++) {
|
||||
if (rf_write_sniff_ranges[i].path == MAX_RF_PATH || rf_write_sniff_ranges[i].path == path)
|
||||
if (addr == rf_write_sniff_ranges[i].reg && (mask & rf_write_sniff_ranges[i].mask))
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||
|
|
|
@ -27,18 +27,18 @@
|
|||
(\
|
||||
((addr[0] == 0xff) && (addr[1] == 0xff) && \
|
||||
(addr[2] == 0xff) && (addr[3] == 0xff) && \
|
||||
(addr[4] == 0xff) && (addr[5] == 0xff)) ? _TRUE : _FALSE \
|
||||
(addr[4] == 0xff) && (addr[5] == 0xff)) ? true : false \
|
||||
)
|
||||
|
||||
u8 rtw_validate_bssid(u8 *bssid)
|
||||
{
|
||||
u8 ret = _TRUE;
|
||||
u8 ret = true;
|
||||
|
||||
if (is_zero_mac_addr(bssid)
|
||||
|| is_broadcast_mac_addr(bssid)
|
||||
|| is_multicast_mac_addr(bssid)
|
||||
)
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -46,10 +46,10 @@ u8 rtw_validate_bssid(u8 *bssid)
|
|||
u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid)
|
||||
{
|
||||
u8 i;
|
||||
u8 ret = _TRUE;
|
||||
u8 ret = true;
|
||||
|
||||
if (ssid->SsidLength > 32) {
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid)
|
|||
for (i = 0; i < ssid->SsidLength; i++) {
|
||||
/* wifi, printable ascii code must be supported */
|
||||
if (!((ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e))) {
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -88,25 +88,25 @@ u8 rtw_do_join(_adapter *padapter)
|
|||
|
||||
pmlmepriv->pscanned = plist;
|
||||
|
||||
pmlmepriv->to_join = _TRUE;
|
||||
pmlmepriv->to_join = true;
|
||||
|
||||
if (_rtw_queue_empty(queue) == _TRUE) {
|
||||
if (_rtw_queue_empty(queue) == true) {
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
/* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty */
|
||||
/* we try to issue sitesurvey firstly */
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _FALSE
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == false
|
||||
|| rtw_to_roam(padapter) > 0
|
||||
) {
|
||||
/* submit site_survey_cmd */
|
||||
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
|
||||
if (_SUCCESS != ret) {
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
}
|
||||
} else {
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
ret = _FAIL;
|
||||
}
|
||||
|
||||
|
@ -116,10 +116,10 @@ u8 rtw_do_join(_adapter *padapter)
|
|||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
select_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv);
|
||||
if (select_ret == _SUCCESS) {
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
|
||||
} else {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) {
|
||||
/* submit createbss_cmd to change to a ADHOC_MASTER */
|
||||
|
||||
/* pmlmepriv->lock has been acquired by caller... */
|
||||
|
@ -138,11 +138,11 @@ u8 rtw_do_join(_adapter *padapter)
|
|||
rtw_generate_random_ibss(pibss);
|
||||
|
||||
if (rtw_create_ibss_cmd(padapter, 0) != _SUCCESS) {
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
|
||||
} else {
|
||||
/* can't associate ; reset under-linking */
|
||||
|
@ -150,17 +150,17 @@ u8 rtw_do_join(_adapter *padapter)
|
|||
|
||||
/* when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue */
|
||||
/* we try to issue sitesurvey firstly */
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _FALSE
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == false
|
||||
|| rtw_to_roam(padapter) > 0
|
||||
) {
|
||||
/* RTW_INFO("rtw_do_join() when no desired bss in scanning queue\n"); */
|
||||
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
|
||||
if (_SUCCESS != ret) {
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
}
|
||||
} else {
|
||||
ret = _FAIL;
|
||||
pmlmepriv->to_join = _FALSE;
|
||||
pmlmepriv->to_join = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,26 +191,26 @@ u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid)
|
|||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
RTW_INFO("Set BSSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
goto handle_tkip_countermeasure;
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
|
||||
goto release_mlme_lock;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == true) {
|
||||
|
||||
if (_rtw_memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _FALSE)
|
||||
if (_rtw_memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN) == true) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)
|
||||
goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
|
||||
} else {
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
|
@ -225,10 +225,10 @@ handle_tkip_countermeasure:
|
|||
|
||||
memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
||||
pmlmepriv->assoc_by_bssid = _TRUE;
|
||||
pmlmepriv->assoc_by_bssid = true;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
||||
pmlmepriv->to_join = _TRUE;
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
pmlmepriv->to_join = true;
|
||||
else
|
||||
status = rtw_do_join(padapter);
|
||||
|
||||
|
@ -260,27 +260,27 @@ u8 rtw_set_802_11_ssid(_adapter *padapter, NDIS_802_11_SSID *ssid)
|
|||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
RTW_INFO("Set SSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
goto handle_tkip_countermeasure;
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
|
||||
goto release_mlme_lock;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == true) {
|
||||
|
||||
if ((pmlmepriv->assoc_ssid.SsidLength == ssid->SsidLength) &&
|
||||
(_rtw_memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _FALSE)) {
|
||||
(_rtw_memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength) == true)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)) {
|
||||
|
||||
if (rtw_is_same_ibss(padapter, pnetwork) == _FALSE) {
|
||||
if (rtw_is_same_ibss(padapter, pnetwork) == false) {
|
||||
/* if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again */
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
|
@ -294,14 +294,14 @@ u8 rtw_set_802_11_ssid(_adapter *padapter, NDIS_802_11_SSID *ssid)
|
|||
#endif
|
||||
} else {
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
|
@ -314,16 +314,16 @@ handle_tkip_countermeasure:
|
|||
goto release_mlme_lock;
|
||||
}
|
||||
|
||||
if (rtw_validate_ssid(ssid) == _FALSE) {
|
||||
if (rtw_validate_ssid(ssid) == false) {
|
||||
status = _FAIL;
|
||||
goto release_mlme_lock;
|
||||
}
|
||||
|
||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
||||
pmlmepriv->assoc_by_bssid = _FALSE;
|
||||
pmlmepriv->assoc_by_bssid = false;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
||||
pmlmepriv->to_join = _TRUE;
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
pmlmepriv->to_join = true;
|
||||
else
|
||||
status = rtw_do_join(padapter);
|
||||
|
||||
|
@ -341,17 +341,17 @@ u8 rtw_set_802_11_connect(_adapter *padapter, u8 *bssid, NDIS_802_11_SSID *ssid)
|
|||
unsigned long irqL;
|
||||
u8 status = _SUCCESS;
|
||||
u32 cur_time = 0;
|
||||
bool bssid_valid = _TRUE;
|
||||
bool ssid_valid = _TRUE;
|
||||
bool bssid_valid = true;
|
||||
bool ssid_valid = true;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
if (!ssid || rtw_validate_ssid(ssid) == _FALSE)
|
||||
ssid_valid = _FALSE;
|
||||
if (!ssid || rtw_validate_ssid(ssid) == false)
|
||||
ssid_valid = false;
|
||||
|
||||
if (!bssid || rtw_validate_bssid(bssid) == _FALSE)
|
||||
bssid_valid = _FALSE;
|
||||
if (!bssid || rtw_validate_bssid(bssid) == false)
|
||||
bssid_valid = false;
|
||||
|
||||
if (ssid_valid == _FALSE && bssid_valid == _FALSE) {
|
||||
if (ssid_valid == false && bssid_valid == false) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" ssid:%p, ssid_valid:%d, bssid:%p, bssid_valid:%d\n",
|
||||
FUNC_ADPT_ARG(padapter), ssid, ssid_valid, bssid, bssid_valid);
|
||||
status = _FAIL;
|
||||
|
@ -368,9 +368,9 @@ u8 rtw_set_802_11_connect(_adapter *padapter, u8 *bssid, NDIS_802_11_SSID *ssid)
|
|||
RTW_PRINT(FUNC_ADPT_FMT" fw_state=0x%08x\n",
|
||||
FUNC_ADPT_ARG(padapter), get_fwstate(pmlmepriv));
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
goto handle_tkip_countermeasure;
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
|
||||
goto release_mlme_lock;
|
||||
|
||||
handle_tkip_countermeasure:
|
||||
|
@ -386,12 +386,12 @@ handle_tkip_countermeasure:
|
|||
|
||||
if (bssid && bssid_valid) {
|
||||
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
||||
pmlmepriv->assoc_by_bssid = _TRUE;
|
||||
pmlmepriv->assoc_by_bssid = true;
|
||||
} else
|
||||
pmlmepriv->assoc_by_bssid = _FALSE;
|
||||
pmlmepriv->assoc_by_bssid = false;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
||||
pmlmepriv->to_join = _TRUE;
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
|
||||
pmlmepriv->to_join = true;
|
||||
else
|
||||
status = rtw_do_join(padapter);
|
||||
|
||||
|
@ -410,7 +410,7 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter,
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wlan_network *cur_network = &pmlmepriv->cur_network;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE *pold_state = &(cur_network->network.InfrastructureMode);
|
||||
u8 ap2sta_mode = _FALSE;
|
||||
u8 ap2sta_mode = false;
|
||||
|
||||
if (*pold_state != networktype) {
|
||||
/* RTW_INFO("change mode, old_mode=%d, new_mode=%d, fw_state=0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */
|
||||
|
@ -418,7 +418,7 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter,
|
|||
if (*pold_state == Ndis802_11APMode) {
|
||||
/* change to other mode from Ndis802_11APMode */
|
||||
cur_network->join_res = -1;
|
||||
ap2sta_mode = _TRUE;
|
||||
ap2sta_mode = true;
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
stop_ap_mode(padapter);
|
||||
#endif
|
||||
|
@ -426,16 +426,16 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter,
|
|||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) || (*pold_state == Ndis802_11IBSS))
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) || (*pold_state == Ndis802_11IBSS))
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true))
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if ((*pold_state == Ndis802_11Infrastructure) || (*pold_state == Ndis802_11IBSS)) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE); /*will clr Linked_state; before this function, we must have checked whether issue dis-assoc_cmd or not*/
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
rtw_indicate_disconnect(padapter, 0, false); /*will clr Linked_state; before this function, we must have checked whether issue dis-assoc_cmd or not*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -477,7 +477,7 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter,
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_disassociate(_adapter *padapter)
|
||||
|
@ -487,10 +487,10 @@ u8 rtw_set_802_11_disassociate(_adapter *padapter)
|
|||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
/* modify for CONFIG_IEEE80211W, none 11w can use it */
|
||||
rtw_free_assoc_resources_cmd(padapter);
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter))
|
||||
|
@ -499,14 +499,14 @@ u8 rtw_set_802_11_disassociate(_adapter *padapter)
|
|||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_bssid_list_scan(_adapter *padapter, NDIS_802_11_SSID *pssid, int ssid_max_num, struct rtw_ieee80211_channel *ch, int ch_num)
|
||||
{
|
||||
unsigned long irqL;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
u8 res = _TRUE;
|
||||
u8 res = true;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
res = rtw_sitesurvey_cmd(padapter, pssid, ssid_max_num, ch, ch_num);
|
||||
|
@ -534,9 +534,9 @@ u8 rtw_set_802_11_authentication_mode(_adapter *padapter, NDIS_802_11_AUTHENTICA
|
|||
res = rtw_set_auth(padapter, psecuritypriv);
|
||||
|
||||
if (res == _SUCCESS)
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
else
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -550,12 +550,12 @@ u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep)
|
|||
struct security_priv *psecuritypriv = &(padapter->securitypriv);
|
||||
u8 ret = _SUCCESS;
|
||||
|
||||
bdefaultkey = (wep->KeyIndex & 0x40000000) > 0 ? _FALSE : _TRUE; /* for ??? */
|
||||
btransmitkey = (wep->KeyIndex & 0x80000000) > 0 ? _TRUE : _FALSE; /* for ??? */
|
||||
bdefaultkey = (wep->KeyIndex & 0x40000000) > 0 ? false : true; /* for ??? */
|
||||
btransmitkey = (wep->KeyIndex & 0x80000000) > 0 ? true : false; /* for ??? */
|
||||
keyid = wep->KeyIndex & 0x3fffffff;
|
||||
|
||||
if (keyid >= 4) {
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -577,10 +577,10 @@ u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep)
|
|||
|
||||
psecuritypriv->dot11PrivacyKeyIndex = keyid;
|
||||
|
||||
res = rtw_set_key(padapter, psecuritypriv, keyid, 1, _TRUE);
|
||||
res = rtw_set_key(padapter, psecuritypriv, keyid, 1, true);
|
||||
|
||||
if (res == _FAIL)
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
exit:
|
||||
|
||||
return ret;
|
||||
|
@ -594,7 +594,7 @@ u8 rtw_set_802_11_remove_wep(_adapter *padapter, u32 keyindex)
|
|||
|
||||
if (keyindex >= 0x80000000 || padapter == NULL) {
|
||||
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
goto exit;
|
||||
|
||||
} else {
|
||||
|
@ -604,7 +604,7 @@ u8 rtw_set_802_11_remove_wep(_adapter *padapter, u32 keyindex)
|
|||
|
||||
memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16);
|
||||
|
||||
res = rtw_set_key(padapter, psecuritypriv, keyindex, 0, _TRUE);
|
||||
res = rtw_set_key(padapter, psecuritypriv, keyindex, 0, true);
|
||||
|
||||
psecuritypriv->dot11DefKeylen[keyindex] = 0;
|
||||
|
||||
|
@ -628,8 +628,8 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
uint encryptionalgo;
|
||||
u8 *pbssid;
|
||||
struct sta_info *stainfo;
|
||||
u8 bgroup = _FALSE;
|
||||
u8 bgrouptkey = _FALSE;/* can be remove later */
|
||||
u8 bgroup = false;
|
||||
u8 bgrouptkey = false;/* can be remove later */
|
||||
u8 ret = _SUCCESS;
|
||||
|
||||
if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)) {
|
||||
|
@ -661,9 +661,9 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
}
|
||||
|
||||
/* check BSSID */
|
||||
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == _TRUE) {
|
||||
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true) {
|
||||
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -692,7 +692,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
bgroup = _FALSE;
|
||||
bgroup = false;
|
||||
|
||||
/* Check the pairwise key. Added by Annie, 2005-07-06. */
|
||||
|
||||
|
@ -721,7 +721,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
|
||||
}
|
||||
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) == _TRUE) && (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == _FALSE)) {
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) == true) && (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == false)) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -746,12 +746,12 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
}
|
||||
|
||||
if (key->KeyIndex & 0x8000000) /* error ??? 0x8000_0000 */
|
||||
bgrouptkey = _TRUE;
|
||||
bgrouptkey = true;
|
||||
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) == _TRUE) && (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == _TRUE))
|
||||
bgrouptkey = _TRUE;
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) == true) && (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == true))
|
||||
bgrouptkey = true;
|
||||
|
||||
bgroup = _TRUE;
|
||||
bgroup = true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -781,7 +781,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
|
||||
if (key->KeyIndex & 0x20000000) {
|
||||
/* SetRSC */
|
||||
if (bgroup == _TRUE) {
|
||||
if (bgroup == true) {
|
||||
NDIS_802_11_KEY_RSC keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
_rtw_memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8);
|
||||
} else {
|
||||
|
@ -793,10 +793,10 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
|
||||
/* Indicate this key idx is used for TX */
|
||||
/* Save the key in KeyMaterial */
|
||||
if (bgroup == _TRUE) { /* Group transmit key */
|
||||
if (bgroup == true) { /* Group transmit key */
|
||||
int res;
|
||||
|
||||
if (bgrouptkey == _TRUE)
|
||||
if (bgrouptkey == true)
|
||||
padapter->securitypriv.dot118021XGrpKeyid = (u8)key->KeyIndex;
|
||||
|
||||
if ((key->KeyIndex & 0x3) == 0) {
|
||||
|
@ -823,11 +823,11 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
|
||||
key->KeyIndex = key->KeyIndex & 0x03;
|
||||
|
||||
padapter->securitypriv.binstallGrpkey = _TRUE;
|
||||
padapter->securitypriv.binstallGrpkey = true;
|
||||
|
||||
padapter->securitypriv.bcheck_grpkey = _FALSE;
|
||||
padapter->securitypriv.bcheck_grpkey = false;
|
||||
|
||||
res = rtw_set_key(padapter, &padapter->securitypriv, key->KeyIndex, 1, _TRUE);
|
||||
res = rtw_set_key(padapter, &padapter->securitypriv, key->KeyIndex, 1, true);
|
||||
|
||||
if (res == _FAIL)
|
||||
ret = _FAIL;
|
||||
|
@ -846,7 +846,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
_rtw_memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16);
|
||||
|
||||
if (encryptionalgo == _TKIP_) {
|
||||
padapter->securitypriv.busetkipkey = _FALSE;
|
||||
padapter->securitypriv.busetkipkey = false;
|
||||
|
||||
/* _set_timer(&padapter->securitypriv.tkip_timer, 50); */
|
||||
|
||||
|
@ -867,9 +867,9 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
|
|||
|
||||
/* Set key to CAM through H2C command */
|
||||
|
||||
res = rtw_setstakey_cmd(padapter, stainfo, UNICAST_KEY, _TRUE);
|
||||
res = rtw_setstakey_cmd(padapter, stainfo, UNICAST_KEY, true);
|
||||
|
||||
if (res == _FALSE)
|
||||
if (res == false)
|
||||
ret = _FAIL;
|
||||
}
|
||||
}
|
||||
|
@ -885,7 +885,7 @@ u8 rtw_set_802_11_remove_key(_adapter *padapter, NDIS_802_11_REMOVE_KEY *key)
|
|||
uint encryptionalgo;
|
||||
u8 *pbssid;
|
||||
struct sta_info *stainfo;
|
||||
u8 bgroup = (key->KeyIndex & 0x4000000) > 0 ? _FALSE : _TRUE;
|
||||
u8 bgroup = (key->KeyIndex & 0x4000000) > 0 ? false : true;
|
||||
u8 keyIndex = (u8)key->KeyIndex & 0x03;
|
||||
u8 ret = _SUCCESS;
|
||||
|
||||
|
@ -894,7 +894,7 @@ u8 rtw_set_802_11_remove_key(_adapter *padapter, NDIS_802_11_REMOVE_KEY *key)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (bgroup == _TRUE) {
|
||||
if (bgroup == true) {
|
||||
encryptionalgo = padapter->securitypriv.dot118021XGrpPrivacy;
|
||||
/* clear group key by index */
|
||||
/* NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN); */
|
||||
|
@ -924,7 +924,7 @@ u8 rtw_set_802_11_remove_key(_adapter *padapter, NDIS_802_11_REMOVE_KEY *key)
|
|||
|
||||
exit:
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -946,13 +946,13 @@ u16 rtw_get_cur_max_rate(_adapter *adapter)
|
|||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (adapter->registrypriv.mp_mode == 1) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) != _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) != true)
|
||||
&& (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != true))
|
||||
return 0;
|
||||
|
||||
psta = rtw_get_stainfo(&adapter->stapriv, get_bssid(pmlmepriv));
|
||||
|
|
|
@ -85,12 +85,12 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len
|
|||
bool rtw_IOL_applied(ADAPTER *adapter)
|
||||
{
|
||||
if (1 == adapter->registrypriv.fw_iol)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
if ((2 == adapter->registrypriv.fw_iol) && (IS_FULL_SPEED_USB(adapter)))
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int rtw_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt)
|
||||
|
@ -216,14 +216,14 @@ int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame)
|
|||
|
||||
u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame)
|
||||
{
|
||||
u8 is_cmd_bndy = _FALSE;
|
||||
u8 is_cmd_bndy = false;
|
||||
if (((pxmit_frame->attrib.pktlen + 32) % 256) + 8 >= 256) {
|
||||
rtw_IOL_append_END_cmd(pxmit_frame);
|
||||
pxmit_frame->attrib.pktlen = ((((pxmit_frame->attrib.pktlen + 32) / 256) + 1) * 256);
|
||||
|
||||
/* RTW_INFO("==> %s, pktlen(%d)\n",__func__,pxmit_frame->attrib.pktlen); */
|
||||
pxmit_frame->attrib.last_txcmdsz = pxmit_frame->attrib.pktlen;
|
||||
is_cmd_bndy = _TRUE;
|
||||
is_cmd_bndy = true;
|
||||
}
|
||||
return is_cmd_bndy;
|
||||
}
|
||||
|
|
284
core/rtw_mi.c
284
core/rtw_mi.c
|
@ -61,7 +61,7 @@ static int _rtw_mi_get_ch_setting_union(_adapter *adapter, u8 *ch, u8 *bw, u8 *o
|
|||
if (check_fwstate(&iface->mlmepriv, WIFI_OP_CH_SWITCHING))
|
||||
continue;
|
||||
|
||||
if (include_self == _FALSE && adapter == iface)
|
||||
if (include_self == false && adapter == iface)
|
||||
continue;
|
||||
|
||||
if (num == 0) {
|
||||
|
@ -122,40 +122,40 @@ static void _rtw_mi_status(_adapter *adapter, struct mi_state *mstate, bool incl
|
|||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
iface = dvobj->padapters[i];
|
||||
|
||||
if (include_self == _FALSE && iface == adapter)
|
||||
if (include_self == false && iface == adapter)
|
||||
continue;
|
||||
|
||||
if (check_fwstate(&iface->mlmepriv, WIFI_STATION_STATE) == _TRUE) {
|
||||
if (check_fwstate(&iface->mlmepriv, WIFI_STATION_STATE) == true) {
|
||||
MSTATE_STA_NUM(mstate)++;
|
||||
if (check_fwstate(&iface->mlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(&iface->mlmepriv, _FW_LINKED) == true)
|
||||
MSTATE_STA_LD_NUM(mstate)++;
|
||||
|
||||
if (check_fwstate(&iface->mlmepriv, _FW_UNDER_LINKING) == _TRUE)
|
||||
if (check_fwstate(&iface->mlmepriv, _FW_UNDER_LINKING) == true)
|
||||
MSTATE_STA_LG_NUM(mstate)++;
|
||||
|
||||
} else if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == _TRUE
|
||||
&& check_fwstate(&iface->mlmepriv, _FW_LINKED) == _TRUE
|
||||
} else if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == true
|
||||
&& check_fwstate(&iface->mlmepriv, _FW_LINKED) == true
|
||||
) {
|
||||
MSTATE_AP_NUM(mstate)++;
|
||||
if (iface->stapriv.asoc_sta_count > 2)
|
||||
MSTATE_AP_LD_NUM(mstate)++;
|
||||
|
||||
} else if (check_fwstate(&iface->mlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) == _TRUE
|
||||
&& check_fwstate(&iface->mlmepriv, _FW_LINKED) == _TRUE
|
||||
} else if (check_fwstate(&iface->mlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) == true
|
||||
&& check_fwstate(&iface->mlmepriv, _FW_LINKED) == true
|
||||
) {
|
||||
MSTATE_ADHOC_NUM(mstate)++;
|
||||
if (iface->stapriv.asoc_sta_count > 2)
|
||||
MSTATE_ADHOC_LD_NUM(mstate)++;
|
||||
}
|
||||
|
||||
if (check_fwstate(&iface->mlmepriv, WIFI_UNDER_WPS) == _TRUE)
|
||||
if (check_fwstate(&iface->mlmepriv, WIFI_UNDER_WPS) == true)
|
||||
MSTATE_WPS_NUM(mstate)++;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (rtw_cfg80211_get_is_mgmt_tx(iface))
|
||||
MSTATE_MGMT_TX_NUM(mstate)++;
|
||||
#ifdef CONFIG_P2P
|
||||
if (rtw_cfg80211_get_is_roch(iface) == _TRUE)
|
||||
if (rtw_cfg80211_get_is_roch(iface) == true)
|
||||
MSTATE_ROCH_NUM(mstate)++;
|
||||
#endif
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
@ -243,7 +243,7 @@ u8 rtw_mi_check_status(_adapter *adapter, u8 type)
|
|||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct mi_state *iface_state = &dvobj->iface_state;
|
||||
u8 ret = _FALSE;
|
||||
u8 ret = false;
|
||||
|
||||
#ifdef DBG_IFACE_STATUS
|
||||
DBG_IFACE_STATUS_DUMP(adapter);
|
||||
|
@ -253,46 +253,46 @@ u8 rtw_mi_check_status(_adapter *adapter, u8 type)
|
|||
switch (type) {
|
||||
case MI_LINKED:
|
||||
if (MSTATE_STA_LD_NUM(iface_state) || MSTATE_AP_NUM(iface_state) || MSTATE_ADHOC_NUM(iface_state)) /*check_fwstate(&iface->mlmepriv, _FW_LINKED)*/
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
case MI_ASSOC:
|
||||
if (MSTATE_STA_LD_NUM(iface_state) || MSTATE_AP_LD_NUM(iface_state) || MSTATE_ADHOC_LD_NUM(iface_state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
case MI_UNDER_WPS:
|
||||
if (MSTATE_WPS_NUM(iface_state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case MI_AP_MODE:
|
||||
if (MSTATE_AP_NUM(iface_state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
case MI_AP_ASSOC:
|
||||
if (MSTATE_AP_LD_NUM(iface_state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case MI_ADHOC:
|
||||
if (MSTATE_ADHOC_NUM(iface_state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
case MI_ADHOC_ASSOC:
|
||||
if (MSTATE_ADHOC_LD_NUM(iface_state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case MI_STA_NOLINK: /* this is misleading, but not used now */
|
||||
if (MSTATE_STA_NUM(iface_state) && (!(MSTATE_STA_LD_NUM(iface_state) || MSTATE_STA_LG_NUM(iface_state))))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
case MI_STA_LINKED:
|
||||
if (MSTATE_STA_LD_NUM(iface_state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
case MI_STA_LINKING:
|
||||
if (MSTATE_STA_LG_NUM(iface_state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -313,20 +313,20 @@ u8 rtw_mi_mp_mode_check(_adapter *padapter)
|
|||
iface = dvobj->padapters[i];
|
||||
|
||||
if ((iface) && (iface->registrypriv.mp_mode == 1))
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
return _TRUE;
|
||||
return true;
|
||||
#endif
|
||||
#endif /* CONFIG_MP_INCLUDED */
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* return value : 0 is failed or have not interface meet condition
|
||||
* return value : !0 is success or interface numbers which meet condition
|
||||
* return value of ops_func must be _TRUE or _FALSE
|
||||
* return value of ops_func must be true or false
|
||||
*/
|
||||
static u8 _rtw_mi_process(_adapter *padapter, bool exclude_self,
|
||||
void *data, u8(*ops_func)(_adapter *padapter, void *data))
|
||||
|
@ -345,7 +345,7 @@ static u8 _rtw_mi_process(_adapter *padapter, bool exclude_self,
|
|||
continue;
|
||||
|
||||
if (ops_func)
|
||||
if (_TRUE == ops_func(iface, data))
|
||||
if (true == ops_func(iface, data))
|
||||
ret++;
|
||||
}
|
||||
}
|
||||
|
@ -359,19 +359,19 @@ static u8 _rtw_mi_netif_stop_queue(_adapter *padapter, void *data)
|
|||
if (carrier_off)
|
||||
netif_carrier_off(pnetdev);
|
||||
rtw_netif_stop_queue(pnetdev);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_netif_stop_queue(_adapter *padapter, bool carrier_off)
|
||||
{
|
||||
bool in_data = carrier_off;
|
||||
|
||||
return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_netif_stop_queue);
|
||||
return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_netif_stop_queue);
|
||||
}
|
||||
u8 rtw_mi_buddy_netif_stop_queue(_adapter *padapter, bool carrier_off)
|
||||
{
|
||||
bool in_data = carrier_off;
|
||||
|
||||
return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_netif_stop_queue);
|
||||
return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_netif_stop_queue);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_netif_wake_queue(_adapter *padapter, void *data)
|
||||
|
@ -380,15 +380,15 @@ static u8 _rtw_mi_netif_wake_queue(_adapter *padapter, void *data)
|
|||
|
||||
if (pnetdev)
|
||||
rtw_netif_wake_queue(pnetdev);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_netif_wake_queue(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_netif_wake_queue);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_netif_wake_queue);
|
||||
}
|
||||
u8 rtw_mi_buddy_netif_wake_queue(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_netif_wake_queue);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_netif_wake_queue);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_netif_carrier_on(_adapter *padapter, void *data)
|
||||
|
@ -397,15 +397,15 @@ static u8 _rtw_mi_netif_carrier_on(_adapter *padapter, void *data)
|
|||
|
||||
if (pnetdev)
|
||||
rtw_netif_carrier_on(pnetdev);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_netif_carrier_on(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_netif_carrier_on);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_netif_carrier_on);
|
||||
}
|
||||
u8 rtw_mi_buddy_netif_carrier_on(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_netif_carrier_on);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_netif_carrier_on);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_scan_abort(_adapter *adapter, void *data)
|
||||
|
@ -417,104 +417,104 @@ static u8 _rtw_mi_scan_abort(_adapter *adapter, void *data)
|
|||
else
|
||||
rtw_scan_abort_no_wait(adapter);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_scan_abort(_adapter *adapter, bool bwait)
|
||||
{
|
||||
bool in_data = bwait;
|
||||
|
||||
_rtw_mi_process(adapter, _FALSE, &in_data, _rtw_mi_scan_abort);
|
||||
_rtw_mi_process(adapter, false, &in_data, _rtw_mi_scan_abort);
|
||||
|
||||
}
|
||||
void rtw_mi_buddy_scan_abort(_adapter *adapter, bool bwait)
|
||||
{
|
||||
bool in_data = bwait;
|
||||
|
||||
_rtw_mi_process(adapter, _TRUE, &in_data, _rtw_mi_scan_abort);
|
||||
_rtw_mi_process(adapter, true, &in_data, _rtw_mi_scan_abort);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_start_drv_threads(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_start_drv_threads(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_start_drv_threads(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_start_drv_threads);
|
||||
_rtw_mi_process(adapter, false, NULL, _rtw_mi_start_drv_threads);
|
||||
}
|
||||
void rtw_mi_buddy_start_drv_threads(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_start_drv_threads);
|
||||
_rtw_mi_process(adapter, true, NULL, _rtw_mi_start_drv_threads);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_stop_drv_threads(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_stop_drv_threads(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_stop_drv_threads(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_stop_drv_threads);
|
||||
_rtw_mi_process(adapter, false, NULL, _rtw_mi_stop_drv_threads);
|
||||
}
|
||||
void rtw_mi_buddy_stop_drv_threads(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_stop_drv_threads);
|
||||
_rtw_mi_process(adapter, true, NULL, _rtw_mi_stop_drv_threads);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_cancel_all_timer(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_cancel_all_timer(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_cancel_all_timer(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_cancel_all_timer);
|
||||
_rtw_mi_process(adapter, false, NULL, _rtw_mi_cancel_all_timer);
|
||||
}
|
||||
void rtw_mi_buddy_cancel_all_timer(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_cancel_all_timer);
|
||||
_rtw_mi_process(adapter, true, NULL, _rtw_mi_cancel_all_timer);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_reset_drv_sw(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_reset_drv_sw(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_reset_drv_sw(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_reset_drv_sw);
|
||||
_rtw_mi_process(adapter, false, NULL, _rtw_mi_reset_drv_sw);
|
||||
}
|
||||
void rtw_mi_buddy_reset_drv_sw(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_reset_drv_sw);
|
||||
_rtw_mi_process(adapter, true, NULL, _rtw_mi_reset_drv_sw);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_intf_start(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_intf_start(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_intf_start(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_intf_start);
|
||||
_rtw_mi_process(adapter, false, NULL, _rtw_mi_intf_start);
|
||||
}
|
||||
void rtw_mi_buddy_intf_start(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_intf_start);
|
||||
_rtw_mi_process(adapter, true, NULL, _rtw_mi_intf_start);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_intf_stop(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_intf_stop(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_intf_stop(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_intf_stop);
|
||||
_rtw_mi_process(adapter, false, NULL, _rtw_mi_intf_stop);
|
||||
}
|
||||
void rtw_mi_buddy_intf_stop(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_intf_stop);
|
||||
_rtw_mi_process(adapter, true, NULL, _rtw_mi_intf_stop);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_suspend_free_assoc_resource(_adapter *padapter, void *data)
|
||||
|
@ -523,11 +523,11 @@ static u8 _rtw_mi_suspend_free_assoc_resource(_adapter *padapter, void *data)
|
|||
}
|
||||
void rtw_mi_suspend_free_assoc_resource(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_suspend_free_assoc_resource);
|
||||
_rtw_mi_process(adapter, false, NULL, _rtw_mi_suspend_free_assoc_resource);
|
||||
}
|
||||
void rtw_mi_buddy_suspend_free_assoc_resource(_adapter *adapter)
|
||||
{
|
||||
_rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_suspend_free_assoc_resource);
|
||||
_rtw_mi_process(adapter, true, NULL, _rtw_mi_suspend_free_assoc_resource);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_is_scan_deny(_adapter *adapter, void *data)
|
||||
|
@ -537,12 +537,12 @@ static u8 _rtw_mi_is_scan_deny(_adapter *adapter, void *data)
|
|||
|
||||
u8 rtw_mi_is_scan_deny(_adapter *adapter)
|
||||
{
|
||||
return _rtw_mi_process(adapter, _FALSE, NULL, _rtw_mi_is_scan_deny);
|
||||
return _rtw_mi_process(adapter, false, NULL, _rtw_mi_is_scan_deny);
|
||||
|
||||
}
|
||||
u8 rtw_mi_buddy_is_scan_deny(_adapter *adapter)
|
||||
{
|
||||
return _rtw_mi_process(adapter, _TRUE, NULL, _rtw_mi_is_scan_deny);
|
||||
return _rtw_mi_process(adapter, true, NULL, _rtw_mi_is_scan_deny);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SET_SCAN_DENY_TIMER
|
||||
|
@ -551,19 +551,19 @@ static u8 _rtw_mi_set_scan_deny(_adapter *adapter, void *data)
|
|||
u32 ms = *(u32 *)data;
|
||||
|
||||
rtw_set_scan_deny(adapter, ms);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_set_scan_deny(_adapter *adapter, u32 ms)
|
||||
{
|
||||
u32 in_data = ms;
|
||||
|
||||
_rtw_mi_process(adapter, _FALSE, &in_data, _rtw_mi_set_scan_deny);
|
||||
_rtw_mi_process(adapter, false, &in_data, _rtw_mi_set_scan_deny);
|
||||
}
|
||||
void rtw_mi_buddy_set_scan_deny(_adapter *adapter, u32 ms)
|
||||
{
|
||||
u32 in_data = ms;
|
||||
|
||||
_rtw_mi_process(adapter, _TRUE, &in_data, _rtw_mi_set_scan_deny);
|
||||
_rtw_mi_process(adapter, true, &in_data, _rtw_mi_set_scan_deny);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -578,12 +578,12 @@ static u8 _rtw_mi_issue_nulldata(_adapter *padapter, void *data)
|
|||
{
|
||||
struct nulldata_param *pnulldata_param = (struct nulldata_param *)data;
|
||||
|
||||
if (is_client_associated_to_ap(padapter) == _TRUE) {
|
||||
if (is_client_associated_to_ap(padapter) == true) {
|
||||
/* TODO: TDLS peers */
|
||||
issue_nulldata(padapter, pnulldata_param->da, pnulldata_param->power_mode, pnulldata_param->try_cnt, pnulldata_param->wait_ms);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 rtw_mi_issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms)
|
||||
|
@ -595,7 +595,7 @@ u8 rtw_mi_issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int pow
|
|||
nparam.try_cnt = try_cnt;
|
||||
nparam.wait_ms = wait_ms;
|
||||
|
||||
return _rtw_mi_process(padapter, _FALSE, &nparam, _rtw_mi_issue_nulldata);
|
||||
return _rtw_mi_process(padapter, false, &nparam, _rtw_mi_issue_nulldata);
|
||||
}
|
||||
u8 rtw_mi_buddy_issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms)
|
||||
{
|
||||
|
@ -606,7 +606,7 @@ u8 rtw_mi_buddy_issue_nulldata(_adapter *padapter, unsigned char *da, unsigned i
|
|||
nparam.try_cnt = try_cnt;
|
||||
nparam.wait_ms = wait_ms;
|
||||
|
||||
return _rtw_mi_process(padapter, _TRUE, &nparam, _rtw_mi_issue_nulldata);
|
||||
return _rtw_mi_process(padapter, true, &nparam, _rtw_mi_issue_nulldata);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_beacon_update(_adapter *padapter, void *data)
|
||||
|
@ -614,21 +614,21 @@ static u8 _rtw_mi_beacon_update(_adapter *padapter, void *data)
|
|||
struct mlme_ext_priv *mlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
if (mlmeext_msr(mlmeext) == WIFI_FW_AP_STATE
|
||||
&& check_fwstate(&padapter->mlmepriv, _FW_LINKED) == _TRUE) {
|
||||
&& check_fwstate(&padapter->mlmepriv, _FW_LINKED) == true) {
|
||||
RTW_INFO(ADPT_FMT"-WIFI_FW_AP_STATE - update_beacon\n", ADPT_ARG(padapter));
|
||||
update_beacon(padapter, 0, NULL, _TRUE);
|
||||
update_beacon(padapter, 0, NULL, true);
|
||||
}
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void rtw_mi_beacon_update(_adapter *padapter)
|
||||
{
|
||||
_rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_beacon_update);
|
||||
_rtw_mi_process(padapter, false, NULL, _rtw_mi_beacon_update);
|
||||
}
|
||||
|
||||
void rtw_mi_buddy_beacon_update(_adapter *padapter)
|
||||
{
|
||||
_rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_beacon_update);
|
||||
_rtw_mi_process(padapter, true, NULL, _rtw_mi_beacon_update);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_hal_dump_macaddr(_adapter *padapter, void *data)
|
||||
|
@ -637,15 +637,15 @@ static u8 _rtw_mi_hal_dump_macaddr(_adapter *padapter, void *data)
|
|||
|
||||
rtw_hal_get_macaddr_port(padapter, mac_addr);
|
||||
RTW_INFO(ADPT_FMT"MAC Address ="MAC_FMT"\n", ADPT_ARG(padapter), MAC_ARG(mac_addr));
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
void rtw_mi_hal_dump_macaddr(_adapter *padapter)
|
||||
{
|
||||
_rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_hal_dump_macaddr);
|
||||
_rtw_mi_process(padapter, false, NULL, _rtw_mi_hal_dump_macaddr);
|
||||
}
|
||||
void rtw_mi_buddy_hal_dump_macaddr(_adapter *padapter)
|
||||
{
|
||||
_rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_hal_dump_macaddr);
|
||||
_rtw_mi_process(padapter, true, NULL, _rtw_mi_hal_dump_macaddr);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_busy_traffic_check(_adapter *padapter, void *data)
|
||||
|
@ -654,33 +654,33 @@ static u8 _rtw_mi_busy_traffic_check(_adapter *padapter, void *data)
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
bool check_sc_interval = *(bool *)data;
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE) {
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == true) {
|
||||
if (check_sc_interval) {
|
||||
/* Miracast can't do AP scan*/
|
||||
passtime = rtw_get_passing_time_ms(pmlmepriv->lastscantime);
|
||||
pmlmepriv->lastscantime = rtw_get_current_time();
|
||||
if (passtime > BUSY_TRAFFIC_SCAN_DENY_PERIOD) {
|
||||
RTW_INFO(ADPT_FMT" bBusyTraffic == _TRUE\n", ADPT_ARG(padapter));
|
||||
return _TRUE;
|
||||
RTW_INFO(ADPT_FMT" bBusyTraffic == true\n", ADPT_ARG(padapter));
|
||||
return true;
|
||||
}
|
||||
} else
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 rtw_mi_busy_traffic_check(_adapter *padapter, bool check_sc_interval)
|
||||
{
|
||||
bool in_data = check_sc_interval;
|
||||
|
||||
return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_busy_traffic_check);
|
||||
return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_busy_traffic_check);
|
||||
}
|
||||
u8 rtw_mi_buddy_busy_traffic_check(_adapter *padapter, bool check_sc_interval)
|
||||
{
|
||||
bool in_data = check_sc_interval;
|
||||
|
||||
return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_busy_traffic_check);
|
||||
return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_busy_traffic_check);
|
||||
}
|
||||
static u8 _rtw_mi_check_mlmeinfo_state(_adapter *padapter, void *data)
|
||||
{
|
||||
|
@ -689,23 +689,23 @@ static u8 _rtw_mi_check_mlmeinfo_state(_adapter *padapter, void *data)
|
|||
|
||||
/*if (mlmeext_msr(mlmeext) == state)*/
|
||||
if (check_mlmeinfo_state(mlmeext, state))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 rtw_mi_check_mlmeinfo_state(_adapter *padapter, u32 state)
|
||||
{
|
||||
u32 in_data = state;
|
||||
|
||||
return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_check_mlmeinfo_state);
|
||||
return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_check_mlmeinfo_state);
|
||||
}
|
||||
|
||||
u8 rtw_mi_buddy_check_mlmeinfo_state(_adapter *padapter, u32 state)
|
||||
{
|
||||
u32 in_data = state;
|
||||
|
||||
return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_check_mlmeinfo_state);
|
||||
return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_check_mlmeinfo_state);
|
||||
}
|
||||
|
||||
/*#define DBG_DUMP_FW_STATE*/
|
||||
|
@ -742,15 +742,15 @@ static void rtw_dbg_dump_fwstate(_adapter *padapter, sint state)
|
|||
|
||||
static u8 _rtw_mi_check_fwstate(_adapter *padapter, void *data)
|
||||
{
|
||||
u8 ret = _FALSE;
|
||||
u8 ret = false;
|
||||
|
||||
sint state = *(sint *)data;
|
||||
|
||||
if ((state == WIFI_FW_NULL_STATE) &&
|
||||
(padapter->mlmepriv.fw_state == WIFI_FW_NULL_STATE))
|
||||
ret = _TRUE;
|
||||
else if (_TRUE == check_fwstate(&padapter->mlmepriv, state))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
else if (true == check_fwstate(&padapter->mlmepriv, state))
|
||||
ret = true;
|
||||
#ifdef DBG_DUMP_FW_STATE
|
||||
if (ret)
|
||||
rtw_dbg_dump_fwstate(padapter, state);
|
||||
|
@ -761,13 +761,13 @@ u8 rtw_mi_check_fwstate(_adapter *padapter, sint state)
|
|||
{
|
||||
sint in_data = state;
|
||||
|
||||
return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_check_fwstate);
|
||||
return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_check_fwstate);
|
||||
}
|
||||
u8 rtw_mi_buddy_check_fwstate(_adapter *padapter, sint state)
|
||||
{
|
||||
sint in_data = state;
|
||||
|
||||
return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_check_fwstate);
|
||||
return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_check_fwstate);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_traffic_statistics(_adapter *padapter , void *data)
|
||||
|
@ -783,11 +783,11 @@ static u8 _rtw_mi_traffic_statistics(_adapter *padapter , void *data)
|
|||
pdvobjpriv->traffic_stat.rx_bytes += padapter->recvpriv.rx_bytes;
|
||||
pdvobjpriv->traffic_stat.rx_pkts += padapter->recvpriv.rx_pkts;
|
||||
pdvobjpriv->traffic_stat.rx_drop += padapter->recvpriv.rx_drop;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_traffic_statistics(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_traffic_statistics);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_traffic_statistics);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_check_miracast_enabled(_adapter *padapter , void *data)
|
||||
|
@ -796,7 +796,7 @@ static u8 _rtw_mi_check_miracast_enabled(_adapter *padapter , void *data)
|
|||
}
|
||||
u8 rtw_mi_check_miracast_enabled(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_check_miracast_enabled);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_check_miracast_enabled);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
|
@ -808,11 +808,11 @@ static u8 _rtw_mi_check_pending_xmitbuf(_adapter *padapter , void *data)
|
|||
}
|
||||
u8 rtw_mi_check_pending_xmitbuf(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_check_pending_xmitbuf);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_check_pending_xmitbuf);
|
||||
}
|
||||
u8 rtw_mi_buddy_check_pending_xmitbuf(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_check_pending_xmitbuf);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_check_pending_xmitbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -832,68 +832,68 @@ static void _rtw_mi_adapter_reset(_adapter *padapter , u8 exclude_self)
|
|||
|
||||
void rtw_mi_adapter_reset(_adapter *padapter)
|
||||
{
|
||||
_rtw_mi_adapter_reset(padapter, _FALSE);
|
||||
_rtw_mi_adapter_reset(padapter, false);
|
||||
}
|
||||
|
||||
void rtw_mi_buddy_adapter_reset(_adapter *padapter)
|
||||
{
|
||||
_rtw_mi_adapter_reset(padapter, _TRUE);
|
||||
_rtw_mi_adapter_reset(padapter, true);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_dynamic_check_timer_handler(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_iface_dynamic_check_timer_handler(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_dynamic_check_timer_handler(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_dynamic_check_timer_handler);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_dynamic_check_timer_handler);
|
||||
}
|
||||
u8 rtw_mi_buddy_dynamic_check_timer_handler(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_dynamic_check_timer_handler);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_dynamic_check_timer_handler);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_dev_unload(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_dev_unload(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_dev_unload(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_dev_unload);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_dev_unload);
|
||||
}
|
||||
u8 rtw_mi_buddy_dev_unload(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_dev_unload);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_dev_unload);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_dynamic_chk_wk_hdl(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_iface_dynamic_chk_wk_hdl(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_dynamic_chk_wk_hdl(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_dynamic_chk_wk_hdl);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_dynamic_chk_wk_hdl);
|
||||
}
|
||||
u8 rtw_mi_buddy_dynamic_chk_wk_hdl(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_dynamic_chk_wk_hdl);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_dynamic_chk_wk_hdl);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_os_xmit_schedule(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_os_xmit_schedule(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_os_xmit_schedule(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_os_xmit_schedule);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_os_xmit_schedule);
|
||||
}
|
||||
u8 rtw_mi_buddy_os_xmit_schedule(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_os_xmit_schedule);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_os_xmit_schedule);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_report_survey_event(_adapter *adapter, void *data)
|
||||
|
@ -901,15 +901,15 @@ static u8 _rtw_mi_report_survey_event(_adapter *adapter, void *data)
|
|||
union recv_frame *precv_frame = (union recv_frame *)data;
|
||||
|
||||
report_survey_event(adapter, precv_frame);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_report_survey_event(_adapter *padapter, union recv_frame *precv_frame)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, precv_frame, _rtw_mi_report_survey_event);
|
||||
return _rtw_mi_process(padapter, false, precv_frame, _rtw_mi_report_survey_event);
|
||||
}
|
||||
u8 rtw_mi_buddy_report_survey_event(_adapter *padapter, union recv_frame *precv_frame)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, precv_frame, _rtw_mi_report_survey_event);
|
||||
return _rtw_mi_process(padapter, true, precv_frame, _rtw_mi_report_survey_event);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_sreset_adapter_hdl(_adapter *adapter, void *data)
|
||||
|
@ -920,39 +920,39 @@ static u8 _rtw_mi_sreset_adapter_hdl(_adapter *adapter, void *data)
|
|||
sreset_start_adapter(adapter);
|
||||
else
|
||||
sreset_stop_adapter(adapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_sreset_adapter_hdl(_adapter *padapter, u8 bstart)
|
||||
{
|
||||
u8 in_data = bstart;
|
||||
|
||||
return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_sreset_adapter_hdl);
|
||||
return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_sreset_adapter_hdl);
|
||||
}
|
||||
u8 rtw_mi_buddy_sreset_adapter_hdl(_adapter *padapter, u8 bstart)
|
||||
{
|
||||
u8 in_data = bstart;
|
||||
|
||||
return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_sreset_adapter_hdl);
|
||||
return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_sreset_adapter_hdl);
|
||||
}
|
||||
static u8 _rtw_mi_tx_beacon_hdl(_adapter *adapter, void *data)
|
||||
{
|
||||
if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == _TRUE
|
||||
&& check_fwstate(&adapter->mlmepriv, WIFI_ASOC_STATE) == _TRUE
|
||||
if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == true
|
||||
&& check_fwstate(&adapter->mlmepriv, WIFI_ASOC_STATE) == true
|
||||
) {
|
||||
adapter->mlmepriv.update_bcn = _TRUE;
|
||||
adapter->mlmepriv.update_bcn = true;
|
||||
#ifndef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
tx_beacon_hdl(adapter, NULL);
|
||||
#endif
|
||||
}
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_tx_beacon_hdl(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_tx_beacon_hdl);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_tx_beacon_hdl);
|
||||
}
|
||||
u8 rtw_mi_buddy_tx_beacon_hdl(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_sreset_adapter_hdl);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_sreset_adapter_hdl);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_set_tx_beacon_cmd(_adapter *adapter, void *data)
|
||||
|
@ -960,18 +960,18 @@ static u8 _rtw_mi_set_tx_beacon_cmd(_adapter *adapter, void *data)
|
|||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
|
||||
if (pmlmepriv->update_bcn == _TRUE)
|
||||
if (pmlmepriv->update_bcn == true)
|
||||
set_tx_beacon_cmd(adapter);
|
||||
}
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
u8 rtw_mi_set_tx_beacon_cmd(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_set_tx_beacon_cmd);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_set_tx_beacon_cmd);
|
||||
}
|
||||
u8 rtw_mi_buddy_set_tx_beacon_cmd(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_set_tx_beacon_cmd);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_set_tx_beacon_cmd);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
|
@ -986,29 +986,29 @@ u8 rtw_mi_p2p_chk_state(_adapter *padapter, enum P2P_STATE p2p_state)
|
|||
{
|
||||
u8 in_data = p2p_state;
|
||||
|
||||
return _rtw_mi_process(padapter, _FALSE, &in_data, _rtw_mi_p2p_chk_state);
|
||||
return _rtw_mi_process(padapter, false, &in_data, _rtw_mi_p2p_chk_state);
|
||||
}
|
||||
u8 rtw_mi_buddy_p2p_chk_state(_adapter *padapter, enum P2P_STATE p2p_state)
|
||||
{
|
||||
u8 in_data = p2p_state;
|
||||
|
||||
return _rtw_mi_process(padapter, _TRUE, &in_data, _rtw_mi_p2p_chk_state);
|
||||
return _rtw_mi_process(padapter, true, &in_data, _rtw_mi_p2p_chk_state);
|
||||
}
|
||||
static u8 _rtw_mi_stay_in_p2p_mode(_adapter *adapter, void *data)
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &(adapter->wdinfo);
|
||||
|
||||
if (rtw_p2p_role(pwdinfo) != P2P_ROLE_DISABLE)
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
u8 rtw_mi_stay_in_p2p_mode(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_stay_in_p2p_mode);
|
||||
return _rtw_mi_process(padapter, false, NULL, _rtw_mi_stay_in_p2p_mode);
|
||||
}
|
||||
u8 rtw_mi_buddy_stay_in_p2p_mode(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_stay_in_p2p_mode);
|
||||
return _rtw_mi_process(padapter, true, NULL, _rtw_mi_stay_in_p2p_mode);
|
||||
}
|
||||
#endif /*CONFIG_P2P*/
|
||||
|
||||
|
@ -1029,13 +1029,13 @@ _adapter *rtw_get_iface_by_macddr(_adapter *padapter, u8 *mac_addr)
|
|||
{
|
||||
int i;
|
||||
_adapter *iface = NULL;
|
||||
u8 bmatch = _FALSE;
|
||||
u8 bmatch = false;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
iface = dvobj->padapters[i];
|
||||
if ((iface) && (_rtw_memcmp(mac_addr, adapter_mac_addr(iface), ETH_ALEN))) {
|
||||
bmatch = _TRUE;
|
||||
bmatch = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1049,13 +1049,13 @@ _adapter *rtw_get_iface_by_hwport(_adapter *padapter, u8 hw_port)
|
|||
{
|
||||
int i;
|
||||
_adapter *iface = NULL;
|
||||
u8 bmatch = _FALSE;
|
||||
u8 bmatch = false;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
iface = dvobj->padapters[i];
|
||||
if ((iface) && (hw_port == iface->hw_port)) {
|
||||
bmatch = _TRUE;
|
||||
bmatch = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1105,10 +1105,10 @@ static void rtw_dbg_skb_process(_adapter *padapter, union recv_frame *precvframe
|
|||
if (precvframe->u.hdr.len != pcloneframe->u.hdr.len)
|
||||
RTW_INFO("%s [WARN] recv_frame length(%d:%d) compare failed\n", __func__, precvframe->u.hdr.len, pcloneframe->u.hdr.len);
|
||||
|
||||
if (_rtw_memcmp(&precvframe->u.hdr.attrib, &pcloneframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib)) == _FALSE)
|
||||
if (_rtw_memcmp(&precvframe->u.hdr.attrib, &pcloneframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib)) == false)
|
||||
RTW_INFO("%s [WARN] recv_frame attrib compare failed\n", __func__);
|
||||
|
||||
if (_rtw_memcmp(precvframe->u.hdr.rx_data, pcloneframe->u.hdr.rx_data, precvframe->u.hdr.len) == _FALSE)
|
||||
if (_rtw_memcmp(precvframe->u.hdr.rx_data, pcloneframe->u.hdr.rx_data, precvframe->u.hdr.len) == false)
|
||||
RTW_INFO("%s [WARN] recv_frame rx_data compare failed\n", __func__);
|
||||
|
||||
}
|
||||
|
@ -1172,7 +1172,7 @@ void rtw_mi_buddy_clone_bcmc_packet(_adapter *padapter, union recv_frame *precvf
|
|||
iface = dvobj->padapters[i];
|
||||
if (!iface || iface == padapter)
|
||||
continue;
|
||||
if (rtw_is_adapter_up(iface) == _FALSE || iface->registered == 0)
|
||||
if (rtw_is_adapter_up(iface) == false || iface->registered == 0)
|
||||
continue;
|
||||
|
||||
pcloneframe = rtw_alloc_recvframe(pfree_recv_queue);
|
||||
|
|
390
core/rtw_mlme.c
390
core/rtw_mlme.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -141,11 +141,11 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv)
|
|||
pmp_priv->network_macaddr[4] = 0x66;
|
||||
pmp_priv->network_macaddr[5] = 0x55;
|
||||
|
||||
pmp_priv->bSetRxBssid = _FALSE;
|
||||
pmp_priv->bRTWSmbCfg = _FALSE;
|
||||
pmp_priv->bloopback = _FALSE;
|
||||
pmp_priv->bSetRxBssid = false;
|
||||
pmp_priv->bRTWSmbCfg = false;
|
||||
pmp_priv->bloopback = false;
|
||||
|
||||
pmp_priv->bloadefusemap = _FALSE;
|
||||
pmp_priv->bloadefusemap = false;
|
||||
|
||||
pnetwork = &pmp_priv->mp_network.network;
|
||||
_rtw_memcpy(pnetwork->MacAddress, pmp_priv->network_macaddr, ETH_ALEN);
|
||||
|
@ -219,8 +219,8 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter)
|
|||
pattrib->qsel = pattrib->priority;
|
||||
pattrib->nr_frags = 1;
|
||||
pattrib->encrypt = 0;
|
||||
pattrib->bswenc = _FALSE;
|
||||
pattrib->qos_en = _FALSE;
|
||||
pattrib->bswenc = false;
|
||||
pattrib->qos_en = false;
|
||||
|
||||
pattrib->pktlen = 1500;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ s32 init_mp_priv(PADAPTER padapter)
|
|||
pmppriv->mp_dm = 0;
|
||||
pmppriv->tx.stop = 1;
|
||||
pmppriv->bSetTxPower = 0; /*for manually set tx power*/
|
||||
pmppriv->bTxBufCkFail = _FALSE;
|
||||
pmppriv->bTxBufCkFail = false;
|
||||
pmppriv->pktInterval = 0;
|
||||
pmppriv->pktLength = 1000;
|
||||
|
||||
|
@ -347,15 +347,15 @@ MPT_InitializeAdapter(
|
|||
u32 ledsetting;
|
||||
struct mlme_priv *pmlmepriv = &pAdapter->mlmepriv;
|
||||
|
||||
pMptCtx->bMptDrvUnload = _FALSE;
|
||||
pMptCtx->bMassProdTest = _FALSE;
|
||||
pMptCtx->bMptIndexEven = _TRUE; /* default gain index is -6.0db */
|
||||
pMptCtx->bMptDrvUnload = false;
|
||||
pMptCtx->bMassProdTest = false;
|
||||
pMptCtx->bMptIndexEven = true; /* default gain index is -6.0db */
|
||||
pMptCtx->h2cReqNum = 0x0;
|
||||
/* init for BT MP */
|
||||
|
||||
mpt_InitHWConfig(pAdapter);
|
||||
|
||||
pMptCtx->bMptWorkItemInProgress = _FALSE;
|
||||
pMptCtx->bMptWorkItemInProgress = false;
|
||||
pMptCtx->CurrMptAct = NULL;
|
||||
pMptCtx->mpt_rf_path = ODM_RF_PATH_A;
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
@ -365,7 +365,7 @@ MPT_InitializeAdapter(
|
|||
ledsetting = rtw_read32(pAdapter, REG_LEDCFG0);
|
||||
|
||||
PHY_LCCalibrate(pAdapter);
|
||||
PHY_IQCalibrate(pAdapter, _FALSE);
|
||||
PHY_IQCalibrate(pAdapter, false);
|
||||
|
||||
PHY_SetRFPathSwitch(pAdapter, 1/*pHalData->bDefaultAntenna*/); /* default use Main */
|
||||
|
||||
|
@ -403,20 +403,20 @@ MPT_DeInitAdapter(
|
|||
{
|
||||
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.mpt_ctx;
|
||||
|
||||
pMptCtx->bMptDrvUnload = _TRUE;
|
||||
pMptCtx->bMptDrvUnload = true;
|
||||
}
|
||||
|
||||
static u8 mpt_ProStartTest(PADAPTER padapter)
|
||||
{
|
||||
PMPT_CONTEXT pMptCtx = &padapter->mppriv.mpt_ctx;
|
||||
|
||||
pMptCtx->bMassProdTest = _TRUE;
|
||||
pMptCtx->is_start_cont_tx = _FALSE;
|
||||
pMptCtx->bCckContTx = _FALSE;
|
||||
pMptCtx->bOfdmContTx = _FALSE;
|
||||
pMptCtx->bSingleCarrier = _FALSE;
|
||||
pMptCtx->is_carrier_suppression = _FALSE;
|
||||
pMptCtx->is_single_tone = _FALSE;
|
||||
pMptCtx->bMassProdTest = true;
|
||||
pMptCtx->is_start_cont_tx = false;
|
||||
pMptCtx->bCckContTx = false;
|
||||
pMptCtx->bOfdmContTx = false;
|
||||
pMptCtx->bSingleCarrier = false;
|
||||
pMptCtx->is_carrier_suppression = false;
|
||||
pMptCtx->is_single_tone = false;
|
||||
pMptCtx->HWTxmode = PACKETS_TX;
|
||||
|
||||
return _SUCCESS;
|
||||
|
@ -438,7 +438,7 @@ void GetPowerTracking(PADAPTER padapter, u8 *enable)
|
|||
|
||||
void rtw_mp_trigger_iqk(PADAPTER padapter)
|
||||
{
|
||||
PHY_IQCalibrate(padapter, _FALSE);
|
||||
PHY_IQCalibrate(padapter, false);
|
||||
}
|
||||
|
||||
void rtw_mp_trigger_lck(PADAPTER padapter)
|
||||
|
@ -462,7 +462,7 @@ static void disable_dm(PADAPTER padapter)
|
|||
rtw_phydm_func_disable_all(padapter);
|
||||
|
||||
/* enable APK, LCK and IQK but disable power tracking */
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = _FALSE;
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = false;
|
||||
rtw_phydm_func_set(padapter, ODM_RF_CALIBRATION);
|
||||
|
||||
/* #ifdef CONFIG_BT_COEXIST */
|
||||
|
@ -480,13 +480,13 @@ void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart)
|
|||
RTW_INFO("in MPT_PwrCtlDM start\n");
|
||||
rtw_phydm_func_set(padapter, ODM_RF_TX_PWR_TRACK | ODM_RF_CALIBRATION);
|
||||
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = _TRUE;
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = true;
|
||||
padapter->mppriv.mp_dm = 1;
|
||||
|
||||
} else {
|
||||
RTW_INFO("in MPT_PwrCtlDM stop\n");
|
||||
disable_dm(padapter);
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = _FALSE;
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = false;
|
||||
padapter->mppriv.mp_dm = 0;
|
||||
{
|
||||
struct _TXPWRTRACK_CFG c;
|
||||
|
@ -561,13 +561,13 @@ u32 mp_join(PADAPTER padapter, u8 mode)
|
|||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
goto end_of_mp_start_test;
|
||||
|
||||
/* init mp_start_test status */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
rtw_disassoc_cmd(padapter, 500, _TRUE);
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
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);
|
||||
}
|
||||
pmppriv->prev_fw_state = get_fwstate(pmlmepriv);
|
||||
|
@ -693,11 +693,11 @@ void mp_stop_test(PADAPTER padapter)
|
|||
if (pmppriv->mode == MP_ON) {
|
||||
pmppriv->bSetTxPower = 0;
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _FALSE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false)
|
||||
goto end_of_mp_stop_test;
|
||||
|
||||
/* 3 1. disconnect psudo AdHoc */
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
rtw_indicate_disconnect(padapter, 0, false);
|
||||
|
||||
/* 3 2. clear psta used in mp test mode.
|
||||
* rtw_free_assoc_resources(padapter, 1); */
|
||||
|
@ -781,7 +781,7 @@ int SetTxPower(PADAPTER pAdapter)
|
|||
{
|
||||
|
||||
hal_mpt_SetTxPower(pAdapter);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void SetTxAGCOffset(PADAPTER pAdapter, u32 ulTxAGCOffset)
|
||||
|
@ -1143,7 +1143,7 @@ void SetPacketRx(PADAPTER pAdapter, u8 bStartRx, u8 bAB)
|
|||
pHalData->ReceiveConfig |= RCR_ACRC32;
|
||||
pHalData->ReceiveConfig |= RCR_APP_PHYST_RXFF | RCR_APP_ICV | RCR_APP_MIC;
|
||||
|
||||
if (pmppriv->bSetRxBssid == _TRUE) {
|
||||
if (pmppriv->bSetRxBssid == true) {
|
||||
RTW_INFO("%s: pmppriv->network_macaddr=" MAC_FMT "\n", __func__,
|
||||
MAC_ARG(pmppriv->network_macaddr));
|
||||
pHalData->ReceiveConfig = 0;
|
||||
|
@ -1259,7 +1259,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) {
|
||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2159,7 +2159,7 @@ void PMAC_Nsym_generator(
|
|||
N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss;
|
||||
N_DBPS = (u32)((double)N_CBPS * CR);
|
||||
|
||||
if (pPMacTxInfo->bLDPC == FALSE) {
|
||||
if (pPMacTxInfo->bLDPC == false) {
|
||||
N_ES = (u32)ceil((double)(N_DBPS * pPMacPktInfo->Nss) / 4. / 300.);
|
||||
RTW_INFO("N_ES = %d\n", N_ES);
|
||||
|
||||
|
@ -2203,7 +2203,7 @@ void PMAC_Nsym_generator(
|
|||
N_BPSC = N_BPSC_list[pPMacPktInfo->MCS];
|
||||
N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss;
|
||||
N_DBPS = (u32)((double)N_CBPS * CR);
|
||||
if (pPMacTxInfo->bLDPC == FALSE) {
|
||||
if (pPMacTxInfo->bLDPC == false) {
|
||||
if (pPMacTxInfo->bSGI)
|
||||
N_ES = (u32)ceil((double)(N_DBPS) / 3.6 / 600.);
|
||||
else
|
||||
|
@ -2437,7 +2437,7 @@ void HT_SIG_generator(
|
|||
/* Short GI*/
|
||||
sig_bi[31] = pPMacTxInfo->bSGI;
|
||||
/* N_ELTFs*/
|
||||
if (pPMacTxInfo->NDP_sound == FALSE) {
|
||||
if (pPMacTxInfo->NDP_sound == false) {
|
||||
sig_bi[32] = 0;
|
||||
sig_bi[33] = 0;
|
||||
} else {
|
||||
|
|
|
@ -128,10 +128,10 @@ bool rtw_odm_adaptivity_needed(_adapter *adapter)
|
|||
{
|
||||
struct registry_priv *regsty = &adapter->registrypriv;
|
||||
struct mlme_priv *mlme = &adapter->mlmepriv;
|
||||
bool ret = _FALSE;
|
||||
bool ret = false;
|
||||
|
||||
if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_ENABLE)
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
220
core/rtw_p2p.c
220
core/rtw_p2p.c
|
@ -40,7 +40,7 @@ static int rtw_p2p_is_channel_list_ok(u8 desired_ch, u8 *ch_list, u8 ch_cnt)
|
|||
|
||||
static int is_any_client_associated(_adapter *padapter)
|
||||
{
|
||||
return padapter->stapriv.asoc_list_cnt ? _TRUE : _FALSE;
|
||||
return padapter->stapriv.asoc_list_cnt ? true : false;
|
||||
}
|
||||
|
||||
static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
@ -71,7 +71,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
plist = get_next(phead);
|
||||
|
||||
/* look up sta asoc_queue */
|
||||
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, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
@ -592,7 +592,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -704,7 +704,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -777,7 +777,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||
/* WFD device information */
|
||||
/* WFD primary sink + available for WFD session + WiFi Direct mode */
|
||||
|
||||
if (_TRUE == pwdinfo->session_available) {
|
||||
if (true == pwdinfo->session_available) {
|
||||
if (P2P_ROLE_GO == pwdinfo->role) {
|
||||
if (is_any_client_associated(pwdinfo->padapter)) {
|
||||
if (pwdinfo->wfd_tdls_enable) {
|
||||
|
@ -839,7 +839,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -993,7 +993,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1092,7 +1092,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1191,7 +1191,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1290,7 +1290,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1390,7 +1390,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1490,7 +1490,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1603,7 +1603,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1716,7 +1716,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1816,7 +1816,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -1860,7 +1860,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u8 zero_array_check[L2SDTA_SERVICE_VE_LEN] = { 0x00 };
|
||||
u8 widi_version = 0, i = 0;
|
||||
|
||||
if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE)
|
||||
if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == false)
|
||||
widi_version = 35;
|
||||
else if (pmlmepriv->num_p2p_sdt != 0)
|
||||
widi_version = 40;
|
||||
|
@ -2237,7 +2237,7 @@ u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
|
||||
{
|
||||
u8 *p;
|
||||
u32 ret = _FALSE;
|
||||
u32 ret = false;
|
||||
u8 *p2pie;
|
||||
u32 p2pielen = 0;
|
||||
int ssid_len = 0, rate_cnt = 0;
|
||||
|
@ -2287,9 +2287,9 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
/* Check Requested Device Type attributes in WSC IE. */
|
||||
/* Check Device ID attribute in P2P IE */
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
} else if ((p != NULL) && (ssid_len == 0))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
} else {
|
||||
/* non -p2p device */
|
||||
}
|
||||
|
@ -2447,7 +2447,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
plist = get_next(phead);
|
||||
|
||||
/* look up sta asoc_queue */
|
||||
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, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
@ -2484,13 +2484,13 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
issue_p2p_devdisc_resp(pwdinfo, get_addr2_ptr(pframe), status, dialogToken);
|
||||
|
||||
|
||||
return (status == P2P_STATUS_SUCCESS) ? _TRUE : _FALSE;
|
||||
return (status == P2P_STATUS_SUCCESS) ? true : false;
|
||||
|
||||
}
|
||||
|
||||
u32 process_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
|
||||
|
@ -2529,14 +2529,14 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
}
|
||||
}
|
||||
RTW_INFO("[%s] config method = %s\n", __func__, pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req);
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
u8 process_p2p_provdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe)
|
||||
{
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list)
|
||||
|
@ -2663,7 +2663,7 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
|||
|
||||
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||
if (!(cap_attr & P2P_GRPCAP_INTRABSS))
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
ptdlsinfo->ap_prohibited = true;
|
||||
#endif /* defined(CONFIG_WFD) && defined(CONFIG_TDLS) */
|
||||
}
|
||||
|
||||
|
@ -2823,7 +2823,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
cap_attr = le16_to_cpu(le_tmp);
|
||||
#ifdef CONFIG_TDLS
|
||||
if (!(cap_attr & P2P_GRPCAP_INTRABSS))
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
ptdlsinfo->ap_prohibited = true;
|
||||
#endif /* CONFIG_TDLS */
|
||||
}
|
||||
|
||||
|
@ -3067,7 +3067,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
|
||||
issue_p2p_presence_resp(pwdinfo, get_addr2_ptr(pframe), status, dialogToken);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void find_phase_handler(_adapter *padapter)
|
||||
|
@ -3210,7 +3210,7 @@ void p2p_concurrent_handler(_adapter *padapter)
|
|||
}
|
||||
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_LISTEN) ||
|
||||
rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL) ||
|
||||
(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == _FALSE) ||
|
||||
(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == false) ||
|
||||
rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ)) {
|
||||
/* Now, the driver is in the listen state of P2P mode. */
|
||||
RTW_INFO("[%s] P2P_STATE_IDLE, ext_listen_interval = %d\n", __func__, pwdinfo->ext_listen_interval);
|
||||
|
@ -3244,13 +3244,13 @@ void p2p_concurrent_handler(_adapter *padapter)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
|
||||
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == _TRUE) {
|
||||
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == true) {
|
||||
val8 = 1;
|
||||
set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
|
||||
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ) && pwdinfo->invitereq_info.benable == _TRUE) {
|
||||
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ) && pwdinfo->invitereq_info.benable == true) {
|
||||
/*
|
||||
val8 = 1;
|
||||
set_channel_bwmode(padapter, , HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
|
||||
|
@ -3290,7 +3290,7 @@ static int cancel_ro_ch_handler(_adapter *padapter, u8 *buf)
|
|||
|
||||
_enter_critical_mutex(&pwdev_priv->roch_mutex, NULL);
|
||||
|
||||
if (rtw_cfg80211_get_is_roch(padapter) != _TRUE)
|
||||
if (rtw_cfg80211_get_is_roch(padapter) != true)
|
||||
goto exit;
|
||||
|
||||
if (roch_parm->wdev && roch_parm->cookie) {
|
||||
|
@ -3336,7 +3336,7 @@ static int cancel_ro_ch_handler(_adapter *padapter, u8 *buf)
|
|||
|
||||
wdev = pcfg80211_wdinfo->ro_ch_wdev;
|
||||
|
||||
rtw_cfg80211_set_is_roch(padapter, _FALSE);
|
||||
rtw_cfg80211_set_is_roch(padapter, false);
|
||||
pcfg80211_wdinfo->ro_ch_wdev = NULL;
|
||||
pcfg80211_wdinfo->last_ro_ch_time = rtw_get_current_time();
|
||||
|
||||
|
@ -3349,7 +3349,7 @@ static int cancel_ro_ch_handler(_adapter *padapter, u8 *buf)
|
|||
, pcfg80211_wdinfo->remain_on_ch_cookie);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_ScanNotify(padapter, _FALSE);
|
||||
rtw_btcoex_ScanNotify(padapter, false);
|
||||
#endif
|
||||
|
||||
exit:
|
||||
|
@ -3450,7 +3450,7 @@ static void rtw_change_p2pie_ch_list(_adapter *padapter, const u8 *frame_body, u
|
|||
|
||||
static bool rtw_chk_p2pie_ch_list_with_buddy(_adapter *padapter, const u8 *frame_body, u32 len)
|
||||
{
|
||||
bool fit = _FALSE;
|
||||
bool fit = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *ies, *p2p_ie;
|
||||
u32 ies_len, p2p_ielen;
|
||||
|
@ -3480,7 +3480,7 @@ static bool rtw_chk_p2pie_ch_list_with_buddy(_adapter *padapter, const u8 *frame
|
|||
for (i = 0; i < num_of_ch; i++) {
|
||||
if (*(pattr_temp + 2 + i) == union_ch) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" ch_list fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), union_ch);
|
||||
fit = _TRUE;
|
||||
fit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3499,7 +3499,7 @@ static bool rtw_chk_p2pie_ch_list_with_buddy(_adapter *padapter, const u8 *frame
|
|||
|
||||
static bool rtw_chk_p2pie_op_ch_with_buddy(_adapter *padapter, const u8 *frame_body, u32 len)
|
||||
{
|
||||
bool fit = _FALSE;
|
||||
bool fit = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *ies, *p2p_ie;
|
||||
u32 ies_len, p2p_ielen;
|
||||
|
@ -3521,7 +3521,7 @@ static bool rtw_chk_p2pie_op_ch_with_buddy(_adapter *padapter, const u8 *frame_b
|
|||
if (pattr != NULL) {
|
||||
if (*(pattr + 4) == union_ch) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" op_ch fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), union_ch);
|
||||
fit = _TRUE;
|
||||
fit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3616,7 +3616,7 @@ static u32 rtw_xframe_build_wfd_ie(struct xmit_frame *xframe)
|
|||
if (category == RTW_WLAN_CATEGORY_PUBLIC) {
|
||||
action = frame_body[1];
|
||||
if (action == ACT_PUBLIC_VENDOR
|
||||
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE
|
||||
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == true
|
||||
) {
|
||||
OUI_Subtype = frame_body[6];
|
||||
dialogToken = frame_body[7];
|
||||
|
@ -3697,7 +3697,7 @@ static bool rtw_xframe_del_wfd_ie(struct xmit_frame *xframe)
|
|||
if (category == RTW_WLAN_CATEGORY_PUBLIC) {
|
||||
action = frame_body[1];
|
||||
if (action == ACT_PUBLIC_VENDOR
|
||||
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE
|
||||
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == true
|
||||
) {
|
||||
OUI_Subtype = frame_body[6];
|
||||
|
||||
|
@ -3744,7 +3744,7 @@ void rtw_xframe_chk_wfd_ie(struct xmit_frame *xframe)
|
|||
del = 1;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (_TRUE == wdinfo->wfd_info->wfd_enable)
|
||||
if (true == wdinfo->wfd_info->wfd_enable)
|
||||
#endif
|
||||
del = build = 1;
|
||||
|
||||
|
@ -3764,7 +3764,7 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le
|
|||
int w_sz = 0;
|
||||
u8 ch_cnt = 0;
|
||||
u8 ch_list[40];
|
||||
bool continuous = _FALSE;
|
||||
bool continuous = false;
|
||||
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, &attr_contentlen);
|
||||
if (pattr != NULL) {
|
||||
|
@ -3808,16 +3808,16 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le
|
|||
}
|
||||
|
||||
/*
|
||||
* return _TRUE if requester is GO, _FALSE if responder is GO
|
||||
* return true if requester is GO, false if responder is GO
|
||||
*/
|
||||
static bool rtw_p2p_nego_intent_compare(u8 req, u8 resp)
|
||||
{
|
||||
if (req >> 1 == resp >> 1)
|
||||
return req & 0x01 ? _TRUE : _FALSE;
|
||||
return req & 0x01 ? true : false;
|
||||
else if (req >> 1 > resp >> 1)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
|
@ -3842,7 +3842,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
if (category == RTW_WLAN_CATEGORY_PUBLIC) {
|
||||
action = frame_body[1];
|
||||
if (action == ACT_PUBLIC_VENDOR
|
||||
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE
|
||||
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == true
|
||||
) {
|
||||
OUI_Subtype = frame_body[6];
|
||||
dialogToken = frame_body[7];
|
||||
|
@ -3866,11 +3866,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
|
||||
if (tx) {
|
||||
#ifdef CONFIG_DRV_ISSUE_PROV_REQ /* IOT FOR S2 */
|
||||
if (pwdev_priv->provdisc_req_issued == _FALSE)
|
||||
if (pwdev_priv->provdisc_req_issued == false)
|
||||
rtw_cfg80211_issue_p2p_provision_request(padapter, buf, len);
|
||||
#endif /* CONFIG_DRV_ISSUE_PROV_REQ */
|
||||
|
||||
/* pwdev_priv->provdisc_req_issued = _FALSE; */
|
||||
/* pwdev_priv->provdisc_req_issued = false; */
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
|
||||
if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0)
|
||||
|
@ -3906,7 +3906,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
RTW_INFO("RTW_%s:P2P_GO_NEGO_REQ, dialogToken=%d, intent:%u%s, listen_ch:%d, op_ch:%d, ch_list:%s"
|
||||
, (tx == _TRUE) ? "Tx" : "Rx" , dialogToken , (intent >> 1) , intent & 0x1 ? "+" : "-" , listen_ch , op_ch , ch_list_buf);
|
||||
, (tx == true) ? "Tx" : "Rx" , dialogToken , (intent >> 1) , intent & 0x1 ? "+" : "-" , listen_ch , op_ch , ch_list_buf);
|
||||
if (iaddr)
|
||||
_RTW_INFO(", iaddr:"MAC_FMT, MAC_ARG(iaddr));
|
||||
_RTW_INFO("\n");
|
||||
|
@ -3914,7 +3914,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
if (!tx) {
|
||||
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
|
||||
if (rtw_mi_check_status(padapter, MI_LINKED)
|
||||
&& rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE
|
||||
&& rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == false
|
||||
&& padapter->registrypriv.full_ch_in_p2p_handshake == 0) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
|
||||
rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0);
|
||||
|
@ -3948,7 +3948,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
iaddr = cont;
|
||||
|
||||
if (nego_info->token == dialogToken && nego_info->state == 0
|
||||
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE
|
||||
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == true
|
||||
) {
|
||||
if (iaddr)
|
||||
_rtw_memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN);
|
||||
|
@ -3962,16 +3962,16 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
RTW_INFO("RTW_%s:P2P_GO_NEGO_RESP, dialogToken=%d, intent:%u%s, status:%d, op_ch:%d, ch_list:%s"
|
||||
, (tx == _TRUE) ? "Tx" : "Rx", dialogToken, (intent >> 1), intent & 0x1 ? "+" : "-", status, op_ch, ch_list_buf);
|
||||
, (tx == true) ? "Tx" : "Rx", dialogToken, (intent >> 1), intent & 0x1 ? "+" : "-", status, op_ch, ch_list_buf);
|
||||
if (iaddr)
|
||||
_RTW_INFO(", iaddr:"MAC_FMT, MAC_ARG(iaddr));
|
||||
_RTW_INFO("\n");
|
||||
|
||||
if (!tx) {
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
|
||||
if (rtw_mi_check_status(padapter, MI_LINKED)
|
||||
&& rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE
|
||||
&& rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == false
|
||||
&& padapter->registrypriv.full_ch_in_p2p_handshake == 0) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
|
||||
rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0);
|
||||
|
@ -3983,7 +3983,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
}
|
||||
case P2P_GO_NEGO_CONF: {
|
||||
struct rtw_wdev_nego_info *nego_info = &pwdev_priv->nego_info;
|
||||
bool is_go = _FALSE;
|
||||
bool is_go = false;
|
||||
|
||||
if (tx) {
|
||||
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
|
||||
|
@ -4000,7 +4000,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
status = *cont;
|
||||
|
||||
if (nego_info->token == dialogToken && nego_info->state == 1
|
||||
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE
|
||||
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == true
|
||||
) {
|
||||
nego_info->status = (status == -1) ? 0xff : status;
|
||||
nego_info->conf_op_ch = (op_ch == -1) ? 0 : op_ch;
|
||||
|
@ -4008,7 +4008,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
|
||||
if (status == 0) {
|
||||
if (rtw_p2p_nego_intent_compare(nego_info->req_intent, nego_info->rsp_intent) ^ !tx)
|
||||
is_go = _TRUE;
|
||||
is_go = true;
|
||||
}
|
||||
|
||||
nego_info->token = 0; /* init */
|
||||
|
@ -4016,7 +4016,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
RTW_INFO("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d, op_ch:%d, ch_list:%s\n"
|
||||
, (tx == _TRUE) ? "Tx" : "Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
, (tx == true) ? "Tx" : "Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
|
||||
if (!tx) {
|
||||
}
|
||||
|
@ -4059,7 +4059,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
RTW_INFO("RTW_%s:P2P_INVIT_REQ, dialogToken=%d, flags:0x%02x, op_ch:%d, ch_list:%s"
|
||||
, (tx == _TRUE) ? "Tx" : "Rx", dialogToken, flags, op_ch, ch_list_buf);
|
||||
, (tx == true) ? "Tx" : "Rx", dialogToken, flags, op_ch, ch_list_buf);
|
||||
if (gbssid)
|
||||
_RTW_INFO(", gbssid:"MAC_FMT, MAC_ARG(gbssid));
|
||||
_RTW_INFO("\n");
|
||||
|
@ -4067,10 +4067,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
if (!tx) {
|
||||
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
|
||||
if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) {
|
||||
if (op_ch != -1 && rtw_chk_p2pie_op_ch_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE) {
|
||||
if (op_ch != -1 && rtw_chk_p2pie_op_ch_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == false) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" op_ch:%u has no intersect with buddy\n", FUNC_ADPT_ARG(padapter), op_ch);
|
||||
rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0);
|
||||
} else if (rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE) {
|
||||
} else if (rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == false) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
|
||||
rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0);
|
||||
}
|
||||
|
@ -4108,7 +4108,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
gbssid = cont;
|
||||
|
||||
if (invit_info->token == dialogToken && invit_info->state == 0
|
||||
&& _rtw_memcmp(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE
|
||||
&& _rtw_memcmp(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == true
|
||||
) {
|
||||
invit_info->status = (status == -1) ? 0xff : status;
|
||||
invit_info->rsp_op_ch = op_ch;
|
||||
|
@ -4118,7 +4118,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
RTW_INFO("RTW_%s:P2P_INVIT_RESP, dialogToken=%d, status:%d, op_ch:%d, ch_list:%s"
|
||||
, (tx == _TRUE) ? "Tx" : "Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
, (tx == true) ? "Tx" : "Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
if (gbssid)
|
||||
_RTW_INFO(", gbssid:"MAC_FMT, MAC_ARG(gbssid));
|
||||
_RTW_INFO("\n");
|
||||
|
@ -4129,11 +4129,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
break;
|
||||
}
|
||||
case P2P_DEVDISC_REQ:
|
||||
RTW_INFO("RTW_%s:P2P_DEVDISC_REQ, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken);
|
||||
RTW_INFO("RTW_%s:P2P_DEVDISC_REQ, dialogToken=%d\n", (tx == true) ? "Tx" : "Rx", dialogToken);
|
||||
break;
|
||||
case P2P_DEVDISC_RESP:
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
RTW_INFO("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken, cont ? *cont : -1);
|
||||
RTW_INFO("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx == true) ? "Tx" : "Rx", dialogToken, cont ? *cont : -1);
|
||||
break;
|
||||
case P2P_PROVISION_DISC_REQ: {
|
||||
size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
@ -4141,22 +4141,22 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
uint p2p_ielen = 0;
|
||||
uint contentlen = 0;
|
||||
|
||||
RTW_INFO("RTW_%s:P2P_PROVISION_DISC_REQ, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken);
|
||||
RTW_INFO("RTW_%s:P2P_PROVISION_DISC_REQ, dialogToken=%d\n", (tx == true) ? "Tx" : "Rx", dialogToken);
|
||||
|
||||
/* if(tx) */
|
||||
{
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
|
||||
p2p_ie = rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen);
|
||||
if (p2p_ie) {
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, NULL, &contentlen)) {
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;/* case: p2p_client join p2p GO */
|
||||
pwdev_priv->provdisc_req_issued = false;/* case: p2p_client join p2p GO */
|
||||
} else {
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
RTW_INFO("provdisc_req_issued is _TRUE\n");
|
||||
RTW_INFO("provdisc_req_issued is true\n");
|
||||
#endif /*CONFIG_DEBUG_CFG80211*/
|
||||
pwdev_priv->provdisc_req_issued = _TRUE;/* case: p2p_devices connection before Nego req. */
|
||||
pwdev_priv->provdisc_req_issued = true;/* case: p2p_devices connection before Nego req. */
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4164,10 +4164,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
}
|
||||
break;
|
||||
case P2P_PROVISION_DISC_RESP:
|
||||
RTW_INFO("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken);
|
||||
RTW_INFO("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx == true) ? "Tx" : "Rx", dialogToken);
|
||||
break;
|
||||
default:
|
||||
RTW_INFO("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", OUI_Subtype, dialogToken);
|
||||
RTW_INFO("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx == true) ? "Tx" : "Rx", OUI_Subtype, dialogToken);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4186,24 +4186,24 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
|
||||
switch (OUI_Subtype) {
|
||||
case P2P_NOTICE_OF_ABSENCE:
|
||||
RTW_INFO("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", dialogToken);
|
||||
RTW_INFO("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx == true) ? "TX" : "RX", dialogToken);
|
||||
break;
|
||||
case P2P_PRESENCE_REQUEST:
|
||||
RTW_INFO("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", dialogToken);
|
||||
RTW_INFO("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx == true) ? "TX" : "RX", dialogToken);
|
||||
break;
|
||||
case P2P_PRESENCE_RESPONSE:
|
||||
RTW_INFO("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", dialogToken);
|
||||
RTW_INFO("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken=%d\n", (tx == true) ? "TX" : "RX", dialogToken);
|
||||
break;
|
||||
case P2P_GO_DISC_REQUEST:
|
||||
RTW_INFO("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", dialogToken);
|
||||
RTW_INFO("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx == true) ? "TX" : "RX", dialogToken);
|
||||
break;
|
||||
default:
|
||||
RTW_INFO("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx == _TRUE) ? "TX" : "RX", OUI_Subtype, dialogToken);
|
||||
RTW_INFO("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx == true) ? "TX" : "RX", OUI_Subtype, dialogToken);
|
||||
break;
|
||||
}
|
||||
|
||||
} else
|
||||
RTW_INFO("RTW_%s:action frame category=%d\n", (tx == _TRUE) ? "TX" : "RX", category);
|
||||
RTW_INFO("RTW_%s:action frame category=%d\n", (tx == true) ? "TX" : "RX", category);
|
||||
|
||||
return is_p2p_frame;
|
||||
}
|
||||
|
@ -4294,7 +4294,7 @@ s32 p2p_protocol_wk_hdl(_adapter *padapter, int intCmdType, u8 *buf)
|
|||
|
||||
int process_p2p_cross_connect_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
||||
{
|
||||
int ret = _TRUE;
|
||||
int ret = true;
|
||||
u8 *ies;
|
||||
u32 ies_len;
|
||||
u8 *p2p_ie;
|
||||
|
@ -4317,7 +4317,7 @@ int process_p2p_cross_connect_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
|||
/* Get P2P Manageability IE. */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_MANAGEABILITY, p2p_attr, &attr_contentlen)) {
|
||||
if ((p2p_attr[0] & (BIT(0) | BIT(1))) == 0x01)
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
/* Get the next P2P IE */
|
||||
|
@ -4338,7 +4338,7 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
|||
u32 attr_contentlen = 0;
|
||||
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
u8 find_p2p = _FALSE, find_p2p_ps = _FALSE;
|
||||
u8 find_p2p = false, find_p2p_ps = false;
|
||||
u8 noa_offset, noa_num, noa_index;
|
||||
|
||||
|
||||
|
@ -4359,10 +4359,10 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
|||
p2p_ie = rtw_get_p2p_ie(ies, ies_len, NULL, &p2p_ielen);
|
||||
|
||||
while (p2p_ie) {
|
||||
find_p2p = _TRUE;
|
||||
find_p2p = true;
|
||||
/* Get Notice of Absence IE. */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_NOA, noa_attr, &attr_contentlen)) {
|
||||
find_p2p_ps = _TRUE;
|
||||
find_p2p_ps = true;
|
||||
noa_index = noa_attr[0];
|
||||
|
||||
if ((pwdinfo->p2p_ps_mode == P2P_PS_NONE) ||
|
||||
|
@ -4397,7 +4397,7 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
|||
if (pwdinfo->opp_ps == 1) {
|
||||
pwdinfo->p2p_ps_mode = P2P_PS_CTWINDOW;
|
||||
/* driver should wait LPS for entering CTWindow */
|
||||
if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == _TRUE)
|
||||
if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true)
|
||||
p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 1);
|
||||
} else if (pwdinfo->noa_num > 0) {
|
||||
pwdinfo->p2p_ps_mode = P2P_PS_NOA;
|
||||
|
@ -4414,8 +4414,8 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
|||
|
||||
}
|
||||
|
||||
if (find_p2p == _TRUE) {
|
||||
if ((pwdinfo->p2p_ps_mode > P2P_PS_NONE) && (find_p2p_ps == _FALSE))
|
||||
if (find_p2p == true) {
|
||||
if ((pwdinfo->p2p_ps_mode > P2P_PS_NONE) && (find_p2p_ps == false))
|
||||
p2p_ps_wk_cmd(padapter, P2P_PS_DISABLE, 1);
|
||||
}
|
||||
|
||||
|
@ -4439,7 +4439,7 @@ void p2p_ps_wk_hdl(_adapter *padapter, u8 p2p_ps_state)
|
|||
pwdinfo->opp_ps = 0;
|
||||
pwdinfo->noa_num = 0;
|
||||
pwdinfo->p2p_ps_mode = P2P_PS_NONE;
|
||||
if (pwrpriv->bFwCurrentInPSMode == _TRUE) {
|
||||
if (pwrpriv->bFwCurrentInPSMode == true) {
|
||||
if (pwrpriv->smart_ps == 0) {
|
||||
pwrpriv->smart_ps = 2;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&(pwrpriv->pwr_mode)));
|
||||
|
@ -4631,16 +4631,16 @@ static void pre_tx_scan_timer_process(struct timer_list *t)
|
|||
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ)) {
|
||||
if (_TRUE == pwdinfo->tx_prov_disc_info.benable) { /* the provision discovery request frame is trigger to send or not */
|
||||
if (true == pwdinfo->tx_prov_disc_info.benable) { /* the provision discovery request frame is trigger to send or not */
|
||||
p2p_protocol_wk_cmd(adapter, P2P_PRE_TX_PROVDISC_PROCESS_WK);
|
||||
/* issue_probereq_p2p(adapter, NULL); */
|
||||
/* _set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); */
|
||||
}
|
||||
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING)) {
|
||||
if (_TRUE == pwdinfo->nego_req_info.benable)
|
||||
if (true == pwdinfo->nego_req_info.benable)
|
||||
p2p_protocol_wk_cmd(adapter, P2P_PRE_TX_NEGOREQ_PROCESS_WK);
|
||||
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ)) {
|
||||
if (_TRUE == pwdinfo->invitereq_info.benable)
|
||||
if (true == pwdinfo->invitereq_info.benable)
|
||||
p2p_protocol_wk_cmd(adapter, P2P_PRE_TX_INVITEREQ_PROCESS_WK);
|
||||
} else
|
||||
RTW_INFO("[%s] p2p_state is %d, ignore!!\n", __func__, rtw_p2p_state(pwdinfo));
|
||||
|
@ -4703,9 +4703,9 @@ void reset_global_wifidirect_info(_adapter *padapter)
|
|||
|
||||
pwdinfo = &padapter->wdinfo;
|
||||
pwdinfo->persistent_supported = 0;
|
||||
pwdinfo->session_available = _TRUE;
|
||||
pwdinfo->session_available = true;
|
||||
rtw_tdls_wfd_enable(padapter, 0);
|
||||
pwdinfo->wfd_tdls_weaksec = _TRUE;
|
||||
pwdinfo->wfd_tdls_weaksec = true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
|
@ -4723,13 +4723,13 @@ int rtw_init_wifi_display_info(_adapter *padapter)
|
|||
#endif
|
||||
pwfd_info->tdls_rtsp_ctrlport = 0;
|
||||
pwfd_info->peer_rtsp_ctrlport = 0; /* Reset to 0 */
|
||||
pwfd_info->wfd_enable = _FALSE;
|
||||
pwfd_info->wfd_enable = false;
|
||||
pwfd_info->wfd_device_type = WFD_DEVINFO_PSINK;
|
||||
pwfd_info->scan_result_type = SCAN_RESULT_P2P_ONLY;
|
||||
|
||||
/* Used in P2P */
|
||||
pwfd_info->peer_session_avail = _TRUE;
|
||||
pwfd_info->wfd_pc = _FALSE;
|
||||
pwfd_info->peer_session_avail = true;
|
||||
pwfd_info->wfd_pc = false;
|
||||
|
||||
/* Used in TDLS */
|
||||
memset(pwfd_info->ip_address, 0x00, 4);
|
||||
|
@ -4744,10 +4744,10 @@ inline void rtw_wfd_enable(_adapter *adapter, bool on)
|
|||
|
||||
if (on) {
|
||||
wfdinfo->rtsp_ctrlport = wfdinfo->init_rtsp_ctrlport;
|
||||
wfdinfo->wfd_enable = _TRUE;
|
||||
wfdinfo->wfd_enable = true;
|
||||
|
||||
} else {
|
||||
wfdinfo->wfd_enable = _FALSE;
|
||||
wfdinfo->wfd_enable = false;
|
||||
wfdinfo->rtsp_ctrlport = 0;
|
||||
}
|
||||
}
|
||||
|
@ -4757,7 +4757,7 @@ inline void rtw_wfd_set_ctrl_port(_adapter *adapter, u16 port)
|
|||
struct wifi_display_info *wfdinfo = &adapter->wfd_info;
|
||||
|
||||
wfdinfo->init_rtsp_ctrlport = port;
|
||||
if (wfdinfo->wfd_enable == _TRUE)
|
||||
if (wfdinfo->wfd_enable == true)
|
||||
wfdinfo->rtsp_ctrlport = port;
|
||||
if (adapter->wdinfo.wfd_tdls_enable == 1)
|
||||
wfdinfo->tdls_rtsp_ctrlport = port;
|
||||
|
@ -4788,7 +4788,7 @@ u32 rtw_append_beacon_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||
goto exit;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (_TRUE == wdinfo->wfd_info->wfd_enable)
|
||||
if (true == wdinfo->wfd_info->wfd_enable)
|
||||
#endif
|
||||
build_ie_by_self = 1;
|
||||
|
||||
|
@ -4816,7 +4816,7 @@ u32 rtw_append_probe_req_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||
goto exit;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (_TRUE == wdinfo->wfd_info->wfd_enable)
|
||||
if (true == wdinfo->wfd_info->wfd_enable)
|
||||
#endif
|
||||
build_ie_by_self = 1;
|
||||
|
||||
|
@ -4844,7 +4844,7 @@ u32 rtw_append_probe_resp_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||
goto exit;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (_TRUE == wdinfo->wfd_info->wfd_enable)
|
||||
if (true == wdinfo->wfd_info->wfd_enable)
|
||||
#endif
|
||||
build_ie_by_self = 1;
|
||||
|
||||
|
@ -4872,7 +4872,7 @@ u32 rtw_append_assoc_req_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||
goto exit;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (_TRUE == wdinfo->wfd_info->wfd_enable)
|
||||
if (true == wdinfo->wfd_info->wfd_enable)
|
||||
#endif
|
||||
build_ie_by_self = 1;
|
||||
|
||||
|
@ -4900,7 +4900,7 @@ u32 rtw_append_assoc_resp_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||
goto exit;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (_TRUE == wdinfo->wfd_info->wfd_enable)
|
||||
if (true == wdinfo->wfd_info->wfd_enable)
|
||||
#endif
|
||||
build_ie_by_self = 1;
|
||||
|
||||
|
@ -5284,24 +5284,24 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
|
|||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (padapter->wdinfo.driver_interface == DRIVER_CFG80211)
|
||||
adapter_wdev_data(padapter)->p2p_enabled = _TRUE;
|
||||
adapter_wdev_data(padapter)->p2p_enabled = true;
|
||||
#endif
|
||||
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, _TRUE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, true);
|
||||
#ifdef CONFIG_WFD
|
||||
if (hal_chk_wl_func(padapter, WL_FUNC_MIRACAST))
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_WIFI_DISPLAY_STATE, NULL, _TRUE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_WIFI_DISPLAY_STATE, NULL, true);
|
||||
#endif
|
||||
|
||||
} else if (role == P2P_ROLE_DISABLE) {
|
||||
#ifdef CONFIG_INTEL_WIDI
|
||||
if (padapter->mlmepriv.p2p_reject_disable == _TRUE)
|
||||
if (padapter->mlmepriv.p2p_reject_disable == true)
|
||||
return ret;
|
||||
#endif /* CONFIG_INTEL_WIDI */
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (padapter->wdinfo.driver_interface == DRIVER_CFG80211)
|
||||
adapter_wdev_data(padapter)->p2p_enabled = _FALSE;
|
||||
adapter_wdev_data(padapter)->p2p_enabled = false;
|
||||
#endif
|
||||
|
||||
pwdinfo->listen_channel = 0;
|
||||
|
@ -5333,10 +5333,10 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
|
|||
pwdinfo->profileindex = 0;
|
||||
}
|
||||
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, _FALSE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, false);
|
||||
#ifdef CONFIG_WFD
|
||||
if (hal_chk_wl_func(padapter, WL_FUNC_MIRACAST))
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_WIFI_DISPLAY_STATE, NULL, _FALSE);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_WIFI_DISPLAY_STATE, NULL, false);
|
||||
#endif
|
||||
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||
|
|
|
@ -75,7 +75,7 @@ void _ips_enter(_adapter *padapter)
|
|||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
pwrpriv->bips_processing = true;
|
||||
|
||||
/* syn ips_mode with request */
|
||||
pwrpriv->ips_mode = pwrpriv->ips_mode_req;
|
||||
|
@ -84,16 +84,16 @@ void _ips_enter(_adapter *padapter)
|
|||
RTW_INFO("==>ips_enter cnts:%d\n", pwrpriv->ips_enter_cnts);
|
||||
|
||||
if (rf_off == pwrpriv->change_rfpwrstate) {
|
||||
pwrpriv->bpower_saving = _TRUE;
|
||||
pwrpriv->bpower_saving = true;
|
||||
RTW_INFO("nolinked power save enter\n");
|
||||
|
||||
if (pwrpriv->ips_mode == IPS_LEVEL_2)
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
pwrpriv->bkeepfwalive = true;
|
||||
|
||||
rtw_ips_pwr_down(padapter);
|
||||
pwrpriv->rf_pwrstate = rf_off;
|
||||
}
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
pwrpriv->bips_processing = false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ int _ips_leave(_adapter *padapter)
|
|||
int result = _SUCCESS;
|
||||
|
||||
if ((pwrpriv->rf_pwrstate == rf_off) && (!pwrpriv->bips_processing)) {
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
pwrpriv->bips_processing = true;
|
||||
pwrpriv->change_rfpwrstate = rf_on;
|
||||
pwrpriv->ips_leave_cnts++;
|
||||
RTW_INFO("==>ips_leave cnts:%d\n", pwrpriv->ips_leave_cnts);
|
||||
|
@ -128,10 +128,10 @@ int _ips_leave(_adapter *padapter)
|
|||
RTW_INFO("nolinked power save leave\n");
|
||||
|
||||
RTW_INFO("==> ips_leave.....LED(0x%08x)...\n", rtw_read32(padapter, 0x4c));
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
pwrpriv->bips_processing = false;
|
||||
|
||||
pwrpriv->bkeepfwalive = _FALSE;
|
||||
pwrpriv->bpower_saving = _FALSE;
|
||||
pwrpriv->bkeepfwalive = false;
|
||||
pwrpriv->bpower_saving = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -188,9 +188,9 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
bool ret = _FALSE;
|
||||
bool ret = false;
|
||||
|
||||
if (adapter_to_pwrctl(adapter)->bpower_saving == _TRUE) {
|
||||
if (adapter_to_pwrctl(adapter)->bpower_saving == true) {
|
||||
/* RTW_INFO("%s: already in LPS or IPS mode\n", __func__); */
|
||||
goto exit;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
|||
|| check_fwstate(pmlmepriv, WIFI_AP_STATE)
|
||||
|| check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE)
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211)
|
||||
|| rtw_cfg80211_get_is_roch(iface) == _TRUE
|
||||
|| rtw_cfg80211_get_is_roch(iface) == true
|
||||
#elif defined(CONFIG_P2P)
|
||||
|| rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE)
|
||||
|| rtw_p2p_chk_state(pwdinfo, P2P_STATE_LISTEN)
|
||||
|
@ -235,7 +235,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
if (adapter->proximity.proxim_on == _TRUE)
|
||||
if (adapter->proximity.proxim_on == true)
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
@ -247,7 +247,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
|
@ -281,16 +281,16 @@ void rtw_ps_processor(_adapter *padapter)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (pwrpriv->bInSuspend == _TRUE) { /* system suspend or autosuspend */
|
||||
if (pwrpriv->bInSuspend == true) { /* system suspend or autosuspend */
|
||||
pdbgpriv->dbg_ps_insuspend_cnt++;
|
||||
RTW_INFO("%s, pwrpriv->bInSuspend == _TRUE ignore this process\n", __func__);
|
||||
RTW_INFO("%s, pwrpriv->bInSuspend == true ignore this process\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
pwrpriv->ps_processing = _TRUE;
|
||||
pwrpriv->ps_processing = true;
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
if (pwrpriv->bips_processing == _TRUE)
|
||||
if (pwrpriv->bips_processing == true)
|
||||
goto exit;
|
||||
|
||||
/* RTW_INFO("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca)); */
|
||||
|
@ -298,8 +298,8 @@ void rtw_ps_processor(_adapter *padapter)
|
|||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (padapter->registrypriv.usbss_enable) {
|
||||
if (pwrpriv->rf_pwrstate == rf_on) {
|
||||
if (padapter->net_closed == _TRUE)
|
||||
pwrpriv->ps_flag = _TRUE;
|
||||
if (padapter->net_closed == true)
|
||||
pwrpriv->ps_flag = true;
|
||||
|
||||
rfpwrstate = RfOnOffDetect(padapter);
|
||||
RTW_INFO("@@@@- #1 %s==> rfstate:%s\n", __func__, (rfpwrstate == rf_on) ? "rf_on" : "rf_off");
|
||||
|
@ -307,8 +307,8 @@ void rtw_ps_processor(_adapter *padapter)
|
|||
if (rfpwrstate == rf_off) {
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
pwrpriv->brfoffbyhw = _TRUE;
|
||||
pwrpriv->bkeepfwalive = true;
|
||||
pwrpriv->brfoffbyhw = true;
|
||||
|
||||
autosuspend_enter(padapter);
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ void rtw_ps_processor(_adapter *padapter)
|
|||
if (rfpwrstate != pwrpriv->rf_pwrstate) {
|
||||
if (rfpwrstate == rf_off) {
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
pwrpriv->brfoffbyhw = _TRUE;
|
||||
pwrpriv->brfoffbyhw = true;
|
||||
rtw_hw_suspend(padapter);
|
||||
} else {
|
||||
pwrpriv->change_rfpwrstate = rf_on;
|
||||
|
@ -339,7 +339,7 @@ void rtw_ps_processor(_adapter *padapter)
|
|||
if (pwrpriv->ips_mode_req == IPS_NONE)
|
||||
goto exit;
|
||||
|
||||
if (rtw_pwr_unassociated_idle(padapter) == _FALSE)
|
||||
if (rtw_pwr_unassociated_idle(padapter) == false)
|
||||
goto exit;
|
||||
|
||||
if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts % 4) == 0)) {
|
||||
|
@ -351,13 +351,13 @@ void rtw_ps_processor(_adapter *padapter)
|
|||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (padapter->registrypriv.usbss_enable) {
|
||||
if (pwrpriv->bHWPwrPindetect)
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
pwrpriv->bkeepfwalive = true;
|
||||
|
||||
if (padapter->net_closed == _TRUE)
|
||||
pwrpriv->ps_flag = _TRUE;
|
||||
if (padapter->net_closed == true)
|
||||
pwrpriv->ps_flag = true;
|
||||
|
||||
#if defined(CONFIG_BT_COEXIST) && defined (CONFIG_AUTOSUSPEND)
|
||||
if (_TRUE == pwrpriv->bInternalAutoSuspend)
|
||||
if (true == pwrpriv->bInternalAutoSuspend)
|
||||
RTW_INFO("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n", __func__, pwrpriv->bInternalAutoSuspend);
|
||||
else {
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
|
@ -384,7 +384,7 @@ exit:
|
|||
#ifndef CONFIG_IPS_CHECK_IN_WD
|
||||
rtw_set_pwr_state_check_timer(pwrpriv);
|
||||
#endif
|
||||
pwrpriv->ps_processing = _FALSE;
|
||||
pwrpriv->ps_processing = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
|
|||
#ifdef CONFIG_CHECK_LEAVE_LPS
|
||||
static u32 start_time = 0;
|
||||
static u32 xmit_cnt = 0;
|
||||
u8 bLeaveLPS = _FALSE;
|
||||
u8 bLeaveLPS = false;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
|
||||
|
@ -426,11 +426,11 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
|
|||
if ((adapter_to_pwrctl(padapter)->bLeisurePs)
|
||||
&& (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE)
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == false)
|
||||
#endif
|
||||
) {
|
||||
/* RTW_INFO("leave lps via Tx = %d\n", xmit_cnt); */
|
||||
bLeaveLPS = _TRUE;
|
||||
bLeaveLPS = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -443,11 +443,11 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
|
|||
if ((adapter_to_pwrctl(padapter)->bLeisurePs)
|
||||
&& (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE)
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == false)
|
||||
#endif
|
||||
) {
|
||||
/* RTW_INFO("leave lps via Rx = %d\n", pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); */
|
||||
bLeaveLPS = _TRUE;
|
||||
bLeaveLPS = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -482,7 +482,7 @@ void rtw_set_rpwm(PADAPTER padapter, u8 pslv)
|
|||
pslv = PS_STATE(pslv);
|
||||
|
||||
#ifdef CONFIG_LPS_RPWM_TIMER
|
||||
if (pwrpriv->brpwmtimeout == _TRUE)
|
||||
if (pwrpriv->brpwmtimeout == true)
|
||||
RTW_INFO("%s: RPWM timeout, force to set RPWM(0x%02X) again!\n", __func__, pslv);
|
||||
else
|
||||
#endif /* CONFIG_LPS_RPWM_TIMER */
|
||||
|
@ -600,15 +600,15 @@ static u8 PS_RDY_CHECK(_adapter *padapter)
|
|||
#endif /* CONFIG_P2P */
|
||||
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
if (_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
|
||||
return _TRUE;
|
||||
else if (_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
|
||||
return _TRUE;
|
||||
else if (_TRUE == pwrpriv->bInSuspend)
|
||||
return _FALSE;
|
||||
if (true == pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
|
||||
return true;
|
||||
else if (true == pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
|
||||
return true;
|
||||
else if (true == pwrpriv->bInSuspend)
|
||||
return false;
|
||||
#else
|
||||
if (_TRUE == pwrpriv->bInSuspend)
|
||||
return _FALSE;
|
||||
if (true == pwrpriv->bInSuspend)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
curr_time = rtw_get_current_time();
|
||||
|
@ -616,34 +616,34 @@ static u8 PS_RDY_CHECK(_adapter *padapter)
|
|||
delta_time = curr_time - pwrpriv->DelayLPSLastTimeStamp;
|
||||
|
||||
if (delta_time < LPS_DELAY_TIME)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_SITE_MONITOR)
|
||||
|| check_fwstate(pmlmepriv, WIFI_UNDER_LINKING | WIFI_UNDER_WPS)
|
||||
|| check_fwstate(pmlmepriv, WIFI_AP_STATE)
|
||||
|| check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE)
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211)
|
||||
|| rtw_cfg80211_get_is_roch(padapter) == _TRUE
|
||||
|| rtw_cfg80211_get_is_roch(padapter) == true
|
||||
#endif
|
||||
|| rtw_is_scan_deny(padapter)
|
||||
#ifdef CONFIG_TDLS
|
||||
/* TDLS link is established. */
|
||||
|| (padapter->tdlsinfo.link_established == _TRUE)
|
||||
|| (padapter->tdlsinfo.link_established == true)
|
||||
#endif /* CONFIG_TDLS */
|
||||
)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == _FALSE)) {
|
||||
if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == false)) {
|
||||
RTW_INFO("Group handshake still in progress !!!\n");
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (!rtw_cfg80211_pwr_mgmt(padapter))
|
||||
return _FALSE;
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_FWLPS_IN_IPS)
|
||||
|
@ -656,7 +656,7 @@ void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable)
|
|||
u8 cpwm_orig = 0, cpwm_now = 0;
|
||||
u8 parm[H2C_INACTIVE_PS_LEN] = {0};
|
||||
|
||||
if (padapter->netif_up == _FALSE) {
|
||||
if (padapter->netif_up == false) {
|
||||
RTW_INFO("%s: ERROR, netif is down\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
@ -822,13 +822,13 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
if (ps_mode == PS_MODE_ACTIVE) {
|
||||
if (1
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
&& (((rtw_btcoex_IsBtControlLps(padapter) == _FALSE)
|
||||
&& (((rtw_btcoex_IsBtControlLps(padapter) == false)
|
||||
#ifdef CONFIG_P2P_PS
|
||||
&& (pwdinfo->opp_ps == 0)
|
||||
#endif /* CONFIG_P2P_PS */
|
||||
)
|
||||
|| ((rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
&& (rtw_btcoex_IsLpsOn(padapter) == _FALSE))
|
||||
|| ((rtw_btcoex_IsBtControlLps(padapter) == true)
|
||||
&& (rtw_btcoex_IsLpsOn(padapter) == false))
|
||||
)
|
||||
#else /* !CONFIG_BT_COEXIST */
|
||||
#ifdef CONFIG_P2P_PS
|
||||
|
@ -848,7 +848,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
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) {
|
||||
ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)
|
||||
|
@ -862,9 +862,9 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
rtw_set_rpwm(padapter, PS_STATE_S4);
|
||||
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) || defined(CONFIG_P2P_WOWLAN)
|
||||
if (pwrpriv->wowlan_mode == _TRUE ||
|
||||
pwrpriv->wowlan_ap_mode == _TRUE ||
|
||||
pwrpriv->wowlan_p2p_mode == _TRUE) {
|
||||
if (pwrpriv->wowlan_mode == true ||
|
||||
pwrpriv->wowlan_ap_mode == true ||
|
||||
pwrpriv->wowlan_p2p_mode == true) {
|
||||
u32 start_time, delay_ms;
|
||||
u8 val8;
|
||||
delay_ms = 20;
|
||||
|
@ -892,7 +892,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
(u8 *)(&ps_mode));
|
||||
#endif /*CONFIG_LPS_POFF*/
|
||||
|
||||
pwrpriv->bFwCurrentInPSMode = _FALSE;
|
||||
pwrpriv->bFwCurrentInPSMode = false;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_LpsNotify(padapter, ps_mode);
|
||||
|
@ -901,11 +901,11 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
} else {
|
||||
if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE))
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
|| ((rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
&& (rtw_btcoex_IsLpsOn(padapter) == _TRUE))
|
||||
|| ((rtw_btcoex_IsBtControlLps(padapter) == true)
|
||||
&& (rtw_btcoex_IsLpsOn(padapter) == true))
|
||||
#endif
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
|| (_TRUE == pwrpriv->wowlan_p2p_mode)
|
||||
|| (true == pwrpriv->wowlan_p2p_mode)
|
||||
#endif /* CONFIG_P2P_WOWLAN */
|
||||
) {
|
||||
u8 pslv;
|
||||
|
@ -922,7 +922,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
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) {
|
||||
ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)
|
||||
|
@ -941,7 +941,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
(u8 *)(&ps_mode));
|
||||
#endif /*CONFIG_LPS_POFF*/
|
||||
|
||||
pwrpriv->bFwCurrentInPSMode = _TRUE;
|
||||
pwrpriv->bFwCurrentInPSMode = true;
|
||||
pwrpriv->pwr_mode = ps_mode;
|
||||
pwrpriv->smart_ps = smart_ps;
|
||||
pwrpriv->bcn_ant_mode = bcn_ant_mode;
|
||||
|
@ -960,8 +960,8 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
#endif /* CONFIG_LPS_LCLK */
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) {
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == false)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == true)) {
|
||||
u8 val8;
|
||||
|
||||
val8 = rtw_btcoex_LpsVal(padapter);
|
||||
|
@ -990,14 +990,14 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
|||
s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms)
|
||||
{
|
||||
u32 start_time;
|
||||
u8 bAwake = _FALSE;
|
||||
u8 bAwake = false;
|
||||
s32 err = 0;
|
||||
|
||||
|
||||
start_time = rtw_get_current_time();
|
||||
while (1) {
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake);
|
||||
if (_TRUE == bAwake)
|
||||
if (true == bAwake)
|
||||
break;
|
||||
|
||||
if (rtw_is_surprise_removed(padapter)) {
|
||||
|
@ -1032,11 +1032,11 @@ void LPS_Enter(PADAPTER padapter, const char *msg)
|
|||
|
||||
|
||||
/* RTW_INFO("+LeisurePSEnter\n"); */
|
||||
if (_FALSE == padapter->bFWReady)
|
||||
if (false == padapter->bFWReady)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == true)
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ void LPS_Enter(PADAPTER padapter, const char *msg)
|
|||
#endif
|
||||
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
if (PS_RDY_CHECK(dvobj->padapters[i]) == _FALSE)
|
||||
if (PS_RDY_CHECK(dvobj->padapters[i]) == false)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1070,7 +1070,7 @@ void LPS_Enter(PADAPTER padapter, const char *msg)
|
|||
if (pwrpriv->LpsIdleCount >= 2) { /* 4 Sec */
|
||||
if (pwrpriv->pwr_mode == PS_MODE_ACTIVE) {
|
||||
sprintf(buf, "WIFI-%s", msg);
|
||||
pwrpriv->bpower_saving = _TRUE;
|
||||
pwrpriv->bpower_saving = true;
|
||||
rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, padapter->registrypriv.smart_ps, 0, buf);
|
||||
}
|
||||
} else
|
||||
|
@ -1092,7 +1092,7 @@ void LPS_Leave(PADAPTER padapter, const char *msg)
|
|||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
|
||||
u32 start_time;
|
||||
u8 bAwake = _FALSE;
|
||||
u8 bAwake = false;
|
||||
char buf[32] = {0};
|
||||
struct debug_priv *pdbgpriv = &dvobj->drv_dbg;
|
||||
|
||||
|
@ -1100,7 +1100,7 @@ void LPS_Leave(PADAPTER padapter, const char *msg)
|
|||
/* RTW_INFO("+LeisurePSLeave\n"); */
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == true)
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
@ -1114,7 +1114,7 @@ void LPS_Leave(PADAPTER padapter, const char *msg)
|
|||
}
|
||||
}
|
||||
|
||||
pwrpriv->bpower_saving = _FALSE;
|
||||
pwrpriv->bpower_saving = false;
|
||||
#ifdef DBG_CHECK_FW_PS_STATE
|
||||
if (rtw_fw_ps_state(padapter) == _FAIL) {
|
||||
RTW_INFO("leave lps, fw in 32k\n");
|
||||
|
@ -1142,7 +1142,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
|
|||
RTW_INFO("%s.....\n", __func__);
|
||||
|
||||
if (rtw_is_surprise_removed(Adapter)) {
|
||||
RTW_INFO(FUNC_ADPT_FMT ": bSurpriseRemoved=_TRUE Skip!\n", FUNC_ADPT_ARG(Adapter));
|
||||
RTW_INFO(FUNC_ADPT_FMT ": bSurpriseRemoved=true Skip!\n", FUNC_ADPT_ARG(Adapter));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1221,7 +1221,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
|
|||
#endif
|
||||
{
|
||||
#ifdef CONFIG_IPS
|
||||
if (_FALSE == ips_leave(pri_padapter))
|
||||
if (false == ips_leave(pri_padapter))
|
||||
RTW_INFO("======> ips_leave fail.............\n");
|
||||
#endif
|
||||
}
|
||||
|
@ -1245,14 +1245,14 @@ void LeaveAllPowerSaveMode(PADAPTER Adapter)
|
|||
|
||||
/* RTW_INFO("%s.....\n",__func__); */
|
||||
|
||||
if (_FALSE == Adapter->bup) {
|
||||
if (false == Adapter->bup) {
|
||||
RTW_INFO(FUNC_ADPT_FMT ": bup=%d Skip!\n",
|
||||
FUNC_ADPT_ARG(Adapter), Adapter->bup);
|
||||
return;
|
||||
}
|
||||
|
||||
if (rtw_is_surprise_removed(Adapter)) {
|
||||
RTW_INFO(FUNC_ADPT_FMT ": bSurpriseRemoved=_TRUE Skip!\n", FUNC_ADPT_ARG(Adapter));
|
||||
RTW_INFO(FUNC_ADPT_FMT ": bSurpriseRemoved=true Skip!\n", FUNC_ADPT_ARG(Adapter));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1292,7 +1292,7 @@ void LeaveAllPowerSaveMode(PADAPTER Adapter)
|
|||
{
|
||||
#if defined(CONFIG_FWLPS_IN_IPS) || defined(CONFIG_SWLPS_IN_IPS) || (defined(CONFIG_PLATFORM_SPRD))
|
||||
#ifdef CONFIG_IPS
|
||||
if (_FALSE == ips_leave(Adapter))
|
||||
if (false == ips_leave(Adapter))
|
||||
RTW_INFO("======> ips_leave fail.............\n");
|
||||
#endif
|
||||
#endif /* CONFIG_SWLPS_IN_IPS || (CONFIG_PLATFORM_SPRD) */
|
||||
|
@ -1313,7 +1313,7 @@ void LPS_Leave_check(
|
|||
|
||||
pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
bReady = _FALSE;
|
||||
bReady = false;
|
||||
start_time = rtw_get_current_time();
|
||||
|
||||
rtw_yield_os();
|
||||
|
@ -1326,11 +1326,11 @@ void LPS_Leave_check(
|
|||
|| rtw_is_drv_stopped(padapter)
|
||||
|| (pwrpriv->pwr_mode == PS_MODE_ACTIVE)
|
||||
)
|
||||
bReady = _TRUE;
|
||||
bReady = true;
|
||||
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
||||
if (_TRUE == bReady)
|
||||
if (true == bReady)
|
||||
break;
|
||||
|
||||
if (rtw_get_passing_time_ms(start_time) > 100) {
|
||||
|
@ -1452,9 +1452,9 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
|
|||
RTW_INFO("%s: cpwm=%d, nothing to do!\n", __func__, pwrpriv->cpwm);
|
||||
goto exit;
|
||||
}
|
||||
pwrpriv->brpwmtimeout = _TRUE;
|
||||
pwrpriv->brpwmtimeout = true;
|
||||
rtw_set_rpwm(padapter, pwrpriv->rpwm);
|
||||
pwrpriv->brpwmtimeout = _FALSE;
|
||||
pwrpriv->brpwmtimeout = false;
|
||||
|
||||
exit:
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
@ -1529,7 +1529,7 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task)
|
|||
|
||||
register_task_alive(pwrctrl, task);
|
||||
|
||||
if (pwrctrl->bFwCurrentInPSMode == _TRUE) {
|
||||
if (pwrctrl->bFwCurrentInPSMode == true) {
|
||||
|
||||
if (pwrctrl->cpwm < pslv) {
|
||||
if (pwrctrl->cpwm < PS_STATE_S2)
|
||||
|
@ -1572,8 +1572,8 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task)
|
|||
pslv = PS_STATE_S0;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) {
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == false)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == true)) {
|
||||
u8 val8;
|
||||
|
||||
val8 = rtw_btcoex_LpsVal(padapter);
|
||||
|
@ -1588,7 +1588,7 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task)
|
|||
unregister_task_alive(pwrctrl, task);
|
||||
|
||||
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE)
|
||||
&& (pwrctrl->bFwCurrentInPSMode == _TRUE)) {
|
||||
&& (pwrctrl->bFwCurrentInPSMode == true)) {
|
||||
|
||||
if (pwrctrl->cpwm > pslv) {
|
||||
if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
|
||||
|
@ -1628,7 +1628,7 @@ s32 rtw_register_tx_alive(PADAPTER padapter)
|
|||
|
||||
register_task_alive(pwrctrl, XMIT_ALIVE);
|
||||
|
||||
if (pwrctrl->bFwCurrentInPSMode == _TRUE) {
|
||||
if (pwrctrl->bFwCurrentInPSMode == true) {
|
||||
|
||||
if (pwrctrl->cpwm < pslv) {
|
||||
if (pwrctrl->cpwm < PS_STATE_S2)
|
||||
|
@ -1679,7 +1679,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter)
|
|||
|
||||
register_task_alive(pwrctrl, CMD_ALIVE);
|
||||
|
||||
if (pwrctrl->bFwCurrentInPSMode == _TRUE) {
|
||||
if (pwrctrl->bFwCurrentInPSMode == true) {
|
||||
|
||||
if (pwrctrl->cpwm < pslv) {
|
||||
if (pwrctrl->cpwm < PS_STATE_S2)
|
||||
|
@ -1773,8 +1773,8 @@ void rtw_unregister_tx_alive(PADAPTER padapter)
|
|||
pslv = PS_STATE_S0;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) {
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == false)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == true)) {
|
||||
u8 val8;
|
||||
|
||||
val8 = rtw_btcoex_LpsVal(padapter);
|
||||
|
@ -1800,7 +1800,7 @@ void rtw_unregister_tx_alive(PADAPTER padapter)
|
|||
unregister_task_alive(pwrctrl, XMIT_ALIVE);
|
||||
|
||||
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE)
|
||||
&& (pwrctrl->bFwCurrentInPSMode == _TRUE)) {
|
||||
&& (pwrctrl->bFwCurrentInPSMode == true)) {
|
||||
|
||||
if (pwrctrl->cpwm > pslv) {
|
||||
if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
|
||||
|
@ -1831,8 +1831,8 @@ void rtw_unregister_cmd_alive(PADAPTER padapter)
|
|||
pslv = PS_STATE_S0;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) {
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == false)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == true)) {
|
||||
u8 val8;
|
||||
|
||||
val8 = rtw_btcoex_LpsVal(padapter);
|
||||
|
@ -1859,7 +1859,7 @@ void rtw_unregister_cmd_alive(PADAPTER padapter)
|
|||
unregister_task_alive(pwrctrl, CMD_ALIVE);
|
||||
|
||||
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE)
|
||||
&& (pwrctrl->bFwCurrentInPSMode == _TRUE)) {
|
||||
&& (pwrctrl->bFwCurrentInPSMode == true)) {
|
||||
|
||||
if (pwrctrl->cpwm > pslv) {
|
||||
if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
|
||||
|
@ -1926,16 +1926,16 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
pwrctrlpriv->ips_leave_cnts = 0;
|
||||
pwrctrlpriv->lps_enter_cnts = 0;
|
||||
pwrctrlpriv->lps_leave_cnts = 0;
|
||||
pwrctrlpriv->bips_processing = _FALSE;
|
||||
pwrctrlpriv->bips_processing = false;
|
||||
|
||||
pwrctrlpriv->ips_mode = padapter->registrypriv.ips_mode;
|
||||
pwrctrlpriv->ips_mode_req = padapter->registrypriv.ips_mode;
|
||||
|
||||
pwrctrlpriv->pwr_state_check_interval = RTW_PWR_STATE_CHK_INTERVAL;
|
||||
pwrctrlpriv->pwr_state_check_cnts = 0;
|
||||
pwrctrlpriv->bInternalAutoSuspend = _FALSE;
|
||||
pwrctrlpriv->bInSuspend = _FALSE;
|
||||
pwrctrlpriv->bkeepfwalive = _FALSE;
|
||||
pwrctrlpriv->bInternalAutoSuspend = false;
|
||||
pwrctrlpriv->bInSuspend = false;
|
||||
pwrctrlpriv->bkeepfwalive = false;
|
||||
pwrctrlpriv->padapter = padapter;
|
||||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
|
@ -1955,9 +1955,9 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
pwrctrlpriv->power_mgnt = PS_MODE_ACTIVE ;
|
||||
else
|
||||
pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt; /* PS_MODE_MIN; */
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? _TRUE : _FALSE;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? true : false;
|
||||
|
||||
pwrctrlpriv->bFwCurrentInPSMode = _FALSE;
|
||||
pwrctrlpriv->bFwCurrentInPSMode = false;
|
||||
|
||||
pwrctrlpriv->rpwm = 0;
|
||||
pwrctrlpriv->cpwm = PS_STATE_S4;
|
||||
|
@ -1977,7 +1977,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
_init_workitem(&pwrctrlpriv->dma_event, dma_event_callback, NULL);
|
||||
|
||||
#ifdef CONFIG_LPS_RPWM_TIMER
|
||||
pwrctrlpriv->brpwmtimeout = _FALSE;
|
||||
pwrctrlpriv->brpwmtimeout = false;
|
||||
_init_workitem(&pwrctrlpriv->rpwmtimeoutwi, rpwmtimeout_workitem_callback, NULL);
|
||||
_init_timer(&pwrctrlpriv->pwr_rpwm_timer, padapter->pnetdev, pwr_rpwm_timeout_handler, padapter);
|
||||
#endif /* CONFIG_LPS_RPWM_TIMER */
|
||||
|
@ -1989,9 +1989,9 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
timer_setup(&pwrctrlpriv->pwr_state_check_timer, pwr_state_check_handler, 0);
|
||||
#endif
|
||||
|
||||
pwrctrlpriv->wowlan_mode = _FALSE;
|
||||
pwrctrlpriv->wowlan_ap_mode = _FALSE;
|
||||
pwrctrlpriv->wowlan_p2p_mode = _FALSE;
|
||||
pwrctrlpriv->wowlan_mode = false;
|
||||
pwrctrlpriv->wowlan_ap_mode = false;
|
||||
pwrctrlpriv->wowlan_p2p_mode = false;
|
||||
pwrctrlpriv->wowlan_last_wake_reason = 0;
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
|
@ -2008,7 +2008,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
/*default low active*/
|
||||
pwrctrlpriv->is_high_active = HIGH_ACTIVE;
|
||||
val8 = (pwrctrlpriv->is_high_active == 0) ? 1 : 0;
|
||||
rtw_hal_switch_gpio_wl_ctrl(padapter, WAKEUP_GPIO_IDX, _TRUE);
|
||||
rtw_hal_switch_gpio_wl_ctrl(padapter, WAKEUP_GPIO_IDX, true);
|
||||
rtw_hal_set_output_gpio(padapter, WAKEUP_GPIO_IDX, val8);
|
||||
RTW_INFO("%s: set GPIO_%d %d as default.\n",
|
||||
__func__, WAKEUP_GPIO_IDX, val8);
|
||||
|
@ -2016,9 +2016,9 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
rtw_wow_pattern_sw_reset(padapter);
|
||||
pwrctrlpriv->wowlan_in_resume = _FALSE;
|
||||
pwrctrlpriv->wowlan_in_resume = false;
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
pwrctrlpriv->pno_inited = _FALSE;
|
||||
pwrctrlpriv->pno_inited = false;
|
||||
pwrctrlpriv->pnlo_info = NULL;
|
||||
pwrctrlpriv->pscan_info = NULL;
|
||||
pwrctrlpriv->pno_ssid_list = NULL;
|
||||
|
@ -2116,12 +2116,12 @@ void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv)
|
|||
#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
|
||||
inline bool rtw_is_earlysuspend_registered(struct pwrctrl_priv *pwrpriv)
|
||||
{
|
||||
return (pwrpriv->early_suspend.suspend) ? _TRUE : _FALSE;
|
||||
return (pwrpriv->early_suspend.suspend) ? true : false;
|
||||
}
|
||||
|
||||
inline bool rtw_is_do_late_resume(struct pwrctrl_priv *pwrpriv)
|
||||
{
|
||||
return (pwrpriv->do_late_resume) ? _TRUE : _FALSE;
|
||||
return (pwrpriv->do_late_resume) ? true : false;
|
||||
}
|
||||
|
||||
inline void rtw_set_do_late_resume(struct pwrctrl_priv *pwrpriv, bool enable)
|
||||
|
@ -2137,7 +2137,7 @@ static void rtw_early_suspend(struct early_suspend *h)
|
|||
struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
|
||||
RTW_INFO("%s\n", __func__);
|
||||
|
||||
rtw_set_do_late_resume(pwrpriv, _FALSE);
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
}
|
||||
|
||||
static void rtw_late_resume(struct early_suspend *h)
|
||||
|
@ -2149,7 +2149,7 @@ static void rtw_late_resume(struct early_suspend *h)
|
|||
RTW_INFO("%s\n", __func__);
|
||||
|
||||
if (pwrpriv->do_late_resume) {
|
||||
rtw_set_do_late_resume(pwrpriv, _FALSE);
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
rtw_resume_process(adapter);
|
||||
}
|
||||
}
|
||||
|
@ -2171,7 +2171,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
{
|
||||
RTW_INFO("%s\n", __func__);
|
||||
|
||||
rtw_set_do_late_resume(pwrpriv, _FALSE);
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
|
||||
if (pwrpriv->early_suspend.suspend)
|
||||
unregister_early_suspend(&pwrpriv->early_suspend);
|
||||
|
@ -2188,7 +2188,7 @@ static void rtw_early_suspend(android_early_suspend_t *h)
|
|||
struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
|
||||
RTW_INFO("%s\n", __func__);
|
||||
|
||||
rtw_set_do_late_resume(pwrpriv, _FALSE);
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
}
|
||||
|
||||
static void rtw_late_resume(android_early_suspend_t *h)
|
||||
|
@ -2199,7 +2199,7 @@ static void rtw_late_resume(android_early_suspend_t *h)
|
|||
|
||||
RTW_INFO("%s\n", __func__);
|
||||
if (pwrpriv->do_late_resume) {
|
||||
rtw_set_do_late_resume(pwrpriv, _FALSE);
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
rtw_resume_process(adapter);
|
||||
}
|
||||
}
|
||||
|
@ -2219,7 +2219,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
{
|
||||
RTW_INFO("%s\n", __func__);
|
||||
|
||||
rtw_set_do_late_resume(pwrpriv, _FALSE);
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
|
||||
if (pwrpriv->early_suspend.suspend)
|
||||
android_unregister_early_suspend(&pwrpriv->early_suspend);
|
||||
|
@ -2231,7 +2231,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
|
||||
u8 rtw_interface_ps_func(_adapter *padapter, HAL_INTF_PS_FUNC efunc_id, u8 *val)
|
||||
{
|
||||
u8 bResult = _TRUE;
|
||||
u8 bResult = true;
|
||||
rtw_hal_intf_ps_func(padapter, efunc_id, val);
|
||||
|
||||
return bResult;
|
||||
|
@ -2293,7 +2293,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (pwrpriv->bInternalAutoSuspend == _FALSE && pwrpriv->bInSuspend) {
|
||||
if (pwrpriv->bInternalAutoSuspend == false && pwrpriv->bInSuspend) {
|
||||
RTW_INFO("%s wait bInSuspend...\n", __func__);
|
||||
while (pwrpriv->bInSuspend
|
||||
&& ((rtw_get_passing_time_ms(start) <= 3000 && !rtw_is_do_late_resume(pwrpriv))
|
||||
|
@ -2307,21 +2307,21 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
}
|
||||
|
||||
/* System suspend is not allowed to wakeup */
|
||||
if ((pwrpriv->bInternalAutoSuspend == _FALSE) && (_TRUE == pwrpriv->bInSuspend)) {
|
||||
if ((pwrpriv->bInternalAutoSuspend == false) && (true == pwrpriv->bInSuspend)) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* block??? */
|
||||
if ((pwrpriv->bInternalAutoSuspend == _TRUE) && (padapter->net_closed == _TRUE)) {
|
||||
if ((pwrpriv->bInternalAutoSuspend == true) && (padapter->net_closed == true)) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* I think this should be check in IPS, LPS, autosuspend functions... */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
#if defined(CONFIG_BT_COEXIST) && defined (CONFIG_AUTOSUSPEND)
|
||||
if (_TRUE == pwrpriv->bInternalAutoSuspend) {
|
||||
if (true == pwrpriv->bInternalAutoSuspend) {
|
||||
if (0 == pwrpriv->autopm_cnt) {
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
|
||||
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0)
|
||||
|
@ -2343,7 +2343,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
|
||||
if (rf_off == pwrpriv->rf_pwrstate) {
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (pwrpriv->brfoffbyhw == _TRUE) {
|
||||
if (pwrpriv->brfoffbyhw == true) {
|
||||
RTW_INFO("hw still in rf_off state ...........\n");
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
|
@ -2378,7 +2378,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
, rtw_is_drv_stopped(padapter) ? "True" : "False"
|
||||
, padapter->bup
|
||||
, rtw_get_hw_init_completed(padapter));
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -2401,7 +2401,7 @@ int rtw_pm_set_lps(_adapter *padapter, u8 mode)
|
|||
else
|
||||
pwrctrlpriv->LpsIdleCount = 2;
|
||||
pwrctrlpriv->power_mgnt = mode;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? _TRUE : _FALSE;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? true : false;
|
||||
}
|
||||
} else
|
||||
ret = -EINVAL;
|
||||
|
|
212
core/rtw_recv.c
212
core/rtw_recv.c
|
@ -214,7 +214,7 @@ union recv_frame *_rtw_alloc_recvframe(_queue *pfree_recv_queue)
|
|||
_adapter *padapter;
|
||||
struct recv_priv *precvpriv;
|
||||
|
||||
if (_rtw_queue_empty(pfree_recv_queue) == _TRUE)
|
||||
if (_rtw_queue_empty(pfree_recv_queue) == true)
|
||||
precvframe = NULL;
|
||||
else {
|
||||
phead = get_list_head(pfree_recv_queue);
|
||||
|
@ -364,7 +364,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue)
|
|||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
@ -429,7 +429,7 @@ struct recv_buf *rtw_dequeue_recvbuf(_queue *queue)
|
|||
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(queue) == _TRUE)
|
||||
if (_rtw_queue_empty(queue) == true)
|
||||
precvbuf = NULL;
|
||||
else {
|
||||
phead = get_list_head(queue);
|
||||
|
@ -453,7 +453,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
|
|||
sint i, res = _SUCCESS;
|
||||
u32 datalen;
|
||||
u8 miccode[8];
|
||||
u8 bmic_err = _FALSE, brpt_micerror = _TRUE;
|
||||
u8 bmic_err = false, brpt_micerror = true;
|
||||
u8 *pframe, *payload, *pframemic;
|
||||
u8 *mickey;
|
||||
/* u8 *iv,rxdata_key_idx=0; */
|
||||
|
@ -479,7 +479,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
|
|||
/* RTW_INFO("\n recvframe_chkmic: bcmc key psecuritypriv->dot118021XGrpKeyid(%d),pmlmeinfo->key_index(%d) ,recv key_id(%d)\n", */
|
||||
/* psecuritypriv->dot118021XGrpKeyid,pmlmeinfo->key_index,rxdata_key_idx); */
|
||||
|
||||
if (psecuritypriv->binstallGrpkey == _FALSE) {
|
||||
if (psecuritypriv->binstallGrpkey == false) {
|
||||
res = _FAIL;
|
||||
RTW_INFO("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n");
|
||||
goto exit;
|
||||
|
@ -499,25 +499,25 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
|
|||
|
||||
pframemic = payload + datalen;
|
||||
|
||||
bmic_err = _FALSE;
|
||||
bmic_err = false;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (miccode[i] != *(pframemic + i)) {
|
||||
bmic_err = _TRUE;
|
||||
bmic_err = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bmic_err == _TRUE) {
|
||||
if (bmic_err == true) {
|
||||
|
||||
|
||||
|
||||
/* double check key_index for some timing issue , */
|
||||
/* cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue */
|
||||
if ((IS_MCAST(prxattrib->ra) == _TRUE) && (prxattrib->key_index != pmlmeinfo->key_index))
|
||||
brpt_micerror = _FALSE;
|
||||
if ((IS_MCAST(prxattrib->ra) == true) && (prxattrib->key_index != pmlmeinfo->key_index))
|
||||
brpt_micerror = false;
|
||||
|
||||
if ((prxattrib->bdecrypted == _TRUE) && (brpt_micerror == _TRUE)) {
|
||||
if ((prxattrib->bdecrypted == true) && (brpt_micerror == true)) {
|
||||
rtw_handle_tkip_mic_err(adapter, stainfo, (u8)IS_MCAST(prxattrib->ra));
|
||||
RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted);
|
||||
} else {
|
||||
|
@ -528,8 +528,8 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
|
|||
|
||||
} else {
|
||||
/* mic checked ok */
|
||||
if ((psecuritypriv->bcheck_grpkey == _FALSE) && (IS_MCAST(prxattrib->ra) == _TRUE)) {
|
||||
psecuritypriv->bcheck_grpkey = _TRUE;
|
||||
if ((psecuritypriv->bcheck_grpkey == false) && (IS_MCAST(prxattrib->ra) == true)) {
|
||||
psecuritypriv->bcheck_grpkey = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -583,12 +583,12 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
}
|
||||
|
||||
if ((prxattrib->encrypt > 0) && ((prxattrib->bdecrypted == 0) || (psecuritypriv->sw_decrypt == _TRUE))) {
|
||||
if ((prxattrib->encrypt > 0) && ((prxattrib->bdecrypted == 0) || (psecuritypriv->sw_decrypt == true))) {
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!IS_MCAST(prxattrib->ra)) /* bc/mc packets use sw decryption for concurrent mode */
|
||||
#endif
|
||||
psecuritypriv->hw_decrypted = _FALSE;
|
||||
psecuritypriv->hw_decrypted = false;
|
||||
|
||||
#ifdef DBG_RX_SW_DECRYPTOR
|
||||
RTW_INFO(ADPT_FMT" - sec_type:%s DO SW decryption\n",
|
||||
|
@ -633,7 +633,7 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame)
|
|||
prxattrib->encrypt != _TKIP_)) {
|
||||
DBG_COUNTER(padapter->rx_logs.core_rx_post_decrypt_hw);
|
||||
|
||||
psecuritypriv->hw_decrypted = _TRUE;
|
||||
psecuritypriv->hw_decrypted = true;
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
RTW_INFO("[%s] %d:prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n",
|
||||
__func__,
|
||||
|
@ -659,7 +659,7 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame)
|
|||
rtw_free_recvframe(return_packet, &padapter->recvpriv.free_recv_queue);
|
||||
return_packet = NULL;
|
||||
} else {
|
||||
prxattrib->bdecrypted = _TRUE;
|
||||
prxattrib->bdecrypted = true;
|
||||
}
|
||||
return return_packet;
|
||||
}
|
||||
|
@ -815,7 +815,7 @@ static sint recv_bcast_pn_decache(union recv_frame *precv_frame)
|
|||
u8 key_id;
|
||||
|
||||
if ((pattrib->encrypt == _AES_) &&
|
||||
(check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)) {
|
||||
(check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)) {
|
||||
|
||||
tmp_iv_hdr = le64_to_cpu(*(__le64*)(pdata + pattrib->hdrlen));
|
||||
key_id = CCMPH_2_KEYID(tmp_iv_hdr);
|
||||
|
@ -962,13 +962,13 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame)
|
|||
|
||||
RTW_INFO("[TDLS] Recv %s from "MAC_FMT" with SeqNum = %d\n", rtw_tdls_action_txt(*paction), MAC_ARG(pattrib->src), GetSequence(get_recvframe_data(precv_frame)));
|
||||
|
||||
if (hal_chk_wl_func(adapter, WL_FUNC_TDLS) == _FALSE) {
|
||||
if (hal_chk_wl_func(adapter, WL_FUNC_TDLS) == false) {
|
||||
RTW_INFO("Ignore tdls frame since hal doesn't support tdls\n");
|
||||
ret = _FAIL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (ptdlsinfo->tdls_enable == _FALSE) {
|
||||
if (ptdlsinfo->tdls_enable == false) {
|
||||
RTW_INFO("recv tdls frame, "
|
||||
"but tdls haven't enabled\n");
|
||||
ret = _FAIL;
|
||||
|
@ -1012,14 +1012,14 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame)
|
|||
/* Probe request frame */
|
||||
if (*(paction + 3) == 0x04) {
|
||||
/* WFDTDLS: for sigma test, do not setup direct link automatically */
|
||||
ptdlsinfo->dev_discovered = _TRUE;
|
||||
ptdlsinfo->dev_discovered = true;
|
||||
RTW_INFO("recv tunneled probe request frame\n");
|
||||
issue_tunneled_probe_rsp(adapter, precv_frame);
|
||||
}
|
||||
/* Probe response frame */
|
||||
if (*(paction + 3) == 0x05) {
|
||||
/* WFDTDLS: for sigma test, do not setup direct link automatically */
|
||||
ptdlsinfo->dev_discovered = _TRUE;
|
||||
ptdlsinfo->dev_discovered = true;
|
||||
RTW_INFO("recv tunneled probe response frame\n");
|
||||
}
|
||||
}
|
||||
|
@ -1085,7 +1085,7 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in
|
|||
}
|
||||
|
||||
#ifdef CONFIG_CHECK_LEAVE_LPS
|
||||
traffic_check_for_leave_lps(padapter, _FALSE, 0);
|
||||
traffic_check_for_leave_lps(padapter, false, 0);
|
||||
#endif /* CONFIG_LPS */
|
||||
|
||||
}
|
||||
|
@ -1125,8 +1125,8 @@ sint sta2sta_data_frame(
|
|||
|
||||
/* RTW_INFO("[%s] %d, seqnum:%d\n", __func__, __LINE__, pattrib->seq_num); */
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
|
||||
/* filter packets that SA is myself or multicast or broadcast */
|
||||
if (_rtw_memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
|
||||
|
@ -1148,11 +1148,11 @@ sint sta2sta_data_frame(
|
|||
|
||||
sta_addr = pattrib->src;
|
||||
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
|
||||
#ifdef CONFIG_TDLS
|
||||
|
||||
/* direct link data transfer */
|
||||
if (ptdlsinfo->link_established == _TRUE) {
|
||||
if (ptdlsinfo->link_established == true) {
|
||||
ptdls_sta = rtw_get_stainfo(pstapriv, pattrib->src);
|
||||
if (ptdls_sta == NULL) {
|
||||
ret = _FAIL;
|
||||
|
@ -1177,7 +1177,7 @@ sint sta2sta_data_frame(
|
|||
}
|
||||
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
if (ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE) {
|
||||
if (ATOMIC_READ(&pchsw_info->chsw_on) == true) {
|
||||
if (adapter->mlmeextpriv.cur_channel != rtw_get_oper_ch(adapter)) {
|
||||
pchsw_info->ch_sw_state |= TDLS_PEER_AT_OFF_STATE;
|
||||
if (!(pchsw_info->ch_sw_state & TDLS_CH_SW_INITIATOR_STATE))
|
||||
|
@ -1234,7 +1234,7 @@ sint sta2sta_data_frame(
|
|||
sta_addr = pattrib->bssid;
|
||||
}
|
||||
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||
if (bmcast) {
|
||||
/* For AP mode, if DA == MCAST, then BSSID should be also MCAST */
|
||||
if (!IS_MCAST(pattrib->bssid)) {
|
||||
|
@ -1251,7 +1251,7 @@ sint sta2sta_data_frame(
|
|||
sta_addr = pattrib->src;
|
||||
}
|
||||
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) {
|
||||
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
|
||||
|
@ -1277,7 +1277,7 @@ sint sta2sta_data_frame(
|
|||
if (*psta == NULL) {
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (adapter->registrypriv.mp_mode == 1) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
adapter->mppriv.rx_pktloss++;
|
||||
}
|
||||
#endif
|
||||
|
@ -1309,9 +1309,9 @@ sint ap2sta_data_frame(
|
|||
sint bmcast = IS_MCAST(pattrib->dst);
|
||||
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE
|
||||
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE)
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == true
|
||||
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
|
||||
) {
|
||||
|
||||
/* filter packets that SA is myself or multicast or broadcast */
|
||||
|
@ -1376,8 +1376,8 @@ sint ap2sta_data_frame(
|
|||
goto exit;
|
||||
}
|
||||
|
||||
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) {
|
||||
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
|
||||
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
|
||||
|
@ -1395,7 +1395,7 @@ sint ap2sta_data_frame(
|
|||
}
|
||||
|
||||
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||
/* Special case */
|
||||
ret = RTW_RX_HANDLED;
|
||||
goto exit;
|
||||
|
@ -1449,7 +1449,7 @@ sint sta2ap_data_frame(
|
|||
sint ret = _SUCCESS;
|
||||
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||
/* For AP mode, RA=BSSID, TX=STA(SRC_ADDR), A3=DST_ADDR */
|
||||
if (!_rtw_memcmp(pattrib->bssid, mybssid, ETH_ALEN)) {
|
||||
ret = _FAIL;
|
||||
|
@ -1488,8 +1488,8 @@ bypass_deauth7:
|
|||
ret = RTW_RX_HANDLED;
|
||||
goto exit;
|
||||
}
|
||||
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) {
|
||||
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
|
||||
/* RTW_INFO("%s ,in WIFI_MP_STATE\n",__func__); */
|
||||
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
|
||||
|
@ -1602,7 +1602,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
@ -1629,7 +1629,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, true);
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
|
@ -1655,7 +1655,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1689,7 +1689,7 @@ static sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_
|
|||
else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_PROBEREQ)
|
||||
psta->sta_stats.rx_probereq_pkts++;
|
||||
else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) {
|
||||
if (_rtw_memcmp(adapter_mac_addr(padapter), GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(adapter_mac_addr(padapter), GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == true)
|
||||
psta->sta_stats.rx_probersp_pkts++;
|
||||
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data))
|
||||
|| is_multicast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)))
|
||||
|
@ -1701,7 +1701,7 @@ static sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_
|
|||
}
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
if (padapter->proximity.proxim_on == _TRUE) {
|
||||
if (padapter->proximity.proxim_on == true) {
|
||||
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
|
||||
struct recv_stat *prxstat = (struct recv_stat *) precv_frame->u.hdr.rx_head ;
|
||||
u8 *pda, *psa, *pbssid, *ptr;
|
||||
|
@ -1847,9 +1847,9 @@ sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame)
|
|||
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26;
|
||||
|
||||
if (pattrib->priority != 0 && pattrib->priority != 3)
|
||||
adapter->recvpriv.is_any_non_be_pkts = _TRUE;
|
||||
adapter->recvpriv.is_any_non_be_pkts = true;
|
||||
else
|
||||
adapter->recvpriv.is_any_non_be_pkts = _FALSE;
|
||||
adapter->recvpriv.is_any_non_be_pkts = false;
|
||||
} else {
|
||||
pattrib->priority = 0;
|
||||
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 30 : 24;
|
||||
|
@ -1926,7 +1926,7 @@ static sint validate_80211w_mgmt(_adapter *adapter, union recv_frame *precv_fram
|
|||
type = GetFrameType(ptr);
|
||||
subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */
|
||||
|
||||
if (adapter->securitypriv.binstallBIPkey == _TRUE) {
|
||||
if (adapter->securitypriv.binstallBIPkey == true) {
|
||||
/* unicast management frame decrypt */
|
||||
if (pattrib->privacy && !(IS_MCAST(GetAddr1Ptr(ptr))) &&
|
||||
(subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || subtype == WIFI_ACTION)) {
|
||||
|
@ -1978,7 +1978,7 @@ static sint validate_80211w_mgmt(_adapter *adapter, union recv_frame *precv_fram
|
|||
else {
|
||||
psta = rtw_get_stainfo(pstapriv, get_addr2_ptr(ptr));
|
||||
|
||||
if (subtype == WIFI_ACTION && psta && psta->bpairwise_key_installed == _TRUE) {
|
||||
if (subtype == WIFI_ACTION && psta && psta->bpairwise_key_installed == true) {
|
||||
/* according 802.11-2012 standard, these five types are not robust types */
|
||||
if (ptr[WLAN_HDR_A3_LEN] != RTW_WLAN_CATEGORY_PUBLIC &&
|
||||
ptr[WLAN_HDR_A3_LEN] != RTW_WLAN_CATEGORY_HT &&
|
||||
|
@ -2234,15 +2234,15 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
|
|||
/* convert hdr + possible LLC headers into Ethernet header */
|
||||
/* eth_type = (psnap_type[0] << 8) | psnap_type[1]; */
|
||||
if ((_rtw_memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == _FALSE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) == _FALSE)) ||
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == false) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) == false)) ||
|
||||
/* eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || */
|
||||
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)) {
|
||||
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
|
||||
bsnaphdr = _TRUE;
|
||||
bsnaphdr = true;
|
||||
} else {
|
||||
/* Leave Ethernet header part of hdr and full payload */
|
||||
bsnaphdr = _FALSE;
|
||||
bsnaphdr = false;
|
||||
}
|
||||
|
||||
rmv_len = pattrib->hdrlen + pattrib->iv_len + (bsnaphdr ? SNAP_SIZE : 0);
|
||||
|
@ -2285,7 +2285,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
|
|||
}
|
||||
#endif /* CONFIG_AUTO_AP_MODE */
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)) {
|
||||
ptr += rmv_len ;
|
||||
*ptr = 0x87;
|
||||
*(ptr + 1) = 0x12;
|
||||
|
@ -2359,7 +2359,7 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
|
|||
|
||||
data = get_recvframe_data(prframe);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
|
||||
pnfhdr = &pnextrframe->u.hdr;
|
||||
|
||||
|
@ -2448,7 +2448,7 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec
|
|||
if (pdefrag_q != NULL) {
|
||||
if (fragnum == 0) {
|
||||
/* the first fragment */
|
||||
if (_rtw_queue_empty(pdefrag_q) == _FALSE) {
|
||||
if (_rtw_queue_empty(pdefrag_q) == false) {
|
||||
/* free current defrag_q */
|
||||
rtw_free_recvframe_queue(pdefrag_q, pfree_recv_queue);
|
||||
}
|
||||
|
@ -2609,7 +2609,7 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, __le16 se
|
|||
RTW_INFO("%s IndicateSeq: %d > NewSeq: %d\n", __func__,
|
||||
preorder_ctrl->indicate_seq, seq_num);
|
||||
#endif
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* */
|
||||
|
@ -2641,7 +2641,7 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, __le16 se
|
|||
|
||||
/* DbgPrint("exit->check_indicate_seq(): IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num); */
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe)
|
||||
|
@ -2661,7 +2661,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
|
|||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pnextattrib = &pnextrframe->u.hdr.attrib;
|
||||
|
||||
|
@ -2672,7 +2672,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
|
|||
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
} else
|
||||
break;
|
||||
|
||||
|
@ -2692,7 +2692,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
|
|||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -2714,7 +2714,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
union recv_frame *prframe;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
/* u8 index = 0; */
|
||||
int bPktInBuf = _FALSE;
|
||||
int bPktInBuf = false;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
_queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||
struct dvobj_priv *psdpriv = padapter->dvobj;
|
||||
|
@ -2731,12 +2731,12 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
plist = get_next(phead);
|
||||
|
||||
/* Handling some condition for forced indicate case. */
|
||||
if (bforced == _TRUE) {
|
||||
if (bforced == true) {
|
||||
pdbgpriv->dbg_rx_ampdu_forced_indicate_count++;
|
||||
if (rtw_is_list_empty(phead)) {
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
@ -2784,10 +2784,10 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
|
||||
|
||||
/* Update local variables. */
|
||||
bPktInBuf = _FALSE;
|
||||
bPktInBuf = false;
|
||||
|
||||
} else {
|
||||
bPktInBuf = _TRUE;
|
||||
bPktInBuf = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2838,7 +2838,7 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram
|
|||
|
||||
}
|
||||
|
||||
if (preorder_ctrl->enable == _FALSE) {
|
||||
if (preorder_ctrl->enable == false) {
|
||||
/* indicate this recv_frame */
|
||||
preorder_ctrl->indicate_seq = le16_to_cpu(pattrib->seq_num);
|
||||
#ifdef DBG_RX_SEQ
|
||||
|
@ -2864,7 +2864,7 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram
|
|||
#endif
|
||||
|
||||
} else if (pattrib->amsdu == 1) { /* temp filter->means didn't support A-MSDUs in a A-MPDU */
|
||||
if (preorder_ctrl->enable == _FALSE) {
|
||||
if (preorder_ctrl->enable == false) {
|
||||
preorder_ctrl->indicate_seq = le16_to_cpu(pattrib->seq_num);
|
||||
#ifdef DBG_RX_SEQ
|
||||
RTW_INFO("DBG_RX_SEQ %s:%d IndicateSeq: %d, NewSeq: %d\n", __func__, __LINE__,
|
||||
|
@ -2924,15 +2924,15 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram
|
|||
/* 2. All packets with SeqNum larger than or equal to WinStart => Buffer it. */
|
||||
/* */
|
||||
|
||||
/* recv_indicatepkts_in_order(padapter, preorder_ctrl, _TRUE); */
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, _FALSE) == _TRUE) {
|
||||
/* recv_indicatepkts_in_order(padapter, preorder_ctrl, true); */
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, false) == true) {
|
||||
if (!preorder_ctrl->bReorderWaiting) {
|
||||
preorder_ctrl->bReorderWaiting = _TRUE;
|
||||
preorder_ctrl->bReorderWaiting = true;
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
}
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
} else {
|
||||
preorder_ctrl->bReorderWaiting = _FALSE;
|
||||
preorder_ctrl->bReorderWaiting = false;
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
}
|
||||
|
@ -2966,9 +2966,9 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
|||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
if (preorder_ctrl)
|
||||
preorder_ctrl->bReorderWaiting = _FALSE;
|
||||
preorder_ctrl->bReorderWaiting = false;
|
||||
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, _TRUE) == _TRUE)
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true) == true)
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
@ -2990,12 +2990,12 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
DBG_COUNTER(padapter->rx_logs.core_rx_post_indicate);
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
if ((phtpriv->ht_option == _TRUE) ||
|
||||
if ((phtpriv->ht_option == true) ||
|
||||
((psta->tdls_sta_state & TDLS_LINKED_STATE) &&
|
||||
(psta->htpriv.ht_option == _TRUE) &&
|
||||
(psta->htpriv.ampdu_enable == _TRUE))) /* B/G/N Mode */
|
||||
(psta->htpriv.ht_option == true) &&
|
||||
(psta->htpriv.ampdu_enable == true))) /* B/G/N Mode */
|
||||
#else
|
||||
if (phtpriv->ht_option == _TRUE) /* B/G/N Mode */
|
||||
if (phtpriv->ht_option == true) /* B/G/N Mode */
|
||||
#endif /* CONFIG_TDLS */
|
||||
{
|
||||
/* prframe->u.hdr.preorder_ctrl = &precvpriv->recvreorder_ctrl[pattrib->priority]; */
|
||||
|
@ -3048,12 +3048,12 @@ static int validate_mp_recv_frame(_adapter *adapter, union recv_frame *precv_fra
|
|||
pmptx = &pmppriv->tx;
|
||||
|
||||
if (pmppriv->bloopback) {
|
||||
if (_rtw_memcmp(ptr + 24, pmptx->buf + 24, precv_frame->u.hdr.len - 24) == _FALSE) {
|
||||
if (_rtw_memcmp(ptr + 24, pmptx->buf + 24, precv_frame->u.hdr.len - 24) == false) {
|
||||
RTW_INFO("Compare payload content Fail !!!\n");
|
||||
ret = _FAIL;
|
||||
}
|
||||
}
|
||||
if (pmppriv->bSetRxBssid == _TRUE) {
|
||||
if (pmppriv->bSetRxBssid == true) {
|
||||
|
||||
sa = get_addr2_ptr(ptr);
|
||||
da = GetAddr1Ptr(ptr);
|
||||
|
@ -3061,7 +3061,7 @@ static int validate_mp_recv_frame(_adapter *adapter, union recv_frame *precv_fra
|
|||
type = GetFrameType(ptr);
|
||||
subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */
|
||||
|
||||
if (_rtw_memcmp(bs, adapter->mppriv.network_macaddr, ETH_ALEN) == _FALSE)
|
||||
if (_rtw_memcmp(bs, adapter->mppriv.network_macaddr, ETH_ALEN) == false)
|
||||
ret = _FAIL;
|
||||
|
||||
RTW_DBG("############ type:0x%02x subtype:0x%02x #################\n", type, subtype);
|
||||
|
@ -3073,7 +3073,7 @@ static int validate_mp_recv_frame(_adapter *adapter, union recv_frame *precv_fra
|
|||
if (!adapter->mppriv.bmac_filter)
|
||||
return ret;
|
||||
|
||||
if (_rtw_memcmp(get_addr2_ptr(ptr), adapter->mppriv.mac_filter, ETH_ALEN) == _FALSE)
|
||||
if (_rtw_memcmp(get_addr2_ptr(ptr), adapter->mppriv.mac_filter, ETH_ALEN) == false)
|
||||
ret = _FAIL;
|
||||
|
||||
return ret;
|
||||
|
@ -3106,15 +3106,15 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe)
|
|||
/* convert hdr + possible LLC headers into Ethernet header */
|
||||
/* eth_type = (psnap_type[0] << 8) | psnap_type[1]; */
|
||||
if ((_rtw_memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == _FALSE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) == _FALSE)) ||
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == false) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) == false)) ||
|
||||
/* eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || */
|
||||
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)) {
|
||||
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
|
||||
bsnaphdr = _TRUE;
|
||||
bsnaphdr = true;
|
||||
} else {
|
||||
/* Leave Ethernet header part of hdr and full payload */
|
||||
bsnaphdr = _FALSE;
|
||||
bsnaphdr = false;
|
||||
}
|
||||
|
||||
rmv_len = pattrib->hdrlen + pattrib->iv_len + (bsnaphdr ? SNAP_SIZE : 0);
|
||||
|
@ -3138,11 +3138,11 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe)
|
|||
be_tmp = htons(le16_to_cpu(pattrib->seq_num));
|
||||
/* RTW_INFO("wlan seq = %d ,seq_num =%x\n",len,pattrib->seq_num); */
|
||||
_rtw_memcpy(ptr + 12, &be_tmp, 2);
|
||||
if (adapter->mppriv.bRTWSmbCfg == _TRUE) {
|
||||
/* if(_rtw_memcmp(mcastheadermac, pattrib->dst, 3) == _TRUE) */ /* SimpleConfig Dest. */
|
||||
if (adapter->mppriv.bRTWSmbCfg == true) {
|
||||
/* if(_rtw_memcmp(mcastheadermac, pattrib->dst, 3) == true) */ /* SimpleConfig Dest. */
|
||||
/* _rtw_memcpy(ptr+ETH_ALEN, pattrib->bssid, ETH_ALEN); */
|
||||
|
||||
if (_rtw_memcmp(mcastheadermac, pattrib->bssid, 3) == _TRUE) /* SimpleConfig Dest. */
|
||||
if (_rtw_memcmp(mcastheadermac, pattrib->bssid, 3) == true) /* SimpleConfig Dest. */
|
||||
_rtw_memcpy(ptr, pattrib->bssid, ETH_ALEN);
|
||||
|
||||
}
|
||||
|
@ -3169,7 +3169,7 @@ static int mp_recv_frame(_adapter *padapter, union recv_frame *rframe)
|
|||
struct sta_info *psta = NULL;
|
||||
DBG_COUNTER(padapter->rx_logs.core_rx_pre);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { /* &&(padapter->mppriv.check_mp_pkt == 0)) */
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == true)) { /* &&(padapter->mppriv.check_mp_pkt == 0)) */
|
||||
if (pattrib->crc_err == 1)
|
||||
padapter->mppriv.rx_crcerrpktcount++;
|
||||
else {
|
||||
|
@ -3179,7 +3179,7 @@ static int mp_recv_frame(_adapter *padapter, union recv_frame *rframe)
|
|||
padapter->mppriv.rx_pktcount_filter_out++;
|
||||
}
|
||||
|
||||
if (pmppriv->rx_bindicatePkt == _FALSE) {
|
||||
if (pmppriv->rx_bindicatePkt == false) {
|
||||
ret = _FAIL;
|
||||
rtw_free_recvframe(rframe, pfree_recv_queue);/* free this recv_frame */
|
||||
goto exit;
|
||||
|
@ -3605,7 +3605,7 @@ static int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1 || padapter->mppriv.bRTWSmbCfg == _TRUE) {
|
||||
if (padapter->registrypriv.mp_mode == 1 || padapter->mppriv.bRTWSmbCfg == true) {
|
||||
mp_recv_frame(padapter, rframe);
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
|
@ -3758,7 +3758,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
|
|||
/* check if need to enqueue into uc_swdec_pending_queue*/
|
||||
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
|
||||
!IS_MCAST(prxattrib->ra) && prxattrib->encrypt > 0 &&
|
||||
(prxattrib->bdecrypted == 0 || psecuritypriv->sw_decrypt == _TRUE) &&
|
||||
(prxattrib->bdecrypted == 0 || psecuritypriv->sw_decrypt == true) &&
|
||||
psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPAPSK &&
|
||||
!psecuritypriv->busetkipkey) {
|
||||
DBG_COUNTER(padapter->rx_logs.core_rx_enqueue);
|
||||
|
@ -3867,13 +3867,13 @@ void rtw_signal_stat_timer_hdl(struct timer_list *t)
|
|||
goto set_timer;
|
||||
}
|
||||
|
||||
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == _TRUE
|
||||
|| check_fwstate(&adapter->mlmepriv, _FW_LINKED) == _FALSE
|
||||
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == true
|
||||
|| check_fwstate(&adapter->mlmepriv, _FW_LINKED) == false
|
||||
)
|
||||
goto set_timer;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_mi_buddy_check_fwstate(adapter, _FW_UNDER_SURVEY) == _TRUE)
|
||||
if (rtw_mi_buddy_check_fwstate(adapter, _FW_UNDER_SURVEY) == true)
|
||||
goto set_timer;
|
||||
#endif
|
||||
|
||||
|
@ -4062,9 +4062,9 @@ void rx_query_phy_status(
|
|||
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
|
||||
/* unsigned long irqL; */
|
||||
|
||||
pkt_info.is_packet_match_bssid = _FALSE;
|
||||
pkt_info.is_packet_to_self = _FALSE;
|
||||
pkt_info.is_packet_beacon = _FALSE;
|
||||
pkt_info.is_packet_match_bssid = false;
|
||||
pkt_info.is_packet_to_self = false;
|
||||
pkt_info.is_packet_beacon = false;
|
||||
|
||||
wlanhdr = get_recvframe_data(precvframe);
|
||||
|
||||
|
@ -4085,7 +4085,7 @@ void rx_query_phy_status(
|
|||
|
||||
pkt_info.station_id = 0xFF;
|
||||
|
||||
if (_rtw_memcmp(adapter_mac_addr(padapter), sa, ETH_ALEN) == _TRUE) {
|
||||
if (_rtw_memcmp(adapter_mac_addr(padapter), sa, ETH_ALEN) == true) {
|
||||
static u32 start_time = 0;
|
||||
|
||||
if ((start_time == 0) || (rtw_get_passing_time_ms(start_time) > 5000)) {
|
||||
|
@ -4111,7 +4111,7 @@ void rx_query_phy_status(
|
|||
{
|
||||
precvframe->u.hdr.psta = NULL;
|
||||
if (pkt_info.is_packet_match_bssid
|
||||
&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)
|
||||
) {
|
||||
if (psta) {
|
||||
precvframe->u.hdr.psta = psta;
|
||||
|
@ -4129,17 +4129,17 @@ void rx_query_phy_status(
|
|||
}
|
||||
/*
|
||||
* Increase and check if the continual_no_rx_packet of this @param pmlmepriv is larger than MAX_CONTINUAL_NORXPACKET_COUNT
|
||||
* @return _TRUE:
|
||||
* @return _FALSE:
|
||||
* @return true:
|
||||
* @return false:
|
||||
*/
|
||||
int rtw_inc_and_chk_continual_no_rx_packet(struct sta_info *sta, int tid_index)
|
||||
{
|
||||
|
||||
int ret = _FALSE;
|
||||
int ret = false;
|
||||
int value = ATOMIC_INC_RETURN(&sta->continual_no_rx_packet[tid_index]);
|
||||
|
||||
if (value >= MAX_CONTINUAL_NORXPACKET_COUNT)
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -4164,7 +4164,7 @@ s32 pre_recv_entry(union recv_frame *precvframe, u8 *pphy_status)
|
|||
|
||||
pda = get_ra(pbuf);
|
||||
|
||||
if (IS_MCAST(pda) == _FALSE) { /*unicast packets*/
|
||||
if (IS_MCAST(pda) == false) { /*unicast packets*/
|
||||
iface = rtw_get_iface_by_macddr(primary_padapter , pda);
|
||||
if (NULL == iface) {
|
||||
RTW_INFO("%s [WARN] Cannot find appropriate adapter - mac_addr : "MAC_FMT"\n", __func__, MAC_ARG(pda));
|
||||
|
|
|
@ -476,7 +476,7 @@ bool rtw_chbw_to_freq_range(u8 ch, u8 bw, u8 offset, u32 *hi, u32 *lo)
|
|||
u32 freq;
|
||||
u32 hi_ret = 0, lo_ret = 0;
|
||||
int i;
|
||||
bool valid = _FALSE;
|
||||
bool valid = false;
|
||||
|
||||
if (hi)
|
||||
*hi = 0;
|
||||
|
@ -508,7 +508,7 @@ bool rtw_chbw_to_freq_range(u8 ch, u8 bw, u8 offset, u32 *hi, u32 *lo)
|
|||
if (lo)
|
||||
*lo = lo_ret;
|
||||
|
||||
valid = _TRUE;
|
||||
valid = true;
|
||||
|
||||
exit:
|
||||
return valid;
|
||||
|
@ -1064,30 +1064,30 @@ void rtw_rf_apply_tx_gain_offset(_adapter *adapter, u8 ch)
|
|||
|
||||
bool rtw_is_dfs_range(u32 hi, u32 lo)
|
||||
{
|
||||
return rtw_is_range_overlap(hi, lo, 5720 + 10, 5260 - 10) ? _TRUE : _FALSE;
|
||||
return rtw_is_range_overlap(hi, lo, 5720 + 10, 5260 - 10) ? true : false;
|
||||
}
|
||||
|
||||
bool rtw_is_dfs_ch(u8 ch, u8 bw, u8 offset)
|
||||
{
|
||||
u32 hi, lo;
|
||||
|
||||
if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE)
|
||||
return _FALSE;
|
||||
if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false)
|
||||
return false;
|
||||
|
||||
return rtw_is_dfs_range(hi, lo) ? _TRUE : _FALSE;
|
||||
return rtw_is_dfs_range(hi, lo) ? true : false;
|
||||
}
|
||||
|
||||
bool rtw_is_long_cac_range(u32 hi, u32 lo, u8 dfs_region)
|
||||
{
|
||||
return (dfs_region == PHYDM_DFS_DOMAIN_ETSI && rtw_is_range_overlap(hi, lo, 5660 + 10, 5600 - 10)) ? _TRUE : _FALSE;
|
||||
return (dfs_region == PHYDM_DFS_DOMAIN_ETSI && rtw_is_range_overlap(hi, lo, 5660 + 10, 5600 - 10)) ? true : false;
|
||||
}
|
||||
|
||||
bool rtw_is_long_cac_ch(u8 ch, u8 bw, u8 offset, u8 dfs_region)
|
||||
{
|
||||
u32 hi, lo;
|
||||
|
||||
if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE)
|
||||
return _FALSE;
|
||||
if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false)
|
||||
return false;
|
||||
|
||||
return rtw_is_long_cac_range(hi, lo, dfs_region) ? _TRUE : _FALSE;
|
||||
return rtw_is_long_cac_range(hi, lo, dfs_region) ? true : false;
|
||||
}
|
||||
|
|
|
@ -826,7 +826,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
|
|||
static u32 no_gkey_bc_cnt = 0;
|
||||
static u32 no_gkey_mc_cnt = 0;
|
||||
|
||||
if (psecuritypriv->binstallGrpkey == _FALSE) {
|
||||
if (psecuritypriv->binstallGrpkey == false) {
|
||||
res = _FAIL;
|
||||
|
||||
if (start == 0)
|
||||
|
@ -1953,7 +1953,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe)
|
|||
|
||||
/* RTW_INFO("rx bc/mc packets, to perform sw rtw_aes_decrypt\n"); */
|
||||
/* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */
|
||||
if (psecuritypriv->binstallGrpkey == _FALSE) {
|
||||
if (psecuritypriv->binstallGrpkey == false) {
|
||||
res = _FAIL;
|
||||
|
||||
if (start == 0)
|
||||
|
@ -3030,7 +3030,7 @@ void rtw_use_tkipkey_handler(RTW_TIMER_HDL_ARGS)
|
|||
}
|
||||
*/
|
||||
|
||||
padapter->securitypriv.busetkipkey = _TRUE;
|
||||
padapter->securitypriv.busetkipkey = true;
|
||||
|
||||
|
||||
|
||||
|
@ -3046,9 +3046,9 @@ void rtw_sec_restore_wep_key(_adapter *adapter)
|
|||
for (keyid = 0; keyid < 4; keyid++) {
|
||||
if (securitypriv->key_mask & BIT(keyid)) {
|
||||
if (keyid == securitypriv->dot11PrivacyKeyIndex)
|
||||
rtw_set_key(adapter, securitypriv, keyid, 1, _FALSE);
|
||||
rtw_set_key(adapter, securitypriv, keyid, 1, false);
|
||||
else
|
||||
rtw_set_key(adapter, securitypriv, keyid, 0, _FALSE);
|
||||
rtw_set_key(adapter, securitypriv, keyid, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3059,12 +3059,12 @@ u8 rtw_handle_tkip_countermeasure(_adapter *adapter, const char *caller)
|
|||
struct security_priv *securitypriv = &(adapter->securitypriv);
|
||||
u8 status = _SUCCESS;
|
||||
|
||||
if (securitypriv->btkip_countermeasure == _TRUE) {
|
||||
if (securitypriv->btkip_countermeasure == true) {
|
||||
u32 passing_ms = rtw_get_passing_time_ms(securitypriv->btkip_countermeasure_time);
|
||||
if (passing_ms > 60 * 1000) {
|
||||
RTW_PRINT("%s("ADPT_FMT") countermeasure time:%ds > 60s\n",
|
||||
caller, ADPT_ARG(adapter), passing_ms / 1000);
|
||||
securitypriv->btkip_countermeasure = _FALSE;
|
||||
securitypriv->btkip_countermeasure = false;
|
||||
securitypriv->btkip_countermeasure_time = 0;
|
||||
} else {
|
||||
RTW_PRINT("%s("ADPT_FMT") countermeasure time:%ds < 60s\n",
|
||||
|
|
|
@ -29,7 +29,7 @@ void sreset_init_value(_adapter *padapter)
|
|||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
_rtw_mutex_init(&psrtpriv->silentreset_mutex);
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
psrtpriv->silent_reset_inprogress = false;
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
psrtpriv->last_tx_time = 0;
|
||||
psrtpriv->last_tx_complete_time = 0;
|
||||
|
@ -56,7 +56,7 @@ u8 sreset_get_wifi_status(_adapter *padapter)
|
|||
u8 status = WIFI_STATUS_SUCCESS;
|
||||
u32 val32 = 0;
|
||||
unsigned long irqL;
|
||||
if (psrtpriv->silent_reset_inprogress == _TRUE)
|
||||
if (psrtpriv->silent_reset_inprogress == true)
|
||||
return status;
|
||||
val32 = rtw_read32(padapter, REG_TXDMA_STATUS);
|
||||
if (val32 == 0xeaeaeaea)
|
||||
|
@ -103,7 +103,7 @@ bool sreset_inprogress(_adapter *padapter)
|
|||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
return pHalData->srestpriv.silent_reset_inprogress;
|
||||
#else
|
||||
return _FALSE;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -137,9 +137,9 @@ static void sreset_restore_security_station(_adapter *padapter)
|
|||
/* DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n")); */
|
||||
} else {
|
||||
/* pairwise key */
|
||||
rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _FALSE);
|
||||
rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, false);
|
||||
/* group key */
|
||||
rtw_set_key(padapter, &padapter->securitypriv, padapter->securitypriv.dot118021XGrpKeyid, 0, _FALSE);
|
||||
rtw_set_key(padapter, &padapter->securitypriv, padapter->securitypriv.dot118021XGrpKeyid, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -149,9 +149,9 @@ static void sreset_restore_network_station(_adapter *padapter)
|
|||
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
u8 doiqk = _FALSE;
|
||||
u8 doiqk = false;
|
||||
|
||||
rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure, _FALSE);
|
||||
rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure, false);
|
||||
|
||||
{
|
||||
u8 threshold;
|
||||
|
@ -169,12 +169,12 @@ static void sreset_restore_network_station(_adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
doiqk = _TRUE;
|
||||
doiqk = true;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_DO_IQK , &doiqk);
|
||||
|
||||
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||
|
||||
doiqk = _FALSE;
|
||||
doiqk = false;
|
||||
rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk);
|
||||
/* disable dynamic functions, such as high power, DIG */
|
||||
/*rtw_phydm_func_disable_all(padapter);*/
|
||||
|
@ -287,17 +287,17 @@ void sreset_reset(_adapter *padapter)
|
|||
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
|
||||
psrtpriv->silent_reset_inprogress = _TRUE;
|
||||
psrtpriv->silent_reset_inprogress = true;
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
|
||||
rtw_mi_sreset_adapter_hdl(padapter, _FALSE);/*sreset_stop_adapter*/
|
||||
rtw_mi_sreset_adapter_hdl(padapter, false);/*sreset_stop_adapter*/
|
||||
#ifdef CONFIG_IPS
|
||||
_ips_enter(padapter);
|
||||
_ips_leave(padapter);
|
||||
#endif
|
||||
rtw_mi_sreset_adapter_hdl(padapter, _TRUE);/*sreset_start_adapter*/
|
||||
rtw_mi_sreset_adapter_hdl(padapter, true);/*sreset_start_adapter*/
|
||||
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
psrtpriv->silent_reset_inprogress = false;
|
||||
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ static bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_por
|
|||
{
|
||||
if (ntohs(*((__be16 *)local_port)) == 5001 ||
|
||||
ntohs(*((__be16 *)remote_port)) == 5001)
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static struct st_register test_st_reg = {
|
||||
|
@ -49,7 +49,7 @@ inline void rtw_st_ctl_clear_tracker_q(struct st_ctl_t *st_ctl)
|
|||
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
phead = &st_ctl->tracker_q.queue;
|
||||
plist = get_next(phead);
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = get_next(plist);
|
||||
rtw_list_delete(&st->list);
|
||||
|
@ -97,12 +97,12 @@ inline void rtw_st_ctl_unregister(struct st_ctl_t *st_ctl, u8 st_reg_id)
|
|||
|
||||
inline bool rtw_st_ctl_chk_reg_s_proto(struct st_ctl_t *st_ctl, u8 s_proto)
|
||||
{
|
||||
bool ret = _FALSE;
|
||||
bool ret = false;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) {
|
||||
if (st_ctl->reg[i].s_proto == s_proto) {
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -112,14 +112,14 @@ inline bool rtw_st_ctl_chk_reg_s_proto(struct st_ctl_t *st_ctl, u8 s_proto)
|
|||
|
||||
inline bool rtw_st_ctl_chk_reg_rule(struct st_ctl_t *st_ctl, _adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||
{
|
||||
bool ret = _FALSE;
|
||||
bool ret = false;
|
||||
int i;
|
||||
st_match_rule rule;
|
||||
|
||||
for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) {
|
||||
rule = st_ctl->reg[i].rule;
|
||||
if (rule && rule(adapter, local_naddr, local_port, remote_naddr, remote_port) == _TRUE) {
|
||||
ret = _TRUE;
|
||||
if (rule && rule(adapter, local_naddr, local_port, remote_naddr, remote_port) == true) {
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ void dump_st_ctl(void *sel, struct st_ctl_t *st_ctl)
|
|||
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
phead = &st_ctl->tracker_q.queue;
|
||||
plist = get_next(phead);
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = get_next(plist);
|
||||
|
||||
|
@ -188,10 +188,10 @@ void _rtw_init_stainfo(struct sta_info *psta)
|
|||
|
||||
psta->capability = 0;
|
||||
|
||||
psta->bpairwise_key_installed = _FALSE;
|
||||
psta->bpairwise_key_installed = false;
|
||||
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
psta->ft_pairwise_key_installed = _FALSE;
|
||||
psta->ft_pairwise_key_installed = false;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
|
@ -362,7 +362,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
|
|||
phead = get_list_head(&pstapriv->free_sta_queue);
|
||||
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 , list);
|
||||
plist = get_next(plist);
|
||||
|
||||
|
@ -408,7 +408,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
|||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
int i;
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
|
||||
plist = get_next(plist);
|
||||
|
@ -458,7 +458,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE) {
|
||||
if (_rtw_queue_empty(pfree_sta_queue) == true) {
|
||||
psta = NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
preorder_ctrl->padapter = pstapriv->padapter;
|
||||
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->enable = false;
|
||||
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
|
@ -543,7 +543,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
#endif
|
||||
/* init for the sequence number of received management frame */
|
||||
psta->RxMgmtFrameSeqNum = 0xffff;
|
||||
psta->ra_rpt_linked = _FALSE;
|
||||
psta->ra_rpt_linked = false;
|
||||
|
||||
rtw_alloc_macid(pstapriv->padapter, psta);
|
||||
|
||||
|
@ -568,14 +568,14 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct hw_xmit *phwxmit;
|
||||
int pending_qcnt[4];
|
||||
u8 is_pre_link_sta = _FALSE;
|
||||
u8 is_pre_link_sta = false;
|
||||
|
||||
if (psta == NULL)
|
||||
goto exit;
|
||||
|
||||
is_pre_link_sta = rtw_is_pre_link_sta(pstapriv, psta->hwaddr);
|
||||
|
||||
if (is_pre_link_sta == _FALSE) {
|
||||
if (is_pre_link_sta == false) {
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL0);
|
||||
rtw_list_delete(&psta->hash_list);
|
||||
pstapriv->asoc_sta_count--;
|
||||
|
@ -697,12 +697,12 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
|
||||
}
|
||||
|
||||
if (!((psta->state & WIFI_AP_STATE) || MacAddr_isBcst(psta->hwaddr)) && is_pre_link_sta == _FALSE)
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, _FALSE);
|
||||
if (!((psta->state & WIFI_AP_STATE) || MacAddr_isBcst(psta->hwaddr)) && is_pre_link_sta == false)
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, false);
|
||||
|
||||
|
||||
/* release mac id for non-bc/mc station, */
|
||||
if (is_pre_link_sta == _FALSE)
|
||||
if (is_pre_link_sta == false)
|
||||
rtw_release_macid(pstapriv->padapter, psta);
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
@ -756,7 +756,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
|
||||
rtw_st_ctl_deinit(&psta->st_ctl);
|
||||
|
||||
if (is_pre_link_sta == _FALSE) {
|
||||
if (is_pre_link_sta == false) {
|
||||
_rtw_spinlock_free(&psta->lock);
|
||||
|
||||
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
|
||||
|
@ -793,13 +793,13 @@ void rtw_free_all_stainfo(_adapter *padapter)
|
|||
phead = &(pstapriv->sta_hash[index]);
|
||||
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 (pbcmc_stainfo != psta) {
|
||||
if (rtw_is_pre_link_sta(pstapriv, psta->hwaddr) == _FALSE)
|
||||
if (rtw_is_pre_link_sta(pstapriv, psta->hwaddr) == false)
|
||||
rtw_list_delete(&psta->hash_list);
|
||||
|
||||
stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
|
||||
|
@ -855,11 +855,11 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
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);
|
||||
|
||||
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN)) == _TRUE) {
|
||||
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN)) == true) {
|
||||
/* if found the matched address */
|
||||
break;
|
||||
}
|
||||
|
@ -930,11 +930,11 @@ const char *const _acl_mode_str[] = {
|
|||
|
||||
u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr)
|
||||
{
|
||||
u8 res = _TRUE;
|
||||
u8 res = true;
|
||||
unsigned long irqL;
|
||||
_list *list, *head;
|
||||
struct rtw_wlan_acl_node *acl_node;
|
||||
u8 match = _FALSE;
|
||||
u8 match = false;
|
||||
struct sta_priv *stapriv = &adapter->stapriv;
|
||||
struct wlan_acl_pool *acl = &stapriv->acl_list;
|
||||
_queue *acl_node_q = &acl->acl_node_q;
|
||||
|
@ -942,13 +942,13 @@ u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr)
|
|||
_enter_critical_bh(&(acl_node_q->lock), &irqL);
|
||||
head = get_list_head(acl_node_q);
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(head, list) == false) {
|
||||
acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list);
|
||||
list = get_next(list);
|
||||
|
||||
if (_rtw_memcmp(acl_node->addr, mac_addr, ETH_ALEN)) {
|
||||
if (acl_node->valid == _TRUE) {
|
||||
match = _TRUE;
|
||||
if (acl_node->valid == true) {
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -956,11 +956,11 @@ u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr)
|
|||
_exit_critical_bh(&(acl_node_q->lock), &irqL);
|
||||
|
||||
if (acl->mode == RTW_ACL_MODE_ACCEPT_UNLESS_LISTED)
|
||||
res = (match == _TRUE) ? _FALSE : _TRUE;
|
||||
res = (match == true) ? false : true;
|
||||
else if (acl->mode == RTW_ACL_MODE_DENY_UNLESS_LISTED)
|
||||
res = (match == _TRUE) ? _TRUE : _FALSE;
|
||||
res = (match == true) ? true : false;
|
||||
else
|
||||
res = _TRUE;
|
||||
res = true;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -974,7 +974,7 @@ void dump_macaddr_acl(void *sel, _adapter *adapter)
|
|||
RTW_PRINT_SEL(sel, "mode:%s(%d)\n", acl_mode_str(acl->mode), acl->mode);
|
||||
RTW_PRINT_SEL(sel, "num:%d/%d\n", acl->num, NUM_ACL);
|
||||
for (i = 0; i < NUM_ACL; i++) {
|
||||
if (acl->aclnode[i].valid == _FALSE)
|
||||
if (acl->aclnode[i].valid == false)
|
||||
continue;
|
||||
RTW_PRINT_SEL(sel, MAC_FMT"\n", MAC_ARG(acl->aclnode[i].addr));
|
||||
}
|
||||
|
@ -986,16 +986,16 @@ bool rtw_is_pre_link_sta(struct sta_priv *stapriv, u8 *addr)
|
|||
#if CONFIG_RTW_PRE_LINK_STA
|
||||
struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl;
|
||||
struct sta_info *sta = NULL;
|
||||
u8 exist = _FALSE;
|
||||
u8 exist = false;
|
||||
int i;
|
||||
unsigned long irqL;
|
||||
|
||||
_enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
|
||||
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
|
||||
if (pre_link_sta_ctl->node[i].valid == _TRUE
|
||||
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, addr, ETH_ALEN) == _TRUE
|
||||
if (pre_link_sta_ctl->node[i].valid == true
|
||||
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, addr, ETH_ALEN) == true
|
||||
) {
|
||||
exist = _TRUE;
|
||||
exist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1003,7 +1003,7 @@ bool rtw_is_pre_link_sta(struct sta_priv *stapriv, u8 *addr)
|
|||
|
||||
return exist;
|
||||
#else
|
||||
return _FALSE;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1013,30 +1013,30 @@ struct sta_info *rtw_pre_link_sta_add(struct sta_priv *stapriv, u8 *hwaddr)
|
|||
struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl;
|
||||
struct pre_link_sta_node_t *node = NULL;
|
||||
struct sta_info *sta = NULL;
|
||||
u8 exist = _FALSE;
|
||||
u8 exist = false;
|
||||
int i;
|
||||
unsigned long irqL;
|
||||
|
||||
if (rtw_check_invalid_mac_address(hwaddr, _FALSE) == _TRUE)
|
||||
if (rtw_check_invalid_mac_address(hwaddr, false) == true)
|
||||
goto exit;
|
||||
|
||||
_enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
|
||||
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
|
||||
if (pre_link_sta_ctl->node[i].valid == _TRUE
|
||||
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == _TRUE
|
||||
if (pre_link_sta_ctl->node[i].valid == true
|
||||
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == true
|
||||
) {
|
||||
node = &pre_link_sta_ctl->node[i];
|
||||
exist = _TRUE;
|
||||
exist = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (node == NULL && pre_link_sta_ctl->node[i].valid == _FALSE)
|
||||
if (node == NULL && pre_link_sta_ctl->node[i].valid == false)
|
||||
node = &pre_link_sta_ctl->node[i];
|
||||
}
|
||||
|
||||
if (exist == _FALSE && node) {
|
||||
if (exist == false && node) {
|
||||
_rtw_memcpy(node->addr, hwaddr, ETH_ALEN);
|
||||
node->valid = _TRUE;
|
||||
node->valid = true;
|
||||
pre_link_sta_ctl->num++;
|
||||
}
|
||||
_exit_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
|
||||
|
@ -1055,7 +1055,7 @@ struct sta_info *rtw_pre_link_sta_add(struct sta_priv *stapriv, u8 *hwaddr)
|
|||
sta->state = WIFI_FW_PRE_LINK;
|
||||
|
||||
odm_hook:
|
||||
rtw_hal_set_odm_var(stapriv->padapter, HAL_ODM_STA_INFO, sta, _TRUE);
|
||||
rtw_hal_set_odm_var(stapriv->padapter, HAL_ODM_STA_INFO, sta, true);
|
||||
|
||||
exit:
|
||||
return sta;
|
||||
|
@ -1066,31 +1066,31 @@ void rtw_pre_link_sta_del(struct sta_priv *stapriv, u8 *hwaddr)
|
|||
struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl;
|
||||
struct pre_link_sta_node_t *node = NULL;
|
||||
struct sta_info *sta = NULL;
|
||||
u8 exist = _FALSE;
|
||||
u8 exist = false;
|
||||
int i;
|
||||
unsigned long irqL;
|
||||
|
||||
if (rtw_check_invalid_mac_address(hwaddr, _FALSE) == _TRUE)
|
||||
if (rtw_check_invalid_mac_address(hwaddr, false) == true)
|
||||
goto exit;
|
||||
|
||||
_enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
|
||||
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
|
||||
if (pre_link_sta_ctl->node[i].valid == _TRUE
|
||||
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == _TRUE
|
||||
if (pre_link_sta_ctl->node[i].valid == true
|
||||
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == true
|
||||
) {
|
||||
node = &pre_link_sta_ctl->node[i];
|
||||
exist = _TRUE;
|
||||
exist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (exist == _TRUE && node) {
|
||||
node->valid = _FALSE;
|
||||
if (exist == true && node) {
|
||||
node->valid = false;
|
||||
pre_link_sta_ctl->num--;
|
||||
}
|
||||
_exit_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
|
||||
|
||||
if (exist == _FALSE)
|
||||
if (exist == false)
|
||||
goto exit;
|
||||
|
||||
sta = rtw_get_stainfo(stapriv, hwaddr);
|
||||
|
@ -1118,10 +1118,10 @@ void rtw_pre_link_sta_ctl_reset(struct sta_priv *stapriv)
|
|||
|
||||
_enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
|
||||
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
|
||||
if (pre_link_sta_ctl->node[i].valid == _FALSE)
|
||||
if (pre_link_sta_ctl->node[i].valid == false)
|
||||
continue;
|
||||
_rtw_memcpy(&(addrs[j][0]), pre_link_sta_ctl->node[i].addr, ETH_ALEN);
|
||||
pre_link_sta_ctl->node[i].valid = _FALSE;
|
||||
pre_link_sta_ctl->node[i].valid = false;
|
||||
pre_link_sta_ctl->num--;
|
||||
j++;
|
||||
}
|
||||
|
@ -1145,7 +1145,7 @@ void rtw_pre_link_sta_ctl_init(struct sta_priv *stapriv)
|
|||
spin_lock_init(&pre_link_sta_ctl->lock);
|
||||
pre_link_sta_ctl->num = 0;
|
||||
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++)
|
||||
pre_link_sta_ctl->node[i].valid = _FALSE;
|
||||
pre_link_sta_ctl->node[i].valid = false;
|
||||
}
|
||||
|
||||
void rtw_pre_link_sta_ctl_deinit(struct sta_priv *stapriv)
|
||||
|
@ -1166,7 +1166,7 @@ void dump_pre_link_sta_ctl(void *sel, struct sta_priv *stapriv)
|
|||
RTW_PRINT_SEL(sel, "num:%d/%d\n", pre_link_sta_ctl->num, RTW_PRE_LINK_STA_NUM);
|
||||
|
||||
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
|
||||
if (pre_link_sta_ctl->node[i].valid == _FALSE)
|
||||
if (pre_link_sta_ctl->node[i].valid == false)
|
||||
continue;
|
||||
RTW_PRINT_SEL(sel, MAC_FMT"\n", MAC_ARG(pre_link_sta_ctl->node[i].addr));
|
||||
}
|
||||
|
|
250
core/rtw_tdls.c
250
core/rtw_tdls.c
|
@ -33,31 +33,31 @@ void rtw_reset_tdls_info(_adapter *padapter)
|
|||
{
|
||||
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
||||
|
||||
ptdlsinfo->ap_prohibited = _FALSE;
|
||||
ptdlsinfo->ap_prohibited = false;
|
||||
|
||||
/* For TDLS channel switch, currently we only allow it to work in wifi logo test mode */
|
||||
if (padapter->registrypriv.wifi_spec == 1)
|
||||
ptdlsinfo->ch_switch_prohibited = _FALSE;
|
||||
ptdlsinfo->ch_switch_prohibited = false;
|
||||
else
|
||||
ptdlsinfo->ch_switch_prohibited = _TRUE;
|
||||
ptdlsinfo->ch_switch_prohibited = true;
|
||||
|
||||
ptdlsinfo->link_established = _FALSE;
|
||||
ptdlsinfo->link_established = false;
|
||||
ptdlsinfo->sta_cnt = 0;
|
||||
ptdlsinfo->sta_maximum = _FALSE;
|
||||
ptdlsinfo->sta_maximum = false;
|
||||
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
ptdlsinfo->chsw_info.ch_sw_state = TDLS_STATE_NONE;
|
||||
ATOMIC_SET(&ptdlsinfo->chsw_info.chsw_on, _FALSE);
|
||||
ATOMIC_SET(&ptdlsinfo->chsw_info.chsw_on, false);
|
||||
ptdlsinfo->chsw_info.off_ch_num = 0;
|
||||
ptdlsinfo->chsw_info.ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
ptdlsinfo->chsw_info.cur_time = 0;
|
||||
ptdlsinfo->chsw_info.delay_switch_back = _FALSE;
|
||||
ptdlsinfo->chsw_info.dump_stack = _FALSE;
|
||||
ptdlsinfo->chsw_info.delay_switch_back = false;
|
||||
ptdlsinfo->chsw_info.dump_stack = false;
|
||||
#endif
|
||||
|
||||
ptdlsinfo->ch_sensing = 0;
|
||||
ptdlsinfo->watchdog_count = 0;
|
||||
ptdlsinfo->dev_discovered = _FALSE;
|
||||
ptdlsinfo->dev_discovered = false;
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
ptdlsinfo->wfd_info = &padapter->wfd_info;
|
||||
|
@ -71,11 +71,11 @@ int rtw_init_tdls_info(_adapter *padapter)
|
|||
|
||||
rtw_reset_tdls_info(padapter);
|
||||
|
||||
ptdlsinfo->tdls_enable = _TRUE;
|
||||
ptdlsinfo->tdls_enable = true;
|
||||
#ifdef CONFIG_TDLS_DRIVER_SETUP
|
||||
ptdlsinfo->driver_setup = _TRUE;
|
||||
ptdlsinfo->driver_setup = true;
|
||||
#else
|
||||
ptdlsinfo->driver_setup = _FALSE;
|
||||
ptdlsinfo->driver_setup = false;
|
||||
#endif /* CONFIG_TDLS_DRIVER_SETUP */
|
||||
|
||||
spin_lock_init(&ptdlsinfo->cmd_lock);
|
||||
|
@ -99,13 +99,13 @@ int check_ap_tdls_prohibited(u8 *pframe, u8 pkt_len)
|
|||
u8 tdls_prohibited_bit = 0x40; /* bit(38); TDLS_prohibited */
|
||||
|
||||
if (pkt_len < 5)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
pframe += 4;
|
||||
if ((*pframe) & tdls_prohibited_bit)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int check_ap_tdls_ch_switching_prohibited(u8 *pframe, u8 pkt_len)
|
||||
|
@ -113,23 +113,23 @@ int check_ap_tdls_ch_switching_prohibited(u8 *pframe, u8 pkt_len)
|
|||
u8 tdls_ch_swithcing_prohibited_bit = 0x80; /* bit(39); TDLS_channel_switching prohibited */
|
||||
|
||||
if (pkt_len < 5)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
pframe += 4;
|
||||
if ((*pframe) & tdls_ch_swithcing_prohibited_bit)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 rtw_tdls_is_setup_allowed(_adapter *padapter)
|
||||
{
|
||||
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
||||
|
||||
if (ptdlsinfo->ap_prohibited == _TRUE)
|
||||
return _FALSE;
|
||||
if (ptdlsinfo->ap_prohibited == true)
|
||||
return false;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
|
@ -137,13 +137,13 @@ u8 rtw_tdls_is_chsw_allowed(_adapter *padapter)
|
|||
{
|
||||
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
||||
|
||||
if (ptdlsinfo->ch_switch_prohibited == _TRUE)
|
||||
return _FALSE;
|
||||
if (ptdlsinfo->ch_switch_prohibited == true)
|
||||
return false;
|
||||
|
||||
if (padapter->registrypriv.wifi_spec == 0)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -167,11 +167,11 @@ int _issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsi
|
|||
update_mgntframe_attrib(padapter, pattrib);
|
||||
|
||||
pattrib->hdrlen += 2;
|
||||
pattrib->qos_en = _TRUE;
|
||||
pattrib->qos_en = true;
|
||||
pattrib->eosp = 1;
|
||||
pattrib->ack_policy = 0;
|
||||
pattrib->mdata = 0;
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->retry_ctrl = false;
|
||||
|
||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
|
@ -231,7 +231,7 @@ int issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsig
|
|||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
do {
|
||||
ret = _issue_nulldata_to_TDLS_peer_STA(padapter, da, power_mode, wait_ms > 0 ? _TRUE : _FALSE);
|
||||
ret = _issue_nulldata_to_TDLS_peer_STA(padapter, da, power_mode, wait_ms > 0 ? true : false);
|
||||
|
||||
i++;
|
||||
|
||||
|
@ -277,16 +277,16 @@ void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta)
|
|||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
/* -2: AP + BC/MC sta, -4: default key */
|
||||
if (ptdlsinfo->sta_cnt < MAX_ALLOWED_TDLS_STA_NUM) {
|
||||
ptdlsinfo->sta_maximum = _FALSE;
|
||||
ptdlsinfo->sta_maximum = false;
|
||||
memset(&ptdlsinfo->ss_record, 0x00, sizeof(struct tdls_ss_record));
|
||||
}
|
||||
|
||||
/* clear cam */
|
||||
rtw_clearstakey_cmd(padapter, ptdls_sta, _TRUE);
|
||||
rtw_clearstakey_cmd(padapter, ptdls_sta, true);
|
||||
|
||||
if (ptdlsinfo->sta_cnt == 0) {
|
||||
rtw_tdls_cmd(padapter, NULL, TDLS_RS_RCR);
|
||||
ptdlsinfo->link_established = _FALSE;
|
||||
ptdlsinfo->link_established = false;
|
||||
} else
|
||||
RTW_INFO("Remain tdls sta:%02x\n", ptdlsinfo->sta_cnt);
|
||||
|
||||
|
@ -299,7 +299,7 @@ void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta)
|
|||
void rtw_tdls_set_key(_adapter *padapter, struct sta_info *ptdls_sta)
|
||||
{
|
||||
ptdls_sta->dot118021XPrivacy = _AES_;
|
||||
rtw_setstakey_cmd(padapter, ptdls_sta, TDLS_KEY, _TRUE);
|
||||
rtw_setstakey_cmd(padapter, ptdls_sta, TDLS_KEY, true);
|
||||
}
|
||||
|
||||
void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8 *data, u8 Length)
|
||||
|
@ -322,12 +322,12 @@ void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8
|
|||
ptdls_sta->flags &= ~WLAN_STA_HT;
|
||||
|
||||
if (ptdls_sta->flags & WLAN_STA_HT) {
|
||||
if (padapter->registrypriv.ht_enable == _TRUE) {
|
||||
ptdls_sta->htpriv.ht_option = _TRUE;
|
||||
ptdls_sta->qos_option = _TRUE;
|
||||
if (padapter->registrypriv.ht_enable == true) {
|
||||
ptdls_sta->htpriv.ht_option = true;
|
||||
ptdls_sta->qos_option = true;
|
||||
} else {
|
||||
ptdls_sta->htpriv.ht_option = _FALSE;
|
||||
ptdls_sta->qos_option = _FALSE;
|
||||
ptdls_sta->htpriv.ht_option = false;
|
||||
ptdls_sta->qos_option = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -335,7 +335,7 @@ void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8
|
|||
if (ptdls_sta->htpriv.ht_option) {
|
||||
/* Check if sta supports rx ampdu */
|
||||
if (padapter->registrypriv.ampdu_enable == 1)
|
||||
ptdls_sta->htpriv.ampdu_enable = _TRUE;
|
||||
ptdls_sta->htpriv.ampdu_enable = true;
|
||||
|
||||
/* AMPDU Parameters field */
|
||||
/* Get MIN of MAX AMPDU Length Exp */
|
||||
|
@ -352,11 +352,11 @@ void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8
|
|||
|
||||
/* Check if sta support s Short GI 20M */
|
||||
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_20))
|
||||
ptdls_sta->htpriv.sgi_20m = _TRUE;
|
||||
ptdls_sta->htpriv.sgi_20m = true;
|
||||
|
||||
/* Check if sta support s Short GI 40M */
|
||||
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_40))
|
||||
ptdls_sta->htpriv.sgi_40m = _TRUE;
|
||||
ptdls_sta->htpriv.sgi_40m = true;
|
||||
|
||||
/* Bwmode would still followed AP's setting */
|
||||
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH)) {
|
||||
|
@ -433,7 +433,7 @@ u8 *rtw_tdls_set_rsnie(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struct pkt_attri
|
|||
|
||||
if (p != NULL)
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, len, p + 2, &(pattrib->pktlen));
|
||||
else if (init == _TRUE)
|
||||
else if (init == true)
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(TDLS_RSNIE), TDLS_RSNIE, &(pattrib->pktlen));
|
||||
else
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(ptdls_sta->TDLS_RSNIE), ptdls_sta->TDLS_RSNIE, &(pattrib->pktlen));
|
||||
|
@ -484,7 +484,7 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc
|
|||
else {
|
||||
/* Timeout interval */
|
||||
timeout_itvl[0] = 0x02;
|
||||
if (init == _TRUE)
|
||||
if (init == true)
|
||||
_rtw_memcpy(timeout_itvl + 1, &timeout_interval, 4);
|
||||
else
|
||||
_rtw_memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4);
|
||||
|
@ -587,7 +587,7 @@ u8 *rtw_tdls_set_sup_reg_class(u8 *pframe, struct pkt_attrib *pattrib)
|
|||
u8 *rtw_tdls_set_linkid(u8 *pframe, struct pkt_attrib *pattrib, u8 init)
|
||||
{
|
||||
u8 link_id_addr[18] = {0};
|
||||
if (init == _TRUE) {
|
||||
if (init == true) {
|
||||
_rtw_memcpy(link_id_addr, pattrib->ra, 6);
|
||||
_rtw_memcpy((link_id_addr + 6), pattrib->src, 6);
|
||||
_rtw_memcpy((link_id_addr + 12), pattrib->dst, 6);
|
||||
|
@ -629,7 +629,7 @@ void rtw_tdls_set_ch_sw_oper_control(_adapter *padapter, u8 enable)
|
|||
ATOMIC_SET(&padapter->tdlsinfo.chsw_info.chsw_on, enable);
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_TDLS_BCN_EARLY_C2H_RPT, &enable);
|
||||
RTW_INFO("[TDLS] %s Bcn Early C2H Report\n", (enable == _TRUE) ? "Start" : "Stop");
|
||||
RTW_INFO("[TDLS] %s Bcn Early C2H Report\n", (enable == true) ? "Start" : "Stop");
|
||||
}
|
||||
|
||||
void rtw_tdls_ch_sw_back_to_base_chnl(_adapter *padapter)
|
||||
|
@ -639,7 +639,7 @@ void rtw_tdls_ch_sw_back_to_base_chnl(_adapter *padapter)
|
|||
|
||||
pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
if ((ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE) &&
|
||||
if ((ATOMIC_READ(&pchsw_info->chsw_on) == true) &&
|
||||
(padapter->mlmeextpriv.cur_channel != rtw_get_oper_ch(padapter)))
|
||||
rtw_tdls_cmd(padapter, pchsw_info->addr, TDLS_CH_SW_TO_BASE_CHNL_UNSOLICITED);
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ s32 rtw_tdls_do_ch_sw(_adapter *padapter, struct sta_info *ptdls_sta, u8 chnl_ty
|
|||
_exit_critical_mutex(&(adapter_to_dvobj(padapter)->setch_mutex), NULL);
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk);
|
||||
if (take_care_iqk == _TRUE)
|
||||
if (take_care_iqk == true)
|
||||
rtw_hal_ch_sw_iqk_info_restore(padapter, CH_SW_USE_CASE_TDLS);
|
||||
|
||||
ch_sw_time_spent = rtw_systime_to_ms(rtw_get_current_time()) - ch_sw_time_start;
|
||||
|
@ -746,7 +746,7 @@ u8 *rtw_tdls_set_wmm_params(_adapter *padapter, u8 *pframe, struct pkt_attrib *p
|
|||
|
||||
if (&pmlmeinfo->WMM_param) {
|
||||
_rtw_memcpy(wmm_param_ele, WMM_PARA_OUI, 6);
|
||||
if (_rtw_memcmp(&pmlmeinfo->WMM_param, &wmm_param_ele[6], 18) == _TRUE)
|
||||
if (_rtw_memcmp(&pmlmeinfo->WMM_param, &wmm_param_ele[6], 18) == true)
|
||||
/* Use default WMM Param */
|
||||
_rtw_memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE));
|
||||
else
|
||||
|
@ -895,7 +895,7 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa
|
|||
RTW_INFO("[TDLS] %s\n", __func__);
|
||||
|
||||
ptxmgmt->action_code = TDLS_SETUP_REQUEST;
|
||||
if (rtw_tdls_is_setup_allowed(padapter) == _FALSE)
|
||||
if (rtw_tdls_is_setup_allowed(padapter) == false)
|
||||
goto exit;
|
||||
|
||||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
|
@ -929,11 +929,11 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa
|
|||
ptdlsinfo->sta_cnt++;
|
||||
|
||||
if (ptdlsinfo->sta_cnt == MAX_ALLOWED_TDLS_STA_NUM)
|
||||
ptdlsinfo->sta_maximum = _TRUE;
|
||||
ptdlsinfo->sta_maximum = true;
|
||||
|
||||
ptdls_sta->tdls_sta_state |= TDLS_RESPONDER_STATE;
|
||||
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) {
|
||||
if (rtw_tdls_is_driver_setup(padapter) == true) {
|
||||
ptdls_sta->TDLS_PeerKey_Lifetime = timeout_interval;
|
||||
_set_timer(&ptdls_sta->handshake_timer, TDLS_HANDSHAKE_TIME);
|
||||
}
|
||||
|
@ -983,7 +983,7 @@ int _issue_tdls_teardown(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 wai
|
|||
goto exit;
|
||||
|
||||
rtw_mi_set_scan_deny(padapter, 550);
|
||||
rtw_mi_scan_abort(padapter, _TRUE);
|
||||
rtw_mi_scan_abort(padapter, true);
|
||||
|
||||
pattrib = &pmgntframe->attrib;
|
||||
|
||||
|
@ -1003,7 +1003,7 @@ int _issue_tdls_teardown(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 wai
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE)
|
||||
if (rtw_tdls_is_driver_setup(padapter) == true)
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)
|
||||
if (pattrib->encrypt)
|
||||
_cancel_timer_ex(&ptdls_sta->TPK_timer);
|
||||
|
@ -1316,7 +1316,7 @@ int issue_tdls_ch_switch_req(_adapter *padapter, struct sta_info *ptdls_sta)
|
|||
|
||||
RTW_INFO("[TDLS] %s\n", __func__);
|
||||
|
||||
if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) {
|
||||
if (rtw_tdls_is_chsw_allowed(padapter) == false) {
|
||||
RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1363,7 +1363,7 @@ int issue_tdls_ch_switch_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, in
|
|||
|
||||
RTW_INFO("[TDLS] %s\n", __func__);
|
||||
|
||||
if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) {
|
||||
if (rtw_tdls_is_chsw_allowed(padapter) == false) {
|
||||
RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1388,9 +1388,9 @@ int issue_tdls_ch_switch_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, in
|
|||
pattrib->qsel = pattrib->priority;
|
||||
/*
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
if(xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pmgntframe)==_TRUE){
|
||||
if(xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pmgntframe)==true){
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
if (rtw_xmit_tdls_coalesce(padapter, pmgntframe, ptxmgmt) != _SUCCESS) {
|
||||
|
@ -1425,7 +1425,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt));
|
||||
/* WFDTDLS: for sigma test, not to setup direct link automatically */
|
||||
ptdlsinfo->dev_discovered = _TRUE;
|
||||
ptdlsinfo->dev_discovered = true;
|
||||
|
||||
psa = get_sa(ptr);
|
||||
ptdls_sta = rtw_get_stainfo(&(padapter->stapriv), psa);
|
||||
|
@ -1435,7 +1435,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
#ifdef CONFIG_TDLS_AUTOSETUP
|
||||
if (ptdls_sta != NULL) {
|
||||
/* Record the tdls sta with lowest signal strength */
|
||||
if (ptdlsinfo->sta_maximum == _TRUE && ptdls_sta->alive_count >= 1) {
|
||||
if (ptdlsinfo->sta_maximum == true && ptdls_sta->alive_count >= 1) {
|
||||
if (_rtw_memcmp(ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN)) {
|
||||
_rtw_memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN);
|
||||
ptdlsinfo->ss_record.RxPWDBAll = pattrib->phy_info.RxPWDBAll;
|
||||
|
@ -1447,7 +1447,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (ptdlsinfo->sta_maximum == _TRUE) {
|
||||
if (ptdlsinfo->sta_maximum == true) {
|
||||
if (_rtw_memcmp(ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN)) {
|
||||
/* All traffics are busy, do not set up another direct link. */
|
||||
ret = _FAIL;
|
||||
|
@ -1455,7 +1455,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
} else {
|
||||
if (pattrib->phy_info.RxPWDBAll > ptdlsinfo->ss_record.RxPWDBAll) {
|
||||
_rtw_memcpy(txmgmt.peer, ptdlsinfo->ss_record.macaddr, ETH_ALEN);
|
||||
/* issue_tdls_teardown(padapter, ptdlsinfo->ss_record.macaddr, _FALSE); */
|
||||
/* issue_tdls_teardown(padapter, ptdlsinfo->ss_record.macaddr, false); */
|
||||
} else {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1468,7 +1468,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
if (pattrib->phy_info.RxPWDBAll + TDLS_SIGNAL_THRESH >= undecorated_smoothed_pwdb) {
|
||||
RTW_INFO("pattrib->RxPWDBAll=%d, pdmpriv->undecorated_smoothed_pwdb=%d\n", pattrib->phy_info.RxPWDBAll, undecorated_smoothed_pwdb);
|
||||
_rtw_memcpy(txmgmt.peer, psa, ETH_ALEN);
|
||||
issue_tdls_setup_req(padapter, &txmgmt, _FALSE);
|
||||
issue_tdls_setup_req(padapter, &txmgmt, false);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_TDLS_AUTOSETUP */
|
||||
|
@ -1502,7 +1502,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
int supportRateNum = 0;
|
||||
struct tdls_txmgmt txmgmt;
|
||||
|
||||
if (rtw_tdls_is_setup_allowed(padapter) == _FALSE)
|
||||
if (rtw_tdls_is_setup_allowed(padapter) == false)
|
||||
goto exit;
|
||||
|
||||
memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt));
|
||||
|
@ -1581,7 +1581,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
_rtw_memcpy(ptdls_sta->TDLS_RSNIE, pIE->data, pIE->Length);
|
||||
pairwise_count = *(u16 *)(ppairwise_cipher - 2);
|
||||
for (k = 0; k < pairwise_count; k++) {
|
||||
if (_rtw_memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == _TRUE)
|
||||
if (_rtw_memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == true)
|
||||
ccmp_included = 1;
|
||||
}
|
||||
|
||||
|
@ -1609,7 +1609,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
case EID_BSSCoexistence:
|
||||
break;
|
||||
case _LINK_ID_IE_:
|
||||
if (_rtw_memcmp(get_bssid(pmlmepriv), pIE->data, 6) == _FALSE)
|
||||
if (_rtw_memcmp(get_bssid(pmlmepriv), pIE->data, 6) == false)
|
||||
txmgmt.status_code = _STATS_NOT_IN_SAME_BSS_;
|
||||
break;
|
||||
default:
|
||||
|
@ -1654,7 +1654,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
ptdlsinfo->sta_cnt++;
|
||||
/* -2: AP + BC/MC sta, -4: default key */
|
||||
if (ptdlsinfo->sta_cnt == MAX_ALLOWED_TDLS_STA_NUM)
|
||||
ptdlsinfo->sta_maximum = _TRUE;
|
||||
ptdlsinfo->sta_maximum = true;
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
rtw_tdls_process_wfd_ie(ptdlsinfo, ptr + FIXED_IE, parsing_length);
|
||||
|
@ -1759,16 +1759,16 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
ppairwise_cipher = prsnie + 10;
|
||||
_rtw_memcpy(&pairwise_count, (u16 *)(ppairwise_cipher - 2), 2);
|
||||
for (k = 0; k < pairwise_count; k++) {
|
||||
if (_rtw_memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == _TRUE)
|
||||
if (_rtw_memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == true)
|
||||
verify_ccmp = 1;
|
||||
}
|
||||
case _EXT_CAP_IE_:
|
||||
break;
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
if (_rtw_memcmp((u8 *)pIE + 2, WMM_INFO_OUI, 6) == _TRUE) {
|
||||
if (_rtw_memcmp((u8 *)pIE + 2, WMM_INFO_OUI, 6) == true) {
|
||||
/* WMM Info ID and OUI */
|
||||
if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE))
|
||||
ptdls_sta->qos_option = _TRUE;
|
||||
if ((pregistrypriv->wmm_enable == true) || (padapter->mlmepriv.htpriv.ht_option == true))
|
||||
ptdls_sta->qos_option = true;
|
||||
}
|
||||
break;
|
||||
case _FTIE_:
|
||||
|
@ -1811,7 +1811,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
if (prx_pkt_attrib->encrypt) {
|
||||
if (verify_ccmp == 1) {
|
||||
txmgmt.status_code = _STATS_SUCCESSFUL_;
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) {
|
||||
if (rtw_tdls_is_driver_setup(padapter) == true) {
|
||||
wpa_tdls_generate_tpk(padapter, ptdls_sta);
|
||||
if (tdls_verify_mic(ptdls_sta->tpk.kck, 2, plinkid_ie, prsnie, ptimeout_ie, pftie) == _FAIL) {
|
||||
RTW_INFO("[TDLS] %s tdls_verify_mic fail, free_tdls_sta\n", __func__);
|
||||
|
@ -1828,12 +1828,12 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
txmgmt.status_code = _STATS_SUCCESSFUL_;
|
||||
}
|
||||
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) {
|
||||
if (rtw_tdls_is_driver_setup(padapter) == true) {
|
||||
_rtw_memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN);
|
||||
issue_tdls_setup_cfm(padapter, &txmgmt);
|
||||
|
||||
if (txmgmt.status_code == _STATS_SUCCESSFUL_) {
|
||||
ptdlsinfo->link_established = _TRUE;
|
||||
ptdlsinfo->link_established = true;
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) {
|
||||
ptdls_sta->tdls_sta_state |= TDLS_LINKED_STATE;
|
||||
|
@ -1850,7 +1850,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
|
||||
exit:
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE)
|
||||
if (rtw_tdls_is_driver_setup(padapter) == true)
|
||||
return ret;
|
||||
else
|
||||
return _SUCCESS;
|
||||
|
@ -1912,9 +1912,9 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame)
|
|||
prsnie = (u8 *)pIE;
|
||||
break;
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
if (_rtw_memcmp((u8 *)pIE + 2, WMM_PARA_OUI, 6) == _TRUE) {
|
||||
if (_rtw_memcmp((u8 *)pIE + 2, WMM_PARA_OUI, 6) == true) {
|
||||
/* WMM Parameter ID and OUI */
|
||||
ptdls_sta->qos_option = _TRUE;
|
||||
ptdls_sta->qos_option = true;
|
||||
}
|
||||
break;
|
||||
case _FTIE_:
|
||||
|
@ -1947,7 +1947,7 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
|
||||
if (rtw_tdls_is_driver_setup(padapter)) {
|
||||
ptdlsinfo->link_established = _TRUE;
|
||||
ptdlsinfo->link_established = true;
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) {
|
||||
ptdls_sta->tdls_sta_state |= TDLS_LINKED_STATE;
|
||||
|
@ -1984,7 +1984,7 @@ int On_TDLS_Dis_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
struct tdls_txmgmt txmgmt;
|
||||
int ret = _SUCCESS;
|
||||
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _FALSE)
|
||||
if (rtw_tdls_is_driver_setup(padapter) == false)
|
||||
goto exit;
|
||||
|
||||
memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt));
|
||||
|
@ -2012,7 +2012,7 @@ int On_TDLS_Dis_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
if (psta_ap == NULL)
|
||||
goto exit;
|
||||
dst = pIE->data + 12;
|
||||
if (MacAddr_isBcst(dst) == _FALSE && (_rtw_memcmp(adapter_mac_addr(padapter), dst, 6) == _FALSE))
|
||||
if (MacAddr_isBcst(dst) == false && (_rtw_memcmp(adapter_mac_addr(padapter), dst, 6) == false))
|
||||
goto exit;
|
||||
break;
|
||||
default:
|
||||
|
@ -2112,7 +2112,7 @@ int On_TDLS_Peer_Traffic_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
/* transmit buffered frames */
|
||||
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
|
@ -2166,7 +2166,7 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
u16 switch_time = TDLS_CH_SWITCH_TIME * 1000, switch_timeout = TDLS_CH_SWITCH_TIMEOUT * 1000;
|
||||
u8 take_care_iqk;
|
||||
|
||||
if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) {
|
||||
if (rtw_tdls_is_chsw_allowed(padapter) == false) {
|
||||
RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -2199,7 +2199,7 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
pchsw_info->off_ch_num = 44;
|
||||
|
||||
if (pchsw_info->off_ch_num != pmlmeext->cur_channel)
|
||||
pchsw_info->delay_switch_back = _FALSE;
|
||||
pchsw_info->delay_switch_back = false;
|
||||
|
||||
/* Parsing information element */
|
||||
for (j = FIXED_IE; j < parsing_length;) {
|
||||
|
@ -2238,7 +2238,7 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk);
|
||||
if (take_care_iqk == _TRUE) {
|
||||
if (take_care_iqk == true) {
|
||||
u8 central_chnl;
|
||||
u8 bw_mode;
|
||||
|
||||
|
@ -2260,10 +2260,10 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame)
|
|||
txmgmt.status_code = 0;
|
||||
_rtw_memcpy(txmgmt.peer, psa, ETH_ALEN);
|
||||
|
||||
if (_rtw_memcmp(pchsw_info->addr, zaddr, ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(pchsw_info->addr, zaddr, ETH_ALEN) == true)
|
||||
_rtw_memcpy(pchsw_info->addr, ptdls_sta->hwaddr, ETH_ALEN);
|
||||
|
||||
if (ATOMIC_READ(&pchsw_info->chsw_on) == _FALSE)
|
||||
if (ATOMIC_READ(&pchsw_info->chsw_on) == false)
|
||||
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_START);
|
||||
|
||||
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_RESP);
|
||||
|
@ -2286,7 +2286,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
int ret = _SUCCESS;
|
||||
|
||||
if (rtw_tdls_is_chsw_allowed(padapter) == _FALSE) {
|
||||
if (rtw_tdls_is_chsw_allowed(padapter) == false) {
|
||||
RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__);
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -2301,7 +2301,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
/* If we receive Unsolicited TDLS Channel Switch Response when channel switch is running, */
|
||||
/* we will go back to base channel and terminate this channel switch procedure */
|
||||
if (ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE) {
|
||||
if (ATOMIC_READ(&pchsw_info->chsw_on) == true) {
|
||||
if (pmlmeext->cur_channel != rtw_get_oper_ch(padapter)) {
|
||||
RTW_INFO("[TDLS] Rx unsolicited channel switch response\n");
|
||||
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_TO_BASE_CHNL);
|
||||
|
@ -2354,7 +2354,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
if ((pmlmeext->cur_channel == rtw_get_oper_ch(padapter)) &&
|
||||
(pchsw_info->ch_sw_state & TDLS_WAIT_CH_RSP_STATE)) {
|
||||
if (ATOMIC_READ(&pchsw_info->chsw_on) == _TRUE)
|
||||
if (ATOMIC_READ(&pchsw_info->chsw_on) == true)
|
||||
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_TO_OFF_CHNL);
|
||||
}
|
||||
|
||||
|
@ -2428,7 +2428,7 @@ void wfd_ie_tdls(_adapter *padapter, u8 *pframe, u32 *pktlen)
|
|||
|
||||
/* Value: */
|
||||
/* Associated BSSID */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||
else
|
||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||
|
@ -2486,7 +2486,7 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
|||
pframe = rtw_tdls_set_sup_reg_class(pframe, pattrib);
|
||||
|
||||
if (pattrib->encrypt)
|
||||
pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, _TRUE, ptdls_sta);
|
||||
pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, true, ptdls_sta);
|
||||
|
||||
pframe = rtw_tdls_set_ext_cap(pframe, pattrib);
|
||||
|
||||
|
@ -2497,18 +2497,18 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
|||
, NULL
|
||||
, ptdls_sta->SNonce);
|
||||
|
||||
pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, _TRUE, ptdls_sta);
|
||||
pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, true, ptdls_sta);
|
||||
}
|
||||
|
||||
/* Sup_reg_classes(optional) */
|
||||
if (pregistrypriv->ht_enable == _TRUE)
|
||||
if (pregistrypriv->ht_enable == true)
|
||||
pframe = rtw_tdls_set_ht_cap(padapter, pframe_head, pattrib);
|
||||
|
||||
pframe = rtw_tdls_set_bss_coexist(padapter, pframe, pattrib);
|
||||
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, true);
|
||||
|
||||
if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE))
|
||||
if ((pregistrypriv->wmm_enable == true) || (padapter->mlmepriv.htpriv.ht_option == true))
|
||||
pframe = rtw_tdls_set_qos_cap(pframe, pattrib);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
|
@ -2561,13 +2561,13 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
|||
|
||||
if (pattrib->encrypt) {
|
||||
prsnie = pframe;
|
||||
pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, _FALSE, ptdls_sta);
|
||||
pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, false, ptdls_sta);
|
||||
}
|
||||
|
||||
pframe = rtw_tdls_set_ext_cap(pframe, pattrib);
|
||||
|
||||
if (pattrib->encrypt) {
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE)
|
||||
if (rtw_tdls_is_driver_setup(padapter) == true)
|
||||
wpa_tdls_generate_tpk(padapter, ptdls_sta);
|
||||
|
||||
pftie = pframe;
|
||||
|
@ -2579,23 +2579,23 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
|||
, ptdls_sta->SNonce);
|
||||
|
||||
ptimeout_ie = pframe;
|
||||
pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, _FALSE, ptdls_sta);
|
||||
pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, false, ptdls_sta);
|
||||
}
|
||||
|
||||
/* Sup_reg_classes(optional) */
|
||||
if (pregistrypriv->ht_enable == _TRUE)
|
||||
if (pregistrypriv->ht_enable == true)
|
||||
pframe = rtw_tdls_set_ht_cap(padapter, pframe_head, pattrib);
|
||||
|
||||
pframe = rtw_tdls_set_bss_coexist(padapter, pframe, pattrib);
|
||||
|
||||
plinkid_ie = pframe;
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, false);
|
||||
|
||||
/* Fill FTIE mic */
|
||||
if (pattrib->encrypt && rtw_tdls_is_driver_setup(padapter) == _TRUE)
|
||||
if (pattrib->encrypt && rtw_tdls_is_driver_setup(padapter) == true)
|
||||
wpa_tdls_ftie_mic(ptdls_sta->tpk.kck, 2, plinkid_ie, prsnie, ptimeout_ie, pftie, pftie_mic);
|
||||
|
||||
if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE))
|
||||
if ((pregistrypriv->wmm_enable == true) || (padapter->mlmepriv.htpriv.ht_option == true))
|
||||
pframe = rtw_tdls_set_qos_cap(pframe, pattrib);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
|
@ -2629,7 +2629,7 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
|||
|
||||
if (pattrib->encrypt) {
|
||||
prsnie = pframe;
|
||||
pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, _TRUE, ptdls_sta);
|
||||
pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, true, ptdls_sta);
|
||||
}
|
||||
|
||||
if (pattrib->encrypt) {
|
||||
|
@ -2642,9 +2642,9 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
|||
, ptdls_sta->SNonce);
|
||||
|
||||
ptimeout_ie = pframe;
|
||||
pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, _TRUE, ptdls_sta);
|
||||
pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, true, ptdls_sta);
|
||||
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) {
|
||||
if (rtw_tdls_is_driver_setup(padapter) == true) {
|
||||
/* Start TPK timer */
|
||||
ptdls_sta->TPK_count = 0;
|
||||
_set_timer(&ptdls_sta->TPK_timer, ONE_SEC);
|
||||
|
@ -2654,12 +2654,12 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
|||
/* HT operation; todo */
|
||||
|
||||
plinkid_ie = pframe;
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, true);
|
||||
|
||||
if (pattrib->encrypt && (rtw_tdls_is_driver_setup(padapter) == _TRUE))
|
||||
if (pattrib->encrypt && (rtw_tdls_is_driver_setup(padapter) == true))
|
||||
wpa_tdls_ftie_mic(ptdls_sta->tpk.kck, 3, plinkid_ie, prsnie, ptimeout_ie, pftie, pftie_mic);
|
||||
|
||||
if (ptdls_sta->qos_option == _TRUE)
|
||||
if (ptdls_sta->qos_option == true)
|
||||
pframe = rtw_tdls_set_wmm_params(padapter, pframe, pattrib);
|
||||
}
|
||||
|
||||
|
@ -2686,11 +2686,11 @@ void rtw_build_tdls_teardown_ies(_adapter *padapter, struct xmit_frame *pxmitfra
|
|||
|
||||
plinkid_ie = pframe;
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, false);
|
||||
else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, true);
|
||||
|
||||
if (pattrib->encrypt && (rtw_tdls_is_driver_setup(padapter) == _TRUE))
|
||||
if (pattrib->encrypt && (rtw_tdls_is_driver_setup(padapter) == true))
|
||||
wpa_tdls_teardown_ftie_mic(ptdls_sta->tpk.kck, plinkid_ie, ptxmgmt->status_code, 1, 4, pftie, pftie_mic);
|
||||
}
|
||||
|
||||
|
@ -2702,7 +2702,7 @@ void rtw_build_tdls_dis_req_ies(_adapter *padapter, struct xmit_frame *pxmitfram
|
|||
pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS);
|
||||
pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt);
|
||||
pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, true);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2726,20 +2726,20 @@ void rtw_build_tdls_dis_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfram
|
|||
pframe = rtw_tdls_set_sup_ch(pmlmeext, pframe, pattrib);
|
||||
|
||||
if (privacy)
|
||||
pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, _TRUE, NULL);
|
||||
pframe = rtw_tdls_set_rsnie(ptxmgmt, pframe, pattrib, true, NULL);
|
||||
|
||||
pframe = rtw_tdls_set_ext_cap(pframe, pattrib);
|
||||
|
||||
if (privacy) {
|
||||
pframe = rtw_tdls_set_ftie(ptxmgmt, pframe, pattrib, NULL, NULL);
|
||||
pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, _TRUE, NULL);
|
||||
pframe = rtw_tdls_set_timeout_interval(ptxmgmt, pframe, pattrib, true, NULL);
|
||||
}
|
||||
|
||||
if (pregistrypriv->ht_enable == _TRUE)
|
||||
if (pregistrypriv->ht_enable == true)
|
||||
pframe = rtw_tdls_set_ht_cap(padapter, pframe_head - pktlen_index, pattrib);
|
||||
|
||||
pframe = rtw_tdls_set_bss_coexist(padapter, pframe, pattrib);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, false);
|
||||
}
|
||||
|
||||
void rtw_build_tdls_peer_traffic_indication_ies(_adapter *padapter, struct xmit_frame *pxmitframe, u8 *pframe, struct tdls_txmgmt *ptxmgmt)
|
||||
|
@ -2755,9 +2755,9 @@ void rtw_build_tdls_peer_traffic_indication_ies(_adapter *padapter, struct xmit_
|
|||
pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, false);
|
||||
else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, true);
|
||||
|
||||
/* PTI control */
|
||||
/* PU buffer status */
|
||||
|
@ -2785,9 +2785,9 @@ void rtw_build_tdls_peer_traffic_rsp_ies(_adapter *padapter, struct xmit_frame *
|
|||
pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, false);
|
||||
else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, true);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
|
@ -2820,9 +2820,9 @@ void rtw_build_tdls_ch_switch_req_ies(_adapter *padapter, struct xmit_frame *pxm
|
|||
}
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, false);
|
||||
else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, true);
|
||||
|
||||
pframe = rtw_tdls_set_ch_sw(pframe, pattrib, ptdls_sta);
|
||||
|
||||
|
@ -2841,9 +2841,9 @@ void rtw_build_tdls_ch_switch_rsp_ies(_adapter *padapter, struct xmit_frame *pxm
|
|||
pframe = rtw_tdls_set_status_code(pframe, pattrib, ptxmgmt);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, false);
|
||||
else if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE)
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, _TRUE);
|
||||
pframe = rtw_tdls_set_linkid(pframe, pattrib, true);
|
||||
|
||||
pframe = rtw_tdls_set_ch_sw(pframe, pattrib, ptdls_sta);
|
||||
}
|
||||
|
@ -2925,7 +2925,7 @@ void _tdls_tpk_timer_hdl(void *FunctionContext)
|
|||
RTW_INFO("[TDLS] %s, Re-Setup TDLS link with "MAC_FMT" since TPK lifetime expires!\n", __func__, MAC_ARG(ptdls_sta->hwaddr));
|
||||
ptdls_sta->TPK_count = 0;
|
||||
_rtw_memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN);
|
||||
issue_tdls_setup_req(ptdls_sta->padapter, &txmgmt, _FALSE);
|
||||
issue_tdls_setup_req(ptdls_sta->padapter, &txmgmt, false);
|
||||
}
|
||||
|
||||
_set_timer(&ptdls_sta->TPK_timer, ONE_SEC);
|
||||
|
@ -2949,7 +2949,7 @@ void _tdls_delay_timer_hdl(void *FunctionContext)
|
|||
struct tdls_ch_switch *pchsw_info = &padapter->tdlsinfo.chsw_info;
|
||||
|
||||
RTW_INFO("[TDLS] %s, op_ch:%d, tdls_state:0x%08x\n", __func__, rtw_get_oper_ch(padapter), ptdls_sta->tdls_sta_state);
|
||||
pchsw_info->delay_switch_back = _TRUE;
|
||||
pchsw_info->delay_switch_back = true;
|
||||
}
|
||||
|
||||
void _tdls_stay_on_base_chnl_timer_hdl(void *FunctionContext)
|
||||
|
@ -3009,7 +3009,7 @@ void _tdls_pti_timer_hdl(void *FunctionContext)
|
|||
if (ptdls_sta->tdls_sta_state & TDLS_WAIT_PTR_STATE) {
|
||||
RTW_INFO("[TDLS] Doesn't receive PTR from peer dev:"MAC_FMT"; "
|
||||
"Send TDLS Tear Down\n", MAC_ARG(ptdls_sta->hwaddr));
|
||||
issue_tdls_teardown(padapter, &txmgmt, _FALSE);
|
||||
issue_tdls_teardown(padapter, &txmgmt, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,10 +81,10 @@ int cckrates_included(unsigned char *rate, int ratelen)
|
|||
for (i = 0; i < ratelen; i++) {
|
||||
if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
|
||||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22))
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -95,10 +95,10 @@ int cckratesonly_included(unsigned char *rate, int ratelen)
|
|||
for (i = 0; i < ratelen; i++) {
|
||||
if ((((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) &&
|
||||
(((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22))
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GET_RAID_BY_DRV
|
||||
|
@ -241,9 +241,9 @@ u8 judge_network_type(_adapter *padapter, unsigned char *rate, int ratelen)
|
|||
if (pmlmeinfo->HT_enable)
|
||||
network_type = WIRELESS_11_24N;
|
||||
|
||||
if ((cckratesonly_included(rate, ratelen)) == _TRUE)
|
||||
if ((cckratesonly_included(rate, ratelen)) == true)
|
||||
network_type |= WIRELESS_11B;
|
||||
else if ((cckrates_included(rate, ratelen)) == _TRUE)
|
||||
else if ((cckrates_included(rate, ratelen)) == true)
|
||||
network_type |= WIRELESS_11BG;
|
||||
else
|
||||
network_type |= WIRELESS_11G;
|
||||
|
@ -324,11 +324,11 @@ int is_basicrate(_adapter *padapter, unsigned char rate)
|
|||
|
||||
if ((val != 0xff) && (val != 0xfe)) {
|
||||
if (rate == ratetbl_val_2wifirate(val))
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset);
|
||||
|
@ -355,7 +355,7 @@ unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset)
|
|||
default:
|
||||
rate = ratetbl_val_2wifirate(rate);
|
||||
|
||||
if (is_basicrate(padapter, rate) == _TRUE)
|
||||
if (is_basicrate(padapter, rate) == true)
|
||||
rate |= IEEE80211_BASIC_RATE_MASK;
|
||||
|
||||
rateset[len] = rate;
|
||||
|
@ -670,7 +670,7 @@ void set_channel_bwmode(_adapter *padapter, unsigned char channel, unsigned char
|
|||
u8 center_ch, chnl_offset80 = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
#if (defined(CONFIG_TDLS) && defined(CONFIG_TDLS_CH_SW)) || defined(CONFIG_MCC_MODE)
|
||||
u8 iqk_info_backup = _FALSE;
|
||||
u8 iqk_info_backup = false;
|
||||
#endif
|
||||
|
||||
if (padapter->bNotifyChannelChange)
|
||||
|
@ -727,15 +727,15 @@ void set_channel_bwmode(_adapter *padapter, unsigned char channel, unsigned char
|
|||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk);
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_DO_IQK, &do_iqk);
|
||||
if ((take_care_iqk == _TRUE) && (do_iqk == _TRUE))
|
||||
iqk_info_backup = _TRUE;
|
||||
if ((take_care_iqk == true) && (do_iqk == true))
|
||||
iqk_info_backup = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
rtw_hal_set_chnl_bw(padapter, center_ch, bwmode, channel_offset, chnl_offset80); /* set center channel */
|
||||
|
||||
#if (defined(CONFIG_TDLS) && defined(CONFIG_TDLS_CH_SW)) || defined(CONFIG_MCC_MODE)
|
||||
if (iqk_info_backup == _TRUE)
|
||||
if (iqk_info_backup == true)
|
||||
rtw_hal_ch_sw_iqk_info_backup(padapter);
|
||||
#endif
|
||||
|
||||
|
@ -787,7 +787,7 @@ int is_client_associated_to_ap(_adapter *padapter)
|
|||
pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -798,7 +798,7 @@ int is_client_associated_to_ibss(_adapter *padapter)
|
|||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -819,7 +819,7 @@ int is_IBSS_empty(_adapter *padapter)
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned int decide_wait_for_beacon_timeout(unsigned int bcn_interval)
|
||||
|
@ -926,8 +926,8 @@ inline bool _rtw_camctl_chk_cap(_adapter *adapter, u8 cap)
|
|||
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
|
||||
|
||||
if (cam_ctl->sec_cap & cap)
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline void _rtw_camctl_set_flags(_adapter *adapter, u32 flags)
|
||||
|
@ -974,8 +974,8 @@ inline bool _rtw_camctl_chk_flags(_adapter *adapter, u32 flags)
|
|||
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
|
||||
|
||||
if (cam_ctl->flags & flags)
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void dump_sec_cam_map(void *sel, struct sec_cam_bmp *map, u8 max_num)
|
||||
|
@ -1108,7 +1108,7 @@ inline bool rtw_sec_camid_is_drv_forbid(struct cam_ctl_t *cam_ctl, u8 id)
|
|||
|
||||
static bool _rtw_sec_camid_is_used(struct cam_ctl_t *cam_ctl, u8 id)
|
||||
{
|
||||
bool ret = _FALSE;
|
||||
bool ret = false;
|
||||
|
||||
if (id >= cam_ctl->num) {
|
||||
rtw_warn_on(1);
|
||||
|
@ -1157,17 +1157,17 @@ inline bool _rtw_camid_is_gk(_adapter *adapter, u8 cam_id)
|
|||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
|
||||
bool ret = _FALSE;
|
||||
bool ret = false;
|
||||
|
||||
if (cam_id >= cam_ctl->num) {
|
||||
rtw_warn_on(1);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (_rtw_sec_camid_is_used(cam_ctl, cam_id) == _FALSE)
|
||||
if (_rtw_sec_camid_is_used(cam_ctl, cam_id) == false)
|
||||
goto exit;
|
||||
|
||||
ret = (dvobj->cam_cache[cam_id].ctrl & BIT6) ? _TRUE : _FALSE;
|
||||
ret = (dvobj->cam_cache[cam_id].ctrl & BIT6) ? true : false;
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
|
@ -1190,16 +1190,16 @@ inline bool rtw_camid_is_gk(_adapter *adapter, u8 cam_id)
|
|||
static bool cam_cache_chk(_adapter *adapter, u8 id, u8 *addr, s16 kid, s8 gk)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
bool ret = _FALSE;
|
||||
bool ret = false;
|
||||
|
||||
if (addr && _rtw_memcmp(dvobj->cam_cache[id].mac, addr, ETH_ALEN) == _FALSE)
|
||||
if (addr && _rtw_memcmp(dvobj->cam_cache[id].mac, addr, ETH_ALEN) == false)
|
||||
goto exit;
|
||||
if (kid >= 0 && kid != (dvobj->cam_cache[id].ctrl & 0x03))
|
||||
goto exit;
|
||||
if (gk != -1 && (gk ? _TRUE : _FALSE) != _rtw_camid_is_gk(adapter, id))
|
||||
if (gk != -1 && (gk ? true : false) != _rtw_camid_is_gk(adapter, id))
|
||||
goto exit;
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
|
@ -1261,8 +1261,8 @@ static s16 rtw_get_camid(_adapter *adapter, struct sta_info *sta, u8 *addr, s16
|
|||
}
|
||||
|
||||
/* find cam entry which has the same addr, kid (, gk bit) */
|
||||
if (_rtw_camctl_chk_cap(adapter, SEC_CAP_CHK_BMC) == _TRUE)
|
||||
i = _rtw_camid_search(adapter, addr, kid, sta ? _FALSE : _TRUE);
|
||||
if (_rtw_camctl_chk_cap(adapter, SEC_CAP_CHK_BMC) == true)
|
||||
i = _rtw_camid_search(adapter, addr, kid, sta ? false : true);
|
||||
else
|
||||
i = _rtw_camid_search(adapter, addr, kid, -1);
|
||||
|
||||
|
@ -1277,7 +1277,7 @@ static s16 rtw_get_camid(_adapter *adapter, struct sta_info *sta, u8 *addr, s16
|
|||
if (((i + start_id) % cam_ctl->num) < 4)
|
||||
continue;
|
||||
#endif
|
||||
if (_rtw_sec_camid_is_used(cam_ctl, ((i + start_id) % cam_ctl->num)) == _FALSE)
|
||||
if (_rtw_sec_camid_is_used(cam_ctl, ((i + start_id) % cam_ctl->num)) == false)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1307,7 +1307,7 @@ s16 rtw_camid_alloc(_adapter *adapter, struct sta_info *sta, u8 kid, bool *used)
|
|||
unsigned long irqL;
|
||||
s16 cam_id = -1;
|
||||
|
||||
*used = _FALSE;
|
||||
*used = false;
|
||||
|
||||
_enter_critical_bh(&cam_ctl->lock, &irqL);
|
||||
|
||||
|
@ -1448,7 +1448,7 @@ static s16 rtw_get_empty_cam_entry(_adapter *adapter, u8 start_camid)
|
|||
|
||||
_enter_critical_bh(&cam_ctl->lock, &irqL);
|
||||
for (i = start_camid; i < cam_ctl->num; i++) {
|
||||
if (_FALSE == _rtw_sec_camid_is_used(cam_ctl, i)) {
|
||||
if (false == _rtw_sec_camid_is_used(cam_ctl, i)) {
|
||||
cam_id = i;
|
||||
break;
|
||||
}
|
||||
|
@ -1498,9 +1498,9 @@ void flush_all_cam_entry(_adapter *padapter)
|
|||
if (psta->state & WIFI_AP_STATE) {
|
||||
/*clear cam when ap free per sta_info*/
|
||||
} else
|
||||
rtw_clearstakey_cmd(padapter, psta, _FALSE);
|
||||
rtw_clearstakey_cmd(padapter, psta, false);
|
||||
}
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||
int cam_id = -1;
|
||||
u8 *addr = adapter_mac_addr(padapter);
|
||||
|
||||
|
@ -1514,7 +1514,7 @@ void flush_all_cam_entry(_adapter *padapter)
|
|||
|
||||
invalidate_cam_all(padapter);
|
||||
/* clear default key related key search setting */
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_SEC_DK_CFG, (u8 *)_FALSE);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_SEC_DK_CFG, (u8 *)false);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1562,15 +1562,15 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
|
||||
if (pmlmepriv->qospriv.qos_option == 0) {
|
||||
pmlmeinfo->WMM_enable = 0;
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)))
|
||||
return _FALSE;
|
||||
return false;
|
||||
else
|
||||
_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
|
||||
pmlmeinfo->WMM_enable = 1;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void WMMOnAssocRsp(_adapter *padapter)
|
||||
|
@ -1676,18 +1676,18 @@ void WMMOnAssocRsp(_adapter *padapter)
|
|||
inx[3] = 3;
|
||||
|
||||
if (pregpriv->wifi_spec == 1) {
|
||||
u32 j, tmp, change_inx = _FALSE;
|
||||
u32 j, tmp, change_inx = false;
|
||||
|
||||
/* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = i + 1; j < 4; j++) {
|
||||
/* compare CW and AIFS */
|
||||
if ((edca[j] & 0xFFFF) < (edca[i] & 0xFFFF))
|
||||
change_inx = _TRUE;
|
||||
change_inx = true;
|
||||
else if ((edca[j] & 0xFFFF) == (edca[i] & 0xFFFF)) {
|
||||
/* compare TXOP */
|
||||
if ((edca[j] >> 16) > (edca[i] >> 16))
|
||||
change_inx = _TRUE;
|
||||
change_inx = true;
|
||||
}
|
||||
|
||||
if (change_inx) {
|
||||
|
@ -1699,7 +1699,7 @@ void WMMOnAssocRsp(_adapter *padapter)
|
|||
inx[i] = inx[j];
|
||||
inx[j] = tmp;
|
||||
|
||||
change_inx = _FALSE;
|
||||
change_inx = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1731,7 +1731,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
|||
if (!pIE)
|
||||
return;
|
||||
|
||||
if (phtpriv->ht_option == _FALSE)
|
||||
if (phtpriv->ht_option == false)
|
||||
return;
|
||||
|
||||
if (pmlmeext->cur_bwmode >= CHANNEL_WIDTH_80)
|
||||
|
@ -1778,7 +1778,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
|||
if ((new_bwmode != pmlmeext->cur_bwmode || new_ch_offset != pmlmeext->cur_ch_offset)
|
||||
&& new_bwmode < pmlmeext->cur_bwmode
|
||||
) {
|
||||
pmlmeinfo->bwmode_updated = _TRUE;
|
||||
pmlmeinfo->bwmode_updated = true;
|
||||
|
||||
pmlmeext->cur_bwmode = new_bwmode;
|
||||
pmlmeext->cur_ch_offset = new_ch_offset;
|
||||
|
@ -1786,10 +1786,10 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
|||
/* update HT info also */
|
||||
HT_info_handler(padapter, pIE);
|
||||
} else
|
||||
pmlmeinfo->bwmode_updated = _FALSE;
|
||||
pmlmeinfo->bwmode_updated = false;
|
||||
|
||||
|
||||
if (_TRUE == pmlmeinfo->bwmode_updated) {
|
||||
if (true == pmlmeinfo->bwmode_updated) {
|
||||
struct sta_info *psta;
|
||||
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network);
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
@ -1814,7 +1814,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
|||
rtw_dm_ra_mask_wk_cmd(padapter, (u8 *)psta);
|
||||
}
|
||||
|
||||
/* pmlmeinfo->bwmode_updated = _FALSE; */ /* bwmode_updated done, reset it! */
|
||||
/* pmlmeinfo->bwmode_updated = false; */ /* bwmode_updated done, reset it! */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1834,7 +1834,7 @@ void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
if (pIE == NULL)
|
||||
return;
|
||||
|
||||
if (phtpriv->ht_option == _FALSE)
|
||||
if (phtpriv->ht_option == false)
|
||||
return;
|
||||
|
||||
pmlmeinfo->HT_caps_enable = 1;
|
||||
|
@ -1990,7 +1990,7 @@ void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
if (pIE == NULL)
|
||||
return;
|
||||
|
||||
if (phtpriv->ht_option == _FALSE)
|
||||
if (phtpriv->ht_option == false)
|
||||
return;
|
||||
|
||||
|
||||
|
@ -2118,18 +2118,18 @@ static int check_ielen(u8 *start, uint len)
|
|||
if (elen > left) {
|
||||
RTW_INFO("IEEE 802.11 element parse failed (id=%d elen=%d left=%lu)\n",
|
||||
id, elen, (unsigned long) left);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
if ((id == WLAN_EID_VENDOR_SPECIFIC) && (elen < 4))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
left -= elen;
|
||||
pos += elen;
|
||||
}
|
||||
if (left)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int validate_beacon_len(u8 *pframe, u32 len)
|
||||
|
@ -2138,13 +2138,13 @@ int validate_beacon_len(u8 *pframe, u32 len)
|
|||
|
||||
if (len < ie_offset) {
|
||||
RTW_INFO("%s: incorrect beacon length(%d)\n", __func__, len);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (check_ielen(pframe + ie_offset, len - ie_offset) == _FALSE)
|
||||
return _FALSE;
|
||||
if (check_ielen(pframe + ie_offset, len - ie_offset) == false)
|
||||
return false;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2175,12 +2175,12 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
|||
left = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_;
|
||||
pos = pframe + sizeof(struct rtw_ieee80211_hdr_3addr) + _BEACON_IE_OFFSET_;
|
||||
if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
/* check bw and channel offset */
|
||||
if (elems.ht_capabilities) {
|
||||
if (elems.ht_capabilities_len != sizeof(*pht_cap))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
pht_cap = (struct rtw_ieee80211_ht_cap *) elems.ht_capabilities;
|
||||
recv_beacon->ht_cap_info = le16_to_cpu(pht_cap->cap_info);
|
||||
|
@ -2188,7 +2188,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
|||
|
||||
if (elems.ht_operation) {
|
||||
if (elems.ht_operation_len != sizeof(*pht_info))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
pht_info = (struct HT_info_element *) elems.ht_operation;
|
||||
recv_beacon->ht_info_infos_0_sco = pht_info->infos[0] & 0x03;
|
||||
|
@ -2210,7 +2210,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
|||
/* checking SSID */
|
||||
if (elems.ssid) {
|
||||
if (elems.ssid_len > sizeof(recv_beacon->ssid))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
_rtw_memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len);
|
||||
recv_beacon->ssid_len = elems.ssid_len;
|
||||
|
@ -2233,7 +2233,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
|||
} else if (capability & BIT(4))
|
||||
recv_beacon->encryp_protocol = ENCRYP_PROTOCOL_WEP;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void rtw_dump_bcn_keys(struct beacon_keys *recv_beacon)
|
||||
|
@ -2262,8 +2262,8 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||
struct wlan_network *cur_network = &(Adapter->mlmepriv.cur_network);
|
||||
struct beacon_keys recv_beacon;
|
||||
|
||||
if (is_client_associated_to_ap(Adapter) == _FALSE)
|
||||
return _TRUE;
|
||||
if (is_client_associated_to_ap(Adapter) == false)
|
||||
return true;
|
||||
|
||||
len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
||||
|
@ -2272,14 +2272,14 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(cur_network->network.MacAddress, pbssid, 6) == _FALSE) {
|
||||
if (_rtw_memcmp(cur_network->network.MacAddress, pbssid, 6) == false) {
|
||||
RTW_WARN("Oops: rtw_check_network_encrypt linked but recv other bssid bcn\n" MAC_FMT MAC_FMT,
|
||||
MAC_ARG(pbssid), MAC_ARG(cur_network->network.MacAddress));
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (rtw_get_bcn_keys(Adapter, pframe, packet_len, &recv_beacon) == _FALSE)
|
||||
return _TRUE; /* parsing failed => broken IE */
|
||||
if (rtw_get_bcn_keys(Adapter, pframe, packet_len, &recv_beacon) == false)
|
||||
return true; /* parsing failed => broken IE */
|
||||
|
||||
/* don't care hidden ssid, use current beacon ssid directly */
|
||||
if (recv_beacon.ssid_len == 0) {
|
||||
|
@ -2288,10 +2288,10 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||
recv_beacon.ssid_len = pmlmepriv->cur_beacon_keys.ssid_len;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys, sizeof(recv_beacon)) == _TRUE)
|
||||
if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys, sizeof(recv_beacon)) == true)
|
||||
pmlmepriv->new_beacon_cnts = 0;
|
||||
else if ((pmlmepriv->new_beacon_cnts == 0) ||
|
||||
_rtw_memcmp(&recv_beacon, &pmlmepriv->new_beacon_keys, sizeof(recv_beacon)) == _FALSE) {
|
||||
_rtw_memcmp(&recv_beacon, &pmlmepriv->new_beacon_keys, sizeof(recv_beacon)) == false) {
|
||||
RTW_DBG("%s: start new beacon (seq=%d)\n", __func__, GetSequence(pframe));
|
||||
|
||||
if (pmlmepriv->new_beacon_cnts == 0) {
|
||||
|
@ -2315,7 +2315,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||
pmlmepriv->cur_beacon_keys.ht_cap_info = recv_beacon.ht_cap_info;
|
||||
pmlmepriv->cur_beacon_keys.ht_info_infos_0_sco = recv_beacon.ht_info_infos_0_sco;
|
||||
if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys,
|
||||
sizeof(recv_beacon)) == _FALSE) {
|
||||
sizeof(recv_beacon)) == false) {
|
||||
/* beacon is changed, have to do disconnect/connect */
|
||||
RTW_WARN("%s: new beacon occur!!\n", __func__);
|
||||
return _FAIL;
|
||||
|
@ -2376,10 +2376,10 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
|||
|
||||
#ifdef CONFIG_TDLS
|
||||
case _EXT_CAP_IE_:
|
||||
if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == _TRUE)
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == _TRUE)
|
||||
ptdlsinfo->ch_switch_prohibited = _TRUE;
|
||||
if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == true)
|
||||
ptdlsinfo->ap_prohibited = true;
|
||||
if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == true)
|
||||
ptdlsinfo->ch_switch_prohibited = true;
|
||||
break;
|
||||
#endif /* CONFIG_TDLS */
|
||||
default:
|
||||
|
@ -2398,7 +2398,7 @@ void process_csa_ie(_adapter *padapter, u8 *pframe, uint pkt_len)
|
|||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
u8 new_ch_no = 0;
|
||||
|
||||
if (padapter->mlmepriv.handle_dfs == _TRUE)
|
||||
if (padapter->mlmepriv.handle_dfs == true)
|
||||
return;
|
||||
|
||||
len = pkt_len - (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN);
|
||||
|
@ -2408,7 +2408,7 @@ void process_csa_ie(_adapter *padapter, u8 *pframe, uint pkt_len)
|
|||
|
||||
switch (pIE->ElementID) {
|
||||
case _CH_SWTICH_ANNOUNCE_:
|
||||
padapter->mlmepriv.handle_dfs = _TRUE;
|
||||
padapter->mlmepriv.handle_dfs = true;
|
||||
_rtw_memcpy(&new_ch_no, pIE->data + 1, 1);
|
||||
rtw_set_csa_cmd(padapter, new_ch_no);
|
||||
break;
|
||||
|
@ -2436,12 +2436,12 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
|
|||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
if ((_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4)) && (_rtw_memcmp((pIE->data + 12), WPA_TKIP_CIPHER, 4)))
|
||||
return _TRUE;
|
||||
return true;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
if (_rtw_memcmp((pIE->data + 8), RSN_TKIP_CIPHER, 4))
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -2450,9 +2450,9 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
|
|||
i += (pIE->Length + 2);
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
} else
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -2472,13 +2472,13 @@ unsigned int should_forbid_n_rate(_adapter *padapter)
|
|||
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4) &&
|
||||
((_rtw_memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP, 4)) ||
|
||||
(_rtw_memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP, 4))))
|
||||
return _FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
if ((_rtw_memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4)) ||
|
||||
(_rtw_memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4)))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -2487,9 +2487,9 @@ unsigned int should_forbid_n_rate(_adapter *padapter)
|
|||
i += (pIE->Length + 2);
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
} else
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -2509,11 +2509,11 @@ unsigned int is_ap_in_wep(_adapter *padapter)
|
|||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4))
|
||||
return _FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -2522,9 +2522,9 @@ unsigned int is_ap_in_wep(_adapter *padapter)
|
|||
i += (pIE->Length + 2);
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
} else
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -2646,13 +2646,13 @@ unsigned char get_highest_rate_idx(u32 mask)
|
|||
|
||||
void Update_RA_Entry(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
rtw_hal_update_ra_mask(psta, psta->rssi_level, _TRUE);
|
||||
rtw_hal_update_ra_mask(psta, psta->rssi_level, true);
|
||||
}
|
||||
|
||||
void set_sta_rate(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
/* rate adaptive */
|
||||
rtw_hal_update_ra_mask(psta, psta->rssi_level, _TRUE);
|
||||
rtw_hal_update_ra_mask(psta, psta->rssi_level, true);
|
||||
}
|
||||
|
||||
/* Update RRSR and Rate for USERATE */
|
||||
|
@ -2784,14 +2784,14 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap)
|
|||
if (updateCap & cShortPreamble) {
|
||||
/* Short Preamble */
|
||||
if (pmlmeinfo->preamble_mode != PREAMBLE_SHORT) { /* PREAMBLE_LONG or PREAMBLE_AUTO */
|
||||
ShortPreamble = _TRUE;
|
||||
ShortPreamble = true;
|
||||
pmlmeinfo->preamble_mode = PREAMBLE_SHORT;
|
||||
rtw_hal_set_hwreg(Adapter, HW_VAR_ACK_PREAMBLE, (u8 *)&ShortPreamble);
|
||||
}
|
||||
} else {
|
||||
/* Long Preamble */
|
||||
if (pmlmeinfo->preamble_mode != PREAMBLE_LONG) { /* PREAMBLE_SHORT or PREAMBLE_AUTO */
|
||||
ShortPreamble = _FALSE;
|
||||
ShortPreamble = false;
|
||||
pmlmeinfo->preamble_mode = PREAMBLE_LONG;
|
||||
rtw_hal_set_hwreg(Adapter, HW_VAR_ACK_PREAMBLE, (u8 *)&ShortPreamble);
|
||||
}
|
||||
|
@ -2859,9 +2859,9 @@ void update_wireless_mode(_adapter *padapter)
|
|||
else if (pmlmeinfo->HT_enable)
|
||||
network_type = WIRELESS_11_24N;
|
||||
|
||||
if ((cckratesonly_included(rate, ratelen)) == _TRUE)
|
||||
if ((cckratesonly_included(rate, ratelen)) == true)
|
||||
network_type |= WIRELESS_11B;
|
||||
else if ((cckrates_included(rate, ratelen)) == _TRUE)
|
||||
else if ((cckrates_included(rate, ratelen)) == true)
|
||||
network_type |= WIRELESS_11BG;
|
||||
else
|
||||
network_type |= WIRELESS_11G;
|
||||
|
@ -2912,7 +2912,7 @@ int rtw_ies_get_supported_rate(u8 *ies, uint ies_len, u8 *rate_set, u8 *rate_num
|
|||
unsigned int ie_len;
|
||||
|
||||
if (!rate_set || !rate_num)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
*rate_num = 0;
|
||||
|
||||
|
@ -2951,7 +2951,7 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
|
|||
struct ADDBA_request *preq = (struct ADDBA_request *)paddba_req;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
u8 size, accept = _FALSE;
|
||||
u8 size, accept = false;
|
||||
|
||||
psta = rtw_get_stainfo(pstapriv, addr);
|
||||
if (!psta)
|
||||
|
@ -2966,7 +2966,7 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
|
|||
accept = rtw_rx_ampdu_is_accept(padapter);
|
||||
size = rtw_rx_ampdu_size(padapter);
|
||||
|
||||
if (accept == _TRUE)
|
||||
if (accept == true)
|
||||
rtw_addbarsp_cmd(padapter, addr, tid, 0, size, start_seq);
|
||||
else
|
||||
rtw_addbarsp_cmd(padapter, addr, tid, 37, size, start_seq); /* reject ADDBA Req */
|
||||
|
@ -3040,7 +3040,7 @@ void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
|
|||
*/
|
||||
|
||||
/* dump for adaptive_early_32k */
|
||||
if (pmlmeext->bcn_cnt > 100 && (pmlmeext->adaptive_tsf_done == _TRUE)) {
|
||||
if (pmlmeext->bcn_cnt > 100 && (pmlmeext->adaptive_tsf_done == true)) {
|
||||
u8 ratio_20_delay, ratio_80_delay;
|
||||
u8 DrvBcnEarly, DrvBcnTimeOut;
|
||||
|
||||
|
@ -3238,7 +3238,7 @@ void rtw_alloc_macid(_adapter *padapter, struct sta_info *psta)
|
|||
struct macid_bmp *used_map = &macid_ctl->used;
|
||||
/* static u8 last_id = 0; for testing */
|
||||
u8 last_id = 0;
|
||||
u8 is_bc_sta = _FALSE;
|
||||
u8 is_bc_sta = false;
|
||||
|
||||
if (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), ETH_ALEN)) {
|
||||
psta->mac_id = macid_ctl->num;
|
||||
|
@ -3246,7 +3246,7 @@ void rtw_alloc_macid(_adapter *padapter, struct sta_info *psta)
|
|||
}
|
||||
|
||||
if (_rtw_memcmp(psta->hwaddr, bc_addr, ETH_ALEN)) {
|
||||
is_bc_sta = _TRUE;
|
||||
is_bc_sta = true;
|
||||
rtw_iface_bcmc_id_set(padapter, INVALID_SEC_MAC_CAM_ID); /*init default value*/
|
||||
}
|
||||
|
||||
|
@ -3354,13 +3354,13 @@ void rtw_release_macid(_adapter *padapter, struct sta_info *psta)
|
|||
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj);
|
||||
u8 is_bc_sta = _FALSE;
|
||||
u8 is_bc_sta = false;
|
||||
|
||||
if (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), ETH_ALEN))
|
||||
return;
|
||||
|
||||
if (_rtw_memcmp(psta->hwaddr, bc_addr, ETH_ALEN))
|
||||
is_bc_sta = _TRUE;
|
||||
is_bc_sta = true;
|
||||
|
||||
#ifdef CONFIG_SHARED_BMC_MACID
|
||||
if (is_bc_sta
|
||||
|
@ -3546,7 +3546,7 @@ _adapter *dvobj_get_adapter_by_addr(struct dvobj_priv *dvobj, u8 *addr)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
if (_rtw_memcmp(dvobj->padapters[i]->mac_addr, addr, ETH_ALEN) == _TRUE)
|
||||
if (_rtw_memcmp(dvobj->padapters[i]->mac_addr, addr, ETH_ALEN) == true)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3636,21 +3636,21 @@ bool rtw_wowlan_parser_pattern_cmd(u8 *input, char *pattern,
|
|||
|
||||
(*pattern_len) = pos;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
error:
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool rtw_check_pattern_valid(u8 *input, u8 len)
|
||||
{
|
||||
int i = 0;
|
||||
bool res = _FALSE;
|
||||
bool res = false;
|
||||
|
||||
if (len != 2)
|
||||
goto exit;
|
||||
|
||||
for (i = 0 ; i < len ; i++)
|
||||
if (IsHexDigit(input[i]) == _FALSE)
|
||||
if (IsHexDigit(input[i]) == false)
|
||||
goto exit;
|
||||
|
||||
res = _SUCCESS;
|
||||
|
@ -3687,7 +3687,7 @@ u8 rtw_set_default_pattern(_adapter *adapter)
|
|||
u8 tcp_protocol[1] = {0x06};
|
||||
u8 udp_protocol[1] = {0x11};
|
||||
|
||||
if (pregistrypriv->default_patterns_en == _FALSE)
|
||||
if (pregistrypriv->default_patterns_en == false)
|
||||
return 0;
|
||||
|
||||
for (index = 0 ; index < DEFAULT_PATTERN_NUM ; index++) {
|
||||
|
@ -4085,9 +4085,9 @@ int rtw_dev_pno_set(struct net_device *net, pno_ssid_t *ssid, int num,
|
|||
goto failing;
|
||||
}
|
||||
|
||||
pwrctl->wowlan_in_resume = _FALSE;
|
||||
pwrctl->wowlan_in_resume = false;
|
||||
|
||||
pwrctl->pno_inited = _TRUE;
|
||||
pwrctl->pno_inited = true;
|
||||
/* NLO Info */
|
||||
ret = rtw_dev_nlo_info_set(pwrctl->pnlo_info, ssid, num,
|
||||
pno_time, pno_repeat, pno_freq_expo_max);
|
||||
|
|
290
core/rtw_xmit.c
290
core/rtw_xmit.c
|
@ -151,10 +151,10 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxmitbuf->buf_tag = XMITBUF_DATA;
|
||||
|
||||
/* Tx buf allocation may fail sometimes, so sleep and retry. */
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE);
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), true);
|
||||
if (res == _FAIL) {
|
||||
rtw_msleep_os(10);
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE);
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), true);
|
||||
if (res == _FAIL)
|
||||
goto exit;
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxmitbuf->padapter = padapter;
|
||||
pxmitbuf->buf_tag = XMITBUF_MGNT;
|
||||
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ, _TRUE);
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ, true);
|
||||
if (res == _FAIL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -249,7 +249,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxmitbuf->padapter = padapter;
|
||||
pxmitbuf->buf_tag = XMITBUF_CMD;
|
||||
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ, _TRUE);
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ, true);
|
||||
if (res == _FAIL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -275,7 +275,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxmitpriv->voq_cnt = 0;
|
||||
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
pxmitpriv->ack_tx = _FALSE;
|
||||
pxmitpriv->ack_tx = false;
|
||||
_rtw_mutex_init(&pxmitpriv->ack_tx_mutex);
|
||||
rtw_sctx_init(&pxmitpriv->ack_tx_ops, 0);
|
||||
#endif
|
||||
|
@ -351,7 +351,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
|
|||
}
|
||||
|
||||
for (i = 0; i < NR_XMITBUFF; i++) {
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE);
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), true);
|
||||
|
||||
pxmitbuf++;
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
|
|||
|
||||
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
|
||||
for (i = 0; i < NR_XMIT_EXTBUFF; i++) {
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE);
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ), true);
|
||||
|
||||
pxmitbuf++;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
|
|||
for (i = 0; i < CMDBUF_MAX; i++) {
|
||||
pxmitbuf = &pxmitpriv->pcmd_xmitbuf[i];
|
||||
if (pxmitbuf != NULL)
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf, MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ , _TRUE);
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf, MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ , true);
|
||||
}
|
||||
|
||||
rtw_free_hwxmits(padapter);
|
||||
|
@ -552,8 +552,8 @@ void rtw_update_tx_rate_bmp(struct dvobj_priv *dvobj)
|
|||
{
|
||||
u8 highest_rate_bw;
|
||||
u8 highest_rate_bw_bmp;
|
||||
u8 update_ht_rs = _FALSE;
|
||||
u8 update_vht_rs = _FALSE;
|
||||
u8 update_ht_rs = false;
|
||||
u8 update_vht_rs = false;
|
||||
|
||||
highest_rate_bw_bmp = BW_CAP_20M;
|
||||
highest_rate_bw = CHANNEL_WIDTH_20;
|
||||
|
@ -573,7 +573,7 @@ void rtw_update_tx_rate_bmp(struct dvobj_priv *dvobj)
|
|||
RTW_INFO("highest_ht_rate_bw_bmp:0x%02x=>0x%02x\n", ori_highest_ht_rate_bw_bmp, rf_ctl->highest_ht_rate_bw_bmp);
|
||||
RTW_INFO("rate_bmp_ht_by_bw[%u]:0x%08x=>0x%08x\n", highest_rate_bw, ori_bmp_ht[highest_rate_bw], rf_ctl->rate_bmp_ht_by_bw[highest_rate_bw]);
|
||||
}
|
||||
update_ht_rs = _TRUE;
|
||||
update_ht_rs = true;
|
||||
}
|
||||
|
||||
highest_rate_bw_bmp = BW_CAP_20M;
|
||||
|
@ -594,11 +594,11 @@ void rtw_update_tx_rate_bmp(struct dvobj_priv *dvobj)
|
|||
RTW_INFO("highest_vht_rate_bw_bmp:0x%02x=>0x%02x\n", ori_highest_vht_rate_bw_bmp, rf_ctl->highest_vht_rate_bw_bmp);
|
||||
RTW_INFO("rate_bmp_vht_by_bw[%u]:0x%08x=>0x%08x\n", highest_rate_bw, ori_bmp_vht[highest_rate_bw], rf_ctl->rate_bmp_vht_by_bw[highest_rate_bw]);
|
||||
}
|
||||
update_vht_rs = _TRUE;
|
||||
update_vht_rs = true;
|
||||
}
|
||||
|
||||
/* TODO: per rfpath and rate section handling? */
|
||||
if (update_ht_rs == _TRUE || update_vht_rs == _TRUE)
|
||||
if (update_ht_rs == true || update_vht_rs == true)
|
||||
rtw_hal_set_tx_power_level(dvobj_get_primary_adapter(dvobj), hal_data->current_channel);
|
||||
}
|
||||
}
|
||||
|
@ -680,7 +680,7 @@ exit:
|
|||
|
||||
u8 query_ra_short_GI(struct sta_info *psta, u8 bw)
|
||||
{
|
||||
u8 sgi = _FALSE, sgi_20m = _FALSE, sgi_40m = _FALSE, sgi_80m = _FALSE;
|
||||
u8 sgi = false, sgi_20m = false, sgi_40m = false, sgi_80m = false;
|
||||
|
||||
sgi_20m = psta->htpriv.sgi_20m;
|
||||
sgi_40m = psta->htpriv.sgi_40m;
|
||||
|
@ -754,9 +754,9 @@ static void update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitf
|
|||
pattrib->vcs_mode = NONE_VCS;
|
||||
}
|
||||
} else {
|
||||
while (_TRUE) {
|
||||
while (true) {
|
||||
/* IOT action */
|
||||
if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en == _TRUE) &&
|
||||
if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en == true) &&
|
||||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) {
|
||||
pattrib->vcs_mode = CTS_TO_SELF;
|
||||
break;
|
||||
|
@ -791,7 +791,7 @@ static void update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitf
|
|||
/* to do list: check MIMO power save condition. */
|
||||
|
||||
/* check AMPDU aggregation for TXOP */
|
||||
if ((pattrib->ampdu_en == _TRUE)) {
|
||||
if ((pattrib->ampdu_en == true)) {
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
break;
|
||||
}
|
||||
|
@ -837,7 +837,7 @@ static void update_attrib_phy_info(_adapter *padapter, struct pkt_attrib *pattri
|
|||
|
||||
pattrib->ht_en = psta->htpriv.ht_option;
|
||||
pattrib->ch_offset = psta->htpriv.ch_offset;
|
||||
pattrib->ampdu_en = _FALSE;
|
||||
pattrib->ampdu_en = false;
|
||||
|
||||
if (padapter->driver_ampdu_spacing != 0xFF) /* driver control AMPDU Density for peer sta's rx */
|
||||
pattrib->ampdu_spacing = padapter->driver_ampdu_spacing;
|
||||
|
@ -847,21 +847,21 @@ static void update_attrib_phy_info(_adapter *padapter, struct pkt_attrib *pattri
|
|||
/* check if enable ampdu */
|
||||
if (pattrib->ht_en && psta->htpriv.ampdu_enable) {
|
||||
if (psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority)) {
|
||||
pattrib->ampdu_en = _TRUE;
|
||||
if (psta->htpriv.tx_amsdu_enable == _TRUE)
|
||||
pattrib->amsdu_ampdu_en = _TRUE;
|
||||
pattrib->ampdu_en = true;
|
||||
if (psta->htpriv.tx_amsdu_enable == true)
|
||||
pattrib->amsdu_ampdu_en = true;
|
||||
else
|
||||
pattrib->amsdu_ampdu_en = _FALSE;
|
||||
pattrib->amsdu_ampdu_en = false;
|
||||
}
|
||||
}
|
||||
/* if(pattrib->ht_en && psta->htpriv.ampdu_enable) */
|
||||
/* { */
|
||||
/* if(psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority)) */
|
||||
/* pattrib->ampdu_en = _TRUE; */
|
||||
/* pattrib->ampdu_en = true; */
|
||||
/* } */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
if (pattrib->direct_link == _TRUE) {
|
||||
if (pattrib->direct_link == true) {
|
||||
psta = pattrib->ptdls_sta;
|
||||
|
||||
pattrib->raid = psta->raid;
|
||||
|
@ -872,11 +872,11 @@ static void update_attrib_phy_info(_adapter *padapter, struct pkt_attrib *pattri
|
|||
}
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->retry_ctrl = false;
|
||||
|
||||
#ifdef CONFIG_AUTO_AP_MODE
|
||||
if (psta->isrc && psta->pid > 0)
|
||||
pattrib->pctrl = _TRUE;
|
||||
pattrib->pctrl = true;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -892,13 +892,13 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
|
|||
memset(pattrib->dot11tkiptxmickey.skey, 0, 16);
|
||||
pattrib->mac_id = psta->mac_id;
|
||||
|
||||
if (psta->ieee8021x_blocked == _TRUE) {
|
||||
if (psta->ieee8021x_blocked == true) {
|
||||
|
||||
pattrib->encrypt = 0;
|
||||
|
||||
if ((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _FALSE)) {
|
||||
if ((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false)) {
|
||||
#ifdef DBG_TX_DROP_FRAME
|
||||
RTW_INFO("DBG_TX_DROP_FRAME %s psta->ieee8021x_blocked == _TRUE, pattrib->ether_type(%04x) != 0x888e\n", __func__, pattrib->ether_type);
|
||||
RTW_INFO("DBG_TX_DROP_FRAME %s psta->ieee8021x_blocked == true, pattrib->ether_type(%04x) != 0x888e\n", __func__, pattrib->ether_type);
|
||||
#endif
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -935,7 +935,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
|
|||
}
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
if (pattrib->direct_link == _TRUE) {
|
||||
if (pattrib->direct_link == true) {
|
||||
if (pattrib->encrypt > 0)
|
||||
pattrib->encrypt = _AES_;
|
||||
}
|
||||
|
@ -999,10 +999,10 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
|
|||
_rtw_memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
|
||||
|
||||
if (pattrib->encrypt &&
|
||||
((padapter->securitypriv.sw_encrypt == _TRUE) || (psecuritypriv->hw_decrypted == _FALSE))) {
|
||||
pattrib->bswenc = _TRUE;
|
||||
((padapter->securitypriv.sw_encrypt == true) || (psecuritypriv->hw_decrypted == false))) {
|
||||
pattrib->bswenc = true;
|
||||
} else {
|
||||
pattrib->bswenc = _FALSE;
|
||||
pattrib->bswenc = false;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
|
@ -1010,11 +1010,11 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
|
|||
#endif
|
||||
|
||||
if (pattrib->encrypt && bmcast && _rtw_camctl_chk_flags(padapter, SEC_STATUS_STA_PK_GK_CONFLICT_DIS_BMC_SEARCH))
|
||||
pattrib->bswenc = _TRUE;
|
||||
pattrib->bswenc = true;
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
if (pattrib->encrypt == _SMS4_)
|
||||
pattrib->bswenc = _FALSE;
|
||||
pattrib->bswenc = false;
|
||||
#endif
|
||||
|
||||
exit:
|
||||
|
@ -1085,13 +1085,13 @@ u8 rtw_check_tdls_established(_adapter *padapter, struct pkt_attrib *pattrib)
|
|||
{
|
||||
pattrib->ptdls_sta = NULL;
|
||||
|
||||
pattrib->direct_link = _FALSE;
|
||||
if (padapter->tdlsinfo.link_established == _TRUE) {
|
||||
pattrib->direct_link = false;
|
||||
if (padapter->tdlsinfo.link_established == true) {
|
||||
pattrib->ptdls_sta = rtw_get_stainfo(&padapter->stapriv, pattrib->dst);
|
||||
if ((pattrib->ptdls_sta != NULL) &&
|
||||
(pattrib->ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) &&
|
||||
(pattrib->ether_type != 0x0806)) {
|
||||
pattrib->direct_link = _TRUE;
|
||||
pattrib->direct_link = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1184,14 +1184,14 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
_rtw_memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
|
||||
_rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc);
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
||||
#ifdef CONFIG_TDLS
|
||||
if (rtw_check_tdls_established(padapter, pattrib) == _TRUE)
|
||||
if (rtw_check_tdls_established(padapter, pattrib) == true)
|
||||
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); /* For TDLS direct link Tx, set ra to be same to dst */
|
||||
else
|
||||
#endif
|
||||
|
@ -1225,7 +1225,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
#endif
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE && !(psta->state & _FW_LINKED)) {
|
||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true && !(psta->state & _FW_LINKED)) {
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_err_ucast_ap_link);
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1277,13 +1277,13 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
}
|
||||
|
||||
} else if (GET_IPV4_PROTOCOL(ip) == 0x06 /* TCP */
|
||||
&& rtw_st_ctl_chk_reg_s_proto(&psta->st_ctl, 0x06) == _TRUE
|
||||
&& rtw_st_ctl_chk_reg_s_proto(&psta->st_ctl, 0x06) == true
|
||||
) {
|
||||
u8 tcp[20];
|
||||
|
||||
_rtw_pktfile_read(&pktfile, tcp, 20);
|
||||
|
||||
if (rtw_st_ctl_chk_reg_rule(&psta->st_ctl, padapter, IPV4_SRC(ip), TCP_SRC(tcp), IPV4_DST(ip), TCP_DST(tcp)) == _TRUE) {
|
||||
if (rtw_st_ctl_chk_reg_rule(&psta->st_ctl, padapter, IPV4_SRC(ip), TCP_SRC(tcp), IPV4_DST(ip), TCP_DST(tcp)) == true) {
|
||||
if (GET_TCP_SYN(tcp) && GET_TCP_ACK(tcp)) {
|
||||
session_tracker_add_cmd(padapter, psta
|
||||
, IPV4_SRC(ip), TCP_SRC(tcp)
|
||||
|
@ -1361,7 +1361,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
set_qos(&pktfile, pattrib);
|
||||
} else {
|
||||
#ifdef CONFIG_TDLS
|
||||
if (pattrib->direct_link == _TRUE) {
|
||||
if (pattrib->direct_link == true) {
|
||||
if (pattrib->qos_en)
|
||||
set_qos(&pktfile, pattrib);
|
||||
} else
|
||||
|
@ -1442,7 +1442,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
pframe = pxmitframe->buf_addr + hw_hdr_offset;
|
||||
|
||||
if (bmcst) {
|
||||
if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16) == _TRUE) {
|
||||
if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16) == true) {
|
||||
/* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */
|
||||
/* rtw_msleep_os(10); */
|
||||
return _FAIL;
|
||||
|
@ -1450,7 +1450,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
/* start to calculate the mic code */
|
||||
rtw_secmicsetkey(&micdata, psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey);
|
||||
} else {
|
||||
if (_rtw_memcmp(&pattrib->dot11tkiptxmickey.skey[0], null_key, 16) == _TRUE) {
|
||||
if (_rtw_memcmp(&pattrib->dot11tkiptxmickey.skey[0], null_key, 16) == true) {
|
||||
/* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */
|
||||
/* rtw_msleep_os(10); */
|
||||
return _FAIL;
|
||||
|
@ -1555,7 +1555,7 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||
struct rtw_ieee80211_hdr *pwlanhdr = (struct rtw_ieee80211_hdr *)hdr;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
|
||||
u8 qos_option = _FALSE;
|
||||
u8 qos_option = false;
|
||||
sint res = _SUCCESS;
|
||||
__le16 *fctrl = &pwlanhdr->frame_ctl;
|
||||
|
||||
|
@ -1589,16 +1589,16 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||
set_frame_sub_type(fctrl, pattrib->subtype);
|
||||
|
||||
if (pattrib->subtype & WIFI_DATA_TYPE) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)) {
|
||||
#ifdef CONFIG_TDLS
|
||||
if (pattrib->direct_link == _TRUE) {
|
||||
if (pattrib->direct_link == true) {
|
||||
/* TDLS data transfer, ToDS=0, FrDs=0 */
|
||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
||||
|
||||
if (pattrib->qos_en)
|
||||
qos_option = _TRUE;
|
||||
qos_option = true;
|
||||
} else
|
||||
#endif /* CONFIG_TDLS */
|
||||
{
|
||||
|
@ -1611,9 +1611,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||
_rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
|
||||
|
||||
if (pqospriv->qos_option)
|
||||
qos_option = _TRUE;
|
||||
qos_option = true;
|
||||
}
|
||||
} else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)) {
|
||||
} else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)) {
|
||||
/* to_ds = 0, fr_ds = 1; */
|
||||
SetFrDs(fctrl);
|
||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||
|
@ -1621,15 +1621,15 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||
_rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
|
||||
|
||||
if (pattrib->qos_en)
|
||||
qos_option = _TRUE;
|
||||
} else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
qos_option = true;
|
||||
} else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
|
||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
||||
|
||||
if (pattrib->qos_en)
|
||||
qos_option = _TRUE;
|
||||
qos_option = true;
|
||||
} else {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1684,7 +1684,7 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||
SetSeqNum(hdr, pattrib->seqnum);
|
||||
|
||||
/* re-check if enable ampdu by BA_starting_seqctrl */
|
||||
if (pattrib->ampdu_en == _TRUE) {
|
||||
if (pattrib->ampdu_en == true) {
|
||||
u16 tx_seq;
|
||||
|
||||
tx_seq = psta->BA_starting_seqctrl[pattrib->priority & 0x0f];
|
||||
|
@ -1692,15 +1692,15 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||
/* check BA_starting_seqctrl */
|
||||
if (SN_LESS(pattrib->seqnum, tx_seq)) {
|
||||
/* RTW_INFO("tx ampdu seqnum(%d) < tx_seq(%d)\n", pattrib->seqnum, tx_seq); */
|
||||
pattrib->ampdu_en = _FALSE;/* AGG BK */
|
||||
pattrib->ampdu_en = false;/* AGG BK */
|
||||
} else if (SN_EQUAL(pattrib->seqnum, tx_seq)) {
|
||||
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
|
||||
|
||||
pattrib->ampdu_en = _TRUE;/* AGG EN */
|
||||
pattrib->ampdu_en = true;/* AGG EN */
|
||||
} else {
|
||||
/* RTW_INFO("tx ampdu over run\n"); */
|
||||
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff;
|
||||
pattrib->ampdu_en = _TRUE;/* AGG EN */
|
||||
pattrib->ampdu_en = true;/* AGG EN */
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1719,10 +1719,10 @@ s32 rtw_txframes_pending(_adapter *padapter)
|
|||
{
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
return ((_rtw_queue_empty(&pxmitpriv->be_pending) == _FALSE) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->bk_pending) == _FALSE) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vi_pending) == _FALSE) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vo_pending) == _FALSE));
|
||||
return ((_rtw_queue_empty(&pxmitpriv->be_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->bk_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vi_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vo_pending) == false));
|
||||
}
|
||||
|
||||
s32 rtw_txframes_sta_ac_pending(_adapter *padapter, struct pkt_attrib *pattrib)
|
||||
|
@ -1917,7 +1917,7 @@ s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattr
|
|||
pattrib->encrypt = _AES_;
|
||||
pattrib->iv_len = 8;
|
||||
pattrib->icv_len = 8;
|
||||
pattrib->bswenc = _FALSE;
|
||||
pattrib->bswenc = false;
|
||||
}
|
||||
pattrib->mac_id = ptdls_sta->mac_id;
|
||||
} else {
|
||||
|
@ -2063,29 +2063,29 @@ u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib)
|
|||
s32 check_amsdu(struct xmit_frame *pxmitframe)
|
||||
{
|
||||
struct pkt_attrib *pattrib;
|
||||
s32 ret = _TRUE;
|
||||
s32 ret = true;
|
||||
|
||||
if (!pxmitframe)
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
pattrib = &pxmitframe->attrib;
|
||||
|
||||
if (IS_MCAST(pattrib->ra))
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
if ((pattrib->ether_type == 0x888e) ||
|
||||
(pattrib->ether_type == 0x0806) ||
|
||||
(pattrib->ether_type == 0x88b4) ||
|
||||
(pattrib->dhcp_pkt == 1))
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
if ((pattrib->encrypt == _WEP40_) ||
|
||||
(pattrib->encrypt == _WEP104_) ||
|
||||
(pattrib->encrypt == _TKIP_))
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
if (!pattrib->qos_en)
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -2096,7 +2096,7 @@ s32 check_amsdu_tx_support(_adapter *padapter)
|
|||
int tx_amsdu;
|
||||
int tx_amsdu_rate;
|
||||
int current_tx_rate;
|
||||
s32 ret = _FALSE;
|
||||
s32 ret = false;
|
||||
|
||||
pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
tx_amsdu = padapter->tx_amsdu;
|
||||
|
@ -2104,11 +2104,11 @@ s32 check_amsdu_tx_support(_adapter *padapter)
|
|||
current_tx_rate = pdvobjpriv->traffic_stat.cur_tx_tp;
|
||||
|
||||
if (tx_amsdu == 1)
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
else if (tx_amsdu == 2 && (tx_amsdu_rate == 0 || current_tx_rate > tx_amsdu_rate))
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
else
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -2414,7 +2414,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
|
|||
|
||||
frg_inx++;
|
||||
|
||||
if (bmcst || (rtw_endofpktfile(&pktfile) == _TRUE)) {
|
||||
if (bmcst || (rtw_endofpktfile(&pktfile) == true)) {
|
||||
pattrib->nr_frags = frg_inx;
|
||||
|
||||
pattrib->last_txcmdsz = pattrib->hdrlen + pattrib->iv_len + ((pattrib->nr_frags == 1) ? llc_sz : 0) +
|
||||
|
@ -2440,7 +2440,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
|
|||
|
||||
xmitframe_swencrypt(padapter, pxmitframe);
|
||||
|
||||
if (bmcst == _FALSE)
|
||||
if (bmcst == false)
|
||||
update_attrib_vcs_info(padapter, pxmitframe);
|
||||
else
|
||||
pattrib->vcs_mode = NONE_VCS;
|
||||
|
@ -2488,7 +2488,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
|||
_enter_critical_bh(&padapter->security_key_mutex, &irqL);
|
||||
|
||||
/* IGTK key is not install, it may not support 802.11w */
|
||||
if (padapter->securitypriv.binstallBIPkey != _TRUE) {
|
||||
if (padapter->securitypriv.binstallBIPkey != true) {
|
||||
RTW_INFO("no instll BIP key\n");
|
||||
goto xmitframe_coalesce_success;
|
||||
}
|
||||
|
@ -2743,7 +2743,7 @@ void rtw_count_tx_stats(PADAPTER padapter, struct xmit_frame *pxmitframe, int sz
|
|||
}
|
||||
|
||||
#ifdef CONFIG_CHECK_LEAVE_LPS
|
||||
/* traffic_check_for_leave_lps(padapter, _TRUE); */
|
||||
/* traffic_check_for_leave_lps(padapter, true); */
|
||||
#endif /* CONFIG_LPS */
|
||||
|
||||
}
|
||||
|
@ -2812,7 +2812,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
|||
|
||||
_enter_critical(&pfree_queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(pfree_queue) == _TRUE)
|
||||
if (_rtw_queue_empty(pfree_queue) == true)
|
||||
pxmitbuf = NULL;
|
||||
else {
|
||||
|
||||
|
@ -2879,7 +2879,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
|||
|
||||
_enter_critical(&pfree_xmitbuf_queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(pfree_xmitbuf_queue) == _TRUE)
|
||||
if (_rtw_queue_empty(pfree_xmitbuf_queue) == true)
|
||||
pxmitbuf = NULL;
|
||||
else {
|
||||
|
||||
|
@ -3007,7 +3007,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* (_queue *p
|
|||
|
||||
_enter_critical_bh(&pfree_xmit_queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(pfree_xmit_queue) == _TRUE) {
|
||||
if (_rtw_queue_empty(pfree_xmit_queue) == true) {
|
||||
pxframe = NULL;
|
||||
} else {
|
||||
phead = get_list_head(pfree_xmit_queue);
|
||||
|
@ -3036,7 +3036,7 @@ struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv)
|
|||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
if (_rtw_queue_empty(queue) == _TRUE) {
|
||||
if (_rtw_queue_empty(queue) == true) {
|
||||
pxframe = NULL;
|
||||
} else {
|
||||
phead = get_list_head(queue);
|
||||
|
@ -3146,7 +3146,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue)
|
|||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
|
||||
pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
|
||||
|
||||
|
@ -3178,7 +3178,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
|
|||
xmitframe_phead = get_list_head(pframe_queue);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
|
@ -3198,7 +3198,7 @@ static struct xmit_frame *get_one_xmitframe(struct xmit_priv *pxmitpriv, struct
|
|||
xmitframe_phead = get_list_head(pframe_queue);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
break;
|
||||
}
|
||||
|
@ -3241,7 +3241,7 @@ static struct xmit_frame *rtw_get_xframe(struct xmit_priv *pxmitpriv, int *num_f
|
|||
sta_phead = get_list_head(phwxmit->sta_queue);
|
||||
sta_plist = get_next(sta_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(sta_phead, sta_plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(sta_phead, sta_plist)) == false) {
|
||||
|
||||
ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
|
||||
pframe_queue = &ptxservq->sta_pending;
|
||||
|
@ -3297,7 +3297,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
sta_phead = get_list_head(phwxmit->sta_queue);
|
||||
sta_plist = get_next(sta_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(sta_phead, sta_plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(sta_phead, sta_plist)) == false) {
|
||||
|
||||
ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
|
||||
|
||||
|
@ -3524,7 +3524,7 @@ static int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb)
|
|||
struct sk_buff *skb = *pskb;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
unsigned long irqL;
|
||||
/* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) */
|
||||
/* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) */
|
||||
{
|
||||
int res, is_vlan_tag = 0, i, do_nat25 = 1;
|
||||
unsigned short vlan_hdr = 0;
|
||||
|
@ -3722,7 +3722,7 @@ static void do_queue_select(_adapter *padapter, struct pkt_attrib *pattrib)
|
|||
qsel = pattrib->priority;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
/* if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
/* if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)
|
||||
* qsel = 7; */
|
||||
#endif
|
||||
|
||||
|
@ -3819,7 +3819,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
|
|||
|
||||
update_monitor_frame_attrib(padapter, pattrib);
|
||||
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->retry_ctrl = false;
|
||||
|
||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
|
@ -3860,7 +3860,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
|
|||
|
||||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->retry_ctrl = false;
|
||||
|
||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
|
@ -3944,7 +3944,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
|||
rcu_read_unlock();
|
||||
#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) {
|
||||
res = rtw_br_client_tx(padapter, ppkt);
|
||||
if (res == -1) {
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
|
@ -3986,7 +3986,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
|||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) == _TRUE) {
|
||||
if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) == true) {
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue);
|
||||
return 1;
|
||||
|
@ -3995,7 +3995,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
|||
#endif
|
||||
|
||||
/* pre_xmitframe */
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == _FALSE)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == false)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -4004,7 +4004,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
|||
#ifdef CONFIG_TDLS
|
||||
sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
sint ret = _FALSE;
|
||||
sint ret = false;
|
||||
|
||||
unsigned long irqL;
|
||||
struct sta_info *ptdls_sta = NULL;
|
||||
|
@ -4019,7 +4019,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
|||
else if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) {
|
||||
|
||||
if (pattrib->triggered == 1) {
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -4060,7 +4060,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
|||
if (ptdls_sta->sleepq_len == 1)
|
||||
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_ISSUE_PTI);
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
}
|
||||
|
||||
_exit_critical_bh(&ptdls_sta->sleep_q.lock, &irqL);
|
||||
|
@ -4077,14 +4077,14 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
|||
|
||||
inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
|
||||
{
|
||||
bool allow = _FALSE;
|
||||
bool allow = false;
|
||||
_adapter *adapter = xmitframe->padapter;
|
||||
struct registry_priv *registry = &adapter->registrypriv;
|
||||
|
||||
if (rtw_get_intf_type(adapter) != RTW_PCIE) {
|
||||
|
||||
if (adapter->registrypriv.wifi_spec == 1)
|
||||
allow = _TRUE;
|
||||
allow = true;
|
||||
else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_SPECIAL) {
|
||||
|
||||
struct pkt_attrib *attrib = &xmitframe->attrib;
|
||||
|
@ -4099,10 +4099,10 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
|
|||
if (0)
|
||||
RTW_INFO(FUNC_ADPT_FMT" ether_type:0x%04x%s\n", FUNC_ADPT_ARG(xmitframe->padapter)
|
||||
, attrib->ether_type, attrib->dhcp_pkt ? " DHCP" : "");
|
||||
allow = _TRUE;
|
||||
allow = true;
|
||||
}
|
||||
} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL)
|
||||
allow = _TRUE;
|
||||
allow = true;
|
||||
else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
|
||||
} else
|
||||
rtw_warn_on(1);
|
||||
|
@ -4115,20 +4115,20 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
|
|||
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
unsigned long irqL;
|
||||
sint ret = _FALSE;
|
||||
sint ret = false;
|
||||
struct sta_info *psta = NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
sint bmcst = IS_MCAST(pattrib->ra);
|
||||
bool update_tim = _FALSE;
|
||||
bool update_tim = false;
|
||||
#ifdef CONFIG_TDLS
|
||||
|
||||
if (padapter->tdlsinfo.link_established == _TRUE)
|
||||
if (padapter->tdlsinfo.link_established == true)
|
||||
ret = xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pxmitframe);
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _FALSE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == false) {
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_fwstate);
|
||||
return ret;
|
||||
}
|
||||
|
@ -4147,19 +4147,19 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
if (pattrib->psta != psta) {
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_sta);
|
||||
RTW_INFO("%s, pattrib->psta(%p) != psta(%p)\n", __func__, pattrib->psta, psta);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (psta == NULL) {
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_nosta);
|
||||
RTW_INFO("%s, psta==NUL\n", __func__);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(psta->state & _FW_LINKED)) {
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_link);
|
||||
RTW_INFO("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pattrib->triggered == 1) {
|
||||
|
@ -4167,7 +4167,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
/* RTW_INFO("directly xmit pspoll_triggered packet\n"); */
|
||||
|
||||
/* pattrib->triggered=0; */
|
||||
if (bmcst && xmitframe_hiq_filter(pxmitframe) == _TRUE)
|
||||
if (bmcst && xmitframe_hiq_filter(pxmitframe) == true)
|
||||
pattrib->qsel = QSLT_HIGH;/* HIQ */
|
||||
|
||||
return ret;
|
||||
|
@ -4188,23 +4188,23 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
psta->sleepq_len++;
|
||||
|
||||
if (!(pstapriv->tim_bitmap & BIT(0)))
|
||||
update_tim = _TRUE;
|
||||
update_tim = true;
|
||||
|
||||
pstapriv->tim_bitmap |= BIT(0);
|
||||
pstapriv->sta_dz_bitmap |= BIT(0);
|
||||
|
||||
/* RTW_INFO("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
|
||||
if (update_tim == _TRUE) {
|
||||
if (update_tim == true) {
|
||||
if (is_broadcast_mac_addr(pattrib->ra))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer BC");
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, true, "buffer BC");
|
||||
else
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer MC");
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, true, "buffer MC");
|
||||
} else
|
||||
chk_bmc_sleepq_cmd(padapter);
|
||||
|
||||
/*_exit_critical_bh(&psta->sleep_q.lock, &irqL);*/
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_mcast);
|
||||
|
||||
|
@ -4255,16 +4255,16 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
|
||||
if (((psta->has_legacy_ac) && (!wmmps_ac)) || ((!psta->has_legacy_ac) && (wmmps_ac))) {
|
||||
if (!(pstapriv->tim_bitmap & BIT(psta->aid)))
|
||||
update_tim = _TRUE;
|
||||
update_tim = true;
|
||||
|
||||
pstapriv->tim_bitmap |= BIT(psta->aid);
|
||||
|
||||
/* RTW_INFO("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
|
||||
|
||||
if (update_tim == _TRUE) {
|
||||
if (update_tim == true) {
|
||||
/* RTW_INFO("sleepq_len==1, update BCNTIM\n"); */
|
||||
/* upate BCN for TIM IE */
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer UC");
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, true, "buffer UC");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4275,7 +4275,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
/* wakeup_sta_to_xmit(padapter, psta); */
|
||||
/* } */
|
||||
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_ucast);
|
||||
}
|
||||
|
@ -4301,7 +4301,7 @@ static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_
|
|||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
@ -4312,13 +4312,13 @@ static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_
|
|||
|
||||
ret = xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe);
|
||||
|
||||
if (_TRUE == ret) {
|
||||
if (true == ret) {
|
||||
ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index));
|
||||
|
||||
ptxservq->qcnt--;
|
||||
phwxmits[ac_index].accnt--;
|
||||
} else {
|
||||
/* RTW_INFO("xmitframe_enqueue_for_sleeping_sta return _FALSE\n"); */
|
||||
/* RTW_INFO("xmitframe_enqueue_for_sleeping_sta return false\n"); */
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4393,7 +4393,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
@ -4441,7 +4441,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
/*
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -4491,7 +4491,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
@ -4507,7 +4507,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
pxmitframe->attrib.triggered = 1;
|
||||
/*
|
||||
_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -4539,11 +4539,11 @@ _exit:
|
|||
if (update_mask) {
|
||||
/* update_BCNTIM(padapter); */
|
||||
if ((update_mask & (BIT(0) | BIT(1))) == (BIT(0) | BIT(1)))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear UC&BMC");
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, true, "clear UC&BMC");
|
||||
else if ((update_mask & BIT(1)) == BIT(1))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear BMC");
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, true, "clear BMC");
|
||||
else
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear UC");
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, true, "clear UC");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4563,7 +4563,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
|||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
@ -4619,7 +4619,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
|||
/* RTW_INFO("wakeup to xmit, qlen==0, update_BCNTIM, tim=%x\n", pstapriv->tim_bitmap); */
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, true);
|
||||
/* update_mask = BIT(0); */
|
||||
}
|
||||
|
||||
|
@ -4677,7 +4677,7 @@ struct xmit_buf *dequeue_pending_xmitbuf(
|
|||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == _FALSE) {
|
||||
if (_rtw_queue_empty(pqueue) == false) {
|
||||
_list *plist, *phead;
|
||||
|
||||
phead = get_list_head(pqueue);
|
||||
|
@ -4704,7 +4704,7 @@ static struct xmit_buf *dequeue_pending_xmitbuf_under_survey(
|
|||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == _FALSE) {
|
||||
if (_rtw_queue_empty(pqueue) == false) {
|
||||
_list *plist, *phead;
|
||||
u8 type = 0;
|
||||
|
||||
|
@ -4750,7 +4750,7 @@ static struct xmit_buf *dequeue_pending_xmitbuf_ext(
|
|||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == _FALSE) {
|
||||
if (_rtw_queue_empty(pqueue) == false) {
|
||||
_list *plist, *phead;
|
||||
u8 type = 0;
|
||||
|
||||
|
@ -4781,7 +4781,7 @@ struct xmit_buf *select_and_dequeue_pending_xmitbuf(_adapter *padapter)
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct xmit_buf *pxmitbuf = NULL;
|
||||
|
||||
if (rtw_xmit_ac_blocked(padapter) == _TRUE)
|
||||
if (rtw_xmit_ac_blocked(padapter) == true)
|
||||
pxmitbuf = dequeue_pending_xmitbuf_under_survey(pxmitpriv);
|
||||
else {
|
||||
pxmitbuf = dequeue_pending_xmitbuf_ext(pxmitpriv);
|
||||
|
@ -4797,14 +4797,14 @@ sint check_pending_xmitbuf(
|
|||
{
|
||||
unsigned long irql;
|
||||
_queue *pqueue;
|
||||
sint ret = _FALSE;
|
||||
sint ret = false;
|
||||
|
||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
||||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == _FALSE)
|
||||
ret = _TRUE;
|
||||
if (_rtw_queue_empty(pqueue) == false)
|
||||
ret = true;
|
||||
|
||||
_exit_critical_bh(&pqueue->lock, &irql);
|
||||
|
||||
|
@ -4838,7 +4838,7 @@ bool rtw_xmit_ac_blocked(_adapter *adapter)
|
|||
_adapter *iface;
|
||||
struct mlme_ext_priv *mlmeext;
|
||||
struct mlme_ext_info *mlmeextinfo;
|
||||
bool blocked = _FALSE;
|
||||
bool blocked = false;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
|
@ -4849,14 +4849,14 @@ bool rtw_xmit_ac_blocked(_adapter *adapter)
|
|||
if (mlmeext_scan_state(mlmeext) != SCAN_DISABLE
|
||||
&& mlmeext_scan_state(mlmeext) != SCAN_BACK_OP
|
||||
) {
|
||||
blocked = _TRUE;
|
||||
blocked = true;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (mlmeext_scan_state(mlmeext) == SCAN_BACK_OP
|
||||
&& !mlmeext_chk_scan_backop_flags(mlmeext, SS_BACKOP_TX_RESUME)
|
||||
) {
|
||||
blocked = _TRUE;
|
||||
blocked = true;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
@ -4865,7 +4865,7 @@ bool rtw_xmit_ac_blocked(_adapter *adapter)
|
|||
if (MCC_EN(adapter)) {
|
||||
if (rtw_hal_check_mcc_status(adapter, MCC_STATUS_DOING_MCC)) {
|
||||
if (MCC_STOP(adapter)) {
|
||||
blocked = _TRUE;
|
||||
blocked = true;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
@ -5067,9 +5067,9 @@ static bool rtw_sctx_chk_waring_status(int status)
|
|||
|
||||
case RTW_SCTX_DONE_DRV_STOP:
|
||||
case RTW_SCTX_DONE_DEV_REMOVE:
|
||||
return _TRUE;
|
||||
return true;
|
||||
default:
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ u8 HalPwrSeqCmdParsing(
|
|||
WLAN_PWR_CFG PwrSeqCmd[])
|
||||
{
|
||||
WLAN_PWR_CFG PwrCfgCmd = {0};
|
||||
u8 bPollingBit = _FALSE;
|
||||
u8 bPollingBit = false;
|
||||
u32 AryIdx = 0;
|
||||
u8 value = 0;
|
||||
u32 offset = 0;
|
||||
|
@ -109,7 +109,7 @@ u8 HalPwrSeqCmdParsing(
|
|||
|
||||
case PWR_CMD_POLLING:
|
||||
|
||||
bPollingBit = _FALSE;
|
||||
bPollingBit = false;
|
||||
offset = GET_PWR_CFG_OFFSET(PwrCfgCmd);
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
|
@ -125,13 +125,13 @@ u8 HalPwrSeqCmdParsing(
|
|||
|
||||
value = value & GET_PWR_CFG_MASK(PwrCfgCmd);
|
||||
if (value == (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd)))
|
||||
bPollingBit = _TRUE;
|
||||
bPollingBit = true;
|
||||
else
|
||||
rtw_udelay_os(10);
|
||||
|
||||
if (pollingCount++ > maxPollingCnt) {
|
||||
RTW_ERR("HalPwrSeqCmdParsing: Fail to polling Offset[%#x]=%02x\n", offset, value);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
} while (!bPollingBit);
|
||||
|
||||
|
@ -146,7 +146,7 @@ u8 HalPwrSeqCmdParsing(
|
|||
|
||||
case PWR_CMD_END:
|
||||
/* When this command is parsed, end the process */
|
||||
return _TRUE;
|
||||
return true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -157,5 +157,5 @@ u8 HalPwrSeqCmdParsing(
|
|||
AryIdx++;/* Add Array Index */
|
||||
} while (1);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
346
hal/hal_btcoex.c
346
hal/hal_btcoex.c
|
@ -214,7 +214,7 @@ typedef struct _btcoexdbginfo {
|
|||
|
||||
BTCDBGINFO GLBtcDbgInfo;
|
||||
|
||||
#define BT_Operation(Adapter) _FALSE
|
||||
#define BT_Operation(Adapter) false
|
||||
|
||||
static void DBG_BT_INFO_INIT(PBTCDBGINFO pinfo, u8 *pbuf, u32 size)
|
||||
{
|
||||
|
@ -257,8 +257,8 @@ static u8 halbtcoutsrc_IsBtCoexistAvailable(PBTC_COEXIST pBtCoexist)
|
|||
{
|
||||
if (!pBtCoexist->bBinded ||
|
||||
NULL == pBtCoexist->Adapter)
|
||||
return _FALSE;
|
||||
return _TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void halbtcoutsrc_DbgInit(void)
|
||||
|
@ -274,8 +274,8 @@ static u8 halbtcoutsrc_IsCsrBtCoex(PBTC_COEXIST pBtCoexist)
|
|||
if (pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC4
|
||||
|| pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC8
|
||||
)
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static u8 halbtcoutsrc_IsHwMailboxExist(PBTC_COEXIST pBtCoexist)
|
||||
|
@ -283,11 +283,11 @@ static u8 halbtcoutsrc_IsHwMailboxExist(PBTC_COEXIST pBtCoexist)
|
|||
if (pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC4
|
||||
|| pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC8
|
||||
)
|
||||
return _FALSE;
|
||||
return false;
|
||||
else if (IS_HARDWARE_TYPE_8812(pBtCoexist->Adapter))
|
||||
return _FALSE;
|
||||
return false;
|
||||
else
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void halbtcoutsrc_LeaveLps(PBTC_COEXIST pBtCoexist)
|
||||
|
@ -297,8 +297,8 @@ static void halbtcoutsrc_LeaveLps(PBTC_COEXIST pBtCoexist)
|
|||
|
||||
padapter = pBtCoexist->Adapter;
|
||||
|
||||
pBtCoexist->bt_info.bt_ctrl_lps = _TRUE;
|
||||
pBtCoexist->bt_info.bt_lps_on = _FALSE;
|
||||
pBtCoexist->bt_info.bt_ctrl_lps = true;
|
||||
pBtCoexist->bt_info.bt_lps_on = false;
|
||||
|
||||
rtw_btcoex_LPS_Leave(padapter);
|
||||
}
|
||||
|
@ -310,9 +310,9 @@ void halbtcoutsrc_EnterLps(PBTC_COEXIST pBtCoexist)
|
|||
|
||||
padapter = pBtCoexist->Adapter;
|
||||
|
||||
if (pBtCoexist->bdontenterLPS == _FALSE) {
|
||||
pBtCoexist->bt_info.bt_ctrl_lps = _TRUE;
|
||||
pBtCoexist->bt_info.bt_lps_on = _TRUE;
|
||||
if (pBtCoexist->bdontenterLPS == false) {
|
||||
pBtCoexist->bt_info.bt_ctrl_lps = true;
|
||||
pBtCoexist->bt_info.bt_lps_on = true;
|
||||
|
||||
rtw_btcoex_LPS_Enter(padapter);
|
||||
}
|
||||
|
@ -327,9 +327,9 @@ void halbtcoutsrc_NormalLps(PBTC_COEXIST pBtCoexist)
|
|||
padapter = pBtCoexist->Adapter;
|
||||
|
||||
if (pBtCoexist->bt_info.bt_ctrl_lps) {
|
||||
pBtCoexist->bt_info.bt_lps_on = _FALSE;
|
||||
pBtCoexist->bt_info.bt_lps_on = false;
|
||||
rtw_btcoex_LPS_Leave(padapter);
|
||||
pBtCoexist->bt_info.bt_ctrl_lps = _FALSE;
|
||||
pBtCoexist->bt_info.bt_ctrl_lps = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ void halbtcoutsrc_LeaveLowPower(PBTC_COEXIST pBtCoexist)
|
|||
timeout = 30;
|
||||
#endif /* !LPS_RPWM_WAIT_MS */
|
||||
|
||||
if (GLBtcBtCoexAliveRegistered == _TRUE)
|
||||
if (GLBtcBtCoexAliveRegistered == true)
|
||||
return;
|
||||
|
||||
stime = rtw_get_current_time();
|
||||
|
@ -375,7 +375,7 @@ void halbtcoutsrc_LeaveLowPower(PBTC_COEXIST pBtCoexist)
|
|||
rtw_msleep_os(1);
|
||||
} while (1);
|
||||
|
||||
GLBtcBtCoexAliveRegistered = _TRUE;
|
||||
GLBtcBtCoexAliveRegistered = true;
|
||||
#endif /* CONFIG_LPS_LCLK */
|
||||
}
|
||||
|
||||
|
@ -388,13 +388,13 @@ void halbtcoutsrc_NormalLowPower(PBTC_COEXIST pBtCoexist)
|
|||
#ifdef CONFIG_LPS_LCLK
|
||||
PADAPTER padapter;
|
||||
|
||||
if (GLBtcBtCoexAliveRegistered == _FALSE)
|
||||
if (GLBtcBtCoexAliveRegistered == false)
|
||||
return;
|
||||
|
||||
padapter = pBtCoexist->Adapter;
|
||||
rtw_unregister_task_alive(padapter, BTCOEX_ALIVE);
|
||||
|
||||
GLBtcBtCoexAliveRegistered = _FALSE;
|
||||
GLBtcBtCoexAliveRegistered = false;
|
||||
#endif /* CONFIG_LPS_LCLK */
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ void halbtcoutsrc_DisableLowPower(PBTC_COEXIST pBtCoexist, u8 bLowPwrDisable)
|
|||
void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist)
|
||||
{
|
||||
PADAPTER padapter;
|
||||
bool bNeedToAct = _FALSE;
|
||||
bool bNeedToAct = false;
|
||||
static u32 preTime = 0;
|
||||
u32 curTime = 0;
|
||||
|
||||
|
@ -429,24 +429,24 @@ void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist)
|
|||
preTime = curTime;
|
||||
|
||||
if (pBtCoexist->bt_info.reject_agg_pkt) {
|
||||
bNeedToAct = _TRUE;
|
||||
bNeedToAct = true;
|
||||
pBtCoexist->bt_info.pre_reject_agg_pkt = pBtCoexist->bt_info.reject_agg_pkt;
|
||||
} else {
|
||||
if (pBtCoexist->bt_info.pre_reject_agg_pkt) {
|
||||
bNeedToAct = _TRUE;
|
||||
bNeedToAct = true;
|
||||
pBtCoexist->bt_info.pre_reject_agg_pkt = pBtCoexist->bt_info.reject_agg_pkt;
|
||||
}
|
||||
|
||||
if (pBtCoexist->bt_info.pre_bt_ctrl_agg_buf_size !=
|
||||
pBtCoexist->bt_info.bt_ctrl_agg_buf_size) {
|
||||
bNeedToAct = _TRUE;
|
||||
bNeedToAct = true;
|
||||
pBtCoexist->bt_info.pre_bt_ctrl_agg_buf_size = pBtCoexist->bt_info.bt_ctrl_agg_buf_size;
|
||||
}
|
||||
|
||||
if (pBtCoexist->bt_info.bt_ctrl_agg_buf_size) {
|
||||
if (pBtCoexist->bt_info.pre_agg_buf_size !=
|
||||
pBtCoexist->bt_info.agg_buf_size)
|
||||
bNeedToAct = _TRUE;
|
||||
bNeedToAct = true;
|
||||
pBtCoexist->bt_info.pre_agg_buf_size = pBtCoexist->bt_info.agg_buf_size;
|
||||
}
|
||||
}
|
||||
|
@ -478,11 +478,11 @@ u8 halbtcoutsrc_is_fw_ready(PBTC_COEXIST pBtCoexist)
|
|||
u8 halbtcoutsrc_IsWifiBusy(PADAPTER padapter)
|
||||
{
|
||||
if (rtw_mi_check_status(padapter, MI_AP_MODE))
|
||||
return _TRUE;
|
||||
if (rtw_mi_busy_traffic_check(padapter, _FALSE))
|
||||
return _TRUE;
|
||||
return true;
|
||||
if (rtw_mi_busy_traffic_check(padapter, false))
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static u32 _halbtcoutsrc_GetWifiLinkStatus(PADAPTER padapter)
|
||||
|
@ -493,22 +493,22 @@ static u32 _halbtcoutsrc_GetWifiLinkStatus(PADAPTER padapter)
|
|||
|
||||
|
||||
pmlmepriv = &padapter->mlmepriv;
|
||||
bp2p = _FALSE;
|
||||
bp2p = false;
|
||||
portConnectedStatus = 0;
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE))
|
||||
bp2p = _TRUE;
|
||||
bp2p = true;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == _TRUE) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) {
|
||||
if (_TRUE == bp2p)
|
||||
if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) {
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||
if (true == bp2p)
|
||||
portConnectedStatus |= WIFI_P2P_GO_CONNECTED;
|
||||
else
|
||||
portConnectedStatus |= WIFI_AP_CONNECTED;
|
||||
} else {
|
||||
if (_TRUE == bp2p)
|
||||
if (true == bp2p)
|
||||
portConnectedStatus |= WIFI_P2P_GC_CONNECTED;
|
||||
else
|
||||
portConnectedStatus |= WIFI_STA_CONNECTED;
|
||||
|
@ -654,7 +654,7 @@ exit:
|
|||
u32 halbtcoutsrc_GetBtPatchVer(PBTC_COEXIST pBtCoexist)
|
||||
{
|
||||
if (pBtCoexist->bt_info.get_bt_fw_ver_cnt <= 5) {
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
|
||||
unsigned long irqL;
|
||||
u8 ret;
|
||||
|
||||
|
@ -675,7 +675,7 @@ u32 halbtcoutsrc_GetBtPatchVer(PBTC_COEXIST pBtCoexist)
|
|||
|
||||
buf[0] = 0x0; /* OP_Code */
|
||||
buf[1] = 0x0; /* OP_Code_Length */
|
||||
BT_SendEventExtBtCoexControl(pBtCoexist->Adapter, _FALSE, dataLen, &buf[0]);
|
||||
BT_SendEventExtBtCoexControl(pBtCoexist->Adapter, false, dataLen, &buf[0]);
|
||||
#endif /* !CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
}
|
||||
}
|
||||
|
@ -704,7 +704,7 @@ u32 halbtcoutsrc_GetBtCoexSupportedFeature(void *pBtcContext)
|
|||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
|
||||
u8 buf[3] = {0};
|
||||
unsigned long irqL;
|
||||
u8 op_code;
|
||||
|
@ -735,7 +735,7 @@ u32 halbtcoutsrc_GetBtCoexSupportedVersion(void *pBtcContext)
|
|||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
|
||||
u8 buf[3] = {0};
|
||||
unsigned long irqL;
|
||||
u8 op_code;
|
||||
|
@ -768,7 +768,7 @@ static u8 halbtcoutsrc_GetWifiScanAPNum(PADAPTER padapter)
|
|||
pmlmepriv = &padapter->mlmepriv;
|
||||
pmlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
if (GLBtcWiFiInScanState == _FALSE) {
|
||||
if (GLBtcWiFiInScanState == false) {
|
||||
if (pmlmepriv->num_of_scanned > 0xFF)
|
||||
scan_AP_num = 0xFF;
|
||||
else
|
||||
|
@ -794,28 +794,28 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
padapter = pBtCoexist->Adapter;
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
mlmeext = &padapter->mlmeextpriv;
|
||||
bSoftApExist = _FALSE;
|
||||
bVwifiExist = _FALSE;
|
||||
bSoftApExist = false;
|
||||
bVwifiExist = false;
|
||||
pu8 = (u8 *)pOutBuf;
|
||||
pS4Tmp = (s32 *)pOutBuf;
|
||||
pU4Tmp = (u32 *)pOutBuf;
|
||||
pU1Tmp = (u8 *)pOutBuf;
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
switch (getType) {
|
||||
case BTC_GET_BL_HS_OPERATION:
|
||||
*pu8 = _FALSE;
|
||||
ret = _FALSE;
|
||||
*pu8 = false;
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_HS_CONNECTING:
|
||||
*pu8 = _FALSE;
|
||||
ret = _FALSE;
|
||||
*pu8 = false;
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_FW_READY:
|
||||
|
@ -823,7 +823,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_CONNECTED:
|
||||
*pu8 = (rtw_mi_check_status(padapter, MI_LINKED)) ? _TRUE : _FALSE;
|
||||
*pu8 = (rtw_mi_check_status(padapter, MI_LINKED)) ? true : false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_BUSY:
|
||||
|
@ -837,49 +837,49 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_LINK:
|
||||
*pu8 = (rtw_mi_check_status(padapter, MI_STA_LINKING)) ? _TRUE : _FALSE;
|
||||
*pu8 = (rtw_mi_check_status(padapter, MI_STA_LINKING)) ? true : false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_ROAM:
|
||||
*pu8 = (rtw_mi_check_status(padapter, MI_STA_LINKING)) ? _TRUE : _FALSE;
|
||||
*pu8 = (rtw_mi_check_status(padapter, MI_STA_LINKING)) ? true : false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_4_WAY_PROGRESS:
|
||||
*pu8 = _FALSE;
|
||||
*pu8 = false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_UNDER_5G:
|
||||
*pu8 = (pHalData->current_band_type == 1) ? _TRUE : _FALSE;
|
||||
*pu8 = (pHalData->current_band_type == 1) ? true : false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_AP_MODE_ENABLE:
|
||||
*pu8 = (rtw_mi_check_status(padapter, MI_AP_MODE)) ? _TRUE : _FALSE;
|
||||
*pu8 = (rtw_mi_check_status(padapter, MI_AP_MODE)) ? true : false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_ENABLE_ENCRYPTION:
|
||||
*pu8 = padapter->securitypriv.dot11PrivacyAlgrthm == 0 ? _FALSE : _TRUE;
|
||||
*pu8 = padapter->securitypriv.dot11PrivacyAlgrthm == 0 ? false : true;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_UNDER_B_MODE:
|
||||
if (mlmeext->cur_wireless_mode == WIRELESS_11B)
|
||||
*pu8 = _TRUE;
|
||||
*pu8 = true;
|
||||
else
|
||||
*pu8 = _FALSE;
|
||||
*pu8 = false;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_IS_IN_MP_MODE:
|
||||
if (padapter->registrypriv.mp_mode == 0)
|
||||
*pu8 = _FALSE;
|
||||
*pu8 = false;
|
||||
else
|
||||
*pu8 = _TRUE;
|
||||
*pu8 = true;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_EXT_SWITCH:
|
||||
*pu8 = _FALSE;
|
||||
*pu8 = false;
|
||||
break;
|
||||
case BTC_GET_BL_IS_ASUS_8723B:
|
||||
/* Always return FALSE in linux driver since this case is added only for windows driver */
|
||||
*pu8 = _FALSE;
|
||||
/* Always return false in linux driver since this case is added only for windows driver */
|
||||
*pu8 = false;
|
||||
break;
|
||||
|
||||
case BTC_GET_S4_WIFI_RSSI:
|
||||
|
@ -888,7 +888,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
|
||||
case BTC_GET_S4_HS_RSSI:
|
||||
*pS4Tmp = 0;
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case BTC_GET_U4_WIFI_BW:
|
||||
|
@ -974,7 +974,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
|
||||
case BTC_GET_U1_WIFI_HS_CHNL:
|
||||
*pU1Tmp = 0;
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case BTC_GET_U1_WIFI_P2P_CHNL:
|
||||
|
@ -1033,7 +1033,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
break;
|
||||
|
||||
default:
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1057,10 +1057,10 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||
pu8 = (u8 *)pInBuf;
|
||||
pU1Tmp = (u8 *)pInBuf;
|
||||
pU4Tmp = (u32 *)pInBuf;
|
||||
ret = _TRUE;
|
||||
ret = true;
|
||||
|
||||
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
switch (setType) {
|
||||
/* set some u8 type variables. */
|
||||
|
@ -1115,7 +1115,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||
|
||||
/* the following are some action which will be triggered */
|
||||
case BTC_SET_ACT_GET_BT_RSSI:
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case BTC_SET_ACT_AGGREGATE_CTRL:
|
||||
|
@ -1156,13 +1156,13 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||
case BTC_SET_ACT_UPDATE_RAMASK:
|
||||
pBtCoexist->bt_info.ra_mask = *pU4Tmp;
|
||||
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE) == _TRUE) {
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE) == true) {
|
||||
struct sta_info *psta;
|
||||
PWLAN_BSSID_EX cur_network;
|
||||
|
||||
cur_network = &padapter->mlmeextpriv.mlmext_info.network;
|
||||
psta = rtw_get_stainfo(&padapter->stapriv, cur_network->MacAddress);
|
||||
rtw_hal_update_ra_mask(psta, psta->rssi_level, _FALSE);
|
||||
rtw_hal_update_ra_mask(psta, psta->rssi_level, false);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1178,7 +1178,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||
else if (*pU1Tmp == 1)
|
||||
newMimoPsMode = WLAN_HT_CAP_SM_PS_DISABLED;
|
||||
|
||||
if (check_fwstate(&padapter->mlmepriv , WIFI_ASOC_STATE) == _TRUE) {
|
||||
if (check_fwstate(&padapter->mlmepriv , WIFI_ASOC_STATE) == true) {
|
||||
/* issue_action_SM_PS(padapter, get_my_bssid(&(pmlmeinfo->network)), newMimoPsMode); */
|
||||
issue_action_SM_PS_wait_ack(padapter , get_my_bssid(&(pmlmeinfo->network)) , newMimoPsMode, 3 , 1);
|
||||
}
|
||||
|
@ -1195,7 +1195,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||
BT_SendEventExtBtInfoControl(padapter, dataLen, &tmpBuf[0]);
|
||||
}
|
||||
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
break;
|
||||
|
||||
|
@ -1206,18 +1206,18 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||
u8 tmpBuf[BTC_TMP_BUF_SHORT];
|
||||
if (dataLen)
|
||||
_rtw_memcpy(tmpBuf, pU1Tmp + 1, dataLen);
|
||||
BT_SendEventExtBtCoexControl(padapter, _FALSE, dataLen, &tmpBuf[0]);
|
||||
BT_SendEventExtBtCoexControl(padapter, false, dataLen, &tmpBuf[0]);
|
||||
}
|
||||
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
break;
|
||||
case BTC_SET_ACT_CTRL_8723B_ANT:
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
/* ===================== */
|
||||
default:
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1232,21 +1232,21 @@ u8 halbtcoutsrc_UnderIps(PBTC_COEXIST pBtCoexist)
|
|||
|
||||
padapter = pBtCoexist->Adapter;
|
||||
pwrpriv = &padapter->dvobj->pwrctl_priv;
|
||||
bMacPwrCtrlOn = _FALSE;
|
||||
bMacPwrCtrlOn = false;
|
||||
|
||||
if ((_TRUE == pwrpriv->bips_processing)
|
||||
if ((true == pwrpriv->bips_processing)
|
||||
&& (IPS_NONE != pwrpriv->ips_mode_req)
|
||||
)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
if (rf_off == pwrpriv->rf_pwrstate)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
|
||||
if (_FALSE == bMacPwrCtrlOn)
|
||||
return _TRUE;
|
||||
if (false == bMacPwrCtrlOn)
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 halbtcoutsrc_UnderLps(PBTC_COEXIST pBtCoexist)
|
||||
|
@ -1257,7 +1257,7 @@ u8 halbtcoutsrc_UnderLps(PBTC_COEXIST pBtCoexist)
|
|||
u8 halbtcoutsrc_Under32K(PBTC_COEXIST pBtCoexist)
|
||||
{
|
||||
/* todo: the method to check whether wifi is under 32K or not */
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void halbtcoutsrc_DisplayCoexStatistics(PBTC_COEXIST pBtCoexist)
|
||||
|
@ -1286,10 +1286,10 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
|
|||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
u8 *cliBuf = pBtCoexist->cli_buf;
|
||||
s32 wifiRssi = 0, btHsRssi = 0;
|
||||
bool bScan = _FALSE, bLink = _FALSE, bRoam = _FALSE, bWifiBusy = _FALSE, bWifiUnderBMode = _FALSE;
|
||||
bool bScan = false, bLink = false, bRoam = false, bWifiBusy = false, bWifiUnderBMode = false;
|
||||
u32 wifiBw = BTC_WIFI_BW_HT20, wifiTrafficDir = BTC_WIFI_TRAFFIC_TX, wifiFreq = BTC_FREQ_2_4G;
|
||||
u32 wifiLinkStatus = 0x0;
|
||||
bool bBtHsOn = _FALSE, bLowPower = _FALSE;
|
||||
bool bBtHsOn = false, bLowPower = false;
|
||||
u8 wifiChnl = 0, wifiP2PChnl = 0, nScanAPNum = 0, FwPSState;
|
||||
u32 iqk_cnt_total = 0, iqk_cnt_ok = 0, iqk_cnt_fail = 0;
|
||||
|
||||
|
@ -1312,7 +1312,7 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
|
|||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_U4_WIFI_IQK_FAIL, &iqk_cnt_fail);
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d %s %s",
|
||||
"IQK All/ OK/ Fail/AutoLoad/FWDL", iqk_cnt_total, iqk_cnt_ok, iqk_cnt_fail,
|
||||
((halbtcoutsrc_is_autoload_fail(pBtCoexist) == _TRUE) ? "fail":"ok"), ((halbtcoutsrc_is_fw_ready(pBtCoexist) == _TRUE) ? "ok":"fail"));
|
||||
((halbtcoutsrc_is_autoload_fail(pBtCoexist) == true) ? "fail":"ok"), ((halbtcoutsrc_is_fw_ready(pBtCoexist) == true) ? "ok":"fail"));
|
||||
CL_PRINTF(cliBuf);
|
||||
|
||||
if (wifiLinkStatus & WIFI_STA_CONNECTED) {
|
||||
|
@ -1342,9 +1342,9 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
|
|||
|
||||
/* power status */
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s%s%s", "Power Status", \
|
||||
((halbtcoutsrc_UnderIps(pBtCoexist) == _TRUE) ? "IPS ON" : "IPS OFF"),
|
||||
((halbtcoutsrc_UnderLps(pBtCoexist) == _TRUE) ? ", LPS ON" : ", LPS OFF"),
|
||||
((halbtcoutsrc_Under32K(pBtCoexist) == _TRUE) ? ", 32k" : ""));
|
||||
((halbtcoutsrc_UnderIps(pBtCoexist) == true) ? "IPS ON" : "IPS OFF"),
|
||||
((halbtcoutsrc_UnderLps(pBtCoexist) == true) ? ", LPS ON" : ", LPS OFF"),
|
||||
((halbtcoutsrc_Under32K(pBtCoexist) == true) ? ", 32k" : ""));
|
||||
CL_PRINTF(cliBuf);
|
||||
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x %02x (0x%x/0x%x)", "Power mode cmd(lps/rpwm)", \
|
||||
|
@ -1547,7 +1547,7 @@ u16 halbtcoutsrc_SetBtReg(void *pBtcContext, u8 RegType, u32 RegAddr, u32 Data)
|
|||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
|
||||
u8 buf[3] = {0};
|
||||
unsigned long irqL;
|
||||
u8 op_code;
|
||||
|
@ -1578,8 +1578,8 @@ u16 halbtcoutsrc_SetBtReg(void *pBtcContext, u8 RegType, u32 RegAddr, u32 Data)
|
|||
|
||||
u8 halbtcoutsrc_SetBtAntDetection(void *pBtcContext, u8 txTime, u8 btChnl)
|
||||
{
|
||||
/* Always return _FALSE since we don't implement this yet */
|
||||
return _FALSE;
|
||||
/* Always return false since we don't implement this yet */
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -1588,8 +1588,8 @@ halbtcoutsrc_SetBtTRXMASK(
|
|||
IN u8 bt_trx_mask
|
||||
)
|
||||
{
|
||||
/* Always return _FALSE since we don't implement this yet */
|
||||
return _FALSE;
|
||||
/* Always return false since we don't implement this yet */
|
||||
return false;
|
||||
}
|
||||
|
||||
u16 halbtcoutsrc_GetBtReg_with_status(void *pBtcContext, u8 RegType, u32 RegAddr, u32 *data)
|
||||
|
@ -1599,7 +1599,7 @@ u16 halbtcoutsrc_GetBtReg_with_status(void *pBtcContext, u8 RegType, u32 RegAddr
|
|||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
|
||||
u8 buf[3] = {0};
|
||||
unsigned long irqL;
|
||||
u8 op_code;
|
||||
|
@ -1762,7 +1762,7 @@ u8 halbtcoutsrc_GetBleScanTypeFromBt(void *pBtcContext)
|
|||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
|
||||
u8 buf[3] = {0};
|
||||
unsigned long irqL;
|
||||
u8 op_code;
|
||||
|
@ -1794,7 +1794,7 @@ u32 halbtcoutsrc_GetBleScanParaFromBt(void *pBtcContext, u8 scanType)
|
|||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
|
||||
u8 buf[3] = {0};
|
||||
unsigned long irqL;
|
||||
u8 op_code;
|
||||
|
@ -1830,8 +1830,8 @@ u8 halbtcoutsrc_GetBtAFHMapFromBt(void *pBtcContext, u8 mapType, u8 *afhMap)
|
|||
u8 status;
|
||||
u32 ret = BT_STATUS_BT_OP_SUCCESS;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _FALSE)
|
||||
return _FALSE;
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == false)
|
||||
return false;
|
||||
|
||||
buf[0] = 0;
|
||||
buf[1] = mapType;
|
||||
|
@ -1869,7 +1869,7 @@ exit:
|
|||
|
||||
_exit_critical_mutex(&GLBtcBtMpOperLock, &irqL);
|
||||
|
||||
return (ret == BT_STATUS_BT_OP_SUCCESS) ? _TRUE : _FALSE;
|
||||
return (ret == BT_STATUS_BT_OP_SUCCESS) ? true : false;
|
||||
}
|
||||
|
||||
u32 halbtcoutsrc_GetPhydmVersion(void *pBtcContext)
|
||||
|
@ -1904,22 +1904,22 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter)
|
|||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA((PADAPTER)padapter);
|
||||
|
||||
if (pBtCoexist->bBinded)
|
||||
return _FALSE;
|
||||
return false;
|
||||
else
|
||||
pBtCoexist->bBinded = _TRUE;
|
||||
pBtCoexist->bBinded = true;
|
||||
|
||||
pBtCoexist->statistics.cnt_bind++;
|
||||
|
||||
pBtCoexist->Adapter = padapter;
|
||||
pBtCoexist->odm_priv = (void *)&(pHalData->odmpriv);
|
||||
|
||||
pBtCoexist->stack_info.profile_notified = _FALSE;
|
||||
pBtCoexist->stack_info.profile_notified = false;
|
||||
|
||||
pBtCoexist->bt_info.bt_ctrl_agg_buf_size = _FALSE;
|
||||
pBtCoexist->bt_info.bt_ctrl_agg_buf_size = false;
|
||||
pBtCoexist->bt_info.agg_buf_size = 5;
|
||||
|
||||
pBtCoexist->bt_info.increase_scan_dev_num = _FALSE;
|
||||
pBtCoexist->bt_info.miracast_plus_bt = _FALSE;
|
||||
pBtCoexist->bt_info.increase_scan_dev_num = false;
|
||||
pBtCoexist->bt_info.miracast_plus_bt = false;
|
||||
|
||||
antNum = rtw_btcoex_get_pg_ant_num((PADAPTER)padapter);
|
||||
EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_PG, antNum);
|
||||
|
@ -1932,7 +1932,7 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter)
|
|||
/* set default antenna position to main port */
|
||||
pBtCoexist->board_info.btdm_ant_pos = BTC_ANTENNA_AT_MAIN_PORT;
|
||||
|
||||
pBtCoexist->board_info.btdm_ant_det_finish = _FALSE;
|
||||
pBtCoexist->board_info.btdm_ant_det_finish = false;
|
||||
pBtCoexist->board_info.btdm_ant_num_by_ant_det = 1;
|
||||
|
||||
pBtCoexist->board_info.tfbga_package = rtw_btcoex_is_tfbga_package_type((PADAPTER)padapter);
|
||||
|
@ -1941,7 +1941,7 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter)
|
|||
|
||||
pBtCoexist->board_info.ant_div_cfg = rtw_btcoex_get_ant_div_cfg((PADAPTER)padapter);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
|
||||
|
@ -1995,15 +1995,15 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
|
|||
|
||||
pBtCoexist->cli_buf = &GLBtcDbgBuf[0];
|
||||
|
||||
GLBtcWiFiInScanState = _FALSE;
|
||||
GLBtcWiFiInScanState = false;
|
||||
|
||||
GLBtcWiFiInIQKState = _FALSE;
|
||||
GLBtcWiFiInIQKState = false;
|
||||
|
||||
GLBtcWiFiInIPS = _FALSE;
|
||||
GLBtcWiFiInIPS = false;
|
||||
|
||||
GLBtcWiFiInLPS = _FALSE;
|
||||
GLBtcWiFiInLPS = false;
|
||||
|
||||
GLBtcBtCoexAliveRegistered = _FALSE;
|
||||
GLBtcBtCoexAliveRegistered = false;
|
||||
|
||||
/* BT Control H2C/C2H*/
|
||||
GLBtcBtMpOperSeq = 0;
|
||||
|
@ -2018,7 +2018,7 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
|
|||
GLBtcBtMpRptWiFiOK = 0;
|
||||
GLBtcBtMpRptBTOK = 0;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void EXhalbtcoutsrc_PowerOnSetting(PBTC_COEXIST pBtCoexist)
|
||||
|
@ -2188,7 +2188,7 @@ void EXhalbtcoutsrc_init_coex_dm(PBTC_COEXIST pBtCoexist)
|
|||
ex_halbtc8821c1ant_init_coex_dm(pBtCoexist);
|
||||
}
|
||||
|
||||
pBtCoexist->initilized = _TRUE;
|
||||
pBtCoexist->initilized = true;
|
||||
}
|
||||
|
||||
void EXhalbtcoutsrc_ips_notify(PBTC_COEXIST pBtCoexist, u8 type)
|
||||
|
@ -2204,10 +2204,10 @@ void EXhalbtcoutsrc_ips_notify(PBTC_COEXIST pBtCoexist, u8 type)
|
|||
|
||||
if (IPS_NONE == type) {
|
||||
ipsType = BTC_IPS_LEAVE;
|
||||
GLBtcWiFiInIPS = _FALSE;
|
||||
GLBtcWiFiInIPS = false;
|
||||
} else {
|
||||
ipsType = BTC_IPS_ENTER;
|
||||
GLBtcWiFiInIPS = _TRUE;
|
||||
GLBtcWiFiInIPS = true;
|
||||
}
|
||||
|
||||
/* All notify is called in cmd thread, don't need to leave low power again
|
||||
|
@ -2270,10 +2270,10 @@ void EXhalbtcoutsrc_lps_notify(PBTC_COEXIST pBtCoexist, u8 type)
|
|||
|
||||
if (PS_MODE_ACTIVE == type) {
|
||||
lpsType = BTC_LPS_DISABLE;
|
||||
GLBtcWiFiInLPS = _FALSE;
|
||||
GLBtcWiFiInLPS = false;
|
||||
} else {
|
||||
lpsType = BTC_LPS_ENABLE;
|
||||
GLBtcWiFiInLPS = _TRUE;
|
||||
GLBtcWiFiInLPS = true;
|
||||
}
|
||||
|
||||
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
|
||||
|
@ -2329,10 +2329,10 @@ void EXhalbtcoutsrc_scan_notify(PBTC_COEXIST pBtCoexist, u8 type)
|
|||
|
||||
if (type) {
|
||||
scanType = BTC_SCAN_START;
|
||||
GLBtcWiFiInScanState = _TRUE;
|
||||
GLBtcWiFiInScanState = true;
|
||||
} else {
|
||||
scanType = BTC_SCAN_FINISH;
|
||||
GLBtcWiFiInScanState = _FALSE;
|
||||
GLBtcWiFiInScanState = false;
|
||||
}
|
||||
|
||||
/* All notify is called in cmd thread, don't need to leave low power again
|
||||
|
@ -2781,21 +2781,21 @@ void EXhalbtcoutsrc_CoexDmSwitch(PBTC_COEXIST pBtCoexist)
|
|||
|
||||
if (IS_HARDWARE_TYPE_8723B(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 1) {
|
||||
pBtCoexist->stop_coex_dm = TRUE;
|
||||
pBtCoexist->stop_coex_dm = true;
|
||||
ex_halbtc8723b1ant_coex_dm_reset(pBtCoexist);
|
||||
EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_DETECTED, 2);
|
||||
ex_halbtc8723b2ant_init_hw_config(pBtCoexist, FALSE);
|
||||
ex_halbtc8723b2ant_init_hw_config(pBtCoexist, false);
|
||||
ex_halbtc8723b2ant_init_coex_dm(pBtCoexist);
|
||||
pBtCoexist->stop_coex_dm = FALSE;
|
||||
pBtCoexist->stop_coex_dm = false;
|
||||
}
|
||||
} else if (IS_HARDWARE_TYPE_8723D(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 1) {
|
||||
pBtCoexist->stop_coex_dm = TRUE;
|
||||
pBtCoexist->stop_coex_dm = true;
|
||||
ex_halbtc8723d1ant_coex_dm_reset(pBtCoexist);
|
||||
EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_DETECTED, 2);
|
||||
ex_halbtc8723d2ant_init_hw_config(pBtCoexist, FALSE);
|
||||
ex_halbtc8723d2ant_init_hw_config(pBtCoexist, false);
|
||||
ex_halbtc8723d2ant_init_coex_dm(pBtCoexist);
|
||||
pBtCoexist->stop_coex_dm = FALSE;
|
||||
pBtCoexist->stop_coex_dm = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2894,41 +2894,41 @@ void EXhalbtcoutsrc_StackUpdateProfileInfo(void)
|
|||
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
|
||||
return;
|
||||
|
||||
pBtCoexist->stack_info.profile_notified = _TRUE;
|
||||
pBtCoexist->stack_info.profile_notified = true;
|
||||
|
||||
pBtCoexist->stack_info.num_of_link =
|
||||
pBtMgnt->ExtConfig.NumberOfACL + pBtMgnt->ExtConfig.NumberOfSCO;
|
||||
|
||||
/* reset first */
|
||||
pBtCoexist->stack_info.bt_link_exist = _FALSE;
|
||||
pBtCoexist->stack_info.sco_exist = _FALSE;
|
||||
pBtCoexist->stack_info.acl_exist = _FALSE;
|
||||
pBtCoexist->stack_info.a2dp_exist = _FALSE;
|
||||
pBtCoexist->stack_info.hid_exist = _FALSE;
|
||||
pBtCoexist->stack_info.bt_link_exist = false;
|
||||
pBtCoexist->stack_info.sco_exist = false;
|
||||
pBtCoexist->stack_info.acl_exist = false;
|
||||
pBtCoexist->stack_info.a2dp_exist = false;
|
||||
pBtCoexist->stack_info.hid_exist = false;
|
||||
pBtCoexist->stack_info.num_of_hid = 0;
|
||||
pBtCoexist->stack_info.pan_exist = _FALSE;
|
||||
pBtCoexist->stack_info.pan_exist = false;
|
||||
|
||||
if (!pBtMgnt->ExtConfig.NumberOfACL)
|
||||
pBtCoexist->stack_info.min_bt_rssi = 0;
|
||||
|
||||
if (pBtCoexist->stack_info.num_of_link) {
|
||||
pBtCoexist->stack_info.bt_link_exist = _TRUE;
|
||||
pBtCoexist->stack_info.bt_link_exist = true;
|
||||
if (pBtMgnt->ExtConfig.NumberOfSCO)
|
||||
pBtCoexist->stack_info.sco_exist = _TRUE;
|
||||
pBtCoexist->stack_info.sco_exist = true;
|
||||
if (pBtMgnt->ExtConfig.NumberOfACL)
|
||||
pBtCoexist->stack_info.acl_exist = _TRUE;
|
||||
pBtCoexist->stack_info.acl_exist = true;
|
||||
}
|
||||
|
||||
for (i = 0; i < pBtMgnt->ExtConfig.NumberOfACL; i++) {
|
||||
if (BT_PROFILE_A2DP == pBtMgnt->ExtConfig.aclLink[i].BTProfile)
|
||||
pBtCoexist->stack_info.a2dp_exist = _TRUE;
|
||||
pBtCoexist->stack_info.a2dp_exist = true;
|
||||
else if (BT_PROFILE_PAN == pBtMgnt->ExtConfig.aclLink[i].BTProfile)
|
||||
pBtCoexist->stack_info.pan_exist = _TRUE;
|
||||
pBtCoexist->stack_info.pan_exist = true;
|
||||
else if (BT_PROFILE_HID == pBtMgnt->ExtConfig.aclLink[i].BTProfile) {
|
||||
pBtCoexist->stack_info.hid_exist = _TRUE;
|
||||
pBtCoexist->stack_info.hid_exist = true;
|
||||
pBtCoexist->stack_info.num_of_hid++;
|
||||
} else
|
||||
pBtCoexist->stack_info.unknown_acl_exist = _TRUE;
|
||||
pBtCoexist->stack_info.unknown_acl_exist = true;
|
||||
}
|
||||
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
}
|
||||
|
@ -3086,7 +3086,7 @@ void ex_halbtcoutsrc_pta_off_on_notify(PBTC_COEXIST pBtCoexist, u8 bBTON)
|
|||
{
|
||||
if (IS_HARDWARE_TYPE_8812(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 2)
|
||||
ex_halbtc8812a2ant_pta_off_on_notify(pBtCoexist, (bBTON == _TRUE) ? BTC_BT_ON : BTC_BT_OFF);
|
||||
ex_halbtc8812a2ant_pta_off_on_notify(pBtCoexist, (bBTON == true) ? BTC_BT_ON : BTC_BT_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3187,8 +3187,8 @@ void hal_btcoex_SetBTCoexist(PADAPTER padapter, u8 bBtExist)
|
|||
* Check is co-exist mechanism enabled or not
|
||||
*
|
||||
* Return:
|
||||
* _TRUE Enable BT co-exist mechanism
|
||||
* _FALSE Disable BT co-exist mechanism
|
||||
* true Enable BT co-exist mechanism
|
||||
* false Disable BT co-exist mechanism
|
||||
*/
|
||||
u8 hal_btcoex_IsBtExist(PADAPTER padapter)
|
||||
{
|
||||
|
@ -3202,12 +3202,12 @@ u8 hal_btcoex_IsBtExist(PADAPTER padapter)
|
|||
u8 hal_btcoex_IsBtDisabled(PADAPTER padapter)
|
||||
{
|
||||
if (!hal_btcoex_IsBtExist(padapter))
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
if (GLBtCoexist.bt_info.bt_disabled)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void hal_btcoex_SetChipType(PADAPTER padapter, u8 chipType)
|
||||
|
@ -3299,7 +3299,7 @@ void hal_btcoex_IQKNotify(PADAPTER padapter, u8 state)
|
|||
|
||||
void hal_btcoex_BtInfoNotify(PADAPTER padapter, u8 length, u8 *tmpBuf)
|
||||
{
|
||||
if (GLBtcWiFiInIQKState == _TRUE)
|
||||
if (GLBtcWiFiInIQKState == true)
|
||||
return;
|
||||
|
||||
EXhalbtcoutsrc_bt_info_notify(&GLBtCoexist, tmpBuf, length);
|
||||
|
@ -3366,7 +3366,7 @@ void hal_btcoex_HaltNotify(PADAPTER padapter, u8 do_halt)
|
|||
if (do_halt == 1)
|
||||
EXhalbtcoutsrc_halt_notify(&GLBtCoexist);
|
||||
|
||||
GLBtCoexist.bBinded = _FALSE;
|
||||
GLBtCoexist.bBinded = false;
|
||||
GLBtCoexist.Adapter = NULL;
|
||||
}
|
||||
|
||||
|
@ -3409,47 +3409,47 @@ void hal_btcoex_SetManualControl(PADAPTER padapter, u8 bmanual)
|
|||
|
||||
u8 hal_btcoex_1Ant(PADAPTER padapter)
|
||||
{
|
||||
if (hal_btcoex_IsBtExist(padapter) == _FALSE)
|
||||
return _FALSE;
|
||||
if (hal_btcoex_IsBtExist(padapter) == false)
|
||||
return false;
|
||||
|
||||
if (GLBtCoexist.board_info.btdm_ant_num == 1)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 hal_btcoex_IsBtControlLps(PADAPTER padapter)
|
||||
{
|
||||
if (GLBtCoexist.bdontenterLPS == _TRUE)
|
||||
return _TRUE;
|
||||
if (GLBtCoexist.bdontenterLPS == true)
|
||||
return true;
|
||||
|
||||
if (hal_btcoex_IsBtExist(padapter) == _FALSE)
|
||||
return _FALSE;
|
||||
if (hal_btcoex_IsBtExist(padapter) == false)
|
||||
return false;
|
||||
|
||||
if (GLBtCoexist.bt_info.bt_disabled)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (GLBtCoexist.bt_info.bt_ctrl_lps)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 hal_btcoex_IsLpsOn(PADAPTER padapter)
|
||||
{
|
||||
if (GLBtCoexist.bdontenterLPS == _TRUE)
|
||||
return _FALSE;
|
||||
if (GLBtCoexist.bdontenterLPS == true)
|
||||
return false;
|
||||
|
||||
if (hal_btcoex_IsBtExist(padapter) == _FALSE)
|
||||
return _FALSE;
|
||||
if (hal_btcoex_IsBtExist(padapter) == false)
|
||||
return false;
|
||||
|
||||
if (GLBtCoexist.bt_info.bt_disabled)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (GLBtCoexist.bt_info.bt_lps_on)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 hal_btcoex_RpwmVal(PADAPTER padapter)
|
||||
|
@ -3551,20 +3551,20 @@ exit:
|
|||
u8 hal_btcoex_IncreaseScanDeviceNum(PADAPTER padapter)
|
||||
{
|
||||
if (!hal_btcoex_IsBtExist(padapter))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (GLBtCoexist.bt_info.increase_scan_dev_num)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 hal_btcoex_IsBtLinkExist(PADAPTER padapter)
|
||||
{
|
||||
if (GLBtCoexist.bt_link_info.bt_link_exist)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void hal_btcoex_SetBtPatchVersion(PADAPTER padapter, u16 btHciVer, u16 btPatchVer)
|
||||
|
@ -3735,7 +3735,7 @@ hal_btcoex_AntIsolationConfig_ParaFile(
|
|||
memset(pHalData->para_file_buf , 0 , MAX_PARA_FILE_BUF_LEN);
|
||||
|
||||
rtw_get_phy_file_path(Adapter, pFileName);
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == true) {
|
||||
rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
|
||||
if (rlen > 0)
|
||||
rtStatus = _SUCCESS;
|
||||
|
|
|
@ -90,19 +90,19 @@ void halwifionly_phy_set_bb_reg(void * pwifionlyContext, u32 RegAddr, u32 BitMas
|
|||
void hal_btcoex_wifionly_switchband_notify(PADAPTER padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
u8 is_5g = _FALSE;
|
||||
u8 is_5g = false;
|
||||
|
||||
if (pHalData->current_band_type == BAND_ON_5G)
|
||||
is_5g = _TRUE;
|
||||
is_5g = true;
|
||||
}
|
||||
|
||||
void hal_btcoex_wifionly_scan_notify(PADAPTER padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
u8 is_5g = _FALSE;
|
||||
u8 is_5g = false;
|
||||
|
||||
if (pHalData->current_band_type == BAND_ON_5G)
|
||||
is_5g = _TRUE;
|
||||
is_5g = true;
|
||||
}
|
||||
|
||||
void hal_btcoex_wifionly_hw_config(PADAPTER padapter)
|
||||
|
|
422
hal/hal_com.c
422
hal/hal_com.c
File diff suppressed because it is too large
Load diff
|
@ -778,7 +778,7 @@ void hal_load_txpwr_info(
|
|||
u8 rfpath, ch_idx, group, tx_idx;
|
||||
|
||||
/* load from pg data (or default value) */
|
||||
hal_load_pg_txpwr_info(adapter, pwr_info_2g, pwr_info_5g, pg_data, _FALSE);
|
||||
hal_load_pg_txpwr_info(adapter, pwr_info_2g, pwr_info_5g, pg_data, false);
|
||||
|
||||
/* transform to hal_data */
|
||||
for (rfpath = 0; rfpath < MAX_RF_PATH; rfpath++) {
|
||||
|
@ -1115,14 +1115,14 @@ static bool rtw_regsty_chk_target_tx_power_valid(_adapter *adapter)
|
|||
|
||||
target = rtw_regsty_get_target_tx_power(adapter, band, path, rs);
|
||||
if (target == -1) {
|
||||
RTW_PRINT("%s return _FALSE for band:%d, path:%d, rs:%d, t:%d\n", __func__, band, path, rs, target);
|
||||
return _FALSE;
|
||||
RTW_PRINT("%s return false for band:%d, path:%d, rs:%d, t:%d\n", __func__, band, path, rs, target);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1220,7 +1220,7 @@ static inline bool phy_is_txpwr_by_rate_undefined_of_band_path(_adapter *adapter
|
|||
}
|
||||
|
||||
exit:
|
||||
return (tx_num >= hal_spec->max_tx_cnt || tx_num >= hal_spec->tx_nss_num) ? _TRUE : _FALSE;
|
||||
return (tx_num >= hal_spec->max_tx_cnt || tx_num >= hal_spec->tx_nss_num) ? true : false;
|
||||
}
|
||||
|
||||
static inline void phy_txpwr_by_rate_duplicate_band_path(_adapter *adapter, u8 band, u8 s_path, u8 t_path)
|
||||
|
@ -1333,7 +1333,7 @@ phy_StoreTxPowerByRateBase(
|
|||
if (IS_VHT_RATE_SECTION(rs))
|
||||
continue;
|
||||
|
||||
if (regsty->target_tx_pwr_valid == _TRUE)
|
||||
if (regsty->target_tx_pwr_valid == true)
|
||||
base = 2 * rtw_regsty_get_target_tx_power(pAdapter, band, path, rs);
|
||||
else
|
||||
base = _PHY_GetTxPowerByRate(pAdapter, band, path, tx_num, rate_sec_base[rs]);
|
||||
|
@ -1952,13 +1952,13 @@ exit:
|
|||
static bool phy_GetChnlIndex(u8 Channel, u8 *ChannelIdx)
|
||||
{
|
||||
u8 i = 0;
|
||||
bool bIn24G = _TRUE;
|
||||
bool bIn24G = true;
|
||||
|
||||
if (Channel <= 14) {
|
||||
bIn24G = _TRUE;
|
||||
bIn24G = true;
|
||||
*ChannelIdx = Channel - 1;
|
||||
} else {
|
||||
bIn24G = _FALSE;
|
||||
bIn24G = false;
|
||||
|
||||
for (i = 0; i < CENTER_CH_5G_ALL_NUM; ++i) {
|
||||
if (center_ch_5g_all[i] == Channel) {
|
||||
|
@ -1987,7 +1987,7 @@ PHY_GetTxPowerIndexBase(
|
|||
u8 txPower = 0;
|
||||
u8 chnlIdx = (Channel - 1);
|
||||
|
||||
if (HAL_IsLegalChannel(pAdapter, Channel) == _FALSE) {
|
||||
if (HAL_IsLegalChannel(pAdapter, Channel) == false) {
|
||||
chnlIdx = 0;
|
||||
RTW_INFO("Illegal channel!!\n");
|
||||
}
|
||||
|
@ -2143,7 +2143,7 @@ PHY_GetTxPowerTrackingOffset(
|
|||
struct PHY_DM_STRUCT *pDM_Odm = &pHalData->odmpriv;
|
||||
s8 offset = 0;
|
||||
|
||||
if (pDM_Odm->rf_calibrate_info.txpowertrack_control == _FALSE)
|
||||
if (pDM_Odm->rf_calibrate_info.txpowertrack_control == false)
|
||||
return offset;
|
||||
|
||||
if ((Rate == MGN_1M) || (Rate == MGN_2M) || (Rate == MGN_5_5M) || (Rate == MGN_11M)) {
|
||||
|
@ -2722,7 +2722,7 @@ static s8 _phy_get_txpwr_lmt(
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (no_sc == _TRUE) {
|
||||
if (no_sc == true) {
|
||||
/* use the input center channel and bandwidth directly */
|
||||
cch = Channel;
|
||||
bw_bmp = ch_width_to_bw_cap(Bandwidth);
|
||||
|
@ -2755,7 +2755,7 @@ static s8 _phy_get_txpwr_lmt(
|
|||
if (!(ch_width_to_bw_cap(bw) & bw_bmp))
|
||||
continue;
|
||||
|
||||
if (no_sc == _FALSE) {
|
||||
if (no_sc == false) {
|
||||
if (bw == CHANNEL_WIDTH_20)
|
||||
cch = hal_data->cch_20;
|
||||
else if (bw == CHANNEL_WIDTH_40)
|
||||
|
@ -2816,11 +2816,11 @@ PHY_GetTxPowerLimit(
|
|||
u8 Channel
|
||||
)
|
||||
{
|
||||
bool no_sc = _FALSE;
|
||||
bool no_sc = false;
|
||||
|
||||
/* MP mode channel don't use secondary channel */
|
||||
if (rtw_mi_mp_mode_check(Adapter) == _TRUE)
|
||||
no_sc = _TRUE;
|
||||
if (rtw_mi_mp_mode_check(Adapter) == true)
|
||||
no_sc = true;
|
||||
|
||||
return _phy_get_txpwr_lmt(Adapter, RegPwrTblSel, Band, Bandwidth, RfPath, DataRate, Channel, no_sc);
|
||||
}
|
||||
|
@ -2836,7 +2836,7 @@ PHY_GetTxPowerLimit_no_sc(
|
|||
u8 Channel
|
||||
)
|
||||
{
|
||||
return _phy_get_txpwr_lmt(Adapter, RegPwrTblSel, Band, Bandwidth, RfPath, DataRate, Channel, _TRUE);
|
||||
return _phy_get_txpwr_lmt(Adapter, RegPwrTblSel, Band, Bandwidth, RfPath, DataRate, Channel, true);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PHYDM_POWERTRACK_BY_TSSI
|
||||
|
@ -3281,8 +3281,8 @@ phy_set_tx_power_limit(
|
|||
RTW_INFO("Index of power limit table [band %s][regulation %s][bw %s][rate section %s][rf path %s][chnl %s][val %s]\n"
|
||||
, Band, Regulation, Bandwidth, RateSection, RfPath, Channel, PowerLimit);
|
||||
|
||||
if (GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel) == _FALSE
|
||||
|| GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit) == _FALSE
|
||||
if (GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel) == false
|
||||
|| GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit) == false
|
||||
) {
|
||||
RTW_PRINT("Illegal index of power limit table [ch %s][val %s]\n", Channel, PowerLimit);
|
||||
return;
|
||||
|
@ -3484,8 +3484,8 @@ bool phy_is_tx_power_limit_needed(_adapter *adapter)
|
|||
|
||||
if (regsty->RegEnableTxPowerLimit == 1
|
||||
|| (regsty->RegEnableTxPowerLimit == 2 && hal_data->EEPROMRegulatory == 1))
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool phy_is_tx_power_by_rate_needed(_adapter *adapter)
|
||||
|
@ -3495,8 +3495,8 @@ bool phy_is_tx_power_by_rate_needed(_adapter *adapter)
|
|||
|
||||
if (regsty->RegEnableTxPowerByRate == 1
|
||||
|| (regsty->RegEnableTxPowerByRate == 2 && hal_data->EEPROMRegulatory != 2))
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int phy_load_tx_power_by_rate(_adapter *adapter, u8 chk_file)
|
||||
|
@ -3555,7 +3555,7 @@ int phy_load_tx_power_limit(_adapter *adapter, u8 chk_file)
|
|||
hal_data->txpwr_limit_loaded = 0;
|
||||
PHY_InitTxPowerLimit(adapter);
|
||||
|
||||
if (!hal_data->txpwr_by_rate_loaded && regsty->target_tx_pwr_valid != _TRUE) {
|
||||
if (!hal_data->txpwr_by_rate_loaded && regsty->target_tx_pwr_valid != true) {
|
||||
RTW_ERR("%s():Read Tx power limit before target tx power is specify\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -3598,7 +3598,7 @@ void phy_load_tx_power_ext_info(_adapter *adapter, u8 chk_file)
|
|||
|
||||
/* power by rate and limit */
|
||||
if (phy_is_tx_power_by_rate_needed(adapter)
|
||||
|| (phy_is_tx_power_limit_needed(adapter) && regsty->target_tx_pwr_valid != _TRUE)
|
||||
|| (phy_is_tx_power_limit_needed(adapter) && regsty->target_tx_pwr_valid != true)
|
||||
)
|
||||
phy_load_tx_power_by_rate(adapter, chk_file);
|
||||
|
||||
|
@ -3621,7 +3621,7 @@ void dump_tx_power_ext_info(void *sel, _adapter *adapter)
|
|||
struct registry_priv *regsty = adapter_to_regsty(adapter);
|
||||
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter);
|
||||
|
||||
if (regsty->target_tx_pwr_valid == _TRUE)
|
||||
if (regsty->target_tx_pwr_valid == true)
|
||||
RTW_PRINT_SEL(sel, "target_tx_power: from registry\n");
|
||||
else if (phy_is_tx_power_by_rate_needed(adapter))
|
||||
RTW_PRINT_SEL(sel, "target_tx_power: from power by rate\n");
|
||||
|
@ -3658,7 +3658,7 @@ void dump_target_tx_power(void *sel, _adapter *adapter)
|
|||
break;
|
||||
|
||||
RTW_PRINT_SEL(sel, "[%s][%c]%s\n", band_str(band), rf_path_char(path)
|
||||
, (regsty->target_tx_pwr_valid == _FALSE && hal_data->txpwr_by_rate_undefined_band_path[band][path]) ? "(dup)" : "");
|
||||
, (regsty->target_tx_pwr_valid == false && hal_data->txpwr_by_rate_undefined_band_path[band][path]) ? "(dup)" : "");
|
||||
|
||||
for (rs = 0; rs < RATE_SECTION_NUM; rs++) {
|
||||
tx_num = rate_section_to_tx_num(rs);
|
||||
|
@ -3936,10 +3936,10 @@ int rtw_get_phy_file_path(_adapter *adapter, const char *file_name)
|
|||
#endif
|
||||
len += snprintf(rtw_phy_para_file_path + len, PATH_LENGTH_MAX - len, "%s", file_name);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
|
@ -3961,7 +3961,7 @@ phy_ConfigMACWithParaFile(
|
|||
|
||||
if ((pHalData->mac_reg_len == 0) && (pHalData->mac_reg == NULL)) {
|
||||
rtw_get_phy_file_path(Adapter, pFileName);
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == true) {
|
||||
rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
|
||||
if (rlen > 0) {
|
||||
rtStatus = _SUCCESS;
|
||||
|
@ -4040,7 +4040,7 @@ phy_ConfigBBWithParaFile(
|
|||
|
||||
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) {
|
||||
rtw_get_phy_file_path(Adapter, pFileName);
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == true) {
|
||||
rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
|
||||
if (rlen > 0) {
|
||||
rtStatus = _SUCCESS;
|
||||
|
@ -4157,7 +4157,7 @@ static int phy_ParseBBPgParaFile(PADAPTER Adapter, char *buffer)
|
|||
char *szLine, *ptmp;
|
||||
u32 u4bRegOffset, u4bRegMask, u4bRegValue;
|
||||
u32 u4bMove;
|
||||
bool firstLine = _TRUE;
|
||||
bool firstLine = true;
|
||||
u8 tx_num = 0;
|
||||
u8 band = 0, rf_path = 0;
|
||||
|
||||
|
@ -4189,12 +4189,12 @@ static int phy_ParseBBPgParaFile(PADAPTER Adapter, char *buffer)
|
|||
if (eqNByte(szLine + 5, (u8 *)("[Exact]#"), 8)) {
|
||||
pHalData->odmpriv.phy_reg_pg_value_type = PHY_REG_PG_EXACT_VALUE;
|
||||
/* RTW_INFO("The values in PHY_REG_PG are exact values ok\n"); */
|
||||
firstLine = _FALSE;
|
||||
firstLine = false;
|
||||
continue;
|
||||
} else if (eqNByte(szLine + 5, (u8 *)("[Relative]#"), 11)) {
|
||||
pHalData->odmpriv.phy_reg_pg_value_type = PHY_REG_PG_RELATIVE_VALUE;
|
||||
/* RTW_INFO("The values in PHY_REG_PG are relative values ok\n"); */
|
||||
firstLine = _FALSE;
|
||||
firstLine = false;
|
||||
continue;
|
||||
} else {
|
||||
RTW_INFO("The values in PHY_REG_PG are invalid %s\n", szLine);
|
||||
|
@ -4418,7 +4418,7 @@ phy_ConfigBBWithPgParaFile(
|
|||
|
||||
if (pHalData->bb_phy_reg_pg == NULL) {
|
||||
rtw_get_phy_file_path(Adapter, pFileName);
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == true) {
|
||||
rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
|
||||
if (rlen > 0) {
|
||||
rtStatus = _SUCCESS;
|
||||
|
@ -4467,7 +4467,7 @@ phy_ConfigBBWithMpParaFile(
|
|||
|
||||
if ((pHalData->bb_phy_reg_mp_len == 0) && (pHalData->bb_phy_reg_mp == NULL)) {
|
||||
rtw_get_phy_file_path(Adapter, pFileName);
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == true) {
|
||||
rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
|
||||
if (rlen > 0) {
|
||||
rtStatus = _SUCCESS;
|
||||
|
@ -4571,7 +4571,7 @@ PHY_ConfigRFWithParaFile(
|
|||
|
||||
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) {
|
||||
rtw_get_phy_file_path(Adapter, pFileName);
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == true) {
|
||||
rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
|
||||
if (rlen > 0) {
|
||||
rtStatus = _SUCCESS;
|
||||
|
@ -4766,7 +4766,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
|
|||
|
||||
if ((pHalData->rf_tx_pwr_track_len == 0) && (pHalData->rf_tx_pwr_track == NULL)) {
|
||||
rtw_get_phy_file_path(Adapter, pFileName);
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == true) {
|
||||
rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
|
||||
if (rlen > 0) {
|
||||
rtStatus = _SUCCESS;
|
||||
|
@ -5083,7 +5083,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile(
|
|||
|
||||
if (pHalData->rf_tx_pwr_lmt == NULL) {
|
||||
rtw_get_phy_file_path(Adapter, pFileName);
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == _TRUE) {
|
||||
if (rtw_is_file_readable(rtw_phy_para_file_path) == true) {
|
||||
rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
|
||||
if (rlen > 0) {
|
||||
rtStatus = _SUCCESS;
|
||||
|
|
|
@ -158,9 +158,9 @@ void Init_ODM_ComInfo(_adapter *adapter)
|
|||
|
||||
/*Add by YuChen for adaptivity init*/
|
||||
odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_ADAPTIVITY, &(adapter->registrypriv.adaptivity_en));
|
||||
phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_CARRIER_SENSE_ENABLE, (adapter->registrypriv.adaptivity_mode != 0) ? TRUE : FALSE);
|
||||
phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_CARRIER_SENSE_ENABLE, (adapter->registrypriv.adaptivity_mode != 0) ? true : false);
|
||||
phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_DCBACKOFF, adapter->registrypriv.adaptivity_dc_backoff);
|
||||
phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_DYNAMICLINKADAPTIVITY, (adapter->registrypriv.adaptivity_dml != 0) ? TRUE : FALSE);
|
||||
phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_DYNAMICLINKADAPTIVITY, (adapter->registrypriv.adaptivity_dml != 0) ? true : false);
|
||||
phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_TH_L2H_INI, adapter->registrypriv.adaptivity_th_l2h_ini);
|
||||
phydm_adaptivity_info_init(pDM_Odm, PHYDM_ADAPINFO_TH_EDCCA_HL_DIFF, adapter->registrypriv.adaptivity_th_edcca_hl_diff);
|
||||
|
||||
|
@ -197,6 +197,6 @@ void Init_ODM_ComInfo(_adapter *adapter)
|
|||
phydm_init_debug_setting(pDM_Odm);
|
||||
|
||||
/* TODO */
|
||||
/* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_OPERATION, _FALSE); */
|
||||
/* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_DISABLE_EDCA, _FALSE); */
|
||||
/* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_OPERATION, false); */
|
||||
/* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_DISABLE_EDCA, false); */
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ void rtw_hal_init_opmode(_adapter *padapter)
|
|||
else
|
||||
return;
|
||||
|
||||
rtw_setopmode_cmd(padapter, networkType, _FALSE);
|
||||
rtw_setopmode_cmd(padapter, networkType, false);
|
||||
}
|
||||
|
||||
uint rtw_hal_init(_adapter *padapter)
|
||||
|
@ -210,7 +210,7 @@ uint rtw_hal_init(_adapter *padapter)
|
|||
status = padapter->hal_func.hal_init(padapter);
|
||||
|
||||
if (status == _SUCCESS) {
|
||||
pHalData->hw_init_completed = _TRUE;
|
||||
pHalData->hw_init_completed = true;
|
||||
rtw_restore_mac_addr(padapter);
|
||||
|
||||
if (padapter->registrypriv.notch_filter == 1)
|
||||
|
@ -230,7 +230,7 @@ uint rtw_hal_init(_adapter *padapter)
|
|||
#endif /*CONFIG_RF_POWER_TRIM*/
|
||||
|
||||
} else {
|
||||
pHalData->hw_init_completed = _FALSE;
|
||||
pHalData->hw_init_completed = false;
|
||||
RTW_INFO("rtw_hal_init: hal_init fail\n");
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ uint rtw_hal_deinit(_adapter *padapter)
|
|||
|
||||
if (status == _SUCCESS) {
|
||||
rtw_led_control(padapter, LED_CTL_POWER_OFF);
|
||||
pHalData->hw_init_completed = _FALSE;
|
||||
pHalData->hw_init_completed = false;
|
||||
} else
|
||||
RTW_INFO("\n rtw_hal_deinit: hal_init fail\n");
|
||||
|
||||
|
@ -298,7 +298,7 @@ void rtw_hal_disable_interrupt(_adapter *padapter)
|
|||
|
||||
u8 rtw_hal_check_ips_status(_adapter *padapter)
|
||||
{
|
||||
u8 val = _FALSE;
|
||||
u8 val = false;
|
||||
if (padapter->hal_func.check_ips_status)
|
||||
val = padapter->hal_func.check_ips_status(padapter);
|
||||
else
|
||||
|
@ -370,18 +370,18 @@ s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe)
|
|||
/* _rtw_memcpy(pmgntframe->attrib.ra, pwlanhdr->addr1, ETH_ALEN); */
|
||||
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
if (padapter->securitypriv.binstallBIPkey == _TRUE && (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC ||
|
||||
if (padapter->securitypriv.binstallBIPkey == true && (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC ||
|
||||
subtype == WIFI_ACTION)) {
|
||||
if (IS_MCAST(pmgntframe->attrib.ra) && pmgntframe->attrib.key_type != IEEE80211W_NO_KEY) {
|
||||
pmgntframe->attrib.encrypt = _BIP_;
|
||||
/* pmgntframe->attrib.bswenc = _TRUE; */
|
||||
/* pmgntframe->attrib.bswenc = true; */
|
||||
} else if (pmgntframe->attrib.key_type != IEEE80211W_NO_KEY) {
|
||||
psta = rtw_get_stainfo(pstapriv, pmgntframe->attrib.ra);
|
||||
if (psta && psta->bpairwise_key_installed == _TRUE) {
|
||||
if (psta && psta->bpairwise_key_installed == true) {
|
||||
pmgntframe->attrib.encrypt = _AES_;
|
||||
pmgntframe->attrib.bswenc = _TRUE;
|
||||
pmgntframe->attrib.bswenc = true;
|
||||
} else {
|
||||
RTW_INFO("%s, %d, bpairwise_key_installed is FALSE\n", __func__, __LINE__);
|
||||
RTW_INFO("%s, %d, bpairwise_key_installed is false\n", __func__, __LINE__);
|
||||
goto no_mgmt_coalesce;
|
||||
}
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ void rtw_update_ramask(_adapter *padapter, struct sta_info *psta, u32 mac_id, u8
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter);
|
||||
u8 disable_cck_rate = FALSE, MimoPs_enable = FALSE;
|
||||
u8 disable_cck_rate = false, MimoPs_enable = false;
|
||||
u32 ratr_bitmap_msb = 0, ratr_bitmap_lsb = 0;
|
||||
u64 mask = 0, rate_bitmap = 0;
|
||||
u8 bw, short_gi;
|
||||
|
@ -497,7 +497,7 @@ void rtw_hal_update_ra_mask(struct sta_info *psta, u8 rssi_level, u8 is_update_b
|
|||
|
||||
pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
add_RATid(padapter, psta, rssi_level, is_update_bw);
|
||||
else {
|
||||
psta->raid = rtw_hal_networktype_to_raid(padapter, psta);
|
||||
|
@ -574,12 +574,12 @@ void rtw_hal_set_chnl_bw(_adapter *padapter, u8 channel, CHANNEL_WIDTH Bandwidth
|
|||
u8 cch_20 = Bandwidth == CHANNEL_WIDTH_20 ? channel : 0;
|
||||
|
||||
odm_acquire_spin_lock(pDM_Odm, RT_IQK_SPINLOCK);
|
||||
if (pDM_Odm->rf_calibrate_info.is_iqk_in_progress == _TRUE)
|
||||
if (pDM_Odm->rf_calibrate_info.is_iqk_in_progress == true)
|
||||
RTW_ERR("%s, %d, IQK may race condition\n", __func__, __LINE__);
|
||||
odm_release_spin_lock(pDM_Odm, RT_IQK_SPINLOCK);
|
||||
|
||||
/* MP mode channel don't use secondary channel */
|
||||
if (rtw_mi_mp_mode_check(padapter) == _FALSE) {
|
||||
if (rtw_mi_mp_mode_check(padapter) == false) {
|
||||
if (cch_80 != 0)
|
||||
cch_40 = rtw_get_scch_by_cch_offset(cch_80, CHANNEL_WIDTH_80, Offset80);
|
||||
if (cch_40 != 0)
|
||||
|
@ -633,7 +633,7 @@ void rtw_hal_dm_watchdog_in_lps(_adapter *padapter)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == _TRUE) {
|
||||
if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true) {
|
||||
padapter->hal_func.hal_dm_watchdog_in_lps(padapter);/* this function caller is in interrupt context */
|
||||
}
|
||||
}
|
||||
|
@ -847,7 +847,7 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload)
|
|||
/* no handle, goto default */
|
||||
|
||||
default:
|
||||
if (phydm_c2H_content_parsing(odm, id, plen, payload) != TRUE)
|
||||
if (phydm_c2H_content_parsing(odm, id, plen, payload) != true)
|
||||
ret = _FAIL;
|
||||
break;
|
||||
}
|
||||
|
@ -886,9 +886,9 @@ s32 rtw_hal_c2h_id_handle_directly(_adapter *adapter, u8 id, u8 seq, u8 plen, u8
|
|||
case C2H_BCN_EARLY_RPT:
|
||||
case C2H_AP_REQ_TXRPT:
|
||||
case C2H_SPC_STAT:
|
||||
return _TRUE;
|
||||
return true;
|
||||
default:
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif /* !RTW_HALMAC */
|
||||
|
@ -904,9 +904,9 @@ s32 rtw_hal_macid_sleep(PADAPTER padapter, u8 macid)
|
|||
struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj);
|
||||
u8 support;
|
||||
|
||||
support = _FALSE;
|
||||
support = false;
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support);
|
||||
if (_FALSE == support)
|
||||
if (false == support)
|
||||
return _FAIL;
|
||||
|
||||
if (macid >= macid_ctl->num) {
|
||||
|
@ -926,9 +926,9 @@ s32 rtw_hal_macid_wakeup(PADAPTER padapter, u8 macid)
|
|||
struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj);
|
||||
u8 support;
|
||||
|
||||
support = _FALSE;
|
||||
support = false;
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support);
|
||||
if (_FALSE == support)
|
||||
if (false == support)
|
||||
return _FAIL;
|
||||
|
||||
if (macid >= macid_ctl->num) {
|
||||
|
@ -946,7 +946,7 @@ s32 rtw_hal_fill_h2c_cmd(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBu
|
|||
{
|
||||
_adapter *pri_adapter = GET_PRIMARY_ADAPTER(padapter);
|
||||
|
||||
if (pri_adapter->bFWReady == _TRUE)
|
||||
if (pri_adapter->bFWReady == true)
|
||||
return padapter->hal_func.fill_h2c_cmd(padapter, ElementID, CmdLen, pCmdBuffer);
|
||||
else if (padapter->registrypriv.mp_mode == 0)
|
||||
RTW_PRINT(FUNC_ADPT_FMT" FW doesn't exit when no MP mode, by pass H2C id:0x%02x\n"
|
||||
|
@ -1011,8 +1011,8 @@ u8 rtw_hal_get_tx_power_index(PADAPTER padapter, u8 rfpath, u8 rate, u8 bandwidt
|
|||
* Initialize MAC registers
|
||||
*
|
||||
* Return:
|
||||
* _TRUE success
|
||||
* _FALSE fail
|
||||
* true success
|
||||
* false fail
|
||||
*/
|
||||
u8 rtw_hal_init_mac_register(PADAPTER adapter)
|
||||
{
|
||||
|
@ -1024,8 +1024,8 @@ u8 rtw_hal_init_mac_register(PADAPTER adapter)
|
|||
* Initialize PHY(BB/RF) related functions
|
||||
*
|
||||
* Return:
|
||||
* _TRUE success
|
||||
* _FALSE fail
|
||||
* true success
|
||||
* false fail
|
||||
*/
|
||||
u8 rtw_hal_init_phy(PADAPTER adapter)
|
||||
{
|
||||
|
@ -1042,7 +1042,7 @@ bool rtw_hal_rfkill_poll(_adapter *adapter, u8 *valid)
|
|||
ret = adapter->hal_func.hal_radio_onoff_check(adapter, valid);
|
||||
else {
|
||||
*valid = 0;
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ static void rtw_hal_mcc_update_go_p2p_ie(PADAPTER padapter)
|
|||
}
|
||||
printk("\n");
|
||||
}
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, _TRUE);
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -195,19 +195,19 @@ static void rtw_hal_mcc_remove_go_p2p_ie(PADAPTER padapter)
|
|||
return;
|
||||
|
||||
pmccadapriv->p2p_go_noa_ie_len = 0;
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, _TRUE);
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, true);
|
||||
}
|
||||
|
||||
/* restore IQK value for all interface */
|
||||
void rtw_hal_mcc_restore_iqk_val(PADAPTER padapter)
|
||||
{
|
||||
u8 take_care_iqk = _FALSE;
|
||||
u8 take_care_iqk = false;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
_adapter *iface = NULL;
|
||||
u8 i = 0;
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk);
|
||||
if (take_care_iqk == _TRUE && MCC_EN(padapter)) {
|
||||
if (take_care_iqk == true && MCC_EN(padapter)) {
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
iface = dvobj->padapters[i];
|
||||
if (iface == NULL)
|
||||
|
@ -226,9 +226,9 @@ u8 rtw_hal_check_mcc_status(PADAPTER padapter, u8 mcc_status)
|
|||
struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv);
|
||||
|
||||
if (pmccobjpriv->mcc_status & (mcc_status))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtw_hal_set_mcc_status(PADAPTER padapter, u8 mcc_status)
|
||||
|
@ -553,9 +553,9 @@ u8 rtw_hal_dl_mcc_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 *index,
|
|||
|
||||
_rtw_memcpy(bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
|
||||
rtw_hal_construct_NullFunctionData(iface
|
||||
, &pframe[*index], &len, bssid, _FALSE, 0, 0, _FALSE);
|
||||
, &pframe[*index], &len, bssid, false, 0, 0, false);
|
||||
rtw_hal_fill_fake_txdesc(iface, &pframe[*index-tx_desc],
|
||||
len, _FALSE, _FALSE, _FALSE);
|
||||
len, false, false, false);
|
||||
|
||||
CurtPktPageNum = (u8)PageNum(tx_desc + len, page_size);
|
||||
*page_num += CurtPktPageNum;
|
||||
|
@ -570,7 +570,7 @@ u8 rtw_hal_dl_mcc_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 *index,
|
|||
len = 0;
|
||||
rtw_hal_construct_CTS(iface, &pframe[*index], &len);
|
||||
rtw_hal_fill_fake_txdesc(iface, &pframe[*index-tx_desc],
|
||||
len, _FALSE, _FALSE, _FALSE);
|
||||
len, false, false, false);
|
||||
|
||||
CurtPktPageNum = (u8)PageNum(tx_desc + len, page_size);
|
||||
*page_num += CurtPktPageNum;
|
||||
|
@ -858,7 +858,7 @@ static void rtw_hal_set_mcc_ctrl_cmd(PADAPTER padapter, u8 stop)
|
|||
duration = iface->mcc_adapterpriv.mcc_duration;
|
||||
role = iface->mcc_adapterpriv.role;
|
||||
|
||||
incurch = _FALSE;
|
||||
incurch = false;
|
||||
|
||||
if (IS_HARDWARE_TYPE_8812(padapter))
|
||||
rfetype = pHalData->rfe_type; /* RFETYPE (only for 8812)*/
|
||||
|
@ -957,7 +957,7 @@ static u8 rtw_hal_set_mcc_start_setting(PADAPTER padapter, u8 status)
|
|||
rtw_hal_set_mcc_macid_cmd(padapter);
|
||||
|
||||
/* set mcc parameter */
|
||||
rtw_hal_set_mcc_ctrl_cmd(padapter, _FALSE);
|
||||
rtw_hal_set_mcc_ctrl_cmd(padapter, false);
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
|
@ -982,7 +982,7 @@ static void rtw_hal_set_mcc_stop_setting(PADAPTER padapter, u8 status)
|
|||
continue;
|
||||
/* use other interface to set cmd */
|
||||
if (iface != padapter) {
|
||||
rtw_hal_set_mcc_ctrl_cmd(iface, _TRUE);
|
||||
rtw_hal_set_mcc_ctrl_cmd(iface, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1058,7 +1058,7 @@ static u8 rtw_hal_set_mcc_setting(PADAPTER padapter, u8 status)
|
|||
{
|
||||
u8 ret = _FAIL;
|
||||
struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv);
|
||||
u8 stop = (status < MCC_SETCMD_STATUS_START_CONNECT) ? _TRUE : _FALSE;
|
||||
u8 stop = (status < MCC_SETCMD_STATUS_START_CONNECT) ? true : false;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
|
||||
RTW_INFO("===> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
|
||||
|
@ -1066,7 +1066,7 @@ static u8 rtw_hal_set_mcc_setting(PADAPTER padapter, u8 status)
|
|||
rtw_sctx_init(&pmccobjpriv->mcc_sctx, MCC_EXPIRE_TIME);
|
||||
pmccobjpriv->mcc_c2h_status = MCC_RPT_MAX;
|
||||
|
||||
if (stop == _FALSE) {
|
||||
if (stop == false) {
|
||||
/* handle mcc start */
|
||||
if (rtw_hal_set_mcc_start_setting(padapter, status) == _FAIL)
|
||||
goto exit;
|
||||
|
@ -1122,8 +1122,8 @@ static void rtw_hal_mcc_check_case_not_limit_traffic(PADAPTER cur_iface, PADAPTE
|
|||
|
||||
/* for both interface are VHT80, doesn't limit_traffic according to iperf results */
|
||||
if (cur_bw == CHANNEL_WIDTH_80 && next_bw == CHANNEL_WIDTH_80) {
|
||||
cur_iface->mcc_adapterpriv.mcc_tp_limit = _FALSE;
|
||||
next_iface->mcc_adapterpriv.mcc_tp_limit = _FALSE;
|
||||
cur_iface->mcc_adapterpriv.mcc_tp_limit = false;
|
||||
next_iface->mcc_adapterpriv.mcc_tp_limit = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1173,20 +1173,20 @@ static void rtw_hal_mcc_sw_ch_fw_notify_hdl(PADAPTER padapter)
|
|||
/* check single TX or cuncurrnet TX */
|
||||
if (next_mccadapriv->mcc_tp < single_tx_cri) {
|
||||
/* single TX, does not stop */
|
||||
cur_mccadapriv->mcc_tx_stop = _FALSE;
|
||||
cur_mccadapriv->mcc_tp_limit = _FALSE;
|
||||
cur_mccadapriv->mcc_tx_stop = false;
|
||||
cur_mccadapriv->mcc_tp_limit = false;
|
||||
} else {
|
||||
/* concurrent TX, stop */
|
||||
cur_mccadapriv->mcc_tx_stop = _TRUE;
|
||||
cur_mccadapriv->mcc_tp_limit = _TRUE;
|
||||
cur_mccadapriv->mcc_tx_stop = true;
|
||||
cur_mccadapriv->mcc_tp_limit = true;
|
||||
}
|
||||
|
||||
if (cur_mccadapriv->mcc_tp < single_tx_cri) {
|
||||
next_mccadapriv->mcc_tx_stop = _FALSE;
|
||||
next_mccadapriv->mcc_tp_limit = _FALSE;
|
||||
next_mccadapriv->mcc_tx_stop = false;
|
||||
next_mccadapriv->mcc_tp_limit = false;
|
||||
} else {
|
||||
next_mccadapriv->mcc_tx_stop = _FALSE;
|
||||
next_mccadapriv->mcc_tp_limit = _TRUE;
|
||||
next_mccadapriv->mcc_tx_stop = false;
|
||||
next_mccadapriv->mcc_tp_limit = true;
|
||||
next_mccadapriv->mcc_tx_bytes_to_port = 0;
|
||||
}
|
||||
|
||||
|
@ -1402,7 +1402,7 @@ void rtw_hal_mcc_sw_status_check(PADAPTER padapter)
|
|||
*/
|
||||
u8 rtw_hal_mcc_change_scan_flag(PADAPTER padapter, u8 *ch, u8 *bw, u8 *offset)
|
||||
{
|
||||
u8 need_ch_setting_union = _TRUE, i = 0, flags = 0, role = 0;
|
||||
u8 need_ch_setting_union = true, i = 0, flags = 0, role = 0;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
struct mcc_adapter_priv *pmccadapriv = NULL;
|
||||
struct mlme_ext_priv *pmlmeext = NULL;
|
||||
|
@ -1427,7 +1427,7 @@ u8 rtw_hal_mcc_change_scan_flag(PADAPTER padapter, u8 *ch, u8 *bw, u8 *offset)
|
|||
*ch = pmlmeext->cur_channel;
|
||||
*bw = pmlmeext->cur_bwmode;
|
||||
*offset = pmlmeext->cur_ch_offset;
|
||||
need_ch_setting_union = _FALSE;
|
||||
need_ch_setting_union = false;
|
||||
break;
|
||||
case MCC_ROLE_STA:
|
||||
case MCC_ROLE_GC:
|
||||
|
@ -1505,15 +1505,15 @@ inline u8 rtw_hal_mcc_stop_tx_bytes_to_port(PADAPTER padapter)
|
|||
if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)) {
|
||||
if (pmccadapriv->mcc_tp_limit) {
|
||||
if (pmccadapriv->mcc_tx_bytes_to_port >= pmccadapriv->mcc_target_tx_bytes_to_port) {
|
||||
pmccadapriv->mcc_tx_stop = _TRUE;
|
||||
pmccadapriv->mcc_tx_stop = true;
|
||||
rtw_netif_stop_queue(padapter->pnetdev);
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1577,7 +1577,7 @@ u8 rtw_hal_set_mcc_setting_start_bss_network(PADAPTER padapter, u8 chbw_allow)
|
|||
|
||||
if (MCC_EN(padapter)) {
|
||||
/* channel bw offset can not be allowed, start MCC */
|
||||
if (chbw_allow == _FALSE) {
|
||||
if (chbw_allow == false) {
|
||||
struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv);
|
||||
|
||||
rtw_hal_mcc_restore_iqk_val(padapter);
|
||||
|
@ -1626,7 +1626,7 @@ u8 rtw_hal_set_mcc_setting_join_done_chk_ch(PADAPTER padapter)
|
|||
rtw_mi_status_no_self(padapter, &mstate);
|
||||
|
||||
if (MSTATE_STA_LD_NUM(&mstate) || MSTATE_STA_LG_NUM(&mstate) || MSTATE_AP_NUM(&mstate)) {
|
||||
bool chbw_allow = _TRUE;
|
||||
bool chbw_allow = true;
|
||||
u8 u_ch, u_offset, u_bw;
|
||||
struct mlme_ext_priv *cur_mlmeext = &padapter->mlmeextpriv;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
|
@ -1648,7 +1648,7 @@ u8 rtw_hal_set_mcc_setting_join_done_chk_ch(PADAPTER padapter)
|
|||
, FUNC_ADPT_ARG(padapter), chbw_allow);
|
||||
|
||||
/* if chbw_allow = false, start MCC setting */
|
||||
if (chbw_allow == _FALSE) {
|
||||
if (chbw_allow == false) {
|
||||
struct mcc_obj_priv *pmccobjpriv = &dvobj->mcc_objpriv;
|
||||
|
||||
rtw_hal_mcc_restore_iqk_val(padapter);
|
||||
|
@ -1674,10 +1674,10 @@ u8 rtw_hal_set_mcc_setting_chk_start_clnt_join(PADAPTER padapter, u8 *ch, u8 *bw
|
|||
{
|
||||
u8 ret = _FAIL;
|
||||
|
||||
/* if chbw_allow = false under en_mcc = TRUE, we do not change channel related setting */
|
||||
/* if chbw_allow = false under en_mcc = true, we do not change channel related setting */
|
||||
if (MCC_EN(padapter)) {
|
||||
/* restore union channel related setting to current channel related setting */
|
||||
if (chbw_allow == _FALSE) {
|
||||
if (chbw_allow == false) {
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
*ch = pmlmeext->cur_channel;
|
||||
|
@ -1782,7 +1782,7 @@ inline void update_mcc_mgntframe_attrib(_adapter *padapter, struct pkt_attrib *p
|
|||
|
||||
inline u8 rtw_hal_mcc_link_status_chk(_adapter *padapter, const char *msg)
|
||||
{
|
||||
u8 ret = _TRUE, i = 0;
|
||||
u8 ret = true, i = 0;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
_adapter *iface;
|
||||
struct mlme_ext_priv *mlmeext;
|
||||
|
@ -1796,7 +1796,7 @@ inline u8 rtw_hal_mcc_link_status_chk(_adapter *padapter, const char *msg)
|
|||
#ifdef DBG_EXPIRATION_CHK
|
||||
RTW_INFO(FUNC_ADPT_FMT" don't enter %s under scan for MCC mode\n", FUNC_ADPT_ARG(padapter), msg);
|
||||
#endif
|
||||
ret = _FALSE;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
@ -1820,7 +1820,7 @@ void rtw_hal_mcc_issue_null_data(_adapter *padapter, u8 chbw_allow, u8 ps_mode)
|
|||
if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC))
|
||||
return;
|
||||
|
||||
if (chbw_allow == _TRUE)
|
||||
if (chbw_allow == true)
|
||||
return;
|
||||
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
|
|
36
hal/hal_mp.c
36
hal/hal_mp.c
|
@ -74,13 +74,13 @@ s32 hal_mpt_SetPowerTracking(PADAPTER padapter, u8 enable)
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_MP_STATE) == _FALSE) {
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_MP_STATE) == false) {
|
||||
return _FAIL;
|
||||
}
|
||||
if (enable)
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = _TRUE;
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = true;
|
||||
else
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = _FALSE;
|
||||
pDM_Odm->rf_calibrate_info.txpowertrack_control = false;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -109,9 +109,9 @@ void hal_mpt_CCKTxPowerAdjust(PADAPTER Adapter, bool bInCH14)
|
|||
DataRate = mpt_to_mgnt_rate(ulRateIdx);
|
||||
|
||||
if (u1Channel == 14 && IS_CCK_RATE(DataRate))
|
||||
pHalData->bCCKinCH14 = TRUE;
|
||||
pHalData->bCCKinCH14 = true;
|
||||
else
|
||||
pHalData->bCCKinCH14 = FALSE;
|
||||
pHalData->bCCKinCH14 = false;
|
||||
|
||||
/* get current cck swing value and check 0xa22 & 0xa23 later to match the table.*/
|
||||
CurrCCKSwingVal = read_bbreg(Adapter, rCCK0_TxFilter1, bMaskHWord);
|
||||
|
@ -185,8 +185,8 @@ void hal_mpt_SetChannel(PADAPTER pAdapter)
|
|||
|
||||
hal_mpt_SwitchRfSetting(pAdapter);
|
||||
|
||||
pHalData->bSwChnl = _TRUE;
|
||||
pHalData->bSetChnlBW = _TRUE;
|
||||
pHalData->bSwChnl = true;
|
||||
pHalData->bSetChnlBW = true;
|
||||
rtw_hal_set_chnl_bw(pAdapter, channel, bandwidth, 0, 0);
|
||||
|
||||
hal_mpt_CCKTxPowerAdjust(pAdapter, pHalData->bCCKinCH14);
|
||||
|
@ -205,8 +205,8 @@ void hal_mpt_SetBandwidth(PADAPTER pAdapter)
|
|||
u8 channel = pmp->channel;
|
||||
u8 bandwidth = pmp->bandwidth;
|
||||
|
||||
pHalData->bSwChnl = _TRUE;
|
||||
pHalData->bSetChnlBW = _TRUE;
|
||||
pHalData->bSwChnl = true;
|
||||
pHalData->bSetChnlBW = true;
|
||||
rtw_hal_set_chnl_bw(pAdapter, channel, bandwidth, 0, 0);
|
||||
|
||||
hal_mpt_SwitchRfSetting(pAdapter);
|
||||
|
@ -568,7 +568,7 @@ s32 hal_mpt_SetThermalMeter(PADAPTER pAdapter, u8 target_ther)
|
|||
}
|
||||
|
||||
|
||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) {
|
||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) {
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
@ -765,8 +765,8 @@ static void mpt_StopCckContTx(
|
|||
PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx);
|
||||
u8 u1bReg;
|
||||
|
||||
pMptCtx->bCckContTx = FALSE;
|
||||
pMptCtx->bOfdmContTx = FALSE;
|
||||
pMptCtx->bCckContTx = false;
|
||||
pMptCtx->bOfdmContTx = false;
|
||||
|
||||
phy_set_bb_reg(pAdapter, rCCK0_System, bCCKBBMode, 0x0); /*normal mode*/
|
||||
phy_set_bb_reg(pAdapter, rCCK0_System, bCCKScramble, 0x1); /*turn on scramble setting*/
|
||||
|
@ -790,8 +790,8 @@ static void mpt_StopOfdmContTx(
|
|||
u8 u1bReg;
|
||||
u32 data;
|
||||
|
||||
pMptCtx->bCckContTx = FALSE;
|
||||
pMptCtx->bOfdmContTx = FALSE;
|
||||
pMptCtx->bCckContTx = false;
|
||||
pMptCtx->bOfdmContTx = false;
|
||||
|
||||
phy_set_bb_reg(pAdapter, rOFDM1_LSTF, BIT30 | BIT29 | BIT28, OFDM_ALL_OFF);
|
||||
|
||||
|
@ -837,8 +837,8 @@ static void mpt_StartCckContTx(
|
|||
phy_set_bb_reg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000500);
|
||||
phy_set_bb_reg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500);
|
||||
|
||||
pMptCtx->bCckContTx = TRUE;
|
||||
pMptCtx->bOfdmContTx = FALSE;
|
||||
pMptCtx->bCckContTx = true;
|
||||
pMptCtx->bOfdmContTx = false;
|
||||
|
||||
} /* mpt_StartCckContTx */
|
||||
|
||||
|
@ -869,8 +869,8 @@ static void mpt_StartOfdmContTx(
|
|||
phy_set_bb_reg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000500);
|
||||
phy_set_bb_reg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500);
|
||||
|
||||
pMptCtx->bCckContTx = FALSE;
|
||||
pMptCtx->bOfdmContTx = TRUE;
|
||||
pMptCtx->bCckContTx = false;
|
||||
pMptCtx->bOfdmContTx = true;
|
||||
} /* mpt_StartOfdmContTx */
|
||||
|
||||
void hal_mpt_SetContinuousTx(PADAPTER pAdapter, u8 bStart)
|
||||
|
|
|
@ -101,7 +101,7 @@ PHY_RFShadowWrite(
|
|||
u32 Data)
|
||||
{
|
||||
RF_Shadow[eRFPath][Offset].Value = (Data & bRFRegOffsetMask);
|
||||
RF_Shadow[eRFPath][Offset].Driver_Write = _TRUE;
|
||||
RF_Shadow[eRFPath][Offset].Driver_Write = true;
|
||||
|
||||
} /* PHY_RFShadowWrite */
|
||||
|
||||
|
@ -114,16 +114,16 @@ PHY_RFShadowCompare(
|
|||
{
|
||||
u32 reg;
|
||||
/* Check if we need to check the register */
|
||||
if (RF_Shadow[eRFPath][Offset].Compare == _TRUE) {
|
||||
if (RF_Shadow[eRFPath][Offset].Compare == true) {
|
||||
reg = rtw_hal_read_rfreg(Adapter, eRFPath, Offset, bRFRegOffsetMask);
|
||||
/* Compare shadow and real rf register for 20bits!! */
|
||||
if (RF_Shadow[eRFPath][Offset].Value != reg) {
|
||||
/* Locate error position. */
|
||||
RF_Shadow[eRFPath][Offset].ErrorOrNot = _TRUE;
|
||||
RF_Shadow[eRFPath][Offset].ErrorOrNot = true;
|
||||
}
|
||||
return RF_Shadow[eRFPath][Offset].ErrorOrNot ;
|
||||
}
|
||||
return _FALSE;
|
||||
return false;
|
||||
} /* PHY_RFShadowCompare */
|
||||
|
||||
|
||||
|
@ -134,9 +134,9 @@ PHY_RFShadowRecorver(
|
|||
u32 Offset)
|
||||
{
|
||||
/* Check if the address is error */
|
||||
if (RF_Shadow[eRFPath][Offset].ErrorOrNot == _TRUE) {
|
||||
if (RF_Shadow[eRFPath][Offset].ErrorOrNot == true) {
|
||||
/* Check if we need to recorver the register. */
|
||||
if (RF_Shadow[eRFPath][Offset].Recorver == _TRUE) {
|
||||
if (RF_Shadow[eRFPath][Offset].Recorver == true) {
|
||||
rtw_hal_write_rfreg(Adapter, eRFPath, Offset, bRFRegOffsetMask,
|
||||
RF_Shadow[eRFPath][Offset].Value);
|
||||
}
|
||||
|
@ -212,9 +212,9 @@ PHY_RFShadowCompareFlagSetAll(
|
|||
for (Offset = 0; Offset < maxReg; Offset++) {
|
||||
/* 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!! */
|
||||
if (Offset != 0x26 && Offset != 0x27)
|
||||
PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, _FALSE);
|
||||
PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, false);
|
||||
else
|
||||
PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, _TRUE);
|
||||
PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,9 +232,9 @@ PHY_RFShadowRecorverFlagSetAll(
|
|||
for (Offset = 0; Offset < maxReg; Offset++) {
|
||||
/* 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!! */
|
||||
if (Offset != 0x26 && Offset != 0x27)
|
||||
PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, _FALSE);
|
||||
PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, false);
|
||||
else
|
||||
PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, _TRUE);
|
||||
PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -250,10 +250,10 @@ PHY_RFShadowRefresh(
|
|||
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++) {
|
||||
for (Offset = 0; Offset < maxReg; Offset++) {
|
||||
RF_Shadow[eRFPath][Offset].Value = 0;
|
||||
RF_Shadow[eRFPath][Offset].Compare = _FALSE;
|
||||
RF_Shadow[eRFPath][Offset].Recorver = _FALSE;
|
||||
RF_Shadow[eRFPath][Offset].ErrorOrNot = _FALSE;
|
||||
RF_Shadow[eRFPath][Offset].Driver_Write = _FALSE;
|
||||
RF_Shadow[eRFPath][Offset].Compare = false;
|
||||
RF_Shadow[eRFPath][Offset].Recorver = false;
|
||||
RF_Shadow[eRFPath][Offset].ErrorOrNot = false;
|
||||
RF_Shadow[eRFPath][Offset].Driver_Write = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -481,7 +481,7 @@ phydm_get_structure(
|
|||
void *p_struct = NULL;
|
||||
|
||||
switch (structure_type) {
|
||||
case PHYDM_FALSEALMCNT:
|
||||
case PHYDMfalseALMCNT:
|
||||
p_struct = &(p_dm_odm->false_alm_cnt);
|
||||
break;
|
||||
case PHYDM_CFOTRACK:
|
||||
|
@ -1371,7 +1371,7 @@ phydm_cmn_info_query(
|
|||
enum phydm_info_query_e info_type
|
||||
)
|
||||
{
|
||||
struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
|
||||
switch (info_type) {
|
||||
case PHYDM_INFO_FA_OFDM:
|
||||
|
@ -1658,7 +1658,7 @@ odm_update_power_training_state(
|
|||
struct PHY_DM_STRUCT *p_dm_odm
|
||||
)
|
||||
{
|
||||
struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table;
|
||||
u32 score = 0;
|
||||
|
||||
|
|
|
@ -703,8 +703,8 @@ struct PHY_DM_STRUCT {
|
|||
#endif
|
||||
struct _dynamic_primary_cca dm_pri_cca;
|
||||
struct _rate_adaptive_table_ dm_ra_table;
|
||||
struct _FALSE_ALARM_STATISTICS false_alm_cnt;
|
||||
struct _FALSE_ALARM_STATISTICS flase_alm_cnt_buddy_adapter;
|
||||
struct false_ALARM_STATISTICS false_alm_cnt;
|
||||
struct false_ALARM_STATISTICS flase_alm_cnt_buddy_adapter;
|
||||
struct _sw_antenna_switch_ dm_swat_table;
|
||||
struct _CFO_TRACKING_ dm_cfo_track;
|
||||
struct _ACS_ dm_acs;
|
||||
|
@ -793,7 +793,7 @@ struct PHY_DM_STRUCT {
|
|||
};
|
||||
|
||||
enum phydm_structure_type {
|
||||
PHYDM_FALSEALMCNT,
|
||||
PHYDMfalseALMCNT,
|
||||
PHYDM_CFOTRACK,
|
||||
PHYDM_ADAPTIVITY,
|
||||
PHYDM_ROMINFO,
|
||||
|
|
|
@ -1335,7 +1335,7 @@ void odm_sw_antdiv_callback(istruct timer_list *t)
|
|||
struct PHY_DM_STRUCT *p_dm_odm = timer_list(p_dm_odm, t, dm_swat_table.phydm_sw_antenna_switch_timer);
|
||||
#endif
|
||||
struct _ADAPTER *padapter = p_dm_odm->adapter;
|
||||
if (padapter->net_closed == _TRUE)
|
||||
if (padapter->net_closed == true)
|
||||
return;
|
||||
|
||||
rtw_run_in_thread_cmd(padapter, odm_sw_antdiv_workitem_callback, padapter);
|
||||
|
@ -1650,7 +1650,7 @@ void odm_fast_ant_training_callback(struct timer_list *t)
|
|||
#endif
|
||||
struct _ADAPTER *padapter = p_dm_odm->adapter;
|
||||
|
||||
if (padapter->net_closed == _TRUE)
|
||||
if (padapter->net_closed == true)
|
||||
return;
|
||||
/* if(*p_dm_odm->p_is_net_closed == true) */
|
||||
/* return; */
|
||||
|
|
|
@ -875,7 +875,7 @@ phydm_basic_dbg_message
|
|||
)
|
||||
{
|
||||
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void;
|
||||
struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
struct _CFO_TRACKING_ *p_cfo_track = (struct _CFO_TRACKING_ *)phydm_get_structure(p_dm_odm, PHYDM_CFOTRACK);
|
||||
struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table;
|
||||
struct _rate_adaptive_table_ *p_ra_table = &p_dm_odm->dm_ra_table;
|
||||
|
|
|
@ -114,7 +114,7 @@ odm_forbidden_igi_check(
|
|||
{
|
||||
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void;
|
||||
struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table;
|
||||
struct _FALSE_ALARM_STATISTICS *p_false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *p_false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
u8 rx_gain_range_min = p_dm_dig_table->rx_gain_range_min;
|
||||
|
||||
if (p_dm_dig_table->large_fa_timeout) {
|
||||
|
@ -502,8 +502,8 @@ odm_dig_init(
|
|||
p_dm_dig_table->pre_ig_value = 0;
|
||||
p_dm_dig_table->rssi_low_thresh = DM_DIG_THRESH_LOW;
|
||||
p_dm_dig_table->rssi_high_thresh = DM_DIG_THRESH_HIGH;
|
||||
p_dm_dig_table->fa_low_thresh = DM_FALSEALARM_THRESH_LOW;
|
||||
p_dm_dig_table->fa_high_thresh = DM_FALSEALARM_THRESH_HIGH;
|
||||
p_dm_dig_table->fa_low_thresh = DMfalseALARM_THRESH_LOW;
|
||||
p_dm_dig_table->fa_high_thresh = DMfalseALARM_THRESH_HIGH;
|
||||
p_dm_dig_table->backoff_val = DM_DIG_BACKOFF_DEFAULT;
|
||||
p_dm_dig_table->backoff_val_range_max = DM_DIG_BACKOFF_MAX;
|
||||
p_dm_dig_table->backoff_val_range_min = DM_DIG_BACKOFF_MIN;
|
||||
|
@ -549,7 +549,7 @@ odm_DIG(
|
|||
|
||||
/* Common parameters */
|
||||
struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table;
|
||||
struct _FALSE_ALARM_STATISTICS *p_false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *p_false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
bool first_connect, first_dis_connect;
|
||||
u8 dig_max_of_min, dig_dynamic_min;
|
||||
u8 dm_dig_max, dm_dig_min;
|
||||
|
@ -813,7 +813,7 @@ odm_dig_by_rssi_lps(
|
|||
)
|
||||
{
|
||||
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void;
|
||||
struct _FALSE_ALARM_STATISTICS *p_false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *p_false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
|
||||
u8 rssi_lower = DM_DIG_MIN_NIC; /* 0x1E or 0x1C */
|
||||
u8 current_igi = p_dm_odm->rssi_min;
|
||||
|
@ -866,7 +866,7 @@ odm_false_alarm_counter_statistics(
|
|||
)
|
||||
{
|
||||
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void;
|
||||
struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
#if (PHYDM_LA_MODE_SUPPORT == 1)
|
||||
struct _RT_ADCSMP *adc_smp = &(p_dm_odm->adcsmp);
|
||||
#endif
|
||||
|
@ -1235,7 +1235,7 @@ odm_cck_packet_detection_thresh(
|
|||
{
|
||||
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void;
|
||||
struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table;
|
||||
struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
u8 cur_cck_cca_thres = p_dm_dig_table->cur_cck_cca_thres, RSSI_thd = 35;
|
||||
|
||||
if ((!(p_dm_odm->support_ability & ODM_BB_CCK_PD)) || (!(p_dm_odm->support_ability & ODM_BB_FA_CNT))) {
|
||||
|
|
|
@ -95,7 +95,7 @@ struct _dynamic_initial_gain_threshold_ {
|
|||
enum dig_goupcheck_level dig_go_up_check_level;
|
||||
};
|
||||
|
||||
struct _FALSE_ALARM_STATISTICS {
|
||||
struct false_ALARM_STATISTICS {
|
||||
u32 cnt_parity_fail;
|
||||
u32 cnt_rate_illegal;
|
||||
u32 cnt_crc8_fail;
|
||||
|
@ -196,8 +196,8 @@ enum phydm_pause_level {
|
|||
#define DM_DIG_THRESH_HIGH 40
|
||||
#define DM_DIG_THRESH_LOW 35
|
||||
|
||||
#define DM_FALSEALARM_THRESH_LOW 400
|
||||
#define DM_FALSEALARM_THRESH_HIGH 1000
|
||||
#define DMfalseALARM_THRESH_LOW 400
|
||||
#define DMfalseALARM_THRESH_HIGH 1000
|
||||
|
||||
#define DM_DIG_MAX_NIC 0x3e
|
||||
#define DM_DIG_MIN_NIC 0x20
|
||||
|
|
|
@ -50,7 +50,7 @@ phydm_drp_get_statistic(
|
|||
{
|
||||
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void;
|
||||
struct _DYNAMIC_RX_PATH_ *p_dm_drp_table = &(p_dm_odm->dm_drp_table);
|
||||
struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
|
||||
odm_false_alarm_counter_statistics(p_dm_odm);
|
||||
|
||||
|
@ -72,7 +72,7 @@ phydm_dynamic_rx_path(
|
|||
u8 curr_drp_state;
|
||||
u32 rx_ok_cal;
|
||||
u32 RSSI = 0;
|
||||
struct _FALSE_ALARM_STATISTICS *false_alm_cnt = (struct _FALSE_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDM_FALSEALMCNT);
|
||||
struct false_ALARM_STATISTICS *false_alm_cnt = (struct false_ALARM_STATISTICS *)phydm_get_structure(p_dm_odm, PHYDMfalseALMCNT);
|
||||
|
||||
if (!(p_dm_odm->support_ability & ODM_BB_DYNAMIC_RX_PATH)) {
|
||||
ODM_RT_TRACE(p_dm_odm, ODM_COMP_DYNAMIC_RX_PATH, ODM_DBG_LOUD, ("[Return Init] Not Support Dynamic RX PAth\n"));
|
||||
|
@ -170,7 +170,7 @@ phydm_dynamic_rx_path_callback(
|
|||
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)function_context;
|
||||
struct _ADAPTER *padapter = p_dm_odm->adapter;
|
||||
|
||||
if (padapter->net_closed == _TRUE)
|
||||
if (padapter->net_closed == true)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,8 +91,8 @@ odm_edca_turbo_check_ce(
|
|||
u32 edca_param;
|
||||
u64 cur_tx_bytes = 0;
|
||||
u64 cur_rx_bytes = 0;
|
||||
u8 bbtchange = _TRUE;
|
||||
u8 is_bias_on_rx = _FALSE;
|
||||
u8 bbtchange = true;
|
||||
u8 is_bias_on_rx = false;
|
||||
HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter);
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapter);
|
||||
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
|
||||
|
@ -101,13 +101,13 @@ odm_edca_turbo_check_ce(
|
|||
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
if (p_dm_odm->is_linked != _TRUE) {
|
||||
precvpriv->is_any_non_be_pkts = _FALSE;
|
||||
if (p_dm_odm->is_linked != true) {
|
||||
precvpriv->is_any_non_be_pkts = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pregpriv->wifi_spec == 1)) { /* || (pmlmeinfo->HT_enable == 0)) */
|
||||
precvpriv->is_any_non_be_pkts = _FALSE;
|
||||
precvpriv->is_any_non_be_pkts = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -117,13 +117,13 @@ odm_edca_turbo_check_ce(
|
|||
iot_peer = pmlmeinfo->assoc_AP_vendor;
|
||||
|
||||
if (iot_peer >= HT_IOT_PEER_MAX) {
|
||||
precvpriv->is_any_non_be_pkts = _FALSE;
|
||||
precvpriv->is_any_non_be_pkts = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_dm_odm->support_ic_type & ODM_RTL8188E) {
|
||||
if ((iot_peer == HT_IOT_PEER_RALINK) || (iot_peer == HT_IOT_PEER_ATHEROS))
|
||||
is_bias_on_rx = _TRUE;
|
||||
is_bias_on_rx = true;
|
||||
}
|
||||
|
||||
/* Check if the status needs to be changed. */
|
||||
|
@ -192,7 +192,7 @@ odm_edca_turbo_check_ce(
|
|||
p_dm_odm->dm_edca_table.prv_traffic_idx = traffic_index;
|
||||
}
|
||||
|
||||
p_dm_odm->dm_edca_table.is_current_turbo_edca = _TRUE;
|
||||
p_dm_odm->dm_edca_table.is_current_turbo_edca = true;
|
||||
} else {
|
||||
/* */
|
||||
/* Turn Off EDCA turbo here. */
|
||||
|
@ -200,7 +200,7 @@ odm_edca_turbo_check_ce(
|
|||
/* */
|
||||
if (p_dm_odm->dm_edca_table.is_current_turbo_edca) {
|
||||
rtw_write32(adapter, REG_EDCA_BE_PARAM, p_hal_data->ac_param_be);
|
||||
p_dm_odm->dm_edca_table.is_current_turbo_edca = _FALSE;
|
||||
p_dm_odm->dm_edca_table.is_current_turbo_edca = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -534,17 +534,17 @@ odm_txpowertracking_thermal_meter_init(
|
|||
struct _ADAPTER *adapter = p_dm_odm->adapter;
|
||||
HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter);
|
||||
|
||||
p_rf_calibrate_info->is_txpowertracking = _TRUE;
|
||||
p_rf_calibrate_info->is_txpowertracking = true;
|
||||
p_rf_calibrate_info->tx_powercount = 0;
|
||||
p_rf_calibrate_info->is_txpowertracking_init = _FALSE;
|
||||
p_rf_calibrate_info->is_txpowertracking_init = false;
|
||||
|
||||
if (p_dm_odm->mp_mode == false)
|
||||
p_rf_calibrate_info->txpowertrack_control = _TRUE;
|
||||
p_rf_calibrate_info->txpowertrack_control = true;
|
||||
else
|
||||
p_rf_calibrate_info->txpowertrack_control = _FALSE;
|
||||
p_rf_calibrate_info->txpowertrack_control = false;
|
||||
|
||||
if (p_dm_odm->mp_mode == false)
|
||||
p_rf_calibrate_info->txpowertrack_control = _TRUE;
|
||||
p_rf_calibrate_info->txpowertrack_control = true;
|
||||
|
||||
ODM_RT_TRACE(p_dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("p_dm_odm txpowertrack_control = %d\n", p_rf_calibrate_info->txpowertrack_control));
|
||||
|
||||
|
|
|
@ -811,7 +811,7 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id)
|
|||
HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter);
|
||||
u8 h2c_parameter[H2C_0X42_LENGTH] = {0};
|
||||
u8 UL_DL_STATE = 0, STBC_TX = 0, tx_bf_en = 0;
|
||||
u8 cmdlen = H2C_0X42_LENGTH, first_connect = _FALSE;
|
||||
u8 cmdlen = H2C_0X42_LENGTH, first_connect = false;
|
||||
u64 cur_tx_ok_cnt = 0, cur_rx_ok_cnt = 0;
|
||||
struct sta_info *p_entry = p_dm_odm->p_odm_sta_info[mac_id];
|
||||
|
||||
|
@ -872,11 +872,11 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id)
|
|||
if (p_dm_odm->noisy_decision)
|
||||
h2c_parameter[3] |= RAINFO_NOISY_STATE;
|
||||
|
||||
if ((p_entry->ra_rpt_linked == _FALSE) && (p_entry->rssi_stat.is_send_rssi == RA_RSSI_STATE_SEND)) {
|
||||
if ((p_entry->ra_rpt_linked == false) && (p_entry->rssi_stat.is_send_rssi == RA_RSSI_STATE_SEND)) {
|
||||
h2c_parameter[3] |= RAINFO_INIT_RSSI_RATE_STATE;
|
||||
p_entry->ra_rpt_linked = _TRUE;
|
||||
p_entry->ra_rpt_linked = true;
|
||||
p_entry->rssi_stat.is_send_rssi = RA_RSSI_STATE_HOLD;
|
||||
first_connect = _TRUE;
|
||||
first_connect = true;
|
||||
}
|
||||
|
||||
h2c_parameter[4] = (p_ra_table->RA_threshold_offset & 0x7f) | (p_ra_table->RA_offset_direction << 7);
|
||||
|
@ -891,7 +891,7 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id)
|
|||
(p_dm_odm->noisy_decision) ? "True" : "False", (first_connect) ? "True" : "False"));
|
||||
}
|
||||
|
||||
if (p_hal_data->fw_ractrl == _TRUE) {
|
||||
if (p_hal_data->fw_ractrl == true) {
|
||||
if (p_dm_odm->support_ic_type == ODM_RTL8188E)
|
||||
cmdlen = 3;
|
||||
odm_fill_h2c_cmd(p_dm_odm, ODM_H2C_RSSI_REPORT, cmdlen, h2c_parameter);
|
||||
|
@ -916,7 +916,7 @@ static void phydm_ra_rssi_rpt_wk_hdl(void *p_context)
|
|||
if (IS_STA_VALID(p_entry)) {
|
||||
if (IS_MCAST(p_entry->hwaddr)) /*if(psta->mac_id ==1)*/
|
||||
continue;
|
||||
if (p_entry->ra_rpt_linked == _FALSE) {
|
||||
if (p_entry->ra_rpt_linked == false) {
|
||||
mac_id = i;
|
||||
break;
|
||||
}
|
||||
|
@ -945,7 +945,7 @@ odm_rssi_monitor_check_ce(
|
|||
int tmp_entry_max_pwdb = 0, tmp_entry_min_pwdb = 0xff;
|
||||
u8 sta_cnt = 0;
|
||||
|
||||
if (p_dm_odm->is_linked != _TRUE)
|
||||
if (p_dm_odm->is_linked != true)
|
||||
return;
|
||||
|
||||
for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) {
|
||||
|
@ -1030,9 +1030,9 @@ odm_rate_adaptive_mask_init(
|
|||
|
||||
p_odm_ra->type = dm_type_by_driver;
|
||||
if (p_odm_ra->type == dm_type_by_driver)
|
||||
p_dm_odm->is_use_ra_mask = _TRUE;
|
||||
p_dm_odm->is_use_ra_mask = true;
|
||||
else
|
||||
p_dm_odm->is_use_ra_mask = _FALSE;
|
||||
p_dm_odm->is_use_ra_mask = false;
|
||||
|
||||
p_odm_ra->ratr_state = DM_RATR_STA_INIT;
|
||||
|
||||
|
@ -1593,7 +1593,7 @@ odm_refresh_rate_adaptive_mask_ce(
|
|||
p_entry->rssi_level, ratr_state_new, p_entry->rssi_stat.undecorated_smoothed_pwdb));
|
||||
|
||||
p_entry->rssi_level = ratr_state_new;
|
||||
rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, _FALSE);
|
||||
rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, false);
|
||||
} else {
|
||||
ODM_RT_TRACE(p_dm_odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("Stay in RA level = (( %d ))\n\n", ratr_state_new));
|
||||
/**/
|
||||
|
@ -1602,10 +1602,10 @@ odm_refresh_rate_adaptive_mask_ce(
|
|||
if (true == odm_ra_state_check(p_dm_odm, p_entry->rssi_stat.undecorated_smoothed_pwdb, false, &p_entry->rssi_level)) {
|
||||
ODM_RT_TRACE(p_dm_odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("RSSI:%d, RSSI_LEVEL:%d\n", p_entry->rssi_stat.undecorated_smoothed_pwdb, p_entry->rssi_level));
|
||||
/* printk("RSSI:%d, RSSI_LEVEL:%d\n", pstat->rssi_stat.undecorated_smoothed_pwdb, pstat->rssi_level); */
|
||||
rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, _FALSE);
|
||||
rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, false);
|
||||
} else if (p_dm_odm->is_change_state) {
|
||||
ODM_RT_TRACE(p_dm_odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("Change Power Training state, is_disable_power_training = %d\n", p_dm_odm->is_disable_power_training));
|
||||
rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, _FALSE);
|
||||
rtw_hal_update_ra_mask(p_entry, p_entry->rssi_level, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1884,7 +1884,7 @@ find_minimum_rssi(
|
|||
|
||||
/*Determine the minimum RSSI*/
|
||||
|
||||
if ((p_dm_odm->is_linked != _TRUE) &&
|
||||
if ((p_dm_odm->is_linked != true) &&
|
||||
(p_hal_data->entry_min_undecorated_smoothed_pwdb == 0)) {
|
||||
p_hal_data->min_undecorated_pwdb_for_dm = 0;
|
||||
/*ODM_RT_TRACE(p_dm_odm,COMP_BB_POWERSAVING, DBG_LOUD, ("Not connected to any\n"));*/
|
||||
|
|
|
@ -111,10 +111,6 @@ enum rt_spinlock_type {
|
|||
#define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG
|
||||
#endif
|
||||
|
||||
#define true _TRUE
|
||||
#define false _FALSE
|
||||
|
||||
|
||||
#define SET_TX_DESC_ANTSEL_A_88E(__ptx_desc, __value) SET_BITS_TO_LE_4BYTE(__ptx_desc+8, 24, 1, __value)
|
||||
#define SET_TX_DESC_ANTSEL_B_88E(__ptx_desc, __value) SET_BITS_TO_LE_4BYTE(__ptx_desc+8, 25, 1, __value)
|
||||
#define SET_TX_DESC_ANTSEL_C_88E(__ptx_desc, __value) SET_BITS_TO_LE_4BYTE(__ptx_desc+28, 29, 1, __value)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
static u8 _is_fw_read_cmd_down(_adapter *padapter, u8 msgbox_num)
|
||||
{
|
||||
u8 read_down = _FALSE;
|
||||
u8 read_down = false;
|
||||
int retry_cnts = 100;
|
||||
|
||||
u8 valid;
|
||||
|
@ -42,7 +42,7 @@ static u8 _is_fw_read_cmd_down(_adapter *padapter, u8 msgbox_num)
|
|||
do {
|
||||
valid = rtw_read8(padapter, REG_HMETFR) & BIT(msgbox_num);
|
||||
if (0 == valid)
|
||||
read_down = _TRUE;
|
||||
read_down = true;
|
||||
else
|
||||
rtw_msleep_os(1);
|
||||
} while ((!read_down) && (retry_cnts--));
|
||||
|
@ -78,7 +78,7 @@ s32 FillH2CCmd_88E(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer)
|
|||
padapter = GET_PRIMARY_ADAPTER(padapter);
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if (padapter->bFWReady == _FALSE) {
|
||||
if (padapter->bFWReady == false) {
|
||||
RTW_INFO("FillH2CCmd_88E(): return H2C cmd because fw is not ready\n");
|
||||
return ret;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ u8 rtl8188e_set_rssi_cmd(_adapter *padapter, u8 *param)
|
|||
u8 res = _SUCCESS;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if (pHalData->fw_ractrl == _FALSE) {
|
||||
if (pHalData->fw_ractrl == false) {
|
||||
RTW_INFO("==>%s fw dont support RA\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -189,11 +189,11 @@ u8 rtl8188e_set_raid_cmd(_adapter *padapter, u32 bitmap, u8 *arg, u8 bw)
|
|||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sta_info *psta = NULL;
|
||||
struct macid_ctl_t *macid_ctl = &padapter->dvobj->macid_ctl;
|
||||
u8 macid, init_rate, raid, shortGIrate = _FALSE;
|
||||
u8 macid, init_rate, raid, shortGIrate = false;
|
||||
u8 H2CCommand[7] = {0};
|
||||
u8 ignore_bw = _FALSE;
|
||||
u8 ignore_bw = false;
|
||||
|
||||
if (pHalData->fw_ractrl == _FALSE) {
|
||||
if (pHalData->fw_ractrl == false) {
|
||||
RTW_INFO("==>%s fw dont support RA\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -219,8 +219,8 @@ u8 rtl8188e_set_raid_cmd(_adapter *padapter, u32 bitmap, u8 *arg, u8 bw)
|
|||
H2CCommand[2] |= BIT(3);
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
if (padapter->proximity.proxim_on == _TRUE)
|
||||
pHalData->bDisableTXPowerTraining = _FALSE;
|
||||
if (padapter->proximity.proxim_on == true)
|
||||
pHalData->bDisableTXPowerTraining = false;
|
||||
#endif
|
||||
|
||||
/* DisableTXPowerTraining */
|
||||
|
@ -484,7 +484,7 @@ static void ConstructNullFunctionData(
|
|||
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
|
||||
if (bQoS == _TRUE) {
|
||||
if (bQoS == true) {
|
||||
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr;
|
||||
|
||||
set_frame_sub_type(pframe, WIFI_QOS_DATA_NULL);
|
||||
|
@ -575,8 +575,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct sta_info *psta = NULL;
|
||||
#endif
|
||||
bool bSendBeacon = _FALSE;
|
||||
bool bcn_valid = _FALSE;
|
||||
bool bSendBeacon = false;
|
||||
bool bcn_valid = false;
|
||||
u8 DLBcnCount = 0;
|
||||
u32 poll = 0;
|
||||
|
||||
|
@ -607,7 +607,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
|
|||
|
||||
if (pHalData->RegFwHwTxQCtrl & BIT6) {
|
||||
RTW_INFO("HalDownloadRSVDPage(): There is an Adapter is sending beacon.\n");
|
||||
bSendBeacon = _TRUE;
|
||||
bSendBeacon = true;
|
||||
}
|
||||
|
||||
/* Set FWHW_TXQ_CTRL 0x422[6]=0 to tell Hw the packet is not a real beacon frame. */
|
||||
|
@ -620,7 +620,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
|
|||
poll = 0;
|
||||
do {
|
||||
/* download rsvd page.*/
|
||||
rtw_hal_set_fw_rsvd_page(padapter, _FALSE);
|
||||
rtw_hal_set_fw_rsvd_page(padapter, false);
|
||||
DLBcnCount++;
|
||||
do {
|
||||
rtw_yield_os();
|
||||
|
@ -789,7 +789,7 @@ int reset_tsf(PADAPTER Adapter, u8 reset_port)
|
|||
u32 reg_bcncrtl = (HW_PORT0 == reset_port) ?
|
||||
REG_BCN_CTRL_1 : REG_BCN_CTRL;
|
||||
|
||||
rtw_mi_buddy_scan_abort(Adapter, _FALSE); /* site survey will cause reset_tsf fail */
|
||||
rtw_mi_buddy_scan_abort(Adapter, false); /* site survey will cause reset_tsf fail */
|
||||
reset_cnt_after = reset_cnt_before = rtw_read8(Adapter, reg_reset_tsf_cnt);
|
||||
rtl8188e_reset_tsf(Adapter, reset_port);
|
||||
|
||||
|
@ -799,7 +799,7 @@ int reset_tsf(PADAPTER Adapter, u8 reset_port)
|
|||
reset_cnt_after = rtw_read8(Adapter, reg_reset_tsf_cnt);
|
||||
}
|
||||
|
||||
return (loop_cnt >= 10) ? _FAIL : _TRUE;
|
||||
return (loop_cnt >= 10) ? _FAIL : true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ dm_CheckStatistics(
|
|||
static void dm_CheckPbcGPIO(_adapter *padapter)
|
||||
{
|
||||
u8 tmp1byte;
|
||||
u8 bPbcPressed = _FALSE;
|
||||
u8 bPbcPressed = false;
|
||||
|
||||
if (!padapter->registrypriv.hw_wps_pbc)
|
||||
return;
|
||||
|
@ -77,9 +77,9 @@ static void dm_CheckPbcGPIO(_adapter *padapter)
|
|||
return ;
|
||||
|
||||
if (tmp1byte & HAL_8188E_HW_GPIO_WPS_BIT)
|
||||
bPbcPressed = _TRUE;
|
||||
bPbcPressed = true;
|
||||
|
||||
if (_TRUE == bPbcPressed) {
|
||||
if (true == bPbcPressed) {
|
||||
/* Here we only set bPbcPressed to true */
|
||||
/* After trigger PBC, the variable will be set to false */
|
||||
RTW_INFO("CheckPbcGPIO - PBC is pressed\n");
|
||||
|
@ -160,7 +160,7 @@ static void Update_ODM_ComInfo_88E(PADAPTER Adapter)
|
|||
/* | ODM_BB_PWR_TRAIN */
|
||||
;
|
||||
|
||||
if (rtw_odm_adaptivity_needed(Adapter) == _TRUE) {
|
||||
if (rtw_odm_adaptivity_needed(Adapter) == true) {
|
||||
rtw_odm_adaptivity_config_msg(RTW_DBGDUMP, Adapter);
|
||||
SupportAbility |= ODM_BB_ADAPTIVITY;
|
||||
}
|
||||
|
@ -212,8 +212,8 @@ rtl8188e_HalDmWatchDog(
|
|||
PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
bool bFwCurrentInPSMode = _FALSE;
|
||||
bool bFwPSAwake = _TRUE;
|
||||
bool bFwCurrentInPSMode = false;
|
||||
bool bFwPSAwake = true;
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
struct PHY_DM_STRUCT *pDM_Odm = &(pHalData->odmpriv);
|
||||
|
||||
|
@ -230,7 +230,7 @@ rtl8188e_HalDmWatchDog(
|
|||
/* Fw is under p2p powersaving mode, driver should stop dynamic mechanism. */
|
||||
/* modifed by thomas. 2011.06.11. */
|
||||
if (Adapter->wdinfo.p2p_ps_mode)
|
||||
bFwPSAwake = _FALSE;
|
||||
bFwPSAwake = false;
|
||||
#endif /* CONFIG_P2P_PS */
|
||||
|
||||
if ((rtw_is_hw_init_completed(Adapter))
|
||||
|
@ -243,16 +243,16 @@ rtl8188e_HalDmWatchDog(
|
|||
|
||||
/* ODM */
|
||||
if (rtw_is_hw_init_completed(Adapter)) {
|
||||
u8 bLinked = _FALSE;
|
||||
u8 bsta_state = _FALSE;
|
||||
u8 bLinked = false;
|
||||
u8 bsta_state = false;
|
||||
#ifdef CONFIG_DISABLE_ODM
|
||||
pHalData->odmpriv.support_ability = 0;
|
||||
#endif
|
||||
|
||||
if (rtw_mi_check_status(Adapter, MI_ASSOC)) {
|
||||
bLinked = _TRUE;
|
||||
bLinked = true;
|
||||
if (rtw_mi_check_status(Adapter, MI_STA_LINKED))
|
||||
bsta_state = _TRUE;
|
||||
bsta_state = true;
|
||||
}
|
||||
|
||||
odm_cmn_info_update(&pHalData->odmpriv , ODM_CMNINFO_LINK, bLinked);
|
||||
|
|
|
@ -38,8 +38,8 @@ static void iol_mode_enable(PADAPTER padapter, u8 enable)
|
|||
/* RTW_INFO("%s reg_0xf0:0x%02x, write 0x%02x\n", __func__, reg_0xf0, reg_0xf0|SW_OFFLOAD_EN); */
|
||||
rtw_write8(padapter, REG_SYS_CFG, reg_0xf0 | SW_OFFLOAD_EN);
|
||||
|
||||
if (padapter->bFWReady == _FALSE) {
|
||||
RTW_INFO("bFWReady == _FALSE call reset 8051...\n");
|
||||
if (padapter->bFWReady == false) {
|
||||
RTW_INFO("bFWReady == false call reset 8051...\n");
|
||||
_8051Reset88E(padapter);
|
||||
}
|
||||
|
||||
|
@ -660,7 +660,7 @@ static void _MCUIO_Reset88E(PADAPTER padapter, u8 bReset)
|
|||
{
|
||||
u8 u1bTmp;
|
||||
|
||||
if (bReset == _TRUE) {
|
||||
if (bReset == true) {
|
||||
u1bTmp = rtw_read8(padapter, REG_RSV_CTRL);
|
||||
rtw_write8(padapter, REG_RSV_CTRL, (u1bTmp & (~BIT1)));
|
||||
/* Reset MCU IO Wrapper- sugggest by SD1-Gimmy */
|
||||
|
@ -680,10 +680,10 @@ void _8051Reset88E(PADAPTER padapter)
|
|||
{
|
||||
u8 u1bTmp;
|
||||
|
||||
_MCUIO_Reset88E(padapter, _TRUE);
|
||||
_MCUIO_Reset88E(padapter, true);
|
||||
u1bTmp = rtw_read8(padapter, REG_SYS_FUNC_EN + 1);
|
||||
rtw_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp & (~BIT2));
|
||||
_MCUIO_Reset88E(padapter, _FALSE);
|
||||
_MCUIO_Reset88E(padapter, false);
|
||||
rtw_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp | (BIT2));
|
||||
|
||||
RTW_INFO("=====> _8051Reset88E(): 8051 reset success .\n");
|
||||
|
@ -811,7 +811,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw)
|
|||
#endif /* CONFIG_FILE_FWIMG */
|
||||
|
||||
#ifdef CONFIG_FILE_FWIMG
|
||||
if (rtw_is_file_readable(fwfilepath) == _TRUE) {
|
||||
if (rtw_is_file_readable(fwfilepath) == true) {
|
||||
RTW_INFO("%s accquire FW from file:%s\n", __func__, fwfilepath);
|
||||
pFirmware->eFWSource = FW_SOURCE_IMG_FILE;
|
||||
} else
|
||||
|
@ -908,7 +908,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw)
|
|||
_8051Reset88E(padapter);
|
||||
}
|
||||
|
||||
_FWDownloadEnable_8188E(padapter, _TRUE);
|
||||
_FWDownloadEnable_8188E(padapter, true);
|
||||
fwdl_start_time = rtw_get_current_time();
|
||||
while (!RTW_CANNOT_IO(padapter)
|
||||
&& (write_fw++ < 3 || rtw_get_passing_time_ms(fwdl_start_time) < 500)) {
|
||||
|
@ -923,7 +923,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw)
|
|||
if (rtStatus == _SUCCESS)
|
||||
break;
|
||||
}
|
||||
_FWDownloadEnable_8188E(padapter, _FALSE);
|
||||
_FWDownloadEnable_8188E(padapter, false);
|
||||
if (_SUCCESS != rtStatus)
|
||||
goto fwdl_stat;
|
||||
|
||||
|
@ -953,7 +953,7 @@ void rtl8188e_InitializeFirmwareVars(PADAPTER padapter)
|
|||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
/* Init Fw LPS related. */
|
||||
pwrpriv->bFwCurrentInPSMode = _FALSE;
|
||||
pwrpriv->bFwCurrentInPSMode = false;
|
||||
|
||||
/* Init H2C cmd. */
|
||||
rtw_write8(padapter, REG_HMETFR, 0x0f);
|
||||
|
@ -1001,7 +1001,7 @@ hal_EfusePowerSwitch_RTL8188E(
|
|||
u8 tempval;
|
||||
u16 tmpV16;
|
||||
|
||||
if (PwrState == _TRUE) {
|
||||
if (PwrState == true) {
|
||||
rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON);
|
||||
/* Reset: 0x0000h[28], default valid */
|
||||
tmpV16 = rtw_read16(pAdapter, REG_SYS_FUNC_EN);
|
||||
|
@ -1017,7 +1017,7 @@ hal_EfusePowerSwitch_RTL8188E(
|
|||
rtw_write16(pAdapter, REG_SYS_CLKR, tmpV16);
|
||||
}
|
||||
|
||||
if (bWrite == _TRUE) {
|
||||
if (bWrite == true) {
|
||||
/* Enable LDO 2.5V before read/write action */
|
||||
tempval = rtw_read8(pAdapter, EFUSE_TEST + 3);
|
||||
if (IS_VENDOR_8188E_I_CUT_SERIES(pAdapter)) {
|
||||
|
@ -1032,7 +1032,7 @@ hal_EfusePowerSwitch_RTL8188E(
|
|||
} else {
|
||||
rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF);
|
||||
|
||||
if (bWrite == _TRUE) {
|
||||
if (bWrite == true) {
|
||||
/* Disable LDO 2.5V after read/write action */
|
||||
tempval = rtw_read8(pAdapter, EFUSE_TEST + 3);
|
||||
rtw_write8(pAdapter, EFUSE_TEST + 3, (tempval & 0x7F));
|
||||
|
@ -1060,7 +1060,7 @@ static bool efuse_read_phymap(
|
|||
u8 *pos = pbuf;
|
||||
u16 limit = *size;
|
||||
u16 addr = 0;
|
||||
bool reach_end = _FALSE;
|
||||
bool reach_end = false;
|
||||
|
||||
/* */
|
||||
/* Refresh efuse init map as all 0xFF. */
|
||||
|
@ -1072,12 +1072,12 @@ static bool efuse_read_phymap(
|
|||
/* Read physical efuse content. */
|
||||
/* */
|
||||
while (addr < limit) {
|
||||
ReadEFuseByte(Adapter, addr, pos, _FALSE);
|
||||
ReadEFuseByte(Adapter, addr, pos, false);
|
||||
if (*pos != 0xFF) {
|
||||
pos++;
|
||||
addr++;
|
||||
} else {
|
||||
reach_end = _TRUE;
|
||||
reach_end = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1282,15 +1282,15 @@ Hal_EfuseSwitchToBank(
|
|||
bool bPseudoTest
|
||||
)
|
||||
{
|
||||
bool bRet = _FALSE;
|
||||
bool bRet = false;
|
||||
u32 value32 = 0;
|
||||
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("Efuse switch bank to %d\n", bank)); */
|
||||
if (bPseudoTest) {
|
||||
fakeEfuseBank = bank;
|
||||
bRet = _TRUE;
|
||||
bRet = true;
|
||||
} else
|
||||
bRet = _TRUE;
|
||||
bRet = true;
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
@ -1335,7 +1335,7 @@ ReadEFuseByIC(
|
|||
exit:
|
||||
|
||||
#ifdef DBG_IOL_READ_EFUSE_MAP
|
||||
if (_rtw_memcmp(logical_map, pHalData->efuse_eeprom_data, 0x130) == _FALSE) {
|
||||
if (_rtw_memcmp(logical_map, pHalData->efuse_eeprom_data, 0x130) == false) {
|
||||
int i;
|
||||
RTW_INFO("%s compare first 0x130 byte fail\n", __func__);
|
||||
for (i = 0; i < 512; i++) {
|
||||
|
@ -1623,7 +1623,7 @@ static u16
|
|||
hal_EfuseGetCurrentSize_8188e(PADAPTER pAdapter,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
int bContinual = _TRUE;
|
||||
int bContinual = true;
|
||||
|
||||
u16 efuse_addr = 0;
|
||||
u8 hoffset = 0, hworden = 0;
|
||||
|
@ -1658,7 +1658,7 @@ hal_EfuseGetCurrentSize_8188e(PADAPTER pAdapter,
|
|||
/* read next header */
|
||||
efuse_addr = efuse_addr + (word_cnts * 2) + 1;
|
||||
} else
|
||||
bContinual = _FALSE ;
|
||||
bContinual = false ;
|
||||
}
|
||||
|
||||
if (bPseudoTest) {
|
||||
|
@ -1711,8 +1711,8 @@ hal_EfusePgPacketRead_8188e(
|
|||
{
|
||||
u8 ReadState = PG_STATE_HEADER;
|
||||
|
||||
int bContinual = _TRUE;
|
||||
int bDataEmpty = _TRUE ;
|
||||
int bContinual = true;
|
||||
int bDataEmpty = true ;
|
||||
|
||||
u8 efuse_data, word_cnts = 0;
|
||||
u16 efuse_addr = 0;
|
||||
|
@ -1725,9 +1725,9 @@ hal_EfusePgPacketRead_8188e(
|
|||
EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section, bPseudoTest);
|
||||
|
||||
if (data == NULL)
|
||||
return _FALSE;
|
||||
return false;
|
||||
if (offset > max_section)
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
memset((void *)data, 0xff, sizeof(u8) * PGPKT_DATA_SIZE);
|
||||
memset((void *)tmpdata, 0xff, sizeof(u8) * PGPKT_DATA_SIZE);
|
||||
|
@ -1759,17 +1759,17 @@ hal_EfusePgPacketRead_8188e(
|
|||
hworden = efuse_data & 0x0F;
|
||||
}
|
||||
word_cnts = Efuse_CalculateWordCnts(hworden);
|
||||
bDataEmpty = _TRUE ;
|
||||
bDataEmpty = true ;
|
||||
|
||||
if (hoffset == offset) {
|
||||
for (tmpidx = 0; tmpidx < word_cnts * 2 ; tmpidx++) {
|
||||
if (efuse_OneByteRead(pAdapter, efuse_addr + 1 + tmpidx , &efuse_data, bPseudoTest)) {
|
||||
tmpdata[tmpidx] = efuse_data;
|
||||
if (efuse_data != 0xff)
|
||||
bDataEmpty = _FALSE;
|
||||
bDataEmpty = false;
|
||||
}
|
||||
}
|
||||
if (bDataEmpty == _FALSE)
|
||||
if (bDataEmpty == false)
|
||||
ReadState = PG_STATE_DATA;
|
||||
else { /* read next header */
|
||||
efuse_addr = efuse_addr + (word_cnts * 2) + 1;
|
||||
|
@ -1781,7 +1781,7 @@ hal_EfusePgPacketRead_8188e(
|
|||
}
|
||||
|
||||
} else
|
||||
bContinual = _FALSE ;
|
||||
bContinual = false ;
|
||||
}
|
||||
/* ------- Data section Read ------------- */
|
||||
else if (ReadState & PG_STATE_DATA) {
|
||||
|
@ -1794,9 +1794,9 @@ hal_EfusePgPacketRead_8188e(
|
|||
|
||||
if ((data[0] == 0xff) && (data[1] == 0xff) && (data[2] == 0xff) && (data[3] == 0xff) &&
|
||||
(data[4] == 0xff) && (data[5] == 0xff) && (data[6] == 0xff) && (data[7] == 0xff))
|
||||
return _FALSE;
|
||||
return false;
|
||||
else
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -1866,7 +1866,7 @@ hal_EfuseFixHeaderProcess(
|
|||
PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
|
||||
|
||||
if (!PgWriteSuccess)
|
||||
return _FALSE;
|
||||
return false;
|
||||
else
|
||||
efuse_addr = Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest);
|
||||
} else
|
||||
|
@ -1874,7 +1874,7 @@ hal_EfuseFixHeaderProcess(
|
|||
} else
|
||||
efuse_addr = efuse_addr + (pFixPkt->word_cnts * 2) + 1;
|
||||
*pAddr = efuse_addr;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -1885,7 +1885,7 @@ hal_EfusePgPacketWrite2ByteHeader(
|
|||
PPGPKT_STRUCT pTargetPkt,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
bool bRet = _FALSE, bContinual = _TRUE;
|
||||
bool bRet = false, bContinual = true;
|
||||
u16 efuse_addr = *pAddr, efuse_max_available_len = 0;
|
||||
u8 pg_header = 0, tmp_header = 0, pg_header_temp = 0;
|
||||
u8 repeatcnt = 0;
|
||||
|
@ -1903,7 +1903,7 @@ hal_EfusePgPacketWrite2ByteHeader(
|
|||
while (tmp_header == 0xFF || pg_header != tmp_header) {
|
||||
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for pg_header!!\n")); */
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
|
||||
|
@ -1923,7 +1923,7 @@ hal_EfusePgPacketWrite2ByteHeader(
|
|||
while (tmp_header == 0xFF || pg_header != tmp_header) {
|
||||
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for ext_header!!\n")); */
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
|
||||
|
@ -1933,7 +1933,7 @@ hal_EfusePgPacketWrite2ByteHeader(
|
|||
if ((tmp_header & 0x0F) == 0x0F) { /* word_en PG fail */
|
||||
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for word_en!!\n")); */
|
||||
return _FALSE;
|
||||
return false;
|
||||
} else {
|
||||
efuse_addr++;
|
||||
continue;
|
||||
|
@ -1945,9 +1945,9 @@ hal_EfusePgPacketWrite2ByteHeader(
|
|||
fixPkt.word_en = tmp_header & 0x0F;
|
||||
fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
|
||||
if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
} else {
|
||||
bRet = _TRUE;
|
||||
bRet = true;
|
||||
break;
|
||||
}
|
||||
} else if ((tmp_header & 0x1F) == 0x0F) { /* wrong extended header */
|
||||
|
@ -1968,7 +1968,7 @@ hal_EfusePgPacketWrite1ByteHeader(
|
|||
PPGPKT_STRUCT pTargetPkt,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
bool bRet = _FALSE;
|
||||
bool bRet = false;
|
||||
u8 pg_header = 0, tmp_header = 0;
|
||||
u16 efuse_addr = *pAddr;
|
||||
u8 repeatcnt = 0;
|
||||
|
@ -1985,13 +1985,13 @@ hal_EfusePgPacketWrite1ByteHeader(
|
|||
|
||||
while (tmp_header == 0xFF || pg_header != tmp_header) {
|
||||
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
|
||||
return _FALSE;
|
||||
return false;
|
||||
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
|
||||
efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
|
||||
}
|
||||
|
||||
if (pg_header == tmp_header)
|
||||
bRet = _TRUE;
|
||||
bRet = true;
|
||||
else {
|
||||
PGPKT_STRUCT fixPkt;
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("Error condition for fixed PG packet, need to cover the existed data\n")); */
|
||||
|
@ -1999,7 +1999,7 @@ hal_EfusePgPacketWrite1ByteHeader(
|
|||
fixPkt.word_en = tmp_header & 0x0F;
|
||||
fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
|
||||
if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
*pAddr = efuse_addr;
|
||||
|
@ -2014,7 +2014,7 @@ hal_EfusePgPacketWriteData(
|
|||
PPGPKT_STRUCT pTargetPkt,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
bool bRet = _FALSE;
|
||||
bool bRet = false;
|
||||
u16 efuse_addr = *pAddr;
|
||||
u8 badworden = 0;
|
||||
u32 PgWriteSuccess = 0;
|
||||
|
@ -2024,7 +2024,7 @@ hal_EfusePgPacketWriteData(
|
|||
if (badworden == 0x0F) {
|
||||
/* write ok */
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgPacketWriteData ok!!\n")); */
|
||||
return _TRUE;
|
||||
return true;
|
||||
} else {
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgPacketWriteData Fail!!\n")); */
|
||||
/* reorganize other pg packet */
|
||||
|
@ -2032,9 +2032,9 @@ hal_EfusePgPacketWriteData(
|
|||
PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
|
||||
|
||||
if (!PgWriteSuccess)
|
||||
return _FALSE;
|
||||
return false;
|
||||
else
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return bRet;
|
||||
|
@ -2048,7 +2048,7 @@ hal_EfusePgPacketWriteHeader(
|
|||
PPGPKT_STRUCT pTargetPkt,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
bool bRet = _FALSE;
|
||||
bool bRet = false;
|
||||
|
||||
if (pTargetPkt->offset >= EFUSE_MAX_SECTION_BASE)
|
||||
bRet = hal_EfusePgPacketWrite2ByteHeader(pAdapter, efuseType, pAddr, pTargetPkt, bPseudoTest);
|
||||
|
@ -2089,9 +2089,9 @@ wordEnMatched(
|
|||
*pWden = match_word_en;
|
||||
|
||||
if (match_word_en != 0xf)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -2102,12 +2102,12 @@ hal_EfuseCheckIfDatafollowed(
|
|||
bool bPseudoTest
|
||||
)
|
||||
{
|
||||
bool bRet = _FALSE;
|
||||
bool bRet = false;
|
||||
u8 i, efuse_data;
|
||||
|
||||
for (i = 0; i < (word_cnts * 2) ; i++) {
|
||||
if (efuse_OneByteRead(pAdapter, (startAddr + i) , &efuse_data, bPseudoTest) && (efuse_data != 0xFF))
|
||||
bRet = _TRUE;
|
||||
bRet = true;
|
||||
}
|
||||
|
||||
return bRet;
|
||||
|
@ -2122,7 +2122,7 @@ hal_EfusePartialWriteCheck(
|
|||
bool bPseudoTest
|
||||
)
|
||||
{
|
||||
bool bRet = _FALSE;
|
||||
bool bRet = false;
|
||||
u8 i, efuse_data = 0, cur_header = 0;
|
||||
u8 new_wden = 0, matched_wden = 0, badworden = 0;
|
||||
u16 startAddr = 0, efuse_max_available_len = 0, efuse_max = 0;
|
||||
|
@ -2148,7 +2148,7 @@ hal_EfusePartialWriteCheck(
|
|||
|
||||
while (1) {
|
||||
if (startAddr >= efuse_max_available_len) {
|
||||
bRet = _FALSE;
|
||||
bRet = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2159,7 +2159,7 @@ hal_EfusePartialWriteCheck(
|
|||
efuse_OneByteRead(pAdapter, startAddr, &efuse_data, bPseudoTest);
|
||||
if (ALL_WORDS_DISABLED(efuse_data)) {
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("Error condition, all words disabled")); */
|
||||
bRet = _FALSE;
|
||||
bRet = false;
|
||||
break;
|
||||
} else {
|
||||
curPkt.offset = ((cur_header & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1);
|
||||
|
@ -2187,7 +2187,7 @@ hal_EfusePartialWriteCheck(
|
|||
PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
|
||||
|
||||
if (!PgWriteSuccess) {
|
||||
bRet = _FALSE; /* write fail, return */
|
||||
bRet = false; /* write fail, return */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2205,7 +2205,7 @@ hal_EfusePartialWriteCheck(
|
|||
/* not used header, 0xff */
|
||||
*pAddr = startAddr;
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("Started from unused header offset=%d\n", startAddr)); */
|
||||
bRet = _TRUE;
|
||||
bRet = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2222,16 +2222,16 @@ hal_EfusePgCheckAvailableAddr(
|
|||
u16 efuse_max_available_len = 0;
|
||||
|
||||
/* Change to check TYPE_EFUSE_MAP_LEN ,beacuse 8188E raw 256,logic map over 256. */
|
||||
EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, _FALSE);
|
||||
EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false);
|
||||
|
||||
/* EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&efuse_max_available_len, bPseudoTest); */
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("efuse_max_available_len = %d\n", efuse_max_available_len)); */
|
||||
|
||||
if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len) {
|
||||
/* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgCheckAvailableAddr error!!\n")); */
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2266,20 +2266,20 @@ hal_EfusePgPacketWrite_BT(
|
|||
u8 efuseType = EFUSE_BT;
|
||||
|
||||
if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt);
|
||||
|
||||
if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -2296,20 +2296,20 @@ hal_EfusePgPacketWrite_8188e(
|
|||
u8 efuseType = EFUSE_WIFI;
|
||||
|
||||
if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt);
|
||||
|
||||
if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
|
||||
return _FALSE;
|
||||
return false;
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2405,7 +2405,7 @@ static void update_ra_mask_8188e(_adapter *padapter, struct sta_info *psta, stru
|
|||
{
|
||||
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter);
|
||||
|
||||
if (hal_data->fw_ractrl == _TRUE) {
|
||||
if (hal_data->fw_ractrl == true) {
|
||||
u8 arg[4] = {0};
|
||||
|
||||
arg[0] = h2c_macid_cfg->mac_id;/* MACID */
|
||||
|
@ -2461,7 +2461,7 @@ bool rtl8188e_gpio_radio_on_off_check(_adapter *adapter, u8 *valid)
|
|||
bool ret;
|
||||
|
||||
*valid = 0;
|
||||
return _FALSE; /* unblock */
|
||||
return false; /* unblock */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2653,7 +2653,7 @@ Hal_InitPGData88E(PADAPTER padapter)
|
|||
u32 i;
|
||||
u16 value16;
|
||||
|
||||
if (_FALSE == pHalData->bautoload_fail_flag) {
|
||||
if (false == pHalData->bautoload_fail_flag) {
|
||||
/* autoload OK. */
|
||||
if (is_boot_from_eeprom(padapter)) {
|
||||
/* Read all Content from EEPROM or EFUSE. */
|
||||
|
@ -2663,18 +2663,18 @@ Hal_InitPGData88E(PADAPTER padapter)
|
|||
}
|
||||
} else {
|
||||
/* Read EFUSE real map to shadow. */
|
||||
EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, _FALSE);
|
||||
EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false);
|
||||
}
|
||||
} else {
|
||||
/* autoload fail */
|
||||
/* pHalData->AutoloadFailFlag = _TRUE; */
|
||||
/* pHalData->AutoloadFailFlag = true; */
|
||||
/* update to default value 0xFF */
|
||||
if (!is_boot_from_eeprom(padapter))
|
||||
EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, _FALSE);
|
||||
EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
||||
if (check_phy_efuse_tx_power_info_valid(padapter) == _FALSE) {
|
||||
if (check_phy_efuse_tx_power_info_valid(padapter) == false) {
|
||||
if (Hal_readPGDataFromConfigFile(padapter) != _SUCCESS)
|
||||
RTW_ERR("invalid phy efuse and read from file fail, will use driver default!!\n");
|
||||
}
|
||||
|
@ -2695,9 +2695,9 @@ Hal_EfuseParseIDCode88E(
|
|||
EEPROMId = le16_to_cpu(*((__le16 *)hwinfo));
|
||||
if (EEPROMId != RTL_EEPROM_ID) {
|
||||
RTW_INFO("EEPROM ID(%#x) is invalid!!\n", EEPROMId);
|
||||
pHalData->bautoload_fail_flag = _TRUE;
|
||||
pHalData->bautoload_fail_flag = true;
|
||||
} else
|
||||
pHalData->bautoload_fail_flag = _FALSE;
|
||||
pHalData->bautoload_fail_flag = false;
|
||||
|
||||
RTW_INFO("EEPROM ID=0x%04x\n", EEPROMId);
|
||||
}
|
||||
|
@ -2713,8 +2713,8 @@ void Hal_ReadPowerSavingMode88E(
|
|||
u8 tmpvalue;
|
||||
|
||||
if (AutoLoadFail) {
|
||||
pwrctl->bHWPowerdown = _FALSE;
|
||||
pwrctl->bSupportRemoteWakeup = _FALSE;
|
||||
pwrctl->bHWPowerdown = false;
|
||||
pwrctl->bSupportRemoteWakeup = false;
|
||||
} else {
|
||||
|
||||
/* hw power down mode selection , 0:rf-off / 1:power down */
|
||||
|
@ -2726,7 +2726,7 @@ void Hal_ReadPowerSavingMode88E(
|
|||
|
||||
/* decide hw if support remote wakeup function */
|
||||
/* if hw supported, 8051 (SIE) will generate WeakUP signal( D+/D- toggle) when autoresume */
|
||||
pwrctl->bSupportRemoteWakeup = (hwinfo[EEPROM_USB_OPTIONAL_FUNCTION0] & BIT1) ? _TRUE : _FALSE;
|
||||
pwrctl->bSupportRemoteWakeup = (hwinfo[EEPROM_USB_OPTIONAL_FUNCTION0] & BIT1) ? true : false;
|
||||
|
||||
RTW_INFO("%s...bHWPwrPindetect(%x)-bHWPowerdown(%x) ,bSupportRemoteWakeup(%x)\n", __func__,
|
||||
pwrctl->bHWPwrPindetect, pwrctl->bHWPowerdown, pwrctl->bSupportRemoteWakeup);
|
||||
|
@ -3057,7 +3057,7 @@ Hal_ReadThermalMeter_88E(
|
|||
/* pHalData->eeprom_thermal_meter = (tempval&0x1f); */ /* [4:0] */
|
||||
|
||||
if (pHalData->eeprom_thermal_meter == 0xff || AutoloadFail) {
|
||||
pHalData->odmpriv.rf_calibrate_info.is_apk_thermal_meter_ignore = _TRUE;
|
||||
pHalData->odmpriv.rf_calibrate_info.is_apk_thermal_meter_ignore = true;
|
||||
pHalData->eeprom_thermal_meter = EEPROM_Default_ThermalMeter_88E;
|
||||
}
|
||||
|
||||
|
@ -3083,7 +3083,7 @@ void Hal_ReadRFGainOffset(
|
|||
|
||||
if ((pHalData->EEPROMRFGainOffset != 0xFF) &&
|
||||
(pHalData->EEPROMRFGainOffset & BIT4))
|
||||
efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, _FALSE);
|
||||
efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, false);
|
||||
else {
|
||||
pHalData->EEPROMRFGainOffset = 0;
|
||||
pHalData->EEPROMRFGainVal = 0;
|
||||
|
@ -3091,7 +3091,7 @@ void Hal_ReadRFGainOffset(
|
|||
|
||||
RTW_INFO("pHalData->EEPROMRFGainVal=%x\n", pHalData->EEPROMRFGainVal);
|
||||
} else {
|
||||
efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, _FALSE);
|
||||
efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, false);
|
||||
|
||||
if (pHalData->EEPROMRFGainVal != 0xFF)
|
||||
pHalData->EEPROMRFGainOffset = BIT4;
|
||||
|
@ -3101,7 +3101,7 @@ void Hal_ReadRFGainOffset(
|
|||
}
|
||||
|
||||
if (Adapter->registrypriv.RegPwrTrimEnable == 1) {
|
||||
efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, _FALSE);
|
||||
efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, false);
|
||||
RTW_INFO("pHalData->EEPROMRFGainVal=%x\n", pHalData->EEPROMRFGainVal);
|
||||
|
||||
}
|
||||
|
@ -3110,7 +3110,7 @@ void Hal_ReadRFGainOffset(
|
|||
/* */
|
||||
if (((pHalData->EEPROMRFGainOffset != 0xFF) && (pHalData->EEPROMRFGainOffset & BIT4)) || (Adapter->registrypriv.RegPwrTrimEnable == 1)) {
|
||||
|
||||
efuse_OneByteRead(Adapter, EEPROM_THERMAL_OFFSET, &thermal_offset, _FALSE);
|
||||
efuse_OneByteRead(Adapter, EEPROM_THERMAL_OFFSET, &thermal_offset, false);
|
||||
if (thermal_offset != 0xFF) {
|
||||
if (thermal_offset & BIT0)
|
||||
pHalData->eeprom_thermal_meter += ((thermal_offset >> 1) & 0x0F);
|
||||
|
@ -3138,9 +3138,9 @@ bool HalDetectPwrDownMode88E(PADAPTER Adapter)
|
|||
|
||||
/* 2010/08/25 MH INF priority > PDN Efuse value. */
|
||||
if (tmpvalue & BIT(4) && pwrctrlpriv->reg_pdnmode)
|
||||
pHalData->pwrdown = _TRUE;
|
||||
pHalData->pwrdown = true;
|
||||
else
|
||||
pHalData->pwrdown = _FALSE;
|
||||
pHalData->pwrdown = false;
|
||||
|
||||
RTW_INFO("HalDetectPwrDownMode(): PDN=%d\n", pHalData->pwrdown);
|
||||
|
||||
|
@ -3150,7 +3150,7 @@ bool HalDetectPwrDownMode88E(PADAPTER Adapter)
|
|||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
void Hal_DetectWoWMode(PADAPTER pAdapter)
|
||||
{
|
||||
adapter_to_pwrctl(pAdapter)->bSupportRemoteWakeup = _TRUE;
|
||||
adapter_to_pwrctl(pAdapter)->bSupportRemoteWakeup = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3220,21 +3220,21 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
{
|
||||
u8 val8;
|
||||
u8 mode = *((u8 *)val);
|
||||
static u8 isMonitor = _FALSE;
|
||||
static u8 isMonitor = false;
|
||||
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
|
||||
if (isMonitor == _TRUE) {
|
||||
if (isMonitor == true) {
|
||||
/* reset RCR */
|
||||
rtw_write32(Adapter, REG_RCR, pHalData->ReceiveConfig);
|
||||
isMonitor = _FALSE;
|
||||
isMonitor = false;
|
||||
}
|
||||
|
||||
RTW_INFO(ADPT_FMT "- Port-%d set opmode = %d\n", ADPT_ARG(Adapter),
|
||||
get_hw_port(Adapter), mode);
|
||||
|
||||
if (mode == _HW_STATE_MONITOR_) {
|
||||
isMonitor = _TRUE;
|
||||
isMonitor = true;
|
||||
/* set net_type */
|
||||
Set_MSR(Adapter, _HW_STATE_NOLINK_);
|
||||
|
||||
|
@ -3258,12 +3258,12 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
rtw_write8(Adapter, REG_DRVERLYINT, 0x05);/* restore early int time to 5ms */
|
||||
|
||||
UpdateInterruptMask8188EU(Adapter, _TRUE, 0, IMR_BCNDMAINT0_88E);
|
||||
UpdateInterruptMask8188EU(Adapter, true, 0, IMR_BCNDMAINT0_88E);
|
||||
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
|
||||
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
UpdateInterruptMask8188EU(Adapter, _TRUE , 0, (IMR_TBDER_88E | IMR_TBDOK_88E));
|
||||
UpdateInterruptMask8188EU(Adapter, true , 0, (IMR_TBDER_88E | IMR_TBDOK_88E));
|
||||
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
|
||||
|
@ -3284,11 +3284,11 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
} else if (mode == _HW_STATE_AP_) {
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
UpdateInterruptMask8188EU(Adapter, _TRUE , IMR_BCNDMAINT0_88E, 0);
|
||||
UpdateInterruptMask8188EU(Adapter, true , IMR_BCNDMAINT0_88E, 0);
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
|
||||
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
UpdateInterruptMask8188EU(Adapter, _TRUE , (IMR_TBDER_88E | IMR_TBDOK_88E), 0);
|
||||
UpdateInterruptMask8188EU(Adapter, true , (IMR_TBDER_88E | IMR_TBDOK_88E), 0);
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
|
||||
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
|
||||
|
@ -3355,7 +3355,7 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||
/* Reset TSF for STA+AP concurrent mode */
|
||||
if (rtw_mi_buddy_check_fwstate(Adapter, (WIFI_STATION_STATE | WIFI_ASOC_STATE))) {
|
||||
if (reset_tsf(Adapter, HW_PORT1) == _FALSE)
|
||||
if (reset_tsf(Adapter, HW_PORT1) == false)
|
||||
RTW_INFO("ERROR! %s()-%d: Reset port1 TSF fail\n",
|
||||
__func__, __LINE__);
|
||||
}
|
||||
|
@ -3381,11 +3381,11 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
rtw_write8(Adapter, REG_DRVERLYINT, 0x05);/* restore early int time to 5ms */
|
||||
UpdateInterruptMask8188EU(Adapter, _TRUE, 0, IMR_BCNDMAINT0_88E);
|
||||
UpdateInterruptMask8188EU(Adapter, true, 0, IMR_BCNDMAINT0_88E);
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
|
||||
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
UpdateInterruptMask8188EU(Adapter, _TRUE , 0, (IMR_TBDER_88E | IMR_TBDOK_88E));
|
||||
UpdateInterruptMask8188EU(Adapter, true , 0, (IMR_TBDER_88E | IMR_TBDOK_88E));
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
|
||||
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
|
||||
|
@ -3405,11 +3405,11 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
} else if (mode == _HW_STATE_AP_) {
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
UpdateInterruptMask8188EU(Adapter, _TRUE , IMR_BCNDMAINT0_88E, 0);
|
||||
UpdateInterruptMask8188EU(Adapter, true , IMR_BCNDMAINT0_88E, 0);
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
|
||||
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
UpdateInterruptMask8188EU(Adapter, _TRUE , (IMR_TBDER_88E | IMR_TBDOK_88E), 0);
|
||||
UpdateInterruptMask8188EU(Adapter, true , (IMR_TBDER_88E | IMR_TBDOK_88E), 0);
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
|
||||
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
|
||||
|
@ -3476,7 +3476,7 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||
/* Reset TSF for STA+AP concurrent mode */
|
||||
if (rtw_mi_buddy_check_fwstate(Adapter, (WIFI_STATION_STATE | WIFI_ASOC_STATE))) {
|
||||
if (reset_tsf(Adapter, HW_PORT0) == _FALSE)
|
||||
if (reset_tsf(Adapter, HW_PORT0) == false)
|
||||
RTW_INFO("ERROR! %s()-%d: Reset port0 TSF fail\n",
|
||||
__func__, __LINE__);
|
||||
}
|
||||
|
@ -3542,12 +3542,12 @@ static void hw_var_set_correct_tsf(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
if (iface == Adapter)
|
||||
continue;
|
||||
|
||||
if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == _TRUE
|
||||
&& check_fwstate(&iface->mlmepriv, WIFI_ASOC_STATE) == _TRUE
|
||||
if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == true
|
||||
&& check_fwstate(&iface->mlmepriv, WIFI_ASOC_STATE) == true
|
||||
) {
|
||||
rtw_hal_correct_tsf(iface, iface->hw_port, tsf);
|
||||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||
if (reset_tsf(iface, iface->hw_port) == _FALSE)
|
||||
if (reset_tsf(iface, iface->hw_port) == false)
|
||||
RTW_INFO("%s-[ERROR] "ADPT_FMT" Reset port%d TSF fail\n", __func__, ADPT_ARG(iface), iface->hw_port);
|
||||
#endif /* CONFIG_TSF_RESET_OFFLOAD*/
|
||||
}
|
||||
|
@ -3568,7 +3568,7 @@ static void hw_var_set_mlme_disconnect(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
rtw_write32(Adapter, REG_RCR, rtw_read32(padapter, REG_RCR) & ~RCR_ADF);
|
||||
reject all data frames */
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_mi_check_status(Adapter, MI_LINKED) == _FALSE)
|
||||
if (rtw_mi_check_status(Adapter, MI_LINKED) == false)
|
||||
#endif
|
||||
rtw_write16(Adapter, REG_RXFLTMAP2, 0x00);
|
||||
|
||||
|
@ -3630,7 +3630,7 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
|
||||
#ifdef CONFIG_TDLS
|
||||
/* TDLS will clear RCR_CBSSID_DATA bit for connection.*/
|
||||
else if (Adapter->tdlsinfo.link_established == _TRUE)
|
||||
else if (Adapter->tdlsinfo.link_established == true)
|
||||
rcr_clear_bit = RCR_CBSSID_BCN;
|
||||
#endif /*CONFIG_TDLS*/
|
||||
|
||||
|
@ -3656,13 +3656,13 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
continue;
|
||||
|
||||
if (rtw_linked_check(iface) &&
|
||||
check_fwstate(&(iface->mlmepriv), WIFI_AP_STATE) != _TRUE) {
|
||||
check_fwstate(&(iface->mlmepriv), WIFI_AP_STATE) != true) {
|
||||
if (iface->hw_port == HW_PORT1)
|
||||
rtw_write8(iface, REG_BCN_CTRL_1, rtw_read8(iface, REG_BCN_CTRL_1) | DIS_TSF_UDT);
|
||||
else
|
||||
rtw_write8(iface, REG_BCN_CTRL, rtw_read8(iface, REG_BCN_CTRL) | DIS_TSF_UDT);
|
||||
|
||||
iface->mlmeextpriv.en_hw_update_tsf = _FALSE;
|
||||
iface->mlmeextpriv.en_hw_update_tsf = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3708,14 +3708,14 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
if (!iface)
|
||||
continue;
|
||||
if (rtw_linked_check(iface) &&
|
||||
check_fwstate(&(iface->mlmepriv), WIFI_AP_STATE) != _TRUE) {
|
||||
check_fwstate(&(iface->mlmepriv), WIFI_AP_STATE) != true) {
|
||||
/* enable HW TSF update when recive beacon*/
|
||||
/*if (iface->hw_port == HW_PORT1)
|
||||
rtw_write8(iface, REG_BCN_CTRL_1, rtw_read8(iface, REG_BCN_CTRL_1)&(~(DIS_TSF_UDT)));
|
||||
else
|
||||
rtw_write8(iface, REG_BCN_CTRL, rtw_read8(iface, REG_BCN_CTRL)&(~(DIS_TSF_UDT)));
|
||||
*/
|
||||
iface->mlmeextpriv.en_hw_update_tsf = _TRUE;
|
||||
iface->mlmeextpriv.en_hw_update_tsf = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -3759,12 +3759,12 @@ static void hw_var_set_mlme_join(PADAPTER Adapter, u8 variable, u8 *val)
|
|||
else
|
||||
rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR) | RCR_CBSSID_DATA | RCR_CBSSID_BCN);
|
||||
#endif
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48;
|
||||
else /* Ad-hoc Mode */
|
||||
RetryLimit = 0x7;
|
||||
} else if (type == 1) { /* joinbss_event call back when join res < 0 */
|
||||
if (rtw_mi_check_status(Adapter, MI_LINKED) == _FALSE)
|
||||
if (rtw_mi_check_status(Adapter, MI_LINKED) == false)
|
||||
rtw_write16(Adapter, REG_RXFLTMAP2, 0x00);
|
||||
|
||||
if (rtw_mi_check_status(Adapter, MI_AP_MODE)) {
|
||||
|
@ -3906,7 +3906,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
|
|||
} else
|
||||
rtw_write32(adapter, REG_RCR, rtw_read32(adapter, REG_RCR) | RCR_CBSSID_DATA | RCR_CBSSID_BCN);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48;
|
||||
else /* Ad-hoc Mode */
|
||||
RetryLimit = 0x7;
|
||||
|
@ -4072,7 +4072,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
|
|||
/* Forece leave RF low power mode for 1T1R to prevent conficting setting in Fw power */
|
||||
/* saving sequence. 2010.06.07. Added by tynli. Suggested by SD3 yschang. */
|
||||
if (psmode != PS_MODE_ACTIVE)
|
||||
odm_rf_saving(podmpriv, _TRUE);
|
||||
odm_rf_saving(podmpriv, true);
|
||||
rtl8188e_set_FwPwrMode_cmd(adapter, psmode);
|
||||
}
|
||||
break;
|
||||
|
@ -4130,7 +4130,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
|
|||
/* keep sn */
|
||||
adapter->xmitpriv.nqos_ssn = rtw_read16(adapter, REG_NQOS_SEQ);
|
||||
|
||||
if (pwrpriv->bkeepfwalive != _TRUE) {
|
||||
if (pwrpriv->bkeepfwalive != true) {
|
||||
/* RX DMA stop */
|
||||
rtw_write32(adapter, REG_RXPKT_NUM, (rtw_read32(adapter, REG_RXPKT_NUM) | RW_RELEASE_EN));
|
||||
do {
|
||||
|
@ -4451,22 +4451,22 @@ void GetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
|
|||
break;
|
||||
case HW_VAR_BCN_VALID:
|
||||
/* BCN_VALID, BIT16 of REG_TDECTRL = BIT0 of REG_TDECTRL+2 */
|
||||
val[0] = (BIT0 & rtw_read8(adapter, REG_TDECTRL + 2)) ? _TRUE : _FALSE;
|
||||
val[0] = (BIT0 & rtw_read8(adapter, REG_TDECTRL + 2)) ? true : false;
|
||||
break;
|
||||
case HW_VAR_FWLPS_RF_ON: {
|
||||
/* When we halt NIC, we should check if FW LPS is leave. */
|
||||
if (adapter_to_pwrctl(adapter)->rf_pwrstate == rf_off) {
|
||||
/* If it is in HW/SW Radio OFF or IPS state, we do not check Fw LPS Leave, */
|
||||
/* because Fw is unload. */
|
||||
val[0] = _TRUE;
|
||||
val[0] = true;
|
||||
} else {
|
||||
u32 valRCR;
|
||||
valRCR = rtw_read32(adapter, REG_RCR);
|
||||
valRCR &= 0x00070000;
|
||||
if (valRCR)
|
||||
val[0] = _FALSE;
|
||||
val[0] = false;
|
||||
else
|
||||
val[0] = _TRUE;
|
||||
val[0] = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -4474,7 +4474,7 @@ void GetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
|
|||
*((u16 *)(val)) = pHalData->EfuseUsedBytes;
|
||||
break;
|
||||
case HW_VAR_CHK_HI_QUEUE_EMPTY:
|
||||
*val = ((rtw_read32(adapter, REG_HGQ_INFO) & 0x0000ff00) == 0) ? _TRUE : _FALSE;
|
||||
*val = ((rtw_read32(adapter, REG_HGQ_INFO) & 0x0000ff00) == 0) ? true : false;
|
||||
break;
|
||||
case HW_VAR_DUMP_MAC_QUEUE_INFO:
|
||||
dump_mac_qinfo_88e(val, adapter);
|
||||
|
@ -4490,7 +4490,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel)
|
|||
{
|
||||
int i;
|
||||
u8 mac_id;
|
||||
u8 bLinked = _FALSE;
|
||||
u8 bLinked = false;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj);
|
||||
|
@ -4500,7 +4500,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel)
|
|||
iface = dvobj->padapters[i];
|
||||
if ((iface) && rtw_is_adapter_up(iface)) {
|
||||
if (rtw_linked_check(iface)) {
|
||||
bLinked = _TRUE;
|
||||
bLinked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4514,7 +4514,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel)
|
|||
|
||||
if (bLinked) {
|
||||
_RTW_PRINT_SEL(sel , "============ RA status - Mac_id:%d ===================\n", mac_id);
|
||||
if (pHalData->fw_ractrl == _FALSE) {
|
||||
if (pHalData->fw_ractrl == false) {
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
_RTW_PRINT_SEL(sel , "Mac_id:%d ,RSSI:%d(%%)\n", mac_id, pHalData->odmpriv.ra_info[mac_id].rssi_sta_ra);
|
||||
|
||||
|
@ -4528,7 +4528,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel)
|
|||
#endif /* (RATE_ADAPTIVE_SUPPORT == 1)*/
|
||||
} else {
|
||||
u8 cur_rate = rtw_read8(padapter, REG_ADAPTIVE_DATA_RATE_0 + mac_id);
|
||||
u8 sgi = (cur_rate & BIT7) ? _TRUE : _FALSE;
|
||||
u8 sgi = (cur_rate & BIT7) ? true : false;
|
||||
|
||||
cur_rate &= 0x7f;
|
||||
|
||||
|
@ -4552,7 +4552,7 @@ GetHalDefVar8188E(
|
|||
switch (eVariable) {
|
||||
case HAL_DEF_IS_SUPPORT_ANT_DIV:
|
||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||
*((u8 *)pValue) = (pHalData->AntDivCfg == 0) ? _FALSE : _TRUE;
|
||||
*((u8 *)pValue) = (pHalData->AntDivCfg == 0) ? false : true;
|
||||
#endif
|
||||
break;
|
||||
case HAL_DEF_DRVINFO_SZ:
|
||||
|
@ -4589,7 +4589,7 @@ GetHalDefVar8188E(
|
|||
break;
|
||||
case HAL_DEF_EXPLICIT_BEAMFORMEE:
|
||||
case HAL_DEF_EXPLICIT_BEAMFORMER:
|
||||
*((u8 *)pValue) = _FALSE;
|
||||
*((u8 *)pValue) = false;
|
||||
break;
|
||||
|
||||
case HW_DEF_RA_INFO_DUMP:
|
||||
|
@ -4606,7 +4606,7 @@ GetHalDefVar8188E(
|
|||
*(u8 *)pValue = WMM_NORMAL_TX_PAGE_BOUNDARY_88E(Adapter);
|
||||
break;
|
||||
case HAL_DEF_MACID_SLEEP:
|
||||
*(u8 *)pValue = _TRUE; /* support macid sleep */
|
||||
*(u8 *)pValue = true; /* support macid sleep */
|
||||
break;
|
||||
case HAL_DEF_RX_DMA_SZ_WOW:
|
||||
*(u32 *)pValue = RX_DMA_SIZE_88E(Adapter) - RESV_FMWF;
|
||||
|
|
|
@ -54,18 +54,18 @@ sic_IsSICReady(
|
|||
PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
bool bRet = _FALSE;
|
||||
bool bRet = false;
|
||||
u32 retryCnt = 0;
|
||||
u8 sic_cmd = 0xff;
|
||||
|
||||
while (1) {
|
||||
if (retryCnt++ >= SIC_MAX_POLL_CNT) {
|
||||
/* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady() return FALSE\n")); */
|
||||
return _FALSE;
|
||||
/* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady() return false\n")); */
|
||||
return false;
|
||||
}
|
||||
|
||||
/* if(RT_SDIO_CANNOT_IO(Adapter)) */
|
||||
/* return _FALSE; */
|
||||
/* return false; */
|
||||
|
||||
sic_cmd = rtw_read8(Adapter, SIC_CMD_REG);
|
||||
/* sic_cmd = PlatformEFIORead1Byte(Adapter, SIC_CMD_REG); */
|
||||
|
@ -74,7 +74,7 @@ sic_IsSICReady(
|
|||
#endif
|
||||
/* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady(), readback 0x%x=0x%x\n", SIC_CMD_REG, sic_cmd)); */
|
||||
if (sic_cmd == SIC_CMD_READY)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else {
|
||||
rtw_msleep_os(1);
|
||||
/* delay_ms(1); */
|
||||
|
@ -271,7 +271,7 @@ SIC_LedOff(
|
|||
{
|
||||
/* When SIC is enabled, led pin will be used as debug pin, */
|
||||
/* so don't execute led function when SIC is enabled. */
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -758,7 +758,7 @@ phy_BB8190_Config_HardCode(
|
|||
PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
/* RT_ASSERT(FALSE, ("This function is not implement yet!!\n")); */
|
||||
/* RT_ASSERT(false, ("This function is not implement yet!!\n")); */
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1237,7 +1237,7 @@ PHY_GetTxPowerIndex_8188E(
|
|||
u8 base_idx = 0, power_idx = 0;
|
||||
s8 by_rate_diff = 0, limit = 0, tpt_offset = 0, extra_bias = 0;
|
||||
u8 txNum = phy_GetCurrentTxNum_8188E(pAdapter, Rate);
|
||||
bool bIn24G = _FALSE;
|
||||
bool bIn24G = false;
|
||||
|
||||
base_idx = PHY_GetTxPowerIndexBase(pAdapter, RFPath, Rate, BandWidth, Channel, &bIn24G);
|
||||
|
||||
|
@ -1280,7 +1280,7 @@ PHY_UpdateTxPowerDbm8188E(
|
|||
int powerInDbm
|
||||
)
|
||||
{
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1347,7 +1347,7 @@ _PHY_SetBWMode88E(
|
|||
/* u64 BeginTime, EndTime; */
|
||||
|
||||
if (pHalData->rf_chip == RF_PSEUDO_11N) {
|
||||
/* pHalData->SetBWModeInProgress= _FALSE; */
|
||||
/* pHalData->SetBWModeInProgress= false; */
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1457,11 +1457,11 @@ _PHY_SetBWMode88E(
|
|||
break;
|
||||
|
||||
default:
|
||||
/* RT_ASSERT(FALSE, ("Unknown RFChipID: %d\n", pHalData->RFChipID)); */
|
||||
/* RT_ASSERT(false, ("Unknown RFChipID: %d\n", pHalData->RFChipID)); */
|
||||
break;
|
||||
}
|
||||
|
||||
/* pHalData->SetBWModeInProgress= FALSE; */
|
||||
/* pHalData->SetBWModeInProgress= false; */
|
||||
|
||||
}
|
||||
|
||||
|
@ -1495,7 +1495,7 @@ PHY_SetBWMode8188E(
|
|||
/* if(pHalData->SetBWModeInProgress) */
|
||||
/* return; */
|
||||
|
||||
/* pHalData->SetBWModeInProgress= TRUE; */
|
||||
/* pHalData->SetBWModeInProgress= true; */
|
||||
|
||||
pHalData->current_channel_bw = Bandwidth;
|
||||
|
||||
|
@ -1506,7 +1506,7 @@ PHY_SetBWMode8188E(
|
|||
if (IS_VENDOR_8188E_I_CUT_SERIES(Adapter))
|
||||
phy_SpurCalibration_8188E(Adapter);
|
||||
} else {
|
||||
/* pHalData->SetBWModeInProgress= FALSE; */
|
||||
/* pHalData->SetBWModeInProgress= false; */
|
||||
pHalData->current_channel_bw = tmpBW;
|
||||
}
|
||||
|
||||
|
@ -1545,7 +1545,7 @@ PHY_SwChnl8188E(/* Call after initialization */
|
|||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
u8 tmpchannel = pHalData->current_channel;
|
||||
bool bResult = _TRUE;
|
||||
bool bResult = true;
|
||||
|
||||
if (pHalData->rf_chip == RF_PSEUDO_11N)
|
||||
return; /* return immediately if it is peudo-phy */
|
||||
|
@ -1635,7 +1635,7 @@ static void _PHY_SetRFPathSwitch(
|
|||
|
||||
}
|
||||
|
||||
/* return value TRUE => Main; FALSE => Aux */
|
||||
/* return value true => Main; false => Aux */
|
||||
|
||||
static bool _PHY_QueryRFPathSwitch(
|
||||
PADAPTER pAdapter,
|
||||
|
@ -1643,7 +1643,7 @@ static bool _PHY_QueryRFPathSwitch(
|
|||
)
|
||||
{
|
||||
/* if(is2T)
|
||||
* return _TRUE; */
|
||||
* return true; */
|
||||
|
||||
if (!rtw_is_hw_init_completed(pAdapter)) {
|
||||
phy_set_bb_reg(pAdapter, REG_LEDCFG0, BIT23, 0x01);
|
||||
|
@ -1652,14 +1652,14 @@ static bool _PHY_QueryRFPathSwitch(
|
|||
|
||||
if (is2T) {
|
||||
if (phy_query_bb_reg(pAdapter, rFPGA0_XB_RFInterfaceOE, BIT5 | BIT6) == 0x01)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
} else {
|
||||
if (phy_query_bb_reg(pAdapter, rFPGA0_XA_RFInterfaceOE, 0x300) == 0x02)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,17 +64,17 @@ void handle_txrpt_ccx_88e(_adapter *adapter, u8 *buf)
|
|||
void _dbg_dump_tx_info(_adapter *padapter, int frame_tag, struct tx_desc *ptxdesc)
|
||||
{
|
||||
u8 bDumpTxPkt;
|
||||
u8 bDumpTxDesc = _FALSE;
|
||||
u8 bDumpTxDesc = false;
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(bDumpTxPkt));
|
||||
|
||||
if (bDumpTxPkt == 1) { /* dump txdesc for data frame */
|
||||
RTW_INFO("dump tx_desc for data frame\n");
|
||||
if ((frame_tag & 0x0f) == DATA_FRAMETAG)
|
||||
bDumpTxDesc = _TRUE;
|
||||
bDumpTxDesc = true;
|
||||
} else if (bDumpTxPkt == 2) { /* dump txdesc for mgnt frame */
|
||||
RTW_INFO("dump tx_desc for mgnt frame\n");
|
||||
if ((frame_tag & 0x0f) == MGNT_FRAMETAG)
|
||||
bDumpTxDesc = _TRUE;
|
||||
bDumpTxDesc = true;
|
||||
} else if (bDumpTxPkt == 3) { /* dump early info */
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ SwLedOn_8188EU(
|
|||
break;
|
||||
}
|
||||
|
||||
pLed->bLedOn = _TRUE;
|
||||
pLed->bLedOn = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,7 +90,7 @@ SwLedOff_8188EU(
|
|||
|
||||
switch (pLed->LedPin) {
|
||||
case LED_PIN_LED0:
|
||||
if (pHalData->bLedOpenDrain == _TRUE) { /* Open-drain arrangement for controlling the LED) */
|
||||
if (pHalData->bLedOpenDrain == true) { /* Open-drain arrangement for controlling the LED) */
|
||||
LedCfg &= 0x90; /* Set to software control. */
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg | BIT3));
|
||||
LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
|
||||
|
@ -109,7 +109,7 @@ SwLedOff_8188EU(
|
|||
break;
|
||||
}
|
||||
exit:
|
||||
pLed->bLedOn = _FALSE;
|
||||
pLed->bLedOn = false;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ void rtl8188e_fill_fake_txdesc(
|
|||
ptxdesc->txdw3 |= cpu_to_le32((8 << 28)); /* set bit3 to 1. Suugested by TimChen. 2009.12.29. */
|
||||
}
|
||||
|
||||
if (_TRUE == IsBTQosNull) {
|
||||
if (true == IsBTQosNull) {
|
||||
ptxdesc->txdw2 |= cpu_to_le32(BIT(23)); /* BT NULL */
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ void rtl8188e_fill_fake_txdesc(
|
|||
/* */
|
||||
/* Encrypt the data frame if under security mode excepct null data. Suggested by CCW. */
|
||||
/* */
|
||||
if (_TRUE == bDataFrame) {
|
||||
if (true == bDataFrame) {
|
||||
u32 EncAlg;
|
||||
|
||||
EncAlg = padapter->securitypriv.dot11PrivacyAlgrthm;
|
||||
|
@ -255,7 +255,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba
|
|||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
if (padapter->registrypriv.mp_mode == 0) {
|
||||
/* if((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)==0)) */ /* (sz %512) != 0 */
|
||||
if ((PACKET_OFFSET_SZ != 0) && (!bagg_pkt) && (rtw_usb_bulk_size_boundary(padapter, TXDESC_SIZE + sz) == _FALSE)) {
|
||||
if ((PACKET_OFFSET_SZ != 0) && (!bagg_pkt) && (rtw_usb_bulk_size_boundary(padapter, TXDESC_SIZE + sz) == false)) {
|
||||
ptxdesc = (struct tx_desc *)(pmem + PACKET_OFFSET_SZ);
|
||||
/* RTW_INFO("==> non-agg-pkt,shift pointer...\n"); */
|
||||
pull = 1;
|
||||
|
@ -316,7 +316,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba
|
|||
fill_txdesc_force_bmc_camid(pattrib, ptxdesc);
|
||||
#endif
|
||||
|
||||
if (pattrib->ampdu_en == _TRUE) {
|
||||
if (pattrib->ampdu_en == true) {
|
||||
ptxdesc->txdw2 |= cpu_to_le32(AGG_EN);/* AGG EN */
|
||||
ptxdesc->txdw2 |= cpu_to_le32((pattrib->ampdu_spacing <<
|
||||
AMPDU_DENSITY_SHT) & 0x00700000);
|
||||
|
@ -363,7 +363,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba
|
|||
ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);/* DATA/RTS Rate FB LMT */
|
||||
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
if (pHalData->fw_ractrl == _FALSE) {
|
||||
if (pHalData->fw_ractrl == false) {
|
||||
/* driver-based RA*/
|
||||
/* driver uses rate */
|
||||
ptxdesc->txdw4 |= cpu_to_le32(USERATE);/* rate control always by driver */
|
||||
|
@ -472,7 +472,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba
|
|||
|
||||
/* offset 20 */
|
||||
ptxdesc->txdw5 |= cpu_to_le32(RTY_LMT_EN);/* retry limit enable */
|
||||
if (pattrib->retry_ctrl == _TRUE)
|
||||
if (pattrib->retry_ctrl == true)
|
||||
ptxdesc->txdw5 |= cpu_to_le32(0x00180000);/* retry limit = 6 */
|
||||
else
|
||||
ptxdesc->txdw5 |= cpu_to_le32(0x00300000);/* retry limit = 12 */
|
||||
|
@ -621,7 +621,7 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
} else /* no frag */
|
||||
sz = pattrib->last_txcmdsz;
|
||||
|
||||
pull = update_txdesc(pxmitframe, mem_addr, sz, _FALSE);
|
||||
pull = update_txdesc(pxmitframe, mem_addr, sz, false);
|
||||
|
||||
if (pull) {
|
||||
mem_addr += PACKET_OFFSET_SZ; /* pull txdesc head */
|
||||
|
@ -710,7 +710,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
u32 ff_hwaddr;
|
||||
|
||||
_list *sta_plist, *sta_phead;
|
||||
u8 single_sta_in_queue = _FALSE;
|
||||
u8 single_sta_in_queue = false;
|
||||
|
||||
#ifndef IDEA_CONDITION
|
||||
int res = _SUCCESS;
|
||||
|
@ -723,7 +723,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
|
||||
if (pxmitbuf == NULL) {
|
||||
/* RTW_INFO("%s #1, connot alloc xmitbuf!!!!\n",__func__); */
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -737,7 +737,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
/* no more xmit frame, release xmit buffer */
|
||||
/* RTW_INFO("no more xmit frame ,return\n"); */
|
||||
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef IDEA_CONDITION
|
||||
|
@ -765,7 +765,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
pxmitframe->pkt_offset = (PACKET_OFFSET_SZ / 8); /* 1; */ /* first frame of aggregation, reserve offset */
|
||||
#endif
|
||||
|
||||
if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == _FALSE) {
|
||||
if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == false) {
|
||||
RTW_INFO("%s coalesce 1st xmitframe failed\n", __func__);
|
||||
continue;
|
||||
}
|
||||
|
@ -842,7 +842,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
xmitframe_phead = get_list_head(&ptxservq->sta_pending);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == _FALSE) {
|
||||
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
|
@ -888,7 +888,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
/* pxmitframe->pxmitbuf = pxmitbuf; */
|
||||
pxmitframe->buf_addr = pxmitbuf->pbuf + pbuf;
|
||||
|
||||
if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == _FALSE) {
|
||||
if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == false) {
|
||||
RTW_INFO("%s coalesce failed\n", __func__);
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
continue;
|
||||
|
@ -899,7 +899,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
|
||||
/* (len - TXDESC_SIZE) == pxmitframe->attrib.last_txcmdsz */
|
||||
update_txdesc(pxmitframe, pxmitframe->buf_addr, pxmitframe->attrib.last_txcmdsz, _TRUE);
|
||||
update_txdesc(pxmitframe, pxmitframe->buf_addr, pxmitframe->attrib.last_txcmdsz, true);
|
||||
|
||||
/* don't need xmitframe any more */
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
|
@ -926,9 +926,9 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
bulkPtr = ((pbuf / bulkSize) + 1) * bulkSize;
|
||||
}
|
||||
} /* end while( aggregate same priority and same DA(AP or STA) frames) */
|
||||
if (_rtw_queue_empty(&ptxservq->sta_pending) == _TRUE)
|
||||
if (_rtw_queue_empty(&ptxservq->sta_pending) == true)
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
else if (single_sta_in_queue == _FALSE) {
|
||||
else if (single_sta_in_queue == false) {
|
||||
/* Re-arrange the order of stations in this ac queue to balance the service for these stations */
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmit->sta_queue));
|
||||
|
@ -954,7 +954,7 @@ agg_end:
|
|||
}
|
||||
#endif /* CONFIG_USE_USB_BUFFER_ALLOC_TX */
|
||||
|
||||
update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz, _TRUE);
|
||||
update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz, true);
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
/* prepare EM info for first frame, agg_num value start from 1 */
|
||||
|
@ -980,7 +980,7 @@ agg_end:
|
|||
|
||||
rtw_free_xmitframe(pxmitpriv, pfirstframe);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -1000,7 +1000,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
if (pxmitbuf == NULL) {
|
||||
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
|
||||
if (!pxmitbuf)
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1035,14 +1035,14 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
|
||||
} else {
|
||||
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
} while (0/*xcnt < (NR_XMITFRAME >> 3)*/);
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -1065,8 +1065,8 @@ static s32 xmitframe_direct(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
|
||||
/*
|
||||
* Return
|
||||
* _TRUE dump packet directly
|
||||
* _FALSE enqueue packet
|
||||
* true dump packet directly
|
||||
* false enqueue packet
|
||||
*/
|
||||
static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
|
@ -1086,7 +1086,7 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
goto enqueue;
|
||||
}
|
||||
|
||||
if (rtw_xmit_ac_blocked(padapter) == _TRUE)
|
||||
if (rtw_xmit_ac_blocked(padapter) == true)
|
||||
goto enqueue;
|
||||
|
||||
if (DEV_STA_LG_NUM(padapter->dvobj))
|
||||
|
@ -1107,7 +1107,7 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
enqueue:
|
||||
res = rtw_xmitframe_enqueue(padapter, pxmitframe);
|
||||
|
@ -1117,10 +1117,10 @@ enqueue:
|
|||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
|
||||
pxmitpriv->tx_drop++;
|
||||
return _TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 rtl8188eu_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe)
|
||||
|
@ -1130,8 +1130,8 @@ s32 rtl8188eu_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe)
|
|||
|
||||
/*
|
||||
* Return
|
||||
* _TRUE dump packet directly ok
|
||||
* _FALSE temporary can't transmit packets to hardware
|
||||
* true dump packet directly ok
|
||||
* false temporary can't transmit packets to hardware
|
||||
*/
|
||||
s32 rtl8188eu_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ static bool HalUsbSetQueuePipeMapping8188EUsb(
|
|||
)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||
bool result = _FALSE;
|
||||
bool result = false;
|
||||
|
||||
_ConfigNormalChipOutEP_8188E(pAdapter, NumOutPipe);
|
||||
|
||||
|
@ -123,10 +123,10 @@ static u32 _InitPowerOn_8188EU(_adapter *padapter)
|
|||
{
|
||||
u16 value16;
|
||||
/* HW Power on sequence */
|
||||
u8 bMacPwrCtrlOn = _FALSE;
|
||||
u8 bMacPwrCtrlOn = false;
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
|
||||
if (bMacPwrCtrlOn == _TRUE)
|
||||
if (bMacPwrCtrlOn == true)
|
||||
return _SUCCESS;
|
||||
|
||||
if (!HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, Rtl8188E_NIC_PWR_ON_FLOW)) {
|
||||
|
@ -146,7 +146,7 @@ static u32 _InitPowerOn_8188EU(_adapter *padapter)
|
|||
|
||||
rtw_write16(padapter, REG_CR, value16);
|
||||
|
||||
bMacPwrCtrlOn = _TRUE;
|
||||
bMacPwrCtrlOn = true;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
|
||||
|
||||
return _SUCCESS;
|
||||
|
@ -172,7 +172,7 @@ static void _InitPABias(_adapter *padapter)
|
|||
|
||||
/* FIXED PA current issue */
|
||||
/* efuse_one_byte_read(padapter, 0x1FA, &pa_setting); */
|
||||
efuse_OneByteRead(padapter, 0x1FA, &pa_setting, _FALSE);
|
||||
efuse_OneByteRead(padapter, 0x1FA, &pa_setting, false);
|
||||
|
||||
if (!(pa_setting & BIT0)) {
|
||||
phy_set_rf_reg(padapter, RF_PATH_A, 0x15, 0x0FFFFF, 0x0F406);
|
||||
|
@ -408,7 +408,7 @@ _InitNormalChipOneOutEpPriority(
|
|||
value = QUEUE_NORMAL;
|
||||
break;
|
||||
default:
|
||||
/* RT_ASSERT(FALSE,("Shall not reach here!\n")); */
|
||||
/* RT_ASSERT(false,("Shall not reach here!\n")); */
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -449,7 +449,7 @@ _InitNormalChipTwoOutEpPriority(
|
|||
valueLow = QUEUE_NORMAL;
|
||||
break;
|
||||
default:
|
||||
/* RT_ASSERT(FALSE,("Shall not reach here!\n")); */
|
||||
/* RT_ASSERT(false,("Shall not reach here!\n")); */
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -517,7 +517,7 @@ _InitQueuePriority(
|
|||
_InitNormalChipThreeOutEpPriority(Adapter);
|
||||
break;
|
||||
default:
|
||||
/* RT_ASSERT(FALSE,("Shall not reach here!\n")); */
|
||||
/* RT_ASSERT(false,("Shall not reach here!\n")); */
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -741,7 +741,7 @@ usb_AggSettingTxUpdate(
|
|||
u32 value32;
|
||||
|
||||
if (Adapter->registrypriv.wifi_spec)
|
||||
pHalData->UsbTxAggMode = _FALSE;
|
||||
pHalData->UsbTxAggMode = false;
|
||||
|
||||
if (pHalData->UsbTxAggMode) {
|
||||
value32 = rtw_read32(Adapter, REG_TDECTRL);
|
||||
|
@ -846,7 +846,7 @@ usb_AggSettingRxUpdate(
|
|||
pHalData->HwRxPageSize = 1024;
|
||||
break;
|
||||
default:
|
||||
/* RT_ASSERT(FALSE, ("RX_PAGE_SIZE_REG_VALUE definition is incorrect!\n")); */
|
||||
/* RT_ASSERT(false, ("RX_PAGE_SIZE_REG_VALUE definition is incorrect!\n")); */
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -866,7 +866,7 @@ InitUsbAggregationSetting(
|
|||
usb_AggSettingRxUpdate(Adapter);
|
||||
|
||||
/* 201/12/10 MH Add for USB agg mode dynamic switch. */
|
||||
pHalData->UsbRxHighSpeedMode = _FALSE;
|
||||
pHalData->UsbRxHighSpeedMode = false;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1144,12 +1144,12 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
|
|||
_ps_open_RF(Adapter);
|
||||
|
||||
if (pHalData->bIQKInitialized) {
|
||||
/* PHY_IQCalibrate(padapter, _TRUE); */
|
||||
phy_iq_calibrate_8188e(Adapter, _TRUE);
|
||||
/* PHY_IQCalibrate(padapter, true); */
|
||||
phy_iq_calibrate_8188e(Adapter, true);
|
||||
} else {
|
||||
/* PHY_IQCalibrate(padapter, _FALSE); */
|
||||
phy_iq_calibrate_8188e(Adapter, _FALSE);
|
||||
pHalData->bIQKInitialized = _TRUE;
|
||||
/* PHY_IQCalibrate(padapter, false); */
|
||||
phy_iq_calibrate_8188e(Adapter, false);
|
||||
pHalData->bIQKInitialized = true;
|
||||
}
|
||||
|
||||
/* dm_check_txpowertracking(padapter);
|
||||
|
@ -1172,7 +1172,7 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
|
|||
/* Save target channel */
|
||||
/* <Roger_Notes> Current Channel will be updated again later. */
|
||||
pHalData->current_channel = 6;/* default set to 6 */
|
||||
if (pwrctrlpriv->reg_rfoff == _TRUE)
|
||||
if (pwrctrlpriv->reg_rfoff == true)
|
||||
pwrctrlpriv->rf_pwrstate = rf_off;
|
||||
|
||||
/* 2010/08/09 MH We need to check if we need to turnon or off RF after detecting */
|
||||
|
@ -1200,18 +1200,18 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
|
|||
|
||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_DOWNLOAD_FW);
|
||||
if (Adapter->registrypriv.mp_mode == 0) {
|
||||
status = rtl8188e_FirmwareDownload(Adapter, _FALSE);
|
||||
status = rtl8188e_FirmwareDownload(Adapter, false);
|
||||
if (status != _SUCCESS) {
|
||||
RTW_INFO("%s: Download Firmware failed!!\n", __func__);
|
||||
Adapter->bFWReady = _FALSE;
|
||||
pHalData->fw_ractrl = _FALSE;
|
||||
Adapter->bFWReady = false;
|
||||
pHalData->fw_ractrl = false;
|
||||
return status;
|
||||
} else {
|
||||
Adapter->bFWReady = _TRUE;
|
||||
Adapter->bFWReady = true;
|
||||
#ifdef CONFIG_SFW_SUPPORTED
|
||||
pHalData->fw_ractrl = IS_VENDOR_8188E_I_CUT_SERIES(Adapter) ? _TRUE : _FALSE;
|
||||
pHalData->fw_ractrl = IS_VENDOR_8188E_I_CUT_SERIES(Adapter) ? true : false;
|
||||
#else
|
||||
pHalData->fw_ractrl = _FALSE;
|
||||
pHalData->fw_ractrl = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -1277,7 +1277,7 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
|
|||
InitUsbAggregationSetting(Adapter);
|
||||
_InitOperationMode(Adapter);/* todo */
|
||||
_InitBeaconParameters(Adapter);
|
||||
_InitBeaconMaxError(Adapter, _TRUE);
|
||||
_InitBeaconMaxError(Adapter, true);
|
||||
|
||||
/* */
|
||||
/* Init CR MACTXEN, MACRXEN after setting RxFF boundary REG_TRXFF_BNDY to patch */
|
||||
|
@ -1433,10 +1433,10 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
|
|||
/* 2010/08/26 MH Merge from 8192CE. */
|
||||
if (pwrctrlpriv->rf_pwrstate == rf_on) {
|
||||
if (pHalData->bIQKInitialized)
|
||||
phy_iq_calibrate_8188e(Adapter, _TRUE);
|
||||
phy_iq_calibrate_8188e(Adapter, true);
|
||||
else {
|
||||
phy_iq_calibrate_8188e(Adapter, _FALSE);
|
||||
pHalData->bIQKInitialized = _TRUE;
|
||||
phy_iq_calibrate_8188e(Adapter, false);
|
||||
pHalData->bIQKInitialized = true;
|
||||
}
|
||||
|
||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_PW_TRACK);
|
||||
|
@ -1499,10 +1499,10 @@ hal_poweroff_8188eu(
|
|||
u8 val8;
|
||||
u16 val16;
|
||||
u32 val32;
|
||||
u8 bMacPwrCtrlOn = _FALSE;
|
||||
u8 bMacPwrCtrlOn = false;
|
||||
|
||||
rtw_hal_get_hwreg(Adapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
|
||||
if (bMacPwrCtrlOn == _FALSE)
|
||||
if (bMacPwrCtrlOn == false)
|
||||
return ;
|
||||
|
||||
/* Stop Tx Report Timer. 0x4EC[Bit1]=b'0 */
|
||||
|
@ -1562,9 +1562,9 @@ hal_poweroff_8188eu(
|
|||
rtw_write8(Adapter, REG_GPIO_IO_SEL + 1, val8 | 0x0F); /* Reg0x43 */
|
||||
rtw_write32(Adapter, REG_BB_PAD_CTRL, 0x00080808);/* set LNA ,TRSW,EX_PA Pin to output mode */
|
||||
|
||||
Adapter->bFWReady = _FALSE;
|
||||
Adapter->bFWReady = false;
|
||||
|
||||
bMacPwrCtrlOn = _FALSE;
|
||||
bMacPwrCtrlOn = false;
|
||||
rtw_hal_set_hwreg(Adapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
|
||||
}
|
||||
static void rtl8188eu_hw_power_down(_adapter *padapter)
|
||||
|
@ -1631,7 +1631,7 @@ static unsigned int rtl8188eu_inirp_init(PADAPTER Adapter)
|
|||
/* issue Rx irp to receive data */
|
||||
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
|
||||
for (i = 0; i < NR_RECVBUFF; i++) {
|
||||
if (_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == _FALSE) {
|
||||
if (_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == false) {
|
||||
status = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1647,7 +1647,7 @@ static unsigned int rtl8188eu_inirp_init(PADAPTER Adapter)
|
|||
goto exit;
|
||||
}
|
||||
_read_interrupt = pintfhdl->io_ops._read_interrupt;
|
||||
if (_read_interrupt(pintfhdl, RECV_INT_IN_ADDR) == _FALSE) {
|
||||
if (_read_interrupt(pintfhdl, RECV_INT_IN_ADDR) == false) {
|
||||
status = _FAIL;
|
||||
}
|
||||
#endif
|
||||
|
@ -1688,14 +1688,14 @@ _ReadLEDSetting(
|
|||
struct led_priv *pledpriv = &(Adapter->ledpriv);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
#ifdef CONFIG_SW_LED
|
||||
pledpriv->bRegUseLed = _TRUE;
|
||||
pledpriv->bRegUseLed = true;
|
||||
|
||||
switch (pHalData->CustomerID) {
|
||||
default:
|
||||
pledpriv->LedStrategy = SW_LED_MODE1;
|
||||
break;
|
||||
}
|
||||
pHalData->bLedOpenDrain = _TRUE;/* Support Open-drain arrangement for controlling the LED. Added by Roger, 2009.10.16. */
|
||||
pHalData->bLedOpenDrain = true;/* Support Open-drain arrangement for controlling the LED. Added by Roger, 2009.10.16. */
|
||||
#else /* HW LED */
|
||||
pledpriv->LedStrategy = HW_LED;
|
||||
#endif /* CONFIG_SW_LED */
|
||||
|
@ -1798,8 +1798,8 @@ static void _ReadPROMContent(
|
|||
|
||||
/* check system boot selection */
|
||||
eeValue = rtw_read8(Adapter, REG_9346CR);
|
||||
pHalData->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? _TRUE : _FALSE;
|
||||
pHalData->bautoload_fail_flag = (eeValue & EEPROM_EN) ? _FALSE : _TRUE;
|
||||
pHalData->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? true : false;
|
||||
pHalData->bautoload_fail_flag = (eeValue & EEPROM_EN) ? false : true;
|
||||
|
||||
RTW_INFO("Boot from %s, Autoload %s !\n", (pHalData->EepromOrEfuse ? "EEPROM" : "EFUSE"),
|
||||
(pHalData->bautoload_fail_flag ? "Fail" : "OK"));
|
||||
|
@ -1933,7 +1933,7 @@ GetHalDefVar8188EUsb(
|
|||
|
||||
case HAL_DEF_TX_LDPC:
|
||||
case HAL_DEF_RX_LDPC:
|
||||
*((u8 *)pValue) = _FALSE;
|
||||
*((u8 *)pValue) = false;
|
||||
break;
|
||||
case HAL_DEF_TX_STBC:
|
||||
*((u8 *)pValue) = 0;
|
||||
|
@ -2029,7 +2029,7 @@ static void SetBeaconRelatedRegisters8188EUsb(PADAPTER padapter)
|
|||
rtw_write8(padapter, REG_RXTSF_OFFSET_CCK, 0x50);
|
||||
rtw_write8(padapter, REG_RXTSF_OFFSET_OFDM, 0x50);
|
||||
|
||||
_BeaconFunctionEnable(padapter, _TRUE, _TRUE);
|
||||
_BeaconFunctionEnable(padapter, true, true);
|
||||
|
||||
ResumeTxBeacon(padapter);
|
||||
|
||||
|
@ -2055,14 +2055,14 @@ static void rtl8188eu_init_default_value(_adapter *padapter)
|
|||
rtl8188e_init_default_value(padapter);
|
||||
|
||||
/* init default value */
|
||||
pHalData->fw_ractrl = _FALSE;
|
||||
pHalData->fw_ractrl = false;
|
||||
if (!pwrctrlpriv->bkeepfwalive)
|
||||
pHalData->LastHMEBoxNum = 0;
|
||||
|
||||
/* init dm default value */
|
||||
pHalData->bIQKInitialized = _FALSE;
|
||||
pHalData->bIQKInitialized = false;
|
||||
pHalData->odmpriv.rf_calibrate_info.tm_trigger = 0;/* for IQK */
|
||||
/* pdmpriv->binitialized = _FALSE;
|
||||
/* pdmpriv->binitialized = false;
|
||||
* pdmpriv->prv_traffic_idx = 3;
|
||||
* pdmpriv->initialize = 0; */
|
||||
pHalData->odmpriv.rf_calibrate_info.thermal_value_hp_index = 0;
|
||||
|
@ -2078,7 +2078,7 @@ static void rtl8188eu_init_default_value(_adapter *padapter)
|
|||
|
||||
static u8 rtl8188eu_ps_func(PADAPTER Adapter, HAL_INTF_PS_FUNC efunc_id, u8 *val)
|
||||
{
|
||||
u8 bResult = _TRUE;
|
||||
u8 bResult = true;
|
||||
switch (efunc_id) {
|
||||
|
||||
#if defined(CONFIG_AUTOSUSPEND) && defined(SUPPORT_HW_RFOFF_DETECTED)
|
||||
|
|
|
@ -147,7 +147,7 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_RX_PACKET_APPEND_FCS
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_MONITOR_STATE) == _FALSE)
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_MONITOR_STATE) == false)
|
||||
if ((pattrib->pkt_rpt_type == NORMAL_RX) && (pHalData->ReceiveConfig & RCR_APPFCS))
|
||||
pattrib->pkt_len -= IEEE80211_FCS_LEN;
|
||||
#endif
|
||||
|
@ -234,7 +234,7 @@ _exit_recvbuf2recvframe:
|
|||
|
||||
void rtl8188eu_xmit_tasklet(void *priv)
|
||||
{
|
||||
int ret = _FALSE;
|
||||
int ret = false;
|
||||
_adapter *padapter = (_adapter *)priv;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
|
@ -244,12 +244,12 @@ void rtl8188eu_xmit_tasklet(void *priv)
|
|||
break;
|
||||
}
|
||||
|
||||
if (rtw_xmit_ac_blocked(padapter) == _TRUE)
|
||||
if (rtw_xmit_ac_blocked(padapter) == true)
|
||||
break;
|
||||
|
||||
ret = rtl8188eu_xmitframe_complete(padapter, pxmitpriv, NULL);
|
||||
|
||||
if (ret == _FALSE)
|
||||
if (ret == false)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ SetAntennaConfig92C(
|
|||
* 2) "#define RTL8723_FPGA_VERIFICATION 1" in Precomp.h.WlanE.Windows
|
||||
* 3) "#define RTL8190_Download_Firmware_From_Header 0" in Precomp.h.WlanE.Windows if needed.
|
||||
* */
|
||||
#if (RTL8188E_FPGA_TRUE_PHY_VERIFICATION == 1)
|
||||
#if (RTL8188E_FPGAtrue_PHY_VERIFICATION == 1)
|
||||
#define SIC_ENABLE 1
|
||||
#define SIC_HW_SUPPORT 1
|
||||
#else
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
#ifndef __HAL_VERSION_DEF_H__
|
||||
#define __HAL_VERSION_DEF_H__
|
||||
|
||||
#define TRUE _TRUE
|
||||
#define FALSE _FALSE
|
||||
|
||||
/* HAL_IC_TYPE_E */
|
||||
typedef enum tag_HAL_IC_Type_Definition {
|
||||
CHIP_8192S = 0,
|
||||
|
@ -109,67 +106,67 @@ typedef struct tag_HAL_VERSION {
|
|||
* HAL_VERSION VersionID */
|
||||
|
||||
/* HAL_IC_TYPE_E */
|
||||
#define IS_8188E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188E) ? TRUE : FALSE)
|
||||
#define IS_8188F(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188F) ? TRUE : FALSE)
|
||||
#define IS_8192E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8192E) ? TRUE : FALSE)
|
||||
#define IS_8812_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8812) ? TRUE : FALSE)
|
||||
#define IS_8821_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821) ? TRUE : FALSE)
|
||||
#define IS_8814A_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8814A) ? TRUE : FALSE)
|
||||
#define IS_8723B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8723B) ? TRUE : FALSE)
|
||||
#define IS_8703B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8703B) ? TRUE : FALSE)
|
||||
#define IS_8822B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8822B) ? TRUE : FALSE)
|
||||
#define IS_8821C_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821C) ? TRUE : FALSE)
|
||||
#define IS_8188E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188E) ? true : false)
|
||||
#define IS_8188F(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188F) ? true : false)
|
||||
#define IS_8192E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8192E) ? true : false)
|
||||
#define IS_8812_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8812) ? true : false)
|
||||
#define IS_8821_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821) ? true : false)
|
||||
#define IS_8814A_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8814A) ? true : false)
|
||||
#define IS_8723B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8723B) ? true : false)
|
||||
#define IS_8703B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8703B) ? true : false)
|
||||
#define IS_8822B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8822B) ? true : false)
|
||||
#define IS_8821C_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821C) ? true : false)
|
||||
#define IS_8723D_SERIES(version)\
|
||||
((GET_CVID_IC_TYPE(version) == CHIP_8723D) ? TRUE : FALSE)
|
||||
((GET_CVID_IC_TYPE(version) == CHIP_8723D) ? true : false)
|
||||
/* HAL_CHIP_TYPE_E */
|
||||
#define IS_TEST_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == TEST_CHIP) ? TRUE : FALSE)
|
||||
#define IS_NORMAL_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) ? TRUE : FALSE)
|
||||
#define IS_TEST_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == TEST_CHIP) ? true : false)
|
||||
#define IS_NORMAL_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) ? true : false)
|
||||
|
||||
/* HAL_CUT_VERSION_E */
|
||||
#define IS_A_CUT(version) ((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_B_CUT(version) ((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_C_CUT(version) ((GET_CVID_CUT_VERSION(version) == C_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_D_CUT(version) ((GET_CVID_CUT_VERSION(version) == D_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_E_CUT(version) ((GET_CVID_CUT_VERSION(version) == E_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_F_CUT(version) ((GET_CVID_CUT_VERSION(version) == F_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_I_CUT(version) ((GET_CVID_CUT_VERSION(version) == I_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_J_CUT(version) ((GET_CVID_CUT_VERSION(version) == J_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_K_CUT(version) ((GET_CVID_CUT_VERSION(version) == K_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_A_CUT(version) ((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? true : false)
|
||||
#define IS_B_CUT(version) ((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? true : false)
|
||||
#define IS_C_CUT(version) ((GET_CVID_CUT_VERSION(version) == C_CUT_VERSION) ? true : false)
|
||||
#define IS_D_CUT(version) ((GET_CVID_CUT_VERSION(version) == D_CUT_VERSION) ? true : false)
|
||||
#define IS_E_CUT(version) ((GET_CVID_CUT_VERSION(version) == E_CUT_VERSION) ? true : false)
|
||||
#define IS_F_CUT(version) ((GET_CVID_CUT_VERSION(version) == F_CUT_VERSION) ? true : false)
|
||||
#define IS_I_CUT(version) ((GET_CVID_CUT_VERSION(version) == I_CUT_VERSION) ? true : false)
|
||||
#define IS_J_CUT(version) ((GET_CVID_CUT_VERSION(version) == J_CUT_VERSION) ? true : false)
|
||||
#define IS_K_CUT(version) ((GET_CVID_CUT_VERSION(version) == K_CUT_VERSION) ? true : false)
|
||||
|
||||
/* HAL_VENDOR_E */
|
||||
#define IS_CHIP_VENDOR_TSMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC) ? TRUE : FALSE)
|
||||
#define IS_CHIP_VENDOR_UMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC) ? TRUE : FALSE)
|
||||
#define IS_CHIP_VENDOR_SMIC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_SMIC) ? TRUE : FALSE)
|
||||
#define IS_CHIP_VENDOR_TSMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC) ? true : false)
|
||||
#define IS_CHIP_VENDOR_UMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC) ? true : false)
|
||||
#define IS_CHIP_VENDOR_SMIC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_SMIC) ? true : false)
|
||||
|
||||
/* HAL_RF_TYPE_E */
|
||||
#define IS_1T1R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? TRUE : FALSE)
|
||||
#define IS_1T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R) ? TRUE : FALSE)
|
||||
#define IS_2T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R) ? TRUE : FALSE)
|
||||
#define IS_3T3R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_3T3R) ? TRUE : FALSE)
|
||||
#define IS_3T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_3T4R) ? TRUE : FALSE)
|
||||
#define IS_4T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_4T4R) ? TRUE : FALSE)
|
||||
#define IS_1T1R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? true : false)
|
||||
#define IS_1T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R) ? true : false)
|
||||
#define IS_2T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R) ? true : false)
|
||||
#define IS_3T3R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_3T3R) ? true : false)
|
||||
#define IS_3T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_3T4R) ? true : false)
|
||||
#define IS_4T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_4T4R) ? true : false)
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Chip version Macro. --
|
||||
* ---------------------------------------------------------------------------- */
|
||||
#define IS_VENDOR_8188E_I_CUT_SERIES(_Adapter) ((IS_8188E(GET_HAL_DATA(_Adapter)->version_id)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) >= I_CUT_VERSION) ? TRUE : FALSE) : FALSE)
|
||||
#define IS_VENDOR_8812A_TEST_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE)
|
||||
#define IS_VENDOR_8812A_MP_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE)
|
||||
#define IS_VENDOR_8812A_C_CUT(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) == C_CUT_VERSION) ? TRUE : FALSE) : FALSE)
|
||||
#define IS_VENDOR_8188E_I_CUT_SERIES(_Adapter) ((IS_8188E(GET_HAL_DATA(_Adapter)->version_id)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) >= I_CUT_VERSION) ? true : false) : false)
|
||||
#define IS_VENDOR_8812A_TEST_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false)
|
||||
#define IS_VENDOR_8812A_MP_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false)
|
||||
#define IS_VENDOR_8812A_C_CUT(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) == C_CUT_VERSION) ? true : false) : false)
|
||||
|
||||
#define IS_VENDOR_8821A_TEST_CHIP(_Adapter) ((IS_8821_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE)
|
||||
#define IS_VENDOR_8821A_MP_CHIP(_Adapter) ((IS_8821_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE)
|
||||
#define IS_VENDOR_8821A_TEST_CHIP(_Adapter) ((IS_8821_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false)
|
||||
#define IS_VENDOR_8821A_MP_CHIP(_Adapter) ((IS_8821_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false)
|
||||
|
||||
#define IS_VENDOR_8192E_B_CUT(_Adapter) ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) == B_CUT_VERSION) ? TRUE : FALSE)
|
||||
#define IS_VENDOR_8192E_B_CUT(_Adapter) ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->version_id) == B_CUT_VERSION) ? true : false)
|
||||
|
||||
#define IS_VENDOR_8723B_TEST_CHIP(_Adapter) ((IS_8723B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE)
|
||||
#define IS_VENDOR_8723B_MP_CHIP(_Adapter) ((IS_8723B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE)
|
||||
#define IS_VENDOR_8723B_TEST_CHIP(_Adapter) ((IS_8723B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false)
|
||||
#define IS_VENDOR_8723B_MP_CHIP(_Adapter) ((IS_8723B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false)
|
||||
|
||||
#define IS_VENDOR_8703B_TEST_CHIP(_Adapter) ((IS_8703B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE)
|
||||
#define IS_VENDOR_8703B_MP_CHIP(_Adapter) ((IS_8703B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE)
|
||||
#define IS_VENDOR_8814A_TEST_CHIP(_Adapter) ((IS_8814A_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? FALSE : TRUE) : FALSE)
|
||||
#define IS_VENDOR_8814A_MP_CHIP(_Adapter) ((IS_8814A_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? TRUE : FALSE) : FALSE)
|
||||
#define IS_VENDOR_8703B_TEST_CHIP(_Adapter) ((IS_8703B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false)
|
||||
#define IS_VENDOR_8703B_MP_CHIP(_Adapter) ((IS_8703B_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false)
|
||||
#define IS_VENDOR_8814A_TEST_CHIP(_Adapter) ((IS_8814A_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? false : true) : false)
|
||||
#define IS_VENDOR_8814A_MP_CHIP(_Adapter) ((IS_8814A_SERIES(GET_HAL_DATA(_Adapter)->version_id)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->version_id)) ? true : false) : false)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
/* #define CONFIG_DISABLE_ODM */
|
||||
/* for FPGA VERIFICATION config */
|
||||
#define RTL8188E_FPGA_TRUE_PHY_VERIFICATION 0
|
||||
#define RTL8188E_FPGAtrue_PHY_VERIFICATION 0
|
||||
|
||||
/* ***** temporarily flag ******* */
|
||||
/*
|
||||
|
|
|
@ -24,18 +24,6 @@
|
|||
#define SUCCESS 0
|
||||
#define FAIL (-1)
|
||||
|
||||
#ifndef TRUE
|
||||
#define _TRUE 1
|
||||
#else
|
||||
#define _TRUE TRUE
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define _FALSE 0
|
||||
#else
|
||||
#define _FALSE FALSE
|
||||
#endif
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
|
|
|
@ -966,22 +966,22 @@ struct dvobj_priv {
|
|||
|
||||
static inline void dev_set_surprise_removed(struct dvobj_priv *dvobj)
|
||||
{
|
||||
ATOMIC_SET(&dvobj->bSurpriseRemoved, _TRUE);
|
||||
ATOMIC_SET(&dvobj->bSurpriseRemoved, true);
|
||||
}
|
||||
static inline void dev_clr_surprise_removed(struct dvobj_priv *dvobj)
|
||||
{
|
||||
ATOMIC_SET(&dvobj->bSurpriseRemoved, _FALSE);
|
||||
ATOMIC_SET(&dvobj->bSurpriseRemoved, false);
|
||||
}
|
||||
static inline void dev_set_drv_stopped(struct dvobj_priv *dvobj)
|
||||
{
|
||||
ATOMIC_SET(&dvobj->bDriverStopped, _TRUE);
|
||||
ATOMIC_SET(&dvobj->bDriverStopped, true);
|
||||
}
|
||||
static inline void dev_clr_drv_stopped(struct dvobj_priv *dvobj)
|
||||
{
|
||||
ATOMIC_SET(&dvobj->bDriverStopped, _FALSE);
|
||||
ATOMIC_SET(&dvobj->bDriverStopped, false);
|
||||
}
|
||||
#define dev_is_surprise_removed(dvobj) (ATOMIC_READ(&dvobj->bSurpriseRemoved) == _TRUE)
|
||||
#define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == _TRUE)
|
||||
#define dev_is_surprise_removed(dvobj) (ATOMIC_READ(&dvobj->bSurpriseRemoved) == true)
|
||||
#define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == true)
|
||||
|
||||
static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
||||
{
|
||||
|
|
|
@ -192,11 +192,11 @@ typedef struct _LED_USB {
|
|||
LED_PIN LedPin; /* Identify how to implement this SW led. */
|
||||
|
||||
LED_STATE CurrLedState; /* Current LED state. */
|
||||
bool bLedOn; /* TRUE if LED is ON, FALSE if LED is OFF. */
|
||||
bool bLedOn; /* true if LED is ON, false if LED is OFF. */
|
||||
|
||||
bool bSWLedCtrl;
|
||||
|
||||
bool bLedBlinkInProgress; /* TRUE if it is blinking, FALSE o.w.. */
|
||||
bool bLedBlinkInProgress; /* true if it is blinking, false o.w.. */
|
||||
/* ALPHA, added by chiyoko, 20090106 */
|
||||
bool bLedNoLinkBlinkInProgress;
|
||||
bool bLedLinkBlinkInProgress;
|
||||
|
|
|
@ -432,15 +432,15 @@
|
|||
|
||||
/* RXERR_RPT */
|
||||
#define RXERR_TYPE_OFDM_PPDU 0
|
||||
#define RXERR_TYPE_OFDM_FALSE_ALARM 1
|
||||
#define RXERR_TYPE_OFDMfalse_ALARM 1
|
||||
#define RXERR_TYPE_OFDM_MPDU_OK 2
|
||||
#define RXERR_TYPE_OFDM_MPDU_FAIL 3
|
||||
#define RXERR_TYPE_CCK_PPDU 4
|
||||
#define RXERR_TYPE_CCK_FALSE_ALARM 5
|
||||
#define RXERR_TYPE_CCKfalse_ALARM 5
|
||||
#define RXERR_TYPE_CCK_MPDU_OK 6
|
||||
#define RXERR_TYPE_CCK_MPDU_FAIL 7
|
||||
#define RXERR_TYPE_HT_PPDU 8
|
||||
#define RXERR_TYPE_HT_FALSE_ALARM 9
|
||||
#define RXERR_TYPE_HTfalse_ALARM 9
|
||||
#define RXERR_TYPE_HT_MPDU_TOTAL 10
|
||||
#define RXERR_TYPE_HT_MPDU_OK 11
|
||||
#define RXERR_TYPE_HT_MPDU_FAIL 12
|
||||
|
@ -823,8 +823,8 @@ Default: 00b.
|
|||
#define TOTAL_CAM_ENTRY 32
|
||||
#define HALF_CAM_ENTRY 16
|
||||
|
||||
#define CAM_CONFIG_USEDK _TRUE
|
||||
#define CAM_CONFIG_NO_USEDK _FALSE
|
||||
#define CAM_CONFIG_USEDK true
|
||||
#define CAM_CONFIG_NO_USEDK false
|
||||
|
||||
#define CAM_WRITE BIT(16)
|
||||
#define CAM_READ 0x00000000
|
||||
|
|
|
@ -635,7 +635,7 @@ typedef struct hal_com_data HAL_DATA_TYPE, *PHAL_DATA_TYPE;
|
|||
#define get_hal_mac_addr(adapter) (GET_HAL_DATA(adapter)->EEPROMMACAddr)
|
||||
#define is_boot_from_eeprom(adapter) (GET_HAL_DATA(adapter)->EepromOrEfuse)
|
||||
#define rtw_get_hw_init_completed(adapter) (GET_HAL_DATA(adapter)->hw_init_completed)
|
||||
#define rtw_is_hw_init_completed(adapter) (GET_HAL_DATA(adapter)->hw_init_completed == _TRUE)
|
||||
#define rtw_is_hw_init_completed(adapter) (GET_HAL_DATA(adapter)->hw_init_completed == true)
|
||||
|
||||
#ifdef CONFIG_AUTO_CHNL_SEL_NHM
|
||||
#define GET_ACS_STATE(padapter) (ATOMIC_READ(&GET_HAL_DATA(padapter)->acs.state))
|
||||
|
|
|
@ -214,21 +214,21 @@ enum NETWORK_TYPE {
|
|||
|
||||
#define IsLegacyOnly(NetType) ((NetType) == ((NetType) & (WIRELESS_11BG | WIRELESS_11A)))
|
||||
|
||||
#define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? _TRUE : _FALSE)
|
||||
#define is_supported_5g(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? _TRUE : _FALSE)
|
||||
#define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)
|
||||
#define is_supported_5g(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false)
|
||||
|
||||
#define IsEnableHWCCK(NetType) IsSupported24G(NetType)
|
||||
#define IsEnableHWOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11_24N | SUPPORTED_5G_NETTYPE_MSK) ? _TRUE : _FALSE)
|
||||
#define IsEnableHWOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11_24N | SUPPORTED_5G_NETTYPE_MSK) ? true : false)
|
||||
|
||||
#define IsSupportedRxCCK(NetType) IsEnableHWCCK(NetType)
|
||||
#define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType)
|
||||
#define IsSupportedRxHT(NetType) IsEnableHWOFDM(NetType)
|
||||
|
||||
#define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? _TRUE : _FALSE)
|
||||
#define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11A) ? _TRUE : _FALSE)
|
||||
#define is_supported_ht(NetType) ((NetType) & (WIRELESS_11_24N | WIRELESS_11_5N) ? _TRUE : _FALSE)
|
||||
#define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? true : false)
|
||||
#define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11A) ? true : false)
|
||||
#define is_supported_ht(NetType) ((NetType) & (WIRELESS_11_24N | WIRELESS_11_5N) ? true : false)
|
||||
|
||||
#define is_supported_vht(NetType) ((NetType) & (WIRELESS_11AC) ? _TRUE : _FALSE)
|
||||
#define is_supported_vht(NetType) ((NetType) & (WIRELESS_11AC) ? true : false)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
|
||||
|
||||
/* by Owen for RTL8185 Phy Status Report Utility */
|
||||
#define OID_RT_UTILITY_FALSE_ALARM_COUNTERS 0xFF818580
|
||||
#define OID_RT_UTILITYfalse_ALARM_COUNTERS 0xFF818580
|
||||
#define OID_RT_UTILITY_SELECT_DEBUG_MODE 0xFF818581
|
||||
#define OID_RT_UTILITY_SELECT_SUBCARRIER_NUMBER 0xFF818582
|
||||
#define OID_RT_UTILITY_GET_RSSI_STATUS 0xFF818583
|
||||
|
|
|
@ -29,15 +29,6 @@
|
|||
#define RTW_RBUF_UNAVAIL 5
|
||||
#define RTW_RBUF_PKT_UNAVAIL 6
|
||||
|
||||
/* #define RTW_STATUS_TIMEDOUT -110 */
|
||||
|
||||
#undef _TRUE
|
||||
#define _TRUE 1
|
||||
|
||||
#undef _FALSE
|
||||
#define _FALSE 0
|
||||
|
||||
|
||||
#include <osdep_service_linux.h>
|
||||
|
||||
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
|
||||
|
@ -352,7 +343,7 @@ __inline static void rtw_dump_stack(void)
|
|||
|
||||
__inline static int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4)
|
||||
{
|
||||
int ret = _TRUE;
|
||||
int ret = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ Total page numbers : 176(0xB0) / 256(0x100)
|
|||
#define INCLUDE_MULTI_FUNC_BT(_Adapter) (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_BT)
|
||||
#define INCLUDE_MULTI_FUNC_GPS(_Adapter) (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_GPS)
|
||||
|
||||
/* #define IS_MULTI_FUNC_CHIP(_Adapter) (((((PHAL_DATA_TYPE)(_Adapter->HalData))->MultiFunc) & (RT_MULTI_FUNC_BT|RT_MULTI_FUNC_GPS)) ? _TRUE : _FALSE) */
|
||||
/* #define IS_MULTI_FUNC_CHIP(_Adapter) (((((PHAL_DATA_TYPE)(_Adapter->HalData))->MultiFunc) & (RT_MULTI_FUNC_BT|RT_MULTI_FUNC_GPS)) ? true : false) */
|
||||
|
||||
/* #define RT_IS_FUNC_DISABLED(__pAdapter, __FuncBits) ( (__pAdapter)->DisabledFunctions & (__FuncBits) ) */
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ enum _SOUNDING_STATE {
|
|||
};
|
||||
|
||||
struct beamformee_entry {
|
||||
u8 used; /* _TRUE/_FALSE */
|
||||
u8 used; /* true/false */
|
||||
u8 txbf;
|
||||
u8 sounding;
|
||||
/* Used to construct AID field of NDPA packet */
|
||||
|
@ -143,7 +143,7 @@ struct beamformee_entry {
|
|||
u8 user_position[16];
|
||||
|
||||
/* For 8822B C-cut workaround */
|
||||
/* If the flag set to _TRUE, do not sound this STA */
|
||||
/* If the flag set to true, do not sound this STA */
|
||||
u8 bSuspendSUCap;
|
||||
};
|
||||
|
||||
|
|
|
@ -343,10 +343,10 @@ extern int dbg_rtw_writeN(_adapter *adapter, u32 addr , u32 length , u8 *data, c
|
|||
#define rtw_write_port_cancel(adapter) _rtw_write_port_cancel(adapter)
|
||||
|
||||
#else /* DBG_IO */
|
||||
#define match_read_sniff_ranges(addr, len) _FALSE
|
||||
#define match_write_sniff_ranges(addr, len) _FALSE
|
||||
#define match_rf_read_sniff_ranges(path, addr, mask) _FALSE
|
||||
#define match_rf_write_sniff_ranges(path, addr, mask) _FALSE
|
||||
#define match_read_sniff_ranges(addr, len) false
|
||||
#define match_write_sniff_ranges(addr, len) false
|
||||
#define match_rf_read_sniff_ranges(path, addr, mask) false
|
||||
#define match_rf_write_sniff_ranges(path, addr, mask) false
|
||||
#define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr))
|
||||
#define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr))
|
||||
#define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr))
|
||||
|
|
|
@ -106,7 +106,7 @@ void rtw_wfd_st_switch(struct sta_info *sta, bool on);
|
|||
#endif /* !CONFIG_P2P */
|
||||
|
||||
#if defined(CONFIG_IOCTL_CFG80211) && defined(CONFIG_P2P)
|
||||
#define MLME_IS_ROCH(adapter) (rtw_cfg80211_get_is_roch(adapter) == _TRUE)
|
||||
#define MLME_IS_ROCH(adapter) (rtw_cfg80211_get_is_roch(adapter) == true)
|
||||
#else
|
||||
#define MLME_IS_ROCH(adapter) 0
|
||||
#endif
|
||||
|
@ -446,7 +446,7 @@ struct wifidirect_info {
|
|||
struct tdls_ss_record { /* signal strength record */
|
||||
u8 macaddr[ETH_ALEN];
|
||||
u8 RxPWDBAll;
|
||||
u8 is_tdls_sta; /* _TRUE: direct link sta, _FALSE: else */
|
||||
u8 is_tdls_sta; /* true: direct link sta, false: else */
|
||||
};
|
||||
|
||||
struct tdls_temp_mgmt {
|
||||
|
@ -920,12 +920,12 @@ __inline static sint check_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
|||
{
|
||||
if ((state == WIFI_NULL_STATE) &&
|
||||
(pmlmepriv->fw_state == WIFI_NULL_STATE))
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
if (pmlmepriv->fw_state & state)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
__inline static sint get_fwstate(struct mlme_priv *pmlmepriv)
|
||||
|
@ -948,7 +948,7 @@ static inline void set_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
|||
|
||||
/*bScanInProcess hook in phydm*/
|
||||
if (_FW_UNDER_SURVEY == state)
|
||||
pmlmepriv->bScanInProcess = _TRUE;
|
||||
pmlmepriv->bScanInProcess = true;
|
||||
|
||||
rtw_mi_update_iface_status(pmlmepriv, state);
|
||||
}
|
||||
|
@ -958,7 +958,7 @@ static inline void init_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
|||
|
||||
/*bScanInProcess hook in phydm*/
|
||||
if (_FW_UNDER_SURVEY == state)
|
||||
pmlmepriv->bScanInProcess = _TRUE;
|
||||
pmlmepriv->bScanInProcess = true;
|
||||
|
||||
rtw_mi_update_iface_status(pmlmepriv, state);
|
||||
}
|
||||
|
@ -969,7 +969,7 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, sint state)
|
|||
|
||||
/*bScanInProcess hook in phydm*/
|
||||
if (_FW_UNDER_SURVEY == state)
|
||||
pmlmepriv->bScanInProcess = _FALSE;
|
||||
pmlmepriv->bScanInProcess = false;
|
||||
|
||||
rtw_mi_update_iface_status(pmlmepriv, state);
|
||||
}
|
||||
|
@ -1052,7 +1052,7 @@ void rtw_clear_scan_deny(_adapter *adapter);
|
|||
void rtw_set_scan_deny_timer_hdl(_adapter *adapter);
|
||||
void rtw_set_scan_deny(_adapter *adapter, u32 ms);
|
||||
#else
|
||||
#define rtw_is_scan_deny(adapter) _FALSE
|
||||
#define rtw_is_scan_deny(adapter) false
|
||||
#define rtw_clear_scan_deny(adapter) do {} while (0)
|
||||
#define rtw_set_scan_deny_timer_hdl(adapter) do {} while (0)
|
||||
#define rtw_set_scan_deny(adapter, ms) do {} while (0)
|
||||
|
|
|
@ -518,8 +518,8 @@ u32 rtw_get_ch_waiting_ms(_adapter *adapter, u8 ch, u8 bw, u8 offset, u32 *r_non
|
|||
void rtw_reset_cac(_adapter *adapter, u8 ch, u8 bw, u8 offset);
|
||||
#else
|
||||
#define CH_IS_NON_OCP(rt_ch_info) 0
|
||||
#define rtw_chset_is_ch_non_ocp(ch_set, ch, bw, offset) _FALSE
|
||||
#define rtw_rfctl_is_tx_blocked_by_ch_waiting(rfctl) _FALSE
|
||||
#define rtw_chset_is_ch_non_ocp(ch_set, ch, bw, offset) false
|
||||
#define rtw_rfctl_is_tx_blocked_by_ch_waiting(rfctl) false
|
||||
#endif
|
||||
|
||||
enum {
|
||||
|
@ -664,9 +664,9 @@ struct mlme_ext_priv {
|
|||
static inline u8 check_mlmeinfo_state(struct mlme_ext_priv *plmeext, sint state)
|
||||
{
|
||||
if ((plmeext->mlmext_info.state & 0x03) == state)
|
||||
return _TRUE;
|
||||
return true;
|
||||
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#define mlmeext_msr(mlmeext) ((mlmeext)->mlmext_info.state & 0x03)
|
||||
|
|
|
@ -167,7 +167,7 @@ typedef struct _MPT_CONTEXT {
|
|||
WIRELESS_MODE MptWirelessModeToSw; /* Wireless mode to switch. */
|
||||
u8 MptChannelToSw; /* Channel to switch. */
|
||||
u8 MptInitGainToSet; /* Initial gain to set. */
|
||||
/* u32 bMptAntennaA; */ /* TRUE if we want to use antenna A. */
|
||||
/* u32 bMptAntennaA; */ /* true if we want to use antenna A. */
|
||||
u32 MptBandWidth; /* bandwidth to switch. */
|
||||
|
||||
u32 mpt_rate_index;/* rate index. */
|
||||
|
@ -181,25 +181,25 @@ typedef struct _MPT_CONTEXT {
|
|||
u32 RegTxPwrLimit;
|
||||
/* Content of RCR Regsiter for Mass Production Test. */
|
||||
u32 MptRCR;
|
||||
/* TRUE if we only receive packets with specific pattern. */
|
||||
/* true if we only receive packets with specific pattern. */
|
||||
bool bMptFilterPattern;
|
||||
/* Rx OK count, statistics used in Mass Production Test. */
|
||||
u32 MptRxOkCnt;
|
||||
/* Rx CRC32 error count, statistics used in Mass Production Test. */
|
||||
u32 MptRxCrcErrCnt;
|
||||
|
||||
bool bCckContTx; /* TRUE if we are in CCK Continuous Tx test. */
|
||||
bool bOfdmContTx; /* TRUE if we are in OFDM Continuous Tx test. */
|
||||
/* TRUE if we have start Continuous Tx test. */
|
||||
bool bCckContTx; /* true if we are in CCK Continuous Tx test. */
|
||||
bool bOfdmContTx; /* true if we are in OFDM Continuous Tx test. */
|
||||
/* true if we have start Continuous Tx test. */
|
||||
bool is_start_cont_tx;
|
||||
|
||||
/* TRUE if we are in Single Carrier Tx test. */
|
||||
/* true if we are in Single Carrier Tx test. */
|
||||
bool bSingleCarrier;
|
||||
/* TRUE if we are in Carrier Suppression Tx Test. */
|
||||
/* true if we are in Carrier Suppression Tx Test. */
|
||||
|
||||
bool is_carrier_suppression;
|
||||
|
||||
/* TRUE if we are in Single Tone Tx test. */
|
||||
/* true if we are in Single Tone Tx test. */
|
||||
|
||||
bool is_single_tone;
|
||||
|
||||
|
@ -402,8 +402,8 @@ typedef struct _MP_FIRMWARE {
|
|||
|
||||
/* *********************************************************************** */
|
||||
|
||||
#define LOWER _TRUE
|
||||
#define RAISE _FALSE
|
||||
#define LOWER true
|
||||
#define RAISE false
|
||||
|
||||
/* Hardware Registers */
|
||||
#define BB_REG_BASE_ADDR 0x800
|
||||
|
|
|
@ -199,7 +199,7 @@ typedef enum _rt_rf_power_state {
|
|||
#define RT_RF_LPS_DISALBE_2R BIT(30) /* When LPS is on, disable 2R if no packet is received or transmittd. */
|
||||
#define RT_RF_LPS_LEVEL_ASPM BIT(31) /* LPS with ASPM */
|
||||
|
||||
#define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) ((ppsc->cur_ps_level & _PS_FLAG) ? _TRUE : _FALSE)
|
||||
#define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) ((ppsc->cur_ps_level & _PS_FLAG) ? true : false)
|
||||
#define RT_CLEAR_PS_LEVEL(ppsc, _PS_FLAG) (ppsc->cur_ps_level &= (~(_PS_FLAG)))
|
||||
#define RT_SET_PS_LEVEL(ppsc, _PS_FLAG) (ppsc->cur_ps_level |= _PS_FLAG)
|
||||
|
||||
|
@ -528,8 +528,8 @@ void rtw_set_do_late_resume(struct pwrctrl_priv *pwrpriv, bool enable);
|
|||
void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv);
|
||||
void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv);
|
||||
#else
|
||||
#define rtw_is_earlysuspend_registered(pwrpriv) _FALSE
|
||||
#define rtw_is_do_late_resume(pwrpriv) _FALSE
|
||||
#define rtw_is_earlysuspend_registered(pwrpriv) false
|
||||
#define rtw_is_do_late_resume(pwrpriv) false
|
||||
#define rtw_set_do_late_resume(pwrpriv, enable) do {} while (0)
|
||||
#define rtw_register_early_suspend(pwrpriv) do {} while (0)
|
||||
#define rtw_unregister_early_suspend(pwrpriv) do {} while (0)
|
||||
|
|
|
@ -184,7 +184,7 @@ struct security_priv {
|
|||
s32 sw_encrypt;/* from registry_priv */
|
||||
s32 sw_decrypt;/* from registry_priv */
|
||||
|
||||
s32 hw_decrypted;/* if the rx packets is hw_decrypted==_FALSE, it means the hw has not been ready. */
|
||||
s32 hw_decrypted;/* if the rx packets is hw_decrypted==false, it means the hw has not been ready. */
|
||||
|
||||
|
||||
/* keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc) */
|
||||
|
|
|
@ -118,10 +118,10 @@
|
|||
* (1, 1) : AMPDU and AMSDU in AMPDU are enable. So, AMSDU is valid to send.
|
||||
*/
|
||||
#define IS_AMSDU_AMPDU_NOT_VALID(pattrib)\
|
||||
((pattrib->ampdu_en == _TRUE) && (pattrib->amsdu_ampdu_en == _FALSE))
|
||||
((pattrib->ampdu_en == true) && (pattrib->amsdu_ampdu_en == false))
|
||||
|
||||
#define IS_AMSDU_AMPDU_VALID(pattrib)\
|
||||
!((pattrib->ampdu_en == _TRUE) && (pattrib->amsdu_ampdu_en == _FALSE))
|
||||
!((pattrib->ampdu_en == true) && (pattrib->amsdu_ampdu_en == false))
|
||||
|
||||
#define HWXMIT_ENTRY 4
|
||||
|
||||
|
|
|
@ -61,14 +61,14 @@ enum RTW_USB_SPEED {
|
|||
|
||||
static inline u8 rtw_usb_bulk_size_boundary(_adapter *padapter, int buf_len)
|
||||
{
|
||||
u8 rst = _TRUE;
|
||||
u8 rst = true;
|
||||
|
||||
if (IS_SUPER_SPEED_USB(padapter))
|
||||
rst = (0 == (buf_len) % USB_SUPER_SPEED_BULK_SIZE) ? _TRUE : _FALSE;
|
||||
rst = (0 == (buf_len) % USB_SUPER_SPEED_BULK_SIZE) ? true : false;
|
||||
if (IS_HIGH_SPEED_USB(padapter))
|
||||
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ? _TRUE : _FALSE;
|
||||
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ? true : false;
|
||||
else
|
||||
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ? _TRUE : _FALSE;
|
||||
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ? true : false;
|
||||
return rst;
|
||||
}
|
||||
|
||||
|
|
|
@ -409,15 +409,15 @@ enum WIFI_REG_DOMAIN {
|
|||
(\
|
||||
((addr[0] == 0xff) && (addr[1] == 0xff) && \
|
||||
(addr[2] == 0xff) && (addr[3] == 0xff) && \
|
||||
(addr[4] == 0xff) && (addr[5] == 0xff)) ? _TRUE : _FALSE \
|
||||
(addr[4] == 0xff) && (addr[5] == 0xff)) ? true : false \
|
||||
)
|
||||
|
||||
__inline static int IS_MCAST(unsigned char *da)
|
||||
{
|
||||
if ((*da) & 0x01)
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
__inline static unsigned char *get_ra(unsigned char *pframe)
|
||||
|
@ -507,9 +507,9 @@ __inline static unsigned char *get_hdr_bssid(unsigned char *pframe)
|
|||
__inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
||||
{
|
||||
if (WIFI_CTRL_TYPE == GetFrameType(pframe))
|
||||
return _TRUE;
|
||||
return true;
|
||||
else
|
||||
return _FALSE;
|
||||
return false;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------
|
||||
Below is for the security related definition
|
||||
|
|
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…
Reference in a new issue