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:
Larry Finger 2018-12-17 11:08:55 -06:00
parent b89e0320f5
commit 999a777041
91 changed files with 4692 additions and 4724 deletions

File diff suppressed because it is too large Load diff

View file

@ -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 */ /* (dec(AID[0:8]) + dec(BSSID)*2^5) mod 2^9 */
*p_aid = (aid + (val16 << 5)) & 0x1FF; *p_aid = (aid + (val16 << 5)) & 0x1FF;
*g_id = 63; *g_id = 63;
} else if ((check_fwstate(mlme, WIFI_ADHOC_STATE) == _TRUE) } else if ((check_fwstate(mlme, WIFI_ADHOC_STATE) == true)
|| (check_fwstate(mlme, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { || (check_fwstate(mlme, WIFI_ADHOC_MASTER_STATE) == true)) {
/* /*
* Otherwise, includes * Otherwise, includes
* 1. Sent to an IBSS STA * 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); info = GET_BEAMFORM_INFO(adapter);
ht = &adapter->mlmepriv.htpriv; ht = &adapter->mlmepriv.htpriv;
if (is_supported_ht(sta->wireless_mode) == _TRUE) { if (is_supported_ht(sta->wireless_mode) == true) {
/* HT */ /* HT */
bf_cap = ht->beamform_cap; 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); bfee = rtw_bf_bfee_get_entry_by_addr(adapter, ra);
if (!bfee) { if (!bfee) {
RTW_ERR("%s: Cann't find beamformee entry!\n", __func__); RTW_ERR("%s: Cann't find beamformee entry!\n", __func__);
return _FALSE; return false;
} }
pmgntframe = alloc_mgtxmitframe(pxmitpriv); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (!pmgntframe) { if (!pmgntframe) {
RTW_ERR("%s: alloc mgnt frame fail!\n", __func__); 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); 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); dump_mgntframe(adapter, pmgntframe);
return _TRUE; return true;
} }
static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw) 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); bfee = rtw_bf_bfee_get_entry_by_addr(adapter, ra);
if (!bfee) { if (!bfee) {
RTW_ERR("%s: Cann't find beamformee entry!\n", __func__); RTW_ERR("%s: Cann't find beamformee entry!\n", __func__);
return _FALSE; return false;
} }
pmgntframe = alloc_mgtxmitframe(pxmitpriv); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (!pmgntframe) { if (!pmgntframe) {
RTW_ERR("%s: alloc mgnt frame fail!\n", __func__); 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); 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 * "AID12" Equal to 0 if the STA is an AP, mesh STA or
* STA that is a member of an IBSS * 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; aid = 0;
sta_info.aid = aid; sta_info.aid = aid;
/* "Feedback Type" set to 0 for SU */ /* "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); dump_mgntframe(adapter, pmgntframe);
return _TRUE; return true;
} }
static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, CHANNEL_WIDTH bw) 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); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (!pmgntframe) { if (!pmgntframe) {
RTW_ERR("%s: alloc mgnt frame fail!\n", __func__); RTW_ERR("%s: alloc mgnt frame fail!\n", __func__);
return _FALSE; return false;
} }
/* update attribute */ /* update attribute */
@ -445,7 +445,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, CHANNEL_WIDTH bw)
dump_mgntframe(adapter, pmgntframe); dump_mgntframe(adapter, pmgntframe);
return _TRUE; return true;
} }
static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll) 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); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (!pmgntframe) { if (!pmgntframe) {
RTW_ERR("%s: alloc mgnt frame fail!\n", __func__); RTW_ERR("%s: alloc mgnt frame fail!\n", __func__);
return _FALSE; return false;
} }
/* update attribute */ /* update attribute */
@ -507,7 +507,7 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
dump_mgntframe(adapter, pmgntframe); dump_mgntframe(adapter, pmgntframe);
return _TRUE; return true;
} }
static void _sounding_update_min_period(PADAPTER adapter, u16 period, u8 leave) 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); info = GET_BEAMFORM_INFO(adapter);
if (_TRUE == leave) { if (true == leave) {
/* /*
* When a BFee left, * When a BFee left,
* we need to find the latest min sounding period * 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++) { for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
bfee = &info->bfee_entry[i]; bfee = &info->bfee_entry[i];
if ((bfee->used == _TRUE) if ((bfee->used == true)
&& (bfee->sound_period < min_val)) && (bfee->sound_period < min_val))
min_val = bfee->sound_period; min_val = bfee->sound_period;
} }
@ -572,10 +572,10 @@ static void _sounding_reset_vars(PADAPTER adapter)
/* Clear bSound flag for the new period */ /* Clear bSound flag for the new period */
for (idx = 0; idx < MAX_BEAMFORMEE_ENTRY_NUM; idx++) { for (idx = 0; idx < MAX_BEAMFORMEE_ENTRY_NUM; idx++) {
if ((info->bfee_entry[idx].used == _TRUE) if ((info->bfee_entry[idx].used == true)
&& (info->bfee_entry[idx].sounding == _TRUE)) { && (info->bfee_entry[idx].sounding == true)) {
info->bfee_entry[idx].sounding = _FALSE; info->bfee_entry[idx].sounding = false;
info->bfee_entry[idx].bCandidateSoundingPeer = _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 */ /* Add MU BFee list first because MU priority is higher than SU */
for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) { for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
bfee = &info->bfee_entry[i]; bfee = &info->bfee_entry[i];
if (bfee->used == _FALSE) if (bfee->used == false)
continue; continue;
if (bfee->state != BEAMFORM_ENTRY_HW_STATE_ADDED) { if (bfee->state != BEAMFORM_ENTRY_HW_STATE_ADDED) {
@ -635,8 +635,8 @@ static int _sounding_get_list(PADAPTER adapter)
continue; continue;
} }
if (bfee->bApplySounding == _TRUE) { if (bfee->bApplySounding == true) {
bfee->bCandidateSoundingPeer = _TRUE; bfee->bCandidateSoundingPeer = true;
bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, sounding->min_sounding_period); bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, sounding->min_sounding_period);
sounding->mu_sounding_list[mu_idx] = i; sounding->mu_sounding_list[mu_idx] = i;
mu_idx++; mu_idx++;
@ -648,12 +648,12 @@ static int _sounding_get_list(PADAPTER adapter)
continue; continue;
} }
if (bfee->bDeleteSounding == _TRUE) { if (bfee->bDeleteSounding == true) {
sounding->su_sounding_list[su_idx] = i; sounding->su_sounding_list[su_idx] = i;
su_idx++; su_idx++;
} else if ((bfee->bApplySounding == _TRUE) } else if ((bfee->bApplySounding == true)
&& (bfee->bSuspendSUCap == _FALSE)) { && (bfee->bSuspendSUCap == false)) {
bfee->bCandidateSoundingPeer = _TRUE; bfee->bCandidateSoundingPeer = true;
bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, sounding->min_sounding_period); bfee->SoundCnt = GetInitSoundCnt(bfee->sound_period, sounding->min_sounding_period);
sounding->su_sounding_list[su_idx] = i; sounding->su_sounding_list[su_idx] = i;
su_idx++; su_idx++;
@ -681,7 +681,7 @@ static void _sounding_handler(PADAPTER adapter)
struct beamformee_entry *bfee; struct beamformee_entry *bfee;
u8 su_idx, i; u8 su_idx, i;
u32 timeout_period = 0; u32 timeout_period = 0;
u8 set_timer = _FALSE; u8 set_timer = false;
int ret = 0; int ret = 0;
static u16 wait_cnt = 0; static u16 wait_cnt = 0;
@ -735,7 +735,7 @@ static void _sounding_handler(PADAPTER adapter)
wait_cnt = 0; 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__); RTW_INFO("%s: Sounding abort! scanning APs...\n", __func__);
info->sounding_running--; info->sounding_running--;
return; return;
@ -751,7 +751,7 @@ static void _sounding_handler(PADAPTER adapter)
if (su_idx >= MAX_BEAMFORMEE_ENTRY_NUM) if (su_idx >= MAX_BEAMFORMEE_ENTRY_NUM)
continue; continue;
bfee = &info->bfee_entry[su_idx]; bfee = &info->bfee_entry[su_idx];
if (_FALSE == bfee->sounding) if (false == bfee->sounding)
break; break;
} }
if (i < MAX_NUM_BEAMFORMEE_SU) { if (i < MAX_NUM_BEAMFORMEE_SU) {
@ -760,12 +760,12 @@ static void _sounding_handler(PADAPTER adapter)
sounding->state = SOUNDING_STATE_SU_START; sounding->state = SOUNDING_STATE_SU_START;
RTW_DBG("%s: Set to SOUNDING_STATE_SU_START\n", __func__); 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 */ /* Reset sounding timeout flag for the new sounding */
bfee->bSoundingTimeout = _FALSE; bfee->bSoundingTimeout = false;
if (_TRUE == bfee->bDeleteSounding) { if (true == bfee->bDeleteSounding) {
u8 res = _FALSE; u8 res = false;
rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 0); rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 0);
return; return;
} }
@ -793,7 +793,7 @@ static void _sounding_handler(PADAPTER adapter)
/* Update MU BFee info */ /* Update MU BFee info */
for (i = 0; i < sounding->candidate_mu_bfee_cnt; i++) { for (i = 0; i < sounding->candidate_mu_bfee_cnt; i++) {
bfee = &info->bfee_entry[sounding->mu_sounding_list[i]]; bfee = &info->bfee_entry[sounding->mu_sounding_list[i]];
bfee->sounding = _TRUE; bfee->sounding = true;
} }
/* Send MU NDPA */ /* Send MU NDPA */
@ -805,9 +805,9 @@ static void _sounding_handler(PADAPTER adapter)
bfee = &info->bfee_entry[sounding->mu_sounding_list[i]]; bfee = &info->bfee_entry[sounding->mu_sounding_list[i]];
if (i == (sounding->candidate_mu_bfee_cnt - 1))/* The last STA*/ 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 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; sounding->candidate_mu_bfee_cnt = 0;
@ -835,7 +835,7 @@ static void _sounding_force_stop(PADAPTER adapter)
if ((sounding->state == SOUNDING_STATE_SU_START) if ((sounding->state == SOUNDING_STATE_SU_START)
|| (sounding->state == SOUNDING_STATE_MU_START)) { || (sounding->state == SOUNDING_STATE_MU_START)) {
u8 res = _FALSE; u8 res = false;
_cancel_timer(&info->sounding_timeout_timer, &cancelled); _cancel_timer(&info->sounding_timeout_timer, &cancelled);
rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 1); rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 1);
return; 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__); RTW_ERR("%s: Set to SU SOUNDING_STATE_SOUNDING_TIMEOUT\n", __func__);
/* SU BFee */ /* SU BFee */
bfee = &info->bfee_entry[sounding->su_bfee_curidx]; 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); RTW_WARN("%s: The BFee entry[%d] is Sounding Timeout!\n", __func__, sounding->su_bfee_curidx);
} else if (SOUNDING_STATE_MU_START == sounding->state) { } else if (SOUNDING_STATE_MU_START == sounding->state) {
sounding->state = SOUNDING_STATE_SOUNDING_TIMEOUT; 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++) { for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) {
bfer = &info->bfer_entry[i]; bfer = &info->bfer_entry[i];
if (bfer->used == _FALSE) if (bfer->used == false)
return bfer; 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++) { for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) {
bfer = &info->bfer_entry[i]; bfer = &info->bfer_entry[i];
if (bfer->used == _FALSE) if (bfer->used == false)
continue; continue;
if (_rtw_memcmp(ra, bfer->mac_addr, ETH_ALEN) == _TRUE) if (_rtw_memcmp(ra, bfer->mac_addr, ETH_ALEN) == true)
return bfer; return bfer;
} }
@ -982,7 +982,7 @@ static struct beamformer_entry *_bfer_add_entry(PADAPTER adapter,
return NULL; return NULL;
} }
bfer->used = _TRUE; bfer->used = true;
_get_txvector_parameter(adapter, sta, &bfer->g_id, &bfer->p_aid); _get_txvector_parameter(adapter, sta, &bfer->g_id, &bfer->p_aid);
_rtw_memcpy(bfer->mac_addr, sta->hwaddr, ETH_ALEN); _rtw_memcpy(bfer->mac_addr, sta->hwaddr, ETH_ALEN);
bfer->cap = bf_cap; 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++) { for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
bfee = &info->bfee_entry[i]; bfee = &info->bfee_entry[i];
if (bfee->used == _FALSE) if (bfee->used == false)
return bfee; 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++) { for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
bfee = &info->bfee_entry[i]; bfee = &info->bfee_entry[i];
if (bfee->used == _FALSE) if (bfee->used == false)
continue; continue;
if (_rtw_memcmp(ra, bfee->mac_addr, ETH_ALEN) == _TRUE) if (_rtw_memcmp(ra, bfee->mac_addr, ETH_ALEN) == true)
return bfee; return bfee;
} }
@ -1106,7 +1106,7 @@ static u8 _bfee_get_first_su_entry_idx(PADAPTER adapter, struct beamformee_entry
bfee = &info->bfee_entry[i]; bfee = &info->bfee_entry[i];
if (ignore && (bfee == ignore)) if (ignore && (bfee == ignore))
continue; continue;
if (bfee->used == _FALSE) if (bfee->used == false)
continue; continue;
if ((!TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_MU)) if ((!TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_MU))
&& TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT)) && 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]; bfee = &info->bfee_entry[i];
if (ignore && (bfee == ignore)) if (ignore && (bfee == ignore))
continue; continue;
if (bfee->used == _FALSE) if (bfee->used == false)
continue; continue;
if (TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_MU)) if (TEST_FLAG(bfee->cap, BEAMFORMEE_CAP_VHT_MU))
return i; return i;
@ -1169,7 +1169,7 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
return NULL; return NULL;
} }
bfee->used = _TRUE; bfee->used = true;
bfee->aid = sta->aid; bfee->aid = sta->aid;
bfee->mac_id = sta->mac_id; bfee->mac_id = sta->mac_id;
bfee->sound_bw = sta->bw_mode; 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; sta->txbf_paid = bfee->p_aid;
_rtw_memcpy(bfee->mac_addr, sta->hwaddr, ETH_ALEN); _rtw_memcpy(bfee->mac_addr, sta->hwaddr, ETH_ALEN);
bfee->txbf = _FALSE; bfee->txbf = false;
bfee->sounding = _FALSE; bfee->sounding = false;
bfee->sound_period = 40; 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->SoundCnt = GetInitSoundCnt(bfee->sound_period, info->sounding_info.min_sounding_period);
bfee->cap = bf_cap; bfee->cap = bf_cap;
bfee->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT; bfee->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT;
bfee->bCandidateSoundingPeer = _FALSE; bfee->bCandidateSoundingPeer = false;
bfee->bSoundingTimeout = _FALSE; bfee->bSoundingTimeout = false;
bfee->bDeleteSounding = _FALSE; bfee->bDeleteSounding = false;
bfee->bApplySounding = _TRUE; bfee->bApplySounding = true;
bfee->tx_timestamp = 0; bfee->tx_timestamp = 0;
bfee->tx_bytes = 0; bfee->tx_bytes = 0;
@ -1198,18 +1198,18 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
bfee->LogStatusFailCnt = 0; bfee->LogStatusFailCnt = 0;
bfee->NumofSoundingDim = sounding_dim; bfee->NumofSoundingDim = sounding_dim;
bfee->comp_steering_num_of_bfer = comp_steering; bfee->comp_steering_num_of_bfer = comp_steering;
bfee->bSuspendSUCap = _FALSE; bfee->bSuspendSUCap = false;
if (TEST_FLAG(bf_cap, BEAMFORMEE_CAP_VHT_MU)) { if (TEST_FLAG(bf_cap, BEAMFORMEE_CAP_VHT_MU)) {
info->beamformee_mu_cnt += 1; info->beamformee_mu_cnt += 1;
info->first_mu_bfee_index = _bfee_get_first_mu_entry_idx(adapter, NULL); 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 */ /* 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->beamformee_mu_cnt == 1) && (info->beamformee_su_cnt > 0)) {
if (info->TargetSUBFee) { if (info->TargetSUBFee) {
info->TargetSUBFee->bSuspendSUCap = _TRUE; info->TargetSUBFee->bSuspendSUCap = true;
info->TargetSUBFee->bDeleteSounding = _TRUE; info->TargetSUBFee->bDeleteSounding = true;
} else { } else {
RTW_ERR("%s: UNEXPECTED!! info->TargetSUBFee is NULL!", __func__); 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)) { } else if (TEST_FLAG(bf_cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT)) {
info->beamformee_su_cnt += 1; 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 */ /* 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)) { if ((info->beamformee_su_cnt == 1) && (info->beamformee_mu_cnt == 0)) {
info->TargetSUBFee = bfee; info->TargetSUBFee = bfee;
memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO)); memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO));
bfee->bSuspendSUCap = _FALSE; bfee->bSuspendSUCap = false;
} else { } 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->beamformee_mu_cnt -= 1;
info->first_mu_bfee_index = _bfee_get_first_mu_entry_idx(adapter, entry); 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)) { if ((info->beamformee_mu_cnt == 0) && (info->beamformee_su_cnt > 0)) {
idx = _bfee_get_first_su_entry_idx(adapter, NULL); idx = _bfee_get_first_su_entry_idx(adapter, NULL);
info->TargetSUBFee = &info->bfee_entry[idx]; info->TargetSUBFee = &info->bfee_entry[idx];
memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO)); 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)) { } else if (TEST_FLAG(entry->cap, BEAMFORMEE_CAP_VHT_SU|BEAMFORMEE_CAP_HT_EXPLICIT)) {
info->beamformee_su_cnt -= 1; info->beamformee_su_cnt -= 1;
/* When the target SU BFee leaves, disable workaround */ /* When the target SU BFee leaves, disable workaround */
if ((_TRUE == info->bEnableSUTxBFWorkAround) if ((true == info->bEnableSUTxBFWorkAround)
&& (entry == info->TargetSUBFee)) { && (entry == info->TargetSUBFee)) {
entry->bSuspendSUCap = _TRUE; entry->bSuspendSUCap = true;
info->TargetSUBFee = NULL; info->TargetSUBFee = NULL;
memset(&info->TargetCSIInfo, 0, sizeof(struct _RT_CSI_INFO)); 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); 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) if (info->beamformee_su_cnt == 0)
info->beamforming_cap &= ~(BEAMFORMER_CAP_VHT_SU|BEAMFORMER_CAP_HT_EXPLICIT); 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) 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++) { for (i = 0; i < MAX_BEAMFORMER_ENTRY_NUM; i++) {
bfee = &info->bfee_entry[i]; bfee = &info->bfee_entry[i];
if (bfee->used == _FALSE) if (bfee->used == false)
continue; continue;
if (bfee->mac_id == macid) if (bfee->mac_id == macid)
return bfee->cap; return bfee->cap;
@ -1356,8 +1356,8 @@ static void _beamforming_enter(PADAPTER adapter, void *p)
/* The current setting does not support Beaforming */ /* The current setting does not support Beaforming */
wireless_mode = sta->wireless_mode; wireless_mode = sta->wireless_mode;
if ((is_supported_ht(wireless_mode) == _FALSE) if ((is_supported_ht(wireless_mode) == false)
&& (is_supported_vht(wireless_mode) == _FALSE)) { && (is_supported_vht(wireless_mode) == false)) {
RTW_WARN("%s: Not support HT or VHT mode\n", __func__); RTW_WARN("%s: Not support HT or VHT mode\n", __func__);
return; return;
} }
@ -1419,7 +1419,7 @@ static void _beamforming_leave(PADAPTER adapter, u8 *ra)
struct beamforming_info *info; struct beamforming_info *info;
struct beamformer_entry *bfer = NULL; struct beamformer_entry *bfer = NULL;
struct beamformee_entry *bfee = NULL; struct beamformee_entry *bfee = NULL;
u8 bHwStateAddInit = _FALSE; u8 bHwStateAddInit = false;
RTW_INFO("+%s\n", __func__); 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. * old sound down event happens in the new sounding period.
* 2015.12.10 * 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); RTW_WARN("%s: The entry[%d] is bSoundingTimeout!\n", __func__, sounding->su_bfee_curidx);
bfee->bSoundingTimeout = _FALSE; bfee->bSoundingTimeout = false;
return; return;
} }
if (_TRUE == status) { if (true == status) {
/* success */ /* success */
bfee->LogStatusFailCnt = 0; bfee->LogStatusFailCnt = 0;
info->SetHalSoundownOnDemandCnt++; info->SetHalSoundownOnDemandCnt++;
rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_STATUS, &status); 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_WARN("%s: Delete entry[%d] sounding info!\n", __func__, sounding->su_bfee_curidx);
rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_STATUS, &status); rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_STATUS, &status);
bfee->bDeleteSounding = _FALSE; bfee->bDeleteSounding = false;
} else { } else {
bfee->LogStatusFailCnt++; bfee->LogStatusFailCnt++;
RTW_WARN("%s: LogStatusFailCnt=%d\n", __func__, 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); _cancel_timer(&info->sounding_timeout_timer, &cancelled);
res = C2H_SND_TXBF_GET_SND_RESULT(buf) ? _TRUE : _FALSE; res = C2H_SND_TXBF_GET_SND_RESULT(buf) ? true : false;
RTW_INFO("+%s: %s\n", __func__, res==_TRUE?"Success":"Fail!"); RTW_INFO("+%s: %s\n", __func__, res==true?"Success":"Fail!");
rtw_bf_cmd(adapter, BEAMFORMING_CTRL_END_PERIOD, &res, 1, 1); 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; pCSIMatrix = pMIMOCtrlField + 3 + Nc;
CSIMatrixLen = frame_len - 26 - 3 - Nc; CSIMatrixLen = frame_len - 26 - 3 - Nc;
info->TargetCSIInfo.bVHT = _TRUE; info->TargetCSIInfo.bVHT = true;
} else if ((category == RTW_WLAN_CATEGORY_HT) } else if ((category == RTW_WLAN_CATEGORY_HT)
&& (action == RTW_WLAN_ACTION_HT_COMPRESS_BEAMFORMING)) { && (action == RTW_WLAN_ACTION_HT_COMPRESS_BEAMFORMING)) {
pMIMOCtrlField = pframe + 26; pMIMOCtrlField = pframe + 26;
@ -1622,11 +1622,11 @@ u32 rtw_bf_get_report_packet(PADAPTER adapter, union recv_frame *precv_frame)
*/ */
pCSIMatrix = pMIMOCtrlField + 6 + Nr; pCSIMatrix = pMIMOCtrlField + 6 + Nr;
CSIMatrixLen = frame_len - 26 - 6 - Nr; CSIMatrixLen = frame_len - 26 - 6 - Nr;
info->TargetCSIInfo.bVHT = _FALSE; info->TargetCSIInfo.bVHT = false;
} }
/* Update current CSI report info */ /* Update current CSI report info */
if ((_TRUE == info->bEnableSUTxBFWorkAround) if ((true == info->bEnableSUTxBFWorkAround)
&& (info->TargetSUBFee == bfee)) { && (info->TargetSUBFee == bfee)) {
if ((info->TargetCSIInfo.Nc != Nc) || (info->TargetCSIInfo.Nr != Nr) || if ((info->TargetCSIInfo.Nc != Nc) || (info->TargetCSIInfo.Nr != Nr) ||
(info->TargetCSIInfo.ChnlWidth != CH_W) || (info->TargetCSIInfo.Ng != Ng) || (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); pmgntframe = alloc_mgtxmitframe(xmitpriv);
if (!pmgntframe) if (!pmgntframe)
return _FALSE; return false;
/* update attribute */ /* update attribute */
attrib = &pmgntframe->attrib; 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); dump_mgntframe(adapter, pmgntframe);
return _TRUE; return true;
} }
/* /*
@ -1763,7 +1763,7 @@ void rtw_bf_init(PADAPTER adapter)
info->SetHalBFLeaveOnDemandCnt = 0; info->SetHalBFLeaveOnDemandCnt = 0;
info->SetHalSoundownOnDemandCnt = 0; info->SetHalSoundownOnDemandCnt = 0;
info->bEnableSUTxBFWorkAround = _TRUE; info->bEnableSUTxBFWorkAround = true;
info->TargetSUBFee = NULL; info->TargetSUBFee = NULL;
info->sounding_running = 0; info->sounding_running = 0;
@ -1888,7 +1888,7 @@ void rtw_bf_update_traffic(PADAPTER adapter)
u8 tx_rate[MAX_BEAMFORMEE_ENTRY_NUM] = {0}; u8 tx_rate[MAX_BEAMFORMEE_ENTRY_NUM] = {0};
u64 tx_bytes, last_bytes; u64 tx_bytes, last_bytes;
u32 time, last_timestamp; u32 time, last_timestamp;
u8 set_timer = _FALSE; u8 set_timer = false;
info = GET_BEAMFORM_INFO(adapter); 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++) { for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
bfee = &info->bfee_entry[i]; bfee = &info->bfee_entry[i];
if (_FALSE == bfee->used) if (false == bfee->used)
continue; continue;
sta = rtw_get_stainfo(&adapter->stapriv, bfee->mac_addr); 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++) { for (i = 0; i < MAX_BEAMFORMEE_ENTRY_NUM; i++) {
bfee = &info->bfee_entry[i]; bfee = &info->bfee_entry[i];
if (_FALSE == bfee->used) { if (false == bfee->used) {
if (sounding_idx & BIT(i)) if (sounding_idx & BIT(i))
RTW_WARN("%s: bfee(%d) not in used but need sounding?!\n", __func__, i); RTW_WARN("%s: bfee(%d) not in used but need sounding?!\n", __func__, i);
continue; continue;
} }
if (sounding_idx & BIT(i)) { if (sounding_idx & BIT(i)) {
if (_FALSE == bfee->bApplySounding) { if (false == bfee->bApplySounding) {
bfee->bApplySounding = _TRUE; bfee->bApplySounding = true;
bfee->SoundCnt = 0; bfee->SoundCnt = 0;
set_timer = _TRUE; set_timer = true;
} }
} else { } else {
if (_TRUE == bfee->bApplySounding) { if (true == bfee->bApplySounding) {
bfee->bApplySounding = _FALSE; bfee->bApplySounding = false;
bfee->bDeleteSounding = _TRUE; bfee->bDeleteSounding = true;
bfee->SoundCnt = 0; 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) { if (SOUNDING_STATE_NONE == info->sounding_info.state) {
info->sounding_info.state = SOUNDING_STATE_INIT; info->sounding_info.state = SOUNDING_STATE_INIT;
_set_timer(&info->sounding_timer, 0); _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); struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
for (i = 0; i < BEAMFORMING_ENTRY_NUM; i++) { for (i = 0; i < BEAMFORMING_ENTRY_NUM; i++) {
if (pBeamInfo->beamforming_entry[i].bUsed == _FALSE) { if (pBeamInfo->beamforming_entry[i].bUsed == false) {
*idx = i; *idx = i;
return &(pBeamInfo->beamforming_entry[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); struct beamforming_entry *pEntry = beamforming_get_free_entry(pmlmepriv, idx);
if (pEntry != NULL) { if (pEntry != NULL) {
pEntry->bUsed = _TRUE; pEntry->bUsed = true;
pEntry->aid = aid; pEntry->aid = aid;
pEntry->mac_id = mac_id; pEntry->mac_id = mac_id;
pEntry->sound_bw = bw; pEntry->sound_bw = bw;
@ -2038,7 +2038,7 @@ struct beamforming_entry *beamforming_add_entry(PADAPTER adapter, u8 *ra, u16 ai
pEntry->g_id = 0; pEntry->g_id = 0;
} }
_rtw_memcpy(pEntry->mac_addr, ra, ETH_ALEN); _rtw_memcpy(pEntry->mac_addr, ra, ETH_ALEN);
pEntry->bSound = _FALSE; pEntry->bSound = false;
/* 3 TODO SW/FW sound period */ /* 3 TODO SW/FW sound period */
pEntry->sound_period = 200; 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); struct beamforming_entry *pEntry = beamforming_get_entry_by_addr(pmlmepriv, ra, idx);
if (pEntry != NULL) { if (pEntry != NULL) {
pEntry->bUsed = _FALSE; pEntry->bUsed = false;
pEntry->beamforming_entry_cap = BEAMFORMING_CAP_NONE; pEntry->beamforming_entry_cap = BEAMFORMING_CAP_NONE;
pEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_UNINITIALIZE; pEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_UNINITIALIZE;
return _TRUE; return true;
} else } else
return _FALSE; return false;
} }
/* Used for BeamformingStart_V1 */ /* Used for BeamformingStart_V1 */
@ -2090,7 +2090,7 @@ void beamforming_dym_ndpa_rate(PADAPTER adapter)
void beamforming_dym_period(PADAPTER Adapter) void beamforming_dym_period(PADAPTER Adapter)
{ {
u8 Idx; u8 Idx;
bool bChangePeriod = _FALSE; bool bChangePeriod = false;
u16 SoundPeriod_SW, SoundPeriod_FW; u16 SoundPeriod_SW, SoundPeriod_FW;
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(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 (pSoundInfo->sound_mode == SOUNDING_FW_VHT_TIMER || pSoundInfo->sound_mode == SOUNDING_FW_HT_TIMER) {
if (pBeamformEntry->sound_period != SoundPeriod_FW) { if (pBeamformEntry->sound_period != SoundPeriod_FW) {
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) } else if (pBeamformEntry->sound_period != SoundPeriod_SW)
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); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (pmgntframe == NULL) if (pmgntframe == NULL)
return _FALSE; return false;
/*update attribute*/ /*update attribute*/
pattrib = &pmgntframe->attrib; 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); 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); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (pmgntframe == NULL) if (pmgntframe == NULL)
return _FALSE; return false;
/*update attribute*/ /*update attribute*/
pattrib = &pmgntframe->attrib; 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); dump_mgntframe(Adapter, pmgntframe);
return _TRUE; return true;
} }
bool beamforming_send_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, CHANNEL_WIDTH bw, u8 qidx) 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) { if (pmgntframe == NULL) {
RTW_INFO("%s, alloc mgnt frame fail\n", __func__); RTW_INFO("%s, alloc mgnt frame fail\n", __func__);
return _FALSE; return false;
} }
/*update attribute*/ /*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); dump_mgntframe(Adapter, pmgntframe);
return _TRUE; return true;
} }
bool issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, CHANNEL_WIDTH bw, u8 qidx) 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); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (pmgntframe == NULL) if (pmgntframe == NULL)
return _FALSE; return false;
/*update attribute*/ /*update attribute*/
pattrib = &pmgntframe->attrib; 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); 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) 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 beamfomring_bSounding(struct beamforming_info *pBeamInfo)
{ {
bool bSounding = _FALSE; bool bSounding = false;
if ((beamforming_get_beamform_cap(pBeamInfo) & BEAMFORMER_CAP) == 0) if ((beamforming_get_beamform_cap(pBeamInfo) & BEAMFORMER_CAP) == 0)
bSounding = _FALSE; bSounding = false;
else else
bSounding = _TRUE; bSounding = true;
return bSounding; return bSounding;
} }
@ -2492,7 +2492,7 @@ u8 beamforming_sounding_idx(struct beamforming_info *pBeamInfo)
for (i = 0; i < BEAMFORMING_ENTRY_NUM; i++) { for (i = 0; i < BEAMFORMING_ENTRY_NUM; i++) {
if (pBeamInfo->beamforming_entry[i].bUsed && if (pBeamInfo->beamforming_entry[i].bUsed &&
(_FALSE == pBeamInfo->beamforming_entry[i].bSound)) { (false == pBeamInfo->beamforming_entry[i].bSound)) {
idx = i; idx = i;
break; break;
} }
@ -2548,11 +2548,11 @@ bool beamforming_select_beam_entry(struct beamforming_info *pBeamInfo)
pSoundInfo->sound_mode = SOUNDING_STOP_All_TIMER; pSoundInfo->sound_mode = SOUNDING_STOP_All_TIMER;
if (SOUNDING_STOP_All_TIMER == pSoundInfo->sound_mode) if (SOUNDING_STOP_All_TIMER == pSoundInfo->sound_mode)
return _FALSE; return false;
else { else {
pSoundInfo->sound_bw = beamforming_sounding_bw(pBeamInfo, pSoundInfo->sound_mode, pSoundInfo->sound_idx); 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); 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; u8 *RA = NULL;
struct beamforming_entry *pEntry; struct beamforming_entry *pEntry;
bool ret = _TRUE; bool ret = true;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv); struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
pEntry = &(pBeamInfo->beamforming_entry[idx]); pEntry = &(pBeamInfo->beamforming_entry[idx]);
if (pEntry->bUsed == _FALSE) { if (pEntry->bUsed == false) {
RTW_INFO("Skip Beamforming, no entry for Idx =%d\n", idx); RTW_INFO("Skip Beamforming, no entry for Idx =%d\n", idx);
return _FALSE; return false;
} }
pEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_PROGRESSING; 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); rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&idx);
return _TRUE; return true;
} }
void beamforming_end_fw(PADAPTER adapter) void beamforming_end_fw(PADAPTER adapter)
@ -2588,7 +2588,7 @@ void beamforming_end_fw(PADAPTER adapter)
bool beamforming_start_period(PADAPTER adapter) bool beamforming_start_period(PADAPTER adapter)
{ {
bool ret = _TRUE; bool ret = true;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv); struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
struct sounding_info *pSoundInfo = &(pBeamInfo->sounding_info); 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) if (pSoundInfo->sound_mode == SOUNDING_FW_VHT_TIMER || pSoundInfo->sound_mode == SOUNDING_FW_HT_TIMER)
ret = beamforming_start_fw(adapter, pSoundInfo->sound_idx); ret = beamforming_start_fw(adapter, pSoundInfo->sound_idx);
else else
ret = _FALSE; ret = false;
RTW_INFO("%s Idx %d Mode %d BW %d Period %d\n", __func__, 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); 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) void beamforming_notify(PADAPTER adapter)
{ {
bool bSounding = _FALSE; bool bSounding = false;
struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(&(adapter->mlmepriv)); struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(&(adapter->mlmepriv));
bSounding = beamfomring_bSounding(pBeamInfo); bSounding = beamfomring_bSounding(pBeamInfo);
if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_IDLE) { if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_IDLE) {
if (bSounding) { if (bSounding) {
if (beamforming_start_period(adapter) == _TRUE) if (beamforming_start_period(adapter) == true)
pBeamInfo->beamforming_state = BEAMFORMING_STATE_START; pBeamInfo->beamforming_state = BEAMFORMING_STATE_START;
} }
} else if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_START) { } else if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_START) {
if (bSounding) { if (bSounding) {
if (beamforming_start_period(adapter) == _FALSE) if (beamforming_start_period(adapter) == false)
pBeamInfo->beamforming_state = BEAMFORMING_STATE_END; pBeamInfo->beamforming_state = BEAMFORMING_STATE_END;
} else { } else {
beamforming_end_period(adapter); beamforming_end_period(adapter);
@ -2643,7 +2643,7 @@ void beamforming_notify(PADAPTER adapter)
} }
} else if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_END) { } else if (pBeamInfo->beamforming_state == BEAMFORMING_STATE_END) {
if (bSounding) { if (bSounding) {
if (beamforming_start_period(adapter) == _TRUE) if (beamforming_start_period(adapter) == true)
pBeamInfo->beamforming_state = BEAMFORMING_STATE_START; pBeamInfo->beamforming_state = BEAMFORMING_STATE_START;
} }
} else } else
@ -2668,7 +2668,7 @@ bool beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
/* The current setting does not support Beaforming */ /* The current setting does not support Beaforming */
if (0 == phtpriv->beamform_cap) { if (0 == phtpriv->beamform_cap) {
RTW_INFO("The configuration disabled Beamforming! Skip...\n"); RTW_INFO("The configuration disabled Beamforming! Skip...\n");
return _FALSE; return false;
} }
aid = psta->aid; 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); beamform_cap = (BEAMFORMING_CAP)(beamform_cap | BEAMFORMER_CAP_HT_EXPLICIT);
if (beamform_cap == BEAMFORMING_CAP_NONE) if (beamform_cap == BEAMFORMING_CAP_NONE)
return _FALSE; return false;
RTW_INFO("Beamforming Config Capability = 0x%02X\n", beamform_cap); 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) { if (pBeamformEntry == NULL) {
pBeamformEntry = beamforming_add_entry(adapter, ra, aid, mac_id, bw, beamform_cap, idx); pBeamformEntry = beamforming_add_entry(adapter, ra, aid, mac_id, bw, beamform_cap, idx);
if (pBeamformEntry == NULL) if (pBeamformEntry == NULL)
return _FALSE; return false;
else else
pBeamformEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_INITIALIZEING; pBeamformEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_INITIALIZEING;
} else { } 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 && if (pBeamformEntry->beamforming_entry_state != BEAMFORMING_ENTRY_STATE_INITIALIZED &&
pBeamformEntry->beamforming_entry_state != BEAMFORMING_ENTRY_STATE_PROGRESSED) { pBeamformEntry->beamforming_entry_state != BEAMFORMING_ENTRY_STATE_PROGRESSED) {
RTW_INFO("Error State of Beamforming"); RTW_INFO("Error State of Beamforming");
return _FALSE; return false;
} else } else
pBeamformEntry->beamforming_entry_state = BEAMFORMING_ENTRY_STATE_INITIALIZEING; 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); RTW_INFO("%s Idx %d\n", __func__, *idx);
} else } else
return _FALSE; return false;
return _SUCCESS; return _SUCCESS;
} }
@ -2729,7 +2729,7 @@ void beamforming_deinit_entry(PADAPTER adapter, u8 *ra)
u8 idx = 0; u8 idx = 0;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); 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_hal_set_hwreg(adapter, HW_VAR_SOUNDING_LEAVE, (u8 *)&idx);
RTW_INFO("%s Idx %d\n", __func__, 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); struct beamforming_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
for (idx = 0; idx < BEAMFORMING_ENTRY_NUM; idx++) { for (idx = 0; idx < BEAMFORMING_ENTRY_NUM; idx++) {
if (pBeamInfo->beamforming_entry[idx].bUsed == _TRUE) { if (pBeamInfo->beamforming_entry[idx].bUsed == true) {
pBeamInfo->beamforming_entry[idx].bUsed = _FALSE; pBeamInfo->beamforming_entry[idx].bUsed = false;
pBeamInfo->beamforming_entry[idx].beamforming_entry_cap = BEAMFORMING_CAP_NONE; pBeamInfo->beamforming_entry[idx].beamforming_entry_cap = BEAMFORMING_CAP_NONE;
pBeamInfo->beamforming_entry[idx].beamforming_entry_state = BEAMFORMING_ENTRY_STATE_UNINITIALIZE; pBeamInfo->beamforming_entry[idx].beamforming_entry_state = BEAMFORMING_ENTRY_STATE_UNINITIALIZE;
rtw_hal_set_hwreg(adapter, HW_VAR_SOUNDING_LEAVE, (u8 *)&idx); 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_info *pBeamInfo = GET_BEAMFORM_INFO(pmlmepriv);
struct beamforming_entry *pEntry = &(pBeamInfo->beamforming_entry[pBeamInfo->beamforming_cur_idx]); 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); rtw_hal_set_hwreg(Adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&pBeamInfo->beamforming_cur_idx);
beamforming_deinit_entry(Adapter, pEntry->mac_addr); beamforming_deinit_entry(Adapter, pEntry->mac_addr);
} }
@ -2778,7 +2778,7 @@ void beamforming_check_sounding_success(PADAPTER Adapter, bool status)
} }
if (pEntry->LogStatusFailCnt > 20) { if (pEntry->LogStatusFailCnt > 20) {
RTW_INFO("%s LogStatusFailCnt > 20, Stop SOUNDING\n", __func__); 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); */ /* rtw_hal_set_hwreg(Adapter, HW_VAR_SOUNDING_FW_NDPA, (u8 *)&pBeamInfo->beamforming_cur_idx); */
/* beamforming_deinit_entry(Adapter, pEntry->mac_addr); */ /* beamforming_deinit_entry(Adapter, pEntry->mac_addr); */
beamforming_wk_cmd(Adapter, BEAMFORMING_CTRL_SOUNDING_FAIL, NULL, 0, 1); 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) BEAMFORMING_CAP beamforming_get_beamform_cap(struct beamforming_info *pBeamInfo)
{ {
u8 i; u8 i;
bool bSelfBeamformer = _FALSE; bool bSelfBeamformer = false;
bool bSelfBeamformee = _FALSE; bool bSelfBeamformee = false;
struct beamforming_entry beamforming_entry; struct beamforming_entry beamforming_entry;
BEAMFORMING_CAP beamform_cap = BEAMFORMING_CAP_NONE; 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.bUsed) {
if ((beamforming_entry.beamforming_entry_cap & BEAMFORMEE_CAP_VHT_SU) || if ((beamforming_entry.beamforming_entry_cap & BEAMFORMEE_CAP_VHT_SU) ||
(beamforming_entry.beamforming_entry_cap & BEAMFORMEE_CAP_HT_EXPLICIT)) (beamforming_entry.beamforming_entry_cap & BEAMFORMEE_CAP_HT_EXPLICIT))
bSelfBeamformee = _TRUE; bSelfBeamformee = true;
if ((beamforming_entry.beamforming_entry_cap & BEAMFORMER_CAP_VHT_SU) || if ((beamforming_entry.beamforming_entry_cap & BEAMFORMER_CAP_VHT_SU) ||
(beamforming_entry.beamforming_entry_cap & BEAMFORMER_CAP_HT_EXPLICIT)) (beamforming_entry.beamforming_entry_cap & BEAMFORMER_CAP_HT_EXPLICIT))
bSelfBeamformer = _TRUE; bSelfBeamformer = true;
} }
if (bSelfBeamformer && bSelfBeamformee) 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);*/ /*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; pBeamformEntry->DefaultCsiCnt = 0;
else else
pBeamformEntry->DefaultCsiCnt++; pBeamformEntry->DefaultCsiCnt++;
_rtw_memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len); _rtw_memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len);
pBeamformEntry->bDefaultCSI = _FALSE; pBeamformEntry->bDefaultCSI = false;
if (pBeamformEntry->DefaultCsiCnt > 20) if (pBeamformEntry->DefaultCsiCnt > 20)
pBeamformEntry->bDefaultCSI = _TRUE; pBeamformEntry->bDefaultCSI = true;
else else
pBeamformEntry->bDefaultCSI = _FALSE; pBeamformEntry->bDefaultCSI = false;
#endif #endif
return ret; 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");*/ /*RTW_INFO("rtw_beamforming_get_ndpa_frame\n");*/
if (IS_HARDWARE_TYPE_8812(Adapter) == _FALSE) if (IS_HARDWARE_TYPE_8812(Adapter) == false)
return; return;
else if (get_frame_sub_type(pframe) != WIFI_NDPA) else if (get_frame_sub_type(pframe) != WIFI_NDPA)
return; return;

View file

@ -49,7 +49,7 @@ void rtw_btcoex_IpsNotify(PADAPTER padapter, u8 type)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
hal_btcoex_IpsNotify(padapter, type); hal_btcoex_IpsNotify(padapter, type);
@ -60,7 +60,7 @@ void rtw_btcoex_LpsNotify(PADAPTER padapter, u8 type)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
hal_btcoex_LpsNotify(padapter, type); hal_btcoex_LpsNotify(padapter, type);
@ -75,10 +75,10 @@ void rtw_btcoex_ScanNotify(PADAPTER padapter, u8 type)
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
if (_FALSE == type) { if (false == type) {
#ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_CONCURRENT_MODE
if (rtw_mi_buddy_check_fwstate(padapter, WIFI_SITE_MONITOR)) if (rtw_mi_buddy_check_fwstate(padapter, WIFI_SITE_MONITOR))
return; return;
@ -102,11 +102,11 @@ void rtw_btcoex_ConnectNotify(PADAPTER padapter, u8 action)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
#ifdef DBG_CONFIG_ERROR_RESET #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", RTW_INFO(FUNC_ADPT_FMT ": [BTCoex] under reset, skip notify!\n",
FUNC_ADPT_ARG(padapter)); FUNC_ADPT_ARG(padapter));
return; return;
@ -114,7 +114,7 @@ void rtw_btcoex_ConnectNotify(PADAPTER padapter, u8 action)
#endif /* DBG_CONFIG_ERROR_RESET */ #endif /* DBG_CONFIG_ERROR_RESET */
#ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_CONCURRENT_MODE
if (_FALSE == action) { if (false == action) {
if (rtw_mi_buddy_check_fwstate(padapter, WIFI_UNDER_LINKING)) if (rtw_mi_buddy_check_fwstate(padapter, WIFI_UNDER_LINKING))
return; return;
} }
@ -128,11 +128,11 @@ void rtw_btcoex_MediaStatusNotify(PADAPTER padapter, u8 mediaStatus)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
#ifdef DBG_CONFIG_ERROR_RESET #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", RTW_INFO(FUNC_ADPT_FMT ": [BTCoex] under reset, skip notify!\n",
FUNC_ADPT_ARG(padapter)); FUNC_ADPT_ARG(padapter));
return; return;
@ -147,7 +147,7 @@ void rtw_btcoex_MediaStatusNotify(PADAPTER padapter, u8 mediaStatus)
#endif /* CONFIG_CONCURRENT_MODE */ #endif /* CONFIG_CONCURRENT_MODE */
if ((RT_MEDIA_CONNECT == mediaStatus) 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); rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
hal_btcoex_MediaStatusNotify(padapter, mediaStatus); hal_btcoex_MediaStatusNotify(padapter, mediaStatus);
@ -158,7 +158,7 @@ void rtw_btcoex_SpecialPacketNotify(PADAPTER padapter, u8 pktType)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
hal_btcoex_SpecialPacketNotify(padapter, pktType); hal_btcoex_SpecialPacketNotify(padapter, pktType);
@ -169,7 +169,7 @@ void rtw_btcoex_IQKNotify(PADAPTER padapter, u8 state)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
hal_btcoex_IQKNotify(padapter, state); hal_btcoex_IQKNotify(padapter, state);
@ -180,7 +180,7 @@ void rtw_btcoex_BtInfoNotify(PADAPTER padapter, u8 length, u8 *tmpBuf)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
hal_btcoex_BtInfoNotify(padapter, length, tmpBuf); hal_btcoex_BtInfoNotify(padapter, length, tmpBuf);
@ -191,7 +191,7 @@ void rtw_btcoex_BtMpRptNotify(PADAPTER padapter, u8 length, u8 *tmpBuf)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
if (padapter->registrypriv.mp_mode == 1) if (padapter->registrypriv.mp_mode == 1)
@ -205,7 +205,7 @@ void rtw_btcoex_SuspendNotify(PADAPTER padapter, u8 state)
PHAL_DATA_TYPE pHalData; PHAL_DATA_TYPE pHalData;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
hal_btcoex_SuspendNotify(padapter, state); hal_btcoex_SuspendNotify(padapter, state);
@ -217,10 +217,10 @@ void rtw_btcoex_HaltNotify(PADAPTER padapter)
u8 do_halt = 1; u8 do_halt = 1;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
do_halt = 0; do_halt = 0;
if (_FALSE == padapter->bup) { if (false == padapter->bup) {
RTW_INFO(FUNC_ADPT_FMT ": bup=%d Skip!\n", RTW_INFO(FUNC_ADPT_FMT ": bup=%d Skip!\n",
FUNC_ADPT_ARG(padapter), padapter->bup); FUNC_ADPT_ARG(padapter), padapter->bup);
do_halt = 0; do_halt = 0;
@ -261,7 +261,7 @@ void rtw_btcoex_Handler(PADAPTER padapter)
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
if (_FALSE == pHalData->EEPROMBluetoothCoexist) if (false == pHalData->EEPROMBluetoothCoexist)
return; return;
hal_btcoex_Hanlder(padapter); hal_btcoex_Hanlder(padapter);
@ -296,10 +296,10 @@ u32 rtw_btcoex_GetAMPDUSize(PADAPTER padapter)
void rtw_btcoex_SetManualControl(PADAPTER padapter, u8 manual) void rtw_btcoex_SetManualControl(PADAPTER padapter, u8 manual)
{ {
if (_TRUE == manual) if (true == manual)
hal_btcoex_SetManualControl(padapter, _TRUE); hal_btcoex_SetManualControl(padapter, true);
else else
hal_btcoex_SetManualControl(padapter, _FALSE); hal_btcoex_SetManualControl(padapter, false);
} }
u8 rtw_btcoex_1Ant(PADAPTER padapter) u8 rtw_btcoex_1Ant(PADAPTER padapter)
@ -398,7 +398,7 @@ void rtw_btcoex_LPS_Enter(PADAPTER padapter)
pwrpriv = adapter_to_pwrctl(padapter); pwrpriv = adapter_to_pwrctl(padapter);
pwrpriv->bpower_saving = _TRUE; pwrpriv->bpower_saving = true;
lpsVal = rtw_btcoex_LpsVal(padapter); lpsVal = rtw_btcoex_LpsVal(padapter);
rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lpsVal, "BTCOEX"); 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) { if (pwrpriv->pwr_mode != PS_MODE_ACTIVE) {
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "BTCOEX"); rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "BTCOEX");
LPS_RF_ON_check(padapter, 100); 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) u8 rtw_btcoex_is_tfbga_package_type(PADAPTER padapter)
{ {
return _FALSE; return false;
} }
u8 rtw_btcoex_get_ant_div_cfg(PADAPTER padapter) 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); 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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"); RTW_INFO("BTLinkStatusNotify\n");
/* Current only RTL8723 support this command. */ /* Current only RTL8723 support this command. */
/* pBtMgnt->bSupportProfile = TRUE; */ /* pBtMgnt->bSupportProfile = true; */
pBtMgnt->bSupportProfile = _FALSE; pBtMgnt->bSupportProfile = false;
pBtMgnt->ExtConfig.NumberOfACL = 0; pBtMgnt->ExtConfig.NumberOfACL = 0;
pBtMgnt->ExtConfig.NumberOfSCO = 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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; return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */ /* 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 cmp_msg6[32] = invite_rsp;
u8 res = OTHER; 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);*/ /*RTW_INFO("%s, msg:%s\n",__func__,msg);*/
res = RX_ATTEND_ACK; 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);*/ /*RTW_INFO("%s, msg:%s\n",__func__,msg);*/
res = RX_LEAVE_ACK; 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);*/ /*RTW_INFO("%s, msg:%s\n",__func__,msg);*/
res = RX_BT_LEAVE; 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);*/ /*RTW_INFO("%s, msg:%s\n",__func__,msg);*/
res = RX_INVITE_REQ; 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; 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; res = RX_INVITE_RSP;
else { else {
/*RTW_INFO("%s, %s\n", __func__, msg);*/ /*RTW_INFO("%s, %s\n", __func__, msg);*/
@ -1279,50 +1279,50 @@ void rtw_btcoex_recvmsgbysocket(void *data)
switch (parse_res) { switch (parse_res) {
case RX_ATTEND_ACK: case RX_ATTEND_ACK:
/* 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_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); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
break; break;
case RX_ATTEND_REQ: 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_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); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
break; break;
case RX_INVITE_REQ: case RX_INVITE_REQ:
/* invite req from BT */ /* 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_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); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
break; break;
case RX_INVITE_RSP: case RX_INVITE_RSP:
/*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_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); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
break; break;
case RX_LEAVE_ACK: case RX_LEAVE_ACK:
/* mean BT know wifi will leave */ /* 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_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); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
break; break;
case RX_BT_LEAVE: case RX_BT_LEAVE:
/* BT leave */ /* BT leave */
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, leave_ack, sizeof(leave_ack), _FALSE); /* no ack */ rtw_btcoex_sendmsgbysocket(pbtcoexadapter, leave_ack, sizeof(leave_ack), false); /* no ack */
pcoex_info->BT_attend = _FALSE; 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_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); rtw_btcoex_pta_off_on_notify(pbtcoexadapter, pcoex_info->BT_attend);
break; break;
default: default:
if (_TRUE == pcoex_info->BT_attend) if (true == pcoex_info->BT_attend)
rtw_btcoex_parse_hci_cmd(pbtcoexadapter, recv_data, recv_length); rtw_btcoex_parse_hci_cmd(pbtcoexadapter, recv_data, recv_length);
else else
RTW_INFO("ERROR!! BT is UP\n"); 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 iovec iov;
struct bt_coex_info *pcoex_info = &padapter->coex_info; struct bt_coex_info *pcoex_info = &padapter->coex_info;
/* RTW_INFO("%s: msg:%s, force:%s\n", __func__, msg, force == _TRUE?"TRUE":"FALSE"); */ /* RTW_INFO("%s: msg:%s, force:%s\n", __func__, msg, force == true?"true":"false"); */
if (_FALSE == force) { if (false == force) {
if (_FALSE == pcoex_info->BT_attend) { if (false == pcoex_info->BT_attend) {
RTW_INFO("TX Blocked: WiFi-BT disconnected\n"); RTW_INFO("TX Blocked: WiFi-BT disconnected\n");
return _FAIL; return _FAIL;
} }
@ -1443,12 +1443,12 @@ u8 rtw_btcoex_create_kernel_socket(_adapter *padapter)
RTW_INFO("binding socket success\n"); RTW_INFO("binding socket success\n");
pcoex_info->udpsock->sk->sk_data_ready = rtw_btcoex_recvmsg_init; pcoex_info->udpsock->sk->sk_data_ready = rtw_btcoex_recvmsg_init;
pcoex_info->sock_open |= KERNEL_SOCKET_OK; 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_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; status = _SUCCESS;
} else { } else {
pcoex_info->BT_attend = _FALSE; pcoex_info->BT_attend = false;
sock_release(pcoex_info->udpsock); /* bind fail release socket */ sock_release(pcoex_info->udpsock); /* bind fail release socket */
RTW_INFO("Error binding socket: %d\n", kernel_socket_err); RTW_INFO("Error binding socket: %d\n", kernel_socket_err);
status = _FAIL; status = _FAIL;
@ -1466,8 +1466,8 @@ void rtw_btcoex_close_kernel_socket(_adapter *padapter)
RTW_INFO("release kernel socket\n"); RTW_INFO("release kernel socket\n");
sock_release(pcoex_info->udpsock); sock_release(pcoex_info->udpsock);
pcoex_info->sock_open &= ~(KERNEL_SOCKET_OK); pcoex_info->sock_open &= ~(KERNEL_SOCKET_OK);
if (_TRUE == pcoex_info->BT_attend) if (true == pcoex_info->BT_attend)
pcoex_info->BT_attend = _FALSE; pcoex_info->BT_attend = false;
RTW_INFO("sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend); 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) void rtw_btcoex_init_socket(_adapter *padapter)
{ {
u8 is_invite = _FALSE; u8 is_invite = false;
struct bt_coex_info *pcoex_info = &padapter->coex_info; struct bt_coex_info *pcoex_info = &padapter->coex_info;
RTW_INFO("%s\n", __func__); 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)); memset(pcoex_info, 0, sizeof(struct bt_coex_info));
pcoex_info->btcoex_wq = create_workqueue("BTCOEX"); pcoex_info->btcoex_wq = create_workqueue("BTCOEX");
INIT_DELAYED_WORK(&pcoex_info->recvmsg_work, INIT_DELAYED_WORK(&pcoex_info->recvmsg_work,
@ -1487,16 +1487,16 @@ void rtw_btcoex_init_socket(_adapter *padapter)
pbtcoexadapter = padapter; pbtcoexadapter = padapter;
/* We expect BT is off if BT don't send ack to wifi */ /* 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_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) if (rtw_btcoex_create_kernel_socket(padapter) == _SUCCESS)
pcoex_info->is_exist = _TRUE; pcoex_info->is_exist = true;
else { else {
pcoex_info->is_exist = _FALSE; pcoex_info->is_exist = false;
pbtcoexadapter = NULL; pbtcoexadapter = NULL;
} }
RTW_INFO("%s: pbtcoexadapter:%p, coex_info->is_exist: %s\n" 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; struct bt_coex_info *pcoex_info = &padapter->coex_info;
RTW_INFO("%s--coex_info->is_exist: %s, pcoex_info->BT_attend:%s\n" 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->is_exist) {
if (_TRUE == pcoex_info->BT_attend) { if (true == pcoex_info->BT_attend) {
/*inform BT wifi leave*/ /*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); msleep(50);
} }
@ -1521,7 +1521,7 @@ void rtw_btcoex_close_socket(_adapter *padapter)
rtw_btcoex_close_kernel_socket(padapter); rtw_btcoex_close_kernel_socket(padapter);
pbtcoexadapter = NULL; 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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 */ /* 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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) 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) */ /* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2; 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_SOCKET_TRX */
#endif /* CONFIG_BT_COEXIST */ #endif /* CONFIG_BT_COEXIST */

View file

@ -85,7 +85,7 @@ static void c2h_wk_callback(_workitem *work)
u8 id, seq, plen; u8 id, seq, plen;
u8 *payload; u8 *payload;
evtpriv->c2h_wk_alive = _TRUE; evtpriv->c2h_wk_alive = true;
while (!rtw_cbuf_empty(evtpriv->c2h_queue)) { while (!rtw_cbuf_empty(evtpriv->c2h_queue)) {
c2h_evt = (u8 *)rtw_cbuf_pop(evtpriv->c2h_queue); c2h_evt = (u8 *)rtw_cbuf_pop(evtpriv->c2h_queue);
@ -117,7 +117,7 @@ static void c2h_wk_callback(_workitem *work)
continue; continue;
} }
if (direct_hdl_filter(adapter, id, seq, plen, payload) == _TRUE) { if (direct_hdl_filter(adapter, id, seq, plen, payload) == true) {
/* Handle directly */ /* Handle directly */
rtw_hal_c2h_handler(adapter, id, seq, plen, payload); rtw_hal_c2h_handler(adapter, id, seq, plen, payload);
rtw_mfree(c2h_evt, C2H_REG_LEN); 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 */ #endif /* CONFIG_C2H_WK */
@ -181,7 +181,7 @@ exit:
#ifdef CONFIG_C2H_WK #ifdef CONFIG_C2H_WK
_init_workitem(&pevtpriv->c2h_wk, c2h_wk_callback, NULL); _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); pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
#endif #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);
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 #ifdef SUPPORT_HW_RFOFF_DETECTED
/* To decide allow or not */ /* 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; 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) { if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID) {
/* RTW_INFO("==>enqueue POWER_SAVING_CTRL_WK_CID\n"); */ /* RTW_INFO("==>enqueue POWER_SAVING_CTRL_WK_CID\n"); */
bAllow = _TRUE; bAllow = true;
} }
} }
} }
#endif #endif
if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan)) if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
bAllow = _TRUE; bAllow = true;
if (cmd_obj->no_io) if (cmd_obj->no_io)
bAllow = _TRUE; bAllow = true;
if ((!rtw_is_hw_init_completed(pcmdpriv->padapter) && (bAllow == _FALSE)) if ((!rtw_is_hw_init_completed(pcmdpriv->padapter) && (bAllow == false))
|| ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == _FALSE /* com_thread not running */ || ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == false /* com_thread not running */
) { ) {
if (DBG_CMD_EXECUTE) if (DBG_CMD_EXECUTE)
RTW_INFO(ADPT_FMT" drop "CMD_FMT" hw_init_completed:%u, cmdthd_running:%u\n", ADPT_ARG(cmd_obj->padapter) 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) void rtw_stop_cmd_thread(_adapter *adapter)
{ {
if (adapter->cmdThread && 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 == 0) {
adapter->cmdpriv.stop_req = 1; adapter->cmdpriv.stop_req = 1;
_rtw_up_sema(&adapter->cmdpriv.cmd_queue_sema); _rtw_up_sema(&adapter->cmdpriv.cmd_queue_sema);
@ -552,7 +552,7 @@ thread_return rtw_cmd_thread(thread_context context)
prspbuf = pcmdpriv->rsp_buf; prspbuf = pcmdpriv->rsp_buf;
pcmdpriv->stop_req = 0; pcmdpriv->stop_req = 0;
ATOMIC_SET(&(pcmdpriv->cmdthd_running), _TRUE); ATOMIC_SET(&(pcmdpriv->cmdthd_running), true);
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema); _rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
@ -712,7 +712,7 @@ post_process:
#endif #endif
/* to avoid enqueue cmd after free all cmd_obj */ /* 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 */ /* free all cmd_obj resources */
do { do {
@ -864,12 +864,12 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
#ifdef CONFIG_LPS #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); rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
#endif #endif
#ifdef CONFIG_P2P_PS #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); p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
#endif /* CONFIG_P2P_PS */ #endif /* CONFIG_P2P_PS */
@ -883,7 +883,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
return _FAIL; 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)); 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 #ifdef CONFIG_MP_INCLUDED
if (padapter->registrypriv.mp_mode == 1) if (padapter->registrypriv.mp_mode == 1)
padapter->mppriv.workparam.bcompleted = _TRUE; padapter->mppriv.workparam.bcompleted = true;
#endif #endif
} }
@ -1243,7 +1243,7 @@ void rtw_readtssi_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd)
#ifdef CONFIG_MP_INCLUDED #ifdef CONFIG_MP_INCLUDED
if (padapter->registrypriv.mp_mode == 1) if (padapter->registrypriv.mp_mode == 1)
padapter->mppriv.workparam.bcompleted = _TRUE; padapter->mppriv.workparam.bcompleted = true;
#endif #endif
} }
@ -1375,7 +1375,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
/* for hidden ap to set fw_state here */ /* 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) { switch (ndis_network_mode) {
case Ndis802_11IBSS: case Ndis802_11IBSS:
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); 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 */ /* 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. */ /* 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); _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); 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); 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) { if (pregistrypriv->ht_enable && ptmp && tmp_len > 0) {
/* Added by Albert 2010/06/23 */ /* 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_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); 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); rtw_set_ft_flags(padapter, RTW_FT_OVER_DS_SUPPORTED);
} else { } else {
/*Don't use FT roaming if Target AP cannot support FT*/ /*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)) if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm; psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
else else
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, _FALSE); GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false);
if (key_type == GROUP_KEY) if (key_type == GROUP_KEY)
_rtw_memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16); _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 */ #endif /* CONFIG_TDLS */
/* jeff: set this becasue at least sw key is ready */ /* jeff: set this becasue at least sw key is ready */
padapter->securitypriv.busetkipkey = _TRUE; padapter->securitypriv.busetkipkey = true;
if (enqueue) { if (enqueue) {
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); 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 */ /* 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; res = _FAIL;
goto exit; goto exit;
} }
@ -2151,8 +2151,8 @@ inline u8 rtw_set_country_cmd(_adapter *adapter, int flags, const char *country_
{ {
const struct country_chplan *ent; const struct country_chplan *ent;
if (is_alpha(country_code[0]) == _FALSE if (is_alpha(country_code[0]) == false
|| is_alpha(country_code[1]) == _FALSE || is_alpha(country_code[1]) == false
) { ) {
RTW_PRINT("%s input country_code is not alpha2\n", __func__); RTW_PRINT("%s input country_code is not alpha2\n", __func__);
return _FAIL; return _FAIL;
@ -2319,12 +2319,12 @@ exit:
/* from_timer == 1 means driver is in LPS */ /* from_timer == 1 means driver is in LPS */
u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer) u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
{ {
u8 bEnterPS = _FALSE; u8 bEnterPS = false;
u16 BusyThresholdHigh; u16 BusyThresholdHigh;
u16 BusyThresholdLow; u16 BusyThresholdLow;
u16 BusyThreshold; u16 BusyThreshold;
u8 bBusyTraffic = _FALSE, bTxBusyTraffic = _FALSE, bRxBusyTraffic = _FALSE; u8 bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false;
u8 bHigherBusyTraffic = _FALSE, bHigherBusyRxTraffic = _FALSE, bHigherBusyTxTraffic = _FALSE; u8 bHigherBusyTraffic = false, bHigherBusyRxTraffic = false, bHigherBusyTxTraffic = false;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
@ -2351,7 +2351,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
/* */ /* */
/* Determine if our traffic is busy now */ /* Determine if our traffic is busy now */
/* */ /* */
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if ((check_fwstate(pmlmepriv, _FW_LINKED) == true)
/*&& !MgntInitAdapterInProgress(pMgntInfo)*/) { /*&& !MgntInitAdapterInProgress(pMgntInfo)*/) {
/* if we raise bBusyTraffic in last watchdog, using lower threshold. */ /* if we raise bBusyTraffic in last watchdog, using lower threshold. */
if (pmlmepriv->LinkDetectInfo.bBusyTraffic) if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
@ -2359,23 +2359,23 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold || if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold ||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) { pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) {
bBusyTraffic = _TRUE; bBusyTraffic = true;
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
bRxBusyTraffic = _TRUE; bRxBusyTraffic = true;
else else
bTxBusyTraffic = _TRUE; bTxBusyTraffic = true;
} }
/* Higher Tx/Rx data. */ /* Higher Tx/Rx data. */
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 || if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) { pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) {
bHigherBusyTraffic = _TRUE; bHigherBusyTraffic = true;
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
bHigherBusyRxTraffic = _TRUE; bHigherBusyRxTraffic = true;
else else
bHigherBusyTxTraffic = _TRUE; bHigherBusyTxTraffic = true;
} }
#ifdef CONFIG_TRAFFIC_PROTECT #ifdef CONFIG_TRAFFIC_PROTECT
@ -2399,7 +2399,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
#ifdef CONFIG_TDLS_AUTOSETUP #ifdef CONFIG_TDLS_AUTOSETUP
/* TDLS_WATCHDOG_PERIOD * 2sec, periodically send */ /* 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) { if ((ptdlsinfo->watchdog_count % TDLS_WATCHDOG_PERIOD) == 0) {
_rtw_memcpy(txmgmt.peer, baddr, ETH_ALEN); _rtw_memcpy(txmgmt.peer, baddr, ETH_ALEN);
issue_tdls_dis_req(padapter, &txmgmt); 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) if (padapter->dump_rx_cnt_mode & DUMP_DRV_TRX_COUNTER_DATA)
RTW_INFO("(-)Tx = %d, Rx = %d\n", pmlmepriv->LinkDetectInfo.NumTxOkInPeriod, pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); RTW_INFO("(-)Tx = %d, Rx = %d\n", pmlmepriv->LinkDetectInfo.NumTxOkInPeriod, pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod);
#endif #endif
bEnterPS = _FALSE; bEnterPS = false;
#ifdef CONFIG_LPS_SLOW_TRANSITION #ifdef CONFIG_LPS_SLOW_TRANSITION
if (bBusyTraffic == _TRUE) { if (bBusyTraffic == true) {
if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount <= 4) if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount <= 4)
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; pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount == 0) if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount == 0)
bEnterPS = _TRUE; bEnterPS = true;
#else /* CONFIG_LPS_SLOW_TRANSITION */ #else /* CONFIG_LPS_SLOW_TRANSITION */
bEnterPS = _TRUE; bEnterPS = true;
#endif /* CONFIG_LPS_SLOW_TRANSITION */ #endif /* CONFIG_LPS_SLOW_TRANSITION */
} }
#ifdef CONFIG_DYNAMIC_DTIM #ifdef CONFIG_DYNAMIC_DTIM
if (pmlmepriv->LinkDetectInfo.LowPowerTransitionCount == 8) if (pmlmepriv->LinkDetectInfo.LowPowerTransitionCount == 8)
bEnterPS = _FALSE; bEnterPS = false;
RTW_INFO("LowPowerTransitionCount=%d\n", pmlmepriv->LinkDetectInfo.LowPowerTransitionCount); RTW_INFO("LowPowerTransitionCount=%d\n", pmlmepriv->LinkDetectInfo.LowPowerTransitionCount);
#endif /* CONFIG_DYNAMIC_DTIM */ #endif /* CONFIG_DYNAMIC_DTIM */
@ -2478,7 +2478,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
/* rtw_hal_dm_watchdog_in_lps(padapter); */ /* rtw_hal_dm_watchdog_in_lps(padapter); */
} }
#ifdef CONFIG_DYNAMIC_DTIM #ifdef CONFIG_DYNAMIC_DTIM
if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == _TRUE) if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true)
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount++; pmlmepriv->LinkDetectInfo.LowPowerTransitionCount++;
#endif /* CONFIG_DYNAMIC_DTIM */ #endif /* CONFIG_DYNAMIC_DTIM */
} else { } else {
@ -2559,28 +2559,28 @@ static void dynamic_update_bcn_check(_adapter *padapter)
if (count % 10 == 0) { if (count % 10 == 0) {
count = 1; count = 1;
if (_FALSE == ATOMIC_READ(&pmlmepriv->olbc) if (false == ATOMIC_READ(&pmlmepriv->olbc)
&& _FALSE == ATOMIC_READ(&pmlmepriv->olbc_ht)) { && false == ATOMIC_READ(&pmlmepriv->olbc_ht)) {
if (rtw_ht_operation_update(padapter) > 0) { if (rtw_ht_operation_update(padapter) > 0) {
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE); update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, false);
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE); update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true);
} }
} }
} }
/* In 2s, there are any legacy AP, update HT info, and then reset count */ /* In 2s, there are any legacy AP, update HT info, and then reset count */
if (_FALSE != ATOMIC_READ(&pmlmepriv->olbc) if (false != ATOMIC_READ(&pmlmepriv->olbc)
&& _FALSE != ATOMIC_READ(&pmlmepriv->olbc_ht)) { && false != ATOMIC_READ(&pmlmepriv->olbc_ht)) {
if (rtw_ht_operation_update(padapter) > 0) { if (rtw_ht_operation_update(padapter) > 0) {
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE); update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, false);
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE); update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true);
} }
ATOMIC_SET(&pmlmepriv->olbc, _FALSE); ATOMIC_SET(&pmlmepriv->olbc, false);
ATOMIC_SET(&pmlmepriv->olbc_ht, _FALSE); ATOMIC_SET(&pmlmepriv->olbc_ht, false);
count = 0; count = 0;
} }
@ -2593,7 +2593,7 @@ void rtw_iface_dynamic_chk_wk_hdl(_adapter *padapter)
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK #ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
#ifdef CONFIG_AP_MODE #ifdef CONFIG_AP_MODE
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
expire_timeout_chk(padapter); expire_timeout_chk(padapter);
#endif #endif
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */ #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); rtw_hal_sreset_linked_status_check(padapter);
#endif #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 #ifdef DBG_RX_COUNTER_DUMP
rtw_dump_rx_counters(padapter); rtw_dump_rx_counters(padapter);
@ -2660,17 +2660,17 @@ void lps_ctrl_wk_hdl(_adapter *padapter, u8 lps_ctrl_type)
u8 mstatus; u8 mstatus;
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)
|| (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE)) || (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true))
return; return;
switch (lps_ctrl_type) { switch (lps_ctrl_type) {
case LPS_CTRL_SCAN: case LPS_CTRL_SCAN:
/* RTW_INFO("LPS_CTRL_SCAN\n"); */ /* RTW_INFO("LPS_CTRL_SCAN\n"); */
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
rtw_btcoex_ScanNotify(padapter, _TRUE); rtw_btcoex_ScanNotify(padapter, true);
#endif /* CONFIG_BT_COEXIST */ #endif /* CONFIG_BT_COEXIST */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
/* connect */ /* connect */
LPS_Leave(padapter, "LPS_CTRL_SCAN"); LPS_Leave(padapter, "LPS_CTRL_SCAN");
} }
@ -2823,7 +2823,7 @@ static void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim)
return; return;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE) if (rtw_btcoex_IsBtControlLps(padapter) == true)
return; return;
#endif #endif
@ -2838,7 +2838,7 @@ static void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim)
pwrpriv->dtim = 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; u8 ps_mode = pwrpriv->pwr_mode;
/* RTW_INFO("change DTIM from %d to %d, ps_mode=%d\n", pwrpriv->dtim, dtim, ps_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 #ifdef CONFIG_ANTENNA_DIVERSITY
void antenna_select_wk_hdl(_adapter *padapter, u8 antenna) 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) 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 drvextra_cmd_parm *pdrvextra_cmd_parm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
u8 bSupportAntDiv = _FALSE; u8 bSupportAntDiv = false;
u8 res = _SUCCESS; u8 res = _SUCCESS;
int i; int i;
rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv)); rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv));
if (_FALSE == bSupportAntDiv) if (false == bSupportAntDiv)
return _FAIL; return _FAIL;
for (i = 0; i < dvobj->iface_nums; i++) { 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; return _FAIL;
} }
if (_TRUE == enqueue) { if (true == enqueue) {
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) { if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
@ -3239,7 +3239,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
struct sta_info *psta_bmc; struct sta_info *psta_bmc;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
u32 start = rtw_get_current_time(); u32 start = rtw_get_current_time();
u8 empty = _FALSE; u8 empty = false;
psta_bmc = rtw_get_bcmc_stainfo(padapter); psta_bmc = rtw_get_bcmc_stainfo(padapter);
if (!psta_bmc) 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); 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_msleep_os(100);
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty);
} }
if (psta_bmc->sleepq_len == 0) { if (psta_bmc->sleepq_len == 0) {
if (empty == _SUCCESS) { if (empty == _SUCCESS) {
bool update_tim = _FALSE; bool update_tim = false;
if (pstapriv->tim_bitmap & BIT(0)) if (pstapriv->tim_bitmap & BIT(0))
update_tim = _TRUE; update_tim = true;
pstapriv->tim_bitmap &= ~BIT(0); pstapriv->tim_bitmap &= ~BIT(0);
pstapriv->sta_dz_bitmap &= ~BIT(0); pstapriv->sta_dz_bitmap &= ~BIT(0);
if (update_tim == _TRUE) if (update_tim == true)
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "bmc sleepq and HIQ empty"); _update_beacon(padapter, _TIM_IE_, NULL, true, "bmc sleepq and HIQ empty");
} else /* re check again */ } else /* re check again */
rtw_chk_hi_queue_cmd(padapter); 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 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; goto cac_status_chk;
if (rfctl->dbg_dfs_master_fake_radar_detect_cnt != 0) { 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 #else
_adapter *adapter = from_timer(adapter, t, dfs_master_timer); _adapter *adapter = from_timer(adapter, t, dfs_master_timer);
#endif #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) 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); 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); 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_ch = ch;
rfctl->radar_detect_bw = bw; rfctl->radar_detect_bw = bw;
rfctl->radar_detect_offset = offset; 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 mlme_ext_priv *mlmeext = &adapter->mlmeextpriv;
struct mi_state mstate; struct mi_state mstate;
u8 u_ch, u_bw, u_offset; u8 u_ch, u_bw, u_offset;
bool ld_sta_in_dfs = _FALSE; bool ld_sta_in_dfs = false;
bool sync_ch = _FALSE; /* _FALSE: asign channel directly */ bool sync_ch = false; /* false: asign channel directly */
bool needed = _FALSE; bool needed = false;
rtw_mi_status_no_self(adapter, &mstate); rtw_mi_status_no_self(adapter, &mstate);
rtw_mi_get_ch_setting_union_no_self(adapter, &u_ch, &u_bw, &u_offset); rtw_mi_get_ch_setting_union_no_self(adapter, &u_ch, &u_bw, &u_offset);
if (u_ch != 0) if (u_ch != 0)
sync_ch = _TRUE; sync_ch = true;
switch (self_action) { switch (self_action) {
case MLME_STA_CONNECTING: case MLME_STA_CONNECTING:
@ -3537,7 +3537,7 @@ void rtw_dfs_master_status_apply(_adapter *adapter, u8 self_action)
break; 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)) { 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) 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); , 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) { if (MSTATE_STA_LD_NUM(&mstate) > 0) {
/* rely on AP on which STA mode connects */ /* rely on AP on which STA mode connects */
if (rtw_is_dfs_ch(u_ch, u_bw, u_offset)) if (rtw_is_dfs_ch(u_ch, u_bw, u_offset))
ld_sta_in_dfs = _TRUE; ld_sta_in_dfs = true;
goto apply; 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)) if (rtw_is_dfs_ch(u_ch, u_bw, u_offset))
needed = _TRUE; needed = true;
apply: apply:
@ -3580,7 +3580,7 @@ apply:
, FUNC_ADPT_ARG(adapter), MSTATE_STA_LD_NUM(&mstate), MSTATE_STA_LG_NUM(&mstate), MSTATE_AP_NUM(&mstate) , FUNC_ADPT_ARG(adapter), MSTATE_STA_LD_NUM(&mstate), MSTATE_STA_LG_NUM(&mstate), MSTATE_AP_NUM(&mstate)
, u_ch, u_bw, u_offset); , u_ch, u_bw, u_offset);
if (needed == _TRUE) if (needed == true)
rtw_dfs_master_enable(adapter, u_ch, u_bw, u_offset); rtw_dfs_master_enable(adapter, u_ch, u_bw, u_offset);
else else
rtw_dfs_master_disable(adapter, u_ch, u_bw, u_offset, ld_sta_in_dfs); 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; padapter->mppriv.mode = MP_ON;
MPT_PwrCtlDM(padapter, 0); MPT_PwrCtlDM(padapter, 0);
} }
padapter->mppriv.bmac_filter = _FALSE; padapter->mppriv.bmac_filter = false;
odm_write_dig(&pHalData->odmpriv, 0x20); odm_write_dig(&pHalData->odmpriv, 0x20);
} else if (mp_cmd_id == MP_STOP) { } else if (mp_cmd_id == MP_STOP) {
if (padapter->registrypriv.mp_mode == 1) { 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); 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; goto exit;
ret = rtw_hal_c2h_handler(adapter, id, seq, plen, payload); 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; phead = &st_ctl->tracker_q.queue;
plist = get_next(phead); plist = get_next(phead);
pnext = get_next(plist); 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); st = LIST_CONTAINOR(plist, struct session_tracker, list);
plist = pnext; plist = pnext;
pnext = get_next(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); _exit_critical_bh(&st_ctl->tracker_q.lock, &irqL);
plist = get_next(&dlist); 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); st = LIST_CONTAINOR(plist, struct session_tracker, list);
plist = get_next(plist); plist = get_next(plist);
rtw_mfree((u8 *)st, sizeof(struct session_tracker)); 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]); phead = &(stapriv->sta_hash[i]);
plist = get_next(phead); 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); sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); 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; phead = &st_ctl->tracker_q.queue;
plist = get_next(phead); 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); st = LIST_CONTAINOR(plist, struct session_tracker, list);
if (st->local_naddr == local_naddr 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); plist = get_next(plist);
} }
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (rtw_end_of_queue_search(phead, plist) == true)
st = NULL; st = NULL;
switch (cmd) { 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); pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network);
_rtw_memcpy(&(pwlan->network), pdev_network, pdev_network->Length); _rtw_memcpy(&(pwlan->network), pdev_network, pdev_network->Length);
/* pwlan->fixed = _TRUE; */ /* pwlan->fixed = true; */
/* copy pdev_network information to pmlmepriv->cur_network */ /* copy pdev_network information to pmlmepriv->cur_network */
_rtw_memcpy(&mlme_cur_network->network, pdev_network, (get_WLAN_BSSID_EX_sz(pdev_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); _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); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
set_fwstate(pmlmepriv, _FW_LINKED); 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); rtw_free_cmd_obj(pcmd);
#ifdef CONFIG_MP_INCLUDED #ifdef CONFIG_MP_INCLUDED
if (padapter->registrypriv.mp_mode == 1) if (padapter->registrypriv.mp_mode == 1)
padapter->mppriv.workparam.bcompleted = _TRUE; padapter->mppriv.workparam.bcompleted = true;
#endif #endif

View file

@ -255,9 +255,9 @@ bool rtw_fwdl_test_trigger_chksum_fail(void)
if (fwdl_test_chksum_fail) { if (fwdl_test_chksum_fail) {
RTW_PRINT("fwdl test case: trigger chksum_fail\n"); RTW_PRINT("fwdl test case: trigger chksum_fail\n");
fwdl_test_chksum_fail--; fwdl_test_chksum_fail--;
return _TRUE; return true;
} }
return _FALSE; return false;
} }
bool rtw_fwdl_test_trigger_wintint_rdy_fail(void) 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) { if (fwdl_test_wintint_rdy_fail) {
RTW_PRINT("fwdl test case: trigger wintint_rdy_fail\n"); RTW_PRINT("fwdl test case: trigger wintint_rdy_fail\n");
fwdl_test_wintint_rdy_fail--; fwdl_test_wintint_rdy_fail--;
return _TRUE; return true;
} }
return _FALSE; return false;
} }
static u32 g_wait_hiq_empty_ms = 0; 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) { if (del_rx_ampdu_test_no_tx_fail) {
RTW_PRINT("del_rx_ampdu test case: trigger no_tx_fail\n"); RTW_PRINT("del_rx_ampdu test case: trigger no_tx_fail\n");
del_rx_ampdu_test_no_tx_fail--; 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) 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++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
pstats = &psta->sta_stats; pstats = &psta->sta_stats;
if (pstats == NULL) if (pstats == NULL)
continue; continue;
if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE) if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != true)
&& (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE) && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != true)
&& (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(adapter), 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, "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); 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; 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; sta_rec[i] = NULL;
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE) if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != true)
&& (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE) && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != true)
&& (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(adapter), 6) != _TRUE)) { && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(adapter), 6) != true)) {
sta_rec[macid_rec_idx++] = psta; 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"); 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) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (rtw_end_of_queue_search(phead, plist) == true)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
if (!pnetwork) if (!pnetwork)
break; 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)) { is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) {
notify_signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);/* dbm */ notify_signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);/* dbm */
} else { } else {
@ -1311,8 +1311,8 @@ ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_
struct net_device *dev = data; struct net_device *dev = data;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev); _adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
bool need_indicate_scan_done = _FALSE; bool need_indicate_scan_done = false;
u8 _status = _FALSE; u8 _status = false;
NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT]; NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT];
if (count < 1) 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; goto cancel_ps_deny;
} }
if (rtw_mi_busy_traffic_check(padapter, _FALSE)) { if (rtw_mi_busy_traffic_check(padapter, false)) {
RTW_INFO("scan abort!! BusyTraffic == _TRUE\n"); RTW_INFO("scan abort!! BusyTraffic == true\n");
goto cancel_ps_deny; 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"); RTW_INFO("scan abort!! AP mode process WPS\n");
goto cancel_ps_deny; 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); RTW_INFO("scan abort!! fwstate=0x%x\n", pmlmepriv->fw_state);
goto cancel_ps_deny; 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); _adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
u8 dis_pwt = 0; u8 dis_pwt = 0;
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DIS_PWT, &(dis_pwt)); 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; return 0;
} }
ssize_t proc_set_dis_pwt(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data) 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)) { if (buffer && !copy_from_user(tmp, buffer, count)) {
int num = sscanf(tmp, "%hhx", &dis_pwt); 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) if (num >= 1)
rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DIS_PWT, &(dis_pwt)); 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); rtw_hal_get_def_var(padapter, HW_DEF_RA_INFO_DUMP, m);
/*============ rx info ============ */ /*============ 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; return 0;
@ -2997,7 +2997,7 @@ int proc_get_all_sta_info(struct seq_file *m, void *v)
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); 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].content,
&pwrpriv->patterns[index].len, &pwrpriv->patterns[index].len,
pwrpriv->patterns[index].mask); pwrpriv->patterns[index].mask);
if (ret == _TRUE) if (ret == true)
pwrpriv->wowlan_pattern_idx++; 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); _adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
struct wifidirect_info *pwdinfo = &(padapter->wdinfo); struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
struct p2p_wowlan_info peerinfo = pwdinfo->p2p_wow_info; struct p2p_wowlan_info peerinfo = pwdinfo->p2p_wow_info;
if (_TRUE == peerinfo.is_trigger) { if (true == peerinfo.is_trigger) {
RTW_PRINT_SEL(m, "is_trigger: TRUE\n"); RTW_PRINT_SEL(m, "is_trigger: true\n");
switch (peerinfo.wowlan_recv_frame_type) { switch (peerinfo.wowlan_recv_frame_type) {
case P2P_WOWLAN_RECV_NEGO_REQ: case P2P_WOWLAN_RECV_NEGO_REQ:
RTW_PRINT_SEL(m, "Frame Type: Nego Request\n"); 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; struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
u8 SpaceBtwnItemAndValue = TDLS_DBG_INFO_SPACE_BTWN_ITEM_AND_VALUE; u8 SpaceBtwnItemAndValue = TDLS_DBG_INFO_SPACE_BTWN_ITEM_AND_VALUE;
u8 SpaceBtwnItemAndValueTmp = 0; u8 SpaceBtwnItemAndValueTmp = 0;
bool FirstMatchFound = _FALSE; bool FirstMatchFound = false;
int j = 0; int j = 0;
RTW_PRINT_SEL(m, "============[TDLS Function Info]============\n"); 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 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 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 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 = %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 #ifdef CONFIG_TDLS_CH_SW
RTW_PRINT_SEL(m, "%-*s =", SpaceBtwnItemAndValue, "TDLS CH SW State"); 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 { else {
for (j = 0; j < 32; j++) { for (j = 0; j < 32; j++) {
if (ptdlsinfo->chsw_info.ch_sw_state & BIT(j)) { if (ptdlsinfo->chsw_info.ch_sw_state & BIT(j)) {
if (FirstMatchFound == _FALSE) { if (FirstMatchFound == false) {
SpaceBtwnItemAndValueTmp = 1; SpaceBtwnItemAndValueTmp = 1;
FirstMatchFound = _TRUE; FirstMatchFound = true;
} else } else
SpaceBtwnItemAndValueTmp = SpaceBtwnItemAndValue + 3; SpaceBtwnItemAndValueTmp = SpaceBtwnItemAndValue + 3;
switch (BIT(j)) { 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 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 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 = %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); RTW_PRINT_SEL(m, "%-*s = %d\n", SpaceBtwnItemAndValue, "TDLS CH SW Dump Back", ptdlsinfo->chsw_info.dump_stack);
#endif #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 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 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 Driver Setup", (ptdlsinfo->driver_setup == true) ? "true" : "false");
return 0; 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 SpaceBtwnItemAndValue = TDLS_DBG_INFO_SPACE_BTWN_ITEM_AND_VALUE;
u8 SpaceBtwnItemAndValueTmp = 0; u8 SpaceBtwnItemAndValueTmp = 0;
u8 NumOfTdlsStaToShow = 0; u8 NumOfTdlsStaToShow = 0;
bool FirstMatchFound = _FALSE; bool FirstMatchFound = false;
/* Search for TDLS sta info to display */ /* Search for TDLS sta info to display */
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL); _enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
for (i = 0; i < NUM_STA; i++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
if (psta->tdls_sta_state != TDLS_STATE_NONE) { 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 = "MAC_FMT"\n", SpaceBtwnItemAndValue, "Mac Address", MAC_ARG(psta->hwaddr));
RTW_PRINT_SEL(m, "%-*s =", SpaceBtwnItemAndValue, "TDLS STA State"); RTW_PRINT_SEL(m, "%-*s =", SpaceBtwnItemAndValue, "TDLS STA State");
SpaceBtwnItemAndValueTmp = 0; SpaceBtwnItemAndValueTmp = 0;
FirstMatchFound = _FALSE; FirstMatchFound = false;
for (j = 0; j < 32; j++) { for (j = 0; j < 32; j++) {
if (psta->tdls_sta_state & BIT(j)) { if (psta->tdls_sta_state & BIT(j)) {
if (FirstMatchFound == _FALSE) { if (FirstMatchFound == false) {
SpaceBtwnItemAndValueTmp = 1; SpaceBtwnItemAndValueTmp = 1;
FirstMatchFound = _TRUE; FirstMatchFound = true;
} else } else
SpaceBtwnItemAndValueTmp = SpaceBtwnItemAndValue + 3; SpaceBtwnItemAndValueTmp = SpaceBtwnItemAndValue + 3;
switch (BIT(j)) { switch (BIT(j)) {
@ -3984,9 +3984,9 @@ int proc_get_tdls_info(struct seq_file *m, void *v)
u8 SpaceBtwnItemAndValue = 41; u8 SpaceBtwnItemAndValue = 41;
u8 SpaceBtwnItemAndValueTmp = 0; u8 SpaceBtwnItemAndValueTmp = 0;
u8 NumOfTdlsStaToShow = 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"); RTW_PRINT_SEL(m, "No tdls info can be shown since hal doesn't support tdls\n");
return 0; return 0;
} }
@ -4061,7 +4061,7 @@ int proc_get_efuse_map(struct seq_file *m, void *v)
u8 ips_mode = IPS_NUM; u8 ips_mode = IPS_NUM;
u16 mapLen; 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) if (mapLen > EFUSE_MAX_MAP_LEN)
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); RTW_INFO("0: set sa query request , key_type=%d\n", key_type);
} }
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) && padapter->securitypriv.binstallBIPkey == _TRUE) { && (check_fwstate(pmlmepriv, _FW_LINKED) == true) && padapter->securitypriv.binstallBIPkey == true) {
RTW_INFO("STA:"MAC_FMT"\n", MAC_ARG(get_my_bssid(&(pmlmeinfo->network)))); RTW_INFO("STA:"MAC_FMT"\n", MAC_ARG(get_my_bssid(&(pmlmeinfo->network))));
/* TX unicast sa_query to AP */ /* TX unicast sa_query to AP */
issue_action_SA_Query(padapter, get_my_bssid(&(pmlmeinfo->network)), 0, 0, (u8)key_type); 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 */ /* TX unicast sa_query to every client STA */
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL); _enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
for (index = 0; index < NUM_STA; index++) { 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]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
_rtw_memcpy(&mac_addr[psta->mac_id][0], psta->hwaddr, ETH_ALEN); _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) if (key_type < 0 || key_type > 4)
return count; return count;
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
if (key_type == 3) /* key_type 3 only for AP mode */ if (key_type == 3) /* key_type 3 only for AP mode */
return count; return count;
/* TX unicast deauth to AP */ /* TX unicast deauth to AP */
issue_deauth_11w(padapter, get_my_bssid(&(pmlmeinfo->network)), 0, (u8)key_type); 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) if (key_type == 3)
issue_deauth_11w(padapter, bc_addr, 0, IEEE80211W_RIGHT_KEY); 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]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
_rtw_memcpy(&mac_addr[psta->mac_id][0], psta->hwaddr, ETH_ALEN); _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]); psta = rtw_get_stainfo(pstapriv, &mac_addr[index][0]);
if (psta && key_type != IEEE80211W_WRONG_KEY && key_type != IEEE80211W_NO_KEY) { 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); _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); rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--; 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); _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); RTW_INFO("1: setnd auth, 2: send assoc request. tx_auth=%d\n", tx_auth);
} }
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { && (check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
if (tx_auth == 1) { if (tx_auth == 1) {
/* TX unicast auth to AP */ /* TX unicast auth to AP */
issue_auth(padapter, NULL, 0); issue_auth(padapter, NULL, 0);

View file

@ -50,7 +50,7 @@ static bool rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset)
int result = 0; int result = 0;
if (pAdapter->registrypriv.boffefusemask) if (pAdapter->registrypriv.boffefusemask)
return FALSE; return false;
if (c < 4) /* Upper double word */ if (c < 4) /* Upper double word */
result = (maskfileBuffer[r] & (0x10 << c)); 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); PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);
if (pAdapter->registrypriv.boffefusemask) if (pAdapter->registrypriv.boffefusemask)
return FALSE; return false;
if (IS_HARDWARE_TYPE_8188E(pAdapter)) 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) 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; u8 ret = _SUCCESS;
u16 mapLen = 0, i = 0; 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); ret = rtw_efuse_map_read(padapter, addr, cnts , data);
if (padapter->registrypriv.boffefusemask == 0) { if (padapter->registrypriv.boffefusemask == 0) {
for (i = 0; i < cnts; i++) { 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.*/ if (rtw_file_efuse_IsMasked(padapter, addr + i)) /*use file efuse mask.*/
data[i] = 0xff; data[i] = 0xff;
} else { } else {
@ -150,13 +150,13 @@ Efuse_Read1ByteFromFakeContent(
u8 *Value) u8 *Value)
{ {
if (Offset >= EFUSE_MAX_HW_SIZE) if (Offset >= EFUSE_MAX_HW_SIZE)
return _FALSE; return false;
/* DbgPrint("Read fake content, offset = %d\n", Offset); */ /* DbgPrint("Read fake content, offset = %d\n", Offset); */
if (fakeEfuseBank == 0) if (fakeEfuseBank == 0)
*Value = fakeEfuseContent[Offset]; *Value = fakeEfuseContent[Offset];
else else
*Value = fakeBTEfuseContent[fakeEfuseBank - 1][Offset]; *Value = fakeBTEfuseContent[fakeEfuseBank - 1][Offset];
return _TRUE; return true;
} }
bool bool
@ -171,12 +171,12 @@ Efuse_Write1ByteToFakeContent(
u8 Value) u8 Value)
{ {
if (Offset >= EFUSE_MAX_HW_SIZE) if (Offset >= EFUSE_MAX_HW_SIZE)
return _FALSE; return false;
if (fakeEfuseBank == 0) if (fakeEfuseBank == 0)
fakeEfuseContent[Offset] = Value; fakeEfuseContent[Offset] = Value;
else else
fakeBTEfuseContent[fakeEfuseBank - 1][Offset] = Value; fakeBTEfuseContent[fakeEfuseBank - 1][Offset] = Value;
return _TRUE; return true;
} }
/*----------------------------------------------------------------------------- /*-----------------------------------------------------------------------------
@ -401,10 +401,10 @@ efuse_OneByteRead(
} }
if (tmpidx < 100) { if (tmpidx < 100) {
*data = rtw_read8(pAdapter, EFUSE_CTRL); *data = rtw_read8(pAdapter, EFUSE_CTRL);
bResult = _TRUE; bResult = true;
} else { } else {
*data = 0xff; *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] 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)); RTW_INFO("%s: [ERROR] EFUSE_CTRL =0x%08x !!!\n", __func__, rtw_read32(pAdapter, EFUSE_CTRL));
} }
@ -421,7 +421,7 @@ efuse_OneByteWrite(
bool bPseudoTest) bool bPseudoTest)
{ {
u8 tmpidx = 0; u8 tmpidx = 0;
u8 bResult = _FALSE; u8 bResult = false;
u32 efuseValue = 0; u32 efuseValue = 0;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
@ -433,7 +433,7 @@ efuse_OneByteWrite(
return bResult; return bResult;
} }
Efuse_PowerSwitch(pAdapter, _TRUE, _TRUE); Efuse_PowerSwitch(pAdapter, true, true);
/* -----------------e-fuse reg ctrl --------------------------------- */ /* -----------------e-fuse reg ctrl --------------------------------- */
/* address */ /* address */
@ -463,9 +463,9 @@ efuse_OneByteWrite(
} }
if (tmpidx < 100) if (tmpidx < 100)
bResult = _TRUE; bResult = true;
else { else {
bResult = _FALSE; bResult = false;
RTW_INFO("%s: [ERROR] addr=0x%x ,efuseValue=0x%x ,bResult=%d time out 1s !!!\n", RTW_INFO("%s: [ERROR] addr=0x%x ,efuseValue=0x%x ,bResult=%d time out 1s !!!\n",
__func__, addr, efuseValue, bResult); __func__, addr, efuseValue, bResult);
RTW_INFO("%s: [ERROR] EFUSE_CTRL =0x%08x !!!\n", __func__, rtw_read32(pAdapter, EFUSE_CTRL)); 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))) (IS_CHIP_VENDOR_SMIC(pHalData->version_id)))
phy_set_mac_reg(pAdapter, EFUSE_TEST, BIT(11), 0); phy_set_mac_reg(pAdapter, EFUSE_TEST, BIT(11), 0);
Efuse_PowerSwitch(pAdapter, _TRUE, _FALSE); Efuse_PowerSwitch(pAdapter, true, false);
return bResult; return bResult;
} }
@ -540,12 +540,12 @@ Efuse_WordEnableDataWrite(PADAPTER pAdapter,
static u8 efuse_read8(PADAPTER padapter, u16 address, u8 *value) 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) 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}; 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_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_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if (start_addr > real_content_len) if (start_addr > real_content_len)
return _FAIL; return _FAIL;
if (_TRUE == bWrite) { if (true == bWrite) {
if ((start_addr + cnts) > max_available_size) if ((start_addr + cnts) > max_available_size)
return _FAIL; return _FAIL;
rw8 = &efuse_write8; 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_PreUpdateAction(padapter, backupRegs);
Efuse_PowerSwitch(padapter, bWrite, _TRUE); Efuse_PowerSwitch(padapter, bWrite, true);
/* e-fuse one byte read / write */ /* e-fuse one byte read / write */
for (i = 0; i < cnts; i++) { 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; break;
} }
Efuse_PowerSwitch(padapter, bWrite, _FALSE); Efuse_PowerSwitch(padapter, bWrite, false);
efuse_PostUpdateAction(padapter, backupRegs); efuse_PostUpdateAction(padapter, backupRegs);
@ -601,15 +601,15 @@ u16 efuse_GetMaxSize(PADAPTER padapter)
u16 max_size; u16 max_size;
max_size = 0; 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; return max_size;
} }
/* ------------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------------ */
u8 efuse_GetCurrentSize(PADAPTER padapter, u16 *size) u8 efuse_GetCurrentSize(PADAPTER padapter, u16 *size)
{ {
Efuse_PowerSwitch(padapter, _FALSE, _TRUE); Efuse_PowerSwitch(padapter, false, true);
*size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, _FALSE); *size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
Efuse_PowerSwitch(padapter, _FALSE, _FALSE); Efuse_PowerSwitch(padapter, false, false);
return _SUCCESS; return _SUCCESS;
} }
@ -619,15 +619,15 @@ u16 efuse_bt_GetMaxSize(PADAPTER padapter)
u16 max_size; u16 max_size;
max_size = 0; 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; return max_size;
} }
u8 efuse_bt_GetCurrentSize(PADAPTER padapter, u16 *size) u8 efuse_bt_GetCurrentSize(PADAPTER padapter, u16 *size)
{ {
Efuse_PowerSwitch(padapter, _FALSE, _TRUE); Efuse_PowerSwitch(padapter, false, true);
*size = Efuse_GetCurrentSize(padapter, EFUSE_BT, _FALSE); *size = Efuse_GetCurrentSize(padapter, EFUSE_BT, false);
Efuse_PowerSwitch(padapter, _FALSE, _FALSE); Efuse_PowerSwitch(padapter, false, false);
return _SUCCESS; return _SUCCESS;
} }
@ -636,16 +636,16 @@ u8 rtw_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
{ {
u16 mapLen = 0; 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) if ((addr + cnts) > mapLen)
return _FAIL; 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; return _SUCCESS;
} }
@ -654,16 +654,16 @@ u8 rtw_BT_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
{ {
u16 mapLen = 0; 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) if ((addr + cnts) > mapLen)
return _FAIL; 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; return _SUCCESS;
} }
@ -689,8 +689,8 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
PEFUSE_HAL pEfuseHal = &pHalData->EfuseHal; PEFUSE_HAL pEfuseHal = &pHalData->EfuseHal;
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _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); EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, &efuse_max_available_len, false);
if ((addr + cnts) > mapLen) if ((addr + cnts) > mapLen)
return _FAIL; return _FAIL;
@ -710,7 +710,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
if (padapter->registrypriv.boffefusemask == 0) { if (padapter->registrypriv.boffefusemask == 0) {
for (i = 0; i < cnts; i++) { 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. */ if (rtw_file_efuse_IsMasked(padapter, addr + i)) /*use file efuse mask. */
data[i] = map[addr + i]; data[i] = map[addr + i];
} else { } 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]); 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; chk_total_byte = 0;
idx = 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); rtw_hal_get_hwreg(padapter, HW_VAR_EFUSE_BYTES, (u8 *)&startAddr);
if (startAddr == 0) { 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_INFO("%s: Efuse_GetCurrentSize startAddr=%#X\n", __func__, startAddr);
} }
RTW_DBG("%s: 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) { 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("offset=%x\n", offset);
RTW_INFO("word_en=%x\n", word_en); 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++; offset++;
} }
/*Efuse_PowerSwitch(padapter, _TRUE, _FALSE);*/ /*Efuse_PowerSwitch(padapter, true, false);*/
efuse_PostUpdateAction(padapter, backupRegs); 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; u8 ret = _SUCCESS;
u16 mapLen = 0; 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) if ((addr + cnts) > mapLen)
return _FAIL; 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");
} }
RTW_INFO("\n"); RTW_INFO("\n");
Efuse_PowerSwitch(padapter, _TRUE, _TRUE); Efuse_PowerSwitch(padapter, true, true);
idx = 0; idx = 0;
offset = (addr >> 3); 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++) for (i = 0; i < PGPKT_DATA_SIZE; i++)
RTW_INFO("0x%02X ", newdata[i]); RTW_INFO("0x%02X ", newdata[i]);
RTW_INFO("\n"); 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) if (ret == _FAIL)
break; break;
} }
@ -875,7 +875,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
offset++; offset++;
} }
Efuse_PowerSwitch(padapter, _TRUE, _FALSE); Efuse_PowerSwitch(padapter, true, false);
exit: exit:
@ -915,13 +915,13 @@ Efuse_ReadAllMap(
{ {
u16 mapLen = 0; 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_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, 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; u16 mapLen = 0;
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest); 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); memset(pHalData->efuse_eeprom_data, 0xFF, mapLen);
else { else {
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE #ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
@ -1289,7 +1289,7 @@ u8 mac_hidden_wl_func_to_hal_wl_func(u8 func)
int isAdaptorInfoFileValid(void) int isAdaptorInfoFileValid(void)
{ {
return _TRUE; return true;
} }
int storeAdaptorInfoFile(char *path, u8 *efuse_data) 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); ptmpbuf = rtw_zmalloc(bufsize);
if (ptmpbuf == NULL) if (ptmpbuf == NULL)
return _FALSE; return false;
count = rtw_retrieve_from_file(filepatch, ptmpbuf, bufsize); count = rtw_retrieve_from_file(filepatch, ptmpbuf, bufsize);
if (count <= 100) { if (count <= 100) {
rtw_mfree(ptmpbuf, bufsize); rtw_mfree(ptmpbuf, bufsize);
RTW_ERR("%s, filepatch %s, size=%d, FAIL!!\n", __func__, filepatch, count); RTW_ERR("%s, filepatch %s, size=%d, FAIL!!\n", __func__, filepatch, count);
return _FALSE; return false;
} }
i = 0; i = 0;
@ -1384,7 +1384,7 @@ u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len)
rtw_mfree(ptmpbuf, bufsize); rtw_mfree(ptmpbuf, bufsize);
RTW_INFO("%s, filepatch %s, size=%d, done\n", __func__, filepatch, count); RTW_INFO("%s, filepatch %s, size=%d, done\n", __func__, filepatch, count);
return _TRUE; return true;
} }
#ifdef CONFIG_EFUSE_CONFIG_FILE #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 c;
u8 temp[3]; u8 temp[3];
u8 temp_i; u8 temp_i;
u8 end = _FALSE; u8 end = false;
u32 ret = _FAIL; u32 ret = _FAIL;
u8 *file_data = NULL; u8 *file_data = NULL;
u32 file_size, read_size, pos = 0; u32 file_size, read_size, pos = 0;
u8 *map = NULL; 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); RTW_PRINT("%s %s is not readable\n", __func__, path);
goto exit; goto exit;
} }
@ -1432,16 +1432,16 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
while (1) { while (1) {
if (pos >= read_size) { if (pos >= read_size) {
end = _TRUE; end = true;
break; break;
} }
c = file_data[pos++]; c = file_data[pos++];
/* bypass spece or eol or null before first hex digit */ /* 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; continue;
if (IsHexDigit(c) == _FALSE) { if (IsHexDigit(c) == false) {
RTW_ERR("%s invalid 8-bit hex format for offset:0x%03x\n", __func__, i); RTW_ERR("%s invalid 8-bit hex format for offset:0x%03x\n", __func__, i);
goto exit; 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) { if (temp_i != 0) {
RTW_ERR("%s incomplete 8-bit hex format for offset:0x%03x\n", __func__, i); RTW_ERR("%s incomplete 8-bit hex format for offset:0x%03x\n", __func__, i);
goto exit; goto exit;
@ -1492,7 +1492,7 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
u32 read_size, pos = 0; u32 read_size, pos = 0;
u8 addr[ETH_ALEN]; 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); RTW_PRINT("%s %s is not readable\n", __func__, path);
goto exit; goto exit;
} }
@ -1506,7 +1506,7 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
temp[2] = 0; /* end of string '\0' */ temp[2] = 0; /* end of string '\0' */
for (i = 0 ; i < ETH_ALEN ; i++) { 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); RTW_ERR("%s invalid 8-bit hex format for address offset:%u\n", __func__, i);
goto exit; goto exit;
} }

View file

@ -140,11 +140,11 @@ uint rtw_is_cckrates_included(u8 *rate)
while (rate[i] != 0) { while (rate[i] != 0) {
if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) || if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22)) (((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22))
return _TRUE; return true;
i++; i++;
} }
return _FALSE; return false;
} }
uint rtw_is_cckratesonly_included(u8 *rate) uint rtw_is_cckratesonly_included(u8 *rate)
@ -155,26 +155,26 @@ uint rtw_is_cckratesonly_included(u8 *rate)
while (rate[i] != 0) { while (rate[i] != 0) {
if ((((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) && if ((((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) &&
(((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22)) (((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22))
return _FALSE; return false;
i++; i++;
} }
return _TRUE; return true;
} }
int rtw_check_network_type(unsigned char *rate, int ratelen, int channel) int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
{ {
if (channel > 14) { if (channel > 14) {
if ((rtw_is_cckrates_included(rate)) == _TRUE) if ((rtw_is_cckrates_included(rate)) == true)
return WIRELESS_INVALID; return WIRELESS_INVALID;
else else
return WIRELESS_11A; return WIRELESS_11A;
} else { /* could be pure B, pure G, or B/G */ } 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; return WIRELESS_11B;
else if ((rtw_is_cckrates_included(rate)) == _TRUE) else if ((rtw_is_cckrates_included(rate)) == true)
return WIRELESS_11BG; return WIRELESS_11BG;
else else
return WIRELESS_11G; 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) { while (cnt < in_len) {
if (eid == in_ie[cnt] 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]; target_ie = &in_ie[cnt];
if (ie) if (ie)
@ -500,7 +500,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
/* HT Cap. */ /* HT Cap. */
if (((pregistrypriv->wireless_mode & WIRELESS_11_5N) || (pregistrypriv->wireless_mode & WIRELESS_11_24N)) if (((pregistrypriv->wireless_mode & WIRELESS_11_5N) || (pregistrypriv->wireless_mode & WIRELESS_11_24N))
&& (pregistrypriv->ht_enable == _TRUE)) { && (pregistrypriv->ht_enable == true)) {
/* todo: */ /* 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); pbuf = rtw_get_ie(pbuf, _WPA_IE_ID_, &len, limit_new);
if (pbuf) { if (pbuf) {
/* check if oui matches... */ /* 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; goto check_next_ie;
/* check version... */ /* check version... */
_rtw_memcpy((u8 *)&leval16, (pbuf + 6), sizeof(val16)); _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) 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; 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; 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; 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; 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 WPA_CIPHER_WEP104;
return 0; return 0;
@ -580,15 +580,15 @@ int rtw_get_wpa_cipher_suite(u8 *s)
int rtw_get_wpa2_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; 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; 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; 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; 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 WPA_CIPHER_WEP104;
return 0; 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)) || 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; return _FAIL;
pos = wpa_ie; 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]; authmode = in_ie[cnt];
/* if(authmode==_WAPI_IE_) */ /* if(authmode==_WAPI_IE_) */
if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 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)) { _rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == true)) {
if (wapi_ie) if (wapi_ie)
_rtw_memcpy(wapi_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); _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) { while (cnt < in_len) {
authmode = in_ie[cnt]; 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) if (wpa_ie)
_rtw_memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt + 1] + 2); _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 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}; u8 eid, wps_oui[4] = {0x0, 0x50, 0xf2, 0x04};
if (ie_ptr == NULL) if (ie_ptr == NULL)
@ -833,10 +833,10 @@ u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen)
eid = ie_ptr[0]; 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"); */ /* RTW_INFO("==> found WPS_IE.....\n"); */
*wps_ielen = ie_ptr[1] + 2; *wps_ielen = ie_ptr[1] + 2;
match = _TRUE; match = true;
} }
return match; 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; 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; wpsie_ptr = in_ie + cnt;
if (wps_ie) 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; *len_attr = 0;
if ((wps_ie[0] != _VENDOR_SPECIFIC_IE_) || 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; return attr_ptr;
/* 6 = 1(Element ID) + 1(Length) + 4(WPS OUI) */ /* 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. * check_local_bit: check locally bit or not.
* *
* Output: * Output:
* _TRUE: The mac address is invalid. * true: The mac address is invalid.
* _FALSE: The mac address is valid. * false: The mac address is valid.
* *
* Auther: Isaac.Li * 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 null_mac_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
u8 multi_mac_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; 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)) { if (_rtw_memcmp(mac_addr, null_mac_addr, ETH_ALEN)) {
res = _TRUE; res = true;
goto func_exit; goto func_exit;
} }
if (_rtw_memcmp(mac_addr, multi_mac_addr, ETH_ALEN)) { if (_rtw_memcmp(mac_addr, multi_mac_addr, ETH_ALEN)) {
res = _TRUE; res = true;
goto func_exit; goto func_exit;
} }
if (mac_addr[0] & BIT0) { if (mac_addr[0] & BIT0) {
res = _TRUE; res = true;
goto func_exit; goto func_exit;
} }
if (check_local_bit == _TRUE) { if (check_local_bit == true) {
if (mac_addr[0] & BIT1) { if (mac_addr[0] & BIT1) {
res = _TRUE; res = true;
goto func_exit; goto func_exit;
} }
} }
@ -1397,7 +1397,7 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr)
} }
err_chk: err_chk:
if (rtw_check_invalid_mac_address(mac, _TRUE) == _TRUE) { if (rtw_check_invalid_mac_address(mac, true) == true) {
#if DEFAULT_RANDOM_MACADDR #if DEFAULT_RANDOM_MACADDR
RTW_ERR("invalid mac addr:"MAC_FMT", assign random MAC\n", MAC_ARG(mac)); RTW_ERR("invalid mac addr:"MAC_FMT", assign random MAC\n", MAC_ARG(mac));
*((u32 *)(&mac[2])) = rtw_random32(); *((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 bool rtw_is_chbw_grouped(u8 ch_a, u8 bw_a, u8 offset_a
, u8 ch_b, u8 bw_b, u8 offset_b) , u8 ch_b, u8 bw_b, u8 offset_b)
{ {
bool is_grouped = _FALSE; bool is_grouped = false;
if (ch_a != ch_b) { if (ch_a != ch_b) {
/* ch is different */ /* ch is different */
@ -1594,7 +1594,7 @@ bool rtw_is_chbw_grouped(u8 ch_a, u8 bw_a, u8 offset_a
goto exit; goto exit;
} }
is_grouped = _TRUE; is_grouped = true;
exit: exit:
return is_grouped; 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; 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; p2p_ie_ptr = in_ie + cnt;
if (p2p_ie) 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 if (!p2p_ie
|| p2p_ielen <= 6 || p2p_ielen <= 6
|| (p2p_ie[0] != WLAN_EID_VENDOR_SPECIFIC) || (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; return attr_ptr;
/* 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type) */ /* 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; 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; wfd_ie_ptr = in_ie + cnt;
if (wfd_ie) 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 if (!wfd_ie
|| wfd_ielen <= 6 || wfd_ielen <= 6
|| (wfd_ie[0] != WLAN_EID_VENDOR_SPECIFIC) || (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; return attr_ptr;
/* 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type) */ /* 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)) if ((fc & (RTW_IEEE80211_FCTL_FTYPE | RTW_IEEE80211_FCTL_STYPE))
!= (RTW_IEEE80211_FTYPE_MGMT | RTW_IEEE80211_STYPE_ACTION) != (RTW_IEEE80211_FTYPE_MGMT | RTW_IEEE80211_STYPE_ACTION)
) )
return _FALSE; return false;
c = frame_body[0]; 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) if (action)
*action = a; *action = a;
return _TRUE; return true;
} }
static const char *_action_public_str[] = { static const char *_action_public_str[] = {

View file

@ -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 * Increase and check if the continual_io_error of this @param dvobjprive is larger than MAX_CONTINUAL_IO_ERR
* @return _TRUE: * @return true:
* @return _FALSE: * @return false:
*/ */
int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj) int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
{ {
int ret = _FALSE; int ret = false;
int value; int value;
value = ATOMIC_INC_RETURN(&dvobj->continual_io_error); value = ATOMIC_INC_RETURN(&dvobj->continual_io_error);
if (value > MAX_CONTINUAL_IO_ERR) { if (value > MAX_CONTINUAL_IO_ERR) {
RTW_INFO("[dvobj:%p][ERROR] continual_io_error:%d > %d\n", dvobj, 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 { } else {
/* RTW_INFO("[dvobj:%p] continual_io_error:%d\n", dvobj, value); */ /* 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; int i;
for (i = 0; i < read_sniff_num; i++) { for (i = 0; i < read_sniff_num; i++) {
if (addr + len > read_sniff_ranges[i][0] && addr <= read_sniff_ranges[i][1]) 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) bool match_write_sniff_ranges(u32 addr, u16 len)
@ -376,10 +376,10 @@ bool match_write_sniff_ranges(u32 addr, u16 len)
int i; int i;
for (i = 0; i < write_sniff_num; i++) { for (i = 0; i < write_sniff_num; i++) {
if (addr + len > write_sniff_ranges[i][0] && addr <= write_sniff_ranges[i][1]) 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 { 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++) { 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 (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)) 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) 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++) { 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 (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)) 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) u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line)

View file

@ -27,18 +27,18 @@
(\ (\
((addr[0] == 0xff) && (addr[1] == 0xff) && \ ((addr[0] == 0xff) && (addr[1] == 0xff) && \
(addr[2] == 0xff) && (addr[3] == 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 rtw_validate_bssid(u8 *bssid)
{ {
u8 ret = _TRUE; u8 ret = true;
if (is_zero_mac_addr(bssid) if (is_zero_mac_addr(bssid)
|| is_broadcast_mac_addr(bssid) || is_broadcast_mac_addr(bssid)
|| is_multicast_mac_addr(bssid) || is_multicast_mac_addr(bssid)
) )
ret = _FALSE; ret = false;
return ret; return ret;
} }
@ -46,10 +46,10 @@ u8 rtw_validate_bssid(u8 *bssid)
u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid) u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid)
{ {
u8 i; u8 i;
u8 ret = _TRUE; u8 ret = true;
if (ssid->SsidLength > 32) { if (ssid->SsidLength > 32) {
ret = _FALSE; ret = false;
goto exit; goto exit;
} }
@ -57,7 +57,7 @@ u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid)
for (i = 0; i < ssid->SsidLength; i++) { for (i = 0; i < ssid->SsidLength; i++) {
/* wifi, printable ascii code must be supported */ /* wifi, printable ascii code must be supported */
if (!((ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e))) { if (!((ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e))) {
ret = _FALSE; ret = false;
break; break;
} }
} }
@ -88,25 +88,25 @@ u8 rtw_do_join(_adapter *padapter)
pmlmepriv->pscanned = plist; 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); _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
/* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty */ /* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty */
/* we try to issue sitesurvey firstly */ /* we try to issue sitesurvey firstly */
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _FALSE if (pmlmepriv->LinkDetectInfo.bBusyTraffic == false
|| rtw_to_roam(padapter) > 0 || rtw_to_roam(padapter) > 0
) { ) {
/* submit site_survey_cmd */ /* submit site_survey_cmd */
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0); ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
if (_SUCCESS != ret) { if (_SUCCESS != ret) {
pmlmepriv->to_join = _FALSE; pmlmepriv->to_join = false;
} }
} else { } else {
pmlmepriv->to_join = _FALSE; pmlmepriv->to_join = false;
ret = _FAIL; ret = _FAIL;
} }
@ -116,10 +116,10 @@ u8 rtw_do_join(_adapter *padapter)
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
select_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv); select_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv);
if (select_ret == _SUCCESS) { if (select_ret == _SUCCESS) {
pmlmepriv->to_join = _FALSE; pmlmepriv->to_join = false;
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT); _set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
} else { } 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 */ /* submit createbss_cmd to change to a ADHOC_MASTER */
/* pmlmepriv->lock has been acquired by caller... */ /* pmlmepriv->lock has been acquired by caller... */
@ -138,11 +138,11 @@ u8 rtw_do_join(_adapter *padapter)
rtw_generate_random_ibss(pibss); rtw_generate_random_ibss(pibss);
if (rtw_create_ibss_cmd(padapter, 0) != _SUCCESS) { if (rtw_create_ibss_cmd(padapter, 0) != _SUCCESS) {
ret = _FALSE; ret = false;
goto exit; goto exit;
} }
pmlmepriv->to_join = _FALSE; pmlmepriv->to_join = false;
} else { } else {
/* can't associate ; reset under-linking */ /* 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 */ /* when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue */
/* we try to issue sitesurvey firstly */ /* we try to issue sitesurvey firstly */
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _FALSE if (pmlmepriv->LinkDetectInfo.bBusyTraffic == false
|| rtw_to_roam(padapter) > 0 || rtw_to_roam(padapter) > 0
) { ) {
/* RTW_INFO("rtw_do_join() when no desired bss in scanning queue\n"); */ /* RTW_INFO("rtw_do_join() when no desired bss in scanning queue\n"); */
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0); ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
if (_SUCCESS != ret) { if (_SUCCESS != ret) {
pmlmepriv->to_join = _FALSE; pmlmepriv->to_join = false;
} }
} else { } else {
ret = _FAIL; 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); _enter_critical_bh(&pmlmepriv->lock, &irqL);
RTW_INFO("Set BSSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv)); 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; 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; 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 (_rtw_memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN) == true) {
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _FALSE) 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. */ goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
} else { } else {
rtw_disassoc_cmd(padapter, 0, _TRUE); rtw_disassoc_cmd(padapter, 0, true);
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
rtw_free_assoc_resources(padapter, 1); 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); _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
} }
@ -225,10 +225,10 @@ handle_tkip_countermeasure:
memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID)); memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID));
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); _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) if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
pmlmepriv->to_join = _TRUE; pmlmepriv->to_join = true;
else else
status = rtw_do_join(padapter); 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); _enter_critical_bh(&pmlmepriv->lock, &irqL);
RTW_INFO("Set SSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv)); 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; 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; 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) && if ((pmlmepriv->assoc_ssid.SsidLength == ssid->SsidLength) &&
(_rtw_memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength) == _TRUE)) { (_rtw_memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength) == true)) {
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _FALSE)) { 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 */ /* 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) if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
rtw_free_assoc_resources(padapter, 1); 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); _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
set_fwstate(pmlmepriv, WIFI_ADHOC_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 #endif
} else { } else {
rtw_disassoc_cmd(padapter, 0, _TRUE); rtw_disassoc_cmd(padapter, 0, true);
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
rtw_free_assoc_resources(padapter, 1); 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); _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
} }
@ -314,16 +314,16 @@ handle_tkip_countermeasure:
goto release_mlme_lock; goto release_mlme_lock;
} }
if (rtw_validate_ssid(ssid) == _FALSE) { if (rtw_validate_ssid(ssid) == false) {
status = _FAIL; status = _FAIL;
goto release_mlme_lock; goto release_mlme_lock;
} }
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID)); _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) if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
pmlmepriv->to_join = _TRUE; pmlmepriv->to_join = true;
else else
status = rtw_do_join(padapter); 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; unsigned long irqL;
u8 status = _SUCCESS; u8 status = _SUCCESS;
u32 cur_time = 0; u32 cur_time = 0;
bool bssid_valid = _TRUE; bool bssid_valid = true;
bool ssid_valid = _TRUE; bool ssid_valid = true;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if (!ssid || rtw_validate_ssid(ssid) == _FALSE) if (!ssid || rtw_validate_ssid(ssid) == false)
ssid_valid = _FALSE; ssid_valid = false;
if (!bssid || rtw_validate_bssid(bssid) == _FALSE) if (!bssid || rtw_validate_bssid(bssid) == false)
bssid_valid = _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", 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); FUNC_ADPT_ARG(padapter), ssid, ssid_valid, bssid, bssid_valid);
status = _FAIL; 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", RTW_PRINT(FUNC_ADPT_FMT" fw_state=0x%08x\n",
FUNC_ADPT_ARG(padapter), get_fwstate(pmlmepriv)); 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; 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; goto release_mlme_lock;
handle_tkip_countermeasure: handle_tkip_countermeasure:
@ -386,12 +386,12 @@ handle_tkip_countermeasure:
if (bssid && bssid_valid) { if (bssid && bssid_valid) {
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); _rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
pmlmepriv->assoc_by_bssid = _TRUE; pmlmepriv->assoc_by_bssid = true;
} else } else
pmlmepriv->assoc_by_bssid = _FALSE; pmlmepriv->assoc_by_bssid = false;
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
pmlmepriv->to_join = _TRUE; pmlmepriv->to_join = true;
else else
status = rtw_do_join(padapter); 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 mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_network *cur_network = &pmlmepriv->cur_network; struct wlan_network *cur_network = &pmlmepriv->cur_network;
NDIS_802_11_NETWORK_INFRASTRUCTURE *pold_state = &(cur_network->network.InfrastructureMode); NDIS_802_11_NETWORK_INFRASTRUCTURE *pold_state = &(cur_network->network.InfrastructureMode);
u8 ap2sta_mode = _FALSE; u8 ap2sta_mode = false;
if (*pold_state != networktype) { 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)); */ /* 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) { if (*pold_state == Ndis802_11APMode) {
/* change to other mode from Ndis802_11APMode */ /* change to other mode from Ndis802_11APMode */
cur_network->join_res = -1; cur_network->join_res = -1;
ap2sta_mode = _TRUE; ap2sta_mode = true;
#ifdef CONFIG_NATIVEAP_MLME #ifdef CONFIG_NATIVEAP_MLME
stop_ap_mode(padapter); stop_ap_mode(padapter);
#endif #endif
@ -426,16 +426,16 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter,
_enter_critical_bh(&pmlmepriv->lock, &irqL); _enter_critical_bh(&pmlmepriv->lock, &irqL);
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) || (*pold_state == Ndis802_11IBSS)) if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) || (*pold_state == Ndis802_11IBSS))
rtw_disassoc_cmd(padapter, 0, _TRUE); rtw_disassoc_cmd(padapter, 0, true);
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) || if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true))
rtw_free_assoc_resources(padapter, 1); rtw_free_assoc_resources(padapter, 1);
if ((*pold_state == Ndis802_11Infrastructure) || (*pold_state == Ndis802_11IBSS)) { if ((*pold_state == Ndis802_11Infrastructure) || (*pold_state == Ndis802_11IBSS)) {
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { 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*/ 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); _exit_critical_bh(&pmlmepriv->lock, &irqL);
} }
return _TRUE; return true;
} }
u8 rtw_set_802_11_disassociate(_adapter *padapter) 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); _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_disassoc_cmd(padapter, 0, true);
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
/* modify for CONFIG_IEEE80211W, none 11w can use it */ /* modify for CONFIG_IEEE80211W, none 11w can use it */
rtw_free_assoc_resources_cmd(padapter); rtw_free_assoc_resources_cmd(padapter);
if (_FAIL == rtw_pwr_wakeup(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); _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) 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; unsigned long irqL;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 res = _TRUE; u8 res = true;
_enter_critical_bh(&pmlmepriv->lock, &irqL); _enter_critical_bh(&pmlmepriv->lock, &irqL);
res = rtw_sitesurvey_cmd(padapter, pssid, ssid_max_num, ch, ch_num); 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); res = rtw_set_auth(padapter, psecuritypriv);
if (res == _SUCCESS) if (res == _SUCCESS)
ret = _TRUE; ret = true;
else else
ret = _FALSE; ret = false;
return ret; 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); struct security_priv *psecuritypriv = &(padapter->securitypriv);
u8 ret = _SUCCESS; u8 ret = _SUCCESS;
bdefaultkey = (wep->KeyIndex & 0x40000000) > 0 ? _FALSE : _TRUE; /* for ??? */ bdefaultkey = (wep->KeyIndex & 0x40000000) > 0 ? false : true; /* for ??? */
btransmitkey = (wep->KeyIndex & 0x80000000) > 0 ? _TRUE : _FALSE; /* for ??? */ btransmitkey = (wep->KeyIndex & 0x80000000) > 0 ? true : false; /* for ??? */
keyid = wep->KeyIndex & 0x3fffffff; keyid = wep->KeyIndex & 0x3fffffff;
if (keyid >= 4) { if (keyid >= 4) {
ret = _FALSE; ret = false;
goto exit; goto exit;
} }
@ -577,10 +577,10 @@ u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep)
psecuritypriv->dot11PrivacyKeyIndex = keyid; psecuritypriv->dot11PrivacyKeyIndex = keyid;
res = rtw_set_key(padapter, psecuritypriv, keyid, 1, _TRUE); res = rtw_set_key(padapter, psecuritypriv, keyid, 1, true);
if (res == _FAIL) if (res == _FAIL)
ret = _FALSE; ret = false;
exit: exit:
return ret; return ret;
@ -594,7 +594,7 @@ u8 rtw_set_802_11_remove_wep(_adapter *padapter, u32 keyindex)
if (keyindex >= 0x80000000 || padapter == NULL) { if (keyindex >= 0x80000000 || padapter == NULL) {
ret = _FALSE; ret = false;
goto exit; goto exit;
} else { } else {
@ -604,7 +604,7 @@ u8 rtw_set_802_11_remove_wep(_adapter *padapter, u32 keyindex)
memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16); 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; psecuritypriv->dot11DefKeylen[keyindex] = 0;
@ -628,8 +628,8 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
uint encryptionalgo; uint encryptionalgo;
u8 *pbssid; u8 *pbssid;
struct sta_info *stainfo; struct sta_info *stainfo;
u8 bgroup = _FALSE; u8 bgroup = false;
u8 bgrouptkey = _FALSE;/* can be remove later */ u8 bgrouptkey = false;/* can be remove later */
u8 ret = _SUCCESS; u8 ret = _SUCCESS;
if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)) { 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 */ /* check BSSID */
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == _TRUE) { if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true) {
ret = _FALSE; ret = false;
goto exit; goto exit;
} }
@ -692,7 +692,7 @@ u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key)
goto exit; goto exit;
} }
bgroup = _FALSE; bgroup = false;
/* Check the pairwise key. Added by Annie, 2005-07-06. */ /* 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; ret = _FAIL;
goto exit; 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 */ 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)) if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) == true) && (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == true))
bgrouptkey = _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) { if (key->KeyIndex & 0x20000000) {
/* SetRSC */ /* SetRSC */
if (bgroup == _TRUE) { if (bgroup == true) {
NDIS_802_11_KEY_RSC keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL; NDIS_802_11_KEY_RSC keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL;
_rtw_memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8); _rtw_memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8);
} else { } 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 */ /* Indicate this key idx is used for TX */
/* Save the key in KeyMaterial */ /* Save the key in KeyMaterial */
if (bgroup == _TRUE) { /* Group transmit key */ if (bgroup == true) { /* Group transmit key */
int res; int res;
if (bgrouptkey == _TRUE) if (bgrouptkey == true)
padapter->securitypriv.dot118021XGrpKeyid = (u8)key->KeyIndex; padapter->securitypriv.dot118021XGrpKeyid = (u8)key->KeyIndex;
if ((key->KeyIndex & 0x3) == 0) { 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; 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) if (res == _FAIL)
ret = _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); _rtw_memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16);
if (encryptionalgo == _TKIP_) { if (encryptionalgo == _TKIP_) {
padapter->securitypriv.busetkipkey = _FALSE; padapter->securitypriv.busetkipkey = false;
/* _set_timer(&padapter->securitypriv.tkip_timer, 50); */ /* _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 */ /* 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; ret = _FAIL;
} }
} }
@ -885,7 +885,7 @@ u8 rtw_set_802_11_remove_key(_adapter *padapter, NDIS_802_11_REMOVE_KEY *key)
uint encryptionalgo; uint encryptionalgo;
u8 *pbssid; u8 *pbssid;
struct sta_info *stainfo; 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 keyIndex = (u8)key->KeyIndex & 0x03;
u8 ret = _SUCCESS; u8 ret = _SUCCESS;
@ -894,7 +894,7 @@ u8 rtw_set_802_11_remove_key(_adapter *padapter, NDIS_802_11_REMOVE_KEY *key)
goto exit; goto exit;
} }
if (bgroup == _TRUE) { if (bgroup == true) {
encryptionalgo = padapter->securitypriv.dot118021XGrpPrivacy; encryptionalgo = padapter->securitypriv.dot118021XGrpPrivacy;
/* clear group key by index */ /* clear group key by index */
/* NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN); */ /* 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: exit:
return _TRUE; return true;
} }
@ -946,13 +946,13 @@ u16 rtw_get_cur_max_rate(_adapter *adapter)
#ifdef CONFIG_MP_INCLUDED #ifdef CONFIG_MP_INCLUDED
if (adapter->registrypriv.mp_mode == 1) { if (adapter->registrypriv.mp_mode == 1) {
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
return 0; return 0;
} }
#endif #endif
if ((check_fwstate(pmlmepriv, _FW_LINKED) != _TRUE) if ((check_fwstate(pmlmepriv, _FW_LINKED) != true)
&& (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != _TRUE)) && (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != true))
return 0; return 0;
psta = rtw_get_stainfo(&adapter->stapriv, get_bssid(pmlmepriv)); psta = rtw_get_stainfo(&adapter->stapriv, get_bssid(pmlmepriv));

View file

@ -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) bool rtw_IOL_applied(ADAPTER *adapter)
{ {
if (1 == adapter->registrypriv.fw_iol) if (1 == adapter->registrypriv.fw_iol)
return _TRUE; return true;
if ((2 == adapter->registrypriv.fw_iol) && (IS_FULL_SPEED_USB(adapter))) 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) 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 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) { if (((pxmit_frame->attrib.pktlen + 32) % 256) + 8 >= 256) {
rtw_IOL_append_END_cmd(pxmit_frame); rtw_IOL_append_END_cmd(pxmit_frame);
pxmit_frame->attrib.pktlen = ((((pxmit_frame->attrib.pktlen + 32) / 256) + 1) * 256); pxmit_frame->attrib.pktlen = ((((pxmit_frame->attrib.pktlen + 32) / 256) + 1) * 256);
/* RTW_INFO("==> %s, pktlen(%d)\n",__func__,pxmit_frame->attrib.pktlen); */ /* RTW_INFO("==> %s, pktlen(%d)\n",__func__,pxmit_frame->attrib.pktlen); */
pxmit_frame->attrib.last_txcmdsz = 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; return is_cmd_bndy;
} }

View file

@ -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)) if (check_fwstate(&iface->mlmepriv, WIFI_OP_CH_SWITCHING))
continue; continue;
if (include_self == _FALSE && adapter == iface) if (include_self == false && adapter == iface)
continue; continue;
if (num == 0) { 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++) { for (i = 0; i < dvobj->iface_nums; i++) {
iface = dvobj->padapters[i]; iface = dvobj->padapters[i];
if (include_self == _FALSE && iface == adapter) if (include_self == false && iface == adapter)
continue; continue;
if (check_fwstate(&iface->mlmepriv, WIFI_STATION_STATE) == _TRUE) { if (check_fwstate(&iface->mlmepriv, WIFI_STATION_STATE) == true) {
MSTATE_STA_NUM(mstate)++; 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)++; 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)++; MSTATE_STA_LG_NUM(mstate)++;
} else if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == _TRUE } else if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == true
&& check_fwstate(&iface->mlmepriv, _FW_LINKED) == _TRUE && check_fwstate(&iface->mlmepriv, _FW_LINKED) == true
) { ) {
MSTATE_AP_NUM(mstate)++; MSTATE_AP_NUM(mstate)++;
if (iface->stapriv.asoc_sta_count > 2) if (iface->stapriv.asoc_sta_count > 2)
MSTATE_AP_LD_NUM(mstate)++; MSTATE_AP_LD_NUM(mstate)++;
} else if (check_fwstate(&iface->mlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) == _TRUE } else if (check_fwstate(&iface->mlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) == true
&& check_fwstate(&iface->mlmepriv, _FW_LINKED) == _TRUE && check_fwstate(&iface->mlmepriv, _FW_LINKED) == true
) { ) {
MSTATE_ADHOC_NUM(mstate)++; MSTATE_ADHOC_NUM(mstate)++;
if (iface->stapriv.asoc_sta_count > 2) if (iface->stapriv.asoc_sta_count > 2)
MSTATE_ADHOC_LD_NUM(mstate)++; 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)++; MSTATE_WPS_NUM(mstate)++;
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (rtw_cfg80211_get_is_mgmt_tx(iface)) if (rtw_cfg80211_get_is_mgmt_tx(iface))
MSTATE_MGMT_TX_NUM(mstate)++; MSTATE_MGMT_TX_NUM(mstate)++;
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
if (rtw_cfg80211_get_is_roch(iface) == _TRUE) if (rtw_cfg80211_get_is_roch(iface) == true)
MSTATE_ROCH_NUM(mstate)++; MSTATE_ROCH_NUM(mstate)++;
#endif #endif
#endif /* CONFIG_IOCTL_CFG80211 */ #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 dvobj_priv *dvobj = adapter_to_dvobj(adapter);
struct mi_state *iface_state = &dvobj->iface_state; struct mi_state *iface_state = &dvobj->iface_state;
u8 ret = _FALSE; u8 ret = false;
#ifdef DBG_IFACE_STATUS #ifdef DBG_IFACE_STATUS
DBG_IFACE_STATUS_DUMP(adapter); DBG_IFACE_STATUS_DUMP(adapter);
@ -253,46 +253,46 @@ u8 rtw_mi_check_status(_adapter *adapter, u8 type)
switch (type) { switch (type) {
case MI_LINKED: 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)*/ 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; break;
case MI_ASSOC: case MI_ASSOC:
if (MSTATE_STA_LD_NUM(iface_state) || MSTATE_AP_LD_NUM(iface_state) || MSTATE_ADHOC_LD_NUM(iface_state)) if (MSTATE_STA_LD_NUM(iface_state) || MSTATE_AP_LD_NUM(iface_state) || MSTATE_ADHOC_LD_NUM(iface_state))
ret = _TRUE; ret = true;
break; break;
case MI_UNDER_WPS: case MI_UNDER_WPS:
if (MSTATE_WPS_NUM(iface_state)) if (MSTATE_WPS_NUM(iface_state))
ret = _TRUE; ret = true;
break; break;
case MI_AP_MODE: case MI_AP_MODE:
if (MSTATE_AP_NUM(iface_state)) if (MSTATE_AP_NUM(iface_state))
ret = _TRUE; ret = true;
break; break;
case MI_AP_ASSOC: case MI_AP_ASSOC:
if (MSTATE_AP_LD_NUM(iface_state)) if (MSTATE_AP_LD_NUM(iface_state))
ret = _TRUE; ret = true;
break; break;
case MI_ADHOC: case MI_ADHOC:
if (MSTATE_ADHOC_NUM(iface_state)) if (MSTATE_ADHOC_NUM(iface_state))
ret = _TRUE; ret = true;
break; break;
case MI_ADHOC_ASSOC: case MI_ADHOC_ASSOC:
if (MSTATE_ADHOC_LD_NUM(iface_state)) if (MSTATE_ADHOC_LD_NUM(iface_state))
ret = _TRUE; ret = true;
break; break;
case MI_STA_NOLINK: /* this is misleading, but not used now */ 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)))) if (MSTATE_STA_NUM(iface_state) && (!(MSTATE_STA_LD_NUM(iface_state) || MSTATE_STA_LG_NUM(iface_state))))
ret = _TRUE; ret = true;
break; break;
case MI_STA_LINKED: case MI_STA_LINKED:
if (MSTATE_STA_LD_NUM(iface_state)) if (MSTATE_STA_LD_NUM(iface_state))
ret = _TRUE; ret = true;
break; break;
case MI_STA_LINKING: case MI_STA_LINKING:
if (MSTATE_STA_LG_NUM(iface_state)) if (MSTATE_STA_LG_NUM(iface_state))
ret = _TRUE; ret = true;
break; break;
default: default:
@ -313,20 +313,20 @@ u8 rtw_mi_mp_mode_check(_adapter *padapter)
iface = dvobj->padapters[i]; iface = dvobj->padapters[i];
if ((iface) && (iface->registrypriv.mp_mode == 1)) if ((iface) && (iface->registrypriv.mp_mode == 1))
return _TRUE; return true;
} }
#else #else
if (padapter->registrypriv.mp_mode == 1) if (padapter->registrypriv.mp_mode == 1)
return _TRUE; return true;
#endif #endif
#endif /* CONFIG_MP_INCLUDED */ #endif /* CONFIG_MP_INCLUDED */
return _FALSE; return false;
} }
/* /*
* return value : 0 is failed or have not interface meet condition * return value : 0 is failed or have not interface meet condition
* return value : !0 is success or interface numbers which 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, static u8 _rtw_mi_process(_adapter *padapter, bool exclude_self,
void *data, u8(*ops_func)(_adapter *padapter, void *data)) void *data, u8(*ops_func)(_adapter *padapter, void *data))
@ -345,7 +345,7 @@ static u8 _rtw_mi_process(_adapter *padapter, bool exclude_self,
continue; continue;
if (ops_func) if (ops_func)
if (_TRUE == ops_func(iface, data)) if (true == ops_func(iface, data))
ret++; ret++;
} }
} }
@ -359,19 +359,19 @@ static u8 _rtw_mi_netif_stop_queue(_adapter *padapter, void *data)
if (carrier_off) if (carrier_off)
netif_carrier_off(pnetdev); netif_carrier_off(pnetdev);
rtw_netif_stop_queue(pnetdev); rtw_netif_stop_queue(pnetdev);
return _TRUE; return true;
} }
u8 rtw_mi_netif_stop_queue(_adapter *padapter, bool carrier_off) u8 rtw_mi_netif_stop_queue(_adapter *padapter, bool carrier_off)
{ {
bool in_data = 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) u8 rtw_mi_buddy_netif_stop_queue(_adapter *padapter, bool carrier_off)
{ {
bool in_data = 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) 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) if (pnetdev)
rtw_netif_wake_queue(pnetdev); rtw_netif_wake_queue(pnetdev);
return _TRUE; return true;
} }
u8 rtw_mi_netif_wake_queue(_adapter *padapter) 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) 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) 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) if (pnetdev)
rtw_netif_carrier_on(pnetdev); rtw_netif_carrier_on(pnetdev);
return _TRUE; return true;
} }
u8 rtw_mi_netif_carrier_on(_adapter *padapter) 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) 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) 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 else
rtw_scan_abort_no_wait(adapter); rtw_scan_abort_no_wait(adapter);
return _TRUE; return true;
} }
void rtw_mi_scan_abort(_adapter *adapter, bool bwait) void rtw_mi_scan_abort(_adapter *adapter, bool bwait)
{ {
bool in_data = 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) void rtw_mi_buddy_scan_abort(_adapter *adapter, bool bwait)
{ {
bool in_data = 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) static u8 _rtw_mi_start_drv_threads(_adapter *adapter, void *data)
{ {
rtw_start_drv_threads(adapter); rtw_start_drv_threads(adapter);
return _TRUE; return true;
} }
void rtw_mi_start_drv_threads(_adapter *adapter) 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) 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) static u8 _rtw_mi_stop_drv_threads(_adapter *adapter, void *data)
{ {
rtw_stop_drv_threads(adapter); rtw_stop_drv_threads(adapter);
return _TRUE; return true;
} }
void rtw_mi_stop_drv_threads(_adapter *adapter) 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) 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) static u8 _rtw_mi_cancel_all_timer(_adapter *adapter, void *data)
{ {
rtw_cancel_all_timer(adapter); rtw_cancel_all_timer(adapter);
return _TRUE; return true;
} }
void rtw_mi_cancel_all_timer(_adapter *adapter) 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) 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) static u8 _rtw_mi_reset_drv_sw(_adapter *adapter, void *data)
{ {
rtw_reset_drv_sw(adapter); rtw_reset_drv_sw(adapter);
return _TRUE; return true;
} }
void rtw_mi_reset_drv_sw(_adapter *adapter) 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) 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) static u8 _rtw_mi_intf_start(_adapter *adapter, void *data)
{ {
rtw_intf_start(adapter); rtw_intf_start(adapter);
return _TRUE; return true;
} }
void rtw_mi_intf_start(_adapter *adapter) 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) 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) static u8 _rtw_mi_intf_stop(_adapter *adapter, void *data)
{ {
rtw_intf_stop(adapter); rtw_intf_stop(adapter);
return _TRUE; return true;
} }
void rtw_mi_intf_stop(_adapter *adapter) 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) 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) 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) 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) 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) 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) 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) 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 #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; u32 ms = *(u32 *)data;
rtw_set_scan_deny(adapter, ms); rtw_set_scan_deny(adapter, ms);
return _TRUE; return true;
} }
void rtw_mi_set_scan_deny(_adapter *adapter, u32 ms) void rtw_mi_set_scan_deny(_adapter *adapter, u32 ms)
{ {
u32 in_data = 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) void rtw_mi_buddy_set_scan_deny(_adapter *adapter, u32 ms)
{ {
u32 in_data = 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 #endif
@ -578,12 +578,12 @@ static u8 _rtw_mi_issue_nulldata(_adapter *padapter, void *data)
{ {
struct nulldata_param *pnulldata_param = (struct nulldata_param *)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 */ /* TODO: TDLS peers */
issue_nulldata(padapter, pnulldata_param->da, pnulldata_param->power_mode, pnulldata_param->try_cnt, pnulldata_param->wait_ms); 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) 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.try_cnt = try_cnt;
nparam.wait_ms = wait_ms; 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) 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.try_cnt = try_cnt;
nparam.wait_ms = wait_ms; 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) 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; struct mlme_ext_priv *mlmeext = &padapter->mlmeextpriv;
if (mlmeext_msr(mlmeext) == WIFI_FW_AP_STATE 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)); 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) 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) 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) 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_hal_get_macaddr_port(padapter, mac_addr);
RTW_INFO(ADPT_FMT"MAC Address ="MAC_FMT"\n", ADPT_ARG(padapter), MAC_ARG(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) 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) 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) 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; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
bool check_sc_interval = *(bool *)data; bool check_sc_interval = *(bool *)data;
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE) { if (pmlmepriv->LinkDetectInfo.bBusyTraffic == true) {
if (check_sc_interval) { if (check_sc_interval) {
/* Miracast can't do AP scan*/ /* Miracast can't do AP scan*/
passtime = rtw_get_passing_time_ms(pmlmepriv->lastscantime); passtime = rtw_get_passing_time_ms(pmlmepriv->lastscantime);
pmlmepriv->lastscantime = rtw_get_current_time(); pmlmepriv->lastscantime = rtw_get_current_time();
if (passtime > BUSY_TRAFFIC_SCAN_DENY_PERIOD) { if (passtime > BUSY_TRAFFIC_SCAN_DENY_PERIOD) {
RTW_INFO(ADPT_FMT" bBusyTraffic == _TRUE\n", ADPT_ARG(padapter)); RTW_INFO(ADPT_FMT" bBusyTraffic == true\n", ADPT_ARG(padapter));
return _TRUE; return true;
} }
} else } else
return _TRUE; return true;
} }
return _FALSE; return false;
} }
u8 rtw_mi_busy_traffic_check(_adapter *padapter, bool check_sc_interval) u8 rtw_mi_busy_traffic_check(_adapter *padapter, bool check_sc_interval)
{ {
bool in_data = 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) u8 rtw_mi_buddy_busy_traffic_check(_adapter *padapter, bool check_sc_interval)
{ {
bool in_data = 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) 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 (mlmeext_msr(mlmeext) == state)*/
if (check_mlmeinfo_state(mlmeext, state)) if (check_mlmeinfo_state(mlmeext, state))
return _TRUE; return true;
else else
return _FALSE; return false;
} }
u8 rtw_mi_check_mlmeinfo_state(_adapter *padapter, u32 state) u8 rtw_mi_check_mlmeinfo_state(_adapter *padapter, u32 state)
{ {
u32 in_data = 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) u8 rtw_mi_buddy_check_mlmeinfo_state(_adapter *padapter, u32 state)
{ {
u32 in_data = 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*/ /*#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) static u8 _rtw_mi_check_fwstate(_adapter *padapter, void *data)
{ {
u8 ret = _FALSE; u8 ret = false;
sint state = *(sint *)data; sint state = *(sint *)data;
if ((state == WIFI_FW_NULL_STATE) && if ((state == WIFI_FW_NULL_STATE) &&
(padapter->mlmepriv.fw_state == WIFI_FW_NULL_STATE)) (padapter->mlmepriv.fw_state == WIFI_FW_NULL_STATE))
ret = _TRUE; ret = true;
else if (_TRUE == check_fwstate(&padapter->mlmepriv, state)) else if (true == check_fwstate(&padapter->mlmepriv, state))
ret = _TRUE; ret = true;
#ifdef DBG_DUMP_FW_STATE #ifdef DBG_DUMP_FW_STATE
if (ret) if (ret)
rtw_dbg_dump_fwstate(padapter, state); rtw_dbg_dump_fwstate(padapter, state);
@ -761,13 +761,13 @@ u8 rtw_mi_check_fwstate(_adapter *padapter, sint state)
{ {
sint in_data = 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) u8 rtw_mi_buddy_check_fwstate(_adapter *padapter, sint state)
{ {
sint in_data = 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) 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_bytes += padapter->recvpriv.rx_bytes;
pdvobjpriv->traffic_stat.rx_pkts += padapter->recvpriv.rx_pkts; pdvobjpriv->traffic_stat.rx_pkts += padapter->recvpriv.rx_pkts;
pdvobjpriv->traffic_stat.rx_drop += padapter->recvpriv.rx_drop; pdvobjpriv->traffic_stat.rx_drop += padapter->recvpriv.rx_drop;
return _TRUE; return true;
} }
u8 rtw_mi_traffic_statistics(_adapter *padapter) 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) 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) 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 #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) 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) 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 #endif
@ -832,68 +832,68 @@ static void _rtw_mi_adapter_reset(_adapter *padapter , u8 exclude_self)
void rtw_mi_adapter_reset(_adapter *padapter) 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) 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) static u8 _rtw_mi_dynamic_check_timer_handler(_adapter *adapter, void *data)
{ {
rtw_iface_dynamic_check_timer_handler(adapter); rtw_iface_dynamic_check_timer_handler(adapter);
return _TRUE; return true;
} }
u8 rtw_mi_dynamic_check_timer_handler(_adapter *padapter) 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) 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) static u8 _rtw_mi_dev_unload(_adapter *adapter, void *data)
{ {
rtw_dev_unload(adapter); rtw_dev_unload(adapter);
return _TRUE; return true;
} }
u8 rtw_mi_dev_unload(_adapter *padapter) 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) 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) static u8 _rtw_mi_dynamic_chk_wk_hdl(_adapter *adapter, void *data)
{ {
rtw_iface_dynamic_chk_wk_hdl(adapter); rtw_iface_dynamic_chk_wk_hdl(adapter);
return _TRUE; return true;
} }
u8 rtw_mi_dynamic_chk_wk_hdl(_adapter *padapter) 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) 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) static u8 _rtw_mi_os_xmit_schedule(_adapter *adapter, void *data)
{ {
rtw_os_xmit_schedule(adapter); rtw_os_xmit_schedule(adapter);
return _TRUE; return true;
} }
u8 rtw_mi_os_xmit_schedule(_adapter *padapter) 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) 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) 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; union recv_frame *precv_frame = (union recv_frame *)data;
report_survey_event(adapter, precv_frame); report_survey_event(adapter, precv_frame);
return _TRUE; return true;
} }
u8 rtw_mi_report_survey_event(_adapter *padapter, union recv_frame *precv_frame) 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) 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) 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); sreset_start_adapter(adapter);
else else
sreset_stop_adapter(adapter); sreset_stop_adapter(adapter);
return _TRUE; return true;
} }
u8 rtw_mi_sreset_adapter_hdl(_adapter *padapter, u8 bstart) u8 rtw_mi_sreset_adapter_hdl(_adapter *padapter, u8 bstart)
{ {
u8 in_data = 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 rtw_mi_buddy_sreset_adapter_hdl(_adapter *padapter, u8 bstart)
{ {
u8 in_data = 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) static u8 _rtw_mi_tx_beacon_hdl(_adapter *adapter, void *data)
{ {
if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == _TRUE if (check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == true
&& check_fwstate(&adapter->mlmepriv, WIFI_ASOC_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 #ifndef CONFIG_INTERRUPT_BASED_TXBCN
tx_beacon_hdl(adapter, NULL); tx_beacon_hdl(adapter, NULL);
#endif #endif
} }
return _TRUE; return true;
} }
u8 rtw_mi_tx_beacon_hdl(_adapter *padapter) 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) 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) 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; struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
if (pmlmepriv->update_bcn == _TRUE) if (pmlmepriv->update_bcn == true)
set_tx_beacon_cmd(adapter); set_tx_beacon_cmd(adapter);
} }
return _TRUE; return true;
} }
u8 rtw_mi_set_tx_beacon_cmd(_adapter *padapter) 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) 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 #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; 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 rtw_mi_buddy_p2p_chk_state(_adapter *padapter, enum P2P_STATE p2p_state)
{ {
u8 in_data = 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) static u8 _rtw_mi_stay_in_p2p_mode(_adapter *adapter, void *data)
{ {
struct wifidirect_info *pwdinfo = &(adapter->wdinfo); struct wifidirect_info *pwdinfo = &(adapter->wdinfo);
if (rtw_p2p_role(pwdinfo) != P2P_ROLE_DISABLE) if (rtw_p2p_role(pwdinfo) != P2P_ROLE_DISABLE)
return _TRUE; return true;
return _FALSE; return false;
} }
u8 rtw_mi_stay_in_p2p_mode(_adapter *padapter) 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) 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*/ #endif /*CONFIG_P2P*/
@ -1029,13 +1029,13 @@ _adapter *rtw_get_iface_by_macddr(_adapter *padapter, u8 *mac_addr)
{ {
int i; int i;
_adapter *iface = NULL; _adapter *iface = NULL;
u8 bmatch = _FALSE; u8 bmatch = false;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
for (i = 0; i < dvobj->iface_nums; i++) { for (i = 0; i < dvobj->iface_nums; i++) {
iface = dvobj->padapters[i]; iface = dvobj->padapters[i];
if ((iface) && (_rtw_memcmp(mac_addr, adapter_mac_addr(iface), ETH_ALEN))) { if ((iface) && (_rtw_memcmp(mac_addr, adapter_mac_addr(iface), ETH_ALEN))) {
bmatch = _TRUE; bmatch = true;
break; break;
} }
} }
@ -1049,13 +1049,13 @@ _adapter *rtw_get_iface_by_hwport(_adapter *padapter, u8 hw_port)
{ {
int i; int i;
_adapter *iface = NULL; _adapter *iface = NULL;
u8 bmatch = _FALSE; u8 bmatch = false;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
for (i = 0; i < dvobj->iface_nums; i++) { for (i = 0; i < dvobj->iface_nums; i++) {
iface = dvobj->padapters[i]; iface = dvobj->padapters[i];
if ((iface) && (hw_port == iface->hw_port)) { if ((iface) && (hw_port == iface->hw_port)) {
bmatch = _TRUE; bmatch = true;
break; 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) 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); 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__); 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__); 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]; iface = dvobj->padapters[i];
if (!iface || iface == padapter) if (!iface || iface == padapter)
continue; continue;
if (rtw_is_adapter_up(iface) == _FALSE || iface->registered == 0) if (rtw_is_adapter_up(iface) == false || iface->registered == 0)
continue; continue;
pcloneframe = rtw_alloc_recvframe(pfree_recv_queue); pcloneframe = rtw_alloc_recvframe(pfree_recv_queue);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -141,11 +141,11 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv)
pmp_priv->network_macaddr[4] = 0x66; pmp_priv->network_macaddr[4] = 0x66;
pmp_priv->network_macaddr[5] = 0x55; pmp_priv->network_macaddr[5] = 0x55;
pmp_priv->bSetRxBssid = _FALSE; pmp_priv->bSetRxBssid = false;
pmp_priv->bRTWSmbCfg = _FALSE; pmp_priv->bRTWSmbCfg = false;
pmp_priv->bloopback = _FALSE; pmp_priv->bloopback = false;
pmp_priv->bloadefusemap = _FALSE; pmp_priv->bloadefusemap = false;
pnetwork = &pmp_priv->mp_network.network; pnetwork = &pmp_priv->mp_network.network;
_rtw_memcpy(pnetwork->MacAddress, pmp_priv->network_macaddr, ETH_ALEN); _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->qsel = pattrib->priority;
pattrib->nr_frags = 1; pattrib->nr_frags = 1;
pattrib->encrypt = 0; pattrib->encrypt = 0;
pattrib->bswenc = _FALSE; pattrib->bswenc = false;
pattrib->qos_en = _FALSE; pattrib->qos_en = false;
pattrib->pktlen = 1500; pattrib->pktlen = 1500;
} }
@ -237,7 +237,7 @@ s32 init_mp_priv(PADAPTER padapter)
pmppriv->mp_dm = 0; pmppriv->mp_dm = 0;
pmppriv->tx.stop = 1; pmppriv->tx.stop = 1;
pmppriv->bSetTxPower = 0; /*for manually set tx power*/ pmppriv->bSetTxPower = 0; /*for manually set tx power*/
pmppriv->bTxBufCkFail = _FALSE; pmppriv->bTxBufCkFail = false;
pmppriv->pktInterval = 0; pmppriv->pktInterval = 0;
pmppriv->pktLength = 1000; pmppriv->pktLength = 1000;
@ -347,15 +347,15 @@ MPT_InitializeAdapter(
u32 ledsetting; u32 ledsetting;
struct mlme_priv *pmlmepriv = &pAdapter->mlmepriv; struct mlme_priv *pmlmepriv = &pAdapter->mlmepriv;
pMptCtx->bMptDrvUnload = _FALSE; pMptCtx->bMptDrvUnload = false;
pMptCtx->bMassProdTest = _FALSE; pMptCtx->bMassProdTest = false;
pMptCtx->bMptIndexEven = _TRUE; /* default gain index is -6.0db */ pMptCtx->bMptIndexEven = true; /* default gain index is -6.0db */
pMptCtx->h2cReqNum = 0x0; pMptCtx->h2cReqNum = 0x0;
/* init for BT MP */ /* init for BT MP */
mpt_InitHWConfig(pAdapter); mpt_InitHWConfig(pAdapter);
pMptCtx->bMptWorkItemInProgress = _FALSE; pMptCtx->bMptWorkItemInProgress = false;
pMptCtx->CurrMptAct = NULL; pMptCtx->CurrMptAct = NULL;
pMptCtx->mpt_rf_path = ODM_RF_PATH_A; pMptCtx->mpt_rf_path = ODM_RF_PATH_A;
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
@ -365,7 +365,7 @@ MPT_InitializeAdapter(
ledsetting = rtw_read32(pAdapter, REG_LEDCFG0); ledsetting = rtw_read32(pAdapter, REG_LEDCFG0);
PHY_LCCalibrate(pAdapter); PHY_LCCalibrate(pAdapter);
PHY_IQCalibrate(pAdapter, _FALSE); PHY_IQCalibrate(pAdapter, false);
PHY_SetRFPathSwitch(pAdapter, 1/*pHalData->bDefaultAntenna*/); /* default use Main */ PHY_SetRFPathSwitch(pAdapter, 1/*pHalData->bDefaultAntenna*/); /* default use Main */
@ -403,20 +403,20 @@ MPT_DeInitAdapter(
{ {
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.mpt_ctx; PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.mpt_ctx;
pMptCtx->bMptDrvUnload = _TRUE; pMptCtx->bMptDrvUnload = true;
} }
static u8 mpt_ProStartTest(PADAPTER padapter) static u8 mpt_ProStartTest(PADAPTER padapter)
{ {
PMPT_CONTEXT pMptCtx = &padapter->mppriv.mpt_ctx; PMPT_CONTEXT pMptCtx = &padapter->mppriv.mpt_ctx;
pMptCtx->bMassProdTest = _TRUE; pMptCtx->bMassProdTest = true;
pMptCtx->is_start_cont_tx = _FALSE; pMptCtx->is_start_cont_tx = false;
pMptCtx->bCckContTx = _FALSE; pMptCtx->bCckContTx = false;
pMptCtx->bOfdmContTx = _FALSE; pMptCtx->bOfdmContTx = false;
pMptCtx->bSingleCarrier = _FALSE; pMptCtx->bSingleCarrier = false;
pMptCtx->is_carrier_suppression = _FALSE; pMptCtx->is_carrier_suppression = false;
pMptCtx->is_single_tone = _FALSE; pMptCtx->is_single_tone = false;
pMptCtx->HWTxmode = PACKETS_TX; pMptCtx->HWTxmode = PACKETS_TX;
return _SUCCESS; return _SUCCESS;
@ -438,7 +438,7 @@ void GetPowerTracking(PADAPTER padapter, u8 *enable)
void rtw_mp_trigger_iqk(PADAPTER padapter) void rtw_mp_trigger_iqk(PADAPTER padapter)
{ {
PHY_IQCalibrate(padapter, _FALSE); PHY_IQCalibrate(padapter, false);
} }
void rtw_mp_trigger_lck(PADAPTER padapter) void rtw_mp_trigger_lck(PADAPTER padapter)
@ -462,7 +462,7 @@ static void disable_dm(PADAPTER padapter)
rtw_phydm_func_disable_all(padapter); rtw_phydm_func_disable_all(padapter);
/* enable APK, LCK and IQK but disable power tracking */ /* 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); rtw_phydm_func_set(padapter, ODM_RF_CALIBRATION);
/* #ifdef CONFIG_BT_COEXIST */ /* #ifdef CONFIG_BT_COEXIST */
@ -480,13 +480,13 @@ void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart)
RTW_INFO("in MPT_PwrCtlDM start\n"); RTW_INFO("in MPT_PwrCtlDM start\n");
rtw_phydm_func_set(padapter, ODM_RF_TX_PWR_TRACK | ODM_RF_CALIBRATION); 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; padapter->mppriv.mp_dm = 1;
} else { } else {
RTW_INFO("in MPT_PwrCtlDM stop\n"); RTW_INFO("in MPT_PwrCtlDM stop\n");
disable_dm(padapter); disable_dm(padapter);
pDM_Odm->rf_calibrate_info.txpowertrack_control = _FALSE; pDM_Odm->rf_calibrate_info.txpowertrack_control = false;
padapter->mppriv.mp_dm = 0; padapter->mppriv.mp_dm = 0;
{ {
struct _TXPWRTRACK_CFG c; struct _TXPWRTRACK_CFG c;
@ -561,13 +561,13 @@ u32 mp_join(PADAPTER padapter, u8 mode)
_enter_critical_bh(&pmlmepriv->lock, &irqL); _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; goto end_of_mp_start_test;
/* init mp_start_test status */ /* init mp_start_test status */
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
rtw_disassoc_cmd(padapter, 500, _TRUE); rtw_disassoc_cmd(padapter, 500, true);
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
rtw_free_assoc_resources(padapter, 1); rtw_free_assoc_resources(padapter, 1);
} }
pmppriv->prev_fw_state = get_fwstate(pmlmepriv); pmppriv->prev_fw_state = get_fwstate(pmlmepriv);
@ -693,11 +693,11 @@ void mp_stop_test(PADAPTER padapter)
if (pmppriv->mode == MP_ON) { if (pmppriv->mode == MP_ON) {
pmppriv->bSetTxPower = 0; pmppriv->bSetTxPower = 0;
_enter_critical_bh(&pmlmepriv->lock, &irqL); _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; goto end_of_mp_stop_test;
/* 3 1. disconnect psudo AdHoc */ /* 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. /* 3 2. clear psta used in mp test mode.
* rtw_free_assoc_resources(padapter, 1); */ * rtw_free_assoc_resources(padapter, 1); */
@ -781,7 +781,7 @@ int SetTxPower(PADAPTER pAdapter)
{ {
hal_mpt_SetTxPower(pAdapter); hal_mpt_SetTxPower(pAdapter);
return _TRUE; return true;
} }
static void SetTxAGCOffset(PADAPTER pAdapter, u32 ulTxAGCOffset) 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_ACRC32;
pHalData->ReceiveConfig |= RCR_APP_PHYST_RXFF | RCR_APP_ICV | RCR_APP_MIC; 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__, RTW_INFO("%s: pmppriv->network_macaddr=" MAC_FMT "\n", __func__,
MAC_ARG(pmppriv->network_macaddr)); MAC_ARG(pmppriv->network_macaddr));
pHalData->ReceiveConfig = 0; pHalData->ReceiveConfig = 0;
@ -1259,7 +1259,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
return 0; return 0;
} }
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) { if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) {
return 0; return 0;
} }
@ -2159,7 +2159,7 @@ void PMAC_Nsym_generator(
N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss; N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss;
N_DBPS = (u32)((double)N_CBPS * CR); 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.); N_ES = (u32)ceil((double)(N_DBPS * pPMacPktInfo->Nss) / 4. / 300.);
RTW_INFO("N_ES = %d\n", N_ES); RTW_INFO("N_ES = %d\n", N_ES);
@ -2203,7 +2203,7 @@ void PMAC_Nsym_generator(
N_BPSC = N_BPSC_list[pPMacPktInfo->MCS]; N_BPSC = N_BPSC_list[pPMacPktInfo->MCS];
N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss; N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss;
N_DBPS = (u32)((double)N_CBPS * CR); N_DBPS = (u32)((double)N_CBPS * CR);
if (pPMacTxInfo->bLDPC == FALSE) { if (pPMacTxInfo->bLDPC == false) {
if (pPMacTxInfo->bSGI) if (pPMacTxInfo->bSGI)
N_ES = (u32)ceil((double)(N_DBPS) / 3.6 / 600.); N_ES = (u32)ceil((double)(N_DBPS) / 3.6 / 600.);
else else
@ -2437,7 +2437,7 @@ void HT_SIG_generator(
/* Short GI*/ /* Short GI*/
sig_bi[31] = pPMacTxInfo->bSGI; sig_bi[31] = pPMacTxInfo->bSGI;
/* N_ELTFs*/ /* N_ELTFs*/
if (pPMacTxInfo->NDP_sound == FALSE) { if (pPMacTxInfo->NDP_sound == false) {
sig_bi[32] = 0; sig_bi[32] = 0;
sig_bi[33] = 0; sig_bi[33] = 0;
} else { } else {

View file

@ -128,10 +128,10 @@ bool rtw_odm_adaptivity_needed(_adapter *adapter)
{ {
struct registry_priv *regsty = &adapter->registrypriv; struct registry_priv *regsty = &adapter->registrypriv;
struct mlme_priv *mlme = &adapter->mlmepriv; struct mlme_priv *mlme = &adapter->mlmepriv;
bool ret = _FALSE; bool ret = false;
if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_ENABLE) if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_ENABLE)
ret = _TRUE; ret = true;
return ret; return ret;
} }

View file

@ -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) 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) 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); plist = get_next(phead);
/* look up sta asoc_queue */ /* 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); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);
@ -592,7 +592,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -704,7 +704,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); 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 device information */
/* WFD primary sink + available for WFD session + WiFi Direct mode */ /* 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 (P2P_ROLE_GO == pwdinfo->role) {
if (is_any_client_associated(pwdinfo->padapter)) { if (is_any_client_associated(pwdinfo->padapter)) {
if (pwdinfo->wfd_tdls_enable) { if (pwdinfo->wfd_tdls_enable) {
@ -839,7 +839,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -993,7 +993,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1092,7 +1092,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1191,7 +1191,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1290,7 +1290,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1390,7 +1390,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1490,7 +1490,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1603,7 +1603,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1716,7 +1716,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); memset(wfdie + wfdielen, 0x00, ETH_ALEN);
@ -1816,7 +1816,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* Value: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); 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 zero_array_check[L2SDTA_SERVICE_VE_LEN] = { 0x00 };
u8 widi_version = 0, i = 0; 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; widi_version = 35;
else if (pmlmepriv->num_p2p_sdt != 0) else if (pmlmepriv->num_p2p_sdt != 0)
widi_version = 40; 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) u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
{ {
u8 *p; u8 *p;
u32 ret = _FALSE; u32 ret = false;
u8 *p2pie; u8 *p2pie;
u32 p2pielen = 0; u32 p2pielen = 0;
int ssid_len = 0, rate_cnt = 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 Requested Device Type attributes in WSC IE. */
/* Check Device ID attribute in P2P IE */ /* Check Device ID attribute in P2P IE */
ret = _TRUE; ret = true;
} else if ((p != NULL) && (ssid_len == 0)) } else if ((p != NULL) && (ssid_len == 0))
ret = _TRUE; ret = true;
} else { } else {
/* non -p2p device */ /* non -p2p device */
} }
@ -2447,7 +2447,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
plist = get_next(phead); plist = get_next(phead);
/* look up sta asoc_queue */ /* 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); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); 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); 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) 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) 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); 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) 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) 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 defined(CONFIG_WFD) && defined(CONFIG_TDLS)
if (!(cap_attr & P2P_GRPCAP_INTRABSS)) if (!(cap_attr & P2P_GRPCAP_INTRABSS))
ptdlsinfo->ap_prohibited = _TRUE; ptdlsinfo->ap_prohibited = true;
#endif /* defined(CONFIG_WFD) && defined(CONFIG_TDLS) */ #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); cap_attr = le16_to_cpu(le_tmp);
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
if (!(cap_attr & P2P_GRPCAP_INTRABSS)) if (!(cap_attr & P2P_GRPCAP_INTRABSS))
ptdlsinfo->ap_prohibited = _TRUE; ptdlsinfo->ap_prohibited = true;
#endif /* CONFIG_TDLS */ #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); issue_p2p_presence_resp(pwdinfo, get_addr2_ptr(pframe), status, dialogToken);
return _TRUE; return true;
} }
static void find_phase_handler(_adapter *padapter) 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) || } 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_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)) { rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ)) {
/* Now, the driver is in the listen state of P2P mode. */ /* 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); 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)); rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
issue_probereq_p2p(padapter, NULL); issue_probereq_p2p(padapter, NULL);
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT); _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; val8 = 1;
set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20); 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)); rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
issue_probereq_p2p(padapter, NULL); issue_probereq_p2p(padapter, NULL);
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT); _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; val8 = 1;
set_channel_bwmode(padapter, , HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20); 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); _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; goto exit;
if (roch_parm->wdev && roch_parm->cookie) { 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; 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->ro_ch_wdev = NULL;
pcfg80211_wdinfo->last_ro_ch_time = rtw_get_current_time(); 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); , pcfg80211_wdinfo->remain_on_ch_cookie);
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
rtw_btcoex_ScanNotify(padapter, _FALSE); rtw_btcoex_ScanNotify(padapter, false);
#endif #endif
exit: 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) 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 #ifdef CONFIG_CONCURRENT_MODE
u8 *ies, *p2p_ie; u8 *ies, *p2p_ie;
u32 ies_len, p2p_ielen; 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++) { for (i = 0; i < num_of_ch; i++) {
if (*(pattr_temp + 2 + i) == union_ch) { 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); RTW_INFO(FUNC_ADPT_FMT" ch_list fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), union_ch);
fit = _TRUE; fit = true;
break; 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) 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 #ifdef CONFIG_CONCURRENT_MODE
u8 *ies, *p2p_ie; u8 *ies, *p2p_ie;
u32 ies_len, p2p_ielen; 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 != NULL) {
if (*(pattr + 4) == union_ch) { if (*(pattr + 4) == union_ch) {
RTW_INFO(FUNC_ADPT_FMT" op_ch fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), 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; break;
} }
} }
@ -3616,7 +3616,7 @@ static u32 rtw_xframe_build_wfd_ie(struct xmit_frame *xframe)
if (category == RTW_WLAN_CATEGORY_PUBLIC) { if (category == RTW_WLAN_CATEGORY_PUBLIC) {
action = frame_body[1]; action = frame_body[1];
if (action == ACT_PUBLIC_VENDOR 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]; OUI_Subtype = frame_body[6];
dialogToken = frame_body[7]; 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) { if (category == RTW_WLAN_CATEGORY_PUBLIC) {
action = frame_body[1]; action = frame_body[1];
if (action == ACT_PUBLIC_VENDOR 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]; OUI_Subtype = frame_body[6];
@ -3744,7 +3744,7 @@ void rtw_xframe_chk_wfd_ie(struct xmit_frame *xframe)
del = 1; del = 1;
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (_TRUE == wdinfo->wfd_info->wfd_enable) if (true == wdinfo->wfd_info->wfd_enable)
#endif #endif
del = build = 1; 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; int w_sz = 0;
u8 ch_cnt = 0; u8 ch_cnt = 0;
u8 ch_list[40]; 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); pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, &attr_contentlen);
if (pattr != NULL) { 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) static bool rtw_p2p_nego_intent_compare(u8 req, u8 resp)
{ {
if (req >> 1 == resp >> 1) if (req >> 1 == resp >> 1)
return req & 0x01 ? _TRUE : _FALSE; return req & 0x01 ? true : false;
else if (req >> 1 > resp >> 1) else if (req >> 1 > resp >> 1)
return _TRUE; return true;
else else
return _FALSE; return false;
} }
int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) 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) { if (category == RTW_WLAN_CATEGORY_PUBLIC) {
action = frame_body[1]; action = frame_body[1];
if (action == ACT_PUBLIC_VENDOR 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]; OUI_Subtype = frame_body[6];
dialogToken = frame_body[7]; dialogToken = frame_body[7];
@ -3866,11 +3866,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (tx) { if (tx) {
#ifdef CONFIG_DRV_ISSUE_PROV_REQ /* IOT FOR S2 */ #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); rtw_cfg80211_issue_p2p_provision_request(padapter, buf, len);
#endif /* CONFIG_DRV_ISSUE_PROV_REQ */ #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 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 (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); 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" 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) if (iaddr)
_RTW_INFO(", iaddr:"MAC_FMT, MAC_ARG(iaddr)); _RTW_INFO(", iaddr:"MAC_FMT, MAC_ARG(iaddr));
_RTW_INFO("\n"); _RTW_INFO("\n");
@ -3914,7 +3914,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (!tx) { if (!tx) {
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) 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) { && 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_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); 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; iaddr = cont;
if (nego_info->token == dialogToken && nego_info->state == 0 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) if (iaddr)
_rtw_memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN); _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); 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" 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) if (iaddr)
_RTW_INFO(", iaddr:"MAC_FMT, MAC_ARG(iaddr)); _RTW_INFO(", iaddr:"MAC_FMT, MAC_ARG(iaddr));
_RTW_INFO("\n"); _RTW_INFO("\n");
if (!tx) { 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 defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) 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) { && 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_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); 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: { case P2P_GO_NEGO_CONF: {
struct rtw_wdev_nego_info *nego_info = &pwdev_priv->nego_info; struct rtw_wdev_nego_info *nego_info = &pwdev_priv->nego_info;
bool is_go = _FALSE; bool is_go = false;
if (tx) { if (tx) {
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #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; status = *cont;
if (nego_info->token == dialogToken && nego_info->state == 1 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->status = (status == -1) ? 0xff : status;
nego_info->conf_op_ch = (op_ch == -1) ? 0 : op_ch; 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 (status == 0) {
if (rtw_p2p_nego_intent_compare(nego_info->req_intent, nego_info->rsp_intent) ^ !tx) 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 */ 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); 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" 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) { 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); 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" 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) if (gbssid)
_RTW_INFO(", gbssid:"MAC_FMT, MAC_ARG(gbssid)); _RTW_INFO(", gbssid:"MAC_FMT, MAC_ARG(gbssid));
_RTW_INFO("\n"); _RTW_INFO("\n");
@ -4067,10 +4067,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (!tx) { if (!tx) {
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #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 (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_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); 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_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); 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; gbssid = cont;
if (invit_info->token == dialogToken && invit_info->state == 0 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->status = (status == -1) ? 0xff : status;
invit_info->rsp_op_ch = op_ch; 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); 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" 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) if (gbssid)
_RTW_INFO(", gbssid:"MAC_FMT, MAC_ARG(gbssid)); _RTW_INFO(", gbssid:"MAC_FMT, MAC_ARG(gbssid));
_RTW_INFO("\n"); _RTW_INFO("\n");
@ -4129,11 +4129,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
break; break;
} }
case P2P_DEVDISC_REQ: 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; break;
case P2P_DEVDISC_RESP: case P2P_DEVDISC_RESP:
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len); 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; break;
case P2P_PROVISION_DISC_REQ: { case P2P_PROVISION_DISC_REQ: {
size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr); 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 p2p_ielen = 0;
uint contentlen = 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) */ /* 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); 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 (p2p_ie) {
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, NULL, &contentlen)) { 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 { } else {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("provdisc_req_issued is _TRUE\n"); RTW_INFO("provdisc_req_issued is true\n");
#endif /*CONFIG_DEBUG_CFG80211*/ #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; break;
case P2P_PROVISION_DISC_RESP: 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; break;
default: 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; break;
} }
@ -4186,24 +4186,24 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
switch (OUI_Subtype) { switch (OUI_Subtype) {
case P2P_NOTICE_OF_ABSENCE: 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; break;
case P2P_PRESENCE_REQUEST: 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; break;
case P2P_PRESENCE_RESPONSE: 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; break;
case P2P_GO_DISC_REQUEST: 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; break;
default: 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; break;
} }
} else } 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; 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 process_p2p_cross_connect_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
{ {
int ret = _TRUE; int ret = true;
u8 *ies; u8 *ies;
u32 ies_len; u32 ies_len;
u8 *p2p_ie; u8 *p2p_ie;
@ -4317,7 +4317,7 @@ int process_p2p_cross_connect_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
/* Get P2P Manageability IE. */ /* Get P2P Manageability IE. */
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_MANAGEABILITY, p2p_attr, &attr_contentlen)) { 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) if ((p2p_attr[0] & (BIT(0) | BIT(1))) == 0x01)
ret = _FALSE; ret = false;
break; break;
} }
/* Get the next P2P IE */ /* Get the next P2P IE */
@ -4338,7 +4338,7 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
u32 attr_contentlen = 0; u32 attr_contentlen = 0;
struct wifidirect_info *pwdinfo = &(padapter->wdinfo); 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; 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); p2p_ie = rtw_get_p2p_ie(ies, ies_len, NULL, &p2p_ielen);
while (p2p_ie) { while (p2p_ie) {
find_p2p = _TRUE; find_p2p = true;
/* Get Notice of Absence IE. */ /* Get Notice of Absence IE. */
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_NOA, noa_attr, &attr_contentlen)) { 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]; noa_index = noa_attr[0];
if ((pwdinfo->p2p_ps_mode == P2P_PS_NONE) || 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) { if (pwdinfo->opp_ps == 1) {
pwdinfo->p2p_ps_mode = P2P_PS_CTWINDOW; pwdinfo->p2p_ps_mode = P2P_PS_CTWINDOW;
/* driver should wait LPS for entering 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); p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 1);
} else if (pwdinfo->noa_num > 0) { } else if (pwdinfo->noa_num > 0) {
pwdinfo->p2p_ps_mode = P2P_PS_NOA; 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 (find_p2p == true) {
if ((pwdinfo->p2p_ps_mode > P2P_PS_NONE) && (find_p2p_ps == _FALSE)) if ((pwdinfo->p2p_ps_mode > P2P_PS_NONE) && (find_p2p_ps == false))
p2p_ps_wk_cmd(padapter, P2P_PS_DISABLE, 1); 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->opp_ps = 0;
pwdinfo->noa_num = 0; pwdinfo->noa_num = 0;
pwdinfo->p2p_ps_mode = P2P_PS_NONE; pwdinfo->p2p_ps_mode = P2P_PS_NONE;
if (pwrpriv->bFwCurrentInPSMode == _TRUE) { if (pwrpriv->bFwCurrentInPSMode == true) {
if (pwrpriv->smart_ps == 0) { if (pwrpriv->smart_ps == 0) {
pwrpriv->smart_ps = 2; pwrpriv->smart_ps = 2;
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&(pwrpriv->pwr_mode))); 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 (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); p2p_protocol_wk_cmd(adapter, P2P_PRE_TX_PROVDISC_PROCESS_WK);
/* issue_probereq_p2p(adapter, NULL); */ /* issue_probereq_p2p(adapter, NULL); */
/* _set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); */ /* _set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); */
} }
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING)) { } 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); p2p_protocol_wk_cmd(adapter, P2P_PRE_TX_NEGOREQ_PROCESS_WK);
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ)) { } 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); p2p_protocol_wk_cmd(adapter, P2P_PRE_TX_INVITEREQ_PROCESS_WK);
} else } else
RTW_INFO("[%s] p2p_state is %d, ignore!!\n", __func__, rtw_p2p_state(pwdinfo)); 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 = &padapter->wdinfo;
pwdinfo->persistent_supported = 0; pwdinfo->persistent_supported = 0;
pwdinfo->session_available = _TRUE; pwdinfo->session_available = true;
rtw_tdls_wfd_enable(padapter, 0); rtw_tdls_wfd_enable(padapter, 0);
pwdinfo->wfd_tdls_weaksec = _TRUE; pwdinfo->wfd_tdls_weaksec = true;
} }
#ifdef CONFIG_WFD #ifdef CONFIG_WFD
@ -4723,13 +4723,13 @@ int rtw_init_wifi_display_info(_adapter *padapter)
#endif #endif
pwfd_info->tdls_rtsp_ctrlport = 0; pwfd_info->tdls_rtsp_ctrlport = 0;
pwfd_info->peer_rtsp_ctrlport = 0; /* Reset to 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->wfd_device_type = WFD_DEVINFO_PSINK;
pwfd_info->scan_result_type = SCAN_RESULT_P2P_ONLY; pwfd_info->scan_result_type = SCAN_RESULT_P2P_ONLY;
/* Used in P2P */ /* Used in P2P */
pwfd_info->peer_session_avail = _TRUE; pwfd_info->peer_session_avail = true;
pwfd_info->wfd_pc = _FALSE; pwfd_info->wfd_pc = false;
/* Used in TDLS */ /* Used in TDLS */
memset(pwfd_info->ip_address, 0x00, 4); memset(pwfd_info->ip_address, 0x00, 4);
@ -4744,10 +4744,10 @@ inline void rtw_wfd_enable(_adapter *adapter, bool on)
if (on) { if (on) {
wfdinfo->rtsp_ctrlport = wfdinfo->init_rtsp_ctrlport; wfdinfo->rtsp_ctrlport = wfdinfo->init_rtsp_ctrlport;
wfdinfo->wfd_enable = _TRUE; wfdinfo->wfd_enable = true;
} else { } else {
wfdinfo->wfd_enable = _FALSE; wfdinfo->wfd_enable = false;
wfdinfo->rtsp_ctrlport = 0; 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; struct wifi_display_info *wfdinfo = &adapter->wfd_info;
wfdinfo->init_rtsp_ctrlport = port; wfdinfo->init_rtsp_ctrlport = port;
if (wfdinfo->wfd_enable == _TRUE) if (wfdinfo->wfd_enable == true)
wfdinfo->rtsp_ctrlport = port; wfdinfo->rtsp_ctrlport = port;
if (adapter->wdinfo.wfd_tdls_enable == 1) if (adapter->wdinfo.wfd_tdls_enable == 1)
wfdinfo->tdls_rtsp_ctrlport = port; wfdinfo->tdls_rtsp_ctrlport = port;
@ -4788,7 +4788,7 @@ u32 rtw_append_beacon_wfd_ie(_adapter *adapter, u8 *pbuf)
goto exit; goto exit;
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (_TRUE == wdinfo->wfd_info->wfd_enable) if (true == wdinfo->wfd_info->wfd_enable)
#endif #endif
build_ie_by_self = 1; build_ie_by_self = 1;
@ -4816,7 +4816,7 @@ u32 rtw_append_probe_req_wfd_ie(_adapter *adapter, u8 *pbuf)
goto exit; goto exit;
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (_TRUE == wdinfo->wfd_info->wfd_enable) if (true == wdinfo->wfd_info->wfd_enable)
#endif #endif
build_ie_by_self = 1; build_ie_by_self = 1;
@ -4844,7 +4844,7 @@ u32 rtw_append_probe_resp_wfd_ie(_adapter *adapter, u8 *pbuf)
goto exit; goto exit;
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (_TRUE == wdinfo->wfd_info->wfd_enable) if (true == wdinfo->wfd_info->wfd_enable)
#endif #endif
build_ie_by_self = 1; build_ie_by_self = 1;
@ -4872,7 +4872,7 @@ u32 rtw_append_assoc_req_wfd_ie(_adapter *adapter, u8 *pbuf)
goto exit; goto exit;
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (_TRUE == wdinfo->wfd_info->wfd_enable) if (true == wdinfo->wfd_info->wfd_enable)
#endif #endif
build_ie_by_self = 1; build_ie_by_self = 1;
@ -4900,7 +4900,7 @@ u32 rtw_append_assoc_resp_wfd_ie(_adapter *adapter, u8 *pbuf)
goto exit; goto exit;
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (_TRUE == wdinfo->wfd_info->wfd_enable) if (true == wdinfo->wfd_info->wfd_enable)
#endif #endif
build_ie_by_self = 1; build_ie_by_self = 1;
@ -5284,24 +5284,24 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (padapter->wdinfo.driver_interface == DRIVER_CFG80211) if (padapter->wdinfo.driver_interface == DRIVER_CFG80211)
adapter_wdev_data(padapter)->p2p_enabled = _TRUE; adapter_wdev_data(padapter)->p2p_enabled = true;
#endif #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 #ifdef CONFIG_WFD
if (hal_chk_wl_func(padapter, WL_FUNC_MIRACAST)) 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 #endif
} else if (role == P2P_ROLE_DISABLE) { } else if (role == P2P_ROLE_DISABLE) {
#ifdef CONFIG_INTEL_WIDI #ifdef CONFIG_INTEL_WIDI
if (padapter->mlmepriv.p2p_reject_disable == _TRUE) if (padapter->mlmepriv.p2p_reject_disable == true)
return ret; return ret;
#endif /* CONFIG_INTEL_WIDI */ #endif /* CONFIG_INTEL_WIDI */
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (padapter->wdinfo.driver_interface == DRIVER_CFG80211) if (padapter->wdinfo.driver_interface == DRIVER_CFG80211)
adapter_wdev_data(padapter)->p2p_enabled = _FALSE; adapter_wdev_data(padapter)->p2p_enabled = false;
#endif #endif
pwdinfo->listen_channel = 0; pwdinfo->listen_channel = 0;
@ -5333,10 +5333,10 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
pwdinfo->profileindex = 0; 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 #ifdef CONFIG_WFD
if (hal_chk_wl_func(padapter, WL_FUNC_MIRACAST)) 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 #endif
if (_FAIL == rtw_pwr_wakeup(padapter)) { if (_FAIL == rtw_pwr_wakeup(padapter)) {

View file

@ -75,7 +75,7 @@ void _ips_enter(_adapter *padapter)
{ {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
pwrpriv->bips_processing = _TRUE; pwrpriv->bips_processing = true;
/* syn ips_mode with request */ /* syn ips_mode with request */
pwrpriv->ips_mode = pwrpriv->ips_mode_req; 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); RTW_INFO("==>ips_enter cnts:%d\n", pwrpriv->ips_enter_cnts);
if (rf_off == pwrpriv->change_rfpwrstate) { if (rf_off == pwrpriv->change_rfpwrstate) {
pwrpriv->bpower_saving = _TRUE; pwrpriv->bpower_saving = true;
RTW_INFO("nolinked power save enter\n"); RTW_INFO("nolinked power save enter\n");
if (pwrpriv->ips_mode == IPS_LEVEL_2) if (pwrpriv->ips_mode == IPS_LEVEL_2)
pwrpriv->bkeepfwalive = _TRUE; pwrpriv->bkeepfwalive = true;
rtw_ips_pwr_down(padapter); rtw_ips_pwr_down(padapter);
pwrpriv->rf_pwrstate = rf_off; 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; int result = _SUCCESS;
if ((pwrpriv->rf_pwrstate == rf_off) && (!pwrpriv->bips_processing)) { if ((pwrpriv->rf_pwrstate == rf_off) && (!pwrpriv->bips_processing)) {
pwrpriv->bips_processing = _TRUE; pwrpriv->bips_processing = true;
pwrpriv->change_rfpwrstate = rf_on; pwrpriv->change_rfpwrstate = rf_on;
pwrpriv->ips_leave_cnts++; pwrpriv->ips_leave_cnts++;
RTW_INFO("==>ips_leave cnts:%d\n", 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("nolinked power save leave\n");
RTW_INFO("==> ips_leave.....LED(0x%08x)...\n", rtw_read32(padapter, 0x4c)); RTW_INFO("==> ips_leave.....LED(0x%08x)...\n", rtw_read32(padapter, 0x4c));
pwrpriv->bips_processing = _FALSE; pwrpriv->bips_processing = false;
pwrpriv->bkeepfwalive = _FALSE; pwrpriv->bkeepfwalive = false;
pwrpriv->bpower_saving = _FALSE; pwrpriv->bpower_saving = false;
} }
return result; return result;
@ -188,9 +188,9 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
#endif #endif
#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__); */ /* RTW_INFO("%s: already in LPS or IPS mode\n", __func__); */
goto exit; goto exit;
} }
@ -215,7 +215,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
|| check_fwstate(pmlmepriv, WIFI_AP_STATE) || check_fwstate(pmlmepriv, WIFI_AP_STATE)
|| check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE)
#if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211) #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) #elif defined(CONFIG_P2P)
|| rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE)
|| rtw_p2p_chk_state(pwdinfo, P2P_STATE_LISTEN) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_LISTEN)
@ -235,7 +235,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
#endif #endif
#ifdef CONFIG_INTEL_PROXIM #ifdef CONFIG_INTEL_PROXIM
if (adapter->proximity.proxim_on == _TRUE) if (adapter->proximity.proxim_on == true)
return; return;
#endif #endif
@ -247,7 +247,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
goto exit; goto exit;
} }
ret = _TRUE; ret = true;
exit: exit:
return ret; return ret;
@ -281,16 +281,16 @@ void rtw_ps_processor(_adapter *padapter)
goto exit; goto exit;
} }
if (pwrpriv->bInSuspend == _TRUE) { /* system suspend or autosuspend */ if (pwrpriv->bInSuspend == true) { /* system suspend or autosuspend */
pdbgpriv->dbg_ps_insuspend_cnt++; 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; return;
} }
pwrpriv->ps_processing = _TRUE; pwrpriv->ps_processing = true;
#ifdef SUPPORT_HW_RFOFF_DETECTED #ifdef SUPPORT_HW_RFOFF_DETECTED
if (pwrpriv->bips_processing == _TRUE) if (pwrpriv->bips_processing == true)
goto exit; goto exit;
/* RTW_INFO("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca)); */ /* 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 #ifdef CONFIG_AUTOSUSPEND
if (padapter->registrypriv.usbss_enable) { if (padapter->registrypriv.usbss_enable) {
if (pwrpriv->rf_pwrstate == rf_on) { if (pwrpriv->rf_pwrstate == rf_on) {
if (padapter->net_closed == _TRUE) if (padapter->net_closed == true)
pwrpriv->ps_flag = _TRUE; pwrpriv->ps_flag = true;
rfpwrstate = RfOnOffDetect(padapter); rfpwrstate = RfOnOffDetect(padapter);
RTW_INFO("@@@@- #1 %s==> rfstate:%s\n", __func__, (rfpwrstate == rf_on) ? "rf_on" : "rf_off"); 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) { if (rfpwrstate == rf_off) {
pwrpriv->change_rfpwrstate = rf_off; pwrpriv->change_rfpwrstate = rf_off;
pwrpriv->bkeepfwalive = _TRUE; pwrpriv->bkeepfwalive = true;
pwrpriv->brfoffbyhw = _TRUE; pwrpriv->brfoffbyhw = true;
autosuspend_enter(padapter); autosuspend_enter(padapter);
} }
@ -323,7 +323,7 @@ void rtw_ps_processor(_adapter *padapter)
if (rfpwrstate != pwrpriv->rf_pwrstate) { if (rfpwrstate != pwrpriv->rf_pwrstate) {
if (rfpwrstate == rf_off) { if (rfpwrstate == rf_off) {
pwrpriv->change_rfpwrstate = rf_off; pwrpriv->change_rfpwrstate = rf_off;
pwrpriv->brfoffbyhw = _TRUE; pwrpriv->brfoffbyhw = true;
rtw_hw_suspend(padapter); rtw_hw_suspend(padapter);
} else { } else {
pwrpriv->change_rfpwrstate = rf_on; pwrpriv->change_rfpwrstate = rf_on;
@ -339,7 +339,7 @@ void rtw_ps_processor(_adapter *padapter)
if (pwrpriv->ips_mode_req == IPS_NONE) if (pwrpriv->ips_mode_req == IPS_NONE)
goto exit; goto exit;
if (rtw_pwr_unassociated_idle(padapter) == _FALSE) if (rtw_pwr_unassociated_idle(padapter) == false)
goto exit; goto exit;
if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts % 4) == 0)) { 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 #ifdef CONFIG_AUTOSUSPEND
if (padapter->registrypriv.usbss_enable) { if (padapter->registrypriv.usbss_enable) {
if (pwrpriv->bHWPwrPindetect) if (pwrpriv->bHWPwrPindetect)
pwrpriv->bkeepfwalive = _TRUE; pwrpriv->bkeepfwalive = true;
if (padapter->net_closed == _TRUE) if (padapter->net_closed == true)
pwrpriv->ps_flag = _TRUE; pwrpriv->ps_flag = true;
#if defined(CONFIG_BT_COEXIST) && defined (CONFIG_AUTOSUSPEND) #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); RTW_INFO("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n", __func__, pwrpriv->bInternalAutoSuspend);
else { else {
pwrpriv->change_rfpwrstate = rf_off; pwrpriv->change_rfpwrstate = rf_off;
@ -384,7 +384,7 @@ exit:
#ifndef CONFIG_IPS_CHECK_IN_WD #ifndef CONFIG_IPS_CHECK_IN_WD
rtw_set_pwr_state_check_timer(pwrpriv); rtw_set_pwr_state_check_timer(pwrpriv);
#endif #endif
pwrpriv->ps_processing = _FALSE; pwrpriv->ps_processing = false;
return; return;
} }
@ -410,7 +410,7 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
#ifdef CONFIG_CHECK_LEAVE_LPS #ifdef CONFIG_CHECK_LEAVE_LPS
static u32 start_time = 0; static u32 start_time = 0;
static u32 xmit_cnt = 0; static u32 xmit_cnt = 0;
u8 bLeaveLPS = _FALSE; u8 bLeaveLPS = false;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; 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) if ((adapter_to_pwrctl(padapter)->bLeisurePs)
&& (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE) && (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE)
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
&& (rtw_btcoex_IsBtControlLps(padapter) == _FALSE) && (rtw_btcoex_IsBtControlLps(padapter) == false)
#endif #endif
) { ) {
/* RTW_INFO("leave lps via Tx = %d\n", xmit_cnt); */ /* 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) if ((adapter_to_pwrctl(padapter)->bLeisurePs)
&& (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE) && (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE)
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
&& (rtw_btcoex_IsBtControlLps(padapter) == _FALSE) && (rtw_btcoex_IsBtControlLps(padapter) == false)
#endif #endif
) { ) {
/* RTW_INFO("leave lps via Rx = %d\n", pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); */ /* 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); pslv = PS_STATE(pslv);
#ifdef CONFIG_LPS_RPWM_TIMER #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); RTW_INFO("%s: RPWM timeout, force to set RPWM(0x%02X) again!\n", __func__, pslv);
else else
#endif /* CONFIG_LPS_RPWM_TIMER */ #endif /* CONFIG_LPS_RPWM_TIMER */
@ -600,15 +600,15 @@ static u8 PS_RDY_CHECK(_adapter *padapter)
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
if (_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_mode) if (true == pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
return _TRUE; return true;
else if (_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode) else if (true == pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
return _TRUE; return true;
else if (_TRUE == pwrpriv->bInSuspend) else if (true == pwrpriv->bInSuspend)
return _FALSE; return false;
#else #else
if (_TRUE == pwrpriv->bInSuspend) if (true == pwrpriv->bInSuspend)
return _FALSE; return false;
#endif #endif
curr_time = rtw_get_current_time(); curr_time = rtw_get_current_time();
@ -616,34 +616,34 @@ static u8 PS_RDY_CHECK(_adapter *padapter)
delta_time = curr_time - pwrpriv->DelayLPSLastTimeStamp; delta_time = curr_time - pwrpriv->DelayLPSLastTimeStamp;
if (delta_time < LPS_DELAY_TIME) if (delta_time < LPS_DELAY_TIME)
return _FALSE; return false;
if (check_fwstate(pmlmepriv, WIFI_SITE_MONITOR) if (check_fwstate(pmlmepriv, WIFI_SITE_MONITOR)
|| check_fwstate(pmlmepriv, WIFI_UNDER_LINKING | WIFI_UNDER_WPS) || check_fwstate(pmlmepriv, WIFI_UNDER_LINKING | WIFI_UNDER_WPS)
|| check_fwstate(pmlmepriv, WIFI_AP_STATE) || check_fwstate(pmlmepriv, WIFI_AP_STATE)
|| check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE)
#if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211) #if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211)
|| rtw_cfg80211_get_is_roch(padapter) == _TRUE || rtw_cfg80211_get_is_roch(padapter) == true
#endif #endif
|| rtw_is_scan_deny(padapter) || rtw_is_scan_deny(padapter)
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
/* TDLS link is established. */ /* TDLS link is established. */
|| (padapter->tdlsinfo.link_established == _TRUE) || (padapter->tdlsinfo.link_established == true)
#endif /* CONFIG_TDLS */ #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"); RTW_INFO("Group handshake still in progress !!!\n");
return _FALSE; return false;
} }
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if (!rtw_cfg80211_pwr_mgmt(padapter)) if (!rtw_cfg80211_pwr_mgmt(padapter))
return _FALSE; return false;
#endif #endif
return _TRUE; return true;
} }
#if defined(CONFIG_FWLPS_IN_IPS) #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 cpwm_orig = 0, cpwm_now = 0;
u8 parm[H2C_INACTIVE_PS_LEN] = {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__); RTW_INFO("%s: ERROR, netif is down\n", __func__);
return; 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 (ps_mode == PS_MODE_ACTIVE) {
if (1 if (1
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
&& (((rtw_btcoex_IsBtControlLps(padapter) == _FALSE) && (((rtw_btcoex_IsBtControlLps(padapter) == false)
#ifdef CONFIG_P2P_PS #ifdef CONFIG_P2P_PS
&& (pwdinfo->opp_ps == 0) && (pwdinfo->opp_ps == 0)
#endif /* CONFIG_P2P_PS */ #endif /* CONFIG_P2P_PS */
) )
|| ((rtw_btcoex_IsBtControlLps(padapter) == _TRUE) || ((rtw_btcoex_IsBtControlLps(padapter) == true)
&& (rtw_btcoex_IsLpsOn(padapter) == _FALSE)) && (rtw_btcoex_IsLpsOn(padapter) == false))
) )
#else /* !CONFIG_BT_COEXIST */ #else /* !CONFIG_BT_COEXIST */
#ifdef CONFIG_P2P_PS #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]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) 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); rtw_set_rpwm(padapter, PS_STATE_S4);
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) || defined(CONFIG_P2P_WOWLAN) #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) || defined(CONFIG_P2P_WOWLAN)
if (pwrpriv->wowlan_mode == _TRUE || if (pwrpriv->wowlan_mode == true ||
pwrpriv->wowlan_ap_mode == _TRUE || pwrpriv->wowlan_ap_mode == true ||
pwrpriv->wowlan_p2p_mode == _TRUE) { pwrpriv->wowlan_p2p_mode == true) {
u32 start_time, delay_ms; u32 start_time, delay_ms;
u8 val8; u8 val8;
delay_ms = 20; 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)); (u8 *)(&ps_mode));
#endif /*CONFIG_LPS_POFF*/ #endif /*CONFIG_LPS_POFF*/
pwrpriv->bFwCurrentInPSMode = _FALSE; pwrpriv->bFwCurrentInPSMode = false;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
rtw_btcoex_LpsNotify(padapter, ps_mode); 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 { } else {
if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE)) if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE))
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
|| ((rtw_btcoex_IsBtControlLps(padapter) == _TRUE) || ((rtw_btcoex_IsBtControlLps(padapter) == true)
&& (rtw_btcoex_IsLpsOn(padapter) == _TRUE)) && (rtw_btcoex_IsLpsOn(padapter) == true))
#endif #endif
#ifdef CONFIG_P2P_WOWLAN #ifdef CONFIG_P2P_WOWLAN
|| (_TRUE == pwrpriv->wowlan_p2p_mode) || (true == pwrpriv->wowlan_p2p_mode)
#endif /* CONFIG_P2P_WOWLAN */ #endif /* CONFIG_P2P_WOWLAN */
) { ) {
u8 pslv; 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]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) 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)); (u8 *)(&ps_mode));
#endif /*CONFIG_LPS_POFF*/ #endif /*CONFIG_LPS_POFF*/
pwrpriv->bFwCurrentInPSMode = _TRUE; pwrpriv->bFwCurrentInPSMode = true;
pwrpriv->pwr_mode = ps_mode; pwrpriv->pwr_mode = ps_mode;
pwrpriv->smart_ps = smart_ps; pwrpriv->smart_ps = smart_ps;
pwrpriv->bcn_ant_mode = bcn_ant_mode; 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 */ #endif /* CONFIG_LPS_LCLK */
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE) if ((rtw_btcoex_IsBtDisabled(padapter) == false)
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) { && (rtw_btcoex_IsBtControlLps(padapter) == true)) {
u8 val8; u8 val8;
val8 = rtw_btcoex_LpsVal(padapter); 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) s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms)
{ {
u32 start_time; u32 start_time;
u8 bAwake = _FALSE; u8 bAwake = false;
s32 err = 0; s32 err = 0;
start_time = rtw_get_current_time(); start_time = rtw_get_current_time();
while (1) { while (1) {
rtw_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake); rtw_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake);
if (_TRUE == bAwake) if (true == bAwake)
break; break;
if (rtw_is_surprise_removed(padapter)) { if (rtw_is_surprise_removed(padapter)) {
@ -1032,11 +1032,11 @@ void LPS_Enter(PADAPTER padapter, const char *msg)
/* RTW_INFO("+LeisurePSEnter\n"); */ /* RTW_INFO("+LeisurePSEnter\n"); */
if (_FALSE == padapter->bFWReady) if (false == padapter->bFWReady)
return; return;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE) if (rtw_btcoex_IsBtControlLps(padapter) == true)
return; return;
#endif #endif
@ -1055,7 +1055,7 @@ void LPS_Enter(PADAPTER padapter, const char *msg)
#endif #endif
for (i = 0; i < dvobj->iface_nums; i++) { 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; return;
} }
@ -1070,7 +1070,7 @@ void LPS_Enter(PADAPTER padapter, const char *msg)
if (pwrpriv->LpsIdleCount >= 2) { /* 4 Sec */ if (pwrpriv->LpsIdleCount >= 2) { /* 4 Sec */
if (pwrpriv->pwr_mode == PS_MODE_ACTIVE) { if (pwrpriv->pwr_mode == PS_MODE_ACTIVE) {
sprintf(buf, "WIFI-%s", msg); 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); rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, padapter->registrypriv.smart_ps, 0, buf);
} }
} else } else
@ -1092,7 +1092,7 @@ void LPS_Leave(PADAPTER padapter, const char *msg)
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj); struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
u32 start_time; u32 start_time;
u8 bAwake = _FALSE; u8 bAwake = false;
char buf[32] = {0}; char buf[32] = {0};
struct debug_priv *pdbgpriv = &dvobj->drv_dbg; struct debug_priv *pdbgpriv = &dvobj->drv_dbg;
@ -1100,7 +1100,7 @@ void LPS_Leave(PADAPTER padapter, const char *msg)
/* RTW_INFO("+LeisurePSLeave\n"); */ /* RTW_INFO("+LeisurePSLeave\n"); */
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE) if (rtw_btcoex_IsBtControlLps(padapter) == true)
return; return;
#endif #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 #ifdef DBG_CHECK_FW_PS_STATE
if (rtw_fw_ps_state(padapter) == _FAIL) { if (rtw_fw_ps_state(padapter) == _FAIL) {
RTW_INFO("leave lps, fw in 32k\n"); RTW_INFO("leave lps, fw in 32k\n");
@ -1142,7 +1142,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
RTW_INFO("%s.....\n", __func__); RTW_INFO("%s.....\n", __func__);
if (rtw_is_surprise_removed(Adapter)) { 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; return;
} }
@ -1221,7 +1221,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
#endif #endif
{ {
#ifdef CONFIG_IPS #ifdef CONFIG_IPS
if (_FALSE == ips_leave(pri_padapter)) if (false == ips_leave(pri_padapter))
RTW_INFO("======> ips_leave fail.............\n"); RTW_INFO("======> ips_leave fail.............\n");
#endif #endif
} }
@ -1245,14 +1245,14 @@ void LeaveAllPowerSaveMode(PADAPTER Adapter)
/* RTW_INFO("%s.....\n",__func__); */ /* RTW_INFO("%s.....\n",__func__); */
if (_FALSE == Adapter->bup) { if (false == Adapter->bup) {
RTW_INFO(FUNC_ADPT_FMT ": bup=%d Skip!\n", RTW_INFO(FUNC_ADPT_FMT ": bup=%d Skip!\n",
FUNC_ADPT_ARG(Adapter), Adapter->bup); FUNC_ADPT_ARG(Adapter), Adapter->bup);
return; return;
} }
if (rtw_is_surprise_removed(Adapter)) { 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; return;
} }
@ -1292,7 +1292,7 @@ void LeaveAllPowerSaveMode(PADAPTER Adapter)
{ {
#if defined(CONFIG_FWLPS_IN_IPS) || defined(CONFIG_SWLPS_IN_IPS) || (defined(CONFIG_PLATFORM_SPRD)) #if defined(CONFIG_FWLPS_IN_IPS) || defined(CONFIG_SWLPS_IN_IPS) || (defined(CONFIG_PLATFORM_SPRD))
#ifdef CONFIG_IPS #ifdef CONFIG_IPS
if (_FALSE == ips_leave(Adapter)) if (false == ips_leave(Adapter))
RTW_INFO("======> ips_leave fail.............\n"); RTW_INFO("======> ips_leave fail.............\n");
#endif #endif
#endif /* CONFIG_SWLPS_IN_IPS || (CONFIG_PLATFORM_SPRD) */ #endif /* CONFIG_SWLPS_IN_IPS || (CONFIG_PLATFORM_SPRD) */
@ -1313,7 +1313,7 @@ void LPS_Leave_check(
pwrpriv = adapter_to_pwrctl(padapter); pwrpriv = adapter_to_pwrctl(padapter);
bReady = _FALSE; bReady = false;
start_time = rtw_get_current_time(); start_time = rtw_get_current_time();
rtw_yield_os(); rtw_yield_os();
@ -1326,11 +1326,11 @@ void LPS_Leave_check(
|| rtw_is_drv_stopped(padapter) || rtw_is_drv_stopped(padapter)
|| (pwrpriv->pwr_mode == PS_MODE_ACTIVE) || (pwrpriv->pwr_mode == PS_MODE_ACTIVE)
) )
bReady = _TRUE; bReady = true;
_exit_pwrlock(&pwrpriv->lock); _exit_pwrlock(&pwrpriv->lock);
if (_TRUE == bReady) if (true == bReady)
break; break;
if (rtw_get_passing_time_ms(start_time) > 100) { 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); RTW_INFO("%s: cpwm=%d, nothing to do!\n", __func__, pwrpriv->cpwm);
goto exit; goto exit;
} }
pwrpriv->brpwmtimeout = _TRUE; pwrpriv->brpwmtimeout = true;
rtw_set_rpwm(padapter, pwrpriv->rpwm); rtw_set_rpwm(padapter, pwrpriv->rpwm);
pwrpriv->brpwmtimeout = _FALSE; pwrpriv->brpwmtimeout = false;
exit: exit:
_exit_pwrlock(&pwrpriv->lock); _exit_pwrlock(&pwrpriv->lock);
@ -1529,7 +1529,7 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task)
register_task_alive(pwrctrl, task); register_task_alive(pwrctrl, task);
if (pwrctrl->bFwCurrentInPSMode == _TRUE) { if (pwrctrl->bFwCurrentInPSMode == true) {
if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < pslv) {
if (pwrctrl->cpwm < PS_STATE_S2) if (pwrctrl->cpwm < PS_STATE_S2)
@ -1572,8 +1572,8 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task)
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE) if ((rtw_btcoex_IsBtDisabled(padapter) == false)
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) { && (rtw_btcoex_IsBtControlLps(padapter) == true)) {
u8 val8; u8 val8;
val8 = rtw_btcoex_LpsVal(padapter); val8 = rtw_btcoex_LpsVal(padapter);
@ -1588,7 +1588,7 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task)
unregister_task_alive(pwrctrl, task); unregister_task_alive(pwrctrl, task);
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE)
&& (pwrctrl->bFwCurrentInPSMode == _TRUE)) { && (pwrctrl->bFwCurrentInPSMode == true)) {
if (pwrctrl->cpwm > pslv) { if (pwrctrl->cpwm > pslv) {
if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) 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); register_task_alive(pwrctrl, XMIT_ALIVE);
if (pwrctrl->bFwCurrentInPSMode == _TRUE) { if (pwrctrl->bFwCurrentInPSMode == true) {
if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < pslv) {
if (pwrctrl->cpwm < PS_STATE_S2) if (pwrctrl->cpwm < PS_STATE_S2)
@ -1679,7 +1679,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter)
register_task_alive(pwrctrl, CMD_ALIVE); register_task_alive(pwrctrl, CMD_ALIVE);
if (pwrctrl->bFwCurrentInPSMode == _TRUE) { if (pwrctrl->bFwCurrentInPSMode == true) {
if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < pslv) {
if (pwrctrl->cpwm < PS_STATE_S2) if (pwrctrl->cpwm < PS_STATE_S2)
@ -1773,8 +1773,8 @@ void rtw_unregister_tx_alive(PADAPTER padapter)
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE) if ((rtw_btcoex_IsBtDisabled(padapter) == false)
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) { && (rtw_btcoex_IsBtControlLps(padapter) == true)) {
u8 val8; u8 val8;
val8 = rtw_btcoex_LpsVal(padapter); val8 = rtw_btcoex_LpsVal(padapter);
@ -1800,7 +1800,7 @@ void rtw_unregister_tx_alive(PADAPTER padapter)
unregister_task_alive(pwrctrl, XMIT_ALIVE); unregister_task_alive(pwrctrl, XMIT_ALIVE);
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE)
&& (pwrctrl->bFwCurrentInPSMode == _TRUE)) { && (pwrctrl->bFwCurrentInPSMode == true)) {
if (pwrctrl->cpwm > pslv) { if (pwrctrl->cpwm > pslv) {
if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
@ -1831,8 +1831,8 @@ void rtw_unregister_cmd_alive(PADAPTER padapter)
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE) if ((rtw_btcoex_IsBtDisabled(padapter) == false)
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)) { && (rtw_btcoex_IsBtControlLps(padapter) == true)) {
u8 val8; u8 val8;
val8 = rtw_btcoex_LpsVal(padapter); val8 = rtw_btcoex_LpsVal(padapter);
@ -1859,7 +1859,7 @@ void rtw_unregister_cmd_alive(PADAPTER padapter)
unregister_task_alive(pwrctrl, CMD_ALIVE); unregister_task_alive(pwrctrl, CMD_ALIVE);
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE)
&& (pwrctrl->bFwCurrentInPSMode == _TRUE)) { && (pwrctrl->bFwCurrentInPSMode == true)) {
if (pwrctrl->cpwm > pslv) { if (pwrctrl->cpwm > pslv) {
if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) 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->ips_leave_cnts = 0;
pwrctrlpriv->lps_enter_cnts = 0; pwrctrlpriv->lps_enter_cnts = 0;
pwrctrlpriv->lps_leave_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 = padapter->registrypriv.ips_mode;
pwrctrlpriv->ips_mode_req = 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_interval = RTW_PWR_STATE_CHK_INTERVAL;
pwrctrlpriv->pwr_state_check_cnts = 0; pwrctrlpriv->pwr_state_check_cnts = 0;
pwrctrlpriv->bInternalAutoSuspend = _FALSE; pwrctrlpriv->bInternalAutoSuspend = false;
pwrctrlpriv->bInSuspend = _FALSE; pwrctrlpriv->bInSuspend = false;
pwrctrlpriv->bkeepfwalive = _FALSE; pwrctrlpriv->bkeepfwalive = false;
pwrctrlpriv->padapter = padapter; pwrctrlpriv->padapter = padapter;
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
@ -1955,9 +1955,9 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
pwrctrlpriv->power_mgnt = PS_MODE_ACTIVE ; pwrctrlpriv->power_mgnt = PS_MODE_ACTIVE ;
else else
pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt; /* PS_MODE_MIN; */ 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->rpwm = 0;
pwrctrlpriv->cpwm = PS_STATE_S4; 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); _init_workitem(&pwrctrlpriv->dma_event, dma_event_callback, NULL);
#ifdef CONFIG_LPS_RPWM_TIMER #ifdef CONFIG_LPS_RPWM_TIMER
pwrctrlpriv->brpwmtimeout = _FALSE; pwrctrlpriv->brpwmtimeout = false;
_init_workitem(&pwrctrlpriv->rpwmtimeoutwi, rpwmtimeout_workitem_callback, NULL); _init_workitem(&pwrctrlpriv->rpwmtimeoutwi, rpwmtimeout_workitem_callback, NULL);
_init_timer(&pwrctrlpriv->pwr_rpwm_timer, padapter->pnetdev, pwr_rpwm_timeout_handler, padapter); _init_timer(&pwrctrlpriv->pwr_rpwm_timer, padapter->pnetdev, pwr_rpwm_timeout_handler, padapter);
#endif /* CONFIG_LPS_RPWM_TIMER */ #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); timer_setup(&pwrctrlpriv->pwr_state_check_timer, pwr_state_check_handler, 0);
#endif #endif
pwrctrlpriv->wowlan_mode = _FALSE; pwrctrlpriv->wowlan_mode = false;
pwrctrlpriv->wowlan_ap_mode = _FALSE; pwrctrlpriv->wowlan_ap_mode = false;
pwrctrlpriv->wowlan_p2p_mode = _FALSE; pwrctrlpriv->wowlan_p2p_mode = false;
pwrctrlpriv->wowlan_last_wake_reason = 0; pwrctrlpriv->wowlan_last_wake_reason = 0;
#ifdef CONFIG_RESUME_IN_WORKQUEUE #ifdef CONFIG_RESUME_IN_WORKQUEUE
@ -2008,7 +2008,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
/*default low active*/ /*default low active*/
pwrctrlpriv->is_high_active = HIGH_ACTIVE; pwrctrlpriv->is_high_active = HIGH_ACTIVE;
val8 = (pwrctrlpriv->is_high_active == 0) ? 1 : 0; 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_hal_set_output_gpio(padapter, WAKEUP_GPIO_IDX, val8);
RTW_INFO("%s: set GPIO_%d %d as default.\n", RTW_INFO("%s: set GPIO_%d %d as default.\n",
__func__, WAKEUP_GPIO_IDX, val8); __func__, WAKEUP_GPIO_IDX, val8);
@ -2016,9 +2016,9 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
rtw_wow_pattern_sw_reset(padapter); rtw_wow_pattern_sw_reset(padapter);
pwrctrlpriv->wowlan_in_resume = _FALSE; pwrctrlpriv->wowlan_in_resume = false;
#ifdef CONFIG_PNO_SUPPORT #ifdef CONFIG_PNO_SUPPORT
pwrctrlpriv->pno_inited = _FALSE; pwrctrlpriv->pno_inited = false;
pwrctrlpriv->pnlo_info = NULL; pwrctrlpriv->pnlo_info = NULL;
pwrctrlpriv->pscan_info = NULL; pwrctrlpriv->pscan_info = NULL;
pwrctrlpriv->pno_ssid_list = 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) #if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
inline bool rtw_is_earlysuspend_registered(struct pwrctrl_priv *pwrpriv) 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) 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) 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); struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
RTW_INFO("%s\n", __func__); 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) 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__); RTW_INFO("%s\n", __func__);
if (pwrpriv->do_late_resume) { if (pwrpriv->do_late_resume) {
rtw_set_do_late_resume(pwrpriv, _FALSE); rtw_set_do_late_resume(pwrpriv, false);
rtw_resume_process(adapter); rtw_resume_process(adapter);
} }
} }
@ -2171,7 +2171,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
{ {
RTW_INFO("%s\n", __func__); RTW_INFO("%s\n", __func__);
rtw_set_do_late_resume(pwrpriv, _FALSE); rtw_set_do_late_resume(pwrpriv, false);
if (pwrpriv->early_suspend.suspend) if (pwrpriv->early_suspend.suspend)
unregister_early_suspend(&pwrpriv->early_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); struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
RTW_INFO("%s\n", __func__); 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) 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__); RTW_INFO("%s\n", __func__);
if (pwrpriv->do_late_resume) { if (pwrpriv->do_late_resume) {
rtw_set_do_late_resume(pwrpriv, _FALSE); rtw_set_do_late_resume(pwrpriv, false);
rtw_resume_process(adapter); rtw_resume_process(adapter);
} }
} }
@ -2219,7 +2219,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
{ {
RTW_INFO("%s\n", __func__); RTW_INFO("%s\n", __func__);
rtw_set_do_late_resume(pwrpriv, _FALSE); rtw_set_do_late_resume(pwrpriv, false);
if (pwrpriv->early_suspend.suspend) if (pwrpriv->early_suspend.suspend)
android_unregister_early_suspend(&pwrpriv->early_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 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); rtw_hal_intf_ps_func(padapter, efunc_id, val);
return bResult; return bResult;
@ -2293,7 +2293,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
} }
#endif #endif
if (pwrpriv->bInternalAutoSuspend == _FALSE && pwrpriv->bInSuspend) { if (pwrpriv->bInternalAutoSuspend == false && pwrpriv->bInSuspend) {
RTW_INFO("%s wait bInSuspend...\n", __func__); RTW_INFO("%s wait bInSuspend...\n", __func__);
while (pwrpriv->bInSuspend while (pwrpriv->bInSuspend
&& ((rtw_get_passing_time_ms(start) <= 3000 && !rtw_is_do_late_resume(pwrpriv)) && ((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 */ /* System suspend is not allowed to wakeup */
if ((pwrpriv->bInternalAutoSuspend == _FALSE) && (_TRUE == pwrpriv->bInSuspend)) { if ((pwrpriv->bInternalAutoSuspend == false) && (true == pwrpriv->bInSuspend)) {
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} }
/* block??? */ /* block??? */
if ((pwrpriv->bInternalAutoSuspend == _TRUE) && (padapter->net_closed == _TRUE)) { if ((pwrpriv->bInternalAutoSuspend == true) && (padapter->net_closed == true)) {
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} }
/* I think this should be check in IPS, LPS, autosuspend functions... */ /* 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 defined(CONFIG_BT_COEXIST) && defined (CONFIG_AUTOSUSPEND)
if (_TRUE == pwrpriv->bInternalAutoSuspend) { if (true == pwrpriv->bInternalAutoSuspend) {
if (0 == pwrpriv->autopm_cnt) { if (0 == pwrpriv->autopm_cnt) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0) 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) { if (rf_off == pwrpriv->rf_pwrstate) {
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
if (pwrpriv->brfoffbyhw == _TRUE) { if (pwrpriv->brfoffbyhw == true) {
RTW_INFO("hw still in rf_off state ...........\n"); RTW_INFO("hw still in rf_off state ...........\n");
ret = _FAIL; ret = _FAIL;
goto exit; 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" , rtw_is_drv_stopped(padapter) ? "True" : "False"
, padapter->bup , padapter->bup
, rtw_get_hw_init_completed(padapter)); , rtw_get_hw_init_completed(padapter));
ret = _FALSE; ret = false;
goto exit; goto exit;
} }
@ -2401,7 +2401,7 @@ int rtw_pm_set_lps(_adapter *padapter, u8 mode)
else else
pwrctrlpriv->LpsIdleCount = 2; pwrctrlpriv->LpsIdleCount = 2;
pwrctrlpriv->power_mgnt = mode; 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 } else
ret = -EINVAL; ret = -EINVAL;

View file

@ -214,7 +214,7 @@ union recv_frame *_rtw_alloc_recvframe(_queue *pfree_recv_queue)
_adapter *padapter; _adapter *padapter;
struct recv_priv *precvpriv; struct recv_priv *precvpriv;
if (_rtw_queue_empty(pfree_recv_queue) == _TRUE) if (_rtw_queue_empty(pfree_recv_queue) == true)
precvframe = NULL; precvframe = NULL;
else { else {
phead = get_list_head(pfree_recv_queue); 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); phead = get_list_head(pframequeue);
plist = get_next(phead); 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); precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
plist = get_next(plist); plist = get_next(plist);
@ -429,7 +429,7 @@ struct recv_buf *rtw_dequeue_recvbuf(_queue *queue)
_enter_critical_ex(&queue->lock, &irqL); _enter_critical_ex(&queue->lock, &irqL);
if (_rtw_queue_empty(queue) == _TRUE) if (_rtw_queue_empty(queue) == true)
precvbuf = NULL; precvbuf = NULL;
else { else {
phead = get_list_head(queue); phead = get_list_head(queue);
@ -453,7 +453,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
sint i, res = _SUCCESS; sint i, res = _SUCCESS;
u32 datalen; u32 datalen;
u8 miccode[8]; u8 miccode[8];
u8 bmic_err = _FALSE, brpt_micerror = _TRUE; u8 bmic_err = false, brpt_micerror = true;
u8 *pframe, *payload, *pframemic; u8 *pframe, *payload, *pframemic;
u8 *mickey; u8 *mickey;
/* u8 *iv,rxdata_key_idx=0; */ /* 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", */ /* 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); */ /* psecuritypriv->dot118021XGrpKeyid,pmlmeinfo->key_index,rxdata_key_idx); */
if (psecuritypriv->binstallGrpkey == _FALSE) { if (psecuritypriv->binstallGrpkey == false) {
res = _FAIL; res = _FAIL;
RTW_INFO("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n"); RTW_INFO("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n");
goto exit; goto exit;
@ -499,25 +499,25 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
pframemic = payload + datalen; pframemic = payload + datalen;
bmic_err = _FALSE; bmic_err = false;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (miccode[i] != *(pframemic + 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 , */ /* double check key_index for some timing issue , */
/* cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue */ /* cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue */
if ((IS_MCAST(prxattrib->ra) == _TRUE) && (prxattrib->key_index != pmlmeinfo->key_index)) if ((IS_MCAST(prxattrib->ra) == true) && (prxattrib->key_index != pmlmeinfo->key_index))
brpt_micerror = _FALSE; 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_handle_tkip_mic_err(adapter, stainfo, (u8)IS_MCAST(prxattrib->ra));
RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted); RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted);
} else { } else {
@ -528,8 +528,8 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
} else { } else {
/* mic checked ok */ /* mic checked ok */
if ((psecuritypriv->bcheck_grpkey == _FALSE) && (IS_MCAST(prxattrib->ra) == _TRUE)) { if ((psecuritypriv->bcheck_grpkey == false) && (IS_MCAST(prxattrib->ra) == true)) {
psecuritypriv->bcheck_grpkey = _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 #ifdef CONFIG_CONCURRENT_MODE
if (!IS_MCAST(prxattrib->ra)) /* bc/mc packets use sw decryption for concurrent mode */ if (!IS_MCAST(prxattrib->ra)) /* bc/mc packets use sw decryption for concurrent mode */
#endif #endif
psecuritypriv->hw_decrypted = _FALSE; psecuritypriv->hw_decrypted = false;
#ifdef DBG_RX_SW_DECRYPTOR #ifdef DBG_RX_SW_DECRYPTOR
RTW_INFO(ADPT_FMT" - sec_type:%s DO SW decryption\n", 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_)) { prxattrib->encrypt != _TKIP_)) {
DBG_COUNTER(padapter->rx_logs.core_rx_post_decrypt_hw); DBG_COUNTER(padapter->rx_logs.core_rx_post_decrypt_hw);
psecuritypriv->hw_decrypted = _TRUE; psecuritypriv->hw_decrypted = true;
#ifdef DBG_RX_DECRYPTOR #ifdef DBG_RX_DECRYPTOR
RTW_INFO("[%s] %d:prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n", RTW_INFO("[%s] %d:prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n",
__func__, __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); rtw_free_recvframe(return_packet, &padapter->recvpriv.free_recv_queue);
return_packet = NULL; return_packet = NULL;
} else { } else {
prxattrib->bdecrypted = _TRUE; prxattrib->bdecrypted = true;
} }
return return_packet; return return_packet;
} }
@ -815,7 +815,7 @@ static sint recv_bcast_pn_decache(union recv_frame *precv_frame)
u8 key_id; u8 key_id;
if ((pattrib->encrypt == _AES_) && 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)); tmp_iv_hdr = le64_to_cpu(*(__le64*)(pdata + pattrib->hdrlen));
key_id = CCMPH_2_KEYID(tmp_iv_hdr); 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))); 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"); RTW_INFO("Ignore tdls frame since hal doesn't support tdls\n");
ret = _FAIL; ret = _FAIL;
return ret; return ret;
} }
if (ptdlsinfo->tdls_enable == _FALSE) { if (ptdlsinfo->tdls_enable == false) {
RTW_INFO("recv tdls frame, " RTW_INFO("recv tdls frame, "
"but tdls haven't enabled\n"); "but tdls haven't enabled\n");
ret = _FAIL; ret = _FAIL;
@ -1012,14 +1012,14 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame)
/* Probe request frame */ /* Probe request frame */
if (*(paction + 3) == 0x04) { if (*(paction + 3) == 0x04) {
/* WFDTDLS: for sigma test, do not setup direct link automatically */ /* 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"); RTW_INFO("recv tunneled probe request frame\n");
issue_tunneled_probe_rsp(adapter, precv_frame); issue_tunneled_probe_rsp(adapter, precv_frame);
} }
/* Probe response frame */ /* Probe response frame */
if (*(paction + 3) == 0x05) { if (*(paction + 3) == 0x05) {
/* WFDTDLS: for sigma test, do not setup direct link automatically */ /* 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"); 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 #ifdef CONFIG_CHECK_LEAVE_LPS
traffic_check_for_leave_lps(padapter, _FALSE, 0); traffic_check_for_leave_lps(padapter, false, 0);
#endif /* CONFIG_LPS */ #endif /* CONFIG_LPS */
} }
@ -1125,8 +1125,8 @@ sint sta2sta_data_frame(
/* RTW_INFO("[%s] %d, seqnum:%d\n", __func__, __LINE__, pattrib->seq_num); */ /* RTW_INFO("[%s] %d, seqnum:%d\n", __func__, __LINE__, pattrib->seq_num); */
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) || if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
/* filter packets that SA is myself or multicast or broadcast */ /* filter packets that SA is myself or multicast or broadcast */
if (_rtw_memcmp(myhwaddr, pattrib->src, ETH_ALEN)) { if (_rtw_memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
@ -1148,11 +1148,11 @@ sint sta2sta_data_frame(
sta_addr = pattrib->src; 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 #ifdef CONFIG_TDLS
/* direct link data transfer */ /* direct link data transfer */
if (ptdlsinfo->link_established == _TRUE) { if (ptdlsinfo->link_established == true) {
ptdls_sta = rtw_get_stainfo(pstapriv, pattrib->src); ptdls_sta = rtw_get_stainfo(pstapriv, pattrib->src);
if (ptdls_sta == NULL) { if (ptdls_sta == NULL) {
ret = _FAIL; ret = _FAIL;
@ -1177,7 +1177,7 @@ sint sta2sta_data_frame(
} }
#ifdef CONFIG_TDLS_CH_SW #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)) { if (adapter->mlmeextpriv.cur_channel != rtw_get_oper_ch(adapter)) {
pchsw_info->ch_sw_state |= TDLS_PEER_AT_OFF_STATE; pchsw_info->ch_sw_state |= TDLS_PEER_AT_OFF_STATE;
if (!(pchsw_info->ch_sw_state & TDLS_CH_SW_INITIATOR_STATE)) if (!(pchsw_info->ch_sw_state & TDLS_CH_SW_INITIATOR_STATE))
@ -1234,7 +1234,7 @@ sint sta2sta_data_frame(
sta_addr = pattrib->bssid; sta_addr = pattrib->bssid;
} }
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
if (bmcast) { if (bmcast) {
/* For AP mode, if DA == MCAST, then BSSID should be also MCAST */ /* For AP mode, if DA == MCAST, then BSSID should be also MCAST */
if (!IS_MCAST(pattrib->bssid)) { if (!IS_MCAST(pattrib->bssid)) {
@ -1251,7 +1251,7 @@ sint sta2sta_data_frame(
sta_addr = pattrib->src; 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->dst, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); _rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN); _rtw_memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
@ -1277,7 +1277,7 @@ sint sta2sta_data_frame(
if (*psta == NULL) { if (*psta == NULL) {
#ifdef CONFIG_MP_INCLUDED #ifdef CONFIG_MP_INCLUDED
if (adapter->registrypriv.mp_mode == 1) { 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++; adapter->mppriv.rx_pktloss++;
} }
#endif #endif
@ -1309,9 +1309,9 @@ sint ap2sta_data_frame(
sint bmcast = IS_MCAST(pattrib->dst); sint bmcast = IS_MCAST(pattrib->dst);
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE && (check_fwstate(pmlmepriv, _FW_LINKED) == true
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE) || check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
) { ) {
/* filter packets that SA is myself or multicast or broadcast */ /* filter packets that SA is myself or multicast or broadcast */
@ -1376,8 +1376,8 @@ sint ap2sta_data_frame(
goto exit; goto exit;
} }
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) && } else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { (check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); _rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN); _rtw_memcpy(pattrib->src, get_addr2_ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->bssid, GetAddr3Ptr(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 */ /* Special case */
ret = RTW_RX_HANDLED; ret = RTW_RX_HANDLED;
goto exit; goto exit;
@ -1449,7 +1449,7 @@ sint sta2ap_data_frame(
sint ret = _SUCCESS; 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 */ /* For AP mode, RA=BSSID, TX=STA(SRC_ADDR), A3=DST_ADDR */
if (!_rtw_memcmp(pattrib->bssid, mybssid, ETH_ALEN)) { if (!_rtw_memcmp(pattrib->bssid, mybssid, ETH_ALEN)) {
ret = _FAIL; ret = _FAIL;
@ -1488,8 +1488,8 @@ bypass_deauth7:
ret = RTW_RX_HANDLED; ret = RTW_RX_HANDLED;
goto exit; goto exit;
} }
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) && } else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)) { (check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
/* RTW_INFO("%s ,in WIFI_MP_STATE\n",__func__); */ /* RTW_INFO("%s ,in WIFI_MP_STATE\n",__func__); */
_rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN); _rtw_memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
_rtw_memcpy(pattrib->src, get_addr2_ptr(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_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); 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 */ /* upate BCN for TIM IE */
/* update_BCNTIM(padapter); */ /* 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); */ /* _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 */ /* upate BCN for TIM IE */
/* update_BCNTIM(padapter); */ /* 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) else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_PROBEREQ)
psta->sta_stats.rx_probereq_pkts++; psta->sta_stats.rx_probereq_pkts++;
else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) { 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++; psta->sta_stats.rx_probersp_pkts++;
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)) else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data))
|| is_multicast_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 #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 rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
struct recv_stat *prxstat = (struct recv_stat *) precv_frame->u.hdr.rx_head ; struct recv_stat *prxstat = (struct recv_stat *) precv_frame->u.hdr.rx_head ;
u8 *pda, *psa, *pbssid, *ptr; 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; pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26;
if (pattrib->priority != 0 && pattrib->priority != 3) if (pattrib->priority != 0 && pattrib->priority != 3)
adapter->recvpriv.is_any_non_be_pkts = _TRUE; adapter->recvpriv.is_any_non_be_pkts = true;
else else
adapter->recvpriv.is_any_non_be_pkts = _FALSE; adapter->recvpriv.is_any_non_be_pkts = false;
} else { } else {
pattrib->priority = 0; pattrib->priority = 0;
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 30 : 24; 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); type = GetFrameType(ptr);
subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */ subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */
if (adapter->securitypriv.binstallBIPkey == _TRUE) { if (adapter->securitypriv.binstallBIPkey == true) {
/* unicast management frame decrypt */ /* unicast management frame decrypt */
if (pattrib->privacy && !(IS_MCAST(GetAddr1Ptr(ptr))) && if (pattrib->privacy && !(IS_MCAST(GetAddr1Ptr(ptr))) &&
(subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || subtype == WIFI_ACTION)) { (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 { else {
psta = rtw_get_stainfo(pstapriv, get_addr2_ptr(ptr)); 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 */ /* according 802.11-2012 standard, these five types are not robust types */
if (ptr[WLAN_HDR_A3_LEN] != RTW_WLAN_CATEGORY_PUBLIC && if (ptr[WLAN_HDR_A3_LEN] != RTW_WLAN_CATEGORY_PUBLIC &&
ptr[WLAN_HDR_A3_LEN] != RTW_WLAN_CATEGORY_HT && 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 */ /* convert hdr + possible LLC headers into Ethernet header */
/* eth_type = (psnap_type[0] << 8) | psnap_type[1]; */ /* eth_type = (psnap_type[0] << 8) | psnap_type[1]; */
if ((_rtw_memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) && 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_IPX, 2) == false) &&
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) == _FALSE)) || (_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) == false)) ||
/* eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || */ /* eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || */
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)) { _rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)) {
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */ /* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
bsnaphdr = _TRUE; bsnaphdr = true;
} else { } else {
/* Leave Ethernet header part of hdr and full payload */ /* Leave Ethernet header part of hdr and full payload */
bsnaphdr = _FALSE; bsnaphdr = false;
} }
rmv_len = pattrib->hdrlen + pattrib->iv_len + (bsnaphdr ? SNAP_SIZE : 0); 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 */ #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 += rmv_len ;
*ptr = 0x87; *ptr = 0x87;
*(ptr + 1) = 0x12; *(ptr + 1) = 0x12;
@ -2359,7 +2359,7 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
data = get_recvframe_data(prframe); 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); pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
pnfhdr = &pnextrframe->u.hdr; 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 (pdefrag_q != NULL) {
if (fragnum == 0) { if (fragnum == 0) {
/* the first fragment */ /* the first fragment */
if (_rtw_queue_empty(pdefrag_q) == _FALSE) { if (_rtw_queue_empty(pdefrag_q) == false) {
/* free current defrag_q */ /* free current defrag_q */
rtw_free_recvframe_queue(pdefrag_q, pfree_recv_queue); 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__, RTW_INFO("%s IndicateSeq: %d > NewSeq: %d\n", __func__,
preorder_ctrl->indicate_seq, seq_num); preorder_ctrl->indicate_seq, seq_num);
#endif #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); */ /* 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) 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); phead = get_list_head(ppending_recvframe_queue);
plist = get_next(phead); 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); pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
pnextattrib = &pnextrframe->u.hdr.attrib; 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); */ /* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
return _FALSE; return false;
} else } else
break; 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); */ /* _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; union recv_frame *prframe;
struct rx_pkt_attrib *pattrib; struct rx_pkt_attrib *pattrib;
/* u8 index = 0; */ /* u8 index = 0; */
int bPktInBuf = _FALSE; int bPktInBuf = false;
struct recv_priv *precvpriv = &padapter->recvpriv; struct recv_priv *precvpriv = &padapter->recvpriv;
_queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; _queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
struct dvobj_priv *psdpriv = padapter->dvobj; 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); plist = get_next(phead);
/* Handling some condition for forced indicate case. */ /* Handling some condition for forced indicate case. */
if (bforced == _TRUE) { if (bforced == true) {
pdbgpriv->dbg_rx_ampdu_forced_indicate_count++; pdbgpriv->dbg_rx_ampdu_forced_indicate_count++;
if (rtw_is_list_empty(phead)) { if (rtw_is_list_empty(phead)) {
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */ /* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */ /* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */
return _TRUE; return true;
} }
prframe = LIST_CONTAINOR(plist, union recv_frame, u); 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. */ /* Update local variables. */
bPktInBuf = _FALSE; bPktInBuf = false;
} else { } else {
bPktInBuf = _TRUE; bPktInBuf = true;
break; 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 */ /* indicate this recv_frame */
preorder_ctrl->indicate_seq = le16_to_cpu(pattrib->seq_num); preorder_ctrl->indicate_seq = le16_to_cpu(pattrib->seq_num);
#ifdef DBG_RX_SEQ #ifdef DBG_RX_SEQ
@ -2864,7 +2864,7 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram
#endif #endif
} else if (pattrib->amsdu == 1) { /* temp filter->means didn't support A-MSDUs in a A-MPDU */ } 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); preorder_ctrl->indicate_seq = le16_to_cpu(pattrib->seq_num);
#ifdef DBG_RX_SEQ #ifdef DBG_RX_SEQ
RTW_INFO("DBG_RX_SEQ %s:%d IndicateSeq: %d, NewSeq: %d\n", __func__, __LINE__, 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. */ /* 2. All packets with SeqNum larger than or equal to WinStart => Buffer it. */
/* */ /* */
/* recv_indicatepkts_in_order(padapter, preorder_ctrl, _TRUE); */ /* recv_indicatepkts_in_order(padapter, preorder_ctrl, true); */
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, _FALSE) == _TRUE) { if (recv_indicatepkts_in_order(padapter, preorder_ctrl, false) == true) {
if (!preorder_ctrl->bReorderWaiting) { if (!preorder_ctrl->bReorderWaiting) {
preorder_ctrl->bReorderWaiting = _TRUE; preorder_ctrl->bReorderWaiting = true;
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME); _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
} }
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql); _exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
} else { } else {
preorder_ctrl->bReorderWaiting = _FALSE; preorder_ctrl->bReorderWaiting = false;
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql); _exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer); _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); _enter_critical_bh(&ppending_recvframe_queue->lock, &irql);
if (preorder_ctrl) 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); _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql); _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); DBG_COUNTER(padapter->rx_logs.core_rx_post_indicate);
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
if ((phtpriv->ht_option == _TRUE) || if ((phtpriv->ht_option == true) ||
((psta->tdls_sta_state & TDLS_LINKED_STATE) && ((psta->tdls_sta_state & TDLS_LINKED_STATE) &&
(psta->htpriv.ht_option == _TRUE) && (psta->htpriv.ht_option == true) &&
(psta->htpriv.ampdu_enable == _TRUE))) /* B/G/N Mode */ (psta->htpriv.ampdu_enable == true))) /* B/G/N Mode */
#else #else
if (phtpriv->ht_option == _TRUE) /* B/G/N Mode */ if (phtpriv->ht_option == true) /* B/G/N Mode */
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
{ {
/* prframe->u.hdr.preorder_ctrl = &precvpriv->recvreorder_ctrl[pattrib->priority]; */ /* 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; pmptx = &pmppriv->tx;
if (pmppriv->bloopback) { 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"); RTW_INFO("Compare payload content Fail !!!\n");
ret = _FAIL; ret = _FAIL;
} }
} }
if (pmppriv->bSetRxBssid == _TRUE) { if (pmppriv->bSetRxBssid == true) {
sa = get_addr2_ptr(ptr); sa = get_addr2_ptr(ptr);
da = GetAddr1Ptr(ptr); da = GetAddr1Ptr(ptr);
@ -3061,7 +3061,7 @@ static int validate_mp_recv_frame(_adapter *adapter, union recv_frame *precv_fra
type = GetFrameType(ptr); type = GetFrameType(ptr);
subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */ 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; ret = _FAIL;
RTW_DBG("############ type:0x%02x subtype:0x%02x #################\n", type, subtype); 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) if (!adapter->mppriv.bmac_filter)
return ret; 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; ret = _FAIL;
return ret; return ret;
@ -3106,15 +3106,15 @@ static sint MPwlanhdr_to_ethhdr(union recv_frame *precvframe)
/* convert hdr + possible LLC headers into Ethernet header */ /* convert hdr + possible LLC headers into Ethernet header */
/* eth_type = (psnap_type[0] << 8) | psnap_type[1]; */ /* eth_type = (psnap_type[0] << 8) | psnap_type[1]; */
if ((_rtw_memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) && 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_IPX, 2) == false) &&
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) == _FALSE)) || (_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) == false)) ||
/* eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || */ /* eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || */
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)) { _rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)) {
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */ /* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
bsnaphdr = _TRUE; bsnaphdr = true;
} else { } else {
/* Leave Ethernet header part of hdr and full payload */ /* Leave Ethernet header part of hdr and full payload */
bsnaphdr = _FALSE; bsnaphdr = false;
} }
rmv_len = pattrib->hdrlen + pattrib->iv_len + (bsnaphdr ? SNAP_SIZE : 0); 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)); be_tmp = htons(le16_to_cpu(pattrib->seq_num));
/* RTW_INFO("wlan seq = %d ,seq_num =%x\n",len,pattrib->seq_num); */ /* RTW_INFO("wlan seq = %d ,seq_num =%x\n",len,pattrib->seq_num); */
_rtw_memcpy(ptr + 12, &be_tmp, 2); _rtw_memcpy(ptr + 12, &be_tmp, 2);
if (adapter->mppriv.bRTWSmbCfg == _TRUE) { if (adapter->mppriv.bRTWSmbCfg == true) {
/* if(_rtw_memcmp(mcastheadermac, pattrib->dst, 3) == _TRUE) */ /* SimpleConfig Dest. */ /* if(_rtw_memcmp(mcastheadermac, pattrib->dst, 3) == true) */ /* SimpleConfig Dest. */
/* _rtw_memcpy(ptr+ETH_ALEN, pattrib->bssid, ETH_ALEN); */ /* _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); _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; struct sta_info *psta = NULL;
DBG_COUNTER(padapter->rx_logs.core_rx_pre); 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) if (pattrib->crc_err == 1)
padapter->mppriv.rx_crcerrpktcount++; padapter->mppriv.rx_crcerrpktcount++;
else { else {
@ -3179,7 +3179,7 @@ static int mp_recv_frame(_adapter *padapter, union recv_frame *rframe)
padapter->mppriv.rx_pktcount_filter_out++; padapter->mppriv.rx_pktcount_filter_out++;
} }
if (pmppriv->rx_bindicatePkt == _FALSE) { if (pmppriv->rx_bindicatePkt == false) {
ret = _FAIL; ret = _FAIL;
rtw_free_recvframe(rframe, pfree_recv_queue);/* free this recv_frame */ rtw_free_recvframe(rframe, pfree_recv_queue);/* free this recv_frame */
goto exit; goto exit;
@ -3605,7 +3605,7 @@ static int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
#endif #endif
#ifdef CONFIG_MP_INCLUDED #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); mp_recv_frame(padapter, rframe);
ret = _FAIL; ret = _FAIL;
goto exit; 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*/ /* check if need to enqueue into uc_swdec_pending_queue*/
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
!IS_MCAST(prxattrib->ra) && prxattrib->encrypt > 0 && !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->ndisauthtype == Ndis802_11AuthModeWPAPSK &&
!psecuritypriv->busetkipkey) { !psecuritypriv->busetkipkey) {
DBG_COUNTER(padapter->rx_logs.core_rx_enqueue); 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; goto set_timer;
} }
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == _TRUE if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == true
|| check_fwstate(&adapter->mlmepriv, _FW_LINKED) == _FALSE || check_fwstate(&adapter->mlmepriv, _FW_LINKED) == false
) )
goto set_timer; goto set_timer;
#ifdef CONFIG_CONCURRENT_MODE #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; goto set_timer;
#endif #endif
@ -4062,9 +4062,9 @@ void rx_query_phy_status(
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg; struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
/* unsigned long irqL; */ /* unsigned long irqL; */
pkt_info.is_packet_match_bssid = _FALSE; pkt_info.is_packet_match_bssid = false;
pkt_info.is_packet_to_self = _FALSE; pkt_info.is_packet_to_self = false;
pkt_info.is_packet_beacon = _FALSE; pkt_info.is_packet_beacon = false;
wlanhdr = get_recvframe_data(precvframe); wlanhdr = get_recvframe_data(precvframe);
@ -4085,7 +4085,7 @@ void rx_query_phy_status(
pkt_info.station_id = 0xFF; 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; static u32 start_time = 0;
if ((start_time == 0) || (rtw_get_passing_time_ms(start_time) > 5000)) { 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; precvframe->u.hdr.psta = NULL;
if (pkt_info.is_packet_match_bssid 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) { if (psta) {
precvframe->u.hdr.psta = 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 * Increase and check if the continual_no_rx_packet of this @param pmlmepriv is larger than MAX_CONTINUAL_NORXPACKET_COUNT
* @return _TRUE: * @return true:
* @return _FALSE: * @return false:
*/ */
int rtw_inc_and_chk_continual_no_rx_packet(struct sta_info *sta, int tid_index) 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]); int value = ATOMIC_INC_RETURN(&sta->continual_no_rx_packet[tid_index]);
if (value >= MAX_CONTINUAL_NORXPACKET_COUNT) if (value >= MAX_CONTINUAL_NORXPACKET_COUNT)
ret = _TRUE; ret = true;
return ret; return ret;
} }
@ -4164,7 +4164,7 @@ s32 pre_recv_entry(union recv_frame *precvframe, u8 *pphy_status)
pda = get_ra(pbuf); 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); iface = rtw_get_iface_by_macddr(primary_padapter , pda);
if (NULL == iface) { if (NULL == iface) {
RTW_INFO("%s [WARN] Cannot find appropriate adapter - mac_addr : "MAC_FMT"\n", __func__, MAC_ARG(pda)); RTW_INFO("%s [WARN] Cannot find appropriate adapter - mac_addr : "MAC_FMT"\n", __func__, MAC_ARG(pda));

View file

@ -476,7 +476,7 @@ bool rtw_chbw_to_freq_range(u8 ch, u8 bw, u8 offset, u32 *hi, u32 *lo)
u32 freq; u32 freq;
u32 hi_ret = 0, lo_ret = 0; u32 hi_ret = 0, lo_ret = 0;
int i; int i;
bool valid = _FALSE; bool valid = false;
if (hi) if (hi)
*hi = 0; *hi = 0;
@ -508,7 +508,7 @@ bool rtw_chbw_to_freq_range(u8 ch, u8 bw, u8 offset, u32 *hi, u32 *lo)
if (lo) if (lo)
*lo = lo_ret; *lo = lo_ret;
valid = _TRUE; valid = true;
exit: exit:
return valid; 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) 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) bool rtw_is_dfs_ch(u8 ch, u8 bw, u8 offset)
{ {
u32 hi, lo; u32 hi, lo;
if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false)
return _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) 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) bool rtw_is_long_cac_ch(u8 ch, u8 bw, u8 offset, u8 dfs_region)
{ {
u32 hi, lo; u32 hi, lo;
if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == _FALSE) if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false)
return _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;
} }

View file

@ -826,7 +826,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
static u32 no_gkey_bc_cnt = 0; static u32 no_gkey_bc_cnt = 0;
static u32 no_gkey_mc_cnt = 0; static u32 no_gkey_mc_cnt = 0;
if (psecuritypriv->binstallGrpkey == _FALSE) { if (psecuritypriv->binstallGrpkey == false) {
res = _FAIL; res = _FAIL;
if (start == 0) 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"); */ /* RTW_INFO("rx bc/mc packets, to perform sw rtw_aes_decrypt\n"); */
/* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */ /* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */
if (psecuritypriv->binstallGrpkey == _FALSE) { if (psecuritypriv->binstallGrpkey == false) {
res = _FAIL; res = _FAIL;
if (start == 0) 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++) { for (keyid = 0; keyid < 4; keyid++) {
if (securitypriv->key_mask & BIT(keyid)) { if (securitypriv->key_mask & BIT(keyid)) {
if (keyid == securitypriv->dot11PrivacyKeyIndex) if (keyid == securitypriv->dot11PrivacyKeyIndex)
rtw_set_key(adapter, securitypriv, keyid, 1, _FALSE); rtw_set_key(adapter, securitypriv, keyid, 1, false);
else 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); struct security_priv *securitypriv = &(adapter->securitypriv);
u8 status = _SUCCESS; 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); u32 passing_ms = rtw_get_passing_time_ms(securitypriv->btkip_countermeasure_time);
if (passing_ms > 60 * 1000) { if (passing_ms > 60 * 1000) {
RTW_PRINT("%s("ADPT_FMT") countermeasure time:%ds > 60s\n", RTW_PRINT("%s("ADPT_FMT") countermeasure time:%ds > 60s\n",
caller, ADPT_ARG(adapter), passing_ms / 1000); caller, ADPT_ARG(adapter), passing_ms / 1000);
securitypriv->btkip_countermeasure = _FALSE; securitypriv->btkip_countermeasure = false;
securitypriv->btkip_countermeasure_time = 0; securitypriv->btkip_countermeasure_time = 0;
} else { } else {
RTW_PRINT("%s("ADPT_FMT") countermeasure time:%ds < 60s\n", RTW_PRINT("%s("ADPT_FMT") countermeasure time:%ds < 60s\n",

View file

@ -29,7 +29,7 @@ void sreset_init_value(_adapter *padapter)
struct sreset_priv *psrtpriv = &pHalData->srestpriv; struct sreset_priv *psrtpriv = &pHalData->srestpriv;
_rtw_mutex_init(&psrtpriv->silentreset_mutex); _rtw_mutex_init(&psrtpriv->silentreset_mutex);
psrtpriv->silent_reset_inprogress = _FALSE; psrtpriv->silent_reset_inprogress = false;
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS; psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
psrtpriv->last_tx_time = 0; psrtpriv->last_tx_time = 0;
psrtpriv->last_tx_complete_time = 0; psrtpriv->last_tx_complete_time = 0;
@ -56,7 +56,7 @@ u8 sreset_get_wifi_status(_adapter *padapter)
u8 status = WIFI_STATUS_SUCCESS; u8 status = WIFI_STATUS_SUCCESS;
u32 val32 = 0; u32 val32 = 0;
unsigned long irqL; unsigned long irqL;
if (psrtpriv->silent_reset_inprogress == _TRUE) if (psrtpriv->silent_reset_inprogress == true)
return status; return status;
val32 = rtw_read32(padapter, REG_TXDMA_STATUS); val32 = rtw_read32(padapter, REG_TXDMA_STATUS);
if (val32 == 0xeaeaeaea) if (val32 == 0xeaeaeaea)
@ -103,7 +103,7 @@ bool sreset_inprogress(_adapter *padapter)
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
return pHalData->srestpriv.silent_reset_inprogress; return pHalData->srestpriv.silent_reset_inprogress;
#else #else
return _FALSE; return false;
#endif #endif
} }
@ -137,9 +137,9 @@ static void sreset_restore_security_station(_adapter *padapter)
/* DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n")); */ /* DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n")); */
} else { } else {
/* pairwise key */ /* pairwise key */
rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _FALSE); rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, false);
/* group key */ /* 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_priv *mlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); 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; 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); rtw_hal_set_hwreg(padapter, HW_VAR_DO_IQK , &doiqk);
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); 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); rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk);
/* disable dynamic functions, such as high power, DIG */ /* disable dynamic functions, such as high power, DIG */
/*rtw_phydm_func_disable_all(padapter);*/ /*rtw_phydm_func_disable_all(padapter);*/
@ -287,17 +287,17 @@ void sreset_reset(_adapter *padapter)
_enter_pwrlock(&pwrpriv->lock); _enter_pwrlock(&pwrpriv->lock);
psrtpriv->silent_reset_inprogress = _TRUE; psrtpriv->silent_reset_inprogress = true;
pwrpriv->change_rfpwrstate = rf_off; 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 #ifdef CONFIG_IPS
_ips_enter(padapter); _ips_enter(padapter);
_ips_leave(padapter); _ips_leave(padapter);
#endif #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); _exit_pwrlock(&pwrpriv->lock);

View file

@ -25,8 +25,8 @@ static bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_por
{ {
if (ntohs(*((__be16 *)local_port)) == 5001 || if (ntohs(*((__be16 *)local_port)) == 5001 ||
ntohs(*((__be16 *)remote_port)) == 5001) ntohs(*((__be16 *)remote_port)) == 5001)
return _TRUE; return true;
return _FALSE; return false;
} }
static struct st_register test_st_reg = { 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); _enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
phead = &st_ctl->tracker_q.queue; phead = &st_ctl->tracker_q.queue;
plist = get_next(phead); 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); st = LIST_CONTAINOR(plist, struct session_tracker, list);
plist = get_next(plist); plist = get_next(plist);
rtw_list_delete(&st->list); 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) 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; int i;
for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) { for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) {
if (st_ctl->reg[i].s_proto == s_proto) { if (st_ctl->reg[i].s_proto == s_proto) {
ret = _TRUE; ret = true;
break; 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) 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; int i;
st_match_rule rule; st_match_rule rule;
for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) { for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) {
rule = st_ctl->reg[i].rule; rule = st_ctl->reg[i].rule;
if (rule && rule(adapter, local_naddr, local_port, remote_naddr, remote_port) == _TRUE) { if (rule && rule(adapter, local_naddr, local_port, remote_naddr, remote_port) == true) {
ret = _TRUE; ret = true;
break; 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); _enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
phead = &st_ctl->tracker_q.queue; phead = &st_ctl->tracker_q.queue;
plist = get_next(phead); 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); st = LIST_CONTAINOR(plist, struct session_tracker, list);
plist = get_next(plist); plist = get_next(plist);
@ -188,10 +188,10 @@ void _rtw_init_stainfo(struct sta_info *psta)
psta->capability = 0; psta->capability = 0;
psta->bpairwise_key_installed = _FALSE; psta->bpairwise_key_installed = false;
#ifdef CONFIG_RTW_80211R #ifdef CONFIG_RTW_80211R
psta->ft_pairwise_key_installed = _FALSE; psta->ft_pairwise_key_installed = false;
#endif #endif
#ifdef CONFIG_NATIVEAP_MLME #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); phead = get_list_head(&pstapriv->free_sta_queue);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info , list);
plist = get_next(plist); plist = get_next(plist);
@ -408,7 +408,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
phead = &(pstapriv->sta_hash[index]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while ((rtw_end_of_queue_search(phead, plist)) == false) {
int i; int i;
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list); psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
plist = get_next(plist); 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(&(pfree_sta_queue->lock), &irqL); */
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); _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; psta = NULL;
goto exit; 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->padapter = pstapriv->padapter;
preorder_ctrl->enable = _FALSE; preorder_ctrl->enable = false;
preorder_ctrl->indicate_seq = 0xffff; preorder_ctrl->indicate_seq = 0xffff;
#ifdef DBG_RX_SEQ #ifdef DBG_RX_SEQ
@ -543,7 +543,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
#endif #endif
/* init for the sequence number of received management frame */ /* init for the sequence number of received management frame */
psta->RxMgmtFrameSeqNum = 0xffff; psta->RxMgmtFrameSeqNum = 0xffff;
psta->ra_rpt_linked = _FALSE; psta->ra_rpt_linked = false;
rtw_alloc_macid(pstapriv->padapter, psta); 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 sta_priv *pstapriv = &padapter->stapriv;
struct hw_xmit *phwxmit; struct hw_xmit *phwxmit;
int pending_qcnt[4]; int pending_qcnt[4];
u8 is_pre_link_sta = _FALSE; u8 is_pre_link_sta = false;
if (psta == NULL) if (psta == NULL)
goto exit; goto exit;
is_pre_link_sta = rtw_is_pre_link_sta(pstapriv, psta->hwaddr); 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); _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL0);
rtw_list_delete(&psta->hash_list); rtw_list_delete(&psta->hash_list);
pstapriv->asoc_sta_count--; 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) 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); rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, false);
/* release mac id for non-bc/mc station, */ /* 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); rtw_release_macid(pstapriv->padapter, psta);
#ifdef CONFIG_AP_MODE #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); rtw_st_ctl_deinit(&psta->st_ctl);
if (is_pre_link_sta == _FALSE) { if (is_pre_link_sta == false) {
_rtw_spinlock_free(&psta->lock); _rtw_spinlock_free(&psta->lock);
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */ /* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
@ -793,13 +793,13 @@ void rtw_free_all_stainfo(_adapter *padapter)
phead = &(pstapriv->sta_hash[index]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
plist = get_next(plist); plist = get_next(plist);
if (pbcmc_stainfo != psta) { 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); rtw_list_delete(&psta->hash_list);
stainfo_offset = rtw_stainfo_offset(pstapriv, psta); 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); 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); 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 */ /* if found the matched address */
break; break;
} }
@ -930,11 +930,11 @@ const char *const _acl_mode_str[] = {
u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr) u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr)
{ {
u8 res = _TRUE; u8 res = true;
unsigned long irqL; unsigned long irqL;
_list *list, *head; _list *list, *head;
struct rtw_wlan_acl_node *acl_node; struct rtw_wlan_acl_node *acl_node;
u8 match = _FALSE; u8 match = false;
struct sta_priv *stapriv = &adapter->stapriv; struct sta_priv *stapriv = &adapter->stapriv;
struct wlan_acl_pool *acl = &stapriv->acl_list; struct wlan_acl_pool *acl = &stapriv->acl_list;
_queue *acl_node_q = &acl->acl_node_q; _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); _enter_critical_bh(&(acl_node_q->lock), &irqL);
head = get_list_head(acl_node_q); head = get_list_head(acl_node_q);
list = get_next(head); 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); acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list);
list = get_next(list); list = get_next(list);
if (_rtw_memcmp(acl_node->addr, mac_addr, ETH_ALEN)) { if (_rtw_memcmp(acl_node->addr, mac_addr, ETH_ALEN)) {
if (acl_node->valid == _TRUE) { if (acl_node->valid == true) {
match = _TRUE; match = true;
break; break;
} }
} }
@ -956,11 +956,11 @@ u8 rtw_access_ctrl(_adapter *adapter, u8 *mac_addr)
_exit_critical_bh(&(acl_node_q->lock), &irqL); _exit_critical_bh(&(acl_node_q->lock), &irqL);
if (acl->mode == RTW_ACL_MODE_ACCEPT_UNLESS_LISTED) 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) else if (acl->mode == RTW_ACL_MODE_DENY_UNLESS_LISTED)
res = (match == _TRUE) ? _TRUE : _FALSE; res = (match == true) ? true : false;
else else
res = _TRUE; res = true;
return res; 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, "mode:%s(%d)\n", acl_mode_str(acl->mode), acl->mode);
RTW_PRINT_SEL(sel, "num:%d/%d\n", acl->num, NUM_ACL); RTW_PRINT_SEL(sel, "num:%d/%d\n", acl->num, NUM_ACL);
for (i = 0; i < NUM_ACL; i++) { for (i = 0; i < NUM_ACL; i++) {
if (acl->aclnode[i].valid == _FALSE) if (acl->aclnode[i].valid == false)
continue; continue;
RTW_PRINT_SEL(sel, MAC_FMT"\n", MAC_ARG(acl->aclnode[i].addr)); 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 #if CONFIG_RTW_PRE_LINK_STA
struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl; struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl;
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
u8 exist = _FALSE; u8 exist = false;
int i; int i;
unsigned long irqL; unsigned long irqL;
_enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL); _enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
if (pre_link_sta_ctl->node[i].valid == _TRUE if (pre_link_sta_ctl->node[i].valid == true
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, addr, ETH_ALEN) == _TRUE && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, addr, ETH_ALEN) == true
) { ) {
exist = _TRUE; exist = true;
break; break;
} }
} }
@ -1003,7 +1003,7 @@ bool rtw_is_pre_link_sta(struct sta_priv *stapriv, u8 *addr)
return exist; return exist;
#else #else
return _FALSE; return false;
#endif #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_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl;
struct pre_link_sta_node_t *node = NULL; struct pre_link_sta_node_t *node = NULL;
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
u8 exist = _FALSE; u8 exist = false;
int i; int i;
unsigned long irqL; unsigned long irqL;
if (rtw_check_invalid_mac_address(hwaddr, _FALSE) == _TRUE) if (rtw_check_invalid_mac_address(hwaddr, false) == true)
goto exit; goto exit;
_enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL); _enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
if (pre_link_sta_ctl->node[i].valid == _TRUE if (pre_link_sta_ctl->node[i].valid == true
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == _TRUE && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == true
) { ) {
node = &pre_link_sta_ctl->node[i]; node = &pre_link_sta_ctl->node[i];
exist = _TRUE; exist = true;
break; 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]; node = &pre_link_sta_ctl->node[i];
} }
if (exist == _FALSE && node) { if (exist == false && node) {
_rtw_memcpy(node->addr, hwaddr, ETH_ALEN); _rtw_memcpy(node->addr, hwaddr, ETH_ALEN);
node->valid = _TRUE; node->valid = true;
pre_link_sta_ctl->num++; pre_link_sta_ctl->num++;
} }
_exit_critical_bh(&(pre_link_sta_ctl->lock), &irqL); _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; sta->state = WIFI_FW_PRE_LINK;
odm_hook: 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: exit:
return sta; 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_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl;
struct pre_link_sta_node_t *node = NULL; struct pre_link_sta_node_t *node = NULL;
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
u8 exist = _FALSE; u8 exist = false;
int i; int i;
unsigned long irqL; unsigned long irqL;
if (rtw_check_invalid_mac_address(hwaddr, _FALSE) == _TRUE) if (rtw_check_invalid_mac_address(hwaddr, false) == true)
goto exit; goto exit;
_enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL); _enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
if (pre_link_sta_ctl->node[i].valid == _TRUE if (pre_link_sta_ctl->node[i].valid == true
&& _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == _TRUE && _rtw_memcmp(pre_link_sta_ctl->node[i].addr, hwaddr, ETH_ALEN) == true
) { ) {
node = &pre_link_sta_ctl->node[i]; node = &pre_link_sta_ctl->node[i];
exist = _TRUE; exist = true;
break; break;
} }
} }
if (exist == _TRUE && node) { if (exist == true && node) {
node->valid = _FALSE; node->valid = false;
pre_link_sta_ctl->num--; pre_link_sta_ctl->num--;
} }
_exit_critical_bh(&(pre_link_sta_ctl->lock), &irqL); _exit_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
if (exist == _FALSE) if (exist == false)
goto exit; goto exit;
sta = rtw_get_stainfo(stapriv, hwaddr); 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); _enter_critical_bh(&(pre_link_sta_ctl->lock), &irqL);
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) { 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; continue;
_rtw_memcpy(&(addrs[j][0]), pre_link_sta_ctl->node[i].addr, ETH_ALEN); _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--; pre_link_sta_ctl->num--;
j++; j++;
} }
@ -1145,7 +1145,7 @@ void rtw_pre_link_sta_ctl_init(struct sta_priv *stapriv)
spin_lock_init(&pre_link_sta_ctl->lock); spin_lock_init(&pre_link_sta_ctl->lock);
pre_link_sta_ctl->num = 0; pre_link_sta_ctl->num = 0;
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) 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) 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); 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++) { 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; continue;
RTW_PRINT_SEL(sel, MAC_FMT"\n", MAC_ARG(pre_link_sta_ctl->node[i].addr)); RTW_PRINT_SEL(sel, MAC_FMT"\n", MAC_ARG(pre_link_sta_ctl->node[i].addr));
} }

View file

@ -33,31 +33,31 @@ void rtw_reset_tdls_info(_adapter *padapter)
{ {
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; 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 */ /* For TDLS channel switch, currently we only allow it to work in wifi logo test mode */
if (padapter->registrypriv.wifi_spec == 1) if (padapter->registrypriv.wifi_spec == 1)
ptdlsinfo->ch_switch_prohibited = _FALSE; ptdlsinfo->ch_switch_prohibited = false;
else 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_cnt = 0;
ptdlsinfo->sta_maximum = _FALSE; ptdlsinfo->sta_maximum = false;
#ifdef CONFIG_TDLS_CH_SW #ifdef CONFIG_TDLS_CH_SW
ptdlsinfo->chsw_info.ch_sw_state = TDLS_STATE_NONE; 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.off_ch_num = 0;
ptdlsinfo->chsw_info.ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; ptdlsinfo->chsw_info.ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
ptdlsinfo->chsw_info.cur_time = 0; ptdlsinfo->chsw_info.cur_time = 0;
ptdlsinfo->chsw_info.delay_switch_back = _FALSE; ptdlsinfo->chsw_info.delay_switch_back = false;
ptdlsinfo->chsw_info.dump_stack = _FALSE; ptdlsinfo->chsw_info.dump_stack = false;
#endif #endif
ptdlsinfo->ch_sensing = 0; ptdlsinfo->ch_sensing = 0;
ptdlsinfo->watchdog_count = 0; ptdlsinfo->watchdog_count = 0;
ptdlsinfo->dev_discovered = _FALSE; ptdlsinfo->dev_discovered = false;
#ifdef CONFIG_WFD #ifdef CONFIG_WFD
ptdlsinfo->wfd_info = &padapter->wfd_info; ptdlsinfo->wfd_info = &padapter->wfd_info;
@ -71,11 +71,11 @@ int rtw_init_tdls_info(_adapter *padapter)
rtw_reset_tdls_info(padapter); rtw_reset_tdls_info(padapter);
ptdlsinfo->tdls_enable = _TRUE; ptdlsinfo->tdls_enable = true;
#ifdef CONFIG_TDLS_DRIVER_SETUP #ifdef CONFIG_TDLS_DRIVER_SETUP
ptdlsinfo->driver_setup = _TRUE; ptdlsinfo->driver_setup = true;
#else #else
ptdlsinfo->driver_setup = _FALSE; ptdlsinfo->driver_setup = false;
#endif /* CONFIG_TDLS_DRIVER_SETUP */ #endif /* CONFIG_TDLS_DRIVER_SETUP */
spin_lock_init(&ptdlsinfo->cmd_lock); 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 */ u8 tdls_prohibited_bit = 0x40; /* bit(38); TDLS_prohibited */
if (pkt_len < 5) if (pkt_len < 5)
return _FALSE; return false;
pframe += 4; pframe += 4;
if ((*pframe) & tdls_prohibited_bit) 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) 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 */ u8 tdls_ch_swithcing_prohibited_bit = 0x80; /* bit(39); TDLS_channel_switching prohibited */
if (pkt_len < 5) if (pkt_len < 5)
return _FALSE; return false;
pframe += 4; pframe += 4;
if ((*pframe) & tdls_ch_swithcing_prohibited_bit) if ((*pframe) & tdls_ch_swithcing_prohibited_bit)
return _TRUE; return true;
return _FALSE; return false;
} }
u8 rtw_tdls_is_setup_allowed(_adapter *padapter) u8 rtw_tdls_is_setup_allowed(_adapter *padapter)
{ {
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
if (ptdlsinfo->ap_prohibited == _TRUE) if (ptdlsinfo->ap_prohibited == true)
return _FALSE; return false;
return _TRUE; return true;
} }
#ifdef CONFIG_TDLS_CH_SW #ifdef CONFIG_TDLS_CH_SW
@ -137,13 +137,13 @@ u8 rtw_tdls_is_chsw_allowed(_adapter *padapter)
{ {
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
if (ptdlsinfo->ch_switch_prohibited == _TRUE) if (ptdlsinfo->ch_switch_prohibited == true)
return _FALSE; return false;
if (padapter->registrypriv.wifi_spec == 0) if (padapter->registrypriv.wifi_spec == 0)
return _FALSE; return false;
return _TRUE; return true;
} }
#endif #endif
@ -167,11 +167,11 @@ int _issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsi
update_mgntframe_attrib(padapter, pattrib); update_mgntframe_attrib(padapter, pattrib);
pattrib->hdrlen += 2; pattrib->hdrlen += 2;
pattrib->qos_en = _TRUE; pattrib->qos_en = true;
pattrib->eosp = 1; pattrib->eosp = 1;
pattrib->ack_policy = 0; pattrib->ack_policy = 0;
pattrib->mdata = 0; pattrib->mdata = 0;
pattrib->retry_ctrl = _FALSE; pattrib->retry_ctrl = false;
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); 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); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
do { 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++; i++;
@ -277,16 +277,16 @@ void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta)
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
/* -2: AP + BC/MC sta, -4: default key */ /* -2: AP + BC/MC sta, -4: default key */
if (ptdlsinfo->sta_cnt < MAX_ALLOWED_TDLS_STA_NUM) { 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)); memset(&ptdlsinfo->ss_record, 0x00, sizeof(struct tdls_ss_record));
} }
/* clear cam */ /* clear cam */
rtw_clearstakey_cmd(padapter, ptdls_sta, _TRUE); rtw_clearstakey_cmd(padapter, ptdls_sta, true);
if (ptdlsinfo->sta_cnt == 0) { if (ptdlsinfo->sta_cnt == 0) {
rtw_tdls_cmd(padapter, NULL, TDLS_RS_RCR); rtw_tdls_cmd(padapter, NULL, TDLS_RS_RCR);
ptdlsinfo->link_established = _FALSE; ptdlsinfo->link_established = false;
} else } else
RTW_INFO("Remain tdls sta:%02x\n", ptdlsinfo->sta_cnt); 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) void rtw_tdls_set_key(_adapter *padapter, struct sta_info *ptdls_sta)
{ {
ptdls_sta->dot118021XPrivacy = _AES_; 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) 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; ptdls_sta->flags &= ~WLAN_STA_HT;
if (ptdls_sta->flags & WLAN_STA_HT) { if (ptdls_sta->flags & WLAN_STA_HT) {
if (padapter->registrypriv.ht_enable == _TRUE) { if (padapter->registrypriv.ht_enable == true) {
ptdls_sta->htpriv.ht_option = _TRUE; ptdls_sta->htpriv.ht_option = true;
ptdls_sta->qos_option = _TRUE; ptdls_sta->qos_option = true;
} else { } else {
ptdls_sta->htpriv.ht_option = _FALSE; ptdls_sta->htpriv.ht_option = false;
ptdls_sta->qos_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) { if (ptdls_sta->htpriv.ht_option) {
/* Check if sta supports rx ampdu */ /* Check if sta supports rx ampdu */
if (padapter->registrypriv.ampdu_enable == 1) if (padapter->registrypriv.ampdu_enable == 1)
ptdls_sta->htpriv.ampdu_enable = _TRUE; ptdls_sta->htpriv.ampdu_enable = true;
/* AMPDU Parameters field */ /* AMPDU Parameters field */
/* Get MIN of MAX AMPDU Length Exp */ /* 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 */ /* Check if sta support s Short GI 20M */
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_20)) 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 */ /* Check if sta support s Short GI 40M */
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_40)) 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 */ /* Bwmode would still followed AP's setting */
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH)) { 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) if (p != NULL)
return rtw_set_ie(pframe, _RSN_IE_2_, len, p + 2, &(pattrib->pktlen)); 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)); return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(TDLS_RSNIE), TDLS_RSNIE, &(pattrib->pktlen));
else else
return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(ptdls_sta->TDLS_RSNIE), ptdls_sta->TDLS_RSNIE, &(pattrib->pktlen)); 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 { else {
/* Timeout interval */ /* Timeout interval */
timeout_itvl[0] = 0x02; timeout_itvl[0] = 0x02;
if (init == _TRUE) if (init == true)
_rtw_memcpy(timeout_itvl + 1, &timeout_interval, 4); _rtw_memcpy(timeout_itvl + 1, &timeout_interval, 4);
else else
_rtw_memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4); _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 *rtw_tdls_set_linkid(u8 *pframe, struct pkt_attrib *pattrib, u8 init)
{ {
u8 link_id_addr[18] = {0}; 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, pattrib->ra, 6);
_rtw_memcpy((link_id_addr + 6), pattrib->src, 6); _rtw_memcpy((link_id_addr + 6), pattrib->src, 6);
_rtw_memcpy((link_id_addr + 12), pattrib->dst, 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); ATOMIC_SET(&padapter->tdlsinfo.chsw_info.chsw_on, enable);
rtw_hal_set_hwreg(padapter, HW_VAR_TDLS_BCN_EARLY_C2H_RPT, &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) 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; 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))) (padapter->mlmeextpriv.cur_channel != rtw_get_oper_ch(padapter)))
rtw_tdls_cmd(padapter, pchsw_info->addr, TDLS_CH_SW_TO_BASE_CHNL_UNSOLICITED); 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); _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); 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); 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; 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) { if (&pmlmeinfo->WMM_param) {
_rtw_memcpy(wmm_param_ele, WMM_PARA_OUI, 6); _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 */ /* Use default WMM Param */
_rtw_memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE)); _rtw_memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE));
else else
@ -895,7 +895,7 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa
RTW_INFO("[TDLS] %s\n", __func__); RTW_INFO("[TDLS] %s\n", __func__);
ptxmgmt->action_code = TDLS_SETUP_REQUEST; ptxmgmt->action_code = TDLS_SETUP_REQUEST;
if (rtw_tdls_is_setup_allowed(padapter) == _FALSE) if (rtw_tdls_is_setup_allowed(padapter) == false)
goto exit; goto exit;
pmgntframe = alloc_mgtxmitframe(pxmitpriv); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
@ -929,11 +929,11 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa
ptdlsinfo->sta_cnt++; ptdlsinfo->sta_cnt++;
if (ptdlsinfo->sta_cnt == MAX_ALLOWED_TDLS_STA_NUM) 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; 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; ptdls_sta->TDLS_PeerKey_Lifetime = timeout_interval;
_set_timer(&ptdls_sta->handshake_timer, TDLS_HANDSHAKE_TIME); _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; goto exit;
rtw_mi_set_scan_deny(padapter, 550); rtw_mi_set_scan_deny(padapter, 550);
rtw_mi_scan_abort(padapter, _TRUE); rtw_mi_scan_abort(padapter, true);
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
@ -1003,7 +1003,7 @@ int _issue_tdls_teardown(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 wai
goto exit; 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 (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)
if (pattrib->encrypt) if (pattrib->encrypt)
_cancel_timer_ex(&ptdls_sta->TPK_timer); _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__); 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__); RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__);
goto exit; 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__); 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__); RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__);
goto exit; goto exit;
} }
@ -1388,9 +1388,9 @@ int issue_tdls_ch_switch_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, in
pattrib->qsel = pattrib->priority; pattrib->qsel = pattrib->priority;
/* /*
_enter_critical_bh(&pxmitpriv->lock, &irqL); _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); _exit_critical_bh(&pxmitpriv->lock, &irqL);
return _FALSE; return false;
} }
*/ */
if (rtw_xmit_tdls_coalesce(padapter, pmgntframe, ptxmgmt) != _SUCCESS) { 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)); memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt));
/* WFDTDLS: for sigma test, not to setup direct link automatically */ /* WFDTDLS: for sigma test, not to setup direct link automatically */
ptdlsinfo->dev_discovered = _TRUE; ptdlsinfo->dev_discovered = true;
psa = get_sa(ptr); psa = get_sa(ptr);
ptdls_sta = rtw_get_stainfo(&(padapter->stapriv), psa); 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 #ifdef CONFIG_TDLS_AUTOSETUP
if (ptdls_sta != NULL) { if (ptdls_sta != NULL) {
/* Record the tdls sta with lowest signal strength */ /* 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)) { if (_rtw_memcmp(ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN)) {
_rtw_memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN); _rtw_memcpy(ptdlsinfo->ss_record.macaddr, psa, ETH_ALEN);
ptdlsinfo->ss_record.RxPWDBAll = pattrib->phy_info.RxPWDBAll; 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 { } else {
if (ptdlsinfo->sta_maximum == _TRUE) { if (ptdlsinfo->sta_maximum == true) {
if (_rtw_memcmp(ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN)) { if (_rtw_memcmp(ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN)) {
/* All traffics are busy, do not set up another direct link. */ /* All traffics are busy, do not set up another direct link. */
ret = _FAIL; ret = _FAIL;
@ -1455,7 +1455,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame)
} else { } else {
if (pattrib->phy_info.RxPWDBAll > ptdlsinfo->ss_record.RxPWDBAll) { if (pattrib->phy_info.RxPWDBAll > ptdlsinfo->ss_record.RxPWDBAll) {
_rtw_memcpy(txmgmt.peer, ptdlsinfo->ss_record.macaddr, ETH_ALEN); _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 { } else {
ret = _FAIL; ret = _FAIL;
goto exit; 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) { 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_INFO("pattrib->RxPWDBAll=%d, pdmpriv->undecorated_smoothed_pwdb=%d\n", pattrib->phy_info.RxPWDBAll, undecorated_smoothed_pwdb);
_rtw_memcpy(txmgmt.peer, psa, ETH_ALEN); _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 */ #endif /* CONFIG_TDLS_AUTOSETUP */
@ -1502,7 +1502,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame)
int supportRateNum = 0; int supportRateNum = 0;
struct tdls_txmgmt txmgmt; struct tdls_txmgmt txmgmt;
if (rtw_tdls_is_setup_allowed(padapter) == _FALSE) if (rtw_tdls_is_setup_allowed(padapter) == false)
goto exit; goto exit;
memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); 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); _rtw_memcpy(ptdls_sta->TDLS_RSNIE, pIE->data, pIE->Length);
pairwise_count = *(u16 *)(ppairwise_cipher - 2); pairwise_count = *(u16 *)(ppairwise_cipher - 2);
for (k = 0; k < pairwise_count; k++) { 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; ccmp_included = 1;
} }
@ -1609,7 +1609,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame)
case EID_BSSCoexistence: case EID_BSSCoexistence:
break; break;
case _LINK_ID_IE_: 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_; txmgmt.status_code = _STATS_NOT_IN_SAME_BSS_;
break; break;
default: default:
@ -1654,7 +1654,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame)
ptdlsinfo->sta_cnt++; ptdlsinfo->sta_cnt++;
/* -2: AP + BC/MC sta, -4: default key */ /* -2: AP + BC/MC sta, -4: default key */
if (ptdlsinfo->sta_cnt == MAX_ALLOWED_TDLS_STA_NUM) if (ptdlsinfo->sta_cnt == MAX_ALLOWED_TDLS_STA_NUM)
ptdlsinfo->sta_maximum = _TRUE; ptdlsinfo->sta_maximum = true;
#ifdef CONFIG_WFD #ifdef CONFIG_WFD
rtw_tdls_process_wfd_ie(ptdlsinfo, ptr + FIXED_IE, parsing_length); 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; ppairwise_cipher = prsnie + 10;
_rtw_memcpy(&pairwise_count, (u16 *)(ppairwise_cipher - 2), 2); _rtw_memcpy(&pairwise_count, (u16 *)(ppairwise_cipher - 2), 2);
for (k = 0; k < pairwise_count; k++) { 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; verify_ccmp = 1;
} }
case _EXT_CAP_IE_: case _EXT_CAP_IE_:
break; break;
case _VENDOR_SPECIFIC_IE_: 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 */ /* WMM Info ID and OUI */
if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE)) if ((pregistrypriv->wmm_enable == true) || (padapter->mlmepriv.htpriv.ht_option == true))
ptdls_sta->qos_option = _TRUE; ptdls_sta->qos_option = true;
} }
break; break;
case _FTIE_: case _FTIE_:
@ -1811,7 +1811,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame)
if (prx_pkt_attrib->encrypt) { if (prx_pkt_attrib->encrypt) {
if (verify_ccmp == 1) { if (verify_ccmp == 1) {
txmgmt.status_code = _STATS_SUCCESSFUL_; 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); wpa_tdls_generate_tpk(padapter, ptdls_sta);
if (tdls_verify_mic(ptdls_sta->tpk.kck, 2, plinkid_ie, prsnie, ptimeout_ie, pftie) == _FAIL) { 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__); 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_; 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); _rtw_memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN);
issue_tdls_setup_cfm(padapter, &txmgmt); issue_tdls_setup_cfm(padapter, &txmgmt);
if (txmgmt.status_code == _STATS_SUCCESSFUL_) { if (txmgmt.status_code == _STATS_SUCCESSFUL_) {
ptdlsinfo->link_established = _TRUE; ptdlsinfo->link_established = true;
if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) { if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) {
ptdls_sta->tdls_sta_state |= TDLS_LINKED_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: exit:
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) if (rtw_tdls_is_driver_setup(padapter) == true)
return ret; return ret;
else else
return _SUCCESS; return _SUCCESS;
@ -1912,9 +1912,9 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame)
prsnie = (u8 *)pIE; prsnie = (u8 *)pIE;
break; break;
case _VENDOR_SPECIFIC_IE_: 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 */ /* WMM Parameter ID and OUI */
ptdls_sta->qos_option = _TRUE; ptdls_sta->qos_option = true;
} }
break; break;
case _FTIE_: 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)) { if (rtw_tdls_is_driver_setup(padapter)) {
ptdlsinfo->link_established = _TRUE; ptdlsinfo->link_established = true;
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) { if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) {
ptdls_sta->tdls_sta_state |= TDLS_LINKED_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; struct tdls_txmgmt txmgmt;
int ret = _SUCCESS; int ret = _SUCCESS;
if (rtw_tdls_is_driver_setup(padapter) == _FALSE) if (rtw_tdls_is_driver_setup(padapter) == false)
goto exit; goto exit;
memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); 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) if (psta_ap == NULL)
goto exit; goto exit;
dst = pIE->data + 12; 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; goto exit;
break; break;
default: default:
@ -2112,7 +2112,7 @@ int On_TDLS_Peer_Traffic_Rsp(_adapter *padapter, union recv_frame *precv_frame)
xmitframe_plist = get_next(xmitframe_phead); xmitframe_plist = get_next(xmitframe_phead);
/* transmit buffered frames */ /* 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);
rtw_list_delete(&pxmitframe->list); 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; u16 switch_time = TDLS_CH_SWITCH_TIME * 1000, switch_timeout = TDLS_CH_SWITCH_TIMEOUT * 1000;
u8 take_care_iqk; 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__); RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__);
return _FAIL; 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; pchsw_info->off_ch_num = 44;
if (pchsw_info->off_ch_num != pmlmeext->cur_channel) if (pchsw_info->off_ch_num != pmlmeext->cur_channel)
pchsw_info->delay_switch_back = _FALSE; pchsw_info->delay_switch_back = false;
/* Parsing information element */ /* Parsing information element */
for (j = FIXED_IE; j < parsing_length;) { 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); 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 central_chnl;
u8 bw_mode; u8 bw_mode;
@ -2260,10 +2260,10 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame)
txmgmt.status_code = 0; txmgmt.status_code = 0;
_rtw_memcpy(txmgmt.peer, psa, ETH_ALEN); _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); _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_START);
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_RESP); 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; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
int ret = _SUCCESS; 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__); RTW_INFO("[TDLS] Ignore %s since channel switch is not allowed\n", __func__);
return _SUCCESS; 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, */ /* 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 */ /* 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)) { if (pmlmeext->cur_channel != rtw_get_oper_ch(padapter)) {
RTW_INFO("[TDLS] Rx unsolicited channel switch response\n"); RTW_INFO("[TDLS] Rx unsolicited channel switch response\n");
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_TO_BASE_CHNL); 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)) && if ((pmlmeext->cur_channel == rtw_get_oper_ch(padapter)) &&
(pchsw_info->ch_sw_state & TDLS_WAIT_CH_RSP_STATE)) { (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); 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: */ /* Value: */
/* Associated BSSID */ /* 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); _rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
else else
memset(wfdie + wfdielen, 0x00, ETH_ALEN); 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); pframe = rtw_tdls_set_sup_reg_class(pframe, pattrib);
if (pattrib->encrypt) 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); 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 , NULL
, ptdls_sta->SNonce); , 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) */ /* 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_ht_cap(padapter, pframe_head, pattrib);
pframe = rtw_tdls_set_bss_coexist(padapter, pframe, 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); pframe = rtw_tdls_set_qos_cap(pframe, pattrib);
#ifdef CONFIG_WFD #ifdef CONFIG_WFD
@ -2561,13 +2561,13 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr
if (pattrib->encrypt) { if (pattrib->encrypt) {
prsnie = pframe; 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); pframe = rtw_tdls_set_ext_cap(pframe, pattrib);
if (pattrib->encrypt) { 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); wpa_tdls_generate_tpk(padapter, ptdls_sta);
pftie = pframe; pftie = pframe;
@ -2579,23 +2579,23 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr
, ptdls_sta->SNonce); , ptdls_sta->SNonce);
ptimeout_ie = pframe; 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) */ /* 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_ht_cap(padapter, pframe_head, pattrib);
pframe = rtw_tdls_set_bss_coexist(padapter, pframe, pattrib); pframe = rtw_tdls_set_bss_coexist(padapter, pframe, pattrib);
plinkid_ie = pframe; plinkid_ie = pframe;
pframe = rtw_tdls_set_linkid(pframe, pattrib, _FALSE); pframe = rtw_tdls_set_linkid(pframe, pattrib, false);
/* Fill FTIE mic */ /* 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); 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); pframe = rtw_tdls_set_qos_cap(pframe, pattrib);
#ifdef CONFIG_WFD #ifdef CONFIG_WFD
@ -2629,7 +2629,7 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr
if (pattrib->encrypt) { if (pattrib->encrypt) {
prsnie = pframe; 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) { if (pattrib->encrypt) {
@ -2642,9 +2642,9 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr
, ptdls_sta->SNonce); , ptdls_sta->SNonce);
ptimeout_ie = pframe; 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 */ /* Start TPK timer */
ptdls_sta->TPK_count = 0; ptdls_sta->TPK_count = 0;
_set_timer(&ptdls_sta->TPK_timer, ONE_SEC); _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 */ /* HT operation; todo */
plinkid_ie = pframe; 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); 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); 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; plinkid_ie = pframe;
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) 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) 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); 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_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS);
pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt);
pframe = rtw_tdls_set_dialog(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); pframe = rtw_tdls_set_sup_ch(pmlmeext, pframe, pattrib);
if (privacy) 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); pframe = rtw_tdls_set_ext_cap(pframe, pattrib);
if (privacy) { if (privacy) {
pframe = rtw_tdls_set_ftie(ptxmgmt, pframe, pattrib, NULL, NULL); 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_ht_cap(padapter, pframe_head - pktlen_index, pattrib);
pframe = rtw_tdls_set_bss_coexist(padapter, pframe, 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) 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); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt);
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) 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) 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 */ /* PTI control */
/* PU buffer status */ /* 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); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt);
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) 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) 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 #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) 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) 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); 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); pframe = rtw_tdls_set_status_code(pframe, pattrib, ptxmgmt);
if (ptdls_sta->tdls_sta_state & TDLS_INITIATOR_STATE) 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) 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); 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)); 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; ptdls_sta->TPK_count = 0;
_rtw_memcpy(txmgmt.peer, ptdls_sta->hwaddr, ETH_ALEN); _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); _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; 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); 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) 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) { if (ptdls_sta->tdls_sta_state & TDLS_WAIT_PTR_STATE) {
RTW_INFO("[TDLS] Doesn't receive PTR from peer dev:"MAC_FMT"; " RTW_INFO("[TDLS] Doesn't receive PTR from peer dev:"MAC_FMT"; "
"Send TDLS Tear Down\n", MAC_ARG(ptdls_sta->hwaddr)); "Send TDLS Tear Down\n", MAC_ARG(ptdls_sta->hwaddr));
issue_tdls_teardown(padapter, &txmgmt, _FALSE); issue_tdls_teardown(padapter, &txmgmt, false);
} }
} }
} }

View file

@ -81,10 +81,10 @@ int cckrates_included(unsigned char *rate, int ratelen)
for (i = 0; i < ratelen; i++) { for (i = 0; i < ratelen; i++) {
if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) || if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22)) (((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++) { for (i = 0; i < ratelen; i++) {
if ((((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) && if ((((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) &&
(((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22)) (((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22))
return _FALSE; return false;
} }
return _TRUE; return true;
} }
#ifdef CONFIG_GET_RAID_BY_DRV #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) if (pmlmeinfo->HT_enable)
network_type = WIRELESS_11_24N; network_type = WIRELESS_11_24N;
if ((cckratesonly_included(rate, ratelen)) == _TRUE) if ((cckratesonly_included(rate, ratelen)) == true)
network_type |= WIRELESS_11B; network_type |= WIRELESS_11B;
else if ((cckrates_included(rate, ratelen)) == _TRUE) else if ((cckrates_included(rate, ratelen)) == true)
network_type |= WIRELESS_11BG; network_type |= WIRELESS_11BG;
else else
network_type |= WIRELESS_11G; network_type |= WIRELESS_11G;
@ -324,11 +324,11 @@ int is_basicrate(_adapter *padapter, unsigned char rate)
if ((val != 0xff) && (val != 0xfe)) { if ((val != 0xff) && (val != 0xfe)) {
if (rate == ratetbl_val_2wifirate(val)) if (rate == ratetbl_val_2wifirate(val))
return _TRUE; return true;
} }
} }
return _FALSE; return false;
} }
unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset); unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset);
@ -355,7 +355,7 @@ unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset)
default: default:
rate = ratetbl_val_2wifirate(rate); rate = ratetbl_val_2wifirate(rate);
if (is_basicrate(padapter, rate) == _TRUE) if (is_basicrate(padapter, rate) == true)
rate |= IEEE80211_BASIC_RATE_MASK; rate |= IEEE80211_BASIC_RATE_MASK;
rateset[len] = rate; 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; u8 center_ch, chnl_offset80 = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
#if (defined(CONFIG_TDLS) && defined(CONFIG_TDLS_CH_SW)) || defined(CONFIG_MCC_MODE) #if (defined(CONFIG_TDLS) && defined(CONFIG_TDLS_CH_SW)) || defined(CONFIG_MCC_MODE)
u8 iqk_info_backup = _FALSE; u8 iqk_info_backup = false;
#endif #endif
if (padapter->bNotifyChannelChange) 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_CH_SW_NEED_TO_TAKE_CARE_IQK_INFO, &take_care_iqk);
rtw_hal_get_hwreg(padapter, HW_VAR_DO_IQK, &do_iqk); rtw_hal_get_hwreg(padapter, HW_VAR_DO_IQK, &do_iqk);
if ((take_care_iqk == _TRUE) && (do_iqk == _TRUE)) if ((take_care_iqk == true) && (do_iqk == true))
iqk_info_backup = _TRUE; iqk_info_backup = true;
} }
#endif #endif
rtw_hal_set_chnl_bw(padapter, center_ch, bwmode, channel_offset, chnl_offset80); /* set center channel */ 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 (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); rtw_hal_ch_sw_iqk_info_backup(padapter);
#endif #endif
@ -787,7 +787,7 @@ int is_client_associated_to_ap(_adapter *padapter)
pmlmeinfo = &(pmlmeext->mlmext_info); pmlmeinfo = &(pmlmeext->mlmext_info);
if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)) if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE))
return _TRUE; return true;
else else
return _FAIL; return _FAIL;
} }
@ -798,7 +798,7 @@ int is_client_associated_to_ibss(_adapter *padapter)
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE)) if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE))
return _TRUE; return true;
else else
return _FAIL; return _FAIL;
} }
@ -819,7 +819,7 @@ int is_IBSS_empty(_adapter *padapter)
return _FAIL; return _FAIL;
} }
return _TRUE; return true;
} }
unsigned int decide_wait_for_beacon_timeout(unsigned int bcn_interval) 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; struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
if (cam_ctl->sec_cap & cap) if (cam_ctl->sec_cap & cap)
return _TRUE; return true;
return _FALSE; return false;
} }
inline void _rtw_camctl_set_flags(_adapter *adapter, u32 flags) 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; struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
if (cam_ctl->flags & flags) if (cam_ctl->flags & flags)
return _TRUE; return true;
return _FALSE; return false;
} }
void dump_sec_cam_map(void *sel, struct sec_cam_bmp *map, u8 max_num) 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) 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) { if (id >= cam_ctl->num) {
rtw_warn_on(1); 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 dvobj_priv *dvobj = adapter_to_dvobj(adapter);
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl; struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
bool ret = _FALSE; bool ret = false;
if (cam_id >= cam_ctl->num) { if (cam_id >= cam_ctl->num) {
rtw_warn_on(1); rtw_warn_on(1);
goto exit; 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; goto exit;
ret = (dvobj->cam_cache[cam_id].ctrl & BIT6) ? _TRUE : _FALSE; ret = (dvobj->cam_cache[cam_id].ctrl & BIT6) ? true : false;
exit: exit:
return ret; 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) static bool cam_cache_chk(_adapter *adapter, u8 id, u8 *addr, s16 kid, s8 gk)
{ {
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); 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; goto exit;
if (kid >= 0 && kid != (dvobj->cam_cache[id].ctrl & 0x03)) if (kid >= 0 && kid != (dvobj->cam_cache[id].ctrl & 0x03))
goto exit; 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; goto exit;
ret = _TRUE; ret = true;
exit: exit:
return ret; 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) */ /* find cam entry which has the same addr, kid (, gk bit) */
if (_rtw_camctl_chk_cap(adapter, SEC_CAP_CHK_BMC) == _TRUE) if (_rtw_camctl_chk_cap(adapter, SEC_CAP_CHK_BMC) == true)
i = _rtw_camid_search(adapter, addr, kid, sta ? _FALSE : _TRUE); i = _rtw_camid_search(adapter, addr, kid, sta ? false : true);
else else
i = _rtw_camid_search(adapter, addr, kid, -1); 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) if (((i + start_id) % cam_ctl->num) < 4)
continue; continue;
#endif #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; break;
} }
@ -1307,7 +1307,7 @@ s16 rtw_camid_alloc(_adapter *adapter, struct sta_info *sta, u8 kid, bool *used)
unsigned long irqL; unsigned long irqL;
s16 cam_id = -1; s16 cam_id = -1;
*used = _FALSE; *used = false;
_enter_critical_bh(&cam_ctl->lock, &irqL); _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); _enter_critical_bh(&cam_ctl->lock, &irqL);
for (i = start_camid; i < cam_ctl->num; i++) { 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; cam_id = i;
break; break;
} }
@ -1498,9 +1498,9 @@ void flush_all_cam_entry(_adapter *padapter)
if (psta->state & WIFI_AP_STATE) { if (psta->state & WIFI_AP_STATE) {
/*clear cam when ap free per sta_info*/ /*clear cam when ap free per sta_info*/
} else } 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; int cam_id = -1;
u8 *addr = adapter_mac_addr(padapter); u8 *addr = adapter_mac_addr(padapter);
@ -1514,7 +1514,7 @@ void flush_all_cam_entry(_adapter *padapter)
invalidate_cam_all(padapter); invalidate_cam_all(padapter);
/* clear default key related key search setting */ /* 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 #endif
} }
@ -1562,15 +1562,15 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
if (pmlmepriv->qospriv.qos_option == 0) { if (pmlmepriv->qospriv.qos_option == 0) {
pmlmeinfo->WMM_enable = 0; pmlmeinfo->WMM_enable = 0;
return _FALSE; return false;
} }
if (_rtw_memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element))) if (_rtw_memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)))
return _FALSE; return false;
else else
_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)); _rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
pmlmeinfo->WMM_enable = 1; pmlmeinfo->WMM_enable = 1;
return _TRUE; return true;
} }
void WMMOnAssocRsp(_adapter *padapter) void WMMOnAssocRsp(_adapter *padapter)
@ -1676,18 +1676,18 @@ void WMMOnAssocRsp(_adapter *padapter)
inx[3] = 3; inx[3] = 3;
if (pregpriv->wifi_spec == 1) { 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. */ /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
for (j = i + 1; j < 4; j++) { for (j = i + 1; j < 4; j++) {
/* compare CW and AIFS */ /* compare CW and AIFS */
if ((edca[j] & 0xFFFF) < (edca[i] & 0xFFFF)) if ((edca[j] & 0xFFFF) < (edca[i] & 0xFFFF))
change_inx = _TRUE; change_inx = true;
else if ((edca[j] & 0xFFFF) == (edca[i] & 0xFFFF)) { else if ((edca[j] & 0xFFFF) == (edca[i] & 0xFFFF)) {
/* compare TXOP */ /* compare TXOP */
if ((edca[j] >> 16) > (edca[i] >> 16)) if ((edca[j] >> 16) > (edca[i] >> 16))
change_inx = _TRUE; change_inx = true;
} }
if (change_inx) { if (change_inx) {
@ -1699,7 +1699,7 @@ void WMMOnAssocRsp(_adapter *padapter)
inx[i] = inx[j]; inx[i] = inx[j];
inx[j] = tmp; 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) if (!pIE)
return; return;
if (phtpriv->ht_option == _FALSE) if (phtpriv->ht_option == false)
return; return;
if (pmlmeext->cur_bwmode >= CHANNEL_WIDTH_80) 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) if ((new_bwmode != pmlmeext->cur_bwmode || new_ch_offset != pmlmeext->cur_ch_offset)
&& new_bwmode < pmlmeext->cur_bwmode && new_bwmode < pmlmeext->cur_bwmode
) { ) {
pmlmeinfo->bwmode_updated = _TRUE; pmlmeinfo->bwmode_updated = true;
pmlmeext->cur_bwmode = new_bwmode; pmlmeext->cur_bwmode = new_bwmode;
pmlmeext->cur_ch_offset = new_ch_offset; 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 */ /* update HT info also */
HT_info_handler(padapter, pIE); HT_info_handler(padapter, pIE);
} else } else
pmlmeinfo->bwmode_updated = _FALSE; pmlmeinfo->bwmode_updated = false;
if (_TRUE == pmlmeinfo->bwmode_updated) { if (true == pmlmeinfo->bwmode_updated) {
struct sta_info *psta; struct sta_info *psta;
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network);
struct sta_priv *pstapriv = &padapter->stapriv; 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); 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) if (pIE == NULL)
return; return;
if (phtpriv->ht_option == _FALSE) if (phtpriv->ht_option == false)
return; return;
pmlmeinfo->HT_caps_enable = 1; pmlmeinfo->HT_caps_enable = 1;
@ -1990,7 +1990,7 @@ void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
if (pIE == NULL) if (pIE == NULL)
return; return;
if (phtpriv->ht_option == _FALSE) if (phtpriv->ht_option == false)
return; return;
@ -2118,18 +2118,18 @@ static int check_ielen(u8 *start, uint len)
if (elen > left) { if (elen > left) {
RTW_INFO("IEEE 802.11 element parse failed (id=%d elen=%d left=%lu)\n", RTW_INFO("IEEE 802.11 element parse failed (id=%d elen=%d left=%lu)\n",
id, elen, (unsigned long) left); id, elen, (unsigned long) left);
return _FALSE; return false;
} }
if ((id == WLAN_EID_VENDOR_SPECIFIC) && (elen < 4)) if ((id == WLAN_EID_VENDOR_SPECIFIC) && (elen < 4))
return _FALSE; return false;
left -= elen; left -= elen;
pos += elen; pos += elen;
} }
if (left) if (left)
return _FALSE; return false;
return _TRUE; return true;
} }
int validate_beacon_len(u8 *pframe, u32 len) int validate_beacon_len(u8 *pframe, u32 len)
@ -2138,13 +2138,13 @@ int validate_beacon_len(u8 *pframe, u32 len)
if (len < ie_offset) { if (len < ie_offset) {
RTW_INFO("%s: incorrect beacon length(%d)\n", __func__, len); RTW_INFO("%s: incorrect beacon length(%d)\n", __func__, len);
return _FALSE; return false;
} }
if (check_ielen(pframe + ie_offset, len - ie_offset) == _FALSE) if (check_ielen(pframe + ie_offset, len - ie_offset) == false)
return _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_; left = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_;
pos = pframe + 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) if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed)
return _FALSE; return false;
/* check bw and channel offset */ /* check bw and channel offset */
if (elems.ht_capabilities) { if (elems.ht_capabilities) {
if (elems.ht_capabilities_len != sizeof(*pht_cap)) if (elems.ht_capabilities_len != sizeof(*pht_cap))
return _FALSE; return false;
pht_cap = (struct rtw_ieee80211_ht_cap *) elems.ht_capabilities; pht_cap = (struct rtw_ieee80211_ht_cap *) elems.ht_capabilities;
recv_beacon->ht_cap_info = le16_to_cpu(pht_cap->cap_info); 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) {
if (elems.ht_operation_len != sizeof(*pht_info)) if (elems.ht_operation_len != sizeof(*pht_info))
return _FALSE; return false;
pht_info = (struct HT_info_element *) elems.ht_operation; pht_info = (struct HT_info_element *) elems.ht_operation;
recv_beacon->ht_info_infos_0_sco = pht_info->infos[0] & 0x03; 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 */ /* checking SSID */
if (elems.ssid) { if (elems.ssid) {
if (elems.ssid_len > sizeof(recv_beacon->ssid)) if (elems.ssid_len > sizeof(recv_beacon->ssid))
return _FALSE; return false;
_rtw_memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len); _rtw_memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len);
recv_beacon->ssid_len = 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)) } else if (capability & BIT(4))
recv_beacon->encryp_protocol = ENCRYP_PROTOCOL_WEP; recv_beacon->encryp_protocol = ENCRYP_PROTOCOL_WEP;
return _TRUE; return true;
} }
void rtw_dump_bcn_keys(struct beacon_keys *recv_beacon) 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 wlan_network *cur_network = &(Adapter->mlmepriv.cur_network);
struct beacon_keys recv_beacon; struct beacon_keys recv_beacon;
if (is_client_associated_to_ap(Adapter) == _FALSE) if (is_client_associated_to_ap(Adapter) == false)
return _TRUE; return true;
len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr); 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; 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, 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)); 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) if (rtw_get_bcn_keys(Adapter, pframe, packet_len, &recv_beacon) == false)
return _TRUE; /* parsing failed => broken IE */ return true; /* parsing failed => broken IE */
/* don't care hidden ssid, use current beacon ssid directly */ /* don't care hidden ssid, use current beacon ssid directly */
if (recv_beacon.ssid_len == 0) { 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; 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; pmlmepriv->new_beacon_cnts = 0;
else if ((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)); RTW_DBG("%s: start new beacon (seq=%d)\n", __func__, GetSequence(pframe));
if (pmlmepriv->new_beacon_cnts == 0) { 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_cap_info = recv_beacon.ht_cap_info;
pmlmepriv->cur_beacon_keys.ht_info_infos_0_sco = recv_beacon.ht_info_infos_0_sco; 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, 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 */ /* beacon is changed, have to do disconnect/connect */
RTW_WARN("%s: new beacon occur!!\n", __func__); RTW_WARN("%s: new beacon occur!!\n", __func__);
return _FAIL; return _FAIL;
@ -2376,10 +2376,10 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
case _EXT_CAP_IE_: case _EXT_CAP_IE_:
if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == _TRUE) if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == true)
ptdlsinfo->ap_prohibited = _TRUE; ptdlsinfo->ap_prohibited = true;
if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == _TRUE) if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == true)
ptdlsinfo->ch_switch_prohibited = _TRUE; ptdlsinfo->ch_switch_prohibited = true;
break; break;
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
default: default:
@ -2398,7 +2398,7 @@ void process_csa_ie(_adapter *padapter, u8 *pframe, uint pkt_len)
PNDIS_802_11_VARIABLE_IEs pIE; PNDIS_802_11_VARIABLE_IEs pIE;
u8 new_ch_no = 0; u8 new_ch_no = 0;
if (padapter->mlmepriv.handle_dfs == _TRUE) if (padapter->mlmepriv.handle_dfs == true)
return; return;
len = pkt_len - (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN); 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) { switch (pIE->ElementID) {
case _CH_SWTICH_ANNOUNCE_: case _CH_SWTICH_ANNOUNCE_:
padapter->mlmepriv.handle_dfs = _TRUE; padapter->mlmepriv.handle_dfs = true;
_rtw_memcpy(&new_ch_no, pIE->data + 1, 1); _rtw_memcpy(&new_ch_no, pIE->data + 1, 1);
rtw_set_csa_cmd(padapter, new_ch_no); rtw_set_csa_cmd(padapter, new_ch_no);
break; break;
@ -2436,12 +2436,12 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
switch (pIE->ElementID) { switch (pIE->ElementID) {
case _VENDOR_SPECIFIC_IE_: case _VENDOR_SPECIFIC_IE_:
if ((_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4)) && (_rtw_memcmp((pIE->data + 12), WPA_TKIP_CIPHER, 4))) if ((_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4)) && (_rtw_memcmp((pIE->data + 12), WPA_TKIP_CIPHER, 4)))
return _TRUE; return true;
break; break;
case _RSN_IE_2_: case _RSN_IE_2_:
if (_rtw_memcmp((pIE->data + 8), RSN_TKIP_CIPHER, 4)) if (_rtw_memcmp((pIE->data + 8), RSN_TKIP_CIPHER, 4))
return _TRUE; return true;
default: default:
break; break;
@ -2450,9 +2450,9 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
i += (pIE->Length + 2); i += (pIE->Length + 2);
} }
return _FALSE; return false;
} else } 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) && if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4) &&
((_rtw_memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP, 4)) || ((_rtw_memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP, 4)) ||
(_rtw_memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP, 4)))) (_rtw_memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP, 4))))
return _FALSE; return false;
break; break;
case _RSN_IE_2_: case _RSN_IE_2_:
if ((_rtw_memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4)) || if ((_rtw_memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4)) ||
(_rtw_memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4))) (_rtw_memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4)))
return _FALSE; return false;
default: default:
break; break;
@ -2487,9 +2487,9 @@ unsigned int should_forbid_n_rate(_adapter *padapter)
i += (pIE->Length + 2); i += (pIE->Length + 2);
} }
return _TRUE; return true;
} else } else
return _FALSE; return false;
} }
@ -2509,11 +2509,11 @@ unsigned int is_ap_in_wep(_adapter *padapter)
switch (pIE->ElementID) { switch (pIE->ElementID) {
case _VENDOR_SPECIFIC_IE_: case _VENDOR_SPECIFIC_IE_:
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4)) if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4))
return _FALSE; return false;
break; break;
case _RSN_IE_2_: case _RSN_IE_2_:
return _FALSE; return false;
default: default:
break; break;
@ -2522,9 +2522,9 @@ unsigned int is_ap_in_wep(_adapter *padapter)
i += (pIE->Length + 2); i += (pIE->Length + 2);
} }
return _TRUE; return true;
} else } 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) 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) void set_sta_rate(_adapter *padapter, struct sta_info *psta)
{ {
/* rate adaptive */ /* 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 */ /* Update RRSR and Rate for USERATE */
@ -2784,14 +2784,14 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap)
if (updateCap & cShortPreamble) { if (updateCap & cShortPreamble) {
/* Short Preamble */ /* Short Preamble */
if (pmlmeinfo->preamble_mode != PREAMBLE_SHORT) { /* PREAMBLE_LONG or PREAMBLE_AUTO */ if (pmlmeinfo->preamble_mode != PREAMBLE_SHORT) { /* PREAMBLE_LONG or PREAMBLE_AUTO */
ShortPreamble = _TRUE; ShortPreamble = true;
pmlmeinfo->preamble_mode = PREAMBLE_SHORT; pmlmeinfo->preamble_mode = PREAMBLE_SHORT;
rtw_hal_set_hwreg(Adapter, HW_VAR_ACK_PREAMBLE, (u8 *)&ShortPreamble); rtw_hal_set_hwreg(Adapter, HW_VAR_ACK_PREAMBLE, (u8 *)&ShortPreamble);
} }
} else { } else {
/* Long Preamble */ /* Long Preamble */
if (pmlmeinfo->preamble_mode != PREAMBLE_LONG) { /* PREAMBLE_SHORT or PREAMBLE_AUTO */ if (pmlmeinfo->preamble_mode != PREAMBLE_LONG) { /* PREAMBLE_SHORT or PREAMBLE_AUTO */
ShortPreamble = _FALSE; ShortPreamble = false;
pmlmeinfo->preamble_mode = PREAMBLE_LONG; pmlmeinfo->preamble_mode = PREAMBLE_LONG;
rtw_hal_set_hwreg(Adapter, HW_VAR_ACK_PREAMBLE, (u8 *)&ShortPreamble); 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) else if (pmlmeinfo->HT_enable)
network_type = WIRELESS_11_24N; network_type = WIRELESS_11_24N;
if ((cckratesonly_included(rate, ratelen)) == _TRUE) if ((cckratesonly_included(rate, ratelen)) == true)
network_type |= WIRELESS_11B; network_type |= WIRELESS_11B;
else if ((cckrates_included(rate, ratelen)) == _TRUE) else if ((cckrates_included(rate, ratelen)) == true)
network_type |= WIRELESS_11BG; network_type |= WIRELESS_11BG;
else else
network_type |= WIRELESS_11G; 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; unsigned int ie_len;
if (!rate_set || !rate_num) if (!rate_set || !rate_num)
return _FALSE; return false;
*rate_num = 0; *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 ADDBA_request *preq = (struct ADDBA_request *)paddba_req;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 size, accept = _FALSE; u8 size, accept = false;
psta = rtw_get_stainfo(pstapriv, addr); psta = rtw_get_stainfo(pstapriv, addr);
if (!psta) if (!psta)
@ -2966,7 +2966,7 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
accept = rtw_rx_ampdu_is_accept(padapter); accept = rtw_rx_ampdu_is_accept(padapter);
size = rtw_rx_ampdu_size(padapter); size = rtw_rx_ampdu_size(padapter);
if (accept == _TRUE) if (accept == true)
rtw_addbarsp_cmd(padapter, addr, tid, 0, size, start_seq); rtw_addbarsp_cmd(padapter, addr, tid, 0, size, start_seq);
else else
rtw_addbarsp_cmd(padapter, addr, tid, 37, size, start_seq); /* reject ADDBA Req */ 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 */ /* 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 ratio_20_delay, ratio_80_delay;
u8 DrvBcnEarly, DrvBcnTimeOut; 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; struct macid_bmp *used_map = &macid_ctl->used;
/* static u8 last_id = 0; for testing */ /* static u8 last_id = 0; for testing */
u8 last_id = 0; 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)) { if (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), ETH_ALEN)) {
psta->mac_id = macid_ctl->num; 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)) { 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*/ 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}; u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj); 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)) if (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), ETH_ALEN))
return; return;
if (_rtw_memcmp(psta->hwaddr, bc_addr, ETH_ALEN)) if (_rtw_memcmp(psta->hwaddr, bc_addr, ETH_ALEN))
is_bc_sta = _TRUE; is_bc_sta = true;
#ifdef CONFIG_SHARED_BMC_MACID #ifdef CONFIG_SHARED_BMC_MACID
if (is_bc_sta if (is_bc_sta
@ -3546,7 +3546,7 @@ _adapter *dvobj_get_adapter_by_addr(struct dvobj_priv *dvobj, u8 *addr)
int i; int i;
for (i = 0; i < dvobj->iface_nums; 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; break;
} }
@ -3636,21 +3636,21 @@ bool rtw_wowlan_parser_pattern_cmd(u8 *input, char *pattern,
(*pattern_len) = pos; (*pattern_len) = pos;
return _TRUE; return true;
error: error:
return _FALSE; return false;
} }
bool rtw_check_pattern_valid(u8 *input, u8 len) bool rtw_check_pattern_valid(u8 *input, u8 len)
{ {
int i = 0; int i = 0;
bool res = _FALSE; bool res = false;
if (len != 2) if (len != 2)
goto exit; goto exit;
for (i = 0 ; i < len ; i++) for (i = 0 ; i < len ; i++)
if (IsHexDigit(input[i]) == _FALSE) if (IsHexDigit(input[i]) == false)
goto exit; goto exit;
res = _SUCCESS; res = _SUCCESS;
@ -3687,7 +3687,7 @@ u8 rtw_set_default_pattern(_adapter *adapter)
u8 tcp_protocol[1] = {0x06}; u8 tcp_protocol[1] = {0x06};
u8 udp_protocol[1] = {0x11}; u8 udp_protocol[1] = {0x11};
if (pregistrypriv->default_patterns_en == _FALSE) if (pregistrypriv->default_patterns_en == false)
return 0; return 0;
for (index = 0 ; index < DEFAULT_PATTERN_NUM ; index++) { 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; goto failing;
} }
pwrctl->wowlan_in_resume = _FALSE; pwrctl->wowlan_in_resume = false;
pwrctl->pno_inited = _TRUE; pwrctl->pno_inited = true;
/* NLO Info */ /* NLO Info */
ret = rtw_dev_nlo_info_set(pwrctl->pnlo_info, ssid, num, ret = rtw_dev_nlo_info_set(pwrctl->pnlo_info, ssid, num,
pno_time, pno_repeat, pno_freq_expo_max); pno_time, pno_repeat, pno_freq_expo_max);

View file

@ -151,10 +151,10 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
pxmitbuf->buf_tag = XMITBUF_DATA; pxmitbuf->buf_tag = XMITBUF_DATA;
/* Tx buf allocation may fail sometimes, so sleep and retry. */ /* 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) { if (res == _FAIL) {
rtw_msleep_os(10); 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) if (res == _FAIL)
goto exit; goto exit;
} }
@ -224,7 +224,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
pxmitbuf->padapter = padapter; pxmitbuf->padapter = padapter;
pxmitbuf->buf_tag = XMITBUF_MGNT; 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) { if (res == _FAIL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -249,7 +249,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
pxmitbuf->padapter = padapter; pxmitbuf->padapter = padapter;
pxmitbuf->buf_tag = XMITBUF_CMD; 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) { if (res == _FAIL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -275,7 +275,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
pxmitpriv->voq_cnt = 0; pxmitpriv->voq_cnt = 0;
#ifdef CONFIG_XMIT_ACK #ifdef CONFIG_XMIT_ACK
pxmitpriv->ack_tx = _FALSE; pxmitpriv->ack_tx = false;
_rtw_mutex_init(&pxmitpriv->ack_tx_mutex); _rtw_mutex_init(&pxmitpriv->ack_tx_mutex);
rtw_sctx_init(&pxmitpriv->ack_tx_ops, 0); rtw_sctx_init(&pxmitpriv->ack_tx_ops, 0);
#endif #endif
@ -351,7 +351,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
} }
for (i = 0; i < NR_XMITBUFF; i++) { 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++; pxmitbuf++;
} }
@ -378,7 +378,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf; pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
for (i = 0; i < NR_XMIT_EXTBUFF; i++) { 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++; pxmitbuf++;
} }
@ -389,7 +389,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
for (i = 0; i < CMDBUF_MAX; i++) { for (i = 0; i < CMDBUF_MAX; i++) {
pxmitbuf = &pxmitpriv->pcmd_xmitbuf[i]; pxmitbuf = &pxmitpriv->pcmd_xmitbuf[i];
if (pxmitbuf != NULL) 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); 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;
u8 highest_rate_bw_bmp; u8 highest_rate_bw_bmp;
u8 update_ht_rs = _FALSE; u8 update_ht_rs = false;
u8 update_vht_rs = _FALSE; u8 update_vht_rs = false;
highest_rate_bw_bmp = BW_CAP_20M; highest_rate_bw_bmp = BW_CAP_20M;
highest_rate_bw = CHANNEL_WIDTH_20; 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("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]); 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; 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("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]); 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? */ /* 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); 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 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_20m = psta->htpriv.sgi_20m;
sgi_40m = psta->htpriv.sgi_40m; 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; pattrib->vcs_mode = NONE_VCS;
} }
} else { } else {
while (_TRUE) { while (true) {
/* IOT action */ /* 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_)) { (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) {
pattrib->vcs_mode = CTS_TO_SELF; pattrib->vcs_mode = CTS_TO_SELF;
break; 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. */ /* to do list: check MIMO power save condition. */
/* check AMPDU aggregation for TXOP */ /* check AMPDU aggregation for TXOP */
if ((pattrib->ampdu_en == _TRUE)) { if ((pattrib->ampdu_en == true)) {
pattrib->vcs_mode = RTS_CTS; pattrib->vcs_mode = RTS_CTS;
break; 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->ht_en = psta->htpriv.ht_option;
pattrib->ch_offset = psta->htpriv.ch_offset; 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 */ if (padapter->driver_ampdu_spacing != 0xFF) /* driver control AMPDU Density for peer sta's rx */
pattrib->ampdu_spacing = padapter->driver_ampdu_spacing; 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 */ /* check if enable ampdu */
if (pattrib->ht_en && psta->htpriv.ampdu_enable) { if (pattrib->ht_en && psta->htpriv.ampdu_enable) {
if (psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority)) { if (psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority)) {
pattrib->ampdu_en = _TRUE; pattrib->ampdu_en = true;
if (psta->htpriv.tx_amsdu_enable == _TRUE) if (psta->htpriv.tx_amsdu_enable == true)
pattrib->amsdu_ampdu_en = _TRUE; pattrib->amsdu_ampdu_en = true;
else else
pattrib->amsdu_ampdu_en = _FALSE; pattrib->amsdu_ampdu_en = false;
} }
} }
/* if(pattrib->ht_en && psta->htpriv.ampdu_enable) */ /* if(pattrib->ht_en && psta->htpriv.ampdu_enable) */
/* { */ /* { */
/* if(psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority)) */ /* if(psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority)) */
/* pattrib->ampdu_en = _TRUE; */ /* pattrib->ampdu_en = true; */
/* } */ /* } */
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
if (pattrib->direct_link == _TRUE) { if (pattrib->direct_link == true) {
psta = pattrib->ptdls_sta; psta = pattrib->ptdls_sta;
pattrib->raid = psta->raid; pattrib->raid = psta->raid;
@ -872,11 +872,11 @@ static void update_attrib_phy_info(_adapter *padapter, struct pkt_attrib *pattri
} }
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
pattrib->retry_ctrl = _FALSE; pattrib->retry_ctrl = false;
#ifdef CONFIG_AUTO_AP_MODE #ifdef CONFIG_AUTO_AP_MODE
if (psta->isrc && psta->pid > 0) if (psta->isrc && psta->pid > 0)
pattrib->pctrl = _TRUE; pattrib->pctrl = true;
#endif #endif
} }
@ -892,13 +892,13 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
memset(pattrib->dot11tkiptxmickey.skey, 0, 16); memset(pattrib->dot11tkiptxmickey.skey, 0, 16);
pattrib->mac_id = psta->mac_id; pattrib->mac_id = psta->mac_id;
if (psta->ieee8021x_blocked == _TRUE) { if (psta->ieee8021x_blocked == true) {
pattrib->encrypt = 0; 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 #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 #endif
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -935,7 +935,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
} }
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
if (pattrib->direct_link == _TRUE) { if (pattrib->direct_link == true) {
if (pattrib->encrypt > 0) if (pattrib->encrypt > 0)
pattrib->encrypt = _AES_; 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); _rtw_memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
if (pattrib->encrypt && if (pattrib->encrypt &&
((padapter->securitypriv.sw_encrypt == _TRUE) || (psecuritypriv->hw_decrypted == _FALSE))) { ((padapter->securitypriv.sw_encrypt == true) || (psecuritypriv->hw_decrypted == false))) {
pattrib->bswenc = _TRUE; pattrib->bswenc = true;
} else { } else {
pattrib->bswenc = _FALSE; pattrib->bswenc = false;
} }
#if defined(CONFIG_CONCURRENT_MODE) #if defined(CONFIG_CONCURRENT_MODE)
@ -1010,11 +1010,11 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
#endif #endif
if (pattrib->encrypt && bmcast && _rtw_camctl_chk_flags(padapter, SEC_STATUS_STA_PK_GK_CONFLICT_DIS_BMC_SEARCH)) 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 #ifdef CONFIG_WAPI_SUPPORT
if (pattrib->encrypt == _SMS4_) if (pattrib->encrypt == _SMS4_)
pattrib->bswenc = _FALSE; pattrib->bswenc = false;
#endif #endif
exit: exit:
@ -1085,13 +1085,13 @@ u8 rtw_check_tdls_established(_adapter *padapter, struct pkt_attrib *pattrib)
{ {
pattrib->ptdls_sta = NULL; pattrib->ptdls_sta = NULL;
pattrib->direct_link = _FALSE; pattrib->direct_link = false;
if (padapter->tdlsinfo.link_established == _TRUE) { if (padapter->tdlsinfo.link_established == true) {
pattrib->ptdls_sta = rtw_get_stainfo(&padapter->stapriv, pattrib->dst); pattrib->ptdls_sta = rtw_get_stainfo(&padapter->stapriv, pattrib->dst);
if ((pattrib->ptdls_sta != NULL) && if ((pattrib->ptdls_sta != NULL) &&
(pattrib->ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) && (pattrib->ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) &&
(pattrib->ether_type != 0x0806)) { (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, &etherhdr.h_dest, ETH_ALEN); _rtw_memcpy(pattrib->dst, &etherhdr.h_dest, ETH_ALEN);
_rtw_memcpy(pattrib->src, &etherhdr.h_source, ETH_ALEN); _rtw_memcpy(pattrib->src, &etherhdr.h_source, ETH_ALEN);
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) || if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN); _rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN);
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc);
} else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { } else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
#ifdef CONFIG_TDLS #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 */ _rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); /* For TDLS direct link Tx, set ra to be same to dst */
else else
#endif #endif
@ -1225,7 +1225,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
#endif #endif
res = _FAIL; res = _FAIL;
goto exit; 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); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_err_ucast_ap_link);
res = _FAIL; res = _FAIL;
goto exit; 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 */ } 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]; u8 tcp[20];
_rtw_pktfile_read(&pktfile, 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)) { if (GET_TCP_SYN(tcp) && GET_TCP_ACK(tcp)) {
session_tracker_add_cmd(padapter, psta session_tracker_add_cmd(padapter, psta
, IPV4_SRC(ip), TCP_SRC(tcp) , 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); set_qos(&pktfile, pattrib);
} else { } else {
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
if (pattrib->direct_link == _TRUE) { if (pattrib->direct_link == true) {
if (pattrib->qos_en) if (pattrib->qos_en)
set_qos(&pktfile, pattrib); set_qos(&pktfile, pattrib);
} else } else
@ -1442,7 +1442,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe)
pframe = pxmitframe->buf_addr + hw_hdr_offset; pframe = pxmitframe->buf_addr + hw_hdr_offset;
if (bmcst) { 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"); */ /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */
/* rtw_msleep_os(10); */ /* rtw_msleep_os(10); */
return _FAIL; return _FAIL;
@ -1450,7 +1450,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe)
/* start to calculate the mic code */ /* start to calculate the mic code */
rtw_secmicsetkey(&micdata, psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey); rtw_secmicsetkey(&micdata, psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey);
} else { } 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"); */ /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */
/* rtw_msleep_os(10); */ /* rtw_msleep_os(10); */
return _FAIL; 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 rtw_ieee80211_hdr *pwlanhdr = (struct rtw_ieee80211_hdr *)hdr;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct qos_priv *pqospriv = &pmlmepriv->qospriv; struct qos_priv *pqospriv = &pmlmepriv->qospriv;
u8 qos_option = _FALSE; u8 qos_option = false;
sint res = _SUCCESS; sint res = _SUCCESS;
__le16 *fctrl = &pwlanhdr->frame_ctl; __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); set_frame_sub_type(fctrl, pattrib->subtype);
if (pattrib->subtype & WIFI_DATA_TYPE) { 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 #ifdef CONFIG_TDLS
if (pattrib->direct_link == _TRUE) { if (pattrib->direct_link == true) {
/* TDLS data transfer, ToDS=0, FrDs=0 */ /* TDLS data transfer, ToDS=0, FrDs=0 */
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); _rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); _rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); _rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
if (pattrib->qos_en) if (pattrib->qos_en)
qos_option = _TRUE; qos_option = true;
} else } else
#endif /* CONFIG_TDLS */ #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); _rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
if (pqospriv->qos_option) 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; */ /* to_ds = 0, fr_ds = 1; */
SetFrDs(fctrl); SetFrDs(fctrl);
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); _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); _rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
if (pattrib->qos_en) if (pattrib->qos_en)
qos_option = _TRUE; qos_option = true;
} else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) || } else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) { (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); _rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN); _rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); _rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
if (pattrib->qos_en) if (pattrib->qos_en)
qos_option = _TRUE; qos_option = true;
} else { } else {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -1684,7 +1684,7 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
SetSeqNum(hdr, pattrib->seqnum); SetSeqNum(hdr, pattrib->seqnum);
/* re-check if enable ampdu by BA_starting_seqctrl */ /* re-check if enable ampdu by BA_starting_seqctrl */
if (pattrib->ampdu_en == _TRUE) { if (pattrib->ampdu_en == true) {
u16 tx_seq; u16 tx_seq;
tx_seq = psta->BA_starting_seqctrl[pattrib->priority & 0x0f]; 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 */ /* check BA_starting_seqctrl */
if (SN_LESS(pattrib->seqnum, tx_seq)) { if (SN_LESS(pattrib->seqnum, tx_seq)) {
/* RTW_INFO("tx ampdu seqnum(%d) < tx_seq(%d)\n", 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)) { } else if (SN_EQUAL(pattrib->seqnum, tx_seq)) {
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff; psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
pattrib->ampdu_en = _TRUE;/* AGG EN */ pattrib->ampdu_en = true;/* AGG EN */
} else { } else {
/* RTW_INFO("tx ampdu over run\n"); */ /* RTW_INFO("tx ampdu over run\n"); */
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff; 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; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
return ((_rtw_queue_empty(&pxmitpriv->be_pending) == _FALSE) || return ((_rtw_queue_empty(&pxmitpriv->be_pending) == false) ||
(_rtw_queue_empty(&pxmitpriv->bk_pending) == _FALSE) || (_rtw_queue_empty(&pxmitpriv->bk_pending) == false) ||
(_rtw_queue_empty(&pxmitpriv->vi_pending) == _FALSE) || (_rtw_queue_empty(&pxmitpriv->vi_pending) == false) ||
(_rtw_queue_empty(&pxmitpriv->vo_pending) == _FALSE)); (_rtw_queue_empty(&pxmitpriv->vo_pending) == false));
} }
s32 rtw_txframes_sta_ac_pending(_adapter *padapter, struct pkt_attrib *pattrib) 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->encrypt = _AES_;
pattrib->iv_len = 8; pattrib->iv_len = 8;
pattrib->icv_len = 8; pattrib->icv_len = 8;
pattrib->bswenc = _FALSE; pattrib->bswenc = false;
} }
pattrib->mac_id = ptdls_sta->mac_id; pattrib->mac_id = ptdls_sta->mac_id;
} else { } else {
@ -2063,29 +2063,29 @@ u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib)
s32 check_amsdu(struct xmit_frame *pxmitframe) s32 check_amsdu(struct xmit_frame *pxmitframe)
{ {
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
s32 ret = _TRUE; s32 ret = true;
if (!pxmitframe) if (!pxmitframe)
ret = _FALSE; ret = false;
pattrib = &pxmitframe->attrib; pattrib = &pxmitframe->attrib;
if (IS_MCAST(pattrib->ra)) if (IS_MCAST(pattrib->ra))
ret = _FALSE; ret = false;
if ((pattrib->ether_type == 0x888e) || if ((pattrib->ether_type == 0x888e) ||
(pattrib->ether_type == 0x0806) || (pattrib->ether_type == 0x0806) ||
(pattrib->ether_type == 0x88b4) || (pattrib->ether_type == 0x88b4) ||
(pattrib->dhcp_pkt == 1)) (pattrib->dhcp_pkt == 1))
ret = _FALSE; ret = false;
if ((pattrib->encrypt == _WEP40_) || if ((pattrib->encrypt == _WEP40_) ||
(pattrib->encrypt == _WEP104_) || (pattrib->encrypt == _WEP104_) ||
(pattrib->encrypt == _TKIP_)) (pattrib->encrypt == _TKIP_))
ret = _FALSE; ret = false;
if (!pattrib->qos_en) if (!pattrib->qos_en)
ret = _FALSE; ret = false;
return ret; return ret;
} }
@ -2096,7 +2096,7 @@ s32 check_amsdu_tx_support(_adapter *padapter)
int tx_amsdu; int tx_amsdu;
int tx_amsdu_rate; int tx_amsdu_rate;
int current_tx_rate; int current_tx_rate;
s32 ret = _FALSE; s32 ret = false;
pdvobjpriv = adapter_to_dvobj(padapter); pdvobjpriv = adapter_to_dvobj(padapter);
tx_amsdu = padapter->tx_amsdu; 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; current_tx_rate = pdvobjpriv->traffic_stat.cur_tx_tp;
if (tx_amsdu == 1) if (tx_amsdu == 1)
ret = _TRUE; ret = true;
else if (tx_amsdu == 2 && (tx_amsdu_rate == 0 || current_tx_rate > tx_amsdu_rate)) else if (tx_amsdu == 2 && (tx_amsdu_rate == 0 || current_tx_rate > tx_amsdu_rate))
ret = _TRUE; ret = true;
else else
ret = _FALSE; ret = false;
return ret; return ret;
} }
@ -2414,7 +2414,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
frg_inx++; frg_inx++;
if (bmcst || (rtw_endofpktfile(&pktfile) == _TRUE)) { if (bmcst || (rtw_endofpktfile(&pktfile) == true)) {
pattrib->nr_frags = frg_inx; pattrib->nr_frags = frg_inx;
pattrib->last_txcmdsz = pattrib->hdrlen + pattrib->iv_len + ((pattrib->nr_frags == 1) ? llc_sz : 0) + 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); xmitframe_swencrypt(padapter, pxmitframe);
if (bmcst == _FALSE) if (bmcst == false)
update_attrib_vcs_info(padapter, pxmitframe); update_attrib_vcs_info(padapter, pxmitframe);
else else
pattrib->vcs_mode = NONE_VCS; 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); _enter_critical_bh(&padapter->security_key_mutex, &irqL);
/* IGTK key is not install, it may not support 802.11w */ /* 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"); RTW_INFO("no instll BIP key\n");
goto xmitframe_coalesce_success; 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 #ifdef CONFIG_CHECK_LEAVE_LPS
/* traffic_check_for_leave_lps(padapter, _TRUE); */ /* traffic_check_for_leave_lps(padapter, true); */
#endif /* CONFIG_LPS */ #endif /* CONFIG_LPS */
} }
@ -2812,7 +2812,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
_enter_critical(&pfree_queue->lock, &irqL); _enter_critical(&pfree_queue->lock, &irqL);
if (_rtw_queue_empty(pfree_queue) == _TRUE) if (_rtw_queue_empty(pfree_queue) == true)
pxmitbuf = NULL; pxmitbuf = NULL;
else { else {
@ -2879,7 +2879,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
_enter_critical(&pfree_xmitbuf_queue->lock, &irqL); _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; pxmitbuf = NULL;
else { 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); _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; pxframe = NULL;
} else { } else {
phead = get_list_head(pfree_xmit_queue); 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); _enter_critical_bh(&queue->lock, &irqL);
if (_rtw_queue_empty(queue) == _TRUE) { if (_rtw_queue_empty(queue) == true) {
pxframe = NULL; pxframe = NULL;
} else { } else {
phead = get_list_head(queue); 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); phead = get_list_head(pframequeue);
plist = get_next(phead); 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); 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_phead = get_list_head(pframe_queue);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
rtw_list_delete(&pxmitframe->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_phead = get_list_head(pframe_queue);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
break; 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_phead = get_list_head(phwxmit->sta_queue);
sta_plist = get_next(sta_phead); 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); ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
pframe_queue = &ptxservq->sta_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_phead = get_list_head(phwxmit->sta_queue);
sta_plist = get_next(sta_phead); 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); 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 sk_buff *skb = *pskb;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
unsigned long irqL; 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; int res, is_vlan_tag = 0, i, do_nat25 = 1;
unsigned short vlan_hdr = 0; unsigned short vlan_hdr = 0;
@ -3722,7 +3722,7 @@ static void do_queue_select(_adapter *padapter, struct pkt_attrib *pattrib)
qsel = pattrib->priority; qsel = pattrib->priority;
#ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_CONCURRENT_MODE
/* if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) /* if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)
* qsel = 7; */ * qsel = 7; */
#endif #endif
@ -3819,7 +3819,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
update_monitor_frame_attrib(padapter, pattrib); update_monitor_frame_attrib(padapter, pattrib);
pattrib->retry_ctrl = _FALSE; pattrib->retry_ctrl = false;
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); 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; pattrib = &pmgntframe->attrib;
update_mgntframe_attrib(padapter, pattrib); update_mgntframe_attrib(padapter, pattrib);
pattrib->retry_ctrl = _FALSE; pattrib->retry_ctrl = false;
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
@ -3944,7 +3944,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
rcu_read_unlock(); rcu_read_unlock();
#endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */ #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); res = rtw_br_client_tx(padapter, ppkt);
if (res == -1) { if (res == -1) {
rtw_free_xmitframe(pxmitpriv, pxmitframe); rtw_free_xmitframe(pxmitpriv, pxmitframe);
@ -3986,7 +3986,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
#ifdef CONFIG_AP_MODE #ifdef CONFIG_AP_MODE
_enter_critical_bh(&pxmitpriv->lock, &irqL0); _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); _exit_critical_bh(&pxmitpriv->lock, &irqL0);
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue); DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue);
return 1; return 1;
@ -3995,7 +3995,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
#endif #endif
/* pre_xmitframe */ /* pre_xmitframe */
if (rtw_hal_xmit(padapter, pxmitframe) == _FALSE) if (rtw_hal_xmit(padapter, pxmitframe) == false)
return 1; return 1;
return 0; return 0;
@ -4004,7 +4004,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe) sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
{ {
sint ret = _FALSE; sint ret = false;
unsigned long irqL; unsigned long irqL;
struct sta_info *ptdls_sta = NULL; 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) { else if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) {
if (pattrib->triggered == 1) { if (pattrib->triggered == 1) {
ret = _TRUE; ret = true;
return ret; return ret;
} }
@ -4060,7 +4060,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
if (ptdls_sta->sleepq_len == 1) if (ptdls_sta->sleepq_len == 1)
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_ISSUE_PTI); rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_ISSUE_PTI);
ret = _TRUE; ret = true;
} }
_exit_critical_bh(&ptdls_sta->sleep_q.lock, &irqL); _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) inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
{ {
bool allow = _FALSE; bool allow = false;
_adapter *adapter = xmitframe->padapter; _adapter *adapter = xmitframe->padapter;
struct registry_priv *registry = &adapter->registrypriv; struct registry_priv *registry = &adapter->registrypriv;
if (rtw_get_intf_type(adapter) != RTW_PCIE) { if (rtw_get_intf_type(adapter) != RTW_PCIE) {
if (adapter->registrypriv.wifi_spec == 1) if (adapter->registrypriv.wifi_spec == 1)
allow = _TRUE; allow = true;
else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_SPECIAL) { else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_SPECIAL) {
struct pkt_attrib *attrib = &xmitframe->attrib; struct pkt_attrib *attrib = &xmitframe->attrib;
@ -4099,10 +4099,10 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
if (0) if (0)
RTW_INFO(FUNC_ADPT_FMT" ether_type:0x%04x%s\n", FUNC_ADPT_ARG(xmitframe->padapter) RTW_INFO(FUNC_ADPT_FMT" ether_type:0x%04x%s\n", FUNC_ADPT_ARG(xmitframe->padapter)
, attrib->ether_type, attrib->dhcp_pkt ? " DHCP" : ""); , attrib->ether_type, attrib->dhcp_pkt ? " DHCP" : "");
allow = _TRUE; allow = true;
} }
} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL) } 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 if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
} else } else
rtw_warn_on(1); 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) sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
{ {
unsigned long irqL; unsigned long irqL;
sint ret = _FALSE; sint ret = false;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
sint bmcst = IS_MCAST(pattrib->ra); sint bmcst = IS_MCAST(pattrib->ra);
bool update_tim = _FALSE; bool update_tim = false;
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
if (padapter->tdlsinfo.link_established == _TRUE) if (padapter->tdlsinfo.link_established == true)
ret = xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pxmitframe); ret = xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pxmitframe);
#endif /* CONFIG_TDLS */ #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); DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_fwstate);
return ret; return ret;
} }
@ -4147,19 +4147,19 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
if (pattrib->psta != psta) { if (pattrib->psta != psta) {
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_sta); DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_sta);
RTW_INFO("%s, pattrib->psta(%p) != psta(%p)\n", __func__, pattrib->psta, psta); RTW_INFO("%s, pattrib->psta(%p) != psta(%p)\n", __func__, pattrib->psta, psta);
return _FALSE; return false;
} }
if (psta == NULL) { if (psta == NULL) {
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_nosta); DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_nosta);
RTW_INFO("%s, psta==NUL\n", __func__); RTW_INFO("%s, psta==NUL\n", __func__);
return _FALSE; return false;
} }
if (!(psta->state & _FW_LINKED)) { if (!(psta->state & _FW_LINKED)) {
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_link); DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_warn_link);
RTW_INFO("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state); RTW_INFO("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
return _FALSE; return false;
} }
if (pattrib->triggered == 1) { 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"); */ /* RTW_INFO("directly xmit pspoll_triggered packet\n"); */
/* pattrib->triggered=0; */ /* pattrib->triggered=0; */
if (bmcst && xmitframe_hiq_filter(pxmitframe) == _TRUE) if (bmcst && xmitframe_hiq_filter(pxmitframe) == true)
pattrib->qsel = QSLT_HIGH;/* HIQ */ pattrib->qsel = QSLT_HIGH;/* HIQ */
return ret; return ret;
@ -4188,23 +4188,23 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
psta->sleepq_len++; psta->sleepq_len++;
if (!(pstapriv->tim_bitmap & BIT(0))) if (!(pstapriv->tim_bitmap & BIT(0)))
update_tim = _TRUE; update_tim = true;
pstapriv->tim_bitmap |= BIT(0); pstapriv->tim_bitmap |= BIT(0);
pstapriv->sta_dz_bitmap |= BIT(0); pstapriv->sta_dz_bitmap |= BIT(0);
/* RTW_INFO("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */ /* 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)) 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 else
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer MC"); _update_beacon(padapter, _TIM_IE_, NULL, true, "buffer MC");
} else } else
chk_bmc_sleepq_cmd(padapter); chk_bmc_sleepq_cmd(padapter);
/*_exit_critical_bh(&psta->sleep_q.lock, &irqL);*/ /*_exit_critical_bh(&psta->sleep_q.lock, &irqL);*/
ret = _TRUE; ret = true;
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_mcast); 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 (((psta->has_legacy_ac) && (!wmmps_ac)) || ((!psta->has_legacy_ac) && (wmmps_ac))) {
if (!(pstapriv->tim_bitmap & BIT(psta->aid))) if (!(pstapriv->tim_bitmap & BIT(psta->aid)))
update_tim = _TRUE; update_tim = true;
pstapriv->tim_bitmap |= BIT(psta->aid); pstapriv->tim_bitmap |= BIT(psta->aid);
/* RTW_INFO("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */ /* 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"); */ /* RTW_INFO("sleepq_len==1, update BCNTIM\n"); */
/* upate BCN for TIM IE */ /* 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); */ /* wakeup_sta_to_xmit(padapter, psta); */
/* } */ /* } */
ret = _TRUE; ret = true;
DBG_COUNTER(padapter->tx_logs.core_tx_ap_enqueue_ucast); 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); phead = get_list_head(pframequeue);
plist = get_next(phead); 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); pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
plist = get_next(plist); 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); 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 = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index));
ptxservq->qcnt--; ptxservq->qcnt--;
phwxmits[ac_index].accnt--; phwxmits[ac_index].accnt--;
} else { } 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_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); 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); _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); 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_phead = get_list_head(&psta_bmc->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); 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; pxmitframe->attrib.triggered = 1;
/* /*
_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL); _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); rtw_os_xmit_complete(padapter, pxmitframe);
} }
@ -4539,11 +4539,11 @@ _exit:
if (update_mask) { if (update_mask) {
/* update_BCNTIM(padapter); */ /* update_BCNTIM(padapter); */
if ((update_mask & (BIT(0) | BIT(1))) == (BIT(0) | BIT(1))) 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)) 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 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_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); 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); */ /* RTW_INFO("wakeup to xmit, qlen==0, update_BCNTIM, tim=%x\n", pstapriv->tim_bitmap); */
/* upate BCN for TIM IE */ /* upate BCN for TIM IE */
/* update_BCNTIM(padapter); */ /* update_BCNTIM(padapter); */
update_beacon(padapter, _TIM_IE_, NULL, _TRUE); update_beacon(padapter, _TIM_IE_, NULL, true);
/* update_mask = BIT(0); */ /* update_mask = BIT(0); */
} }
@ -4677,7 +4677,7 @@ struct xmit_buf *dequeue_pending_xmitbuf(
_enter_critical_bh(&pqueue->lock, &irql); _enter_critical_bh(&pqueue->lock, &irql);
if (_rtw_queue_empty(pqueue) == _FALSE) { if (_rtw_queue_empty(pqueue) == false) {
_list *plist, *phead; _list *plist, *phead;
phead = get_list_head(pqueue); phead = get_list_head(pqueue);
@ -4704,7 +4704,7 @@ static struct xmit_buf *dequeue_pending_xmitbuf_under_survey(
_enter_critical_bh(&pqueue->lock, &irql); _enter_critical_bh(&pqueue->lock, &irql);
if (_rtw_queue_empty(pqueue) == _FALSE) { if (_rtw_queue_empty(pqueue) == false) {
_list *plist, *phead; _list *plist, *phead;
u8 type = 0; u8 type = 0;
@ -4750,7 +4750,7 @@ static struct xmit_buf *dequeue_pending_xmitbuf_ext(
_enter_critical_bh(&pqueue->lock, &irql); _enter_critical_bh(&pqueue->lock, &irql);
if (_rtw_queue_empty(pqueue) == _FALSE) { if (_rtw_queue_empty(pqueue) == false) {
_list *plist, *phead; _list *plist, *phead;
u8 type = 0; 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_priv *pxmitpriv = &padapter->xmitpriv;
struct xmit_buf *pxmitbuf = NULL; 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); pxmitbuf = dequeue_pending_xmitbuf_under_survey(pxmitpriv);
else { else {
pxmitbuf = dequeue_pending_xmitbuf_ext(pxmitpriv); pxmitbuf = dequeue_pending_xmitbuf_ext(pxmitpriv);
@ -4797,14 +4797,14 @@ sint check_pending_xmitbuf(
{ {
unsigned long irql; unsigned long irql;
_queue *pqueue; _queue *pqueue;
sint ret = _FALSE; sint ret = false;
pqueue = &pxmitpriv->pending_xmitbuf_queue; pqueue = &pxmitpriv->pending_xmitbuf_queue;
_enter_critical_bh(&pqueue->lock, &irql); _enter_critical_bh(&pqueue->lock, &irql);
if (_rtw_queue_empty(pqueue) == _FALSE) if (_rtw_queue_empty(pqueue) == false)
ret = _TRUE; ret = true;
_exit_critical_bh(&pqueue->lock, &irql); _exit_critical_bh(&pqueue->lock, &irql);
@ -4838,7 +4838,7 @@ bool rtw_xmit_ac_blocked(_adapter *adapter)
_adapter *iface; _adapter *iface;
struct mlme_ext_priv *mlmeext; struct mlme_ext_priv *mlmeext;
struct mlme_ext_info *mlmeextinfo; struct mlme_ext_info *mlmeextinfo;
bool blocked = _FALSE; bool blocked = false;
int i; int i;
for (i = 0; i < dvobj->iface_nums; 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 if (mlmeext_scan_state(mlmeext) != SCAN_DISABLE
&& mlmeext_scan_state(mlmeext) != SCAN_BACK_OP && mlmeext_scan_state(mlmeext) != SCAN_BACK_OP
) { ) {
blocked = _TRUE; blocked = true;
goto exit; goto exit;
} }
if (mlmeext_scan_state(mlmeext) == SCAN_BACK_OP if (mlmeext_scan_state(mlmeext) == SCAN_BACK_OP
&& !mlmeext_chk_scan_backop_flags(mlmeext, SS_BACKOP_TX_RESUME) && !mlmeext_chk_scan_backop_flags(mlmeext, SS_BACKOP_TX_RESUME)
) { ) {
blocked = _TRUE; blocked = true;
goto exit; goto exit;
} }
} }
@ -4865,7 +4865,7 @@ bool rtw_xmit_ac_blocked(_adapter *adapter)
if (MCC_EN(adapter)) { if (MCC_EN(adapter)) {
if (rtw_hal_check_mcc_status(adapter, MCC_STATUS_DOING_MCC)) { if (rtw_hal_check_mcc_status(adapter, MCC_STATUS_DOING_MCC)) {
if (MCC_STOP(adapter)) { if (MCC_STOP(adapter)) {
blocked = _TRUE; blocked = true;
goto exit; 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_DRV_STOP:
case RTW_SCTX_DONE_DEV_REMOVE: case RTW_SCTX_DONE_DEV_REMOVE:
return _TRUE; return true;
default: default:
return _FALSE; return false;
} }
} }

View file

@ -53,7 +53,7 @@ u8 HalPwrSeqCmdParsing(
WLAN_PWR_CFG PwrSeqCmd[]) WLAN_PWR_CFG PwrSeqCmd[])
{ {
WLAN_PWR_CFG PwrCfgCmd = {0}; WLAN_PWR_CFG PwrCfgCmd = {0};
u8 bPollingBit = _FALSE; u8 bPollingBit = false;
u32 AryIdx = 0; u32 AryIdx = 0;
u8 value = 0; u8 value = 0;
u32 offset = 0; u32 offset = 0;
@ -109,7 +109,7 @@ u8 HalPwrSeqCmdParsing(
case PWR_CMD_POLLING: case PWR_CMD_POLLING:
bPollingBit = _FALSE; bPollingBit = false;
offset = GET_PWR_CFG_OFFSET(PwrCfgCmd); offset = GET_PWR_CFG_OFFSET(PwrCfgCmd);
#ifdef CONFIG_GSPI_HCI #ifdef CONFIG_GSPI_HCI
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO) if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
@ -125,13 +125,13 @@ u8 HalPwrSeqCmdParsing(
value = value & GET_PWR_CFG_MASK(PwrCfgCmd); value = value & GET_PWR_CFG_MASK(PwrCfgCmd);
if (value == (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd))) if (value == (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd)))
bPollingBit = _TRUE; bPollingBit = true;
else else
rtw_udelay_os(10); rtw_udelay_os(10);
if (pollingCount++ > maxPollingCnt) { if (pollingCount++ > maxPollingCnt) {
RTW_ERR("HalPwrSeqCmdParsing: Fail to polling Offset[%#x]=%02x\n", offset, value); RTW_ERR("HalPwrSeqCmdParsing: Fail to polling Offset[%#x]=%02x\n", offset, value);
return _FALSE; return false;
} }
} while (!bPollingBit); } while (!bPollingBit);
@ -146,7 +146,7 @@ u8 HalPwrSeqCmdParsing(
case PWR_CMD_END: case PWR_CMD_END:
/* When this command is parsed, end the process */ /* When this command is parsed, end the process */
return _TRUE; return true;
break; break;
default: default:
@ -157,5 +157,5 @@ u8 HalPwrSeqCmdParsing(
AryIdx++;/* Add Array Index */ AryIdx++;/* Add Array Index */
} while (1); } while (1);
return _TRUE; return true;
} }

View file

@ -214,7 +214,7 @@ typedef struct _btcoexdbginfo {
BTCDBGINFO GLBtcDbgInfo; BTCDBGINFO GLBtcDbgInfo;
#define BT_Operation(Adapter) _FALSE #define BT_Operation(Adapter) false
static void DBG_BT_INFO_INIT(PBTCDBGINFO pinfo, u8 *pbuf, u32 size) 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 || if (!pBtCoexist->bBinded ||
NULL == pBtCoexist->Adapter) NULL == pBtCoexist->Adapter)
return _FALSE; return false;
return _TRUE; return true;
} }
static void halbtcoutsrc_DbgInit(void) 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 if (pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC4
|| pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC8 || pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC8
) )
return _TRUE; return true;
return _FALSE; return false;
} }
static u8 halbtcoutsrc_IsHwMailboxExist(PBTC_COEXIST pBtCoexist) 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 if (pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC4
|| pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC8 || pBtCoexist->board_info.bt_chip_type == BTC_CHIP_CSR_BC8
) )
return _FALSE; return false;
else if (IS_HARDWARE_TYPE_8812(pBtCoexist->Adapter)) else if (IS_HARDWARE_TYPE_8812(pBtCoexist->Adapter))
return _FALSE; return false;
else else
return _TRUE; return true;
} }
static void halbtcoutsrc_LeaveLps(PBTC_COEXIST pBtCoexist) static void halbtcoutsrc_LeaveLps(PBTC_COEXIST pBtCoexist)
@ -297,8 +297,8 @@ static void halbtcoutsrc_LeaveLps(PBTC_COEXIST pBtCoexist)
padapter = pBtCoexist->Adapter; padapter = pBtCoexist->Adapter;
pBtCoexist->bt_info.bt_ctrl_lps = _TRUE; pBtCoexist->bt_info.bt_ctrl_lps = true;
pBtCoexist->bt_info.bt_lps_on = _FALSE; pBtCoexist->bt_info.bt_lps_on = false;
rtw_btcoex_LPS_Leave(padapter); rtw_btcoex_LPS_Leave(padapter);
} }
@ -310,9 +310,9 @@ void halbtcoutsrc_EnterLps(PBTC_COEXIST pBtCoexist)
padapter = pBtCoexist->Adapter; padapter = pBtCoexist->Adapter;
if (pBtCoexist->bdontenterLPS == _FALSE) { if (pBtCoexist->bdontenterLPS == false) {
pBtCoexist->bt_info.bt_ctrl_lps = _TRUE; pBtCoexist->bt_info.bt_ctrl_lps = true;
pBtCoexist->bt_info.bt_lps_on = _TRUE; pBtCoexist->bt_info.bt_lps_on = true;
rtw_btcoex_LPS_Enter(padapter); rtw_btcoex_LPS_Enter(padapter);
} }
@ -327,9 +327,9 @@ void halbtcoutsrc_NormalLps(PBTC_COEXIST pBtCoexist)
padapter = pBtCoexist->Adapter; padapter = pBtCoexist->Adapter;
if (pBtCoexist->bt_info.bt_ctrl_lps) { 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); 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; timeout = 30;
#endif /* !LPS_RPWM_WAIT_MS */ #endif /* !LPS_RPWM_WAIT_MS */
if (GLBtcBtCoexAliveRegistered == _TRUE) if (GLBtcBtCoexAliveRegistered == true)
return; return;
stime = rtw_get_current_time(); stime = rtw_get_current_time();
@ -375,7 +375,7 @@ void halbtcoutsrc_LeaveLowPower(PBTC_COEXIST pBtCoexist)
rtw_msleep_os(1); rtw_msleep_os(1);
} while (1); } while (1);
GLBtcBtCoexAliveRegistered = _TRUE; GLBtcBtCoexAliveRegistered = true;
#endif /* CONFIG_LPS_LCLK */ #endif /* CONFIG_LPS_LCLK */
} }
@ -388,13 +388,13 @@ void halbtcoutsrc_NormalLowPower(PBTC_COEXIST pBtCoexist)
#ifdef CONFIG_LPS_LCLK #ifdef CONFIG_LPS_LCLK
PADAPTER padapter; PADAPTER padapter;
if (GLBtcBtCoexAliveRegistered == _FALSE) if (GLBtcBtCoexAliveRegistered == false)
return; return;
padapter = pBtCoexist->Adapter; padapter = pBtCoexist->Adapter;
rtw_unregister_task_alive(padapter, BTCOEX_ALIVE); rtw_unregister_task_alive(padapter, BTCOEX_ALIVE);
GLBtcBtCoexAliveRegistered = _FALSE; GLBtcBtCoexAliveRegistered = false;
#endif /* CONFIG_LPS_LCLK */ #endif /* CONFIG_LPS_LCLK */
} }
@ -410,7 +410,7 @@ void halbtcoutsrc_DisableLowPower(PBTC_COEXIST pBtCoexist, u8 bLowPwrDisable)
void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist) void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist)
{ {
PADAPTER padapter; PADAPTER padapter;
bool bNeedToAct = _FALSE; bool bNeedToAct = false;
static u32 preTime = 0; static u32 preTime = 0;
u32 curTime = 0; u32 curTime = 0;
@ -429,24 +429,24 @@ void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist)
preTime = curTime; preTime = curTime;
if (pBtCoexist->bt_info.reject_agg_pkt) { if (pBtCoexist->bt_info.reject_agg_pkt) {
bNeedToAct = _TRUE; bNeedToAct = true;
pBtCoexist->bt_info.pre_reject_agg_pkt = pBtCoexist->bt_info.reject_agg_pkt; pBtCoexist->bt_info.pre_reject_agg_pkt = pBtCoexist->bt_info.reject_agg_pkt;
} else { } else {
if (pBtCoexist->bt_info.pre_reject_agg_pkt) { 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; pBtCoexist->bt_info.pre_reject_agg_pkt = pBtCoexist->bt_info.reject_agg_pkt;
} }
if (pBtCoexist->bt_info.pre_bt_ctrl_agg_buf_size != if (pBtCoexist->bt_info.pre_bt_ctrl_agg_buf_size !=
pBtCoexist->bt_info.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; 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.bt_ctrl_agg_buf_size) {
if (pBtCoexist->bt_info.pre_agg_buf_size != if (pBtCoexist->bt_info.pre_agg_buf_size !=
pBtCoexist->bt_info.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; 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) u8 halbtcoutsrc_IsWifiBusy(PADAPTER padapter)
{ {
if (rtw_mi_check_status(padapter, MI_AP_MODE)) if (rtw_mi_check_status(padapter, MI_AP_MODE))
return _TRUE; return true;
if (rtw_mi_busy_traffic_check(padapter, _FALSE)) if (rtw_mi_busy_traffic_check(padapter, false))
return _TRUE; return true;
return _FALSE; return false;
} }
static u32 _halbtcoutsrc_GetWifiLinkStatus(PADAPTER padapter) static u32 _halbtcoutsrc_GetWifiLinkStatus(PADAPTER padapter)
@ -493,22 +493,22 @@ static u32 _halbtcoutsrc_GetWifiLinkStatus(PADAPTER padapter)
pmlmepriv = &padapter->mlmepriv; pmlmepriv = &padapter->mlmepriv;
bp2p = _FALSE; bp2p = false;
portConnectedStatus = 0; portConnectedStatus = 0;
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE)) if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE))
bp2p = _TRUE; bp2p = true;
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == _TRUE) { if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) {
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
if (_TRUE == bp2p) if (true == bp2p)
portConnectedStatus |= WIFI_P2P_GO_CONNECTED; portConnectedStatus |= WIFI_P2P_GO_CONNECTED;
else else
portConnectedStatus |= WIFI_AP_CONNECTED; portConnectedStatus |= WIFI_AP_CONNECTED;
} else { } else {
if (_TRUE == bp2p) if (true == bp2p)
portConnectedStatus |= WIFI_P2P_GC_CONNECTED; portConnectedStatus |= WIFI_P2P_GC_CONNECTED;
else else
portConnectedStatus |= WIFI_STA_CONNECTED; portConnectedStatus |= WIFI_STA_CONNECTED;
@ -654,7 +654,7 @@ exit:
u32 halbtcoutsrc_GetBtPatchVer(PBTC_COEXIST pBtCoexist) u32 halbtcoutsrc_GetBtPatchVer(PBTC_COEXIST pBtCoexist)
{ {
if (pBtCoexist->bt_info.get_bt_fw_ver_cnt <= 5) { if (pBtCoexist->bt_info.get_bt_fw_ver_cnt <= 5) {
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
unsigned long irqL; unsigned long irqL;
u8 ret; u8 ret;
@ -675,7 +675,7 @@ u32 halbtcoutsrc_GetBtPatchVer(PBTC_COEXIST pBtCoexist)
buf[0] = 0x0; /* OP_Code */ buf[0] = 0x0; /* OP_Code */
buf[1] = 0x0; /* OP_Code_Length */ 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 */ #endif /* !CONFIG_BT_COEXIST_SOCKET_TRX */
} }
} }
@ -704,7 +704,7 @@ u32 halbtcoutsrc_GetBtCoexSupportedFeature(void *pBtcContext)
pBtCoexist = (PBTC_COEXIST)pBtcContext; pBtCoexist = (PBTC_COEXIST)pBtcContext;
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
u8 buf[3] = {0}; u8 buf[3] = {0};
unsigned long irqL; unsigned long irqL;
u8 op_code; u8 op_code;
@ -735,7 +735,7 @@ u32 halbtcoutsrc_GetBtCoexSupportedVersion(void *pBtcContext)
pBtCoexist = (PBTC_COEXIST)pBtcContext; pBtCoexist = (PBTC_COEXIST)pBtcContext;
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
u8 buf[3] = {0}; u8 buf[3] = {0};
unsigned long irqL; unsigned long irqL;
u8 op_code; u8 op_code;
@ -768,7 +768,7 @@ static u8 halbtcoutsrc_GetWifiScanAPNum(PADAPTER padapter)
pmlmepriv = &padapter->mlmepriv; pmlmepriv = &padapter->mlmepriv;
pmlmeext = &padapter->mlmeextpriv; pmlmeext = &padapter->mlmeextpriv;
if (GLBtcWiFiInScanState == _FALSE) { if (GLBtcWiFiInScanState == false) {
if (pmlmepriv->num_of_scanned > 0xFF) if (pmlmepriv->num_of_scanned > 0xFF)
scan_AP_num = 0xFF; scan_AP_num = 0xFF;
else else
@ -794,28 +794,28 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
pBtCoexist = (PBTC_COEXIST)pBtcContext; pBtCoexist = (PBTC_COEXIST)pBtcContext;
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist)) if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
return _FALSE; return false;
padapter = pBtCoexist->Adapter; padapter = pBtCoexist->Adapter;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
mlmeext = &padapter->mlmeextpriv; mlmeext = &padapter->mlmeextpriv;
bSoftApExist = _FALSE; bSoftApExist = false;
bVwifiExist = _FALSE; bVwifiExist = false;
pu8 = (u8 *)pOutBuf; pu8 = (u8 *)pOutBuf;
pS4Tmp = (s32 *)pOutBuf; pS4Tmp = (s32 *)pOutBuf;
pU4Tmp = (u32 *)pOutBuf; pU4Tmp = (u32 *)pOutBuf;
pU1Tmp = (u8 *)pOutBuf; pU1Tmp = (u8 *)pOutBuf;
ret = _TRUE; ret = true;
switch (getType) { switch (getType) {
case BTC_GET_BL_HS_OPERATION: case BTC_GET_BL_HS_OPERATION:
*pu8 = _FALSE; *pu8 = false;
ret = _FALSE; ret = false;
break; break;
case BTC_GET_BL_HS_CONNECTING: case BTC_GET_BL_HS_CONNECTING:
*pu8 = _FALSE; *pu8 = false;
ret = _FALSE; ret = false;
break; break;
case BTC_GET_BL_WIFI_FW_READY: case BTC_GET_BL_WIFI_FW_READY:
@ -823,7 +823,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
break; break;
case BTC_GET_BL_WIFI_CONNECTED: 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; break;
case BTC_GET_BL_WIFI_BUSY: case BTC_GET_BL_WIFI_BUSY:
@ -837,49 +837,49 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
break; break;
case BTC_GET_BL_WIFI_LINK: 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; break;
case BTC_GET_BL_WIFI_ROAM: 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; break;
case BTC_GET_BL_WIFI_4_WAY_PROGRESS: case BTC_GET_BL_WIFI_4_WAY_PROGRESS:
*pu8 = _FALSE; *pu8 = false;
break; break;
case BTC_GET_BL_WIFI_UNDER_5G: case BTC_GET_BL_WIFI_UNDER_5G:
*pu8 = (pHalData->current_band_type == 1) ? _TRUE : _FALSE; *pu8 = (pHalData->current_band_type == 1) ? true : false;
break; break;
case BTC_GET_BL_WIFI_AP_MODE_ENABLE: 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; break;
case BTC_GET_BL_WIFI_ENABLE_ENCRYPTION: case BTC_GET_BL_WIFI_ENABLE_ENCRYPTION:
*pu8 = padapter->securitypriv.dot11PrivacyAlgrthm == 0 ? _FALSE : _TRUE; *pu8 = padapter->securitypriv.dot11PrivacyAlgrthm == 0 ? false : true;
break; break;
case BTC_GET_BL_WIFI_UNDER_B_MODE: case BTC_GET_BL_WIFI_UNDER_B_MODE:
if (mlmeext->cur_wireless_mode == WIRELESS_11B) if (mlmeext->cur_wireless_mode == WIRELESS_11B)
*pu8 = _TRUE; *pu8 = true;
else else
*pu8 = _FALSE; *pu8 = false;
break; break;
case BTC_GET_BL_WIFI_IS_IN_MP_MODE: case BTC_GET_BL_WIFI_IS_IN_MP_MODE:
if (padapter->registrypriv.mp_mode == 0) if (padapter->registrypriv.mp_mode == 0)
*pu8 = _FALSE; *pu8 = false;
else else
*pu8 = _TRUE; *pu8 = true;
break; break;
case BTC_GET_BL_EXT_SWITCH: case BTC_GET_BL_EXT_SWITCH:
*pu8 = _FALSE; *pu8 = false;
break; break;
case BTC_GET_BL_IS_ASUS_8723B: case BTC_GET_BL_IS_ASUS_8723B:
/* Always return FALSE in linux driver since this case is added only for windows driver */ /* Always return false in linux driver since this case is added only for windows driver */
*pu8 = _FALSE; *pu8 = false;
break; break;
case BTC_GET_S4_WIFI_RSSI: 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: case BTC_GET_S4_HS_RSSI:
*pS4Tmp = 0; *pS4Tmp = 0;
ret = _FALSE; ret = false;
break; break;
case BTC_GET_U4_WIFI_BW: 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: case BTC_GET_U1_WIFI_HS_CHNL:
*pU1Tmp = 0; *pU1Tmp = 0;
ret = _FALSE; ret = false;
break; break;
case BTC_GET_U1_WIFI_P2P_CHNL: case BTC_GET_U1_WIFI_P2P_CHNL:
@ -1033,7 +1033,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
break; break;
default: default:
ret = _FALSE; ret = false;
break; break;
} }
@ -1057,10 +1057,10 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
pu8 = (u8 *)pInBuf; pu8 = (u8 *)pInBuf;
pU1Tmp = (u8 *)pInBuf; pU1Tmp = (u8 *)pInBuf;
pU4Tmp = (u32 *)pInBuf; pU4Tmp = (u32 *)pInBuf;
ret = _TRUE; ret = true;
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist)) if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
return _FALSE; return false;
switch (setType) { switch (setType) {
/* set some u8 type variables. */ /* 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 */ /* the following are some action which will be triggered */
case BTC_SET_ACT_GET_BT_RSSI: case BTC_SET_ACT_GET_BT_RSSI:
ret = _FALSE; ret = false;
break; break;
case BTC_SET_ACT_AGGREGATE_CTRL: 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: case BTC_SET_ACT_UPDATE_RAMASK:
pBtCoexist->bt_info.ra_mask = *pU4Tmp; 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; struct sta_info *psta;
PWLAN_BSSID_EX cur_network; PWLAN_BSSID_EX cur_network;
cur_network = &padapter->mlmeextpriv.mlmext_info.network; cur_network = &padapter->mlmeextpriv.mlmext_info.network;
psta = rtw_get_stainfo(&padapter->stapriv, cur_network->MacAddress); 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; break;
@ -1178,7 +1178,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
else if (*pU1Tmp == 1) else if (*pU1Tmp == 1)
newMimoPsMode = WLAN_HT_CAP_SM_PS_DISABLED; 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(padapter, get_my_bssid(&(pmlmeinfo->network)), newMimoPsMode); */
issue_action_SM_PS_wait_ack(padapter , get_my_bssid(&(pmlmeinfo->network)) , newMimoPsMode, 3 , 1); 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]); BT_SendEventExtBtInfoControl(padapter, dataLen, &tmpBuf[0]);
} }
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */ #else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
ret = _FALSE; ret = false;
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
break; break;
@ -1206,18 +1206,18 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
u8 tmpBuf[BTC_TMP_BUF_SHORT]; u8 tmpBuf[BTC_TMP_BUF_SHORT];
if (dataLen) if (dataLen)
_rtw_memcpy(tmpBuf, pU1Tmp + 1, 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 */ #else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
ret = _FALSE; ret = false;
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
break; break;
case BTC_SET_ACT_CTRL_8723B_ANT: case BTC_SET_ACT_CTRL_8723B_ANT:
ret = _FALSE; ret = false;
break; break;
/* ===================== */ /* ===================== */
default: default:
ret = _FALSE; ret = false;
break; break;
} }
@ -1232,21 +1232,21 @@ u8 halbtcoutsrc_UnderIps(PBTC_COEXIST pBtCoexist)
padapter = pBtCoexist->Adapter; padapter = pBtCoexist->Adapter;
pwrpriv = &padapter->dvobj->pwrctl_priv; 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) && (IPS_NONE != pwrpriv->ips_mode_req)
) )
return _TRUE; return true;
if (rf_off == pwrpriv->rf_pwrstate) if (rf_off == pwrpriv->rf_pwrstate)
return _TRUE; return true;
rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
if (_FALSE == bMacPwrCtrlOn) if (false == bMacPwrCtrlOn)
return _TRUE; return true;
return _FALSE; return false;
} }
u8 halbtcoutsrc_UnderLps(PBTC_COEXIST pBtCoexist) u8 halbtcoutsrc_UnderLps(PBTC_COEXIST pBtCoexist)
@ -1257,7 +1257,7 @@ u8 halbtcoutsrc_UnderLps(PBTC_COEXIST pBtCoexist)
u8 halbtcoutsrc_Under32K(PBTC_COEXIST pBtCoexist) u8 halbtcoutsrc_Under32K(PBTC_COEXIST pBtCoexist)
{ {
/* todo: the method to check whether wifi is under 32K or not */ /* todo: the method to check whether wifi is under 32K or not */
return _FALSE; return false;
} }
void halbtcoutsrc_DisplayCoexStatistics(PBTC_COEXIST pBtCoexist) void halbtcoutsrc_DisplayCoexStatistics(PBTC_COEXIST pBtCoexist)
@ -1286,10 +1286,10 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
u8 *cliBuf = pBtCoexist->cli_buf; u8 *cliBuf = pBtCoexist->cli_buf;
s32 wifiRssi = 0, btHsRssi = 0; 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 wifiBw = BTC_WIFI_BW_HT20, wifiTrafficDir = BTC_WIFI_TRAFFIC_TX, wifiFreq = BTC_FREQ_2_4G;
u32 wifiLinkStatus = 0x0; u32 wifiLinkStatus = 0x0;
bool bBtHsOn = _FALSE, bLowPower = _FALSE; bool bBtHsOn = false, bLowPower = false;
u8 wifiChnl = 0, wifiP2PChnl = 0, nScanAPNum = 0, FwPSState; u8 wifiChnl = 0, wifiP2PChnl = 0, nScanAPNum = 0, FwPSState;
u32 iqk_cnt_total = 0, iqk_cnt_ok = 0, iqk_cnt_fail = 0; 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); 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", 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, "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); CL_PRINTF(cliBuf);
if (wifiLinkStatus & WIFI_STA_CONNECTED) { if (wifiLinkStatus & WIFI_STA_CONNECTED) {
@ -1342,9 +1342,9 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
/* power status */ /* power status */
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s%s%s", "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_UnderIps(pBtCoexist) == true) ? "IPS ON" : "IPS OFF"),
((halbtcoutsrc_UnderLps(pBtCoexist) == _TRUE) ? ", LPS ON" : ", LPS OFF"), ((halbtcoutsrc_UnderLps(pBtCoexist) == true) ? ", LPS ON" : ", LPS OFF"),
((halbtcoutsrc_Under32K(pBtCoexist) == _TRUE) ? ", 32k" : "")); ((halbtcoutsrc_Under32K(pBtCoexist) == true) ? ", 32k" : ""));
CL_PRINTF(cliBuf); 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)", \ 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; pBtCoexist = (PBTC_COEXIST)pBtcContext;
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
u8 buf[3] = {0}; u8 buf[3] = {0};
unsigned long irqL; unsigned long irqL;
u8 op_code; 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) u8 halbtcoutsrc_SetBtAntDetection(void *pBtcContext, u8 txTime, u8 btChnl)
{ {
/* Always return _FALSE since we don't implement this yet */ /* Always return false since we don't implement this yet */
return _FALSE; return false;
} }
bool bool
@ -1588,8 +1588,8 @@ halbtcoutsrc_SetBtTRXMASK(
IN u8 bt_trx_mask IN u8 bt_trx_mask
) )
{ {
/* Always return _FALSE since we don't implement this yet */ /* Always return false since we don't implement this yet */
return _FALSE; return false;
} }
u16 halbtcoutsrc_GetBtReg_with_status(void *pBtcContext, u8 RegType, u32 RegAddr, u32 *data) 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; pBtCoexist = (PBTC_COEXIST)pBtcContext;
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
u8 buf[3] = {0}; u8 buf[3] = {0};
unsigned long irqL; unsigned long irqL;
u8 op_code; u8 op_code;
@ -1762,7 +1762,7 @@ u8 halbtcoutsrc_GetBleScanTypeFromBt(void *pBtcContext)
pBtCoexist = (PBTC_COEXIST)pBtcContext; pBtCoexist = (PBTC_COEXIST)pBtcContext;
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
u8 buf[3] = {0}; u8 buf[3] = {0};
unsigned long irqL; unsigned long irqL;
u8 op_code; u8 op_code;
@ -1794,7 +1794,7 @@ u32 halbtcoutsrc_GetBleScanParaFromBt(void *pBtcContext, u8 scanType)
pBtCoexist = (PBTC_COEXIST)pBtcContext; pBtCoexist = (PBTC_COEXIST)pBtcContext;
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) { if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == true) {
u8 buf[3] = {0}; u8 buf[3] = {0};
unsigned long irqL; unsigned long irqL;
u8 op_code; u8 op_code;
@ -1830,8 +1830,8 @@ u8 halbtcoutsrc_GetBtAFHMapFromBt(void *pBtcContext, u8 mapType, u8 *afhMap)
u8 status; u8 status;
u32 ret = BT_STATUS_BT_OP_SUCCESS; u32 ret = BT_STATUS_BT_OP_SUCCESS;
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _FALSE) if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == false)
return _FALSE; return false;
buf[0] = 0; buf[0] = 0;
buf[1] = mapType; buf[1] = mapType;
@ -1869,7 +1869,7 @@ exit:
_exit_critical_mutex(&GLBtcBtMpOperLock, &irqL); _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) u32 halbtcoutsrc_GetPhydmVersion(void *pBtcContext)
@ -1904,22 +1904,22 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter)
HAL_DATA_TYPE *pHalData = GET_HAL_DATA((PADAPTER)padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA((PADAPTER)padapter);
if (pBtCoexist->bBinded) if (pBtCoexist->bBinded)
return _FALSE; return false;
else else
pBtCoexist->bBinded = _TRUE; pBtCoexist->bBinded = true;
pBtCoexist->statistics.cnt_bind++; pBtCoexist->statistics.cnt_bind++;
pBtCoexist->Adapter = padapter; pBtCoexist->Adapter = padapter;
pBtCoexist->odm_priv = (void *)&(pHalData->odmpriv); 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.agg_buf_size = 5;
pBtCoexist->bt_info.increase_scan_dev_num = _FALSE; pBtCoexist->bt_info.increase_scan_dev_num = false;
pBtCoexist->bt_info.miracast_plus_bt = _FALSE; pBtCoexist->bt_info.miracast_plus_bt = false;
antNum = rtw_btcoex_get_pg_ant_num((PADAPTER)padapter); antNum = rtw_btcoex_get_pg_ant_num((PADAPTER)padapter);
EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_PG, antNum); EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_PG, antNum);
@ -1932,7 +1932,7 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter)
/* set default antenna position to main port */ /* set default antenna position to main port */
pBtCoexist->board_info.btdm_ant_pos = BTC_ANTENNA_AT_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.btdm_ant_num_by_ant_det = 1;
pBtCoexist->board_info.tfbga_package = rtw_btcoex_is_tfbga_package_type((PADAPTER)padapter); 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); pBtCoexist->board_info.ant_div_cfg = rtw_btcoex_get_ant_div_cfg((PADAPTER)padapter);
return _TRUE; return true;
} }
u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter) u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
@ -1995,15 +1995,15 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
pBtCoexist->cli_buf = &GLBtcDbgBuf[0]; 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*/ /* BT Control H2C/C2H*/
GLBtcBtMpOperSeq = 0; GLBtcBtMpOperSeq = 0;
@ -2018,7 +2018,7 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
GLBtcBtMpRptWiFiOK = 0; GLBtcBtMpRptWiFiOK = 0;
GLBtcBtMpRptBTOK = 0; GLBtcBtMpRptBTOK = 0;
return _TRUE; return true;
} }
void EXhalbtcoutsrc_PowerOnSetting(PBTC_COEXIST pBtCoexist) void EXhalbtcoutsrc_PowerOnSetting(PBTC_COEXIST pBtCoexist)
@ -2188,7 +2188,7 @@ void EXhalbtcoutsrc_init_coex_dm(PBTC_COEXIST pBtCoexist)
ex_halbtc8821c1ant_init_coex_dm(pBtCoexist); ex_halbtc8821c1ant_init_coex_dm(pBtCoexist);
} }
pBtCoexist->initilized = _TRUE; pBtCoexist->initilized = true;
} }
void EXhalbtcoutsrc_ips_notify(PBTC_COEXIST pBtCoexist, u8 type) 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) { if (IPS_NONE == type) {
ipsType = BTC_IPS_LEAVE; ipsType = BTC_IPS_LEAVE;
GLBtcWiFiInIPS = _FALSE; GLBtcWiFiInIPS = false;
} else { } else {
ipsType = BTC_IPS_ENTER; ipsType = BTC_IPS_ENTER;
GLBtcWiFiInIPS = _TRUE; GLBtcWiFiInIPS = true;
} }
/* All notify is called in cmd thread, don't need to leave low power again /* 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) { if (PS_MODE_ACTIVE == type) {
lpsType = BTC_LPS_DISABLE; lpsType = BTC_LPS_DISABLE;
GLBtcWiFiInLPS = _FALSE; GLBtcWiFiInLPS = false;
} else { } else {
lpsType = BTC_LPS_ENABLE; lpsType = BTC_LPS_ENABLE;
GLBtcWiFiInLPS = _TRUE; GLBtcWiFiInLPS = true;
} }
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) { if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
@ -2329,10 +2329,10 @@ void EXhalbtcoutsrc_scan_notify(PBTC_COEXIST pBtCoexist, u8 type)
if (type) { if (type) {
scanType = BTC_SCAN_START; scanType = BTC_SCAN_START;
GLBtcWiFiInScanState = _TRUE; GLBtcWiFiInScanState = true;
} else { } else {
scanType = BTC_SCAN_FINISH; scanType = BTC_SCAN_FINISH;
GLBtcWiFiInScanState = _FALSE; GLBtcWiFiInScanState = false;
} }
/* All notify is called in cmd thread, don't need to leave low power again /* 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 (IS_HARDWARE_TYPE_8723B(pBtCoexist->Adapter)) {
if (pBtCoexist->board_info.btdm_ant_num == 1) { if (pBtCoexist->board_info.btdm_ant_num == 1) {
pBtCoexist->stop_coex_dm = TRUE; pBtCoexist->stop_coex_dm = true;
ex_halbtc8723b1ant_coex_dm_reset(pBtCoexist); ex_halbtc8723b1ant_coex_dm_reset(pBtCoexist);
EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_DETECTED, 2); 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); ex_halbtc8723b2ant_init_coex_dm(pBtCoexist);
pBtCoexist->stop_coex_dm = FALSE; pBtCoexist->stop_coex_dm = false;
} }
} else if (IS_HARDWARE_TYPE_8723D(pBtCoexist->Adapter)) { } else if (IS_HARDWARE_TYPE_8723D(pBtCoexist->Adapter)) {
if (pBtCoexist->board_info.btdm_ant_num == 1) { if (pBtCoexist->board_info.btdm_ant_num == 1) {
pBtCoexist->stop_coex_dm = TRUE; pBtCoexist->stop_coex_dm = true;
ex_halbtc8723d1ant_coex_dm_reset(pBtCoexist); ex_halbtc8723d1ant_coex_dm_reset(pBtCoexist);
EXhalbtcoutsrc_SetAntNum(BT_COEX_ANT_TYPE_DETECTED, 2); 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); 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)) if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
return; return;
pBtCoexist->stack_info.profile_notified = _TRUE; pBtCoexist->stack_info.profile_notified = true;
pBtCoexist->stack_info.num_of_link = pBtCoexist->stack_info.num_of_link =
pBtMgnt->ExtConfig.NumberOfACL + pBtMgnt->ExtConfig.NumberOfSCO; pBtMgnt->ExtConfig.NumberOfACL + pBtMgnt->ExtConfig.NumberOfSCO;
/* reset first */ /* reset first */
pBtCoexist->stack_info.bt_link_exist = _FALSE; pBtCoexist->stack_info.bt_link_exist = false;
pBtCoexist->stack_info.sco_exist = _FALSE; pBtCoexist->stack_info.sco_exist = false;
pBtCoexist->stack_info.acl_exist = _FALSE; pBtCoexist->stack_info.acl_exist = false;
pBtCoexist->stack_info.a2dp_exist = _FALSE; pBtCoexist->stack_info.a2dp_exist = false;
pBtCoexist->stack_info.hid_exist = _FALSE; pBtCoexist->stack_info.hid_exist = false;
pBtCoexist->stack_info.num_of_hid = 0; pBtCoexist->stack_info.num_of_hid = 0;
pBtCoexist->stack_info.pan_exist = _FALSE; pBtCoexist->stack_info.pan_exist = false;
if (!pBtMgnt->ExtConfig.NumberOfACL) if (!pBtMgnt->ExtConfig.NumberOfACL)
pBtCoexist->stack_info.min_bt_rssi = 0; pBtCoexist->stack_info.min_bt_rssi = 0;
if (pBtCoexist->stack_info.num_of_link) { 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) if (pBtMgnt->ExtConfig.NumberOfSCO)
pBtCoexist->stack_info.sco_exist = _TRUE; pBtCoexist->stack_info.sco_exist = true;
if (pBtMgnt->ExtConfig.NumberOfACL) if (pBtMgnt->ExtConfig.NumberOfACL)
pBtCoexist->stack_info.acl_exist = _TRUE; pBtCoexist->stack_info.acl_exist = true;
} }
for (i = 0; i < pBtMgnt->ExtConfig.NumberOfACL; i++) { for (i = 0; i < pBtMgnt->ExtConfig.NumberOfACL; i++) {
if (BT_PROFILE_A2DP == pBtMgnt->ExtConfig.aclLink[i].BTProfile) 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) 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) { 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++; pBtCoexist->stack_info.num_of_hid++;
} else } else
pBtCoexist->stack_info.unknown_acl_exist = _TRUE; pBtCoexist->stack_info.unknown_acl_exist = true;
} }
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #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 (IS_HARDWARE_TYPE_8812(pBtCoexist->Adapter)) {
if (pBtCoexist->board_info.btdm_ant_num == 2) 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 * Check is co-exist mechanism enabled or not
* *
* Return: * Return:
* _TRUE Enable BT co-exist mechanism * true Enable BT co-exist mechanism
* _FALSE Disable BT co-exist mechanism * false Disable BT co-exist mechanism
*/ */
u8 hal_btcoex_IsBtExist(PADAPTER padapter) u8 hal_btcoex_IsBtExist(PADAPTER padapter)
{ {
@ -3202,12 +3202,12 @@ u8 hal_btcoex_IsBtExist(PADAPTER padapter)
u8 hal_btcoex_IsBtDisabled(PADAPTER padapter) u8 hal_btcoex_IsBtDisabled(PADAPTER padapter)
{ {
if (!hal_btcoex_IsBtExist(padapter)) if (!hal_btcoex_IsBtExist(padapter))
return _TRUE; return true;
if (GLBtCoexist.bt_info.bt_disabled) if (GLBtCoexist.bt_info.bt_disabled)
return _TRUE; return true;
else else
return _FALSE; return false;
} }
void hal_btcoex_SetChipType(PADAPTER padapter, u8 chipType) 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) void hal_btcoex_BtInfoNotify(PADAPTER padapter, u8 length, u8 *tmpBuf)
{ {
if (GLBtcWiFiInIQKState == _TRUE) if (GLBtcWiFiInIQKState == true)
return; return;
EXhalbtcoutsrc_bt_info_notify(&GLBtCoexist, tmpBuf, length); EXhalbtcoutsrc_bt_info_notify(&GLBtCoexist, tmpBuf, length);
@ -3366,7 +3366,7 @@ void hal_btcoex_HaltNotify(PADAPTER padapter, u8 do_halt)
if (do_halt == 1) if (do_halt == 1)
EXhalbtcoutsrc_halt_notify(&GLBtCoexist); EXhalbtcoutsrc_halt_notify(&GLBtCoexist);
GLBtCoexist.bBinded = _FALSE; GLBtCoexist.bBinded = false;
GLBtCoexist.Adapter = NULL; GLBtCoexist.Adapter = NULL;
} }
@ -3409,47 +3409,47 @@ void hal_btcoex_SetManualControl(PADAPTER padapter, u8 bmanual)
u8 hal_btcoex_1Ant(PADAPTER padapter) u8 hal_btcoex_1Ant(PADAPTER padapter)
{ {
if (hal_btcoex_IsBtExist(padapter) == _FALSE) if (hal_btcoex_IsBtExist(padapter) == false)
return _FALSE; return false;
if (GLBtCoexist.board_info.btdm_ant_num == 1) if (GLBtCoexist.board_info.btdm_ant_num == 1)
return _TRUE; return true;
return _FALSE; return false;
} }
u8 hal_btcoex_IsBtControlLps(PADAPTER padapter) u8 hal_btcoex_IsBtControlLps(PADAPTER padapter)
{ {
if (GLBtCoexist.bdontenterLPS == _TRUE) if (GLBtCoexist.bdontenterLPS == true)
return _TRUE; return true;
if (hal_btcoex_IsBtExist(padapter) == _FALSE) if (hal_btcoex_IsBtExist(padapter) == false)
return _FALSE; return false;
if (GLBtCoexist.bt_info.bt_disabled) if (GLBtCoexist.bt_info.bt_disabled)
return _FALSE; return false;
if (GLBtCoexist.bt_info.bt_ctrl_lps) if (GLBtCoexist.bt_info.bt_ctrl_lps)
return _TRUE; return true;
return _FALSE; return false;
} }
u8 hal_btcoex_IsLpsOn(PADAPTER padapter) u8 hal_btcoex_IsLpsOn(PADAPTER padapter)
{ {
if (GLBtCoexist.bdontenterLPS == _TRUE) if (GLBtCoexist.bdontenterLPS == true)
return _FALSE; return false;
if (hal_btcoex_IsBtExist(padapter) == _FALSE) if (hal_btcoex_IsBtExist(padapter) == false)
return _FALSE; return false;
if (GLBtCoexist.bt_info.bt_disabled) if (GLBtCoexist.bt_info.bt_disabled)
return _FALSE; return false;
if (GLBtCoexist.bt_info.bt_lps_on) if (GLBtCoexist.bt_info.bt_lps_on)
return _TRUE; return true;
return _FALSE; return false;
} }
u8 hal_btcoex_RpwmVal(PADAPTER padapter) u8 hal_btcoex_RpwmVal(PADAPTER padapter)
@ -3551,20 +3551,20 @@ exit:
u8 hal_btcoex_IncreaseScanDeviceNum(PADAPTER padapter) u8 hal_btcoex_IncreaseScanDeviceNum(PADAPTER padapter)
{ {
if (!hal_btcoex_IsBtExist(padapter)) if (!hal_btcoex_IsBtExist(padapter))
return _FALSE; return false;
if (GLBtCoexist.bt_info.increase_scan_dev_num) if (GLBtCoexist.bt_info.increase_scan_dev_num)
return _TRUE; return true;
return _FALSE; return false;
} }
u8 hal_btcoex_IsBtLinkExist(PADAPTER padapter) u8 hal_btcoex_IsBtLinkExist(PADAPTER padapter)
{ {
if (GLBtCoexist.bt_link_info.bt_link_exist) 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) 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); memset(pHalData->para_file_buf , 0 , MAX_PARA_FILE_BUF_LEN);
rtw_get_phy_file_path(Adapter, pFileName); 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); rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0) if (rlen > 0)
rtStatus = _SUCCESS; rtStatus = _SUCCESS;

View file

@ -90,19 +90,19 @@ void halwifionly_phy_set_bb_reg(void * pwifionlyContext, u32 RegAddr, u32 BitMas
void hal_btcoex_wifionly_switchband_notify(PADAPTER padapter) void hal_btcoex_wifionly_switchband_notify(PADAPTER padapter)
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(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) if (pHalData->current_band_type == BAND_ON_5G)
is_5g = _TRUE; is_5g = true;
} }
void hal_btcoex_wifionly_scan_notify(PADAPTER padapter) void hal_btcoex_wifionly_scan_notify(PADAPTER padapter)
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(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) if (pHalData->current_band_type == BAND_ON_5G)
is_5g = _TRUE; is_5g = true;
} }
void hal_btcoex_wifionly_hw_config(PADAPTER padapter) void hal_btcoex_wifionly_hw_config(PADAPTER padapter)

File diff suppressed because it is too large Load diff

View file

@ -778,7 +778,7 @@ void hal_load_txpwr_info(
u8 rfpath, ch_idx, group, tx_idx; u8 rfpath, ch_idx, group, tx_idx;
/* load from pg data (or default value) */ /* 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 */ /* transform to hal_data */
for (rfpath = 0; rfpath < MAX_RF_PATH; rfpath++) { 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); target = rtw_regsty_get_target_tx_power(adapter, band, path, rs);
if (target == -1) { if (target == -1) {
RTW_PRINT("%s return _FALSE for band:%d, path:%d, rs:%d, t:%d\n", __func__, band, path, rs, target); RTW_PRINT("%s return false for band:%d, path:%d, rs:%d, t:%d\n", __func__, band, path, rs, target);
return _FALSE; 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: 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) 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)) if (IS_VHT_RATE_SECTION(rs))
continue; 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); base = 2 * rtw_regsty_get_target_tx_power(pAdapter, band, path, rs);
else else
base = _PHY_GetTxPowerByRate(pAdapter, band, path, tx_num, rate_sec_base[rs]); 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) static bool phy_GetChnlIndex(u8 Channel, u8 *ChannelIdx)
{ {
u8 i = 0; u8 i = 0;
bool bIn24G = _TRUE; bool bIn24G = true;
if (Channel <= 14) { if (Channel <= 14) {
bIn24G = _TRUE; bIn24G = true;
*ChannelIdx = Channel - 1; *ChannelIdx = Channel - 1;
} else { } else {
bIn24G = _FALSE; bIn24G = false;
for (i = 0; i < CENTER_CH_5G_ALL_NUM; ++i) { for (i = 0; i < CENTER_CH_5G_ALL_NUM; ++i) {
if (center_ch_5g_all[i] == Channel) { if (center_ch_5g_all[i] == Channel) {
@ -1987,7 +1987,7 @@ PHY_GetTxPowerIndexBase(
u8 txPower = 0; u8 txPower = 0;
u8 chnlIdx = (Channel - 1); u8 chnlIdx = (Channel - 1);
if (HAL_IsLegalChannel(pAdapter, Channel) == _FALSE) { if (HAL_IsLegalChannel(pAdapter, Channel) == false) {
chnlIdx = 0; chnlIdx = 0;
RTW_INFO("Illegal channel!!\n"); RTW_INFO("Illegal channel!!\n");
} }
@ -2143,7 +2143,7 @@ PHY_GetTxPowerTrackingOffset(
struct PHY_DM_STRUCT *pDM_Odm = &pHalData->odmpriv; struct PHY_DM_STRUCT *pDM_Odm = &pHalData->odmpriv;
s8 offset = 0; s8 offset = 0;
if (pDM_Odm->rf_calibrate_info.txpowertrack_control == _FALSE) if (pDM_Odm->rf_calibrate_info.txpowertrack_control == false)
return offset; return offset;
if ((Rate == MGN_1M) || (Rate == MGN_2M) || (Rate == MGN_5_5M) || (Rate == MGN_11M)) { 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; goto exit;
} }
if (no_sc == _TRUE) { if (no_sc == true) {
/* use the input center channel and bandwidth directly */ /* use the input center channel and bandwidth directly */
cch = Channel; cch = Channel;
bw_bmp = ch_width_to_bw_cap(Bandwidth); 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)) if (!(ch_width_to_bw_cap(bw) & bw_bmp))
continue; continue;
if (no_sc == _FALSE) { if (no_sc == false) {
if (bw == CHANNEL_WIDTH_20) if (bw == CHANNEL_WIDTH_20)
cch = hal_data->cch_20; cch = hal_data->cch_20;
else if (bw == CHANNEL_WIDTH_40) else if (bw == CHANNEL_WIDTH_40)
@ -2816,11 +2816,11 @@ PHY_GetTxPowerLimit(
u8 Channel u8 Channel
) )
{ {
bool no_sc = _FALSE; bool no_sc = false;
/* MP mode channel don't use secondary channel */ /* MP mode channel don't use secondary channel */
if (rtw_mi_mp_mode_check(Adapter) == _TRUE) if (rtw_mi_mp_mode_check(Adapter) == true)
no_sc = _TRUE; no_sc = true;
return _phy_get_txpwr_lmt(Adapter, RegPwrTblSel, Band, Bandwidth, RfPath, DataRate, Channel, no_sc); return _phy_get_txpwr_lmt(Adapter, RegPwrTblSel, Band, Bandwidth, RfPath, DataRate, Channel, no_sc);
} }
@ -2836,7 +2836,7 @@ PHY_GetTxPowerLimit_no_sc(
u8 Channel 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 #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" 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); , Band, Regulation, Bandwidth, RateSection, RfPath, Channel, PowerLimit);
if (GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel) == _FALSE if (GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel) == false
|| GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit) == _FALSE || GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit) == false
) { ) {
RTW_PRINT("Illegal index of power limit table [ch %s][val %s]\n", Channel, PowerLimit); RTW_PRINT("Illegal index of power limit table [ch %s][val %s]\n", Channel, PowerLimit);
return; return;
@ -3484,8 +3484,8 @@ bool phy_is_tx_power_limit_needed(_adapter *adapter)
if (regsty->RegEnableTxPowerLimit == 1 if (regsty->RegEnableTxPowerLimit == 1
|| (regsty->RegEnableTxPowerLimit == 2 && hal_data->EEPROMRegulatory == 1)) || (regsty->RegEnableTxPowerLimit == 2 && hal_data->EEPROMRegulatory == 1))
return _TRUE; return true;
return _FALSE; return false;
} }
bool phy_is_tx_power_by_rate_needed(_adapter *adapter) 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 if (regsty->RegEnableTxPowerByRate == 1
|| (regsty->RegEnableTxPowerByRate == 2 && hal_data->EEPROMRegulatory != 2)) || (regsty->RegEnableTxPowerByRate == 2 && hal_data->EEPROMRegulatory != 2))
return _TRUE; return true;
return _FALSE; return false;
} }
int phy_load_tx_power_by_rate(_adapter *adapter, u8 chk_file) 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; hal_data->txpwr_limit_loaded = 0;
PHY_InitTxPowerLimit(adapter); 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__); RTW_ERR("%s():Read Tx power limit before target tx power is specify\n", __func__);
goto exit; goto exit;
} }
@ -3598,7 +3598,7 @@ void phy_load_tx_power_ext_info(_adapter *adapter, u8 chk_file)
/* power by rate and limit */ /* power by rate and limit */
if (phy_is_tx_power_by_rate_needed(adapter) 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); 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); struct registry_priv *regsty = adapter_to_regsty(adapter);
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(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"); RTW_PRINT_SEL(sel, "target_tx_power: from registry\n");
else if (phy_is_tx_power_by_rate_needed(adapter)) else if (phy_is_tx_power_by_rate_needed(adapter))
RTW_PRINT_SEL(sel, "target_tx_power: from power by rate\n"); 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; break;
RTW_PRINT_SEL(sel, "[%s][%c]%s\n", band_str(band), rf_path_char(path) 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++) { for (rs = 0; rs < RATE_SECTION_NUM; rs++) {
tx_num = rate_section_to_tx_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 #endif
len += snprintf(rtw_phy_para_file_path + len, PATH_LENGTH_MAX - len, "%s", file_name); len += snprintf(rtw_phy_para_file_path + len, PATH_LENGTH_MAX - len, "%s", file_name);
return _TRUE; return true;
} }
#endif #endif
return _FALSE; return false;
} }
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE #ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
@ -3961,7 +3961,7 @@ phy_ConfigMACWithParaFile(
if ((pHalData->mac_reg_len == 0) && (pHalData->mac_reg == NULL)) { if ((pHalData->mac_reg_len == 0) && (pHalData->mac_reg == NULL)) {
rtw_get_phy_file_path(Adapter, pFileName); 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); rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0) { if (rlen > 0) {
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
@ -4040,7 +4040,7 @@ phy_ConfigBBWithParaFile(
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) { if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) {
rtw_get_phy_file_path(Adapter, pFileName); 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); rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0) { if (rlen > 0) {
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
@ -4157,7 +4157,7 @@ static int phy_ParseBBPgParaFile(PADAPTER Adapter, char *buffer)
char *szLine, *ptmp; char *szLine, *ptmp;
u32 u4bRegOffset, u4bRegMask, u4bRegValue; u32 u4bRegOffset, u4bRegMask, u4bRegValue;
u32 u4bMove; u32 u4bMove;
bool firstLine = _TRUE; bool firstLine = true;
u8 tx_num = 0; u8 tx_num = 0;
u8 band = 0, rf_path = 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)) { if (eqNByte(szLine + 5, (u8 *)("[Exact]#"), 8)) {
pHalData->odmpriv.phy_reg_pg_value_type = PHY_REG_PG_EXACT_VALUE; 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"); */ /* RTW_INFO("The values in PHY_REG_PG are exact values ok\n"); */
firstLine = _FALSE; firstLine = false;
continue; continue;
} else if (eqNByte(szLine + 5, (u8 *)("[Relative]#"), 11)) { } else if (eqNByte(szLine + 5, (u8 *)("[Relative]#"), 11)) {
pHalData->odmpriv.phy_reg_pg_value_type = PHY_REG_PG_RELATIVE_VALUE; 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"); */ /* RTW_INFO("The values in PHY_REG_PG are relative values ok\n"); */
firstLine = _FALSE; firstLine = false;
continue; continue;
} else { } else {
RTW_INFO("The values in PHY_REG_PG are invalid %s\n", szLine); 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) { if (pHalData->bb_phy_reg_pg == NULL) {
rtw_get_phy_file_path(Adapter, pFileName); 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); rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0) { if (rlen > 0) {
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
@ -4467,7 +4467,7 @@ phy_ConfigBBWithMpParaFile(
if ((pHalData->bb_phy_reg_mp_len == 0) && (pHalData->bb_phy_reg_mp == NULL)) { if ((pHalData->bb_phy_reg_mp_len == 0) && (pHalData->bb_phy_reg_mp == NULL)) {
rtw_get_phy_file_path(Adapter, pFileName); 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); rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0) { if (rlen > 0) {
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
@ -4571,7 +4571,7 @@ PHY_ConfigRFWithParaFile(
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) { if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) {
rtw_get_phy_file_path(Adapter, pFileName); 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); rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0) { if (rlen > 0) {
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
@ -4766,7 +4766,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
if ((pHalData->rf_tx_pwr_track_len == 0) && (pHalData->rf_tx_pwr_track == NULL)) { if ((pHalData->rf_tx_pwr_track_len == 0) && (pHalData->rf_tx_pwr_track == NULL)) {
rtw_get_phy_file_path(Adapter, pFileName); 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); rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0) { if (rlen > 0) {
rtStatus = _SUCCESS; rtStatus = _SUCCESS;
@ -5083,7 +5083,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile(
if (pHalData->rf_tx_pwr_lmt == NULL) { if (pHalData->rf_tx_pwr_lmt == NULL) {
rtw_get_phy_file_path(Adapter, pFileName); 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); rlen = rtw_retrieve_from_file(rtw_phy_para_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0) { if (rlen > 0) {
rtStatus = _SUCCESS; rtStatus = _SUCCESS;

View file

@ -158,9 +158,9 @@ void Init_ODM_ComInfo(_adapter *adapter)
/*Add by YuChen for adaptivity init*/ /*Add by YuChen for adaptivity init*/
odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_ADAPTIVITY, &(adapter->registrypriv.adaptivity_en)); 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_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_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); 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); phydm_init_debug_setting(pDM_Odm);
/* TODO */ /* TODO */
/* odm_cmn_info_hook(pDM_Odm, ODM_CMNINFO_BT_OPERATION, _FALSE); */ /* 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_DISABLE_EDCA, false); */
} }

View file

@ -197,7 +197,7 @@ void rtw_hal_init_opmode(_adapter *padapter)
else else
return; return;
rtw_setopmode_cmd(padapter, networkType, _FALSE); rtw_setopmode_cmd(padapter, networkType, false);
} }
uint rtw_hal_init(_adapter *padapter) uint rtw_hal_init(_adapter *padapter)
@ -210,7 +210,7 @@ uint rtw_hal_init(_adapter *padapter)
status = padapter->hal_func.hal_init(padapter); status = padapter->hal_func.hal_init(padapter);
if (status == _SUCCESS) { if (status == _SUCCESS) {
pHalData->hw_init_completed = _TRUE; pHalData->hw_init_completed = true;
rtw_restore_mac_addr(padapter); rtw_restore_mac_addr(padapter);
if (padapter->registrypriv.notch_filter == 1) if (padapter->registrypriv.notch_filter == 1)
@ -230,7 +230,7 @@ uint rtw_hal_init(_adapter *padapter)
#endif /*CONFIG_RF_POWER_TRIM*/ #endif /*CONFIG_RF_POWER_TRIM*/
} else { } else {
pHalData->hw_init_completed = _FALSE; pHalData->hw_init_completed = false;
RTW_INFO("rtw_hal_init: hal_init fail\n"); RTW_INFO("rtw_hal_init: hal_init fail\n");
} }
@ -250,7 +250,7 @@ uint rtw_hal_deinit(_adapter *padapter)
if (status == _SUCCESS) { if (status == _SUCCESS) {
rtw_led_control(padapter, LED_CTL_POWER_OFF); rtw_led_control(padapter, LED_CTL_POWER_OFF);
pHalData->hw_init_completed = _FALSE; pHalData->hw_init_completed = false;
} else } else
RTW_INFO("\n rtw_hal_deinit: hal_init fail\n"); 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 rtw_hal_check_ips_status(_adapter *padapter)
{ {
u8 val = _FALSE; u8 val = false;
if (padapter->hal_func.check_ips_status) if (padapter->hal_func.check_ips_status)
val = padapter->hal_func.check_ips_status(padapter); val = padapter->hal_func.check_ips_status(padapter);
else 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); */ /* _rtw_memcpy(pmgntframe->attrib.ra, pwlanhdr->addr1, ETH_ALEN); */
#ifdef CONFIG_IEEE80211W #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)) { subtype == WIFI_ACTION)) {
if (IS_MCAST(pmgntframe->attrib.ra) && pmgntframe->attrib.key_type != IEEE80211W_NO_KEY) { if (IS_MCAST(pmgntframe->attrib.ra) && pmgntframe->attrib.key_type != IEEE80211W_NO_KEY) {
pmgntframe->attrib.encrypt = _BIP_; pmgntframe->attrib.encrypt = _BIP_;
/* pmgntframe->attrib.bswenc = _TRUE; */ /* pmgntframe->attrib.bswenc = true; */
} else if (pmgntframe->attrib.key_type != IEEE80211W_NO_KEY) { } else if (pmgntframe->attrib.key_type != IEEE80211W_NO_KEY) {
psta = rtw_get_stainfo(pstapriv, pmgntframe->attrib.ra); 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.encrypt = _AES_;
pmgntframe->attrib.bswenc = _TRUE; pmgntframe->attrib.bswenc = true;
} else { } 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; 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_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter); 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; u32 ratr_bitmap_msb = 0, ratr_bitmap_lsb = 0;
u64 mask = 0, rate_bitmap = 0; u64 mask = 0, rate_bitmap = 0;
u8 bw, short_gi; 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); 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); add_RATid(padapter, psta, rssi_level, is_update_bw);
else { else {
psta->raid = rtw_hal_networktype_to_raid(padapter, psta); 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; u8 cch_20 = Bandwidth == CHANNEL_WIDTH_20 ? channel : 0;
odm_acquire_spin_lock(pDM_Odm, RT_IQK_SPINLOCK); 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__); RTW_ERR("%s, %d, IQK may race condition\n", __func__, __LINE__);
odm_release_spin_lock(pDM_Odm, RT_IQK_SPINLOCK); odm_release_spin_lock(pDM_Odm, RT_IQK_SPINLOCK);
/* MP mode channel don't use secondary channel */ /* 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) if (cch_80 != 0)
cch_40 = rtw_get_scch_by_cch_offset(cch_80, CHANNEL_WIDTH_80, Offset80); cch_40 = rtw_get_scch_by_cch_offset(cch_80, CHANNEL_WIDTH_80, Offset80);
if (cch_40 != 0) if (cch_40 != 0)
@ -633,7 +633,7 @@ void rtw_hal_dm_watchdog_in_lps(_adapter *padapter)
#endif #endif
#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 */ 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 */ /* no handle, goto default */
default: default:
if (phydm_c2H_content_parsing(odm, id, plen, payload) != TRUE) if (phydm_c2H_content_parsing(odm, id, plen, payload) != true)
ret = _FAIL; ret = _FAIL;
break; 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_BCN_EARLY_RPT:
case C2H_AP_REQ_TXRPT: case C2H_AP_REQ_TXRPT:
case C2H_SPC_STAT: case C2H_SPC_STAT:
return _TRUE; return true;
default: default:
return _FALSE; return false;
} }
} }
#endif /* !RTW_HALMAC */ #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); struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj);
u8 support; u8 support;
support = _FALSE; support = false;
rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support); rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support);
if (_FALSE == support) if (false == support)
return _FAIL; return _FAIL;
if (macid >= macid_ctl->num) { 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); struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj);
u8 support; u8 support;
support = _FALSE; support = false;
rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support); rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support);
if (_FALSE == support) if (false == support)
return _FAIL; return _FAIL;
if (macid >= macid_ctl->num) { 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); _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); return padapter->hal_func.fill_h2c_cmd(padapter, ElementID, CmdLen, pCmdBuffer);
else if (padapter->registrypriv.mp_mode == 0) 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" 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 * Initialize MAC registers
* *
* Return: * Return:
* _TRUE success * true success
* _FALSE fail * false fail
*/ */
u8 rtw_hal_init_mac_register(PADAPTER adapter) 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 * Initialize PHY(BB/RF) related functions
* *
* Return: * Return:
* _TRUE success * true success
* _FALSE fail * false fail
*/ */
u8 rtw_hal_init_phy(PADAPTER adapter) 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); ret = adapter->hal_func.hal_radio_onoff_check(adapter, valid);
else { else {
*valid = 0; *valid = 0;
ret = _FALSE; ret = false;
} }
return ret; return ret;
} }

View file

@ -178,7 +178,7 @@ static void rtw_hal_mcc_update_go_p2p_ie(PADAPTER padapter)
} }
printk("\n"); 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; return;
pmccadapriv->p2p_go_noa_ie_len = 0; 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 */ /* restore IQK value for all interface */
void rtw_hal_mcc_restore_iqk_val(PADAPTER padapter) 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); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
_adapter *iface = NULL; _adapter *iface = NULL;
u8 i = 0; u8 i = 0;
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_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++) { for (i = 0; i < dvobj->iface_nums; i++) {
iface = dvobj->padapters[i]; iface = dvobj->padapters[i];
if (iface == NULL) 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); struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv);
if (pmccobjpriv->mcc_status & (mcc_status)) if (pmccobjpriv->mcc_status & (mcc_status))
return _TRUE; return true;
else else
return _FALSE; return false;
} }
void rtw_hal_set_mcc_status(PADAPTER padapter, u8 mcc_status) 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_memcpy(bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
rtw_hal_construct_NullFunctionData(iface 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], 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); CurtPktPageNum = (u8)PageNum(tx_desc + len, page_size);
*page_num += CurtPktPageNum; *page_num += CurtPktPageNum;
@ -570,7 +570,7 @@ u8 rtw_hal_dl_mcc_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 *index,
len = 0; len = 0;
rtw_hal_construct_CTS(iface, &pframe[*index], &len); rtw_hal_construct_CTS(iface, &pframe[*index], &len);
rtw_hal_fill_fake_txdesc(iface, &pframe[*index-tx_desc], 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); CurtPktPageNum = (u8)PageNum(tx_desc + len, page_size);
*page_num += CurtPktPageNum; *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; duration = iface->mcc_adapterpriv.mcc_duration;
role = iface->mcc_adapterpriv.role; role = iface->mcc_adapterpriv.role;
incurch = _FALSE; incurch = false;
if (IS_HARDWARE_TYPE_8812(padapter)) if (IS_HARDWARE_TYPE_8812(padapter))
rfetype = pHalData->rfe_type; /* RFETYPE (only for 8812)*/ 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); rtw_hal_set_mcc_macid_cmd(padapter);
/* set mcc parameter */ /* set mcc parameter */
rtw_hal_set_mcc_ctrl_cmd(padapter, _FALSE); rtw_hal_set_mcc_ctrl_cmd(padapter, false);
exit: exit:
return ret; return ret;
@ -982,7 +982,7 @@ static void rtw_hal_set_mcc_stop_setting(PADAPTER padapter, u8 status)
continue; continue;
/* use other interface to set cmd */ /* use other interface to set cmd */
if (iface != padapter) { if (iface != padapter) {
rtw_hal_set_mcc_ctrl_cmd(iface, _TRUE); rtw_hal_set_mcc_ctrl_cmd(iface, true);
break; break;
} }
} }
@ -1058,7 +1058,7 @@ static u8 rtw_hal_set_mcc_setting(PADAPTER padapter, u8 status)
{ {
u8 ret = _FAIL; u8 ret = _FAIL;
struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv); 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(); u32 start_time = rtw_get_current_time();
RTW_INFO("===> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); 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); rtw_sctx_init(&pmccobjpriv->mcc_sctx, MCC_EXPIRE_TIME);
pmccobjpriv->mcc_c2h_status = MCC_RPT_MAX; pmccobjpriv->mcc_c2h_status = MCC_RPT_MAX;
if (stop == _FALSE) { if (stop == false) {
/* handle mcc start */ /* handle mcc start */
if (rtw_hal_set_mcc_start_setting(padapter, status) == _FAIL) if (rtw_hal_set_mcc_start_setting(padapter, status) == _FAIL)
goto exit; 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 */ /* for both interface are VHT80, doesn't limit_traffic according to iperf results */
if (cur_bw == CHANNEL_WIDTH_80 && next_bw == CHANNEL_WIDTH_80) { if (cur_bw == CHANNEL_WIDTH_80 && next_bw == CHANNEL_WIDTH_80) {
cur_iface->mcc_adapterpriv.mcc_tp_limit = _FALSE; cur_iface->mcc_adapterpriv.mcc_tp_limit = false;
next_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 */ /* check single TX or cuncurrnet TX */
if (next_mccadapriv->mcc_tp < single_tx_cri) { if (next_mccadapriv->mcc_tp < single_tx_cri) {
/* single TX, does not stop */ /* single TX, does not stop */
cur_mccadapriv->mcc_tx_stop = _FALSE; cur_mccadapriv->mcc_tx_stop = false;
cur_mccadapriv->mcc_tp_limit = _FALSE; cur_mccadapriv->mcc_tp_limit = false;
} else { } else {
/* concurrent TX, stop */ /* concurrent TX, stop */
cur_mccadapriv->mcc_tx_stop = _TRUE; cur_mccadapriv->mcc_tx_stop = true;
cur_mccadapriv->mcc_tp_limit = _TRUE; cur_mccadapriv->mcc_tp_limit = true;
} }
if (cur_mccadapriv->mcc_tp < single_tx_cri) { if (cur_mccadapriv->mcc_tp < single_tx_cri) {
next_mccadapriv->mcc_tx_stop = _FALSE; next_mccadapriv->mcc_tx_stop = false;
next_mccadapriv->mcc_tp_limit = _FALSE; next_mccadapriv->mcc_tp_limit = false;
} else { } else {
next_mccadapriv->mcc_tx_stop = _FALSE; next_mccadapriv->mcc_tx_stop = false;
next_mccadapriv->mcc_tp_limit = _TRUE; next_mccadapriv->mcc_tp_limit = true;
next_mccadapriv->mcc_tx_bytes_to_port = 0; 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 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 dvobj_priv *dvobj = adapter_to_dvobj(padapter);
struct mcc_adapter_priv *pmccadapriv = NULL; struct mcc_adapter_priv *pmccadapriv = NULL;
struct mlme_ext_priv *pmlmeext = 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; *ch = pmlmeext->cur_channel;
*bw = pmlmeext->cur_bwmode; *bw = pmlmeext->cur_bwmode;
*offset = pmlmeext->cur_ch_offset; *offset = pmlmeext->cur_ch_offset;
need_ch_setting_union = _FALSE; need_ch_setting_union = false;
break; break;
case MCC_ROLE_STA: case MCC_ROLE_STA:
case MCC_ROLE_GC: 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 (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)) {
if (pmccadapriv->mcc_tp_limit) { if (pmccadapriv->mcc_tp_limit) {
if (pmccadapriv->mcc_tx_bytes_to_port >= pmccadapriv->mcc_target_tx_bytes_to_port) { 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); 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)) { if (MCC_EN(padapter)) {
/* channel bw offset can not be allowed, start MCC */ /* 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); struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv);
rtw_hal_mcc_restore_iqk_val(padapter); 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); rtw_mi_status_no_self(padapter, &mstate);
if (MSTATE_STA_LD_NUM(&mstate) || MSTATE_STA_LG_NUM(&mstate) || MSTATE_AP_NUM(&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; u8 u_ch, u_offset, u_bw;
struct mlme_ext_priv *cur_mlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *cur_mlmeext = &padapter->mlmeextpriv;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); 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); , FUNC_ADPT_ARG(padapter), chbw_allow);
/* if chbw_allow = false, start MCC setting */ /* if chbw_allow = false, start MCC setting */
if (chbw_allow == _FALSE) { if (chbw_allow == false) {
struct mcc_obj_priv *pmccobjpriv = &dvobj->mcc_objpriv; struct mcc_obj_priv *pmccobjpriv = &dvobj->mcc_objpriv;
rtw_hal_mcc_restore_iqk_val(padapter); 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; 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)) { if (MCC_EN(padapter)) {
/* restore union channel related setting to current channel related setting */ /* 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; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
*ch = pmlmeext->cur_channel; *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) 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); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
_adapter *iface; _adapter *iface;
struct mlme_ext_priv *mlmeext; 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 #ifdef DBG_EXPIRATION_CHK
RTW_INFO(FUNC_ADPT_FMT" don't enter %s under scan for MCC mode\n", FUNC_ADPT_ARG(padapter), msg); RTW_INFO(FUNC_ADPT_FMT" don't enter %s under scan for MCC mode\n", FUNC_ADPT_ARG(padapter), msg);
#endif #endif
ret = _FALSE; ret = false;
goto exit; 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)) if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC))
return; return;
if (chbw_allow == _TRUE) if (chbw_allow == true)
return; return;
for (i = 0; i < dvobj->iface_nums; i++) { for (i = 0; i < dvobj->iface_nums; i++) {

View file

@ -74,13 +74,13 @@ s32 hal_mpt_SetPowerTracking(PADAPTER padapter, u8 enable)
return _FAIL; return _FAIL;
} }
if (check_fwstate(&padapter->mlmepriv, WIFI_MP_STATE) == _FALSE) { if (check_fwstate(&padapter->mlmepriv, WIFI_MP_STATE) == false) {
return _FAIL; return _FAIL;
} }
if (enable) if (enable)
pDM_Odm->rf_calibrate_info.txpowertrack_control = _TRUE; pDM_Odm->rf_calibrate_info.txpowertrack_control = true;
else else
pDM_Odm->rf_calibrate_info.txpowertrack_control = _FALSE; pDM_Odm->rf_calibrate_info.txpowertrack_control = false;
return _SUCCESS; return _SUCCESS;
} }
@ -109,9 +109,9 @@ void hal_mpt_CCKTxPowerAdjust(PADAPTER Adapter, bool bInCH14)
DataRate = mpt_to_mgnt_rate(ulRateIdx); DataRate = mpt_to_mgnt_rate(ulRateIdx);
if (u1Channel == 14 && IS_CCK_RATE(DataRate)) if (u1Channel == 14 && IS_CCK_RATE(DataRate))
pHalData->bCCKinCH14 = TRUE; pHalData->bCCKinCH14 = true;
else else
pHalData->bCCKinCH14 = FALSE; pHalData->bCCKinCH14 = false;
/* get current cck swing value and check 0xa22 & 0xa23 later to match the table.*/ /* get current cck swing value and check 0xa22 & 0xa23 later to match the table.*/
CurrCCKSwingVal = read_bbreg(Adapter, rCCK0_TxFilter1, bMaskHWord); CurrCCKSwingVal = read_bbreg(Adapter, rCCK0_TxFilter1, bMaskHWord);
@ -185,8 +185,8 @@ void hal_mpt_SetChannel(PADAPTER pAdapter)
hal_mpt_SwitchRfSetting(pAdapter); hal_mpt_SwitchRfSetting(pAdapter);
pHalData->bSwChnl = _TRUE; pHalData->bSwChnl = true;
pHalData->bSetChnlBW = _TRUE; pHalData->bSetChnlBW = true;
rtw_hal_set_chnl_bw(pAdapter, channel, bandwidth, 0, 0); rtw_hal_set_chnl_bw(pAdapter, channel, bandwidth, 0, 0);
hal_mpt_CCKTxPowerAdjust(pAdapter, pHalData->bCCKinCH14); hal_mpt_CCKTxPowerAdjust(pAdapter, pHalData->bCCKinCH14);
@ -205,8 +205,8 @@ void hal_mpt_SetBandwidth(PADAPTER pAdapter)
u8 channel = pmp->channel; u8 channel = pmp->channel;
u8 bandwidth = pmp->bandwidth; u8 bandwidth = pmp->bandwidth;
pHalData->bSwChnl = _TRUE; pHalData->bSwChnl = true;
pHalData->bSetChnlBW = _TRUE; pHalData->bSetChnlBW = true;
rtw_hal_set_chnl_bw(pAdapter, channel, bandwidth, 0, 0); rtw_hal_set_chnl_bw(pAdapter, channel, bandwidth, 0, 0);
hal_mpt_SwitchRfSetting(pAdapter); 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; return _FAIL;
} }
@ -765,8 +765,8 @@ static void mpt_StopCckContTx(
PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx); PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx);
u8 u1bReg; u8 u1bReg;
pMptCtx->bCckContTx = FALSE; pMptCtx->bCckContTx = false;
pMptCtx->bOfdmContTx = FALSE; pMptCtx->bOfdmContTx = false;
phy_set_bb_reg(pAdapter, rCCK0_System, bCCKBBMode, 0x0); /*normal mode*/ phy_set_bb_reg(pAdapter, rCCK0_System, bCCKBBMode, 0x0); /*normal mode*/
phy_set_bb_reg(pAdapter, rCCK0_System, bCCKScramble, 0x1); /*turn on scramble setting*/ phy_set_bb_reg(pAdapter, rCCK0_System, bCCKScramble, 0x1); /*turn on scramble setting*/
@ -790,8 +790,8 @@ static void mpt_StopOfdmContTx(
u8 u1bReg; u8 u1bReg;
u32 data; u32 data;
pMptCtx->bCckContTx = FALSE; pMptCtx->bCckContTx = false;
pMptCtx->bOfdmContTx = FALSE; pMptCtx->bOfdmContTx = false;
phy_set_bb_reg(pAdapter, rOFDM1_LSTF, BIT30 | BIT29 | BIT28, OFDM_ALL_OFF); 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_XA_HSSIParameter1, bMaskDWord, 0x01000500);
phy_set_bb_reg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500); phy_set_bb_reg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500);
pMptCtx->bCckContTx = TRUE; pMptCtx->bCckContTx = true;
pMptCtx->bOfdmContTx = FALSE; pMptCtx->bOfdmContTx = false;
} /* mpt_StartCckContTx */ } /* 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_XA_HSSIParameter1, bMaskDWord, 0x01000500);
phy_set_bb_reg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500); phy_set_bb_reg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500);
pMptCtx->bCckContTx = FALSE; pMptCtx->bCckContTx = false;
pMptCtx->bOfdmContTx = TRUE; pMptCtx->bOfdmContTx = true;
} /* mpt_StartOfdmContTx */ } /* mpt_StartOfdmContTx */
void hal_mpt_SetContinuousTx(PADAPTER pAdapter, u8 bStart) void hal_mpt_SetContinuousTx(PADAPTER pAdapter, u8 bStart)

View file

@ -101,7 +101,7 @@ PHY_RFShadowWrite(
u32 Data) u32 Data)
{ {
RF_Shadow[eRFPath][Offset].Value = (Data & bRFRegOffsetMask); RF_Shadow[eRFPath][Offset].Value = (Data & bRFRegOffsetMask);
RF_Shadow[eRFPath][Offset].Driver_Write = _TRUE; RF_Shadow[eRFPath][Offset].Driver_Write = true;
} /* PHY_RFShadowWrite */ } /* PHY_RFShadowWrite */
@ -114,16 +114,16 @@ PHY_RFShadowCompare(
{ {
u32 reg; u32 reg;
/* Check if we need to check the register */ /* 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); reg = rtw_hal_read_rfreg(Adapter, eRFPath, Offset, bRFRegOffsetMask);
/* Compare shadow and real rf register for 20bits!! */ /* Compare shadow and real rf register for 20bits!! */
if (RF_Shadow[eRFPath][Offset].Value != reg) { if (RF_Shadow[eRFPath][Offset].Value != reg) {
/* Locate error position. */ /* Locate error position. */
RF_Shadow[eRFPath][Offset].ErrorOrNot = _TRUE; RF_Shadow[eRFPath][Offset].ErrorOrNot = true;
} }
return RF_Shadow[eRFPath][Offset].ErrorOrNot ; return RF_Shadow[eRFPath][Offset].ErrorOrNot ;
} }
return _FALSE; return false;
} /* PHY_RFShadowCompare */ } /* PHY_RFShadowCompare */
@ -134,9 +134,9 @@ PHY_RFShadowRecorver(
u32 Offset) u32 Offset)
{ {
/* Check if the address is error */ /* 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. */ /* 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, rtw_hal_write_rfreg(Adapter, eRFPath, Offset, bRFRegOffsetMask,
RF_Shadow[eRFPath][Offset].Value); RF_Shadow[eRFPath][Offset].Value);
} }
@ -212,9 +212,9 @@ PHY_RFShadowCompareFlagSetAll(
for (Offset = 0; Offset < maxReg; Offset++) { for (Offset = 0; Offset < maxReg; Offset++) {
/* 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!! */ /* 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!! */
if (Offset != 0x26 && Offset != 0x27) if (Offset != 0x26 && Offset != 0x27)
PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, _FALSE); PHY_RFShadowCompareFlagSet(Adapter, eRFPath, Offset, false);
else 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++) { for (Offset = 0; Offset < maxReg; Offset++) {
/* 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!! */ /* 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!! */
if (Offset != 0x26 && Offset != 0x27) if (Offset != 0x26 && Offset != 0x27)
PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, _FALSE); PHY_RFShadowRecorverFlagSet(Adapter, eRFPath, Offset, false);
else 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 (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++) {
for (Offset = 0; Offset < maxReg; Offset++) { for (Offset = 0; Offset < maxReg; Offset++) {
RF_Shadow[eRFPath][Offset].Value = 0; RF_Shadow[eRFPath][Offset].Value = 0;
RF_Shadow[eRFPath][Offset].Compare = _FALSE; RF_Shadow[eRFPath][Offset].Compare = false;
RF_Shadow[eRFPath][Offset].Recorver = _FALSE; RF_Shadow[eRFPath][Offset].Recorver = false;
RF_Shadow[eRFPath][Offset].ErrorOrNot = _FALSE; RF_Shadow[eRFPath][Offset].ErrorOrNot = false;
RF_Shadow[eRFPath][Offset].Driver_Write = _FALSE; RF_Shadow[eRFPath][Offset].Driver_Write = false;
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -481,7 +481,7 @@ phydm_get_structure(
void *p_struct = NULL; void *p_struct = NULL;
switch (structure_type) { switch (structure_type) {
case PHYDM_FALSEALMCNT: case PHYDMfalseALMCNT:
p_struct = &(p_dm_odm->false_alm_cnt); p_struct = &(p_dm_odm->false_alm_cnt);
break; break;
case PHYDM_CFOTRACK: case PHYDM_CFOTRACK:
@ -1371,7 +1371,7 @@ phydm_cmn_info_query(
enum phydm_info_query_e info_type 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) { switch (info_type) {
case PHYDM_INFO_FA_OFDM: case PHYDM_INFO_FA_OFDM:
@ -1658,7 +1658,7 @@ odm_update_power_training_state(
struct PHY_DM_STRUCT *p_dm_odm 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; struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table;
u32 score = 0; u32 score = 0;

View file

@ -703,8 +703,8 @@ struct PHY_DM_STRUCT {
#endif #endif
struct _dynamic_primary_cca dm_pri_cca; struct _dynamic_primary_cca dm_pri_cca;
struct _rate_adaptive_table_ dm_ra_table; struct _rate_adaptive_table_ dm_ra_table;
struct _FALSE_ALARM_STATISTICS false_alm_cnt; struct false_ALARM_STATISTICS false_alm_cnt;
struct _FALSE_ALARM_STATISTICS flase_alm_cnt_buddy_adapter; struct false_ALARM_STATISTICS flase_alm_cnt_buddy_adapter;
struct _sw_antenna_switch_ dm_swat_table; struct _sw_antenna_switch_ dm_swat_table;
struct _CFO_TRACKING_ dm_cfo_track; struct _CFO_TRACKING_ dm_cfo_track;
struct _ACS_ dm_acs; struct _ACS_ dm_acs;
@ -793,7 +793,7 @@ struct PHY_DM_STRUCT {
}; };
enum phydm_structure_type { enum phydm_structure_type {
PHYDM_FALSEALMCNT, PHYDMfalseALMCNT,
PHYDM_CFOTRACK, PHYDM_CFOTRACK,
PHYDM_ADAPTIVITY, PHYDM_ADAPTIVITY,
PHYDM_ROMINFO, PHYDM_ROMINFO,

View file

@ -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); struct PHY_DM_STRUCT *p_dm_odm = timer_list(p_dm_odm, t, dm_swat_table.phydm_sw_antenna_switch_timer);
#endif #endif
struct _ADAPTER *padapter = p_dm_odm->adapter; struct _ADAPTER *padapter = p_dm_odm->adapter;
if (padapter->net_closed == _TRUE) if (padapter->net_closed == true)
return; return;
rtw_run_in_thread_cmd(padapter, odm_sw_antdiv_workitem_callback, padapter); 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 #endif
struct _ADAPTER *padapter = p_dm_odm->adapter; struct _ADAPTER *padapter = p_dm_odm->adapter;
if (padapter->net_closed == _TRUE) if (padapter->net_closed == true)
return; return;
/* if(*p_dm_odm->p_is_net_closed == true) */ /* if(*p_dm_odm->p_is_net_closed == true) */
/* return; */ /* return; */

View file

@ -875,7 +875,7 @@ phydm_basic_dbg_message
) )
{ {
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; 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 _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 _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; struct _rate_adaptive_table_ *p_ra_table = &p_dm_odm->dm_ra_table;

View file

@ -114,7 +114,7 @@ odm_forbidden_igi_check(
{ {
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; 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 _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; u8 rx_gain_range_min = p_dm_dig_table->rx_gain_range_min;
if (p_dm_dig_table->large_fa_timeout) { 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->pre_ig_value = 0;
p_dm_dig_table->rssi_low_thresh = DM_DIG_THRESH_LOW; 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->rssi_high_thresh = DM_DIG_THRESH_HIGH;
p_dm_dig_table->fa_low_thresh = DM_FALSEALARM_THRESH_LOW; p_dm_dig_table->fa_low_thresh = DMfalseALARM_THRESH_LOW;
p_dm_dig_table->fa_high_thresh = DM_FALSEALARM_THRESH_HIGH; 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 = DM_DIG_BACKOFF_DEFAULT;
p_dm_dig_table->backoff_val_range_max = DM_DIG_BACKOFF_MAX; p_dm_dig_table->backoff_val_range_max = DM_DIG_BACKOFF_MAX;
p_dm_dig_table->backoff_val_range_min = DM_DIG_BACKOFF_MIN; p_dm_dig_table->backoff_val_range_min = DM_DIG_BACKOFF_MIN;
@ -549,7 +549,7 @@ odm_DIG(
/* Common parameters */ /* Common parameters */
struct _dynamic_initial_gain_threshold_ *p_dm_dig_table = &p_dm_odm->dm_dig_table; 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; bool first_connect, first_dis_connect;
u8 dig_max_of_min, dig_dynamic_min; u8 dig_max_of_min, dig_dynamic_min;
u8 dm_dig_max, dm_dig_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 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 rssi_lower = DM_DIG_MIN_NIC; /* 0x1E or 0x1C */
u8 current_igi = p_dm_odm->rssi_min; 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 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) #if (PHYDM_LA_MODE_SUPPORT == 1)
struct _RT_ADCSMP *adc_smp = &(p_dm_odm->adcsmp); struct _RT_ADCSMP *adc_smp = &(p_dm_odm->adcsmp);
#endif #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 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 _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; 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))) { if ((!(p_dm_odm->support_ability & ODM_BB_CCK_PD)) || (!(p_dm_odm->support_ability & ODM_BB_FA_CNT))) {

View file

@ -95,7 +95,7 @@ struct _dynamic_initial_gain_threshold_ {
enum dig_goupcheck_level dig_go_up_check_level; enum dig_goupcheck_level dig_go_up_check_level;
}; };
struct _FALSE_ALARM_STATISTICS { struct false_ALARM_STATISTICS {
u32 cnt_parity_fail; u32 cnt_parity_fail;
u32 cnt_rate_illegal; u32 cnt_rate_illegal;
u32 cnt_crc8_fail; u32 cnt_crc8_fail;
@ -196,8 +196,8 @@ enum phydm_pause_level {
#define DM_DIG_THRESH_HIGH 40 #define DM_DIG_THRESH_HIGH 40
#define DM_DIG_THRESH_LOW 35 #define DM_DIG_THRESH_LOW 35
#define DM_FALSEALARM_THRESH_LOW 400 #define DMfalseALARM_THRESH_LOW 400
#define DM_FALSEALARM_THRESH_HIGH 1000 #define DMfalseALARM_THRESH_HIGH 1000
#define DM_DIG_MAX_NIC 0x3e #define DM_DIG_MAX_NIC 0x3e
#define DM_DIG_MIN_NIC 0x20 #define DM_DIG_MIN_NIC 0x20

View file

@ -50,7 +50,7 @@ phydm_drp_get_statistic(
{ {
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void; 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 _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); odm_false_alarm_counter_statistics(p_dm_odm);
@ -72,7 +72,7 @@ phydm_dynamic_rx_path(
u8 curr_drp_state; u8 curr_drp_state;
u32 rx_ok_cal; u32 rx_ok_cal;
u32 RSSI = 0; 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)) { 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")); 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 PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)function_context;
struct _ADAPTER *padapter = p_dm_odm->adapter; struct _ADAPTER *padapter = p_dm_odm->adapter;
if (padapter->net_closed == _TRUE) if (padapter->net_closed == true)
return; return;
} }

View file

@ -91,8 +91,8 @@ odm_edca_turbo_check_ce(
u32 edca_param; u32 edca_param;
u64 cur_tx_bytes = 0; u64 cur_tx_bytes = 0;
u64 cur_rx_bytes = 0; u64 cur_rx_bytes = 0;
u8 bbtchange = _TRUE; u8 bbtchange = true;
u8 is_bias_on_rx = _FALSE; u8 is_bias_on_rx = false;
HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter); HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter);
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapter); struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapter);
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); 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_priv *pmlmeext = &(adapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
if (p_dm_odm->is_linked != _TRUE) { if (p_dm_odm->is_linked != true) {
precvpriv->is_any_non_be_pkts = _FALSE; precvpriv->is_any_non_be_pkts = false;
return; return;
} }
if ((pregpriv->wifi_spec == 1)) { /* || (pmlmeinfo->HT_enable == 0)) */ if ((pregpriv->wifi_spec == 1)) { /* || (pmlmeinfo->HT_enable == 0)) */
precvpriv->is_any_non_be_pkts = _FALSE; precvpriv->is_any_non_be_pkts = false;
return; return;
} }
@ -117,13 +117,13 @@ odm_edca_turbo_check_ce(
iot_peer = pmlmeinfo->assoc_AP_vendor; iot_peer = pmlmeinfo->assoc_AP_vendor;
if (iot_peer >= HT_IOT_PEER_MAX) { if (iot_peer >= HT_IOT_PEER_MAX) {
precvpriv->is_any_non_be_pkts = _FALSE; precvpriv->is_any_non_be_pkts = false;
return; return;
} }
if (p_dm_odm->support_ic_type & ODM_RTL8188E) { if (p_dm_odm->support_ic_type & ODM_RTL8188E) {
if ((iot_peer == HT_IOT_PEER_RALINK) || (iot_peer == HT_IOT_PEER_ATHEROS)) 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. */ /* 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.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 { } else {
/* */ /* */
/* Turn Off EDCA turbo here. */ /* 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) { if (p_dm_odm->dm_edca_table.is_current_turbo_edca) {
rtw_write32(adapter, REG_EDCA_BE_PARAM, p_hal_data->ac_param_be); 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;
} }
} }
} }

View file

@ -534,17 +534,17 @@ odm_txpowertracking_thermal_meter_init(
struct _ADAPTER *adapter = p_dm_odm->adapter; struct _ADAPTER *adapter = p_dm_odm->adapter;
HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(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->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) if (p_dm_odm->mp_mode == false)
p_rf_calibrate_info->txpowertrack_control = _TRUE; p_rf_calibrate_info->txpowertrack_control = true;
else else
p_rf_calibrate_info->txpowertrack_control = _FALSE; p_rf_calibrate_info->txpowertrack_control = false;
if (p_dm_odm->mp_mode == 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)); 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));

View file

@ -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); HAL_DATA_TYPE *p_hal_data = GET_HAL_DATA(adapter);
u8 h2c_parameter[H2C_0X42_LENGTH] = {0}; u8 h2c_parameter[H2C_0X42_LENGTH] = {0};
u8 UL_DL_STATE = 0, STBC_TX = 0, tx_bf_en = 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; 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]; 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) if (p_dm_odm->noisy_decision)
h2c_parameter[3] |= RAINFO_NOISY_STATE; 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; 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; 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); 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")); (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) if (p_dm_odm->support_ic_type == ODM_RTL8188E)
cmdlen = 3; cmdlen = 3;
odm_fill_h2c_cmd(p_dm_odm, ODM_H2C_RSSI_REPORT, cmdlen, h2c_parameter); 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_STA_VALID(p_entry)) {
if (IS_MCAST(p_entry->hwaddr)) /*if(psta->mac_id ==1)*/ if (IS_MCAST(p_entry->hwaddr)) /*if(psta->mac_id ==1)*/
continue; continue;
if (p_entry->ra_rpt_linked == _FALSE) { if (p_entry->ra_rpt_linked == false) {
mac_id = i; mac_id = i;
break; break;
} }
@ -945,7 +945,7 @@ odm_rssi_monitor_check_ce(
int tmp_entry_max_pwdb = 0, tmp_entry_min_pwdb = 0xff; int tmp_entry_max_pwdb = 0, tmp_entry_min_pwdb = 0xff;
u8 sta_cnt = 0; u8 sta_cnt = 0;
if (p_dm_odm->is_linked != _TRUE) if (p_dm_odm->is_linked != true)
return; return;
for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { 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; p_odm_ra->type = dm_type_by_driver;
if (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 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; 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, p_entry->rssi_stat.undecorated_smoothed_pwdb));
p_entry->rssi_level = ratr_state_new; 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 { } else {
ODM_RT_TRACE(p_dm_odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("Stay in RA level = (( %d ))\n\n", ratr_state_new)); 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)) { 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)); 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); */ /* 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) { } 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)); 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 #endif
@ -1884,7 +1884,7 @@ find_minimum_rssi(
/*Determine the 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->entry_min_undecorated_smoothed_pwdb == 0)) {
p_hal_data->min_undecorated_pwdb_for_dm = 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"));*/ /*ODM_RT_TRACE(p_dm_odm,COMP_BB_POWERSAVING, DBG_LOUD, ("Not connected to any\n"));*/

View file

@ -111,10 +111,6 @@ enum rt_spinlock_type {
#define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG
#endif #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_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_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) #define SET_TX_DESC_ANTSEL_C_88E(__ptx_desc, __value) SET_BITS_TO_LE_4BYTE(__ptx_desc+28, 29, 1, __value)

View file

@ -32,7 +32,7 @@
static u8 _is_fw_read_cmd_down(_adapter *padapter, u8 msgbox_num) static u8 _is_fw_read_cmd_down(_adapter *padapter, u8 msgbox_num)
{ {
u8 read_down = _FALSE; u8 read_down = false;
int retry_cnts = 100; int retry_cnts = 100;
u8 valid; u8 valid;
@ -42,7 +42,7 @@ static u8 _is_fw_read_cmd_down(_adapter *padapter, u8 msgbox_num)
do { do {
valid = rtw_read8(padapter, REG_HMETFR) & BIT(msgbox_num); valid = rtw_read8(padapter, REG_HMETFR) & BIT(msgbox_num);
if (0 == valid) if (0 == valid)
read_down = _TRUE; read_down = true;
else else
rtw_msleep_os(1); rtw_msleep_os(1);
} while ((!read_down) && (retry_cnts--)); } 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); padapter = GET_PRIMARY_ADAPTER(padapter);
pHalData = GET_HAL_DATA(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"); RTW_INFO("FillH2CCmd_88E(): return H2C cmd because fw is not ready\n");
return ret; return ret;
} }
@ -172,7 +172,7 @@ u8 rtl8188e_set_rssi_cmd(_adapter *padapter, u8 *param)
u8 res = _SUCCESS; u8 res = _SUCCESS;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); 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__); RTW_INFO("==>%s fw dont support RA\n", __func__);
return _FAIL; 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); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct macid_ctl_t *macid_ctl = &padapter->dvobj->macid_ctl; 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 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__); RTW_INFO("==>%s fw dont support RA\n", __func__);
return _FAIL; return _FAIL;
} }
@ -219,8 +219,8 @@ u8 rtl8188e_set_raid_cmd(_adapter *padapter, u32 bitmap, u8 *arg, u8 bw)
H2CCommand[2] |= BIT(3); H2CCommand[2] |= BIT(3);
#ifdef CONFIG_INTEL_PROXIM #ifdef CONFIG_INTEL_PROXIM
if (padapter->proximity.proxim_on == _TRUE) if (padapter->proximity.proxim_on == true)
pHalData->bDisableTXPowerTraining = _FALSE; pHalData->bDisableTXPowerTraining = false;
#endif #endif
/* DisableTXPowerTraining */ /* DisableTXPowerTraining */
@ -484,7 +484,7 @@ static void ConstructNullFunctionData(
SetSeqNum(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0);
if (bQoS == _TRUE) { if (bQoS == true) {
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr; struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr;
set_frame_sub_type(pframe, WIFI_QOS_DATA_NULL); 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 mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
#endif #endif
bool bSendBeacon = _FALSE; bool bSendBeacon = false;
bool bcn_valid = _FALSE; bool bcn_valid = false;
u8 DLBcnCount = 0; u8 DLBcnCount = 0;
u32 poll = 0; u32 poll = 0;
@ -607,7 +607,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
if (pHalData->RegFwHwTxQCtrl & BIT6) { if (pHalData->RegFwHwTxQCtrl & BIT6) {
RTW_INFO("HalDownloadRSVDPage(): There is an Adapter is sending beacon.\n"); 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. */ /* 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; poll = 0;
do { do {
/* download rsvd page.*/ /* download rsvd page.*/
rtw_hal_set_fw_rsvd_page(padapter, _FALSE); rtw_hal_set_fw_rsvd_page(padapter, false);
DLBcnCount++; DLBcnCount++;
do { do {
rtw_yield_os(); rtw_yield_os();
@ -789,7 +789,7 @@ int reset_tsf(PADAPTER Adapter, u8 reset_port)
u32 reg_bcncrtl = (HW_PORT0 == reset_port) ? u32 reg_bcncrtl = (HW_PORT0 == reset_port) ?
REG_BCN_CTRL_1 : REG_BCN_CTRL; 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); reset_cnt_after = reset_cnt_before = rtw_read8(Adapter, reg_reset_tsf_cnt);
rtl8188e_reset_tsf(Adapter, reset_port); 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); reset_cnt_after = rtw_read8(Adapter, reg_reset_tsf_cnt);
} }
return (loop_cnt >= 10) ? _FAIL : _TRUE; return (loop_cnt >= 10) ? _FAIL : true;
} }

View file

@ -55,7 +55,7 @@ dm_CheckStatistics(
static void dm_CheckPbcGPIO(_adapter *padapter) static void dm_CheckPbcGPIO(_adapter *padapter)
{ {
u8 tmp1byte; u8 tmp1byte;
u8 bPbcPressed = _FALSE; u8 bPbcPressed = false;
if (!padapter->registrypriv.hw_wps_pbc) if (!padapter->registrypriv.hw_wps_pbc)
return; return;
@ -77,9 +77,9 @@ static void dm_CheckPbcGPIO(_adapter *padapter)
return ; return ;
if (tmp1byte & HAL_8188E_HW_GPIO_WPS_BIT) 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 */ /* Here we only set bPbcPressed to true */
/* After trigger PBC, the variable will be set to false */ /* After trigger PBC, the variable will be set to false */
RTW_INFO("CheckPbcGPIO - PBC is pressed\n"); RTW_INFO("CheckPbcGPIO - PBC is pressed\n");
@ -160,7 +160,7 @@ static void Update_ODM_ComInfo_88E(PADAPTER Adapter)
/* | ODM_BB_PWR_TRAIN */ /* | 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); rtw_odm_adaptivity_config_msg(RTW_DBGDUMP, Adapter);
SupportAbility |= ODM_BB_ADAPTIVITY; SupportAbility |= ODM_BB_ADAPTIVITY;
} }
@ -212,8 +212,8 @@ rtl8188e_HalDmWatchDog(
PADAPTER Adapter PADAPTER Adapter
) )
{ {
bool bFwCurrentInPSMode = _FALSE; bool bFwCurrentInPSMode = false;
bool bFwPSAwake = _TRUE; bool bFwPSAwake = true;
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
struct PHY_DM_STRUCT *pDM_Odm = &(pHalData->odmpriv); 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. */ /* Fw is under p2p powersaving mode, driver should stop dynamic mechanism. */
/* modifed by thomas. 2011.06.11. */ /* modifed by thomas. 2011.06.11. */
if (Adapter->wdinfo.p2p_ps_mode) if (Adapter->wdinfo.p2p_ps_mode)
bFwPSAwake = _FALSE; bFwPSAwake = false;
#endif /* CONFIG_P2P_PS */ #endif /* CONFIG_P2P_PS */
if ((rtw_is_hw_init_completed(Adapter)) if ((rtw_is_hw_init_completed(Adapter))
@ -243,16 +243,16 @@ rtl8188e_HalDmWatchDog(
/* ODM */ /* ODM */
if (rtw_is_hw_init_completed(Adapter)) { if (rtw_is_hw_init_completed(Adapter)) {
u8 bLinked = _FALSE; u8 bLinked = false;
u8 bsta_state = _FALSE; u8 bsta_state = false;
#ifdef CONFIG_DISABLE_ODM #ifdef CONFIG_DISABLE_ODM
pHalData->odmpriv.support_ability = 0; pHalData->odmpriv.support_ability = 0;
#endif #endif
if (rtw_mi_check_status(Adapter, MI_ASSOC)) { if (rtw_mi_check_status(Adapter, MI_ASSOC)) {
bLinked = _TRUE; bLinked = true;
if (rtw_mi_check_status(Adapter, MI_STA_LINKED)) 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); odm_cmn_info_update(&pHalData->odmpriv , ODM_CMNINFO_LINK, bLinked);

View file

@ -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_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); rtw_write8(padapter, REG_SYS_CFG, reg_0xf0 | SW_OFFLOAD_EN);
if (padapter->bFWReady == _FALSE) { if (padapter->bFWReady == false) {
RTW_INFO("bFWReady == _FALSE call reset 8051...\n"); RTW_INFO("bFWReady == false call reset 8051...\n");
_8051Reset88E(padapter); _8051Reset88E(padapter);
} }
@ -660,7 +660,7 @@ static void _MCUIO_Reset88E(PADAPTER padapter, u8 bReset)
{ {
u8 u1bTmp; u8 u1bTmp;
if (bReset == _TRUE) { if (bReset == true) {
u1bTmp = rtw_read8(padapter, REG_RSV_CTRL); u1bTmp = rtw_read8(padapter, REG_RSV_CTRL);
rtw_write8(padapter, REG_RSV_CTRL, (u1bTmp & (~BIT1))); rtw_write8(padapter, REG_RSV_CTRL, (u1bTmp & (~BIT1)));
/* Reset MCU IO Wrapper- sugggest by SD1-Gimmy */ /* Reset MCU IO Wrapper- sugggest by SD1-Gimmy */
@ -680,10 +680,10 @@ void _8051Reset88E(PADAPTER padapter)
{ {
u8 u1bTmp; u8 u1bTmp;
_MCUIO_Reset88E(padapter, _TRUE); _MCUIO_Reset88E(padapter, true);
u1bTmp = rtw_read8(padapter, REG_SYS_FUNC_EN + 1); u1bTmp = rtw_read8(padapter, REG_SYS_FUNC_EN + 1);
rtw_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp & (~BIT2)); 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_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp | (BIT2));
RTW_INFO("=====> _8051Reset88E(): 8051 reset success .\n"); RTW_INFO("=====> _8051Reset88E(): 8051 reset success .\n");
@ -811,7 +811,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw)
#endif /* CONFIG_FILE_FWIMG */ #endif /* CONFIG_FILE_FWIMG */
#ifdef 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); RTW_INFO("%s accquire FW from file:%s\n", __func__, fwfilepath);
pFirmware->eFWSource = FW_SOURCE_IMG_FILE; pFirmware->eFWSource = FW_SOURCE_IMG_FILE;
} else } else
@ -908,7 +908,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw)
_8051Reset88E(padapter); _8051Reset88E(padapter);
} }
_FWDownloadEnable_8188E(padapter, _TRUE); _FWDownloadEnable_8188E(padapter, true);
fwdl_start_time = rtw_get_current_time(); fwdl_start_time = rtw_get_current_time();
while (!RTW_CANNOT_IO(padapter) while (!RTW_CANNOT_IO(padapter)
&& (write_fw++ < 3 || rtw_get_passing_time_ms(fwdl_start_time) < 500)) { && (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) if (rtStatus == _SUCCESS)
break; break;
} }
_FWDownloadEnable_8188E(padapter, _FALSE); _FWDownloadEnable_8188E(padapter, false);
if (_SUCCESS != rtStatus) if (_SUCCESS != rtStatus)
goto fwdl_stat; goto fwdl_stat;
@ -953,7 +953,7 @@ void rtl8188e_InitializeFirmwareVars(PADAPTER padapter)
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
/* Init Fw LPS related. */ /* Init Fw LPS related. */
pwrpriv->bFwCurrentInPSMode = _FALSE; pwrpriv->bFwCurrentInPSMode = false;
/* Init H2C cmd. */ /* Init H2C cmd. */
rtw_write8(padapter, REG_HMETFR, 0x0f); rtw_write8(padapter, REG_HMETFR, 0x0f);
@ -1001,7 +1001,7 @@ hal_EfusePowerSwitch_RTL8188E(
u8 tempval; u8 tempval;
u16 tmpV16; u16 tmpV16;
if (PwrState == _TRUE) { if (PwrState == true) {
rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON); rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON);
/* Reset: 0x0000h[28], default valid */ /* Reset: 0x0000h[28], default valid */
tmpV16 = rtw_read16(pAdapter, REG_SYS_FUNC_EN); tmpV16 = rtw_read16(pAdapter, REG_SYS_FUNC_EN);
@ -1017,7 +1017,7 @@ hal_EfusePowerSwitch_RTL8188E(
rtw_write16(pAdapter, REG_SYS_CLKR, tmpV16); rtw_write16(pAdapter, REG_SYS_CLKR, tmpV16);
} }
if (bWrite == _TRUE) { if (bWrite == true) {
/* Enable LDO 2.5V before read/write action */ /* Enable LDO 2.5V before read/write action */
tempval = rtw_read8(pAdapter, EFUSE_TEST + 3); tempval = rtw_read8(pAdapter, EFUSE_TEST + 3);
if (IS_VENDOR_8188E_I_CUT_SERIES(pAdapter)) { if (IS_VENDOR_8188E_I_CUT_SERIES(pAdapter)) {
@ -1032,7 +1032,7 @@ hal_EfusePowerSwitch_RTL8188E(
} else { } else {
rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF); rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF);
if (bWrite == _TRUE) { if (bWrite == true) {
/* Disable LDO 2.5V after read/write action */ /* Disable LDO 2.5V after read/write action */
tempval = rtw_read8(pAdapter, EFUSE_TEST + 3); tempval = rtw_read8(pAdapter, EFUSE_TEST + 3);
rtw_write8(pAdapter, EFUSE_TEST + 3, (tempval & 0x7F)); rtw_write8(pAdapter, EFUSE_TEST + 3, (tempval & 0x7F));
@ -1060,7 +1060,7 @@ static bool efuse_read_phymap(
u8 *pos = pbuf; u8 *pos = pbuf;
u16 limit = *size; u16 limit = *size;
u16 addr = 0; u16 addr = 0;
bool reach_end = _FALSE; bool reach_end = false;
/* */ /* */
/* Refresh efuse init map as all 0xFF. */ /* Refresh efuse init map as all 0xFF. */
@ -1072,12 +1072,12 @@ static bool efuse_read_phymap(
/* Read physical efuse content. */ /* Read physical efuse content. */
/* */ /* */
while (addr < limit) { while (addr < limit) {
ReadEFuseByte(Adapter, addr, pos, _FALSE); ReadEFuseByte(Adapter, addr, pos, false);
if (*pos != 0xFF) { if (*pos != 0xFF) {
pos++; pos++;
addr++; addr++;
} else { } else {
reach_end = _TRUE; reach_end = true;
break; break;
} }
} }
@ -1282,15 +1282,15 @@ Hal_EfuseSwitchToBank(
bool bPseudoTest bool bPseudoTest
) )
{ {
bool bRet = _FALSE; bool bRet = false;
u32 value32 = 0; u32 value32 = 0;
/* RTPRINT(FEEPROM, EFUSE_PG, ("Efuse switch bank to %d\n", bank)); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("Efuse switch bank to %d\n", bank)); */
if (bPseudoTest) { if (bPseudoTest) {
fakeEfuseBank = bank; fakeEfuseBank = bank;
bRet = _TRUE; bRet = true;
} else } else
bRet = _TRUE; bRet = true;
return bRet; return bRet;
} }
@ -1335,7 +1335,7 @@ ReadEFuseByIC(
exit: exit:
#ifdef DBG_IOL_READ_EFUSE_MAP #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; int i;
RTW_INFO("%s compare first 0x130 byte fail\n", __func__); RTW_INFO("%s compare first 0x130 byte fail\n", __func__);
for (i = 0; i < 512; i++) { for (i = 0; i < 512; i++) {
@ -1623,7 +1623,7 @@ static u16
hal_EfuseGetCurrentSize_8188e(PADAPTER pAdapter, hal_EfuseGetCurrentSize_8188e(PADAPTER pAdapter,
bool bPseudoTest) bool bPseudoTest)
{ {
int bContinual = _TRUE; int bContinual = true;
u16 efuse_addr = 0; u16 efuse_addr = 0;
u8 hoffset = 0, hworden = 0; u8 hoffset = 0, hworden = 0;
@ -1658,7 +1658,7 @@ hal_EfuseGetCurrentSize_8188e(PADAPTER pAdapter,
/* read next header */ /* read next header */
efuse_addr = efuse_addr + (word_cnts * 2) + 1; efuse_addr = efuse_addr + (word_cnts * 2) + 1;
} else } else
bContinual = _FALSE ; bContinual = false ;
} }
if (bPseudoTest) { if (bPseudoTest) {
@ -1711,8 +1711,8 @@ hal_EfusePgPacketRead_8188e(
{ {
u8 ReadState = PG_STATE_HEADER; u8 ReadState = PG_STATE_HEADER;
int bContinual = _TRUE; int bContinual = true;
int bDataEmpty = _TRUE ; int bDataEmpty = true ;
u8 efuse_data, word_cnts = 0; u8 efuse_data, word_cnts = 0;
u16 efuse_addr = 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); EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section, bPseudoTest);
if (data == NULL) if (data == NULL)
return _FALSE; return false;
if (offset > max_section) if (offset > max_section)
return _FALSE; return false;
memset((void *)data, 0xff, sizeof(u8) * PGPKT_DATA_SIZE); memset((void *)data, 0xff, sizeof(u8) * PGPKT_DATA_SIZE);
memset((void *)tmpdata, 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; hworden = efuse_data & 0x0F;
} }
word_cnts = Efuse_CalculateWordCnts(hworden); word_cnts = Efuse_CalculateWordCnts(hworden);
bDataEmpty = _TRUE ; bDataEmpty = true ;
if (hoffset == offset) { if (hoffset == offset) {
for (tmpidx = 0; tmpidx < word_cnts * 2 ; tmpidx++) { for (tmpidx = 0; tmpidx < word_cnts * 2 ; tmpidx++) {
if (efuse_OneByteRead(pAdapter, efuse_addr + 1 + tmpidx , &efuse_data, bPseudoTest)) { if (efuse_OneByteRead(pAdapter, efuse_addr + 1 + tmpidx , &efuse_data, bPseudoTest)) {
tmpdata[tmpidx] = efuse_data; tmpdata[tmpidx] = efuse_data;
if (efuse_data != 0xff) if (efuse_data != 0xff)
bDataEmpty = _FALSE; bDataEmpty = false;
} }
} }
if (bDataEmpty == _FALSE) if (bDataEmpty == false)
ReadState = PG_STATE_DATA; ReadState = PG_STATE_DATA;
else { /* read next header */ else { /* read next header */
efuse_addr = efuse_addr + (word_cnts * 2) + 1; efuse_addr = efuse_addr + (word_cnts * 2) + 1;
@ -1781,7 +1781,7 @@ hal_EfusePgPacketRead_8188e(
} }
} else } else
bContinual = _FALSE ; bContinual = false ;
} }
/* ------- Data section Read ------------- */ /* ------- Data section Read ------------- */
else if (ReadState & PG_STATE_DATA) { 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) && 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)) (data[4] == 0xff) && (data[5] == 0xff) && (data[6] == 0xff) && (data[7] == 0xff))
return _FALSE; return false;
else else
return _TRUE; return true;
} }
@ -1866,7 +1866,7 @@ hal_EfuseFixHeaderProcess(
PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest); PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
if (!PgWriteSuccess) if (!PgWriteSuccess)
return _FALSE; return false;
else else
efuse_addr = Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest); efuse_addr = Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest);
} else } else
@ -1874,7 +1874,7 @@ hal_EfuseFixHeaderProcess(
} else } else
efuse_addr = efuse_addr + (pFixPkt->word_cnts * 2) + 1; efuse_addr = efuse_addr + (pFixPkt->word_cnts * 2) + 1;
*pAddr = efuse_addr; *pAddr = efuse_addr;
return _TRUE; return true;
} }
static bool static bool
@ -1885,7 +1885,7 @@ hal_EfusePgPacketWrite2ByteHeader(
PPGPKT_STRUCT pTargetPkt, PPGPKT_STRUCT pTargetPkt,
bool bPseudoTest) bool bPseudoTest)
{ {
bool bRet = _FALSE, bContinual = _TRUE; bool bRet = false, bContinual = true;
u16 efuse_addr = *pAddr, efuse_max_available_len = 0; u16 efuse_addr = *pAddr, efuse_max_available_len = 0;
u8 pg_header = 0, tmp_header = 0, pg_header_temp = 0; u8 pg_header = 0, tmp_header = 0, pg_header_temp = 0;
u8 repeatcnt = 0; u8 repeatcnt = 0;
@ -1903,7 +1903,7 @@ hal_EfusePgPacketWrite2ByteHeader(
while (tmp_header == 0xFF || pg_header != tmp_header) { while (tmp_header == 0xFF || pg_header != tmp_header) {
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
/* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for pg_header!!\n")); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for pg_header!!\n")); */
return _FALSE; return false;
} }
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
@ -1923,7 +1923,7 @@ hal_EfusePgPacketWrite2ByteHeader(
while (tmp_header == 0xFF || pg_header != tmp_header) { while (tmp_header == 0xFF || pg_header != tmp_header) {
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
/* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for ext_header!!\n")); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for ext_header!!\n")); */
return _FALSE; return false;
} }
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
@ -1933,7 +1933,7 @@ hal_EfusePgPacketWrite2ByteHeader(
if ((tmp_header & 0x0F) == 0x0F) { /* word_en PG fail */ if ((tmp_header & 0x0F) == 0x0F) { /* word_en PG fail */
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
/* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for word_en!!\n")); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("Repeat over limit for word_en!!\n")); */
return _FALSE; return false;
} else { } else {
efuse_addr++; efuse_addr++;
continue; continue;
@ -1945,9 +1945,9 @@ hal_EfusePgPacketWrite2ByteHeader(
fixPkt.word_en = tmp_header & 0x0F; fixPkt.word_en = tmp_header & 0x0F;
fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en); fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest)) if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest))
return _FALSE; return false;
} else { } else {
bRet = _TRUE; bRet = true;
break; break;
} }
} else if ((tmp_header & 0x1F) == 0x0F) { /* wrong extended header */ } else if ((tmp_header & 0x1F) == 0x0F) { /* wrong extended header */
@ -1968,7 +1968,7 @@ hal_EfusePgPacketWrite1ByteHeader(
PPGPKT_STRUCT pTargetPkt, PPGPKT_STRUCT pTargetPkt,
bool bPseudoTest) bool bPseudoTest)
{ {
bool bRet = _FALSE; bool bRet = false;
u8 pg_header = 0, tmp_header = 0; u8 pg_header = 0, tmp_header = 0;
u16 efuse_addr = *pAddr; u16 efuse_addr = *pAddr;
u8 repeatcnt = 0; u8 repeatcnt = 0;
@ -1985,13 +1985,13 @@ hal_EfusePgPacketWrite1ByteHeader(
while (tmp_header == 0xFF || pg_header != tmp_header) { while (tmp_header == 0xFF || pg_header != tmp_header) {
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
return _FALSE; return false;
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest); efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
} }
if (pg_header == tmp_header) if (pg_header == tmp_header)
bRet = _TRUE; bRet = true;
else { else {
PGPKT_STRUCT fixPkt; PGPKT_STRUCT fixPkt;
/* RTPRINT(FEEPROM, EFUSE_PG, ("Error condition for fixed PG packet, need to cover the existed data\n")); */ /* 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_en = tmp_header & 0x0F;
fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en); fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest)) if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest))
return _FALSE; return false;
} }
*pAddr = efuse_addr; *pAddr = efuse_addr;
@ -2014,7 +2014,7 @@ hal_EfusePgPacketWriteData(
PPGPKT_STRUCT pTargetPkt, PPGPKT_STRUCT pTargetPkt,
bool bPseudoTest) bool bPseudoTest)
{ {
bool bRet = _FALSE; bool bRet = false;
u16 efuse_addr = *pAddr; u16 efuse_addr = *pAddr;
u8 badworden = 0; u8 badworden = 0;
u32 PgWriteSuccess = 0; u32 PgWriteSuccess = 0;
@ -2024,7 +2024,7 @@ hal_EfusePgPacketWriteData(
if (badworden == 0x0F) { if (badworden == 0x0F) {
/* write ok */ /* write ok */
/* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgPacketWriteData ok!!\n")); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgPacketWriteData ok!!\n")); */
return _TRUE; return true;
} else { } else {
/* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgPacketWriteData Fail!!\n")); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgPacketWriteData Fail!!\n")); */
/* reorganize other pg packet */ /* reorganize other pg packet */
@ -2032,9 +2032,9 @@ hal_EfusePgPacketWriteData(
PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest); PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
if (!PgWriteSuccess) if (!PgWriteSuccess)
return _FALSE; return false;
else else
return _TRUE; return true;
} }
return bRet; return bRet;
@ -2048,7 +2048,7 @@ hal_EfusePgPacketWriteHeader(
PPGPKT_STRUCT pTargetPkt, PPGPKT_STRUCT pTargetPkt,
bool bPseudoTest) bool bPseudoTest)
{ {
bool bRet = _FALSE; bool bRet = false;
if (pTargetPkt->offset >= EFUSE_MAX_SECTION_BASE) if (pTargetPkt->offset >= EFUSE_MAX_SECTION_BASE)
bRet = hal_EfusePgPacketWrite2ByteHeader(pAdapter, efuseType, pAddr, pTargetPkt, bPseudoTest); bRet = hal_EfusePgPacketWrite2ByteHeader(pAdapter, efuseType, pAddr, pTargetPkt, bPseudoTest);
@ -2089,9 +2089,9 @@ wordEnMatched(
*pWden = match_word_en; *pWden = match_word_en;
if (match_word_en != 0xf) if (match_word_en != 0xf)
return _TRUE; return true;
else else
return _FALSE; return false;
} }
static bool static bool
@ -2102,12 +2102,12 @@ hal_EfuseCheckIfDatafollowed(
bool bPseudoTest bool bPseudoTest
) )
{ {
bool bRet = _FALSE; bool bRet = false;
u8 i, efuse_data; u8 i, efuse_data;
for (i = 0; i < (word_cnts * 2) ; i++) { for (i = 0; i < (word_cnts * 2) ; i++) {
if (efuse_OneByteRead(pAdapter, (startAddr + i) , &efuse_data, bPseudoTest) && (efuse_data != 0xFF)) if (efuse_OneByteRead(pAdapter, (startAddr + i) , &efuse_data, bPseudoTest) && (efuse_data != 0xFF))
bRet = _TRUE; bRet = true;
} }
return bRet; return bRet;
@ -2122,7 +2122,7 @@ hal_EfusePartialWriteCheck(
bool bPseudoTest bool bPseudoTest
) )
{ {
bool bRet = _FALSE; bool bRet = false;
u8 i, efuse_data = 0, cur_header = 0; u8 i, efuse_data = 0, cur_header = 0;
u8 new_wden = 0, matched_wden = 0, badworden = 0; u8 new_wden = 0, matched_wden = 0, badworden = 0;
u16 startAddr = 0, efuse_max_available_len = 0, efuse_max = 0; u16 startAddr = 0, efuse_max_available_len = 0, efuse_max = 0;
@ -2148,7 +2148,7 @@ hal_EfusePartialWriteCheck(
while (1) { while (1) {
if (startAddr >= efuse_max_available_len) { if (startAddr >= efuse_max_available_len) {
bRet = _FALSE; bRet = false;
break; break;
} }
@ -2159,7 +2159,7 @@ hal_EfusePartialWriteCheck(
efuse_OneByteRead(pAdapter, startAddr, &efuse_data, bPseudoTest); efuse_OneByteRead(pAdapter, startAddr, &efuse_data, bPseudoTest);
if (ALL_WORDS_DISABLED(efuse_data)) { if (ALL_WORDS_DISABLED(efuse_data)) {
/* RTPRINT(FEEPROM, EFUSE_PG, ("Error condition, all words disabled")); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("Error condition, all words disabled")); */
bRet = _FALSE; bRet = false;
break; break;
} else { } else {
curPkt.offset = ((cur_header & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1); 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); PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
if (!PgWriteSuccess) { if (!PgWriteSuccess) {
bRet = _FALSE; /* write fail, return */ bRet = false; /* write fail, return */
break; break;
} }
} }
@ -2205,7 +2205,7 @@ hal_EfusePartialWriteCheck(
/* not used header, 0xff */ /* not used header, 0xff */
*pAddr = startAddr; *pAddr = startAddr;
/* RTPRINT(FEEPROM, EFUSE_PG, ("Started from unused header offset=%d\n", startAddr)); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("Started from unused header offset=%d\n", startAddr)); */
bRet = _TRUE; bRet = true;
break; break;
} }
} }
@ -2222,16 +2222,16 @@ hal_EfusePgCheckAvailableAddr(
u16 efuse_max_available_len = 0; u16 efuse_max_available_len = 0;
/* Change to check TYPE_EFUSE_MAP_LEN ,beacuse 8188E raw 256,logic map over 256. */ /* 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); */ /* 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)); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("efuse_max_available_len = %d\n", efuse_max_available_len)); */
if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len) { if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len) {
/* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgCheckAvailableAddr error!!\n")); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePgCheckAvailableAddr error!!\n")); */
return _FALSE; return false;
} }
return _TRUE; return true;
} }
static void static void
@ -2266,20 +2266,20 @@ hal_EfusePgPacketWrite_BT(
u8 efuseType = EFUSE_BT; u8 efuseType = EFUSE_BT;
if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest)) if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest))
return _FALSE; return false;
hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt); hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt);
if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
return _FALSE; return false;
if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
return _FALSE; return false;
if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
return _FALSE; return false;
return _TRUE; return true;
} }
static bool static bool
@ -2296,20 +2296,20 @@ hal_EfusePgPacketWrite_8188e(
u8 efuseType = EFUSE_WIFI; u8 efuseType = EFUSE_WIFI;
if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest)) if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest))
return _FALSE; return false;
hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt); hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt);
if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
return _FALSE; return false;
if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
return _FALSE; return false;
if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest)) 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); 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}; u8 arg[4] = {0};
arg[0] = h2c_macid_cfg->mac_id;/* MACID */ 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; bool ret;
*valid = 0; *valid = 0;
return _FALSE; /* unblock */ return false; /* unblock */
} }
#endif #endif
@ -2653,7 +2653,7 @@ Hal_InitPGData88E(PADAPTER padapter)
u32 i; u32 i;
u16 value16; u16 value16;
if (_FALSE == pHalData->bautoload_fail_flag) { if (false == pHalData->bautoload_fail_flag) {
/* autoload OK. */ /* autoload OK. */
if (is_boot_from_eeprom(padapter)) { if (is_boot_from_eeprom(padapter)) {
/* Read all Content from EEPROM or EFUSE. */ /* Read all Content from EEPROM or EFUSE. */
@ -2663,18 +2663,18 @@ Hal_InitPGData88E(PADAPTER padapter)
} }
} else { } else {
/* Read EFUSE real map to shadow. */ /* Read EFUSE real map to shadow. */
EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, _FALSE); EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false);
} }
} else { } else {
/* autoload fail */ /* autoload fail */
/* pHalData->AutoloadFailFlag = _TRUE; */ /* pHalData->AutoloadFailFlag = true; */
/* update to default value 0xFF */ /* update to default value 0xFF */
if (!is_boot_from_eeprom(padapter)) if (!is_boot_from_eeprom(padapter))
EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, _FALSE); EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false);
} }
#ifdef CONFIG_EFUSE_CONFIG_FILE #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) if (Hal_readPGDataFromConfigFile(padapter) != _SUCCESS)
RTW_ERR("invalid phy efuse and read from file fail, will use driver default!!\n"); 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)); EEPROMId = le16_to_cpu(*((__le16 *)hwinfo));
if (EEPROMId != RTL_EEPROM_ID) { if (EEPROMId != RTL_EEPROM_ID) {
RTW_INFO("EEPROM ID(%#x) is invalid!!\n", EEPROMId); RTW_INFO("EEPROM ID(%#x) is invalid!!\n", EEPROMId);
pHalData->bautoload_fail_flag = _TRUE; pHalData->bautoload_fail_flag = true;
} else } else
pHalData->bautoload_fail_flag = _FALSE; pHalData->bautoload_fail_flag = false;
RTW_INFO("EEPROM ID=0x%04x\n", EEPROMId); RTW_INFO("EEPROM ID=0x%04x\n", EEPROMId);
} }
@ -2713,8 +2713,8 @@ void Hal_ReadPowerSavingMode88E(
u8 tmpvalue; u8 tmpvalue;
if (AutoLoadFail) { if (AutoLoadFail) {
pwrctl->bHWPowerdown = _FALSE; pwrctl->bHWPowerdown = false;
pwrctl->bSupportRemoteWakeup = _FALSE; pwrctl->bSupportRemoteWakeup = false;
} else { } else {
/* hw power down mode selection , 0:rf-off / 1:power down */ /* 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 */ /* decide hw if support remote wakeup function */
/* if hw supported, 8051 (SIE) will generate WeakUP signal( D+/D- toggle) when autoresume */ /* 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__, RTW_INFO("%s...bHWPwrPindetect(%x)-bHWPowerdown(%x) ,bSupportRemoteWakeup(%x)\n", __func__,
pwrctl->bHWPwrPindetect, pwrctl->bHWPowerdown, pwrctl->bSupportRemoteWakeup); pwrctl->bHWPwrPindetect, pwrctl->bHWPowerdown, pwrctl->bSupportRemoteWakeup);
@ -3057,7 +3057,7 @@ Hal_ReadThermalMeter_88E(
/* pHalData->eeprom_thermal_meter = (tempval&0x1f); */ /* [4:0] */ /* pHalData->eeprom_thermal_meter = (tempval&0x1f); */ /* [4:0] */
if (pHalData->eeprom_thermal_meter == 0xff || AutoloadFail) { 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; pHalData->eeprom_thermal_meter = EEPROM_Default_ThermalMeter_88E;
} }
@ -3083,7 +3083,7 @@ void Hal_ReadRFGainOffset(
if ((pHalData->EEPROMRFGainOffset != 0xFF) && if ((pHalData->EEPROMRFGainOffset != 0xFF) &&
(pHalData->EEPROMRFGainOffset & BIT4)) (pHalData->EEPROMRFGainOffset & BIT4))
efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, _FALSE); efuse_OneByteRead(Adapter, EEPROM_RF_GAIN_VAL, &pHalData->EEPROMRFGainVal, false);
else { else {
pHalData->EEPROMRFGainOffset = 0; pHalData->EEPROMRFGainOffset = 0;
pHalData->EEPROMRFGainVal = 0; pHalData->EEPROMRFGainVal = 0;
@ -3091,7 +3091,7 @@ void Hal_ReadRFGainOffset(
RTW_INFO("pHalData->EEPROMRFGainVal=%x\n", pHalData->EEPROMRFGainVal); RTW_INFO("pHalData->EEPROMRFGainVal=%x\n", pHalData->EEPROMRFGainVal);
} else { } 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) if (pHalData->EEPROMRFGainVal != 0xFF)
pHalData->EEPROMRFGainOffset = BIT4; pHalData->EEPROMRFGainOffset = BIT4;
@ -3101,7 +3101,7 @@ void Hal_ReadRFGainOffset(
} }
if (Adapter->registrypriv.RegPwrTrimEnable == 1) { 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); 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)) { 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 != 0xFF) {
if (thermal_offset & BIT0) if (thermal_offset & BIT0)
pHalData->eeprom_thermal_meter += ((thermal_offset >> 1) & 0x0F); 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. */ /* 2010/08/25 MH INF priority > PDN Efuse value. */
if (tmpvalue & BIT(4) && pwrctrlpriv->reg_pdnmode) if (tmpvalue & BIT(4) && pwrctrlpriv->reg_pdnmode)
pHalData->pwrdown = _TRUE; pHalData->pwrdown = true;
else else
pHalData->pwrdown = _FALSE; pHalData->pwrdown = false;
RTW_INFO("HalDetectPwrDownMode(): PDN=%d\n", pHalData->pwrdown); RTW_INFO("HalDetectPwrDownMode(): PDN=%d\n", pHalData->pwrdown);
@ -3150,7 +3150,7 @@ bool HalDetectPwrDownMode88E(PADAPTER Adapter)
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
void Hal_DetectWoWMode(PADAPTER pAdapter) void Hal_DetectWoWMode(PADAPTER pAdapter)
{ {
adapter_to_pwrctl(pAdapter)->bSupportRemoteWakeup = _TRUE; adapter_to_pwrctl(pAdapter)->bSupportRemoteWakeup = true;
} }
#endif #endif
@ -3220,21 +3220,21 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)
{ {
u8 val8; u8 val8;
u8 mode = *((u8 *)val); u8 mode = *((u8 *)val);
static u8 isMonitor = _FALSE; static u8 isMonitor = false;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
if (isMonitor == _TRUE) { if (isMonitor == true) {
/* reset RCR */ /* reset RCR */
rtw_write32(Adapter, REG_RCR, pHalData->ReceiveConfig); rtw_write32(Adapter, REG_RCR, pHalData->ReceiveConfig);
isMonitor = _FALSE; isMonitor = false;
} }
RTW_INFO(ADPT_FMT "- Port-%d set opmode = %d\n", ADPT_ARG(Adapter), RTW_INFO(ADPT_FMT "- Port-%d set opmode = %d\n", ADPT_ARG(Adapter),
get_hw_port(Adapter), mode); get_hw_port(Adapter), mode);
if (mode == _HW_STATE_MONITOR_) { if (mode == _HW_STATE_MONITOR_) {
isMonitor = _TRUE; isMonitor = true;
/* set net_type */ /* set net_type */
Set_MSR(Adapter, _HW_STATE_NOLINK_); 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 #ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
rtw_write8(Adapter, REG_DRVERLYINT, 0x05);/* restore early int time to 5ms */ 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 */ #endif /* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR #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_BCN_OK_ERR */
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */ #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_) { } else if (mode == _HW_STATE_AP_) {
#ifdef CONFIG_INTERRUPT_BASED_TXBCN #ifdef CONFIG_INTERRUPT_BASED_TXBCN
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT #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 */ #endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR #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_BCN_OK_ERR */
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */ #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 #ifdef CONFIG_TSF_RESET_OFFLOAD
/* Reset TSF for STA+AP concurrent mode */ /* Reset TSF for STA+AP concurrent mode */
if (rtw_mi_buddy_check_fwstate(Adapter, (WIFI_STATION_STATE | WIFI_ASOC_STATE))) { 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", RTW_INFO("ERROR! %s()-%d: Reset port1 TSF fail\n",
__func__, __LINE__); __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
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT #ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
rtw_write8(Adapter, REG_DRVERLYINT, 0x05);/* restore early int time to 5ms */ 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 */ #endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR #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_BCN_OK_ERR */
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */ #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_) { } else if (mode == _HW_STATE_AP_) {
#ifdef CONFIG_INTERRUPT_BASED_TXBCN #ifdef CONFIG_INTERRUPT_BASED_TXBCN
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT #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 */ #endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR #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_BCN_OK_ERR */
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */ #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 #ifdef CONFIG_TSF_RESET_OFFLOAD
/* Reset TSF for STA+AP concurrent mode */ /* Reset TSF for STA+AP concurrent mode */
if (rtw_mi_buddy_check_fwstate(Adapter, (WIFI_STATION_STATE | WIFI_ASOC_STATE))) { 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", RTW_INFO("ERROR! %s()-%d: Reset port0 TSF fail\n",
__func__, __LINE__); __func__, __LINE__);
} }
@ -3542,12 +3542,12 @@ static void hw_var_set_correct_tsf(PADAPTER Adapter, u8 variable, u8 *val)
if (iface == Adapter) if (iface == Adapter)
continue; continue;
if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == _TRUE if (check_fwstate(&iface->mlmepriv, WIFI_AP_STATE) == true
&& check_fwstate(&iface->mlmepriv, WIFI_ASOC_STATE) == _TRUE && check_fwstate(&iface->mlmepriv, WIFI_ASOC_STATE) == true
) { ) {
rtw_hal_correct_tsf(iface, iface->hw_port, tsf); rtw_hal_correct_tsf(iface, iface->hw_port, tsf);
#ifdef CONFIG_TSF_RESET_OFFLOAD #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); RTW_INFO("%s-[ERROR] "ADPT_FMT" Reset port%d TSF fail\n", __func__, ADPT_ARG(iface), iface->hw_port);
#endif /* CONFIG_TSF_RESET_OFFLOAD*/ #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); rtw_write32(Adapter, REG_RCR, rtw_read32(padapter, REG_RCR) & ~RCR_ADF);
reject all data frames */ reject all data frames */
#ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_CONCURRENT_MODE
if (rtw_mi_check_status(Adapter, MI_LINKED) == _FALSE) if (rtw_mi_check_status(Adapter, MI_LINKED) == false)
#endif #endif
rtw_write16(Adapter, REG_RXFLTMAP2, 0x00); 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 #ifdef CONFIG_TDLS
/* TDLS will clear RCR_CBSSID_DATA bit for connection.*/ /* 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; rcr_clear_bit = RCR_CBSSID_BCN;
#endif /*CONFIG_TDLS*/ #endif /*CONFIG_TDLS*/
@ -3656,13 +3656,13 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8 *val)
continue; continue;
if (rtw_linked_check(iface) && 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) if (iface->hw_port == HW_PORT1)
rtw_write8(iface, REG_BCN_CTRL_1, rtw_read8(iface, REG_BCN_CTRL_1) | DIS_TSF_UDT); rtw_write8(iface, REG_BCN_CTRL_1, rtw_read8(iface, REG_BCN_CTRL_1) | DIS_TSF_UDT);
else else
rtw_write8(iface, REG_BCN_CTRL, rtw_read8(iface, REG_BCN_CTRL) | DIS_TSF_UDT); 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) if (!iface)
continue; continue;
if (rtw_linked_check(iface) && 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*/ /* enable HW TSF update when recive beacon*/
/*if (iface->hw_port == HW_PORT1) /*if (iface->hw_port == HW_PORT1)
rtw_write8(iface, REG_BCN_CTRL_1, rtw_read8(iface, REG_BCN_CTRL_1)&(~(DIS_TSF_UDT))); rtw_write8(iface, REG_BCN_CTRL_1, rtw_read8(iface, REG_BCN_CTRL_1)&(~(DIS_TSF_UDT)));
else else
rtw_write8(iface, REG_BCN_CTRL, rtw_read8(iface, REG_BCN_CTRL)&(~(DIS_TSF_UDT))); 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 #endif
@ -3759,12 +3759,12 @@ static void hw_var_set_mlme_join(PADAPTER Adapter, u8 variable, u8 *val)
else else
rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR) | RCR_CBSSID_DATA | RCR_CBSSID_BCN); rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR) | RCR_CBSSID_DATA | RCR_CBSSID_BCN);
#endif #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; RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48;
else /* Ad-hoc Mode */ else /* Ad-hoc Mode */
RetryLimit = 0x7; RetryLimit = 0x7;
} else if (type == 1) { /* joinbss_event call back when join res < 0 */ } 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); rtw_write16(Adapter, REG_RXFLTMAP2, 0x00);
if (rtw_mi_check_status(Adapter, MI_AP_MODE)) { if (rtw_mi_check_status(Adapter, MI_AP_MODE)) {
@ -3906,7 +3906,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
} else } else
rtw_write32(adapter, REG_RCR, rtw_read32(adapter, REG_RCR) | RCR_CBSSID_DATA | RCR_CBSSID_BCN); 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; RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48;
else /* Ad-hoc Mode */ else /* Ad-hoc Mode */
RetryLimit = 0x7; 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 */ /* 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. */ /* saving sequence. 2010.06.07. Added by tynli. Suggested by SD3 yschang. */
if (psmode != PS_MODE_ACTIVE) if (psmode != PS_MODE_ACTIVE)
odm_rf_saving(podmpriv, _TRUE); odm_rf_saving(podmpriv, true);
rtl8188e_set_FwPwrMode_cmd(adapter, psmode); rtl8188e_set_FwPwrMode_cmd(adapter, psmode);
} }
break; break;
@ -4130,7 +4130,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
/* keep sn */ /* keep sn */
adapter->xmitpriv.nqos_ssn = rtw_read16(adapter, REG_NQOS_SEQ); adapter->xmitpriv.nqos_ssn = rtw_read16(adapter, REG_NQOS_SEQ);
if (pwrpriv->bkeepfwalive != _TRUE) { if (pwrpriv->bkeepfwalive != true) {
/* RX DMA stop */ /* RX DMA stop */
rtw_write32(adapter, REG_RXPKT_NUM, (rtw_read32(adapter, REG_RXPKT_NUM) | RW_RELEASE_EN)); rtw_write32(adapter, REG_RXPKT_NUM, (rtw_read32(adapter, REG_RXPKT_NUM) | RW_RELEASE_EN));
do { do {
@ -4451,22 +4451,22 @@ void GetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
break; break;
case HW_VAR_BCN_VALID: case HW_VAR_BCN_VALID:
/* BCN_VALID, BIT16 of REG_TDECTRL = BIT0 of REG_TDECTRL+2 */ /* 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; break;
case HW_VAR_FWLPS_RF_ON: { case HW_VAR_FWLPS_RF_ON: {
/* When we halt NIC, we should check if FW LPS is leave. */ /* When we halt NIC, we should check if FW LPS is leave. */
if (adapter_to_pwrctl(adapter)->rf_pwrstate == rf_off) { 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, */ /* If it is in HW/SW Radio OFF or IPS state, we do not check Fw LPS Leave, */
/* because Fw is unload. */ /* because Fw is unload. */
val[0] = _TRUE; val[0] = true;
} else { } else {
u32 valRCR; u32 valRCR;
valRCR = rtw_read32(adapter, REG_RCR); valRCR = rtw_read32(adapter, REG_RCR);
valRCR &= 0x00070000; valRCR &= 0x00070000;
if (valRCR) if (valRCR)
val[0] = _FALSE; val[0] = false;
else else
val[0] = _TRUE; val[0] = true;
} }
} }
break; break;
@ -4474,7 +4474,7 @@ void GetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
*((u16 *)(val)) = pHalData->EfuseUsedBytes; *((u16 *)(val)) = pHalData->EfuseUsedBytes;
break; break;
case HW_VAR_CHK_HI_QUEUE_EMPTY: 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; break;
case HW_VAR_DUMP_MAC_QUEUE_INFO: case HW_VAR_DUMP_MAC_QUEUE_INFO:
dump_mac_qinfo_88e(val, adapter); dump_mac_qinfo_88e(val, adapter);
@ -4490,7 +4490,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel)
{ {
int i; int i;
u8 mac_id; u8 mac_id;
u8 bLinked = _FALSE; u8 bLinked = false;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj); 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]; iface = dvobj->padapters[i];
if ((iface) && rtw_is_adapter_up(iface)) { if ((iface) && rtw_is_adapter_up(iface)) {
if (rtw_linked_check(iface)) { if (rtw_linked_check(iface)) {
bLinked = _TRUE; bLinked = true;
break; break;
} }
} }
@ -4514,7 +4514,7 @@ static void hal_ra_info_dump(_adapter *padapter , void *sel)
if (bLinked) { if (bLinked) {
_RTW_PRINT_SEL(sel , "============ RA status - Mac_id:%d ===================\n", mac_id); _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) #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); _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)*/ #endif /* (RATE_ADAPTIVE_SUPPORT == 1)*/
} else { } else {
u8 cur_rate = rtw_read8(padapter, REG_ADAPTIVE_DATA_RATE_0 + mac_id); 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; cur_rate &= 0x7f;
@ -4552,7 +4552,7 @@ GetHalDefVar8188E(
switch (eVariable) { switch (eVariable) {
case HAL_DEF_IS_SUPPORT_ANT_DIV: case HAL_DEF_IS_SUPPORT_ANT_DIV:
#ifdef CONFIG_ANTENNA_DIVERSITY #ifdef CONFIG_ANTENNA_DIVERSITY
*((u8 *)pValue) = (pHalData->AntDivCfg == 0) ? _FALSE : _TRUE; *((u8 *)pValue) = (pHalData->AntDivCfg == 0) ? false : true;
#endif #endif
break; break;
case HAL_DEF_DRVINFO_SZ: case HAL_DEF_DRVINFO_SZ:
@ -4589,7 +4589,7 @@ GetHalDefVar8188E(
break; break;
case HAL_DEF_EXPLICIT_BEAMFORMEE: case HAL_DEF_EXPLICIT_BEAMFORMEE:
case HAL_DEF_EXPLICIT_BEAMFORMER: case HAL_DEF_EXPLICIT_BEAMFORMER:
*((u8 *)pValue) = _FALSE; *((u8 *)pValue) = false;
break; break;
case HW_DEF_RA_INFO_DUMP: case HW_DEF_RA_INFO_DUMP:
@ -4606,7 +4606,7 @@ GetHalDefVar8188E(
*(u8 *)pValue = WMM_NORMAL_TX_PAGE_BOUNDARY_88E(Adapter); *(u8 *)pValue = WMM_NORMAL_TX_PAGE_BOUNDARY_88E(Adapter);
break; break;
case HAL_DEF_MACID_SLEEP: case HAL_DEF_MACID_SLEEP:
*(u8 *)pValue = _TRUE; /* support macid sleep */ *(u8 *)pValue = true; /* support macid sleep */
break; break;
case HAL_DEF_RX_DMA_SZ_WOW: case HAL_DEF_RX_DMA_SZ_WOW:
*(u32 *)pValue = RX_DMA_SIZE_88E(Adapter) - RESV_FMWF; *(u32 *)pValue = RX_DMA_SIZE_88E(Adapter) - RESV_FMWF;

View file

@ -54,18 +54,18 @@ sic_IsSICReady(
PADAPTER Adapter PADAPTER Adapter
) )
{ {
bool bRet = _FALSE; bool bRet = false;
u32 retryCnt = 0; u32 retryCnt = 0;
u8 sic_cmd = 0xff; u8 sic_cmd = 0xff;
while (1) { while (1) {
if (retryCnt++ >= SIC_MAX_POLL_CNT) { if (retryCnt++ >= SIC_MAX_POLL_CNT) {
/* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady() return FALSE\n")); */ /* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady() return false\n")); */
return _FALSE; return false;
} }
/* if(RT_SDIO_CANNOT_IO(Adapter)) */ /* if(RT_SDIO_CANNOT_IO(Adapter)) */
/* return _FALSE; */ /* return false; */
sic_cmd = rtw_read8(Adapter, SIC_CMD_REG); sic_cmd = rtw_read8(Adapter, SIC_CMD_REG);
/* sic_cmd = PlatformEFIORead1Byte(Adapter, SIC_CMD_REG); */ /* sic_cmd = PlatformEFIORead1Byte(Adapter, SIC_CMD_REG); */
@ -74,7 +74,7 @@ sic_IsSICReady(
#endif #endif
/* RTPRINT(FPHY, (PHY_SICR|PHY_SICW), ("[SIC], sic_IsSICReady(), readback 0x%x=0x%x\n", SIC_CMD_REG, sic_cmd)); */ /* 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) if (sic_cmd == SIC_CMD_READY)
return _TRUE; return true;
else { else {
rtw_msleep_os(1); rtw_msleep_os(1);
/* delay_ms(1); */ /* delay_ms(1); */
@ -271,7 +271,7 @@ SIC_LedOff(
{ {
/* When SIC is enabled, led pin will be used as debug pin, */ /* When SIC is enabled, led pin will be used as debug pin, */
/* so don't execute led function when SIC is enabled. */ /* so don't execute led function when SIC is enabled. */
return _TRUE; return true;
} }
#endif #endif
@ -758,7 +758,7 @@ phy_BB8190_Config_HardCode(
PADAPTER Adapter PADAPTER Adapter
) )
{ {
/* RT_ASSERT(FALSE, ("This function is not implement yet!!\n")); */ /* RT_ASSERT(false, ("This function is not implement yet!!\n")); */
return _SUCCESS; return _SUCCESS;
} }
@ -1237,7 +1237,7 @@ PHY_GetTxPowerIndex_8188E(
u8 base_idx = 0, power_idx = 0; u8 base_idx = 0, power_idx = 0;
s8 by_rate_diff = 0, limit = 0, tpt_offset = 0, extra_bias = 0; s8 by_rate_diff = 0, limit = 0, tpt_offset = 0, extra_bias = 0;
u8 txNum = phy_GetCurrentTxNum_8188E(pAdapter, Rate); u8 txNum = phy_GetCurrentTxNum_8188E(pAdapter, Rate);
bool bIn24G = _FALSE; bool bIn24G = false;
base_idx = PHY_GetTxPowerIndexBase(pAdapter, RFPath, Rate, BandWidth, Channel, &bIn24G); base_idx = PHY_GetTxPowerIndexBase(pAdapter, RFPath, Rate, BandWidth, Channel, &bIn24G);
@ -1280,7 +1280,7 @@ PHY_UpdateTxPowerDbm8188E(
int powerInDbm int powerInDbm
) )
{ {
return _TRUE; return true;
} }
static void static void
@ -1347,7 +1347,7 @@ _PHY_SetBWMode88E(
/* u64 BeginTime, EndTime; */ /* u64 BeginTime, EndTime; */
if (pHalData->rf_chip == RF_PSEUDO_11N) { if (pHalData->rf_chip == RF_PSEUDO_11N) {
/* pHalData->SetBWModeInProgress= _FALSE; */ /* pHalData->SetBWModeInProgress= false; */
return; return;
} }
@ -1457,11 +1457,11 @@ _PHY_SetBWMode88E(
break; break;
default: default:
/* RT_ASSERT(FALSE, ("Unknown RFChipID: %d\n", pHalData->RFChipID)); */ /* RT_ASSERT(false, ("Unknown RFChipID: %d\n", pHalData->RFChipID)); */
break; break;
} }
/* pHalData->SetBWModeInProgress= FALSE; */ /* pHalData->SetBWModeInProgress= false; */
} }
@ -1495,7 +1495,7 @@ PHY_SetBWMode8188E(
/* if(pHalData->SetBWModeInProgress) */ /* if(pHalData->SetBWModeInProgress) */
/* return; */ /* return; */
/* pHalData->SetBWModeInProgress= TRUE; */ /* pHalData->SetBWModeInProgress= true; */
pHalData->current_channel_bw = Bandwidth; pHalData->current_channel_bw = Bandwidth;
@ -1506,7 +1506,7 @@ PHY_SetBWMode8188E(
if (IS_VENDOR_8188E_I_CUT_SERIES(Adapter)) if (IS_VENDOR_8188E_I_CUT_SERIES(Adapter))
phy_SpurCalibration_8188E(Adapter); phy_SpurCalibration_8188E(Adapter);
} else { } else {
/* pHalData->SetBWModeInProgress= FALSE; */ /* pHalData->SetBWModeInProgress= false; */
pHalData->current_channel_bw = tmpBW; pHalData->current_channel_bw = tmpBW;
} }
@ -1545,7 +1545,7 @@ PHY_SwChnl8188E(/* Call after initialization */
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
u8 tmpchannel = pHalData->current_channel; u8 tmpchannel = pHalData->current_channel;
bool bResult = _TRUE; bool bResult = true;
if (pHalData->rf_chip == RF_PSEUDO_11N) if (pHalData->rf_chip == RF_PSEUDO_11N)
return; /* return immediately if it is peudo-phy */ 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( static bool _PHY_QueryRFPathSwitch(
PADAPTER pAdapter, PADAPTER pAdapter,
@ -1643,7 +1643,7 @@ static bool _PHY_QueryRFPathSwitch(
) )
{ {
/* if(is2T) /* if(is2T)
* return _TRUE; */ * return true; */
if (!rtw_is_hw_init_completed(pAdapter)) { if (!rtw_is_hw_init_completed(pAdapter)) {
phy_set_bb_reg(pAdapter, REG_LEDCFG0, BIT23, 0x01); phy_set_bb_reg(pAdapter, REG_LEDCFG0, BIT23, 0x01);
@ -1652,14 +1652,14 @@ static bool _PHY_QueryRFPathSwitch(
if (is2T) { if (is2T) {
if (phy_query_bb_reg(pAdapter, rFPGA0_XB_RFInterfaceOE, BIT5 | BIT6) == 0x01) if (phy_query_bb_reg(pAdapter, rFPGA0_XB_RFInterfaceOE, BIT5 | BIT6) == 0x01)
return _TRUE; return true;
else else
return _FALSE; return false;
} else { } else {
if (phy_query_bb_reg(pAdapter, rFPGA0_XA_RFInterfaceOE, 0x300) == 0x02) if (phy_query_bb_reg(pAdapter, rFPGA0_XA_RFInterfaceOE, 0x300) == 0x02)
return _TRUE; return true;
else else
return _FALSE; return false;
} }
} }

View file

@ -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) void _dbg_dump_tx_info(_adapter *padapter, int frame_tag, struct tx_desc *ptxdesc)
{ {
u8 bDumpTxPkt; u8 bDumpTxPkt;
u8 bDumpTxDesc = _FALSE; u8 bDumpTxDesc = false;
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(bDumpTxPkt)); rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(bDumpTxPkt));
if (bDumpTxPkt == 1) { /* dump txdesc for data frame */ if (bDumpTxPkt == 1) { /* dump txdesc for data frame */
RTW_INFO("dump tx_desc for data frame\n"); RTW_INFO("dump tx_desc for data frame\n");
if ((frame_tag & 0x0f) == DATA_FRAMETAG) if ((frame_tag & 0x0f) == DATA_FRAMETAG)
bDumpTxDesc = _TRUE; bDumpTxDesc = true;
} else if (bDumpTxPkt == 2) { /* dump txdesc for mgnt frame */ } else if (bDumpTxPkt == 2) { /* dump txdesc for mgnt frame */
RTW_INFO("dump tx_desc for mgnt frame\n"); RTW_INFO("dump tx_desc for mgnt frame\n");
if ((frame_tag & 0x0f) == MGNT_FRAMETAG) if ((frame_tag & 0x0f) == MGNT_FRAMETAG)
bDumpTxDesc = _TRUE; bDumpTxDesc = true;
} else if (bDumpTxPkt == 3) { /* dump early info */ } else if (bDumpTxPkt == 3) { /* dump early info */
} }

View file

@ -65,7 +65,7 @@ SwLedOn_8188EU(
break; break;
} }
pLed->bLedOn = _TRUE; pLed->bLedOn = true;
} }
@ -90,7 +90,7 @@ SwLedOff_8188EU(
switch (pLed->LedPin) { switch (pLed->LedPin) {
case LED_PIN_LED0: 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. */ LedCfg &= 0x90; /* Set to software control. */
rtw_write8(padapter, REG_LEDCFG2, (LedCfg | BIT3)); rtw_write8(padapter, REG_LEDCFG2, (LedCfg | BIT3));
LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG); LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
@ -109,7 +109,7 @@ SwLedOff_8188EU(
break; break;
} }
exit: exit:
pLed->bLedOn = _FALSE; pLed->bLedOn = false;
} }

View file

@ -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. */ 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 */ 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. */ /* Encrypt the data frame if under security mode excepct null data. Suggested by CCW. */
/* */ /* */
if (_TRUE == bDataFrame) { if (true == bDataFrame) {
u32 EncAlg; u32 EncAlg;
EncAlg = padapter->securitypriv.dot11PrivacyAlgrthm; 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 #ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
if (padapter->registrypriv.mp_mode == 0) { if (padapter->registrypriv.mp_mode == 0) {
/* if((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)==0)) */ /* (sz %512) != 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); ptxdesc = (struct tx_desc *)(pmem + PACKET_OFFSET_SZ);
/* RTW_INFO("==> non-agg-pkt,shift pointer...\n"); */ /* RTW_INFO("==> non-agg-pkt,shift pointer...\n"); */
pull = 1; 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); fill_txdesc_force_bmc_camid(pattrib, ptxdesc);
#endif #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(AGG_EN);/* AGG EN */
ptxdesc->txdw2 |= cpu_to_le32((pattrib->ampdu_spacing << ptxdesc->txdw2 |= cpu_to_le32((pattrib->ampdu_spacing <<
AMPDU_DENSITY_SHT) & 0x00700000); 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 */ ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);/* DATA/RTS Rate FB LMT */
#if (RATE_ADAPTIVE_SUPPORT == 1) #if (RATE_ADAPTIVE_SUPPORT == 1)
if (pHalData->fw_ractrl == _FALSE) { if (pHalData->fw_ractrl == false) {
/* driver-based RA*/ /* driver-based RA*/
/* driver uses rate */ /* driver uses rate */
ptxdesc->txdw4 |= cpu_to_le32(USERATE);/* rate control always by driver */ 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 */ /* offset 20 */
ptxdesc->txdw5 |= cpu_to_le32(RTY_LMT_EN);/* retry limit enable */ 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 */ ptxdesc->txdw5 |= cpu_to_le32(0x00180000);/* retry limit = 6 */
else else
ptxdesc->txdw5 |= cpu_to_le32(0x00300000);/* retry limit = 12 */ 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 */ } else /* no frag */
sz = pattrib->last_txcmdsz; sz = pattrib->last_txcmdsz;
pull = update_txdesc(pxmitframe, mem_addr, sz, _FALSE); pull = update_txdesc(pxmitframe, mem_addr, sz, false);
if (pull) { if (pull) {
mem_addr += PACKET_OFFSET_SZ; /* pull txdesc head */ 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; u32 ff_hwaddr;
_list *sta_plist, *sta_phead; _list *sta_plist, *sta_phead;
u8 single_sta_in_queue = _FALSE; u8 single_sta_in_queue = false;
#ifndef IDEA_CONDITION #ifndef IDEA_CONDITION
int res = _SUCCESS; int res = _SUCCESS;
@ -723,7 +723,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
if (pxmitbuf == NULL) { if (pxmitbuf == NULL) {
/* RTW_INFO("%s #1, connot alloc xmitbuf!!!!\n",__func__); */ /* 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 */ /* no more xmit frame, release xmit buffer */
/* RTW_INFO("no more xmit frame ,return\n"); */ /* RTW_INFO("no more xmit frame ,return\n"); */
rtw_free_xmitbuf(pxmitpriv, pxmitbuf); rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
return _FALSE; return false;
} }
#ifndef IDEA_CONDITION #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 */ pxmitframe->pkt_offset = (PACKET_OFFSET_SZ / 8); /* 1; */ /* first frame of aggregation, reserve offset */
#endif #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__); RTW_INFO("%s coalesce 1st xmitframe failed\n", __func__);
continue; continue;
} }
@ -842,7 +842,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
xmitframe_phead = get_list_head(&ptxservq->sta_pending); xmitframe_phead = get_list_head(&ptxservq->sta_pending);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);
@ -888,7 +888,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
/* pxmitframe->pxmitbuf = pxmitbuf; */ /* pxmitframe->pxmitbuf = pxmitbuf; */
pxmitframe->buf_addr = pxmitbuf->pbuf + pbuf; 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_INFO("%s coalesce failed\n", __func__);
rtw_free_xmitframe(pxmitpriv, pxmitframe); rtw_free_xmitframe(pxmitpriv, pxmitframe);
continue; continue;
@ -899,7 +899,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
rtw_os_xmit_complete(padapter, pxmitframe); rtw_os_xmit_complete(padapter, pxmitframe);
/* (len - TXDESC_SIZE) == pxmitframe->attrib.last_txcmdsz */ /* (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 */ /* don't need xmitframe any more */
rtw_free_xmitframe(pxmitpriv, pxmitframe); rtw_free_xmitframe(pxmitpriv, pxmitframe);
@ -926,9 +926,9 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
bulkPtr = ((pbuf / bulkSize) + 1) * bulkSize; bulkPtr = ((pbuf / bulkSize) + 1) * bulkSize;
} }
} /* end while( aggregate same priority and same DA(AP or STA) frames) */ } /* 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); 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 */ /* 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_delete(&ptxservq->tx_pending);
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmit->sta_queue)); 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 */ #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 #ifdef CONFIG_TX_EARLY_MODE
/* prepare EM info for first frame, agg_num value start from 1 */ /* prepare EM info for first frame, agg_num value start from 1 */
@ -980,7 +980,7 @@ agg_end:
rtw_free_xmitframe(pxmitpriv, pfirstframe); rtw_free_xmitframe(pxmitpriv, pfirstframe);
return _TRUE; return true;
} }
#else #else
@ -1000,7 +1000,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
if (pxmitbuf == NULL) { if (pxmitbuf == NULL) {
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
if (!pxmitbuf) if (!pxmitbuf)
return _FALSE; return false;
} }
@ -1035,14 +1035,14 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
} else { } else {
rtw_free_xmitbuf(pxmitpriv, pxmitbuf); rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
return _FALSE; return false;
} }
break; break;
} while (0/*xcnt < (NR_XMITFRAME >> 3)*/); } while (0/*xcnt < (NR_XMITFRAME >> 3)*/);
return _TRUE; return true;
} }
#endif #endif
@ -1065,8 +1065,8 @@ static s32 xmitframe_direct(_adapter *padapter, struct xmit_frame *pxmitframe)
/* /*
* Return * Return
* _TRUE dump packet directly * true dump packet directly
* _FALSE enqueue packet * false enqueue packet
*/ */
static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe) 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; goto enqueue;
} }
if (rtw_xmit_ac_blocked(padapter) == _TRUE) if (rtw_xmit_ac_blocked(padapter) == true)
goto enqueue; goto enqueue;
if (DEV_STA_LG_NUM(padapter->dvobj)) 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); rtw_free_xmitframe(pxmitpriv, pxmitframe);
} }
return _TRUE; return true;
enqueue: enqueue:
res = rtw_xmitframe_enqueue(padapter, pxmitframe); res = rtw_xmitframe_enqueue(padapter, pxmitframe);
@ -1117,10 +1117,10 @@ enqueue:
rtw_free_xmitframe(pxmitpriv, pxmitframe); rtw_free_xmitframe(pxmitpriv, pxmitframe);
pxmitpriv->tx_drop++; pxmitpriv->tx_drop++;
return _TRUE; return true;
} }
return _FALSE; return false;
} }
s32 rtl8188eu_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe) 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 * Return
* _TRUE dump packet directly ok * true dump packet directly ok
* _FALSE temporary can't transmit packets to hardware * false temporary can't transmit packets to hardware
*/ */
s32 rtl8188eu_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe) s32 rtl8188eu_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe)
{ {

View file

@ -59,7 +59,7 @@ static bool HalUsbSetQueuePipeMapping8188EUsb(
) )
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
bool result = _FALSE; bool result = false;
_ConfigNormalChipOutEP_8188E(pAdapter, NumOutPipe); _ConfigNormalChipOutEP_8188E(pAdapter, NumOutPipe);
@ -123,10 +123,10 @@ static u32 _InitPowerOn_8188EU(_adapter *padapter)
{ {
u16 value16; u16 value16;
/* HW Power on sequence */ /* HW Power on sequence */
u8 bMacPwrCtrlOn = _FALSE; u8 bMacPwrCtrlOn = false;
rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
if (bMacPwrCtrlOn == _TRUE) if (bMacPwrCtrlOn == true)
return _SUCCESS; return _SUCCESS;
if (!HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, Rtl8188E_NIC_PWR_ON_FLOW)) { 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); rtw_write16(padapter, REG_CR, value16);
bMacPwrCtrlOn = _TRUE; bMacPwrCtrlOn = true;
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
return _SUCCESS; return _SUCCESS;
@ -172,7 +172,7 @@ static void _InitPABias(_adapter *padapter)
/* FIXED PA current issue */ /* FIXED PA current issue */
/* efuse_one_byte_read(padapter, 0x1FA, &pa_setting); */ /* 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)) { if (!(pa_setting & BIT0)) {
phy_set_rf_reg(padapter, RF_PATH_A, 0x15, 0x0FFFFF, 0x0F406); phy_set_rf_reg(padapter, RF_PATH_A, 0x15, 0x0FFFFF, 0x0F406);
@ -408,7 +408,7 @@ _InitNormalChipOneOutEpPriority(
value = QUEUE_NORMAL; value = QUEUE_NORMAL;
break; break;
default: default:
/* RT_ASSERT(FALSE,("Shall not reach here!\n")); */ /* RT_ASSERT(false,("Shall not reach here!\n")); */
break; break;
} }
@ -449,7 +449,7 @@ _InitNormalChipTwoOutEpPriority(
valueLow = QUEUE_NORMAL; valueLow = QUEUE_NORMAL;
break; break;
default: default:
/* RT_ASSERT(FALSE,("Shall not reach here!\n")); */ /* RT_ASSERT(false,("Shall not reach here!\n")); */
break; break;
} }
@ -517,7 +517,7 @@ _InitQueuePriority(
_InitNormalChipThreeOutEpPriority(Adapter); _InitNormalChipThreeOutEpPriority(Adapter);
break; break;
default: default:
/* RT_ASSERT(FALSE,("Shall not reach here!\n")); */ /* RT_ASSERT(false,("Shall not reach here!\n")); */
break; break;
} }
@ -741,7 +741,7 @@ usb_AggSettingTxUpdate(
u32 value32; u32 value32;
if (Adapter->registrypriv.wifi_spec) if (Adapter->registrypriv.wifi_spec)
pHalData->UsbTxAggMode = _FALSE; pHalData->UsbTxAggMode = false;
if (pHalData->UsbTxAggMode) { if (pHalData->UsbTxAggMode) {
value32 = rtw_read32(Adapter, REG_TDECTRL); value32 = rtw_read32(Adapter, REG_TDECTRL);
@ -846,7 +846,7 @@ usb_AggSettingRxUpdate(
pHalData->HwRxPageSize = 1024; pHalData->HwRxPageSize = 1024;
break; break;
default: 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; break;
} }
#endif #endif
@ -866,7 +866,7 @@ InitUsbAggregationSetting(
usb_AggSettingRxUpdate(Adapter); usb_AggSettingRxUpdate(Adapter);
/* 201/12/10 MH Add for USB agg mode dynamic switch. */ /* 201/12/10 MH Add for USB agg mode dynamic switch. */
pHalData->UsbRxHighSpeedMode = _FALSE; pHalData->UsbRxHighSpeedMode = false;
} }
static void static void
@ -1144,12 +1144,12 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
_ps_open_RF(Adapter); _ps_open_RF(Adapter);
if (pHalData->bIQKInitialized) { if (pHalData->bIQKInitialized) {
/* PHY_IQCalibrate(padapter, _TRUE); */ /* PHY_IQCalibrate(padapter, true); */
phy_iq_calibrate_8188e(Adapter, _TRUE); phy_iq_calibrate_8188e(Adapter, true);
} else { } else {
/* PHY_IQCalibrate(padapter, _FALSE); */ /* PHY_IQCalibrate(padapter, false); */
phy_iq_calibrate_8188e(Adapter, _FALSE); phy_iq_calibrate_8188e(Adapter, false);
pHalData->bIQKInitialized = _TRUE; pHalData->bIQKInitialized = true;
} }
/* dm_check_txpowertracking(padapter); /* dm_check_txpowertracking(padapter);
@ -1172,7 +1172,7 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
/* Save target channel */ /* Save target channel */
/* <Roger_Notes> Current Channel will be updated again later. */ /* <Roger_Notes> Current Channel will be updated again later. */
pHalData->current_channel = 6;/* default set to 6 */ pHalData->current_channel = 6;/* default set to 6 */
if (pwrctrlpriv->reg_rfoff == _TRUE) if (pwrctrlpriv->reg_rfoff == true)
pwrctrlpriv->rf_pwrstate = rf_off; pwrctrlpriv->rf_pwrstate = rf_off;
/* 2010/08/09 MH We need to check if we need to turnon or off RF after detecting */ /* 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); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_DOWNLOAD_FW);
if (Adapter->registrypriv.mp_mode == 0) { if (Adapter->registrypriv.mp_mode == 0) {
status = rtl8188e_FirmwareDownload(Adapter, _FALSE); status = rtl8188e_FirmwareDownload(Adapter, false);
if (status != _SUCCESS) { if (status != _SUCCESS) {
RTW_INFO("%s: Download Firmware failed!!\n", __func__); RTW_INFO("%s: Download Firmware failed!!\n", __func__);
Adapter->bFWReady = _FALSE; Adapter->bFWReady = false;
pHalData->fw_ractrl = _FALSE; pHalData->fw_ractrl = false;
return status; return status;
} else { } else {
Adapter->bFWReady = _TRUE; Adapter->bFWReady = true;
#ifdef CONFIG_SFW_SUPPORTED #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 #else
pHalData->fw_ractrl = _FALSE; pHalData->fw_ractrl = false;
#endif #endif
} }
} }
@ -1277,7 +1277,7 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
InitUsbAggregationSetting(Adapter); InitUsbAggregationSetting(Adapter);
_InitOperationMode(Adapter);/* todo */ _InitOperationMode(Adapter);/* todo */
_InitBeaconParameters(Adapter); _InitBeaconParameters(Adapter);
_InitBeaconMaxError(Adapter, _TRUE); _InitBeaconMaxError(Adapter, true);
/* */ /* */
/* Init CR MACTXEN, MACRXEN after setting RxFF boundary REG_TRXFF_BNDY to patch */ /* 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. */ /* 2010/08/26 MH Merge from 8192CE. */
if (pwrctrlpriv->rf_pwrstate == rf_on) { if (pwrctrlpriv->rf_pwrstate == rf_on) {
if (pHalData->bIQKInitialized) if (pHalData->bIQKInitialized)
phy_iq_calibrate_8188e(Adapter, _TRUE); phy_iq_calibrate_8188e(Adapter, true);
else { else {
phy_iq_calibrate_8188e(Adapter, _FALSE); phy_iq_calibrate_8188e(Adapter, false);
pHalData->bIQKInitialized = _TRUE; pHalData->bIQKInitialized = true;
} }
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_PW_TRACK); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_PW_TRACK);
@ -1499,10 +1499,10 @@ hal_poweroff_8188eu(
u8 val8; u8 val8;
u16 val16; u16 val16;
u32 val32; u32 val32;
u8 bMacPwrCtrlOn = _FALSE; u8 bMacPwrCtrlOn = false;
rtw_hal_get_hwreg(Adapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); rtw_hal_get_hwreg(Adapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
if (bMacPwrCtrlOn == _FALSE) if (bMacPwrCtrlOn == false)
return ; return ;
/* Stop Tx Report Timer. 0x4EC[Bit1]=b'0 */ /* 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_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 */ 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); rtw_hal_set_hwreg(Adapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
} }
static void rtl8188eu_hw_power_down(_adapter *padapter) 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 */ /* issue Rx irp to receive data */
precvbuf = (struct recv_buf *)precvpriv->precv_buf; precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) { 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; status = _FAIL;
goto exit; goto exit;
} }
@ -1647,7 +1647,7 @@ static unsigned int rtl8188eu_inirp_init(PADAPTER Adapter)
goto exit; goto exit;
} }
_read_interrupt = pintfhdl->io_ops._read_interrupt; _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; status = _FAIL;
} }
#endif #endif
@ -1688,14 +1688,14 @@ _ReadLEDSetting(
struct led_priv *pledpriv = &(Adapter->ledpriv); struct led_priv *pledpriv = &(Adapter->ledpriv);
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
#ifdef CONFIG_SW_LED #ifdef CONFIG_SW_LED
pledpriv->bRegUseLed = _TRUE; pledpriv->bRegUseLed = true;
switch (pHalData->CustomerID) { switch (pHalData->CustomerID) {
default: default:
pledpriv->LedStrategy = SW_LED_MODE1; pledpriv->LedStrategy = SW_LED_MODE1;
break; 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 */ #else /* HW LED */
pledpriv->LedStrategy = HW_LED; pledpriv->LedStrategy = HW_LED;
#endif /* CONFIG_SW_LED */ #endif /* CONFIG_SW_LED */
@ -1798,8 +1798,8 @@ static void _ReadPROMContent(
/* check system boot selection */ /* check system boot selection */
eeValue = rtw_read8(Adapter, REG_9346CR); eeValue = rtw_read8(Adapter, REG_9346CR);
pHalData->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? _TRUE : _FALSE; pHalData->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? true : false;
pHalData->bautoload_fail_flag = (eeValue & EEPROM_EN) ? _FALSE : _TRUE; pHalData->bautoload_fail_flag = (eeValue & EEPROM_EN) ? false : true;
RTW_INFO("Boot from %s, Autoload %s !\n", (pHalData->EepromOrEfuse ? "EEPROM" : "EFUSE"), RTW_INFO("Boot from %s, Autoload %s !\n", (pHalData->EepromOrEfuse ? "EEPROM" : "EFUSE"),
(pHalData->bautoload_fail_flag ? "Fail" : "OK")); (pHalData->bautoload_fail_flag ? "Fail" : "OK"));
@ -1933,7 +1933,7 @@ GetHalDefVar8188EUsb(
case HAL_DEF_TX_LDPC: case HAL_DEF_TX_LDPC:
case HAL_DEF_RX_LDPC: case HAL_DEF_RX_LDPC:
*((u8 *)pValue) = _FALSE; *((u8 *)pValue) = false;
break; break;
case HAL_DEF_TX_STBC: case HAL_DEF_TX_STBC:
*((u8 *)pValue) = 0; *((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_CCK, 0x50);
rtw_write8(padapter, REG_RXTSF_OFFSET_OFDM, 0x50); rtw_write8(padapter, REG_RXTSF_OFFSET_OFDM, 0x50);
_BeaconFunctionEnable(padapter, _TRUE, _TRUE); _BeaconFunctionEnable(padapter, true, true);
ResumeTxBeacon(padapter); ResumeTxBeacon(padapter);
@ -2055,14 +2055,14 @@ static void rtl8188eu_init_default_value(_adapter *padapter)
rtl8188e_init_default_value(padapter); rtl8188e_init_default_value(padapter);
/* init default value */ /* init default value */
pHalData->fw_ractrl = _FALSE; pHalData->fw_ractrl = false;
if (!pwrctrlpriv->bkeepfwalive) if (!pwrctrlpriv->bkeepfwalive)
pHalData->LastHMEBoxNum = 0; pHalData->LastHMEBoxNum = 0;
/* init dm default value */ /* init dm default value */
pHalData->bIQKInitialized = _FALSE; pHalData->bIQKInitialized = false;
pHalData->odmpriv.rf_calibrate_info.tm_trigger = 0;/* for IQK */ pHalData->odmpriv.rf_calibrate_info.tm_trigger = 0;/* for IQK */
/* pdmpriv->binitialized = _FALSE; /* pdmpriv->binitialized = false;
* pdmpriv->prv_traffic_idx = 3; * pdmpriv->prv_traffic_idx = 3;
* pdmpriv->initialize = 0; */ * pdmpriv->initialize = 0; */
pHalData->odmpriv.rf_calibrate_info.thermal_value_hp_index = 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) static u8 rtl8188eu_ps_func(PADAPTER Adapter, HAL_INTF_PS_FUNC efunc_id, u8 *val)
{ {
u8 bResult = _TRUE; u8 bResult = true;
switch (efunc_id) { switch (efunc_id) {
#if defined(CONFIG_AUTOSUSPEND) && defined(SUPPORT_HW_RFOFF_DETECTED) #if defined(CONFIG_AUTOSUSPEND) && defined(SUPPORT_HW_RFOFF_DETECTED)

View file

@ -147,7 +147,7 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr)
} }
#ifdef CONFIG_RX_PACKET_APPEND_FCS #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)) if ((pattrib->pkt_rpt_type == NORMAL_RX) && (pHalData->ReceiveConfig & RCR_APPFCS))
pattrib->pkt_len -= IEEE80211_FCS_LEN; pattrib->pkt_len -= IEEE80211_FCS_LEN;
#endif #endif
@ -234,7 +234,7 @@ _exit_recvbuf2recvframe:
void rtl8188eu_xmit_tasklet(void *priv) void rtl8188eu_xmit_tasklet(void *priv)
{ {
int ret = _FALSE; int ret = false;
_adapter *padapter = (_adapter *)priv; _adapter *padapter = (_adapter *)priv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
@ -244,12 +244,12 @@ void rtl8188eu_xmit_tasklet(void *priv)
break; break;
} }
if (rtw_xmit_ac_blocked(padapter) == _TRUE) if (rtw_xmit_ac_blocked(padapter) == true)
break; break;
ret = rtl8188eu_xmitframe_complete(padapter, pxmitpriv, NULL); ret = rtl8188eu_xmitframe_complete(padapter, pxmitpriv, NULL);
if (ret == _FALSE) if (ret == false)
break; break;
} }

View file

@ -203,7 +203,7 @@ SetAntennaConfig92C(
* 2) "#define RTL8723_FPGA_VERIFICATION 1" in Precomp.h.WlanE.Windows * 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. * 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_ENABLE 1
#define SIC_HW_SUPPORT 1 #define SIC_HW_SUPPORT 1
#else #else

View file

@ -20,9 +20,6 @@
#ifndef __HAL_VERSION_DEF_H__ #ifndef __HAL_VERSION_DEF_H__
#define __HAL_VERSION_DEF_H__ #define __HAL_VERSION_DEF_H__
#define TRUE _TRUE
#define FALSE _FALSE
/* HAL_IC_TYPE_E */ /* HAL_IC_TYPE_E */
typedef enum tag_HAL_IC_Type_Definition { typedef enum tag_HAL_IC_Type_Definition {
CHIP_8192S = 0, CHIP_8192S = 0,
@ -109,67 +106,67 @@ typedef struct tag_HAL_VERSION {
* HAL_VERSION VersionID */ * HAL_VERSION VersionID */
/* HAL_IC_TYPE_E */ /* HAL_IC_TYPE_E */
#define IS_8188E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188E) ? 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_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_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_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_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_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_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_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_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_8821C_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8821C) ? true : false)
#define IS_8723D_SERIES(version)\ #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 */ /* HAL_CHIP_TYPE_E */
#define IS_TEST_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == TEST_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) #define IS_NORMAL_CHIP(version) ((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) ? true : false)
/* HAL_CUT_VERSION_E */ /* HAL_CUT_VERSION_E */
#define IS_A_CUT(version) ((GET_CVID_CUT_VERSION(version) == A_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_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_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_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_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_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_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_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_K_CUT(version) ((GET_CVID_CUT_VERSION(version) == K_CUT_VERSION) ? true : false)
/* HAL_VENDOR_E */ /* HAL_VENDOR_E */
#define IS_CHIP_VENDOR_TSMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC) ? 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_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_SMIC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_SMIC) ? true : false)
/* HAL_RF_TYPE_E */ /* HAL_RF_TYPE_E */
#define IS_1T1R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? 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_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_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_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_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_4T4R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_4T4R) ? true : false)
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* Chip version Macro. -- * 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_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_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_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_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_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_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_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_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_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_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_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_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 #endif

View file

@ -22,7 +22,7 @@
/* #define CONFIG_DISABLE_ODM */ /* #define CONFIG_DISABLE_ODM */
/* for FPGA VERIFICATION config */ /* for FPGA VERIFICATION config */
#define RTL8188E_FPGA_TRUE_PHY_VERIFICATION 0 #define RTL8188E_FPGAtrue_PHY_VERIFICATION 0
/* ***** temporarily flag ******* */ /* ***** temporarily flag ******* */
/* /*

View file

@ -24,18 +24,6 @@
#define SUCCESS 0 #define SUCCESS 0
#define FAIL (-1) #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/version.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h> #include <linux/module.h>

View file

@ -966,22 +966,22 @@ struct dvobj_priv {
static inline void dev_set_surprise_removed(struct dvobj_priv *dvobj) 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) 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) 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) 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_surprise_removed(dvobj) (ATOMIC_READ(&dvobj->bSurpriseRemoved) == true)
#define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == _TRUE) #define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == true)
static struct device *dvobj_to_dev(struct dvobj_priv *dvobj) static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
{ {

View file

@ -192,11 +192,11 @@ typedef struct _LED_USB {
LED_PIN LedPin; /* Identify how to implement this SW led. */ LED_PIN LedPin; /* Identify how to implement this SW led. */
LED_STATE CurrLedState; /* Current LED state. */ 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 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 */ /* ALPHA, added by chiyoko, 20090106 */
bool bLedNoLinkBlinkInProgress; bool bLedNoLinkBlinkInProgress;
bool bLedLinkBlinkInProgress; bool bLedLinkBlinkInProgress;

View file

@ -432,15 +432,15 @@
/* RXERR_RPT */ /* RXERR_RPT */
#define RXERR_TYPE_OFDM_PPDU 0 #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_OK 2
#define RXERR_TYPE_OFDM_MPDU_FAIL 3 #define RXERR_TYPE_OFDM_MPDU_FAIL 3
#define RXERR_TYPE_CCK_PPDU 4 #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_OK 6
#define RXERR_TYPE_CCK_MPDU_FAIL 7 #define RXERR_TYPE_CCK_MPDU_FAIL 7
#define RXERR_TYPE_HT_PPDU 8 #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_TOTAL 10
#define RXERR_TYPE_HT_MPDU_OK 11 #define RXERR_TYPE_HT_MPDU_OK 11
#define RXERR_TYPE_HT_MPDU_FAIL 12 #define RXERR_TYPE_HT_MPDU_FAIL 12
@ -823,8 +823,8 @@ Default: 00b.
#define TOTAL_CAM_ENTRY 32 #define TOTAL_CAM_ENTRY 32
#define HALF_CAM_ENTRY 16 #define HALF_CAM_ENTRY 16
#define CAM_CONFIG_USEDK _TRUE #define CAM_CONFIG_USEDK true
#define CAM_CONFIG_NO_USEDK _FALSE #define CAM_CONFIG_NO_USEDK false
#define CAM_WRITE BIT(16) #define CAM_WRITE BIT(16)
#define CAM_READ 0x00000000 #define CAM_READ 0x00000000

View file

@ -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 get_hal_mac_addr(adapter) (GET_HAL_DATA(adapter)->EEPROMMACAddr)
#define is_boot_from_eeprom(adapter) (GET_HAL_DATA(adapter)->EepromOrEfuse) #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_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 #ifdef CONFIG_AUTO_CHNL_SEL_NHM
#define GET_ACS_STATE(padapter) (ATOMIC_READ(&GET_HAL_DATA(padapter)->acs.state)) #define GET_ACS_STATE(padapter) (ATOMIC_READ(&GET_HAL_DATA(padapter)->acs.state))

View file

@ -214,21 +214,21 @@ enum NETWORK_TYPE {
#define IsLegacyOnly(NetType) ((NetType) == ((NetType) & (WIRELESS_11BG | WIRELESS_11A))) #define IsLegacyOnly(NetType) ((NetType) == ((NetType) & (WIRELESS_11BG | WIRELESS_11A)))
#define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_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 is_supported_5g(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false)
#define IsEnableHWCCK(NetType) IsSupported24G(NetType) #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 IsSupportedRxCCK(NetType) IsEnableHWCCK(NetType)
#define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType) #define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType)
#define IsSupportedRxHT(NetType) IsEnableHWOFDM(NetType) #define IsSupportedRxHT(NetType) IsEnableHWOFDM(NetType)
#define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? _TRUE : _FALSE) #define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? true : false)
#define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G | WIRELESS_11A) ? _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_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)

View file

@ -98,7 +98,7 @@
/* by Owen for RTL8185 Phy Status Report Utility */ /* 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_DEBUG_MODE 0xFF818581
#define OID_RT_UTILITY_SELECT_SUBCARRIER_NUMBER 0xFF818582 #define OID_RT_UTILITY_SELECT_SUBCARRIER_NUMBER 0xFF818582
#define OID_RT_UTILITY_GET_RSSI_STATUS 0xFF818583 #define OID_RT_UTILITY_GET_RSSI_STATUS 0xFF818583

View file

@ -29,15 +29,6 @@
#define RTW_RBUF_UNAVAIL 5 #define RTW_RBUF_UNAVAIL 5
#define RTW_RBUF_PKT_UNAVAIL 6 #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> #include <osdep_service_linux.h>
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl #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) __inline static int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4)
{ {
int ret = _TRUE; int ret = true;
return ret; return ret;
} }

View file

@ -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_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 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) ) */ /* #define RT_IS_FUNC_DISABLED(__pAdapter, __FuncBits) ( (__pAdapter)->DisabledFunctions & (__FuncBits) ) */

View file

@ -93,7 +93,7 @@ enum _SOUNDING_STATE {
}; };
struct beamformee_entry { struct beamformee_entry {
u8 used; /* _TRUE/_FALSE */ u8 used; /* true/false */
u8 txbf; u8 txbf;
u8 sounding; u8 sounding;
/* Used to construct AID field of NDPA packet */ /* Used to construct AID field of NDPA packet */
@ -143,7 +143,7 @@ struct beamformee_entry {
u8 user_position[16]; u8 user_position[16];
/* For 8822B C-cut workaround */ /* 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; u8 bSuspendSUCap;
}; };

View file

@ -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) #define rtw_write_port_cancel(adapter) _rtw_write_port_cancel(adapter)
#else /* DBG_IO */ #else /* DBG_IO */
#define match_read_sniff_ranges(addr, len) _FALSE #define match_read_sniff_ranges(addr, len) false
#define match_write_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_read_sniff_ranges(path, addr, mask) false
#define match_rf_write_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_read8(adapter, addr) _rtw_read8((adapter), (addr))
#define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr)) #define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr))
#define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr)) #define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr))

View file

@ -106,7 +106,7 @@ void rtw_wfd_st_switch(struct sta_info *sta, bool on);
#endif /* !CONFIG_P2P */ #endif /* !CONFIG_P2P */
#if defined(CONFIG_IOCTL_CFG80211) && defined(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 #else
#define MLME_IS_ROCH(adapter) 0 #define MLME_IS_ROCH(adapter) 0
#endif #endif
@ -446,7 +446,7 @@ struct wifidirect_info {
struct tdls_ss_record { /* signal strength record */ struct tdls_ss_record { /* signal strength record */
u8 macaddr[ETH_ALEN]; u8 macaddr[ETH_ALEN];
u8 RxPWDBAll; 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 { struct tdls_temp_mgmt {
@ -920,12 +920,12 @@ __inline static sint check_fwstate(struct mlme_priv *pmlmepriv, sint state)
{ {
if ((state == WIFI_NULL_STATE) && if ((state == WIFI_NULL_STATE) &&
(pmlmepriv->fw_state == WIFI_NULL_STATE)) (pmlmepriv->fw_state == WIFI_NULL_STATE))
return _TRUE; return true;
if (pmlmepriv->fw_state & state) if (pmlmepriv->fw_state & state)
return _TRUE; return true;
return _FALSE; return false;
} }
__inline static sint get_fwstate(struct mlme_priv *pmlmepriv) __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*/ /*bScanInProcess hook in phydm*/
if (_FW_UNDER_SURVEY == state) if (_FW_UNDER_SURVEY == state)
pmlmepriv->bScanInProcess = _TRUE; pmlmepriv->bScanInProcess = true;
rtw_mi_update_iface_status(pmlmepriv, state); 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*/ /*bScanInProcess hook in phydm*/
if (_FW_UNDER_SURVEY == state) if (_FW_UNDER_SURVEY == state)
pmlmepriv->bScanInProcess = _TRUE; pmlmepriv->bScanInProcess = true;
rtw_mi_update_iface_status(pmlmepriv, state); 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*/ /*bScanInProcess hook in phydm*/
if (_FW_UNDER_SURVEY == state) if (_FW_UNDER_SURVEY == state)
pmlmepriv->bScanInProcess = _FALSE; pmlmepriv->bScanInProcess = false;
rtw_mi_update_iface_status(pmlmepriv, state); 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_timer_hdl(_adapter *adapter);
void rtw_set_scan_deny(_adapter *adapter, u32 ms); void rtw_set_scan_deny(_adapter *adapter, u32 ms);
#else #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_clear_scan_deny(adapter) do {} while (0)
#define rtw_set_scan_deny_timer_hdl(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) #define rtw_set_scan_deny(adapter, ms) do {} while (0)

View file

@ -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); void rtw_reset_cac(_adapter *adapter, u8 ch, u8 bw, u8 offset);
#else #else
#define CH_IS_NON_OCP(rt_ch_info) 0 #define CH_IS_NON_OCP(rt_ch_info) 0
#define rtw_chset_is_ch_non_ocp(ch_set, ch, bw, offset) _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 #define rtw_rfctl_is_tx_blocked_by_ch_waiting(rfctl) false
#endif #endif
enum { enum {
@ -664,9 +664,9 @@ struct mlme_ext_priv {
static inline u8 check_mlmeinfo_state(struct mlme_ext_priv *plmeext, sint state) static inline u8 check_mlmeinfo_state(struct mlme_ext_priv *plmeext, sint state)
{ {
if ((plmeext->mlmext_info.state & 0x03) == 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) #define mlmeext_msr(mlmeext) ((mlmeext)->mlmext_info.state & 0x03)

View file

@ -167,7 +167,7 @@ typedef struct _MPT_CONTEXT {
WIRELESS_MODE MptWirelessModeToSw; /* Wireless mode to switch. */ WIRELESS_MODE MptWirelessModeToSw; /* Wireless mode to switch. */
u8 MptChannelToSw; /* Channel to switch. */ u8 MptChannelToSw; /* Channel to switch. */
u8 MptInitGainToSet; /* Initial gain to set. */ 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 MptBandWidth; /* bandwidth to switch. */
u32 mpt_rate_index;/* rate index. */ u32 mpt_rate_index;/* rate index. */
@ -181,25 +181,25 @@ typedef struct _MPT_CONTEXT {
u32 RegTxPwrLimit; u32 RegTxPwrLimit;
/* Content of RCR Regsiter for Mass Production Test. */ /* Content of RCR Regsiter for Mass Production Test. */
u32 MptRCR; u32 MptRCR;
/* TRUE if we only receive packets with specific pattern. */ /* true if we only receive packets with specific pattern. */
bool bMptFilterPattern; bool bMptFilterPattern;
/* Rx OK count, statistics used in Mass Production Test. */ /* Rx OK count, statistics used in Mass Production Test. */
u32 MptRxOkCnt; u32 MptRxOkCnt;
/* Rx CRC32 error count, statistics used in Mass Production Test. */ /* Rx CRC32 error count, statistics used in Mass Production Test. */
u32 MptRxCrcErrCnt; u32 MptRxCrcErrCnt;
bool bCckContTx; /* TRUE if we are in CCK 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. */ bool bOfdmContTx; /* true if we are in OFDM Continuous Tx test. */
/* TRUE if we have start Continuous Tx test. */ /* true if we have start Continuous Tx test. */
bool is_start_cont_tx; 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; bool bSingleCarrier;
/* TRUE if we are in Carrier Suppression Tx Test. */ /* true if we are in Carrier Suppression Tx Test. */
bool is_carrier_suppression; 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; bool is_single_tone;
@ -402,8 +402,8 @@ typedef struct _MP_FIRMWARE {
/* *********************************************************************** */ /* *********************************************************************** */
#define LOWER _TRUE #define LOWER true
#define RAISE _FALSE #define RAISE false
/* Hardware Registers */ /* Hardware Registers */
#define BB_REG_BASE_ADDR 0x800 #define BB_REG_BASE_ADDR 0x800

View file

@ -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_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_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_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) #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_register_early_suspend(struct pwrctrl_priv *pwrpriv);
void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv); void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv);
#else #else
#define rtw_is_earlysuspend_registered(pwrpriv) _FALSE #define rtw_is_earlysuspend_registered(pwrpriv) false
#define rtw_is_do_late_resume(pwrpriv) _FALSE #define rtw_is_do_late_resume(pwrpriv) false
#define rtw_set_do_late_resume(pwrpriv, enable) do {} while (0) #define rtw_set_do_late_resume(pwrpriv, enable) do {} while (0)
#define rtw_register_early_suspend(pwrpriv) do {} while (0) #define rtw_register_early_suspend(pwrpriv) do {} while (0)
#define rtw_unregister_early_suspend(pwrpriv) do {} while (0) #define rtw_unregister_early_suspend(pwrpriv) do {} while (0)

View file

@ -184,7 +184,7 @@ struct security_priv {
s32 sw_encrypt;/* from registry_priv */ s32 sw_encrypt;/* from registry_priv */
s32 sw_decrypt;/* 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) */ /* keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc) */

View file

@ -118,10 +118,10 @@
* (1, 1) : AMPDU and AMSDU in AMPDU are enable. So, AMSDU is valid to send. * (1, 1) : AMPDU and AMSDU in AMPDU are enable. So, AMSDU is valid to send.
*/ */
#define IS_AMSDU_AMPDU_NOT_VALID(pattrib)\ #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)\ #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 #define HWXMIT_ENTRY 4

View file

@ -61,14 +61,14 @@ enum RTW_USB_SPEED {
static inline u8 rtw_usb_bulk_size_boundary(_adapter *padapter, int buf_len) 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)) 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)) 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 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; return rst;
} }

View file

@ -409,15 +409,15 @@ enum WIFI_REG_DOMAIN {
(\ (\
((addr[0] == 0xff) && (addr[1] == 0xff) && \ ((addr[0] == 0xff) && (addr[1] == 0xff) && \
(addr[2] == 0xff) && (addr[3] == 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) __inline static int IS_MCAST(unsigned char *da)
{ {
if ((*da) & 0x01) if ((*da) & 0x01)
return _TRUE; return true;
else else
return _FALSE; return false;
} }
__inline static unsigned char *get_ra(unsigned char *pframe) __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) __inline static int IsFrameTypeCtrl(unsigned char *pframe)
{ {
if (WIFI_CTRL_TYPE == GetFrameType(pframe)) if (WIFI_CTRL_TYPE == GetFrameType(pframe))
return _TRUE; return true;
else else
return _FALSE; return false;
} }
/*----------------------------------------------------------------------------- /*-----------------------------------------------------------------------------
Below is for the security related definition 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

View file

@ -372,7 +372,7 @@ int rtw_mp_start(struct net_device *dev,
LeaveAllPowerSaveMode(padapter); LeaveAllPowerSaveMode(padapter);
if (rtw_mi_check_fwstate(padapter, _FW_UNDER_SURVEY)) 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) if (rtw_mp_cmd(padapter, MP_START, RTW_CMDF_WAIT_ACK) != _SUCCESS)
ret = -EPERM; ret = -EPERM;
@ -734,7 +734,7 @@ int rtw_mp_ctx(struct net_device *dev,
return 0; return 0;
} }
#endif #endif
countPkTx = strncmp(extra, "count=", 5); /* strncmp TRUE is 0*/ countPkTx = strncmp(extra, "count=", 5); /* strncmp true is 0*/
cotuTx = strncmp(extra, "background", 20); cotuTx = strncmp(extra, "background", 20);
CarrSprTx = strncmp(extra, "background,cs", 20); CarrSprTx = strncmp(extra, "background,cs", 20);
scTx = strncmp(extra, "background,sc", 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"); RTW_INFO("Set OID_RT_SET_DISABLE_BT_COEXIST: disable BT_COEXIST\n");
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
rtw_btcoex_HaltNotify(padapter); rtw_btcoex_HaltNotify(padapter);
rtw_btcoex_SetManualControl(padapter, _TRUE); rtw_btcoex_SetManualControl(padapter, true);
/* Force to switch Antenna to WiFi*/ /* Force to switch Antenna to WiFi*/
rtw_write16(padapter, 0x870, 0x300); rtw_write16(padapter, 0x870, 0x300);
rtw_write16(padapter, 0x860, 0x110); rtw_write16(padapter, 0x860, 0x110);
@ -838,7 +838,7 @@ int rtw_mp_disable_bt_coexist(struct net_device *dev,
/* CONFIG_BT_COEXIST */ /* CONFIG_BT_COEXIST */
} else { } else {
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
rtw_btcoex_SetManualControl(padapter, _FALSE); rtw_btcoex_SetManualControl(padapter, false);
#endif #endif
} }
@ -872,16 +872,16 @@ int rtw_mp_arx(struct net_device *dev,
return 0; return 0;
} }
#endif #endif
bStartRx = (strncmp(input, "start", 5) == 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*/ bStopRx = (strncmp(input, "stop", 5) == 0) ? 1 : 0; /* strncmp true is 0*/
bQueryPhy = (strncmp(input, "phy", 3) == 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*/ bQueryMac = (strncmp(input, "mac", 3) == 0) ? 1 : 0; /* strncmp true is 0*/
bSetBssid = (strncmp(input, "setbssid=", 8) == 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;*/ /*bfilter_init = (strncmp(input, "filter_init",11)==0)?1:0;*/
bmac_filter = (strncmp(input, "accept_mac", 10) == 0) ? 1 : 0; bmac_filter = (strncmp(input, "accept_mac", 10) == 0) ? 1 : 0;
bmon = (strncmp(input, "mon=", 4) == 0) ? 1 : 0; bmon = (strncmp(input, "mon=", 4) == 0) ? 1 : 0;
bSmpCfg = (strncmp(input , "smpcfg=" , 7) == 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) { if (bSetBssid == 1) {
pch = input; pch = input;
@ -904,7 +904,7 @@ int rtw_mp_arx(struct net_device *dev,
} else } else
return -EFAULT; return -EFAULT;
pmppriv->bSetRxBssid = _TRUE; pmppriv->bSetRxBssid = true;
} }
if (bmac_filter) { if (bmac_filter) {
@ -933,11 +933,11 @@ int rtw_mp_arx(struct net_device *dev,
if (bStartRx) { if (bStartRx) {
sprintf(extra, "start"); sprintf(extra, "start");
SetPacketRx(padapter, bStartRx, _FALSE); SetPacketRx(padapter, bStartRx, false);
} else if (bStopRx) { } else if (bStopRx) {
SetPacketRx(padapter, bStartRx, _FALSE); SetPacketRx(padapter, bStartRx, false);
pmppriv->bmac_filter = _FALSE; pmppriv->bmac_filter = false;
pmppriv->bSetRxBssid = _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); 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) { } else if (bQueryPhy) {
memset(&rx_counter, 0, sizeof(struct dbg_rx_counter)); 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); ret = sscanf(input, "mon=%d", &bmon);
if (bmon == 1) { if (bmon == 1) {
pmppriv->rx_bindicatePkt = _TRUE; pmppriv->rx_bindicatePkt = true;
sprintf(extra, "Indicating Receive Packet to network start\n"); sprintf(extra, "Indicating Receive Packet to network start\n");
} else { } else {
pmppriv->rx_bindicatePkt = _FALSE; pmppriv->rx_bindicatePkt = false;
sprintf(extra, "Indicating Receive Packet to network Stop\n"); 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); ret = sscanf(input, "smpcfg=%d", &bSmpCfg);
if (bSmpCfg == 1) { if (bSmpCfg == 1) {
pmppriv->bRTWSmbCfg = _TRUE; pmppriv->bRTWSmbCfg = true;
sprintf(extra , "Indicate By Simple Config Format\n"); sprintf(extra , "Indicate By Simple Config Format\n");
SetPacketRx(padapter, _TRUE, _TRUE); SetPacketRx(padapter, true, true);
} else { } else {
pmppriv->bRTWSmbCfg = _FALSE; pmppriv->bRTWSmbCfg = false;
sprintf(extra , "Indicate By Normal Format\n"); 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"); sprintf(extra , "Enter MAC LoopBack mode\n");
_rtw_write32(padapter, 0x100, 0xB0106FF); _rtw_write32(padapter, 0x100, 0xB0106FF);
RTW_INFO("0x100 :0x%x" , _rtw_read32(padapter, 0x100)); 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); PMPT_CONTEXT pMptCtx = &(padapter->mppriv.mpt_ctx);
RT_PMAC_TX_INFO PMacTxInfo = pMptCtx->PMacTxInfo; RT_PMAC_TX_INFO PMacTxInfo = pMptCtx->PMacTxInfo;
if (PMacTxInfo.bEnPMacTx == TRUE) if (PMacTxInfo.bEnPMacTx == true)
txok = hal_mpt_query_phytxok(padapter); txok = hal_mpt_query_phytxok(padapter);
else else
txok = padapter->mppriv.tx.sended; 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)) if (copy_from_user(extra, wrqu->pointer, wrqu->length))
return -EFAULT; return -EFAULT;
bwrite = strncmp(extra, "write", 6);/* strncmp TRUE is 0*/ bwrite = strncmp(extra, "write", 6);/* strncmp true is 0*/
GetThermalMeter(padapter, &val); GetThermalMeter(padapter, &val);
if (bwrite == 0) { if (bwrite == 0) {
/*RTW_INFO("to write val:%d",val);*/ /*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) { if (2 > max_available_size) {
RTW_INFO("no available efuse!\n"); RTW_INFO("no available efuse!\n");
return -EFAULT; return -EFAULT;
@ -1227,19 +1227,19 @@ int rtw_mp_SetRFPath(struct net_device *dev,
if (copy_from_user(input, wrqu->pointer, wrqu->length)) if (copy_from_user(input, wrqu->pointer, wrqu->length))
return -EFAULT; return -EFAULT;
bMain = strncmp(input, "1", 2); /* strncmp TRUE is 0*/ bMain = strncmp(input, "1", 2); /* strncmp true is 0*/
bTurnoff = strncmp(input, "0", 3); /* strncmp TRUE is 0*/ bTurnoff = strncmp(input, "0", 3); /* strncmp true is 0*/
memset(extra, 0, wrqu->length); memset(extra, 0, wrqu->length);
if (bMain == 0) { if (bMain == 0) {
MP_PHY_SetRFPathSwitch(padapter, _TRUE); MP_PHY_SetRFPathSwitch(padapter, true);
RTW_INFO("%s:PHY_SetRFPathSwitch=TRUE\n", __func__); RTW_INFO("%s:PHY_SetRFPathSwitch=true\n", __func__);
sprintf(extra, "mp_setrfpath Main\n"); sprintf(extra, "mp_setrfpath Main\n");
} else if (bTurnoff == 0) { } else if (bTurnoff == 0) {
MP_PHY_SetRFPathSwitch(padapter, _FALSE); MP_PHY_SetRFPathSwitch(padapter, false);
RTW_INFO("%s:PHY_SetRFPathSwitch=FALSE\n", __func__); RTW_INFO("%s:PHY_SetRFPathSwitch=false\n", __func__);
sprintf(extra, "mp_setrfpath Aux\n"); sprintf(extra, "mp_setrfpath Aux\n");
} else { } else {
bMain = MP_PHY_QueryRFPathSwitch(padapter); bMain = MP_PHY_QueryRFPathSwitch(padapter);
@ -1268,7 +1268,7 @@ int rtw_mp_QueryDrv(struct net_device *dev,
return -EFAULT; return -EFAULT;
RTW_INFO("%s:iwpriv in=%s\n", __func__, input); 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) { if (qAutoLoad == 0) {
RTW_INFO("%s:qAutoLoad\n", __func__); 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)) if (copy_from_user(input, wrqu->pointer, wrqu->length))
return -EFAULT; return -EFAULT;
bstart = strncmp(input, "start", 5); /* strncmp TRUE is 0*/ bstart = strncmp(input, "start", 5); /* strncmp true is 0*/
if (bstart == 0) { if (bstart == 0) {
sprintf(extra, "PwrCtlDM start\n"); sprintf(extra, "PwrCtlDM start\n");
MPT_PwrCtlDM(padapter, 1); 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__); RTW_INFO("%s: initialize MP private data Fail!\n", __func__);
padapter->mppriv.channel = 6; padapter->mppriv.channel = 6;
bstart = strncmp(extra, "start", 5); /* strncmp TRUE is 0*/ bstart = strncmp(extra, "start", 5); /* strncmp true is 0*/
bstop = strncmp(extra, "stop", 4); /* strncmp TRUE is 0*/ bstop = strncmp(extra, "stop", 4); /* strncmp true is 0*/
if (bstart == 0) { if (bstart == 0) {
mp_join(padapter, WIFI_FW_ADHOC_STATE); mp_join(padapter, WIFI_FW_ADHOC_STATE);
SetPacketRx(padapter, _TRUE, _FALSE); SetPacketRx(padapter, true, false);
SetChannel(padapter); SetChannel(padapter);
pmp_priv->rx_bindicatePkt = _TRUE; pmp_priv->rx_bindicatePkt = true;
pmp_priv->bRTWSmbCfg = _TRUE; pmp_priv->bRTWSmbCfg = true;
sprintf(extra, "monitor mode start\n"); sprintf(extra, "monitor mode start\n");
} else if (bstop == 0) { } else if (bstop == 0) {
SetPacketRx(padapter, _FALSE, _FALSE); SetPacketRx(padapter, false, false);
pmp_priv->rx_bindicatePkt = _FALSE; pmp_priv->rx_bindicatePkt = false;
pmp_priv->bRTWSmbCfg = _FALSE; pmp_priv->bRTWSmbCfg = false;
padapter->registrypriv.mp_mode = 1; padapter->registrypriv.mp_mode = 1;
pHalFunc->hal_deinit(padapter); pHalFunc->hal_deinit(padapter);
padapter->registrypriv.mp_mode = 0; padapter->registrypriv.mp_mode = 0;
pHalFunc->hal_init(padapter); pHalFunc->hal_init(padapter);
/*rtw_disassoc_cmd(padapter, 0, _TRUE);*/ /*rtw_disassoc_cmd(padapter, 0, true);*/
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) { if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
rtw_disassoc_cmd(padapter, 500, _TRUE); rtw_disassoc_cmd(padapter, 500, true);
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
/*rtw_free_assoc_resources(padapter, 1);*/ /*rtw_free_assoc_resources(padapter, 1);*/
} }
rtw_pm_set_ips(padapter, IPS_NORMAL); 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) { if (strncmp(extra, "pmact=", 6) == 0) {
memset(&pMptCtx->PMacTxInfo, 0, sizeof(pMptCtx->PMacTxInfo)); memset(&pMptCtx->PMacTxInfo, 0, sizeof(pMptCtx->PMacTxInfo));
if (strncmp(extra, "pmact=start", 11) == 0) { if (strncmp(extra, "pmact=start", 11) == 0) {
pMptCtx->PMacTxInfo.bEnPMacTx = _TRUE; pMptCtx->PMacTxInfo.bEnPMacTx = true;
sprintf(extra, "Set PMac Tx Mode start\n"); sprintf(extra, "Set PMac Tx Mode start\n");
} else { } else {
pMptCtx->PMacTxInfo.bEnPMacTx = _FALSE; pMptCtx->PMacTxInfo.bEnPMacTx = false;
sprintf(extra, "Set PMac Tx Mode Stop\n"); sprintf(extra, "Set PMac Tx Mode Stop\n");
} }
if (pMptCtx->bldpc == TRUE) if (pMptCtx->bldpc == true)
pMptCtx->PMacTxInfo.bLDPC = _TRUE; pMptCtx->PMacTxInfo.bLDPC = true;
if (pMptCtx->bstbc == TRUE) if (pMptCtx->bstbc == true)
pMptCtx->PMacTxInfo.bSTBC = _TRUE; pMptCtx->PMacTxInfo.bSTBC = true;
pMptCtx->PMacTxInfo.bSPreamble = pmp_priv->preamble; pMptCtx->PMacTxInfo.bSPreamble = pmp_priv->preamble;
pMptCtx->PMacTxInfo.bSGI = 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.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) if (padapter->mppriv.pktInterval == 0)
pMptCtx->PMacTxInfo.PacketPeriod = 100; pMptCtx->PMacTxInfo.PacketPeriod = 100;
@ -1814,8 +1814,8 @@ int rtw_mp_rx(struct net_device *dev,
if (strncmp(extra, "stop", 4) == 0) { if (strncmp(extra, "stop", 4) == 0) {
memset(extra, 0, wrqu->data.length); memset(extra, 0, wrqu->data.length);
SetPacketRx(padapter, bStartRx, _FALSE); SetPacketRx(padapter, bStartRx, false);
pmp_priv->bmac_filter = _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); 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); wrqu->data.length = strlen(extra);
return 0; return 0;
@ -1902,7 +1902,7 @@ int rtw_mp_rx(struct net_device *dev,
SetAntenna(padapter); SetAntenna(padapter);
sprintf(extra, "%s\nstart Rx", extra); sprintf(extra, "%s\nstart Rx", extra);
SetPacketRx(padapter, bStartRx, _FALSE); SetPacketRx(padapter, bStartRx, false);
} }
wrqu->data.length = strlen(extra); wrqu->data.length = strlen(extra);
return 0; return 0;
@ -1966,8 +1966,8 @@ int rtw_efuse_mask_file(struct net_device *dev,
if ((pch == NULL) || (strlen(pch) == 0)) if ((pch == NULL) || (strlen(pch) == 0))
break; break;
if (strlen(pch) != 2 if (strlen(pch) != 2
|| IsHexDigit(*pch) == _FALSE || IsHexDigit(*pch) == false
|| IsHexDigit(*(pch + 1)) == _FALSE || IsHexDigit(*(pch + 1)) == false
|| sscanf(pch, "%hhx", &tmp) != 1 || 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__); 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++) for (i = 0; i < count; i++)
sprintf(extra, "%s:%02x", extra, maskfileBuffer[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); sprintf(extra, "%s\nLoad Efuse Mask data %d hex ok\n", extra, count);
wrqu->data.length = strlen(extra); wrqu->data.length = strlen(extra);
@ -1988,14 +1988,14 @@ int rtw_efuse_mask_file(struct net_device *dev,
} }
rtw_efuse_mask_file_path = extra; 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)); 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)); Status = rtw_efuse_file_read(padapter, rtw_efuse_mask_file_path, maskfileBuffer, sizeof(maskfileBuffer));
if (Status == _TRUE) if (Status == true)
padapter->registrypriv.bFileMaskEfuse = _TRUE; padapter->registrypriv.bFileMaskEfuse = true;
sprintf(extra, "efuse mask file read OK\n"); sprintf(extra, "efuse mask file read OK\n");
} else { } else {
padapter->registrypriv.bFileMaskEfuse = _FALSE; padapter->registrypriv.bFileMaskEfuse = false;
sprintf(extra, "efuse mask file readable FAIL\n"); sprintf(extra, "efuse mask file readable FAIL\n");
RTW_INFO("%s rtw_is_file_readable fail!\n", __func__); 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); 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); 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)); Status = rtw_efuse_file_read(padapter, rtw_efuse_file_map_path, pEfuseHal->fakeEfuseModifiedMap, sizeof(pEfuseHal->fakeEfuseModifiedMap));
if (Status == _TRUE) { if (Status == true) {
pmp_priv->bloadefusemap = _TRUE; pmp_priv->bloadefusemap = true;
sprintf(extra, "efuse file file_read OK\n"); sprintf(extra, "efuse file file_read OK\n");
} else { } else {
pmp_priv->bloadefusemap = _FALSE; pmp_priv->bloadefusemap = false;
sprintf(extra, "efuse file file_read FAIL\n"); sprintf(extra, "efuse file file_read FAIL\n");
} }
} else { } else {

View file

@ -192,8 +192,8 @@ void rtw_os_indicate_connect(_adapter *adapter)
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) || if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE)) (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true))
rtw_cfg80211_ibss_indicate_connect(adapter); rtw_cfg80211_ibss_indicate_connect(adapter);
else else
rtw_cfg80211_indicate_connect(adapter); rtw_cfg80211_indicate_connect(adapter);

View file

@ -160,9 +160,9 @@ static int rtw_low_power = 0;
#endif #endif
#ifdef CONFIG_DEFAULT_PATTERNS_EN #ifdef CONFIG_DEFAULT_PATTERNS_EN
static bool rtw_support_default_patterns = _TRUE; static bool rtw_support_default_patterns = true;
#else #else
static bool rtw_support_default_patterns = _FALSE; static bool rtw_support_default_patterns = false;
#endif #endif
static int rtw_special_rf_path = 0; /* 0: 2T2R ,1: only turn on path A 1T1R */ 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. */ static int rtw_bt_ampdu = 1 ; /* 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU. */
#endif /* CONFIG_BT_COEXIST */ #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_cfg = 2; /* 0:OFF , 1:ON, 2:decide by Efuse config */
static int rtw_antdiv_type = 0 static int rtw_antdiv_type = 0
@ -750,8 +750,8 @@ uint loadparam(_adapter *padapter)
registry_par->wifi_spec = (u8)rtw_wifi_spec; registry_par->wifi_spec = (u8)rtw_wifi_spec;
if (strlen(rtw_country_code) != 2 if (strlen(rtw_country_code) != 2
|| is_alpha(rtw_country_code[0]) == _FALSE || is_alpha(rtw_country_code[0]) == false
|| is_alpha(rtw_country_code[1]) == _FALSE || is_alpha(rtw_country_code[1]) == false
) { ) {
if (rtw_country_code != rtw_country_unspecified) if (rtw_country_code != rtw_country_unspecified)
RTW_ERR("%s discard rtw_country_code not in alpha2\n", __func__); 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; int ret = -1;
/* only the net_device is in down state to permit modifying mac addr */ /* 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" RTW_INFO(FUNC_ADPT_FMT": The net_device's is not in down state\n"
, FUNC_ADPT_ARG(padapter)); , 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 */ /* 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" RTW_INFO(FUNC_ADPT_FMT": Invalid Mac Addr for "MAC_FMT"\n"
, FUNC_ADPT_ARG(padapter), MAC_ARG(sa->sa_data)); , 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_RX_BIT);
RTW_ENABLE_FUNC(padapter, DF_TX_BIT); RTW_ENABLE_FUNC(padapter, DF_TX_BIT);
padapter->bLinkInfoDump = 0; padapter->bLinkInfoDump = 0;
padapter->bNotifyChannelChange = _FALSE; padapter->bNotifyChannelChange = false;
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
padapter->bShowGetP2PState = 1; padapter->bShowGetP2PState = 1;
#endif #endif
@ -1738,7 +1738,7 @@ struct dvobj_priv *devobj_init(void)
memset(pdvobj->customer_str, 0xFF, RTW_CUSTOMER_STR_LEN); memset(pdvobj->customer_str, 0xFF, RTW_CUSTOMER_STR_LEN);
#endif #endif
pdvobj->processing_dev_remove = _FALSE; pdvobj->processing_dev_remove = false;
ATOMIC_SET(&pdvobj->disable_func, 0); ATOMIC_SET(&pdvobj->disable_func, 0);
@ -1874,9 +1874,9 @@ u8 rtw_reset_drv_sw(_adapter *padapter)
padapter->xmitpriv.tx_pkts = 0; padapter->xmitpriv.tx_pkts = 0;
padapter->recvpriv.rx_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.TrafficTransitionCount = 0;
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0; pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0;
@ -2205,11 +2205,11 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
goto _netdev_virtual_iface_open_error; goto _netdev_virtual_iface_open_error;
#ifdef CONFIG_PLATFORM_INTEL_BYT #ifdef CONFIG_PLATFORM_INTEL_BYT
if (padapter->bup == _FALSE) { if (padapter->bup == false) {
u8 mac[ETH_ALEN]; u8 mac[ETH_ALEN];
/* get mac address from primary_padapter */ /* 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_macaddr_cfg(adapter_mac_addr(primary_padapter), get_hal_mac_addr(primary_padapter));
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN); _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*/ #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); _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)) { rtw_is_hw_init_completed(primary_padapter)) {
padapter->bFWReady = primary_padapter->bFWReady; padapter->bFWReady = primary_padapter->bFWReady;
} }
if (padapter->bup == _FALSE) { if (padapter->bup == false) {
if (rtw_start_drv_threads(padapter) == _FAIL) if (rtw_start_drv_threads(padapter) == _FAIL)
goto _netdev_virtual_iface_open_error; 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); rtw_cfg80211_init_wdev_data(padapter);
#endif #endif
padapter->bup = _TRUE; padapter->bup = true;
padapter->net_closed = _FALSE; padapter->net_closed = false;
rtw_netif_wake_queue(pnetdev); rtw_netif_wake_queue(pnetdev);
@ -2267,7 +2267,7 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
_netdev_virtual_iface_open_error: _netdev_virtual_iface_open_error:
padapter->bup = _FALSE; padapter->bup = false;
#ifdef CONFIG_RTW_NAPI #ifdef CONFIG_RTW_NAPI
if(padapter->napi_state == NAPI_ENABLE) { 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; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup); RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup);
padapter->net_closed = _TRUE; padapter->net_closed = true;
pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
if (pnetdev) if (pnetdev)
rtw_netif_stop_queue(pnetdev); rtw_netif_stop_queue(pnetdev);
@ -2320,7 +2320,7 @@ static int netdev_vir_if_close(struct net_device *pnetdev)
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
rtw_scan_abort(padapter); rtw_scan_abort(padapter);
rtw_cfg80211_wait_scan_req_empty(padapter, 200); rtw_cfg80211_wait_scan_req_empty(padapter, 200);
adapter_wdev_data(padapter)->bandroid_scan = _FALSE; adapter_wdev_data(padapter)->bandroid_scan = false;
#endif #endif
return 0; return 0;
@ -2373,13 +2373,13 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
_rtw_memcpy(padapter, primary_padapter, sizeof(_adapter)); _rtw_memcpy(padapter, primary_padapter, sizeof(_adapter));
/* */ /* */
padapter->bup = _FALSE; padapter->bup = false;
padapter->net_closed = _TRUE; padapter->net_closed = true;
padapter->dir_dev = NULL; padapter->dir_dev = NULL;
padapter->dir_odm = NULL; padapter->dir_odm = NULL;
/*set adapter_type/iface type*/ /*set adapter_type/iface type*/
padapter->isprimary = _FALSE; padapter->isprimary = false;
padapter->adapter_type = VIRTUAL_ADAPTER; padapter->adapter_type = VIRTUAL_ADAPTER;
#ifdef CONFIG_MI_WITH_MBSSID_CAM #ifdef CONFIG_MI_WITH_MBSSID_CAM
@ -2452,10 +2452,10 @@ void rtw_drv_stop_vir_if(_adapter *padapter)
pnetdev = padapter->pnetdev; pnetdev = padapter->pnetdev;
if (check_fwstate(pmlmepriv, _FW_LINKED)) if (check_fwstate(pmlmepriv, _FW_LINKED))
rtw_disassoc_cmd(padapter, 0, _FALSE); rtw_disassoc_cmd(padapter, 0, false);
#ifdef CONFIG_AP_MODE #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); free_mlme_ap_info(padapter);
#ifdef CONFIG_HOSTAPD_MLME #ifdef CONFIG_HOSTAPD_MLME
hostapd_mode_unload(padapter); hostapd_mode_unload(padapter);
@ -2463,7 +2463,7 @@ void rtw_drv_stop_vir_if(_adapter *padapter)
} }
#endif #endif
if (padapter->bup == _TRUE) { if (padapter->bup == true) {
#ifdef CONFIG_XMIT_ACK #ifdef CONFIG_XMIT_ACK
if (padapter->xmitpriv.ack_tx) if (padapter->xmitpriv.ack_tx)
rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP); 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); rtw_stop_drv_threads(padapter);
padapter->bup = _FALSE; padapter->bup = false;
} }
/* cancel timer after thread stop */ /* cancel timer after thread stop */
rtw_cancel_all_timer(padapter); rtw_cancel_all_timer(padapter);
@ -2655,7 +2655,7 @@ void netdev_br_init(struct net_device *netdev)
rcu_read_lock(); rcu_read_lock();
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)) */ #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; */ /* struct net_bridge *br = netdev->br_port->br; */ /* ->dev->dev_addr; */
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) #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); 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 #ifdef CONFIG_PLATFORM_INTEL_BYT
rtw_sdio_set_power(1); rtw_sdio_set_power(1);
#endif /* CONFIG_PLATFORM_INTEL_BYT */ #endif /* CONFIG_PLATFORM_INTEL_BYT */
if (pwrctrlpriv->ps_flag == _TRUE) { if (pwrctrlpriv->ps_flag == true) {
padapter->net_closed = _FALSE; padapter->net_closed = false;
goto netdev_open_normal_process; goto netdev_open_normal_process;
} }
if (padapter->bup == _FALSE) { if (padapter->bup == false) {
#ifdef CONFIG_PLATFORM_INTEL_BYT #ifdef CONFIG_PLATFORM_INTEL_BYT
rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter)); rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter));
#ifdef CONFIG_MI_WITH_MBSSID_CAM #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); rtw_led_control(padapter, LED_CTL_NO_LINK);
padapter->bup = _TRUE; padapter->bup = true;
pwrctrlpriv->bips_processing = _FALSE; pwrctrlpriv->bips_processing = false;
#ifdef CONFIG_PLATFORM_INTEL_BYT #ifdef CONFIG_PLATFORM_INTEL_BYT
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
@ -2771,7 +2771,7 @@ int _netdev_open(struct net_device *pnetdev)
#endif /* CONFIG_BT_COEXIST */ #endif /* CONFIG_BT_COEXIST */
#endif /* CONFIG_PLATFORM_INTEL_BYT */ #endif /* CONFIG_PLATFORM_INTEL_BYT */
} }
padapter->net_closed = _FALSE; padapter->net_closed = false;
_set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000); _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 */ #endif /* CONFIG_BR_EXT */
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX #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); rtw_btcoex_init_socket(padapter);
padapter->coex_info.BtMgnt.ExtConfig.HCIExtensionVer = 0x04; padapter->coex_info.BtMgnt.ExtConfig.HCIExtensionVer = 0x04;
rtw_btcoex_SetHciVersion(padapter, 0x04); rtw_btcoex_SetHciVersion(padapter, 0x04);
@ -2803,7 +2803,7 @@ netdev_open_normal_process:
_adapter *sec_adapter = adapter_to_dvobj(padapter)->padapters[IFACE_ID1]; _adapter *sec_adapter = adapter_to_dvobj(padapter)->padapters[IFACE_ID1];
#ifndef CONFIG_RTW_DYNAMIC_NDEV #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); _netdev_vir_if_open(sec_adapter->pnetdev);
#endif #endif
} }
@ -2815,7 +2815,7 @@ netdev_open_normal_process:
netdev_open_error: netdev_open_error:
padapter->bup = _FALSE; padapter->bup = false;
#ifdef CONFIG_RTW_NAPI #ifdef CONFIG_RTW_NAPI
if(padapter->napi_state == NAPI_ENABLE) { if(padapter->napi_state == NAPI_ENABLE) {
@ -2835,11 +2835,11 @@ netdev_open_error:
int netdev_open(struct net_device *pnetdev) int netdev_open(struct net_device *pnetdev)
{ {
int ret = _FALSE; int ret = false;
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter); 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); RTW_INFO(" [WARN] "ADPT_FMT" %s failed, bInSuspend=%d\n", ADPT_ARG(padapter), __func__, pwrctrlpriv->bInSuspend);
return 0; return 0;
} }
@ -2868,13 +2868,13 @@ static int ips_netdrv_open(_adapter *padapter)
int status = _SUCCESS; int status = _SUCCESS;
/* struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); */ /* struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); */
padapter->net_closed = _FALSE; padapter->net_closed = false;
RTW_INFO("===> %s.........\n", __func__); RTW_INFO("===> %s.........\n", __func__);
rtw_clr_drv_stopped(padapter); rtw_clr_drv_stopped(padapter);
/* padapter->bup = _TRUE; */ /* padapter->bup = true; */
status = rtw_hal_init(padapter); status = rtw_hal_init(padapter);
if (status == _FAIL) { if (status == _FAIL) {
@ -2890,7 +2890,7 @@ static int ips_netdrv_open(_adapter *padapter)
return _SUCCESS; return _SUCCESS;
netdev_open_error: netdev_open_error:
/* padapter->bup = _FALSE; */ /* padapter->bup = false; */
RTW_INFO("-ips_netdrv_open - drv_open failure, bup=%d\n", padapter->bup); RTW_INFO("-ips_netdrv_open - drv_open failure, bup=%d\n", padapter->bup);
return _FAIL; return _FAIL;
@ -2909,7 +2909,7 @@ int rtw_ips_pwr_up(_adapter *padapter)
#if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) #if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS)
#ifdef DBG_CONFIG_ERROR_DETECT #ifdef DBG_CONFIG_ERROR_DETECT
if (psrtpriv->silent_reset_inprogress == _TRUE) if (psrtpriv->silent_reset_inprogress == true)
#endif/* #ifdef DBG_CONFIG_ERROR_DETECT */ #endif/* #ifdef DBG_CONFIG_ERROR_DETECT */
#endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */ #endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */
rtw_reset_drv_sw(padapter); rtw_reset_drv_sw(padapter);
@ -2928,7 +2928,7 @@ void rtw_ips_pwr_down(_adapter *padapter)
u32 start_time = rtw_get_current_time(); u32 start_time = rtw_get_current_time();
RTW_INFO("===> rtw_ips_pwr_down...................\n"); RTW_INFO("===> rtw_ips_pwr_down...................\n");
padapter->net_closed = _TRUE; padapter->net_closed = true;
rtw_ips_dev_unload(padapter); rtw_ips_dev_unload(padapter);
RTW_INFO("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time)); 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) #if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS)
#ifdef DBG_CONFIG_ERROR_DETECT #ifdef DBG_CONFIG_ERROR_DETECT
if (psrtpriv->silent_reset_inprogress == _TRUE) if (psrtpriv->silent_reset_inprogress == true)
#endif /* #ifdef DBG_CONFIG_ERROR_DETECT */ #endif /* #ifdef DBG_CONFIG_ERROR_DETECT */
#endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */ #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); _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
if (_TRUE == bnormal) { if (true == bnormal) {
_enter_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL); _enter_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL);
status = _netdev_open(pnetdev); status = _netdev_open(pnetdev);
_exit_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL); _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); RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup);
#ifndef CONFIG_PLATFORM_INTEL_BYT #ifndef CONFIG_PLATFORM_INTEL_BYT
if (pwrctl->bInternalAutoSuspend == _TRUE) { if (pwrctl->bInternalAutoSuspend == true) {
/* rtw_pwr_wakeup(padapter); */ /* rtw_pwr_wakeup(padapter); */
if (pwrctl->rf_pwrstate == rf_off) if (pwrctl->rf_pwrstate == rf_off)
pwrctl->ps_flag = _TRUE; pwrctl->ps_flag = true;
} }
padapter->net_closed = _TRUE; padapter->net_closed = true;
padapter->netif_up = _FALSE; padapter->netif_up = false;
pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
/* if (!rtw_is_hw_init_completed(padapter)) { /* 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); rtw_set_drv_stopped(padapter);
@ -3006,7 +3006,7 @@ static int netdev_close(struct net_device *pnetdev)
} }
else*/ else*/
if (pwrctl->rf_pwrstate == rf_on) { 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. */ /* s1. */
if (pnetdev) if (pnetdev)
@ -3015,13 +3015,13 @@ static int netdev_close(struct net_device *pnetdev)
#ifndef CONFIG_ANDROID #ifndef CONFIG_ANDROID
/* s2. */ /* s2. */
LeaveAllPowerSaveMode(padapter); LeaveAllPowerSaveMode(padapter);
rtw_disassoc_cmd(padapter, 500, _FALSE); rtw_disassoc_cmd(padapter, 500, false);
/* s2-2. indicate disconnect to os */ /* s2-2. indicate disconnect to os */
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
/* s2-3. */ /* s2-3. */
rtw_free_assoc_resources(padapter, 1); rtw_free_assoc_resources(padapter, 1);
/* s2-4. */ /* s2-4. */
rtw_free_network_queue(padapter, _TRUE); rtw_free_network_queue(padapter, true);
#endif #endif
/* Close LED */ /* Close LED */
rtw_led_control(padapter, LED_CTL_POWER_OFF); rtw_led_control(padapter, LED_CTL_POWER_OFF);
@ -3043,7 +3043,7 @@ static int netdev_close(struct net_device *pnetdev)
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
rtw_scan_abort(padapter); rtw_scan_abort(padapter);
rtw_cfg80211_wait_scan_req_empty(padapter, 200); 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 */ /* padapter->rtw_wdev->iftype = NL80211_IFTYPE_MONITOR; */ /* set this at the end */
#endif /* CONFIG_IOCTL_CFG80211 */ #endif /* CONFIG_IOCTL_CFG80211 */
@ -3051,14 +3051,14 @@ static int netdev_close(struct net_device *pnetdev)
rtw_wapi_disable_tx(padapter); rtw_wapi_disable_tx(padapter);
#endif #endif
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX #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); rtw_btcoex_close_socket(padapter);
else else
RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n"); RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n");
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
#else /* !CONFIG_PLATFORM_INTEL_BYT */ #else /* !CONFIG_PLATFORM_INTEL_BYT */
if (pwrctl->bInSuspend == _TRUE) { if (pwrctl->bInSuspend == true) {
RTW_INFO("+871x_drv - drv_close, bInSuspend=%d\n", pwrctl->bInSuspend); RTW_INFO("+871x_drv - drv_close, bInSuspend=%d\n", pwrctl->bInSuspend);
return 0; return 0;
} }
@ -3069,7 +3069,7 @@ static int netdev_close(struct net_device *pnetdev)
#endif #endif
RTW_INFO("netdev_close, bips_processing=%d\n", pwrctl->bips_processing); 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_msleep_os(1);
rtw_dev_unload(padapter); rtw_dev_unload(padapter);
@ -3403,7 +3403,7 @@ void rtw_dev_unload(_adapter *padapter)
u8 cnt = 0; u8 cnt = 0;
if (padapter->bup == _TRUE) { if (padapter->bup == true) {
RTW_INFO("==> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); RTW_INFO("==> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
rtw_set_drv_stopped(padapter); rtw_set_drv_stopped(padapter);
@ -3418,7 +3418,7 @@ void rtw_dev_unload(_adapter *padapter)
if (!pwrctl->bInternalAutoSuspend) if (!pwrctl->bInternalAutoSuspend)
rtw_stop_drv_threads(padapter); rtw_stop_drv_threads(padapter);
while (ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == _TRUE) { while (ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == true) {
if (cnt > 5) { if (cnt > 5) {
RTW_INFO("stop cmdthd timeout\n"); RTW_INFO("stop cmdthd timeout\n");
break; break;
@ -3431,7 +3431,7 @@ void rtw_dev_unload(_adapter *padapter)
/* check the status of IPS */ /* 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__); RTW_INFO("%s: driver in IPS-FWLPS\n", __func__);
pdbgpriv->dbg_dev_unload_inIPS_cnt++; pdbgpriv->dbg_dev_unload_inIPS_cnt++;
} else } else
@ -3442,9 +3442,9 @@ void rtw_dev_unload(_adapter *padapter)
rtw_btcoex_IpsNotify(padapter, pwrctl->ips_mode_req); rtw_btcoex_IpsNotify(padapter, pwrctl->ips_mode_req);
#endif #endif
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
if (pwrctl->bSupportRemoteWakeup == _TRUE && if (pwrctl->bSupportRemoteWakeup == true &&
pwrctl->wowlan_mode == _TRUE) pwrctl->wowlan_mode == true)
RTW_INFO("%s bSupportRemoteWakeup==_TRUE do not run rtw_hal_deinit()\n", __func__); RTW_INFO("%s bSupportRemoteWakeup==true do not run rtw_hal_deinit()\n", __func__);
else else
#endif #endif
{ {
@ -3454,11 +3454,11 @@ void rtw_dev_unload(_adapter *padapter)
rtw_set_surprise_removed(padapter); rtw_set_surprise_removed(padapter);
} }
padapter->bup = _FALSE; padapter->bup = false;
RTW_INFO("<== "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); RTW_INFO("<== "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
} else { } else {
RTW_INFO("%s: bup==_FALSE\n", __func__); RTW_INFO("%s: bup==false\n", __func__);
} }
rtw_cancel_all_timer(padapter); 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)) { 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 */ /* s2-2. indicate disconnect to os */
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
} }
#ifdef CONFIG_AP_MODE #ifdef CONFIG_AP_MODE
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) else if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
rtw_sta_flush(padapter, _TRUE); rtw_sta_flush(padapter, true);
#endif #endif
/* s2-3. */ /* s2-3. */
@ -3510,7 +3510,7 @@ int rtw_suspend_free_assoc_resource(_adapter *padapter)
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
if (is_primary_adapter(padapter) && (!adapter_to_pwrctl(padapter)->bInternalAutoSuspend)) if (is_primary_adapter(padapter) && (!adapter_to_pwrctl(padapter)->bInternalAutoSuspend))
#endif #endif
rtw_free_network_queue(padapter, _TRUE); rtw_free_network_queue(padapter, true);
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) { if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
RTW_INFO("%s: fw_under_survey\n", __func__); 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); 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_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)); 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); RTW_INFO("wowlan_p2p_enable: %d\n", pwrpriv->wowlan_p2p_enable);
#endif #endif
if (pwrpriv->wowlan_mode == _TRUE) { if (pwrpriv->wowlan_mode == true) {
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND_KEEP_ANT); rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND_KEEP_ANT);
#endif #endif
if (pnetdev) if (pnetdev)
rtw_netif_stop_queue(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 */ /* 0. Power off LED */
rtw_led_control(padapter, LED_CTL_POWER_OFF); 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*/ rtw_set_drv_stopped(padapter); /*for stop thread*/
for (i = 0; i < dvobj->iface_nums; i++) { for (i = 0; i < dvobj->iface_nums; i++) {
iface = dvobj->padapters[i]; iface = dvobj->padapters[i];
if ((iface) && (iface->bup == _TRUE)) if ((iface) && (iface->bup == true))
rtw_stop_drv_threads(iface); rtw_stop_drv_threads(iface);
} }
rtw_clr_drv_stopped(padapter); /*for 32k command*/ 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__); 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_INFO("%s: fw_under_survey\n", __func__);
rtw_indicate_scan_done(padapter, 1); rtw_indicate_scan_done(padapter, 1);
clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY); clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
@ -3630,7 +3630,7 @@ int rtw_suspend_wow(_adapter *padapter)
RTW_INFO("%s: pno: %d\n", __func__, RTW_INFO("%s: pno: %d\n", __func__,
pwrpriv->wowlan_pno_enable); pwrpriv->wowlan_pno_enable);
#ifdef CONFIG_FWLPS_IN_IPS #ifdef CONFIG_FWLPS_IN_IPS
rtw_set_fw_in_ips_mode(padapter, _TRUE); rtw_set_fw_in_ips_mode(padapter, true);
#endif #endif
} }
#ifdef CONFIG_LPS #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)); 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); 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); rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND_KEEP_ANT);
#endif #endif
rtw_mi_netif_stop_queue(padapter, _FALSE); rtw_mi_netif_stop_queue(padapter, false);
/* 0. Power off LED */ /* 0. Power off LED */
rtw_led_control(padapter, LED_CTL_POWER_OFF); 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*/ rtw_set_drv_stopped(padapter); /*for stop thread*/
for (i = 0; i < dvobj->iface_nums; i++) { for (i = 0; i < dvobj->iface_nums; i++) {
iface = dvobj->padapters[i]; iface = dvobj->padapters[i];
if ((iface) && (iface->bup == _TRUE)) if ((iface) && (iface->bup == true))
rtw_stop_drv_threads(iface); rtw_stop_drv_threads(iface);
} }
rtw_clr_drv_stopped(padapter); /*for 32k command*/ 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); rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_SUSPEND);
#endif #endif
rtw_mi_netif_stop_queue(padapter, _TRUE); rtw_mi_netif_stop_queue(padapter, true);
rtw_mi_suspend_free_assoc_resource(padapter); rtw_mi_suspend_free_assoc_resource(padapter);
rtw_led_control(padapter, LED_CTL_POWER_OFF); 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)) || (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_off))
RTW_INFO("%s: ### ERROR #### driver in IPS ####ERROR###!!!\n", __func__); RTW_INFO("%s: ### ERROR #### driver in IPS ####ERROR###!!!\n", __func__);
@ -3787,14 +3787,14 @@ int rtw_suspend_common(_adapter *padapter)
pdbgpriv->dbg_suspend_cnt++; pdbgpriv->dbg_suspend_cnt++;
pwrpriv->bInSuspend = _TRUE; pwrpriv->bInSuspend = true;
while (pwrpriv->bips_processing == _TRUE) while (pwrpriv->bips_processing == true)
rtw_msleep_os(1); rtw_msleep_os(1);
#ifdef CONFIG_IOL_READ_EFUSE_MAP #ifdef CONFIG_IOL_READ_EFUSE_MAP
if (!padapter->bup) { if (!padapter->bup) {
u8 bMacPwrCtrlOn = _FALSE; u8 bMacPwrCtrlOn = false;
rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
if (bMacPwrCtrlOn) if (bMacPwrCtrlOn)
rtw_hal_power_off(padapter); rtw_hal_power_off(padapter);
@ -3817,21 +3817,21 @@ int rtw_suspend_common(_adapter *padapter)
rtw_ps_deny_cancel(padapter, PS_DENY_SUSPEND); 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 #ifdef CONFIG_WOWLAN
if (check_fwstate(pmlmepriv, _FW_LINKED)) if (check_fwstate(pmlmepriv, _FW_LINKED))
pwrpriv->wowlan_mode = _TRUE; pwrpriv->wowlan_mode = true;
else if (pwrpriv->wowlan_pno_enable == _TRUE) else if (pwrpriv->wowlan_pno_enable == true)
pwrpriv->wowlan_mode |= pwrpriv->wowlan_pno_enable; pwrpriv->wowlan_mode |= pwrpriv->wowlan_pno_enable;
#ifdef CONFIG_P2P_WOWLAN #ifdef CONFIG_P2P_WOWLAN
if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE) || P2P_ROLE_DISABLE != padapter->wdinfo.role) if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE) || P2P_ROLE_DISABLE != padapter->wdinfo.role)
pwrpriv->wowlan_p2p_mode = _TRUE; pwrpriv->wowlan_p2p_mode = true;
if (_TRUE == pwrpriv->wowlan_p2p_mode) if (true == pwrpriv->wowlan_p2p_mode)
pwrpriv->wowlan_mode |= pwrpriv->wowlan_p2p_mode; pwrpriv->wowlan_mode |= pwrpriv->wowlan_p2p_mode;
#endif /* CONFIG_P2P_WOWLAN */ #endif /* CONFIG_P2P_WOWLAN */
if (pwrpriv->wowlan_mode == _TRUE) if (pwrpriv->wowlan_mode == true)
rtw_suspend_wow(padapter); rtw_suspend_wow(padapter);
else else
#endif /* CONFIG_WOWLAN */ #endif /* CONFIG_WOWLAN */
@ -3888,20 +3888,20 @@ int rtw_resume_process_wow(_adapter *padapter)
goto exit; goto exit;
} }
pwrpriv->wowlan_in_resume = _TRUE; pwrpriv->wowlan_in_resume = true;
#ifdef CONFIG_PNO_SUPPORT #ifdef CONFIG_PNO_SUPPORT
#ifdef CONFIG_FWLPS_IN_IPS #ifdef CONFIG_FWLPS_IN_IPS
if (pwrpriv->wowlan_pno_enable) 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_FWLPS_IN_IPS */
#endif/* CONFIG_PNO_SUPPORT */ #endif/* CONFIG_PNO_SUPPORT */
if (pwrpriv->wowlan_mode == _TRUE) { if (pwrpriv->wowlan_mode == true) {
#ifdef CONFIG_LPS #ifdef CONFIG_LPS
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "WOWLAN"); rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "WOWLAN");
#endif /* CONFIG_LPS */ #endif /* CONFIG_LPS */
pwrpriv->bFwCurrentInPSMode = _FALSE; pwrpriv->bFwCurrentInPSMode = false;
#if !(CONFIG_RTW_SDIO_KEEP_IRQ) #if !(CONFIG_RTW_SDIO_KEEP_IRQ)
/* if (sdio_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS) { */ /* 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__, RTW_INFO("%s: disconnect reason: %02x\n", __func__,
pwrpriv->wowlan_wake_reason); pwrpriv->wowlan_wake_reason);
rtw_indicate_disconnect(padapter, 0, _FALSE); rtw_indicate_disconnect(padapter, 0, false);
rtw_sta_media_status_rpt(padapter, rtw_sta_media_status_rpt(padapter,
rtw_get_stainfo(&padapter->stapriv, rtw_get_stainfo(&padapter->stapriv,
@ -3990,8 +3990,8 @@ int rtw_resume_process_wow(_adapter *padapter)
rtw_lock_ext_suspend_timeout(10000); rtw_lock_ext_suspend_timeout(10000);
} }
if (pwrpriv->wowlan_mode == _TRUE) { if (pwrpriv->wowlan_mode == true) {
pwrpriv->bips_processing = _FALSE; pwrpriv->bips_processing = false;
_set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000); _set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000);
#ifndef CONFIG_IPS_CHECK_IN_WD #ifndef CONFIG_IPS_CHECK_IN_WD
rtw_set_pwr_state_check_timer(pwrpriv); rtw_set_pwr_state_check_timer(pwrpriv);
@ -3999,7 +3999,7 @@ int rtw_resume_process_wow(_adapter *padapter)
} else } else
RTW_INFO("do not reset timer\n"); RTW_INFO("do not reset timer\n");
pwrpriv->wowlan_mode = _FALSE; pwrpriv->wowlan_mode = false;
/* Power On LED */ /* Power On LED */
#ifdef CONFIG_SW_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"); rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "AP-WOWLAN");
#endif /* CONFIG_LPS */ #endif /* CONFIG_LPS */
pwrpriv->bFwCurrentInPSMode = _FALSE; pwrpriv->bFwCurrentInPSMode = false;
rtw_hal_disable_interrupt(padapter); rtw_hal_disable_interrupt(padapter);
@ -4069,7 +4069,7 @@ int rtw_resume_process_ap_wow(_adapter *padapter)
/* Disable WOW, set H2C command */ /* Disable WOW, set H2C command */
poidparam.subcode = WOWLAN_AP_DISABLE; poidparam.subcode = WOWLAN_AP_DISABLE;
rtw_hal_set_hwreg(padapter, HW_VAR_WOWLAN, (u8 *)&poidparam); 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_clr_drv_stopped(padapter);
RTW_INFO("%s: wowmode resuming, DriverStopped:%s\n", __func__, rtw_is_drv_stopped(padapter) ? "True" : "False"); 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) if (pwrpriv->wowlan_wake_reason == AP_OFFLOAD_WAKEUP)
rtw_lock_ext_suspend_timeout(8000); rtw_lock_ext_suspend_timeout(8000);
pwrpriv->bips_processing = _FALSE; pwrpriv->bips_processing = false;
_set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000); _set_timer(&adapter_to_dvobj(padapter)->dynamic_chk_timer, 2000);
#ifndef CONFIG_IPS_CHECK_IN_WD #ifndef CONFIG_IPS_CHECK_IN_WD
rtw_set_pwr_state_check_timer(pwrpriv); 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); rtw_mi_reset_drv_sw(padapter);
pwrpriv->bkeepfwalive = _FALSE; pwrpriv->bkeepfwalive = false;
RTW_INFO("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive); RTW_INFO("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive);
if (pm_netdev_open(pnetdev, _TRUE) != 0) { if (pm_netdev_open(pnetdev, true) != 0) {
ret = -1; ret = -1;
pdbgpriv->dbg_resume_error_cnt++; pdbgpriv->dbg_resume_error_cnt++;
goto exit; goto exit;
@ -4241,15 +4241,15 @@ int rtw_resume_common(_adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if (pwrpriv->bInSuspend == _FALSE) if (pwrpriv->bInSuspend == false)
return 0; return 0;
RTW_INFO("resume start\n"); RTW_INFO("resume start\n");
RTW_INFO("==> %s (%s:%d)\n", __func__, current->comm, current->pid); 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 #ifdef CONFIG_WOWLAN
if (pwrpriv->wowlan_mode == _TRUE) if (pwrpriv->wowlan_mode == true)
rtw_resume_process_wow(padapter); rtw_resume_process_wow(padapter);
else else
#endif #endif
@ -4264,9 +4264,9 @@ int rtw_resume_common(_adapter *padapter)
} }
if (pwrpriv) { if (pwrpriv) {
pwrpriv->bInSuspend = _FALSE; pwrpriv->bInSuspend = false;
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
pwrpriv->wowlan_in_resume = _FALSE; pwrpriv->wowlan_in_resume = false;
#endif #endif
} }
RTW_INFO("%s:%d in %d ms\n", __func__ , ret, RTW_INFO("%s:%d in %d ms\n", __func__ , ret,

View file

@ -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 if (mstat_sniff_rules[i].flags == flags
&& mstat_sniff_rules[i].lb <= size && mstat_sniff_rules[i].lb <= size
&& mstat_sniff_rules[i].hb >= 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) 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 */ /* under Linux/GNU/GLibc, the return value of memcmp for two same mem. chunk is 0 */
if (!(memcmp(dst, src, sz))) if (!(memcmp(dst, src, sz)))
return _TRUE; return true;
else else
return _FALSE; return false;
} }
void _rtw_init_listhead(_list *list) void _rtw_init_listhead(_list *list)
@ -726,9 +726,9 @@ Otherwise, there will be racing condition.
u32 rtw_is_list_empty(_list *phead) u32 rtw_is_list_empty(_list *phead)
{ {
if (list_empty(phead)) if (list_empty(phead))
return _TRUE; return true;
else else
return _FALSE; return false;
} }
void rtw_list_insert_head(_list *plist, _list *phead) 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) u32 rtw_end_of_queue_search(_list *head, _list *plist)
{ {
if (head == plist) if (head == plist)
return _TRUE; return true;
else 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 * Test if the specifi @param path is a file and readable
* @param path the path of the file to test * @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) int rtw_is_file_readable(const char *path)
{ {
if (isFileReadable(path, NULL) == 0) if (isFileReadable(path, NULL) == 0)
return _TRUE; return true;
else else
return _FALSE; return false;
} }
/* /*
* Test if the specifi @param path is a file and readable. * Test if the specifi @param path is a file and readable.
* If readable, @param sz is got * If readable, @param sz is got
* @param path the path of the file to test * @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) int rtw_is_file_readable_with_size(const char *path, u32 *sz)
{ {
if (isFileReadable(path, sz) == 0) if (isFileReadable(path, sz) == 0)
return _TRUE; return true;
else else
return _FALSE; return false;
} }
/* /*
@ -1608,22 +1608,22 @@ keep_ori:
* rtw_cbuf_full - test if cbuf is full * rtw_cbuf_full - test if cbuf is full
* @cbuf: pointer of struct rtw_cbuf * @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) 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 * rtw_cbuf_empty - test if cbuf is empty
* @cbuf: pointer of struct rtw_cbuf * @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) 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 * @buf: pointer to push in
* *
* Lock free operation, be careful of the use scheme * 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) bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf)
{ {
@ -1789,74 +1789,74 @@ exit:
/** /**
* is_null - * is_null -
* *
* Return TRUE if c is null character * Return true if c is null character
* FALSE otherwise. * false otherwise.
*/ */
inline bool is_null(char c) inline bool is_null(char c)
{ {
if (c == '\0') if (c == '\0')
return _TRUE; return true;
else else
return _FALSE; return false;
} }
/** /**
* is_eol - * is_eol -
* *
* Return TRUE if c is represent for EOL (end of line) * Return true if c is represent for EOL (end of line)
* FALSE otherwise. * false otherwise.
*/ */
inline bool is_eol(char c) inline bool is_eol(char c)
{ {
if (c == '\r' || c == '\n') if (c == '\r' || c == '\n')
return _TRUE; return true;
else else
return _FALSE; return false;
} }
/** /**
* is_space - * is_space -
* *
* Return TRUE if c is represent for space * Return true if c is represent for space
* FALSE otherwise. * false otherwise.
*/ */
inline bool is_space(char c) inline bool is_space(char c)
{ {
if (c == ' ' || c == '\t') if (c == ' ' || c == '\t')
return _TRUE; return true;
else else
return _FALSE; return false;
} }
/** /**
* IsHexDigit - * IsHexDigit -
* *
* Return TRUE if chTmp is represent for hex digit * Return true if chTmp is represent for hex digit
* FALSE otherwise. * false otherwise.
*/ */
inline bool IsHexDigit(char chTmp) inline bool IsHexDigit(char chTmp)
{ {
if ((chTmp >= '0' && chTmp <= '9') || if ((chTmp >= '0' && chTmp <= '9') ||
(chTmp >= 'a' && chTmp <= 'f') || (chTmp >= 'a' && chTmp <= 'f') ||
(chTmp >= 'A' && chTmp <= 'F')) (chTmp >= 'A' && chTmp <= 'F'))
return _TRUE; return true;
else else
return _FALSE; return false;
} }
/** /**
* is_alpha - * is_alpha -
* *
* Return TRUE if chTmp is represent for alphabet * Return true if chTmp is represent for alphabet
* FALSE otherwise. * false otherwise.
*/ */
inline bool is_alpha(char chTmp) inline bool is_alpha(char chTmp)
{ {
if ((chTmp >= 'a' && chTmp <= 'z') || if ((chTmp >= 'a' && chTmp <= 'z') ||
(chTmp >= 'A' && chTmp <= 'Z')) (chTmp >= 'A' && chTmp <= 'Z'))
return _TRUE; return true;
else else
return _FALSE; return false;
} }
inline char alpha_to_upper(char c) inline char alpha_to_upper(char c)

View file

@ -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 dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
struct usb_device *pusbd = pdvobjpriv->pusbdev; struct usb_device *pusbd = pdvobjpriv->pusbdev;
precvbuf->irp_pending = _FALSE; precvbuf->irp_pending = false;
precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL); precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL);
if (precvbuf->purb == NULL) if (precvbuf->purb == NULL)
res = _FAIL; res = _FAIL;
@ -324,21 +324,21 @@ static int napi_recv(_adapter *padapter, int budget)
if (!pskb) if (!pskb)
break; break;
rx_ok = _FALSE; rx_ok = false;
#ifdef CONFIG_RTW_GRO #ifdef CONFIG_RTW_GRO
if (pregistrypriv->en_gro) { if (pregistrypriv->en_gro) {
if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP) if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
rx_ok = _TRUE; rx_ok = true;
goto next; goto next;
} }
#endif /* CONFIG_RTW_GRO */ #endif /* CONFIG_RTW_GRO */
if (rtw_netif_receive_skb(padapter->pnetdev, pskb) == NET_RX_SUCCESS) if (rtw_netif_receive_skb(padapter->pnetdev, pskb) == NET_RX_SUCCESS)
rx_ok = _TRUE; rx_ok = true;
next: next:
if (rx_ok == _TRUE) { if (rx_ok == true) {
work_done++; work_done++;
DBG_COUNTER(padapter->rx_logs.os_netif_ok); DBG_COUNTER(padapter->rx_logs.os_netif_ok);
} else { } 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 */ /* Indicat the packets to upper layer */
if (pkt) { if (pkt) {
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
_pkt *pskb2 = NULL; _pkt *pskb2 = NULL;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv; 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); */ /* 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); */ /* RTW_INFO("not ap psta=%p, addr=%pM\n", psta, pattrib->dst); */
if (bmcast) { 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)) */ #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) { if (nat25_handle_frame(padapter, pkt) == -1) {
/* priv->ext_stats.rx_data_drops++; */ /* priv->ext_stats.rx_data_drops++; */
/* DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n"); */ /* 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(); cur_time = rtw_get_current_time();
if (cur_time - psecuritypriv->last_mic_err_time < 60 * HZ) { 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->last_mic_err_time = 0;
psecuritypriv->btkip_countermeasure_time = cur_time; psecuritypriv->btkip_countermeasure_time = cur_time;
} else } else
@ -734,11 +734,11 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame)
u8 *ip = pkt->data + 14; u8 *ip = pkt->data + 14;
if (GET_IPV4_PROTOCOL(ip) == 0x06 /* TCP */ 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; 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)) { if (GET_TCP_SYN(tcp) && GET_TCP_ACK(tcp)) {
session_tracker_add_cmd(padapter, sta session_tracker_add_cmd(padapter, sta
, IPV4_DST(ip), TCP_DST(tcp) , IPV4_DST(ip), TCP_DST(tcp)
@ -802,7 +802,7 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
precvbuf->pskb = NULL; precvbuf->pskb = NULL;
if (precvbuf->irp_pending == _FALSE) if (precvbuf->irp_pending == false)
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
} }
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)

View file

@ -167,7 +167,7 @@ typedef struct compat_android_wifi_priv_cmd {
* time (only) in dhd_open, subsequential wifi on will be handled by * time (only) in dhd_open, subsequential wifi on will be handled by
* wl_android_wifi_on * 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_irq = 0;
static unsigned int oob_gpio = 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; struct wlan_network *pcur_network = &pmlmepriv->cur_network;
int bytes_written = 0; 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", bytes_written += snprintf(&command[bytes_written], total_len, "%s rssi %d",
pcur_network->network.Ssid.Ssid, padapter->recvpriv.rssi); 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; char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK_SCAN]) + 1;
#ifdef CONFIG_IOCTL_CFG80211 #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 #endif
return 0; 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; char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK]) + 1;
#ifdef CONFIG_IOCTL_CFG80211 #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 #endif
return 0; return 0;
@ -555,7 +555,7 @@ int rtw_gtk_offload(struct net_device *net, u8 *cmd_ptr)
printk(" %02x ", psta->kck[i]); printk(" %02x ", psta->kck[i]);
*/ */
_rtw_memcpy(psta->replay_ctr, cmd_ptr, RTW_REPLAY_CTR_LEN); _rtw_memcpy(psta->replay_ctr, cmd_ptr, RTW_REPLAY_CTR_LEN);
psecuritypriv->binstallKCK_KEK = _TRUE; psecuritypriv->binstallKCK_KEK = true;
/* printk("\nREPLAY_CTR: "); */ /* printk("\nREPLAY_CTR: "); */
/* for(i=0;i<RTW_REPLAY_CTR_LEN; i++) */ /* 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); */ /* rtw_set_scan_mode((_adapter *)rtw_netdev_priv(net), SCAN_ACTIVE); */
#ifdef CONFIG_PLATFORM_MSTAR #ifdef CONFIG_PLATFORM_MSTAR
#ifdef CONFIG_IOCTL_CFG80211 #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_IOCTL_CFG80211 */
#endif /* CONFIG_PLATFORM_MSTAR */ #endif /* CONFIG_PLATFORM_MSTAR */
break; break;
@ -712,11 +712,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
break; break;
case ANDROID_WIFI_CMD_RXFILTER_ADD: case ANDROID_WIFI_CMD_RXFILTER_ADD:
/* int filter_num = *(command + strlen(CMD_RXFILTER_ADD) + 1) - '0'; */ /* 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; break;
case ANDROID_WIFI_CMD_RXFILTER_REMOVE: case ANDROID_WIFI_CMD_RXFILTER_REMOVE:
/* int filter_num = *(command + strlen(CMD_RXFILTER_REMOVE) + 1) - '0'; */ /* 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; break;
case ANDROID_WIFI_CMD_BTCOEXSCAN_START: case ANDROID_WIFI_CMD_BTCOEXSCAN_START:

View file

@ -612,7 +612,7 @@ static int wl_cfgvendor_enable_full_scan_result(struct wiphy *wiphy,
int err = 0; int err = 0;
struct bcm_cfg80211 *cfg = wiphy_priv(wiphy); struct bcm_cfg80211 *cfg = wiphy_priv(wiphy);
int type; int type;
bool real_time = FALSE; bool real_time = false;
type = nla_type(data); type = nla_type(data);

View file

@ -596,7 +596,7 @@ static int proc_get_rx_info_msg(struct seq_file *m, void *v)
struct net_device *dev = m->private; struct net_device *dev = m->private;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev); _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; return 0;
} }
static int proc_get_tx_info_msg(struct seq_file *m, void *v) 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]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != _TRUE) if ((_rtw_memcmp(psta->hwaddr, bc_addr, 6) != true)
&& (_rtw_memcmp(psta->hwaddr, null_addr, 6) != _TRUE) && (_rtw_memcmp(psta->hwaddr, null_addr, 6) != true)
&& (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), 6) != _TRUE)) { && (_rtw_memcmp(psta->hwaddr, adapter_mac_addr(padapter), 6) != true)) {
switch (psta->bw_mode) { 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) if (sscanf(c, MAC_SFMT, MAC_SARG(addr)) != 6)
break; 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); rtw_acl_add_sta(adapter, addr);
c = strsep(&next, " \t"); 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) if (sscanf(c, MAC_SFMT, MAC_SARG(addr)) != 6)
break; 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) if (cmd_id == PRE_LINK_STA_CMD_ADD)
rtw_pre_link_sta_add(&adapter->stapriv, addr); rtw_pre_link_sta_add(&adapter->stapriv, addr);
else 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) { if (strcmp("c", cmd) == 0) {
_clear_cam_entry(adapter, id_1); _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) } else if (strcmp("wfc", cmd) == 0)
write_cam_from_cache(adapter, id_1); write_cam_from_cache(adapter, id_1);
else if (strcmp("sw", cmd) == 0) 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)) { if (buffer && !copy_from_user(tmp, buffer, count)) {
u8 update = _FALSE; u8 update = false;
int num = sscanf(tmp, "%hhx", &bw_mode); int num = sscanf(tmp, "%hhx", &bw_mode);
if (num < 1 || bw_mode == adapter->driver_tx_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))) || (mlmeext->cur_channel >= 36 && BW_MODE_5G(bw_mode) != ADAPTER_TX_BW_5G(adapter)))
) { ) {
/* RA mask update needed */ /* RA mask update needed */
update = _TRUE; update = true;
} }
adapter->driver_tx_bw_mode = bw_mode; adapter->driver_tx_bw_mode = bw_mode;
if (update == _TRUE) { if (update == true) {
struct sta_info *sta; struct sta_info *sta;
int i; int i;
@ -2146,9 +2146,9 @@ static ssize_t proc_set_acs(struct file *file, const char __user *buffer, size_t
return -EINVAL; return -EINVAL;
if (1 == acs_satae) if (1 == acs_satae)
rtw_acs_start(padapter, _TRUE); rtw_acs_start(padapter, true);
else else
rtw_acs_start(padapter, _FALSE); rtw_acs_start(padapter, false);
} }
return count; return count;

View file

@ -50,8 +50,8 @@ static void rtw_dev_shutdown(struct device *dev)
if (!rtw_is_surprise_removed(adapter)) { if (!rtw_is_surprise_removed(adapter)) {
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter); struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter);
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
if (pwrctl->wowlan_mode == _TRUE) if (pwrctl->wowlan_mode == true)
RTW_INFO("%s wowlan_mode ==_TRUE do not run rtw_hal_deinit()\n", __func__); RTW_INFO("%s wowlan_mode ==true do not run rtw_hal_deinit()\n", __func__);
else else
#endif #endif
{ {
@ -435,10 +435,10 @@ static int usb_reprobe_switch_usb_mode(PADAPTER Adapter)
{ {
struct registry_priv *registry_par = &Adapter->registrypriv; struct registry_priv *registry_par = &Adapter->registrypriv;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
u8 ret = _FALSE; u8 ret = false;
/* efuse not allow driver to switch usb mode */ /* efuse not allow driver to switch usb mode */
if (pHalData->EEPROMUsbSwitch == _FALSE) if (pHalData->EEPROMUsbSwitch == false)
goto exit; goto exit;
/* registry not allow driver to switch usb mode */ /* 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); PHAL_DATA_TYPE hal = GET_HAL_DATA(padapter);
rtw_hal_inirp_init(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 */ /* 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) if (NULL == padapter)
goto error_exit; 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" RTW_INFO("padapter->bup=%d bDriverStopped=%s bSurpriseRemoved = %s\n"
, padapter->bup , padapter->bup
, rtw_is_drv_stopped(padapter) ? "True" : "False" , rtw_is_drv_stopped(padapter) ? "True" : "False"
@ -557,8 +557,8 @@ int rtw_hw_suspend(_adapter *padapter)
RTW_INFO("==> rtw_hw_suspend\n"); RTW_INFO("==> rtw_hw_suspend\n");
_enter_pwrlock(&pwrpriv->lock); _enter_pwrlock(&pwrpriv->lock);
pwrpriv->bips_processing = _TRUE; pwrpriv->bips_processing = true;
/* padapter->net_closed = _TRUE; */ /* padapter->net_closed = true; */
/* s1. */ /* s1. */
if (pnetdev) { if (pnetdev) {
netif_carrier_off(pnetdev); netif_carrier_off(pnetdev);
@ -566,7 +566,7 @@ int rtw_hw_suspend(_adapter *padapter)
} }
/* s2. */ /* s2. */
rtw_disassoc_cmd(padapter, 500, _FALSE); rtw_disassoc_cmd(padapter, 500, false);
/* s2-2. indicate disconnect to os */ /* s2-2. indicate disconnect to os */
/* rtw_indicate_disconnect(padapter); */ /* rtw_indicate_disconnect(padapter); */
@ -576,7 +576,7 @@ int rtw_hw_suspend(_adapter *padapter)
_clr_fwstate_(pmlmepriv, _FW_LINKED); _clr_fwstate_(pmlmepriv, _FW_LINKED);
rtw_led_control(padapter, LED_CTL_NO_LINK); 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 #ifdef CONFIG_LPS
/* donnot enqueue cmd */ /* donnot enqueue cmd */
@ -588,12 +588,12 @@ int rtw_hw_suspend(_adapter *padapter)
rtw_free_assoc_resources(padapter, 1); rtw_free_assoc_resources(padapter, 1);
/* s2-4. */ /* s2-4. */
rtw_free_network_queue(padapter, _TRUE); rtw_free_network_queue(padapter, true);
#ifdef CONFIG_IPS #ifdef CONFIG_IPS
rtw_ips_dev_unload(padapter); rtw_ips_dev_unload(padapter);
#endif #endif
pwrpriv->rf_pwrstate = rf_off; pwrpriv->rf_pwrstate = rf_off;
pwrpriv->bips_processing = _FALSE; pwrpriv->bips_processing = false;
_exit_pwrlock(&pwrpriv->lock); _exit_pwrlock(&pwrpriv->lock);
return 0; return 0;
@ -612,10 +612,10 @@ int rtw_hw_resume(_adapter *padapter)
RTW_INFO("==> rtw_hw_resume\n"); RTW_INFO("==> rtw_hw_resume\n");
_enter_pwrlock(&pwrpriv->lock); _enter_pwrlock(&pwrpriv->lock);
pwrpriv->bips_processing = _TRUE; pwrpriv->bips_processing = true;
rtw_reset_drv_sw(padapter); rtw_reset_drv_sw(padapter);
if (pm_netdev_open(pnetdev, _FALSE) != 0) { if (pm_netdev_open(pnetdev, false) != 0) {
_exit_pwrlock(&pwrpriv->lock); _exit_pwrlock(&pwrpriv->lock);
goto error_exit; goto error_exit;
} }
@ -624,11 +624,11 @@ int rtw_hw_resume(_adapter *padapter)
rtw_netif_wake_queue(pnetdev); rtw_netif_wake_queue(pnetdev);
pwrpriv->bkeepfwalive = _FALSE; pwrpriv->bkeepfwalive = false;
pwrpriv->brfoffbyhw = _FALSE; pwrpriv->brfoffbyhw = false;
pwrpriv->rf_pwrstate = rf_on; pwrpriv->rf_pwrstate = rf_on;
pwrpriv->bips_processing = _FALSE; pwrpriv->bips_processing = false;
_exit_pwrlock(&pwrpriv->lock); _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; pdbgpriv = &dvobj->drv_dbg;
padapter = dvobj_get_primary_adapter(dvobj); padapter = dvobj_get_primary_adapter(dvobj);
if (pwrpriv->bInSuspend == _TRUE) { if (pwrpriv->bInSuspend == true) {
RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend); RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend);
pdbgpriv->dbg_suspend_error_cnt++; pdbgpriv->dbg_suspend_error_cnt++;
goto exit; goto exit;
@ -666,7 +666,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
#ifdef SUPPORT_HW_RFOFF_DETECTED #ifdef SUPPORT_HW_RFOFF_DETECTED
/* The FW command register update must after MAC and FW init ready. */ /* The FW command register update must after MAC and FW init ready. */
if ((padapter->bFWReady) && (pwrpriv->bHWPwrPindetect) && (padapter->registrypriv.usbss_enable)) { 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); rtw_interface_ps_func(padapter, HAL_USB_SELECT_SUSPEND, &bOpen);
} }
#endif/* SUPPORT_HW_RFOFF_DETECTED */ #endif/* SUPPORT_HW_RFOFF_DETECTED */
@ -688,7 +688,7 @@ static int rtw_resume_process(_adapter *padapter)
struct debug_priv *pdbgpriv = &pdvobj->drv_dbg; struct debug_priv *pdbgpriv = &pdvobj->drv_dbg;
if (pwrpriv->bInSuspend == _FALSE) { if (pwrpriv->bInSuspend == false) {
pdbgpriv->dbg_resume_error_cnt++; pdbgpriv->dbg_resume_error_cnt++;
RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend); RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend);
return -1; return -1;
@ -704,9 +704,9 @@ static int rtw_resume_process(_adapter *padapter)
#endif /* kernel < 2.6.32 */ #endif /* kernel < 2.6.32 */
RTW_INFO("pwrpriv->bAutoResume (%x)\n", pwrpriv->bAutoResume); RTW_INFO("pwrpriv->bAutoResume (%x)\n", pwrpriv->bAutoResume);
if (_TRUE == pwrpriv->bAutoResume) { if (true == pwrpriv->bAutoResume) {
pwrpriv->bInternalAutoSuspend = _FALSE; pwrpriv->bInternalAutoSuspend = false;
pwrpriv->bAutoResume = _FALSE; pwrpriv->bAutoResume = false;
RTW_INFO("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n", pwrpriv->bAutoResume, pwrpriv->bInternalAutoSuspend); 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 * 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. * But they will not be clear in intf_start during wow resume flow.
* It should move to os_intf in the feature. * 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 #ifdef SUPPORT_HW_RFOFF_DETECTED
/* The FW command register update must after MAC and FW init ready. */ /* The FW command register update must after MAC and FW init ready. */
if ((padapter->bFWReady) && (pwrpriv->bHWPwrPindetect) && (padapter->registrypriv.usbss_enable)) { 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); rtw_interface_ps_func(padapter, HAL_USB_SELECT_SUSPEND, &bOpen);
} }
#endif #endif
#ifdef CONFIG_BT_COEXIST /* for 8723as-vau */ #ifdef CONFIG_BT_COEXIST /* for 8723as-vau */
RTW_INFO("pwrpriv->bAutoResume (%x)\n", pwrpriv->bAutoResume); RTW_INFO("pwrpriv->bAutoResume (%x)\n", pwrpriv->bAutoResume);
if (_TRUE == pwrpriv->bAutoResume) { if (true == pwrpriv->bAutoResume) {
pwrpriv->bInternalAutoSuspend = _FALSE; pwrpriv->bInternalAutoSuspend = false;
pwrpriv->bAutoResume = _FALSE; pwrpriv->bAutoResume = false;
RTW_INFO("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n", pwrpriv->bAutoResume, pwrpriv->bInternalAutoSuspend); RTW_INFO("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n", pwrpriv->bAutoResume, pwrpriv->bInternalAutoSuspend);
} }
#else /* #ifdef CONFIG_BT_COEXIST */ #else /* #ifdef CONFIG_BT_COEXIST */
pwrpriv->bInternalAutoSuspend = _FALSE; pwrpriv->bInternalAutoSuspend = false;
#endif /* #ifdef CONFIG_BT_COEXIST */ #endif /* #ifdef CONFIG_BT_COEXIST */
pwrpriv->brfoffbyhw = _FALSE; pwrpriv->brfoffbyhw = false;
} }
#endif/* CONFIG_AUTOSUSPEND */ #endif/* CONFIG_AUTOSUSPEND */
@ -783,7 +783,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
#else #else
if (rtw_is_earlysuspend_registered(pwrpriv)) { if (rtw_is_earlysuspend_registered(pwrpriv)) {
/* jeff: bypass resume here, do in late_resume */ /* jeff: bypass resume here, do in late_resume */
rtw_set_do_late_resume(pwrpriv, _TRUE); rtw_set_do_late_resume(pwrpriv, true);
} else { } else {
rtw_resume_lock_suspend(); rtw_resume_lock_suspend();
ret = rtw_resume_process(padapter); ret = rtw_resume_process(padapter);
@ -809,8 +809,8 @@ void autosuspend_enter(_adapter *padapter)
RTW_INFO("==>autosuspend_enter...........\n"); RTW_INFO("==>autosuspend_enter...........\n");
pwrpriv->bInternalAutoSuspend = _TRUE; pwrpriv->bInternalAutoSuspend = true;
pwrpriv->bips_processing = _TRUE; pwrpriv->bips_processing = true;
if (rf_off == pwrpriv->change_rfpwrstate) { if (rf_off == pwrpriv->change_rfpwrstate) {
#ifndef CONFIG_BT_COEXIST #ifndef CONFIG_BT_COEXIST
@ -868,7 +868,7 @@ int autoresume_enter(_adapter *padapter)
RTW_INFO("====> autoresume_enter\n"); RTW_INFO("====> autoresume_enter\n");
if (rf_off == pwrpriv->rf_pwrstate) { if (rf_off == pwrpriv->rf_pwrstate) {
pwrpriv->ps_flag = _FALSE; pwrpriv->ps_flag = false;
#ifndef CONFIG_BT_COEXIST #ifndef CONFIG_BT_COEXIST
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
if (usb_autopm_get_interface(dvobj->pusbintf) < 0) { 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); RTW_INFO("...pm_usage_cnt(%d).....\n", dvobj->pusbintf->pm_usage_cnt);
#endif #endif
#else /* #ifndef CONFIG_BT_COEXIST */ #else /* #ifndef CONFIG_BT_COEXIST */
pwrpriv->bAutoResume = _TRUE; pwrpriv->bAutoResume = true;
if (0 == pwrpriv->autopm_cnt) { if (0 == pwrpriv->autopm_cnt) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
if (usb_autopm_get_interface(dvobj->pusbintf) < 0) { 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; padapter->iface_id = IFACE_ID0;
/* set adapter_type/iface type for primary padapter */ /* set adapter_type/iface type for primary padapter */
padapter->isprimary = _TRUE; padapter->isprimary = true;
padapter->adapter_type = PRIMARY_ADAPTER; padapter->adapter_type = PRIMARY_ADAPTER;
#ifdef CONFIG_MI_WITH_MBSSID_CAM/*Configure all IFACE to PORT0-MBSSID*/ #ifdef CONFIG_MI_WITH_MBSSID_CAM/*Configure all IFACE to PORT0-MBSSID*/
padapter->hw_port = HW_PORT0; 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)); RTW_INFO(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
if (check_fwstate(pmlmepriv, _FW_LINKED)) if (check_fwstate(pmlmepriv, _FW_LINKED))
rtw_disassoc_cmd(padapter, 0, _FALSE); rtw_disassoc_cmd(padapter, 0, false);
#ifdef CONFIG_AP_MODE #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); free_mlme_ap_info(padapter);
#ifdef CONFIG_HOSTAPD_MLME #ifdef CONFIG_HOSTAPD_MLME
hostapd_mode_unload(padapter); hostapd_mode_unload(padapter);
@ -1096,7 +1096,7 @@ static void rtw_usb_primary_adapter_deinit(_adapter *padapter)
/*rtw_cancel_all_timer(if1);*/ /*rtw_cancel_all_timer(if1);*/
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
pwrctl->wowlan_mode = _FALSE; pwrctl->wowlan_mode = false;
#endif /* CONFIG_WOWLAN */ #endif /* CONFIG_WOWLAN */
rtw_dev_unload(padapter); 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; goto free_dvobj;
} }
if (usb_reprobe_switch_usb_mode(padapter) == _TRUE) if (usb_reprobe_switch_usb_mode(padapter) == true)
goto free_if_prim; goto free_if_prim;
#ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_CONCURRENT_MODE
@ -1233,19 +1233,19 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
RTW_INFO("+rtw_dev_remove\n"); 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 */ /* TODO: use rtw_os_ndevs_deinit instead at the first stage of driver's dev deinit function */
rtw_os_ndevs_unregister(dvobj); rtw_os_ndevs_unregister(dvobj);
if (usb_drv.drv_registered == _TRUE) { if (usb_drv.drv_registered == true) {
/* RTW_INFO("r871xu_dev_remove():padapter->bSurpriseRemoved == _TRUE\n"); */ /* RTW_INFO("r871xu_dev_remove():padapter->bSurpriseRemoved == true\n"); */
rtw_set_surprise_removed(padapter); rtw_set_surprise_removed(padapter);
} }
/*else /*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); rtw_unregister_early_suspend(pwrctl);
#endif #endif
if (padapter->bFWReady == _TRUE) { if (padapter->bFWReady == true) {
rtw_pm_set_ips(padapter, IPS_NONE); rtw_pm_set_ips(padapter, IPS_NONE);
rtw_pm_set_lps(padapter, PS_MODE_ACTIVE); 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); RTW_INFO(DRV_NAME" BT-Coex version = %s\n", BTCOEXVERSION);
#endif /* BTCOEXVERSION */ #endif /* BTCOEXVERSION */
usb_drv.drv_registered = _TRUE; usb_drv.drv_registered = true;
rtw_suspend_lock_init(); rtw_suspend_lock_init();
rtw_drv_proc_init(); rtw_drv_proc_init();
rtw_ndev_notifier_register(); rtw_ndev_notifier_register();
@ -1314,7 +1314,7 @@ static int __init rtw_drv_entry(void)
ret = usb_register(&usb_drv.usbdrv); ret = usb_register(&usb_drv.usbdrv);
if (ret != 0) { if (ret != 0) {
usb_drv.drv_registered = _FALSE; usb_drv.drv_registered = false;
rtw_suspend_lock_uninit(); rtw_suspend_lock_uninit();
rtw_drv_proc_deinit(); rtw_drv_proc_deinit();
rtw_ndev_notifier_unregister(); rtw_ndev_notifier_unregister();
@ -1330,7 +1330,7 @@ static void __exit rtw_drv_halt(void)
{ {
RTW_INFO("module exit start\n"); RTW_INFO("module exit start\n");
usb_drv.drv_registered = _FALSE; usb_drv.drv_registered = false;
usb_deregister(&usb_drv.usbdrv); usb_deregister(&usb_drv.usbdrv);

View file

@ -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); rtw_set_surprise_removed(padapter);
break; break;
} }
@ -476,7 +476,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
goto check_completion; goto check_completion;
} else { } else {
rtw_set_surprise_removed(padapter); rtw_set_surprise_removed(padapter);
RTW_INFO("bSurpriseRemoved=TRUE\n"); RTW_INFO("bSurpriseRemoved=true\n");
goto check_completion; 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 long irqL;
unsigned int pipe; unsigned int pipe;
int status; int status;
u32 ret = _FAIL, bwritezero = _FALSE; u32 ret = _FAIL, bwritezero = false;
PURB purb = NULL; PURB purb = NULL;
_adapter *padapter = (_adapter *)pintfhdl->padapter; _adapter *padapter = (_adapter *)pintfhdl->padapter;
struct dvobj_priv *pdvobj = adapter_to_dvobj(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 /* 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. */ * 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); 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); 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); rtw_set_surprise_removed(padapter);
switch (purb->status) { 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); 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); rtw_set_surprise_removed(padapter);
switch (purb->status) { switch (purb->status) {

View file

@ -62,11 +62,11 @@ sint rtw_endofpktfile(struct pkt_file *pfile)
{ {
if (pfile->pkt_len == 0) { 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) 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 (padapter->registrypriv.wifi_spec) {
if (pxmitpriv->hwxmits[qidx].accnt < WMM_XMIT_THRESHOLD) if (pxmitpriv->hwxmits[qidx].accnt < WMM_XMIT_THRESHOLD)
return _TRUE; return true;
} else { } else {
#ifdef CONFIG_MCC_MODE #ifdef CONFIG_MCC_MODE
if (MCC_EN(padapter)) { if (MCC_EN(padapter)) {
if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC) if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)
&& MCC_STOP(padapter)) && MCC_STOP(padapter))
return _FALSE; return false;
} }
#endif /* CONFIG_MCC_MODE */ #endif /* CONFIG_MCC_MODE */
return _TRUE; return true;
} }
return _FALSE; return false;
#else #else
#ifdef CONFIG_MCC_MODE #ifdef CONFIG_MCC_MODE
if (MCC_EN(padapter)) { if (MCC_EN(padapter)) {
if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC) if (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC)
&& MCC_STOP(padapter)) && MCC_STOP(padapter))
return _FALSE; return false;
} }
#endif /* CONFIG_MCC_MODE */ #endif /* CONFIG_MCC_MODE */
return _TRUE; return true;
#endif #endif
} }
@ -220,16 +220,16 @@ static inline bool rtw_os_need_stop_queue(_adapter *padapter, u16 qidx)
if (padapter->registrypriv.wifi_spec) { if (padapter->registrypriv.wifi_spec) {
/* No free space for Tx, tx_worker is too slow */ /* No free space for Tx, tx_worker is too slow */
if (pxmitpriv->hwxmits[qidx].accnt > WMM_XMIT_THRESHOLD) if (pxmitpriv->hwxmits[qidx].accnt > WMM_XMIT_THRESHOLD)
return _TRUE; return true;
} else { } else {
if (pxmitpriv->free_xmitframe_cnt <= 4) if (pxmitpriv->free_xmitframe_cnt <= 4)
return _TRUE; return true;
} }
#else #else
if (pxmitpriv->free_xmitframe_cnt <= 4) if (pxmitpriv->free_xmitframe_cnt <= 4)
return _TRUE; return true;
#endif #endif
return _FALSE; return false;
} }
void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt) 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) static bool rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
{ {
bool busy = _FALSE; bool busy = false;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
u16 qidx; u16 qidx;
@ -292,14 +292,14 @@ static bool rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
if (DBG_DUMP_OS_QUEUE_CTL) if (DBG_DUMP_OS_QUEUE_CTL)
RTW_INFO(FUNC_ADPT_FMT": netif_stop_subqueue[%d]\n", FUNC_ADPT_ARG(padapter), qidx); RTW_INFO(FUNC_ADPT_FMT": netif_stop_subqueue[%d]\n", FUNC_ADPT_ARG(padapter), qidx);
netif_stop_subqueue(padapter->pnetdev, qidx); netif_stop_subqueue(padapter->pnetdev, qidx);
busy = _TRUE; busy = true;
} }
#else #else
if (rtw_os_need_stop_queue(padapter, 0)) { if (rtw_os_need_stop_queue(padapter, 0)) {
if (DBG_DUMP_OS_QUEUE_CTL) if (DBG_DUMP_OS_QUEUE_CTL)
RTW_INFO(FUNC_ADPT_FMT": netif_stop_queue\n", FUNC_ADPT_ARG(padapter)); RTW_INFO(FUNC_ADPT_FMT": netif_stop_queue\n", FUNC_ADPT_ARG(padapter));
rtw_netif_stop_queue(padapter->pnetdev); rtw_netif_stop_queue(padapter->pnetdev);
busy = _TRUE; busy = true;
} }
#endif #endif
return busy; return busy;
@ -355,7 +355,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
plist = get_next(phead); plist = get_next(phead);
/* free sta asoc_queue */ /* 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; int stainfo_offset;
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); 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 */ /* avoid come from STA1 and send back STA1 */
if (_rtw_memcmp(psta->hwaddr, &skb->data[6], 6) == _TRUE if (_rtw_memcmp(psta->hwaddr, &skb->data[6], 6) == true
|| _rtw_memcmp(psta->hwaddr, null_addr, 6) == _TRUE || _rtw_memcmp(psta->hwaddr, null_addr, 6) == true
|| _rtw_memcmp(psta->hwaddr, bc_addr, 6) == _TRUE || _rtw_memcmp(psta->hwaddr, bc_addr, 6) == true
) { ) {
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_self); DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_self);
continue; 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__); RTW_INFO("%s-%d: rtw_skb_copy() failed!\n", __func__, __LINE__);
pxmitpriv->tx_drop++; pxmitpriv->tx_drop++;
/* rtw_skb_free(skb); */ /* 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); rtw_skb_free(skb);
return _TRUE; return true;
} }
#endif /* CONFIG_TX_MCAST2UNI */ #endif /* CONFIG_TX_MCAST2UNI */
@ -429,7 +429,7 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
} }
DBG_COUNTER(padapter->tx_logs.os_tx); 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); DBG_COUNTER(padapter->tx_logs.os_tx_err_up);
#ifdef DBG_TX_DROP_FRAME #ifdef DBG_TX_DROP_FRAME
RTW_INFO("DBG_TX_DROP_FRAME %s if_up fail\n", __func__); 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 #ifdef CONFIG_TX_MCAST2UNI
if (!rtw_mc2u_disable if (!rtw_mc2u_disable
&& check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE && check_fwstate(pmlmepriv, WIFI_AP_STATE) == true
&& (IP_MCAST_MAC(pkt->data) && (IP_MCAST_MAC(pkt->data)
|| ICMPV6_MCAST_MAC(pkt->data) || ICMPV6_MCAST_MAC(pkt->data)
#ifdef CONFIG_TX_BCAST2UNI #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)) { if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME / 4)) {
res = rtw_mlcst2unicst(padapter, pkt); res = rtw_mlcst2unicst(padapter, pkt);
if (res == _TRUE) if (res == true)
goto exit; goto exit;
} else { } else {
/* RTW_INFO("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */ /* 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; int ret = 0;
if (pkt) { 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)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
rtw_monitor_xmit_entry((struct sk_buff *)pkt, pnetdev); rtw_monitor_xmit_entry((struct sk_buff *)pkt, pnetdev);
#endif #endif