mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-25 14:03:40 +00:00
rtl8188eu: Change _FALSE and _TRUE to false and true
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
3d0ee1321a
commit
9cef34aa09
69 changed files with 2493 additions and 3604 deletions
228
core/rtw_ap.c
228
core/rtw_ap.c
|
@ -46,7 +46,7 @@ void init_mlme_ap_info(_adapter *padapter)
|
||||||
//for ACL
|
//for ACL
|
||||||
_rtw_init_queue(&pacl_list->acl_node_q);
|
_rtw_init_queue(&pacl_list->acl_node_q);
|
||||||
|
|
||||||
//pmlmeext->bstart_bss = _FALSE;
|
//pmlmeext->bstart_bss = false;
|
||||||
|
|
||||||
start_ap_mode(padapter);
|
start_ap_mode(padapter);
|
||||||
}
|
}
|
||||||
|
@ -62,8 +62,8 @@ void free_mlme_ap_info(_adapter *padapter)
|
||||||
|
|
||||||
//stop_ap_mode(padapter);
|
//stop_ap_mode(padapter);
|
||||||
|
|
||||||
pmlmepriv->update_bcn = _FALSE;
|
pmlmepriv->update_bcn = false;
|
||||||
pmlmeext->bstart_bss = _FALSE;
|
pmlmeext->bstart_bss = false;
|
||||||
|
|
||||||
rtw_sta_flush(padapter);
|
rtw_sta_flush(padapter);
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ static void update_BCNTIM(_adapter *padapter)
|
||||||
|
|
||||||
//update TIM IE
|
//update TIM IE
|
||||||
//if (pstapriv->tim_bitmap)
|
//if (pstapriv->tim_bitmap)
|
||||||
if (_TRUE)
|
if (true)
|
||||||
{
|
{
|
||||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||||
u16 tim_bitmap_le;
|
u16 tim_bitmap_le;
|
||||||
|
@ -206,7 +206,7 @@ static void update_BCNTIM(_adapter *padapter)
|
||||||
void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len)
|
void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len)
|
||||||
{
|
{
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||||
u8 bmatch = _FALSE;
|
u8 bmatch = false;
|
||||||
u8 *pie = pnetwork->IEs;
|
u8 *pie = pnetwork->IEs;
|
||||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||||
u32 i, offset, ielen, ie_offset, remainder_ielen = 0;
|
u32 i, offset, ielen, ie_offset, remainder_ielen = 0;
|
||||||
|
@ -223,7 +223,7 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
|
||||||
{
|
{
|
||||||
p = (u8 *)pIE;
|
p = (u8 *)pIE;
|
||||||
ielen = pIE->Length;
|
ielen = pIE->Length;
|
||||||
bmatch = _TRUE;
|
bmatch = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index)
|
||||||
u8 chk_sta_is_alive(struct sta_info *psta);
|
u8 chk_sta_is_alive(struct sta_info *psta);
|
||||||
u8 chk_sta_is_alive(struct sta_info *psta)
|
u8 chk_sta_is_alive(struct sta_info *psta)
|
||||||
{
|
{
|
||||||
u8 ret = _FALSE;
|
u8 ret = false;
|
||||||
#ifdef DBG_EXPIRATION_CHK
|
#ifdef DBG_EXPIRATION_CHK
|
||||||
DBG_88E("sta:"MAC_FMT", rssi:%d, rx:"STA_PKTS_FMT", expire_to:%u, %s%ssq_len:%u\n"
|
DBG_88E("sta:"MAC_FMT", rssi:%d, rx:"STA_PKTS_FMT", expire_to:%u, %s%ssq_len:%u\n"
|
||||||
, MAC_ARG(psta->hwaddr)
|
, MAC_ARG(psta->hwaddr)
|
||||||
|
@ -335,7 +335,7 @@ u8 chk_sta_is_alive(struct sta_info *psta)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret = _TRUE;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sta_update_last_rx_pkts(psta);
|
sta_update_last_rx_pkts(psta);
|
||||||
|
@ -361,12 +361,12 @@ void expire_timeout_chk(_adapter *padapter)
|
||||||
|
|
||||||
//check auth_queue
|
//check auth_queue
|
||||||
#ifdef DBG_EXPIRATION_CHK
|
#ifdef DBG_EXPIRATION_CHK
|
||||||
if (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
if (rtw_end_of_queue_search(phead, plist) == false) {
|
||||||
DBG_88E(FUNC_NDEV_FMT" auth_list, cnt:%u\n"
|
DBG_88E(FUNC_NDEV_FMT" auth_list, cnt:%u\n"
|
||||||
, FUNC_NDEV_ARG(padapter->pnetdev), pstapriv->auth_list_cnt);
|
, FUNC_NDEV_ARG(padapter->pnetdev), pstapriv->auth_list_cnt);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
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, auth_list);
|
psta = LIST_CONTAINOR(plist, struct sta_info, auth_list);
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
|
@ -406,12 +406,12 @@ void expire_timeout_chk(_adapter *padapter)
|
||||||
|
|
||||||
//check asoc_queue
|
//check asoc_queue
|
||||||
#ifdef DBG_EXPIRATION_CHK
|
#ifdef DBG_EXPIRATION_CHK
|
||||||
if (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
if (rtw_end_of_queue_search(phead, plist) == false) {
|
||||||
DBG_88E(FUNC_NDEV_FMT" asoc_list, cnt:%u\n"
|
DBG_88E(FUNC_NDEV_FMT" asoc_list, cnt:%u\n"
|
||||||
, FUNC_NDEV_ARG(padapter->pnetdev), pstapriv->asoc_list_cnt);
|
, FUNC_NDEV_ARG(padapter->pnetdev), pstapriv->asoc_list_cnt);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
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);
|
||||||
|
@ -472,7 +472,7 @@ void expire_timeout_chk(_adapter *padapter)
|
||||||
|
|
||||||
//to update bcn with tim_bitmap for this station
|
//to update bcn with tim_bitmap for this station
|
||||||
pstapriv->tim_bitmap |= BIT(psta->aid);
|
pstapriv->tim_bitmap |= BIT(psta->aid);
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||||
|
|
||||||
if (!pmlmeext->active_keep_alive_check)
|
if (!pmlmeext->active_keep_alive_check)
|
||||||
continue;
|
continue;
|
||||||
|
@ -495,7 +495,7 @@ void expire_timeout_chk(_adapter *padapter)
|
||||||
pstapriv->asoc_list_cnt--;
|
pstapriv->asoc_list_cnt--;
|
||||||
|
|
||||||
DBG_88E("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
DBG_88E("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||||
updated = ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING);
|
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -557,7 +557,7 @@ if (chk_alive_num) {
|
||||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
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, _TRUE, WLAN_REASON_DEAUTH_LEAVING);
|
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -575,7 +575,7 @@ void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
||||||
int i;
|
int i;
|
||||||
u8 rf_type;
|
u8 rf_type;
|
||||||
u32 init_rate=0;
|
u32 init_rate=0;
|
||||||
unsigned char sta_band = 0, raid, shortGIrate = _FALSE;
|
unsigned char sta_band = 0, raid, shortGIrate = false;
|
||||||
unsigned char limit;
|
unsigned char limit;
|
||||||
unsigned int tx_ra_bitmap=0;
|
unsigned int tx_ra_bitmap=0;
|
||||||
struct ht_priv *psta_ht = NULL;
|
struct ht_priv *psta_ht = NULL;
|
||||||
|
@ -646,7 +646,7 @@ void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
||||||
|
|
||||||
arg |= BIT(7);//support entry 2~31
|
arg |= BIT(7);//support entry 2~31
|
||||||
|
|
||||||
if (shortGIrate==_TRUE)
|
if (shortGIrate==true)
|
||||||
arg |= BIT(5);
|
arg |= BIT(5);
|
||||||
|
|
||||||
tx_ra_bitmap |= ((raid<<28)&0xf0000000);
|
tx_ra_bitmap |= ((raid<<28)&0xf0000000);
|
||||||
|
@ -661,7 +661,7 @@ void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
||||||
rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
|
rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
|
||||||
|
|
||||||
|
|
||||||
if (shortGIrate==_TRUE)
|
if (shortGIrate==true)
|
||||||
init_rate |= BIT(6);
|
init_rate |= BIT(6);
|
||||||
|
|
||||||
//set ra_id, init_rate
|
//set ra_id, init_rate
|
||||||
|
@ -695,7 +695,7 @@ static void update_bmc_sta(_adapter *padapter)
|
||||||
|
|
||||||
psta->qos_option = 0;
|
psta->qos_option = 0;
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
psta->htpriv.ht_option = _FALSE;
|
psta->htpriv.ht_option = false;
|
||||||
#endif //CONFIG_80211N_HT
|
#endif //CONFIG_80211N_HT
|
||||||
|
|
||||||
psta->ieee8021x_blocked = 0;
|
psta->ieee8021x_blocked = 0;
|
||||||
|
@ -737,9 +737,9 @@ static void update_bmc_sta(_adapter *padapter)
|
||||||
|
|
||||||
//DBG_88E("Add id %d val %08x to ratr for bmc sta\n", psta->aid, tx_ra_bitmap);
|
//DBG_88E("Add id %d val %08x to ratr for bmc sta\n", psta->aid, tx_ra_bitmap);
|
||||||
//ap mode
|
//ap mode
|
||||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, _TRUE);
|
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
|
||||||
|
|
||||||
//if (pHalData->fw_ractrl == _TRUE)
|
//if (pHalData->fw_ractrl == true)
|
||||||
{
|
{
|
||||||
u8 arg = 0;
|
u8 arg = 0;
|
||||||
|
|
||||||
|
@ -747,7 +747,7 @@ static void update_bmc_sta(_adapter *padapter)
|
||||||
|
|
||||||
arg |= BIT(7);
|
arg |= BIT(7);
|
||||||
|
|
||||||
//if (shortGIrate==_TRUE)
|
//if (shortGIrate==true)
|
||||||
// arg |= BIT(5);
|
// arg |= BIT(5);
|
||||||
|
|
||||||
tx_ra_bitmap |= ((raid<<28)&0xf0000000);
|
tx_ra_bitmap |= ((raid<<28)&0xf0000000);
|
||||||
|
@ -805,12 +805,12 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
|
||||||
DBG_88E("%s\n",__func__);
|
DBG_88E("%s\n",__func__);
|
||||||
|
|
||||||
//ap mode
|
//ap mode
|
||||||
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,_TRUE);
|
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,true);
|
||||||
|
|
||||||
if (psecuritypriv->dot11AuthAlgrthm==dot11AuthAlgrthm_8021X)
|
if (psecuritypriv->dot11AuthAlgrthm==dot11AuthAlgrthm_8021X)
|
||||||
psta->ieee8021x_blocked = _TRUE;
|
psta->ieee8021x_blocked = true;
|
||||||
else
|
else
|
||||||
psta->ieee8021x_blocked = _FALSE;
|
psta->ieee8021x_blocked = false;
|
||||||
|
|
||||||
|
|
||||||
//update sta's cap
|
//update sta's cap
|
||||||
|
@ -827,7 +827,7 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
|
||||||
//check if sta support s Short GI
|
//check if sta support s Short GI
|
||||||
if ((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40))
|
if ((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40))
|
||||||
{
|
{
|
||||||
phtpriv_sta->sgi = _TRUE;
|
phtpriv_sta->sgi = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// bwmode
|
// bwmode
|
||||||
|
@ -839,14 +839,14 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
psta->qos_option = _TRUE;
|
psta->qos_option = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
phtpriv_sta->ampdu_enable = _FALSE;
|
phtpriv_sta->ampdu_enable = false;
|
||||||
|
|
||||||
phtpriv_sta->sgi = _FALSE;
|
phtpriv_sta->sgi = false;
|
||||||
phtpriv_sta->bwmode = HT_CHANNEL_WIDTH_20;
|
phtpriv_sta->bwmode = HT_CHANNEL_WIDTH_20;
|
||||||
phtpriv_sta->ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
phtpriv_sta->ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||||
}
|
}
|
||||||
|
@ -954,28 +954,28 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
//and at first time the security ie ( RSN/WPA IE) will not include in beacon.
|
//and at first time the security ie ( RSN/WPA IE) will not include in beacon.
|
||||||
if (NULL == rtw_get_wps_ie(pnetwork->IEs+_FIXED_IE_LENGTH_, pnetwork->IELength-_FIXED_IE_LENGTH_, NULL, NULL))
|
if (NULL == rtw_get_wps_ie(pnetwork->IEs+_FIXED_IE_LENGTH_, pnetwork->IELength-_FIXED_IE_LENGTH_, NULL, NULL))
|
||||||
{
|
{
|
||||||
pmlmeext->bstart_bss = _TRUE;
|
pmlmeext->bstart_bss = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo: update wmm, ht cap
|
//todo: update wmm, ht cap
|
||||||
//pmlmeinfo->WMM_enable;
|
//pmlmeinfo->WMM_enable;
|
||||||
//pmlmeinfo->HT_enable;
|
//pmlmeinfo->HT_enable;
|
||||||
if (pmlmepriv->qospriv.qos_option)
|
if (pmlmepriv->qospriv.qos_option)
|
||||||
pmlmeinfo->WMM_enable = _TRUE;
|
pmlmeinfo->WMM_enable = true;
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
if (pmlmepriv->htpriv.ht_option)
|
if (pmlmepriv->htpriv.ht_option)
|
||||||
{
|
{
|
||||||
pmlmeinfo->WMM_enable = _TRUE;
|
pmlmeinfo->WMM_enable = true;
|
||||||
pmlmeinfo->HT_enable = _TRUE;
|
pmlmeinfo->HT_enable = true;
|
||||||
//pmlmeinfo->HT_info_enable = _TRUE;
|
//pmlmeinfo->HT_info_enable = true;
|
||||||
//pmlmeinfo->HT_caps_enable = _TRUE;
|
//pmlmeinfo->HT_caps_enable = true;
|
||||||
|
|
||||||
update_hw_ht_param(padapter);
|
update_hw_ht_param(padapter);
|
||||||
}
|
}
|
||||||
#endif //#CONFIG_80211N_HT
|
#endif //#CONFIG_80211N_HT
|
||||||
|
|
||||||
|
|
||||||
if (pmlmepriv->cur_network.join_res != _TRUE) //setting only at first time
|
if (pmlmepriv->cur_network.join_res != true) //setting only at first time
|
||||||
{
|
{
|
||||||
//WEP Key will be set before this function, do not clear CAM.
|
//WEP Key will be set before this function, do not clear CAM.
|
||||||
if ((psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) && (psecuritypriv->dot11PrivacyAlgrthm != _WEP104_))
|
if ((psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) && (psecuritypriv->dot11PrivacyAlgrthm != _WEP104_))
|
||||||
|
@ -1014,7 +1014,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
UpdateBrateTbl(padapter, pnetwork->SupportedRates);
|
UpdateBrateTbl(padapter, pnetwork->SupportedRates);
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates);
|
rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates);
|
||||||
|
|
||||||
if (pmlmepriv->cur_network.join_res != _TRUE) //setting only at first time
|
if (pmlmepriv->cur_network.join_res != true) //setting only at first time
|
||||||
{
|
{
|
||||||
//u32 initialgain;
|
//u32 initialgain;
|
||||||
|
|
||||||
|
@ -1023,7 +1023,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
|
|
||||||
//disable dynamic functions, such as high power, DIG
|
//disable dynamic functions, such as high power, DIG
|
||||||
//Save_DM_Func_Flag(padapter);
|
//Save_DM_Func_Flag(padapter);
|
||||||
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (padapter->adapter_type > PRIMARY_ADAPTER)
|
if (padapter->adapter_type > PRIMARY_ADAPTER)
|
||||||
|
@ -1033,7 +1033,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||||
|
|
||||||
//turn on all dynamic functions on PRIMARY_ADAPTER, dynamic functions only runs at PRIMARY_ADAPTER
|
//turn on all dynamic functions on PRIMARY_ADAPTER, dynamic functions only runs at PRIMARY_ADAPTER
|
||||||
Switch_DM_Func(pbuddy_adapter, DYNAMIC_ALL_FUNC_ENABLE, _TRUE);
|
Switch_DM_Func(pbuddy_adapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||||
|
|
||||||
//rtw_hal_set_hwreg(pbuddy_adapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
|
//rtw_hal_set_hwreg(pbuddy_adapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
|
||||||
}
|
}
|
||||||
|
@ -1042,7 +1042,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
//turn on all dynamic functions
|
//turn on all dynamic functions
|
||||||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, _TRUE);
|
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||||
|
|
||||||
//rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
|
//rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
|
||||||
}
|
}
|
||||||
|
@ -1092,7 +1092,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||||
}
|
}
|
||||||
else if (check_buddy_fwstate(padapter, _FW_LINKED)==_TRUE)//only second adapter can enter AP Mode
|
else if (check_buddy_fwstate(padapter, _FW_LINKED)==true)//only second adapter can enter AP Mode
|
||||||
{
|
{
|
||||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||||
|
@ -1194,9 +1194,9 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
pwdinfo->p2p_group_ssid_len = pnetwork->Ssid.SsidLength;
|
pwdinfo->p2p_group_ssid_len = pnetwork->Ssid.SsidLength;
|
||||||
#endif //CONFIG_P2P
|
#endif //CONFIG_P2P
|
||||||
|
|
||||||
if (_TRUE == pmlmeext->bstart_bss)
|
if (true == pmlmeext->bstart_bss)
|
||||||
{
|
{
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||||
|
|
||||||
#ifndef CONFIG_INTERRUPT_BASED_TXBCN //other case will tx beacon when bcn interrupt coming in.
|
#ifndef CONFIG_INTERRUPT_BASED_TXBCN //other case will tx beacon when bcn interrupt coming in.
|
||||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||||
|
@ -1214,7 +1214,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
//update bc/mc sta_info
|
//update bc/mc sta_info
|
||||||
update_bmc_sta(padapter);
|
update_bmc_sta(padapter);
|
||||||
|
|
||||||
//pmlmeext->bstart_bss = _TRUE;
|
//pmlmeext->bstart_bss = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1225,7 +1225,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||||
u8 *pHT_caps_ie=NULL;
|
u8 *pHT_caps_ie=NULL;
|
||||||
u8 *pHT_info_ie=NULL;
|
u8 *pHT_info_ie=NULL;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
u16 cap, ht_cap=_FALSE;
|
u16 cap, ht_cap=false;
|
||||||
uint ie_len = 0;
|
uint ie_len = 0;
|
||||||
int group_cipher, pairwise_cipher;
|
int group_cipher, pairwise_cipher;
|
||||||
u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX];
|
u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX];
|
||||||
|
@ -1254,7 +1254,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||||
|
|
||||||
DBG_88E("%s, len=%d\n", __func__, len);
|
DBG_88E("%s, len=%d\n", __func__, len);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1429,7 +1429,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||||
pHT_caps_ie=p;
|
pHT_caps_ie=p;
|
||||||
|
|
||||||
|
|
||||||
ht_cap = _TRUE;
|
ht_cap = true;
|
||||||
network_type |= WIRELESS_11_24N;
|
network_type |= WIRELESS_11_24N;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1486,24 +1486,24 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||||
pmlmepriv->cur_network.network_type = network_type;
|
pmlmepriv->cur_network.network_type = network_type;
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
pmlmepriv->htpriv.ht_option = _FALSE;
|
pmlmepriv->htpriv.ht_option = false;
|
||||||
|
|
||||||
if ( (psecuritypriv->wpa2_pairwise_cipher&WPA_CIPHER_TKIP) ||
|
if ( (psecuritypriv->wpa2_pairwise_cipher&WPA_CIPHER_TKIP) ||
|
||||||
(psecuritypriv->wpa_pairwise_cipher&WPA_CIPHER_TKIP))
|
(psecuritypriv->wpa_pairwise_cipher&WPA_CIPHER_TKIP))
|
||||||
{
|
{
|
||||||
//todo:
|
//todo:
|
||||||
//ht_cap = _FALSE;
|
//ht_cap = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ht_cap
|
//ht_cap
|
||||||
if (pregistrypriv->ht_enable && ht_cap==_TRUE)
|
if (pregistrypriv->ht_enable && ht_cap==true)
|
||||||
{
|
{
|
||||||
pmlmepriv->htpriv.ht_option = _TRUE;
|
pmlmepriv->htpriv.ht_option = true;
|
||||||
pmlmepriv->qospriv.qos_option = 1;
|
pmlmepriv->qospriv.qos_option = 1;
|
||||||
|
|
||||||
if (pregistrypriv->ampdu_enable==1)
|
if (pregistrypriv->ampdu_enable==1)
|
||||||
{
|
{
|
||||||
pmlmepriv->htpriv.ampdu_enable = _TRUE;
|
pmlmepriv->htpriv.ampdu_enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
HT_caps_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_caps_ie);
|
HT_caps_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_caps_ie);
|
||||||
|
@ -1532,7 +1532,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||||
psta->state |= WIFI_AP_STATE; //Aries, add,fix bug of flush_cam_entry at STOP AP mode , 0724
|
psta->state |= WIFI_AP_STATE; //Aries, add,fix bug of flush_cam_entry at STOP AP mode , 0724
|
||||||
rtw_indicate_connect( padapter);
|
rtw_indicate_connect( padapter);
|
||||||
|
|
||||||
pmlmepriv->cur_network.join_res = _TRUE;//for check if already set beacon
|
pmlmepriv->cur_network.join_res = true;//for check if already set beacon
|
||||||
|
|
||||||
//update bc/mc sta_info
|
//update bc/mc sta_info
|
||||||
//update_bmc_sta(padapter);
|
//update_bmc_sta(padapter);
|
||||||
|
@ -1555,7 +1555,7 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
_list *plist, *phead;
|
_list *plist, *phead;
|
||||||
u8 added = _FALSE;
|
u8 added = false;
|
||||||
int i, ret=0;
|
int i, ret=0;
|
||||||
struct rtw_wlan_acl_node *paclnode;
|
struct rtw_wlan_acl_node *paclnode;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
@ -1573,16 +1573,16 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
|
||||||
phead = get_list_head(pacl_node_q);
|
phead = get_list_head(pacl_node_q);
|
||||||
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)
|
||||||
{
|
{
|
||||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
|
|
||||||
if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN))
|
if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN))
|
||||||
{
|
{
|
||||||
if (paclnode->valid == _TRUE)
|
if (paclnode->valid == true)
|
||||||
{
|
{
|
||||||
added = _TRUE;
|
added = true;
|
||||||
DBG_88E("%s, sta has been added\n", __func__);
|
DBG_88E("%s, sta has been added\n", __func__);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1592,7 +1592,7 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
|
||||||
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||||
|
|
||||||
|
|
||||||
if (added == _TRUE)
|
if (added == true)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1602,13 +1602,13 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
|
||||||
{
|
{
|
||||||
paclnode = &pacl_list->aclnode[i];
|
paclnode = &pacl_list->aclnode[i];
|
||||||
|
|
||||||
if (paclnode->valid == _FALSE)
|
if (paclnode->valid == false)
|
||||||
{
|
{
|
||||||
_rtw_init_listhead(&paclnode->list);
|
_rtw_init_listhead(&paclnode->list);
|
||||||
|
|
||||||
_rtw_memcpy(paclnode->addr, addr, ETH_ALEN);
|
_rtw_memcpy(paclnode->addr, addr, ETH_ALEN);
|
||||||
|
|
||||||
paclnode->valid = _TRUE;
|
paclnode->valid = true;
|
||||||
|
|
||||||
rtw_list_insert_tail(&paclnode->list, get_list_head(pacl_node_q));
|
rtw_list_insert_tail(&paclnode->list, get_list_head(pacl_node_q));
|
||||||
|
|
||||||
|
@ -1642,16 +1642,16 @@ int rtw_acl_remove_sta(_adapter *padapter, u8 *addr)
|
||||||
phead = get_list_head(pacl_node_q);
|
phead = get_list_head(pacl_node_q);
|
||||||
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)
|
||||||
{
|
{
|
||||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
|
|
||||||
if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN))
|
if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN))
|
||||||
{
|
{
|
||||||
if (paclnode->valid == _TRUE)
|
if (paclnode->valid == true)
|
||||||
{
|
{
|
||||||
paclnode->valid = _FALSE;
|
paclnode->valid = false;
|
||||||
|
|
||||||
rtw_list_delete(&paclnode->list);
|
rtw_list_delete(&paclnode->list);
|
||||||
|
|
||||||
|
@ -1846,7 +1846,7 @@ void update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
||||||
pmlmeext = &(padapter->mlmeextpriv);
|
pmlmeext = &(padapter->mlmeextpriv);
|
||||||
//pmlmeinfo = &(pmlmeext->mlmext_info);
|
//pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
|
|
||||||
if (_FALSE == pmlmeext->bstart_bss)
|
if (false == pmlmeext->bstart_bss)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
_enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||||
|
@ -1899,7 +1899,7 @@ void update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pmlmepriv->update_bcn = _TRUE;
|
pmlmepriv->update_bcn = true;
|
||||||
|
|
||||||
_exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
_exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||||
|
|
||||||
|
@ -1940,7 +1940,7 @@ static int rtw_ht_operation_update(_adapter *padapter)
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv;
|
struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv;
|
||||||
|
|
||||||
if (pmlmepriv->htpriv.ht_option == _TRUE)
|
if (pmlmepriv->htpriv.ht_option == true)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
//if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed)
|
//if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed)
|
||||||
|
@ -2009,7 +2009,7 @@ static int rtw_ht_operation_update(_adapter *padapter)
|
||||||
void associated_clients_update(_adapter *padapter, u8 updated)
|
void associated_clients_update(_adapter *padapter, u8 updated)
|
||||||
{
|
{
|
||||||
//update associcated stations cap.
|
//update associcated stations cap.
|
||||||
if (updated == _TRUE)
|
if (updated == true)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
_list *phead, *plist;
|
_list *phead, *plist;
|
||||||
|
@ -2022,7 +2022,7 @@ void associated_clients_update(_adapter *padapter, u8 updated)
|
||||||
plist = get_next(phead);
|
plist = get_next(phead);
|
||||||
|
|
||||||
//check asoc_queue
|
//check 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);
|
||||||
|
|
||||||
|
@ -2040,7 +2040,7 @@ void associated_clients_update(_adapter *padapter, u8 updated)
|
||||||
/* called > TSR LEVEL for USB or SDIO Interface*/
|
/* called > TSR LEVEL for USB or SDIO Interface*/
|
||||||
void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
{
|
{
|
||||||
u8 beacon_updated = _FALSE;
|
u8 beacon_updated = false;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
|
|
||||||
|
@ -2055,8 +2055,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||||
(pmlmepriv->num_sta_no_short_preamble == 1))
|
(pmlmepriv->num_sta_no_short_preamble == 1))
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
update_beacon(padapter, 0xFF, NULL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2072,8 +2072,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||||
(pmlmepriv->num_sta_no_short_preamble == 0))
|
(pmlmepriv->num_sta_no_short_preamble == 0))
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
update_beacon(padapter, 0xFF, NULL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2089,8 +2089,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
|
|
||||||
if (pmlmepriv->num_sta_non_erp == 1)
|
if (pmlmepriv->num_sta_non_erp == 1)
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE);
|
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2105,8 +2105,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
|
|
||||||
if (pmlmepriv->num_sta_non_erp == 0)
|
if (pmlmepriv->num_sta_non_erp == 0)
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE);
|
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2123,8 +2123,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||||
(pmlmepriv->num_sta_no_short_slot_time == 1))
|
(pmlmepriv->num_sta_no_short_slot_time == 1))
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
update_beacon(padapter, 0xFF, NULL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2140,8 +2140,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||||
(pmlmepriv->num_sta_no_short_slot_time == 0))
|
(pmlmepriv->num_sta_no_short_slot_time == 0))
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
update_beacon(padapter, 0xFF, NULL, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2189,7 +2189,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
psta->no_ht_set = 1;
|
psta->no_ht_set = 1;
|
||||||
pmlmepriv->num_sta_no_ht++;
|
pmlmepriv->num_sta_no_ht++;
|
||||||
}
|
}
|
||||||
if (pmlmepriv->htpriv.ht_option == _TRUE) {
|
if (pmlmepriv->htpriv.ht_option == true) {
|
||||||
DBG_88E("%s STA " MAC_FMT
|
DBG_88E("%s STA " MAC_FMT
|
||||||
" - no HT, num of non-HT stations %d\n",
|
" - no HT, num of non-HT stations %d\n",
|
||||||
__func__, MAC_ARG(psta->hwaddr),
|
__func__, MAC_ARG(psta->hwaddr),
|
||||||
|
@ -2199,8 +2199,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_80211N_HT */
|
#endif /* CONFIG_80211N_HT */
|
||||||
|
@ -2214,7 +2214,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||||
|
|
||||||
u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||||
{
|
{
|
||||||
u8 beacon_updated = _FALSE;
|
u8 beacon_updated = false;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
|
|
||||||
|
@ -2227,8 +2227,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||||
if (pmlmeext->cur_wireless_mode > WIRELESS_11B
|
if (pmlmeext->cur_wireless_mode > WIRELESS_11B
|
||||||
&& pmlmepriv->num_sta_no_short_preamble == 0)
|
&& pmlmepriv->num_sta_no_short_preamble == 0)
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
update_beacon(padapter, 0xFF, NULL, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2237,8 +2237,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||||
pmlmepriv->num_sta_non_erp--;
|
pmlmepriv->num_sta_non_erp--;
|
||||||
if (pmlmepriv->num_sta_non_erp == 0)
|
if (pmlmepriv->num_sta_non_erp == 0)
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE);
|
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2248,8 +2248,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||||
if (pmlmeext->cur_wireless_mode > WIRELESS_11B
|
if (pmlmeext->cur_wireless_mode > WIRELESS_11B
|
||||||
&& pmlmepriv->num_sta_no_short_slot_time == 0)
|
&& pmlmepriv->num_sta_no_short_slot_time == 0)
|
||||||
{
|
{
|
||||||
beacon_updated = _TRUE;
|
beacon_updated = true;
|
||||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
update_beacon(padapter, 0xFF, NULL, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2272,8 +2272,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_80211N_HT */
|
#endif /* CONFIG_80211N_HT */
|
||||||
|
@ -2290,7 +2290,7 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||||
u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reason)
|
u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reason)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
u8 beacon_updated = _FALSE;
|
u8 beacon_updated = false;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
@ -2308,14 +2308,14 @@ u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reaso
|
||||||
psta->htpriv.candidate_tid_bitmap = 0x0;//reset
|
psta->htpriv.candidate_tid_bitmap = 0x0;//reset
|
||||||
#endif //CONFIG_80211N_HT
|
#endif //CONFIG_80211N_HT
|
||||||
|
|
||||||
if (active == _TRUE)
|
if (active == true)
|
||||||
issue_deauth(padapter, psta->hwaddr, reason);
|
issue_deauth(padapter, psta->hwaddr, reason);
|
||||||
|
|
||||||
//report_del_sta_event(padapter, psta->hwaddr, reason);
|
//report_del_sta_event(padapter, psta->hwaddr, reason);
|
||||||
|
|
||||||
//clear cam entry / key
|
//clear cam entry / key
|
||||||
//clear_cam_entry(padapter, (psta->mac_id + 3));
|
//clear_cam_entry(padapter, (psta->mac_id + 3));
|
||||||
rtw_clearstakey_cmd(padapter, (u8*)psta, (u8)(psta->mac_id + 3), _TRUE);
|
rtw_clearstakey_cmd(padapter, (u8*)psta, (u8)(psta->mac_id + 3), true);
|
||||||
|
|
||||||
|
|
||||||
_enter_critical_bh(&psta->lock, &irqL);
|
_enter_critical_bh(&psta->lock, &irqL);
|
||||||
|
@ -2372,7 +2372,7 @@ int rtw_ap_inform_ch_switch (_adapter *padapter, u8 new_ch, u8 ch_offset)
|
||||||
plist = get_next(phead);
|
plist = get_next(phead);
|
||||||
|
|
||||||
/* for each sta in asoc_queue */
|
/* for each sta in 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);
|
||||||
|
@ -2409,7 +2409,7 @@ int rtw_sta_flush(_adapter *padapter)
|
||||||
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)
|
||||||
{
|
{
|
||||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||||
|
|
||||||
|
@ -2419,7 +2419,7 @@ int rtw_sta_flush(_adapter *padapter)
|
||||||
pstapriv->asoc_list_cnt--;
|
pstapriv->asoc_list_cnt--;
|
||||||
|
|
||||||
//_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
//_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING);
|
ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||||
//_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
//_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
}
|
}
|
||||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
|
@ -2427,7 +2427,7 @@ int rtw_sta_flush(_adapter *padapter)
|
||||||
|
|
||||||
issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING);
|
issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING);
|
||||||
|
|
||||||
associated_clients_update(padapter, _TRUE);
|
associated_clients_update(padapter, true);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -2454,16 +2454,16 @@ void sta_info_update(_adapter *padapter, struct sta_info *psta)
|
||||||
//update 802.11n ht cap.
|
//update 802.11n ht cap.
|
||||||
if (WLAN_STA_HT&flags)
|
if (WLAN_STA_HT&flags)
|
||||||
{
|
{
|
||||||
psta->htpriv.ht_option = _TRUE;
|
psta->htpriv.ht_option = true;
|
||||||
psta->qos_option = 1;
|
psta->qos_option = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
psta->htpriv.ht_option = _FALSE;
|
psta->htpriv.ht_option = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pmlmepriv->htpriv.ht_option == _FALSE)
|
if (pmlmepriv->htpriv.ht_option == false)
|
||||||
psta->htpriv.ht_option = _FALSE;
|
psta->htpriv.ht_option = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -2490,10 +2490,10 @@ void start_ap_mode(_adapter *padapter)
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||||
|
|
||||||
pmlmepriv->update_bcn = _FALSE;
|
pmlmepriv->update_bcn = false;
|
||||||
|
|
||||||
//init_mlme_ap_info(padapter);
|
//init_mlme_ap_info(padapter);
|
||||||
pmlmeext->bstart_bss = _FALSE;
|
pmlmeext->bstart_bss = false;
|
||||||
|
|
||||||
pmlmepriv->num_sta_non_erp = 0;
|
pmlmepriv->num_sta_non_erp = 0;
|
||||||
|
|
||||||
|
@ -2507,9 +2507,9 @@ void start_ap_mode(_adapter *padapter)
|
||||||
#endif //CONFIG_80211N_HT
|
#endif //CONFIG_80211N_HT
|
||||||
pmlmepriv->num_sta_ht_20mhz = 0;
|
pmlmepriv->num_sta_ht_20mhz = 0;
|
||||||
|
|
||||||
pmlmepriv->olbc = _FALSE;
|
pmlmepriv->olbc = false;
|
||||||
|
|
||||||
pmlmepriv->olbc_ht = _FALSE;
|
pmlmepriv->olbc_ht = false;
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
pmlmepriv->ht_op_mode = 0;
|
pmlmepriv->ht_op_mode = 0;
|
||||||
|
@ -2533,7 +2533,7 @@ void start_ap_mode(_adapter *padapter)
|
||||||
for (i = 0; i < NUM_ACL; i++)
|
for (i = 0; i < NUM_ACL; i++)
|
||||||
{
|
{
|
||||||
_rtw_init_listhead(&pacl_list->aclnode[i].list);
|
_rtw_init_listhead(&pacl_list->aclnode[i].list);
|
||||||
pacl_list->aclnode[i].valid = _FALSE;
|
pacl_list->aclnode[i].valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2550,8 +2550,8 @@ void stop_ap_mode(_adapter *padapter)
|
||||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||||
|
|
||||||
pmlmepriv->update_bcn = _FALSE;
|
pmlmepriv->update_bcn = false;
|
||||||
pmlmeext->bstart_bss = _FALSE;
|
pmlmeext->bstart_bss = false;
|
||||||
//_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
|
//_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
|
||||||
|
|
||||||
//reset and init security priv , this can refine with rtw_reset_securitypriv
|
//reset and init security priv , this can refine with rtw_reset_securitypriv
|
||||||
|
@ -2563,14 +2563,14 @@ void stop_ap_mode(_adapter *padapter)
|
||||||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||||
phead = get_list_head(pacl_node_q);
|
phead = get_list_head(pacl_node_q);
|
||||||
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)
|
||||||
{
|
{
|
||||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
|
|
||||||
if (paclnode->valid == _TRUE)
|
if (paclnode->valid == true)
|
||||||
{
|
{
|
||||||
paclnode->valid = _FALSE;
|
paclnode->valid = false;
|
||||||
|
|
||||||
rtw_list_delete(&paclnode->list);
|
rtw_list_delete(&paclnode->list);
|
||||||
|
|
||||||
|
|
116
core/rtw_cmd.c
116
core/rtw_cmd.c
|
@ -145,7 +145,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
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ _func_exit_;
|
||||||
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
|
||||||
|
@ -318,17 +318,17 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||||
if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID)
|
if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID)
|
||||||
{
|
{
|
||||||
//DBG_88E("==>enqueue POWER_SAVING_CTRL_WK_CID\n");
|
//DBG_88E("==>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 ( (pcmdpriv->padapter->hw_init_completed ==_FALSE && bAllow == _FALSE)
|
if ( (pcmdpriv->padapter->hw_init_completed ==false && bAllow == false)
|
||||||
|| pcmdpriv->cmdthd_running== _FALSE //com_thread not running
|
|| pcmdpriv->cmdthd_running== false //com_thread not running
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//DBG_88E("%s:%s: drop cmdcode:%u, hw_init_completed:%u, cmdthd_running:%u\n", caller_func, __func__,
|
//DBG_88E("%s:%s: drop cmdcode:%u, hw_init_completed:%u, cmdthd_running:%u\n", caller_func, __func__,
|
||||||
|
@ -441,7 +441,7 @@ _func_enter_;
|
||||||
pcmdbuf = pcmdpriv->cmd_buf;
|
pcmdbuf = pcmdpriv->cmd_buf;
|
||||||
prspbuf = pcmdpriv->rsp_buf;
|
prspbuf = pcmdpriv->rsp_buf;
|
||||||
|
|
||||||
pcmdpriv->cmdthd_running=_TRUE;
|
pcmdpriv->cmdthd_running=true;
|
||||||
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
|
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("start r871x rtw_cmd_thread !!!!\n"));
|
RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("start r871x rtw_cmd_thread !!!!\n"));
|
||||||
|
@ -451,7 +451,7 @@ _func_enter_;
|
||||||
if (_rtw_down_sema(&pcmdpriv->cmd_queue_sema) == _FAIL)
|
if (_rtw_down_sema(&pcmdpriv->cmd_queue_sema) == _FAIL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((padapter->bDriverStopped == _TRUE)||(padapter->bSurpriseRemoved == _TRUE))
|
if ((padapter->bDriverStopped == true)||(padapter->bSurpriseRemoved == true))
|
||||||
{
|
{
|
||||||
DBG_88E("%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n",
|
DBG_88E("%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n",
|
||||||
__func__, padapter->bDriverStopped, padapter->bSurpriseRemoved, __LINE__);
|
__func__, padapter->bDriverStopped, padapter->bSurpriseRemoved, __LINE__);
|
||||||
|
@ -468,7 +468,7 @@ _func_enter_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_next:
|
_next:
|
||||||
if ((padapter->bDriverStopped == _TRUE)||(padapter->bSurpriseRemoved== _TRUE))
|
if ((padapter->bDriverStopped == true)||(padapter->bSurpriseRemoved== true))
|
||||||
{
|
{
|
||||||
DBG_88E("%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n",
|
DBG_88E("%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n",
|
||||||
__func__, padapter->bDriverStopped, padapter->bSurpriseRemoved, __LINE__);
|
__func__, padapter->bDriverStopped, padapter->bSurpriseRemoved, __LINE__);
|
||||||
|
@ -541,7 +541,7 @@ post_process:
|
||||||
goto _next;
|
goto _next;
|
||||||
|
|
||||||
}
|
}
|
||||||
pcmdpriv->cmdthd_running=_FALSE;
|
pcmdpriv->cmdthd_running=false;
|
||||||
|
|
||||||
|
|
||||||
// free all cmd_obj resources
|
// free all cmd_obj resources
|
||||||
|
@ -700,13 +700,13 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
#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
|
||||||
|
@ -721,7 +721,7 @@ _func_enter_;
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtw_free_network_queue(padapter, _FALSE);
|
rtw_free_network_queue(padapter, false);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("%s: flush network queue\n", __func__));
|
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("%s: flush network queue\n", __func__));
|
||||||
|
|
||||||
|
@ -1049,7 +1049,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
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
}
|
}
|
||||||
|
@ -1063,7 +1063,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
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
@ -1195,7 +1195,7 @@ _func_enter_;
|
||||||
|
|
||||||
|
|
||||||
//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)
|
||||||
{
|
{
|
||||||
|
@ -1247,7 +1247,7 @@ _func_enter_;
|
||||||
// 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 );
|
||||||
}
|
}
|
||||||
|
@ -1275,7 +1275,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
phtpriv->ht_option = _FALSE;
|
phtpriv->ht_option = false;
|
||||||
if (pregistrypriv->ht_enable)
|
if (pregistrypriv->ht_enable)
|
||||||
{
|
{
|
||||||
// Added by Albert 2010/06/23
|
// Added by Albert 2010/06/23
|
||||||
|
@ -1393,14 +1393,14 @@ _func_enter_;
|
||||||
|
|
||||||
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= _FALSE;
|
res= false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
psetop = (struct setopmode_parm*)rtw_zmalloc(sizeof(struct setopmode_parm));
|
psetop = (struct setopmode_parm*)rtw_zmalloc(sizeof(struct setopmode_parm));
|
||||||
|
|
||||||
if (psetop==NULL){
|
if (psetop==NULL){
|
||||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||||
res=_FALSE;
|
res=false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1465,10 +1465,10 @@ _func_enter_;
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
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 (unicast_key == _TRUE) {
|
if (unicast_key == true) {
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
if ((sta->tdls_sta_state&TDLS_LINKED_STATE)==TDLS_LINKED_STATE)
|
if ((sta->tdls_sta_state&TDLS_LINKED_STATE)==TDLS_LINKED_STATE)
|
||||||
_rtw_memcpy(&psetstakey_para->key, sta->tpk.tk, 16);
|
_rtw_memcpy(&psetstakey_para->key, sta->tpk.tk, 16);
|
||||||
|
@ -1480,7 +1480,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//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;
|
||||||
|
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
|
|
||||||
|
@ -1993,8 +1993,8 @@ static void traffic_status_watchdog(_adapter *padapter)
|
||||||
#ifdef CONFIG_LPS
|
#ifdef CONFIG_LPS
|
||||||
u8 bEnterPS;
|
u8 bEnterPS;
|
||||||
#endif
|
#endif
|
||||||
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;
|
||||||
#ifdef CONFIG_FTP_PROTECT
|
#ifdef CONFIG_FTP_PROTECT
|
||||||
u16 bPktCount = 0;
|
u16 bPktCount = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2006,7 +2006,7 @@ static void traffic_status_watchdog(_adapter *padapter)
|
||||||
//
|
//
|
||||||
// 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)*/)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2018,24 +2018,24 @@ static void traffic_status_watchdog(_adapter *padapter)
|
||||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 100 )
|
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 100 )
|
||||||
#endif // !CONFIG_BT_COEXIST
|
#endif // !CONFIG_BT_COEXIST
|
||||||
{
|
{
|
||||||
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_FTP_PROTECT
|
#ifdef CONFIG_FTP_PROTECT
|
||||||
|
@ -2064,7 +2064,7 @@ static void traffic_status_watchdog(_adapter *padapter)
|
||||||
|
|
||||||
#ifdef CONFIG_LPS
|
#ifdef CONFIG_LPS
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
if (BT_1Ant(padapter) == _FALSE)
|
if (BT_1Ant(padapter) == false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// check traffic for powersaving.
|
// check traffic for powersaving.
|
||||||
|
@ -2072,11 +2072,11 @@ static void traffic_status_watchdog(_adapter *padapter)
|
||||||
(pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) )
|
(pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) )
|
||||||
{
|
{
|
||||||
//DBG_88E("Tx = %d, Rx = %d\n",pmlmepriv->LinkDetectInfo.NumTxOkInPeriod,pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod);
|
//DBG_88E("Tx = %d, Rx = %d\n",pmlmepriv->LinkDetectInfo.NumTxOkInPeriod,pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod);
|
||||||
bEnterPS= _FALSE;
|
bEnterPS= false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bEnterPS= _TRUE;
|
bEnterPS= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// LeisurePS only work in infra mode.
|
// LeisurePS only work in infra mode.
|
||||||
|
@ -2119,7 +2119,7 @@ void dynamic_chk_wk_hdl(_adapter *padapter, u8 *pbuf, int sz)
|
||||||
|
|
||||||
#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);
|
||||||
}
|
}
|
||||||
|
@ -2130,7 +2130,7 @@ void dynamic_chk_wk_hdl(_adapter *padapter, u8 *pbuf, int sz)
|
||||||
rtw_hal_sreset_xmit_status_check(padapter);
|
rtw_hal_sreset_xmit_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)
|
||||||
{
|
{
|
||||||
linked_status_chk(padapter);
|
linked_status_chk(padapter);
|
||||||
traffic_status_watchdog(padapter);
|
traffic_status_watchdog(padapter);
|
||||||
|
@ -2159,8 +2159,8 @@ void lps_ctrl_wk_hdl(_adapter *padapter, u8 lps_ctrl_type)
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -2170,11 +2170,11 @@ _func_enter_;
|
||||||
case LPS_CTRL_SCAN:
|
case LPS_CTRL_SCAN:
|
||||||
//DBG_88E("LPS_CTRL_SCAN\n");
|
//DBG_88E("LPS_CTRL_SCAN\n");
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
BT_WifiScanNotify(padapter, _TRUE);
|
BT_WifiScanNotify(padapter, true);
|
||||||
if (BT_1Ant(padapter) == _FALSE)
|
if (BT_1Ant(padapter) == false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||||
{ //connect
|
{ //connect
|
||||||
LPS_Leave(padapter);
|
LPS_Leave(padapter);
|
||||||
}
|
}
|
||||||
|
@ -2199,7 +2199,7 @@ _func_enter_;
|
||||||
mstatus = 0;//disconnect
|
mstatus = 0;//disconnect
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
BT_WifiMediaStatusNotify(padapter, mstatus);
|
BT_WifiMediaStatusNotify(padapter, mstatus);
|
||||||
if (BT_1Ant(padapter) == _FALSE)
|
if (BT_1Ant(padapter) == false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
LPS_Leave(padapter);
|
LPS_Leave(padapter);
|
||||||
|
@ -2211,7 +2211,7 @@ _func_enter_;
|
||||||
pwrpriv->DelayLPSLastTimeStamp = rtw_get_current_time();
|
pwrpriv->DelayLPSLastTimeStamp = rtw_get_current_time();
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
BT_SpecialPacketNotify(padapter);
|
BT_SpecialPacketNotify(padapter);
|
||||||
if (BT_1Ant(padapter) == _FALSE)
|
if (BT_1Ant(padapter) == false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
LPS_Leave(padapter);
|
LPS_Leave(padapter);
|
||||||
|
@ -2221,7 +2221,7 @@ _func_enter_;
|
||||||
//DBG_88E("LPS_CTRL_LEAVE\n");
|
//DBG_88E("LPS_CTRL_LEAVE\n");
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
BT_LpsLeave(padapter);
|
BT_LpsLeave(padapter);
|
||||||
if (BT_1Ant(padapter) == _FALSE)
|
if (BT_1Ant(padapter) == false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
LPS_Leave(padapter);
|
LPS_Leave(padapter);
|
||||||
|
@ -2340,14 +2340,14 @@ u8 rtw_antenna_select_cmd(_adapter*padapter, u8 antenna,u8 enqueue)
|
||||||
struct cmd_obj *ph2c;
|
struct cmd_obj *ph2c;
|
||||||
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;
|
||||||
u8 bSupportAntDiv = _FALSE;
|
u8 bSupportAntDiv = false;
|
||||||
u8 res = _SUCCESS;
|
u8 res = _SUCCESS;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
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 ) return res;
|
if (false == bSupportAntDiv ) return res;
|
||||||
|
|
||||||
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){
|
||||||
|
@ -2495,7 +2495,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
||||||
|
|
||||||
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &val);
|
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &val);
|
||||||
|
|
||||||
while (_FALSE == val)
|
while (false == val)
|
||||||
{
|
{
|
||||||
rtw_msleep_os(100);
|
rtw_msleep_os(100);
|
||||||
|
|
||||||
|
@ -2512,7 +2512,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
||||||
pstapriv->tim_bitmap &= ~BIT(0);
|
pstapriv->tim_bitmap &= ~BIT(0);
|
||||||
pstapriv->sta_dz_bitmap &= ~BIT(0);
|
pstapriv->sta_dz_bitmap &= ~BIT(0);
|
||||||
|
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||||
}
|
}
|
||||||
else //re check again
|
else //re check again
|
||||||
{
|
{
|
||||||
|
@ -2601,14 +2601,14 @@ static s32 c2h_evt_hdl(_adapter *adapter, struct c2h_evt_hdr *c2h_evt, c2h_id_fi
|
||||||
if (c2h_evt_read(adapter, buf) == _SUCCESS) {
|
if (c2h_evt_read(adapter, buf) == _SUCCESS) {
|
||||||
c2h_evt = (struct c2h_evt_hdr *)buf;
|
c2h_evt = (struct c2h_evt_hdr *)buf;
|
||||||
|
|
||||||
if (filter && filter(c2h_evt->id) == _FALSE)
|
if (filter && filter(c2h_evt->id) == false)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
ret = rtw_hal_c2h_handler(adapter, c2h_evt);
|
ret = rtw_hal_c2h_handler(adapter, c2h_evt);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (filter && filter(c2h_evt->id) == _FALSE)
|
if (filter && filter(c2h_evt->id) == false)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
ret = rtw_hal_c2h_handler(adapter, c2h_evt);
|
ret = rtw_hal_c2h_handler(adapter, c2h_evt);
|
||||||
|
@ -2625,7 +2625,7 @@ static void c2h_wk_callback(_workitem *work)
|
||||||
struct c2h_evt_hdr *c2h_evt;
|
struct c2h_evt_hdr *c2h_evt;
|
||||||
c2h_id_filter ccx_id_filter = rtw_hal_c2h_id_filter_ccx(adapter);
|
c2h_id_filter ccx_id_filter = rtw_hal_c2h_id_filter_ccx(adapter);
|
||||||
|
|
||||||
evtpriv->c2h_wk_alive = _TRUE;
|
evtpriv->c2h_wk_alive = true;
|
||||||
|
|
||||||
while (!rtw_cbuf_empty(evtpriv->c2h_queue)) {
|
while (!rtw_cbuf_empty(evtpriv->c2h_queue)) {
|
||||||
if ((c2h_evt = (struct c2h_evt_hdr *)rtw_cbuf_pop(evtpriv->c2h_queue)) != NULL) {
|
if ((c2h_evt = (struct c2h_evt_hdr *)rtw_cbuf_pop(evtpriv->c2h_queue)) != NULL) {
|
||||||
|
@ -2646,7 +2646,7 @@ static void c2h_wk_callback(_workitem *work)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ccx_id_filter(c2h_evt->id) == _TRUE) {
|
if (ccx_id_filter(c2h_evt->id) == true) {
|
||||||
/* Handle CCX report here */
|
/* Handle CCX report here */
|
||||||
rtw_hal_c2h_handler(adapter, c2h_evt);
|
rtw_hal_c2h_handler(adapter, c2h_evt);
|
||||||
rtw_mfree((u8*)c2h_evt, 16);
|
rtw_mfree((u8*)c2h_evt, 16);
|
||||||
|
@ -2656,7 +2656,7 @@ static void c2h_wk_callback(_workitem *work)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
evtpriv->c2h_wk_alive = _FALSE;
|
evtpriv->c2h_wk_alive = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2886,7 +2886,7 @@ _func_enter_;
|
||||||
|
|
||||||
pnetwork->Length = get_WLAN_BSSID_EX_sz(pnetwork);
|
pnetwork->Length = get_WLAN_BSSID_EX_sz(pnetwork);
|
||||||
_rtw_memcpy(&(pwlan->network), pnetwork, pnetwork->Length);
|
_rtw_memcpy(&(pwlan->network), pnetwork, pnetwork->Length);
|
||||||
//pwlan->fixed = _TRUE;
|
//pwlan->fixed = true;
|
||||||
|
|
||||||
//rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
//rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
||||||
|
|
||||||
|
@ -2960,7 +2960,7 @@ _func_enter_;
|
||||||
|
|
||||||
_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);
|
||||||
|
@ -2980,7 +2980,7 @@ _func_enter_;
|
||||||
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
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
|
@ -978,7 +978,7 @@ int proc_get_all_sta_info(char *page, char **start,
|
||||||
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);
|
||||||
|
|
||||||
|
|
|
@ -63,14 +63,14 @@ Efuse_Read1ByteFromFakeContent(
|
||||||
{
|
{
|
||||||
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
|
||||||
|
@ -86,7 +86,7 @@ Efuse_Write1ByteToFakeContent(
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
@ -94,7 +94,7 @@ Efuse_Write1ByteToFakeContent(
|
||||||
{
|
{
|
||||||
fakeBTEfuseContent[fakeEfuseBank-1][Offset] = Value;
|
fakeBTEfuseContent[fakeEfuseBank-1][Offset] = Value;
|
||||||
}
|
}
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
|
@ -305,7 +305,7 @@ EFUSE_Read1Byte(
|
||||||
u32 k=0;
|
u32 k=0;
|
||||||
u16 contentLen=0;
|
u16 contentLen=0;
|
||||||
|
|
||||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, _FALSE);
|
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
|
||||||
|
|
||||||
if (Address < contentLen) //E-fuse 512Byte
|
if (Address < contentLen) //E-fuse 512Byte
|
||||||
{
|
{
|
||||||
|
@ -376,7 +376,7 @@ EFUSE_Write1Byte(
|
||||||
u16 contentLen=0;
|
u16 contentLen=0;
|
||||||
|
|
||||||
//RT_TRACE(COMP_EFUSE, DBG_LOUD, ("Addr=%x Data =%x\n", Address, Value));
|
//RT_TRACE(COMP_EFUSE, DBG_LOUD, ("Addr=%x Data =%x\n", Address, Value));
|
||||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, _FALSE);
|
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
|
||||||
|
|
||||||
if ( Address < contentLen) //E-fuse 512Byte
|
if ( Address < contentLen) //E-fuse 512Byte
|
||||||
{
|
{
|
||||||
|
@ -442,12 +442,12 @@ 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;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
@ -487,11 +487,11 @@ efuse_OneByteWrite(
|
||||||
|
|
||||||
if (tmpidx<100)
|
if (tmpidx<100)
|
||||||
{
|
{
|
||||||
bResult = _TRUE;
|
bResult = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bResult = _FALSE;
|
bResult = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -600,12 +600,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -618,20 +618,20 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
||||||
u8 res = _FAIL ;
|
u8 res = _FAIL ;
|
||||||
u8 (*rw8)(PADAPTER, u16, u8*);
|
u8 (*rw8)(PADAPTER, u16, u8*);
|
||||||
|
|
||||||
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;
|
||||||
} else
|
} else
|
||||||
rw8 = &efuse_read8;
|
rw8 = &efuse_read8;
|
||||||
|
|
||||||
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++) {
|
||||||
|
@ -644,7 +644,7 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
||||||
if (_FAIL == res) break;
|
if (_FAIL == res) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Efuse_PowerSwitch(padapter, bWrite, _FALSE);
|
Efuse_PowerSwitch(padapter, bWrite, false);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -652,15 +652,15 @@ u8 rtw_efuse_access(PADAPTER padapter, u8 bWrite, u16 start_addr, u16 cnts, u8 *
|
||||||
u16 efuse_GetMaxSize(PADAPTER padapter)
|
u16 efuse_GetMaxSize(PADAPTER padapter)
|
||||||
{
|
{
|
||||||
u16 max_size;
|
u16 max_size;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -669,16 +669,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;
|
||||||
}
|
}
|
||||||
|
@ -687,16 +687,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;
|
||||||
}
|
}
|
||||||
|
@ -710,7 +710,7 @@ u8 rtw_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_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;
|
||||||
|
@ -723,7 +723,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
ret = rtw_efuse_map_read(padapter, 0, mapLen, map);
|
ret = rtw_efuse_map_read(padapter, 0, mapLen, map);
|
||||||
if (ret == _FAIL) goto exit;
|
if (ret == _FAIL) goto exit;
|
||||||
|
|
||||||
Efuse_PowerSwitch(padapter, _TRUE, _TRUE);
|
Efuse_PowerSwitch(padapter, true, true);
|
||||||
|
|
||||||
offset = (addr >> 3);
|
offset = (addr >> 3);
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
|
@ -768,7 +768,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);
|
||||||
DBG_88E("offset=%x\n",offset);
|
DBG_88E("offset=%x\n",offset);
|
||||||
DBG_88E("word_en=%x\n",word_en);
|
DBG_88E("word_en=%x\n",word_en);
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
Efuse_PowerSwitch(padapter, _TRUE, _FALSE);
|
Efuse_PowerSwitch(padapter, true, false);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
|
@ -808,7 +808,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;
|
||||||
|
@ -821,7 +821,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
ret = rtw_BT_efuse_map_read(padapter, 0, mapLen, map);
|
ret = rtw_BT_efuse_map_read(padapter, 0, mapLen, map);
|
||||||
if (ret == _FAIL) goto exit;
|
if (ret == _FAIL) goto exit;
|
||||||
|
|
||||||
Efuse_PowerSwitch(padapter, _TRUE, _TRUE);
|
Efuse_PowerSwitch(padapter, true, true);
|
||||||
|
|
||||||
offset = (addr >> 3);
|
offset = (addr >> 3);
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
|
@ -876,7 +876,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
}
|
}
|
||||||
DBG_88E("\n");
|
DBG_88E("\n");
|
||||||
|
|
||||||
ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, _FALSE);
|
ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, false);
|
||||||
if (ret == _FAIL) break;
|
if (ret == _FAIL) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -889,7 +889,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
Efuse_PowerSwitch(padapter, _TRUE, _FALSE);
|
Efuse_PowerSwitch(padapter, true, false);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
|
@ -929,13 +929,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
|
@ -1092,7 +1092,7 @@ void EFUSE_ShadowMapUpdate(
|
||||||
|
|
||||||
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
|
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
|
||||||
|
|
||||||
if (pEEPROM->bautoload_fail_flag == _TRUE)
|
if (pEEPROM->bautoload_fail_flag == true)
|
||||||
{
|
{
|
||||||
_rtw_memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
|
_rtw_memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
|
||||||
}
|
}
|
||||||
|
@ -1228,7 +1228,7 @@ Efuse_InitSomeVar(
|
||||||
|
|
||||||
int isAdaptorInfoFileValid(void)
|
int isAdaptorInfoFileValid(void)
|
||||||
{
|
{
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int storeAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv)
|
int storeAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv)
|
||||||
|
|
|
@ -88,11 +88,11 @@ uint rtw_is_cckrates_included(u8 *rate)
|
||||||
{
|
{
|
||||||
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)
|
||||||
|
@ -105,12 +105,12 @@ uint rtw_is_cckratesonly_included(u8 *rate)
|
||||||
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,16 +118,16 @@ 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;
|
||||||
|
@ -285,7 +285,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];
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ _func_enter_;
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
//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:
|
||||||
}
|
}
|
||||||
|
@ -512,7 +512,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -561,15 +561,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;
|
||||||
|
@ -577,15 +577,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;
|
||||||
|
@ -606,7 +606,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;
|
||||||
}
|
}
|
||||||
|
@ -771,8 +771,8 @@ _func_enter_;
|
||||||
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);
|
||||||
|
@ -818,7 +818,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
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))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_get_wpa_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_get_wpa_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||||
|
|
||||||
|
@ -870,18 +870,18 @@ _func_exit_;
|
||||||
|
|
||||||
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) return match;
|
if (ie_ptr == NULL) return match;
|
||||||
|
|
||||||
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))
|
||||||
{
|
{
|
||||||
//DBG_88E("==> found WPS_IE.....\n");
|
//DBG_88E("==> found WPS_IE.....\n");
|
||||||
*wps_ielen = ie_ptr[1]+2;
|
*wps_ielen = ie_ptr[1]+2;
|
||||||
match=_TRUE;
|
match=true;
|
||||||
}
|
}
|
||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
|
@ -913,7 +913,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
||||||
{
|
{
|
||||||
eid = in_ie[cnt];
|
eid = in_ie[cnt];
|
||||||
|
|
||||||
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], wps_oui, 4)==_TRUE))
|
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], wps_oui, 4)==true))
|
||||||
{
|
{
|
||||||
wpsie_ptr = &in_ie[cnt];
|
wpsie_ptr = &in_ie[cnt];
|
||||||
|
|
||||||
|
@ -957,7 +957,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_att
|
||||||
*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;
|
||||||
}
|
}
|
||||||
|
@ -1423,7 +1423,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], p2p_oui, 4) == _TRUE ) )
|
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], p2p_oui, 4) == true ) )
|
||||||
{
|
{
|
||||||
p2p_ie_ptr = in_ie + cnt;
|
p2p_ie_ptr = in_ie + cnt;
|
||||||
|
|
||||||
|
@ -1472,7 +1472,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr
|
||||||
*len_attr = 0;
|
*len_attr = 0;
|
||||||
|
|
||||||
if ( !p2p_ie || ( p2p_ie[0] != _VENDOR_SPECIFIC_IE_ ) ||
|
if ( !p2p_ie || ( p2p_ie[0] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||||
( _rtw_memcmp( p2p_ie + 2, p2p_oui , 4 ) != _TRUE ) )
|
( _rtw_memcmp( p2p_ie + 2, p2p_oui , 4 ) != true ) )
|
||||||
{
|
{
|
||||||
return attr_ptr;
|
return attr_ptr;
|
||||||
}
|
}
|
||||||
|
@ -1622,7 +1622,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
||||||
u8 eid, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
u8 eid, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||||
|
|
||||||
|
|
||||||
match=_FALSE;
|
match=false;
|
||||||
|
|
||||||
if ( in_len < 0 )
|
if ( in_len < 0 )
|
||||||
{
|
{
|
||||||
|
@ -1633,7 +1633,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
||||||
{
|
{
|
||||||
eid = in_ie[cnt];
|
eid = in_ie[cnt];
|
||||||
|
|
||||||
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], wfd_oui, 4) == _TRUE ) )
|
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], wfd_oui, 4) == true ) )
|
||||||
{
|
{
|
||||||
if ( wfd_ie != NULL )
|
if ( wfd_ie != NULL )
|
||||||
{
|
{
|
||||||
|
@ -1655,7 +1655,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
||||||
|
|
||||||
cnt += in_ie[ cnt + 1 ] + 2;
|
cnt += in_ie[ cnt + 1 ] + 2;
|
||||||
|
|
||||||
match = _TRUE;
|
match = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1665,7 +1665,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( match == _TRUE )
|
if ( match == true )
|
||||||
{
|
{
|
||||||
match = cnt;
|
match = cnt;
|
||||||
}
|
}
|
||||||
|
@ -1683,10 +1683,10 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
|
||||||
u8 attr_id, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
u8 attr_id, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||||
|
|
||||||
|
|
||||||
match=_FALSE;
|
match=false;
|
||||||
|
|
||||||
if ( ( wfd_ie[ 0 ] != _VENDOR_SPECIFIC_IE_ ) ||
|
if ( ( wfd_ie[ 0 ] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||||
( _rtw_memcmp( wfd_ie + 2, wfd_oui , 4 ) != _TRUE ) )
|
( _rtw_memcmp( wfd_ie + 2, wfd_oui , 4 ) != true ) )
|
||||||
{
|
{
|
||||||
return( match );
|
return( match );
|
||||||
}
|
}
|
||||||
|
@ -1709,7 +1709,7 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
|
||||||
|
|
||||||
cnt += attrlen + 3;
|
cnt += attrlen + 3;
|
||||||
|
|
||||||
match = _TRUE;
|
match = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1947,7 +1947,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category, u8 *act
|
||||||
!= (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];
|
||||||
|
@ -1964,7 +1964,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[] = {
|
||||||
|
|
|
@ -251,7 +251,7 @@ void _rtw_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if ( (adapter->bDriverStopped ==_TRUE) || (adapter->bSurpriseRemoved == _TRUE))
|
if ( (adapter->bDriverStopped ==true) || (adapter->bSurpriseRemoved == true))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
||||||
return;
|
return;
|
||||||
|
@ -291,7 +291,7 @@ void _rtw_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if ( (adapter->bDriverStopped ==_TRUE) || (adapter->bSurpriseRemoved == _TRUE))
|
if ( (adapter->bDriverStopped ==true) || (adapter->bSurpriseRemoved == true))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
||||||
return;
|
return;
|
||||||
|
@ -403,10 +403,10 @@ bool match_read_sniff_ranges(u16 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(u16 addr, u16 len)
|
bool match_write_sniff_ranges(u16 addr, u16 len)
|
||||||
|
@ -414,10 +414,10 @@ bool match_write_sniff_ranges(u16 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
|
|
|
@ -71,13 +71,13 @@ query_802_11_capability(
|
||||||
{
|
{
|
||||||
_rtw_memcpy( pucAuthEncryptionSupported, (u8*)szAuthEnc, sizeof (szAuthEnc) );
|
_rtw_memcpy( pucAuthEncryptionSupported, (u8*)szAuthEnc, sizeof (szAuthEnc) );
|
||||||
*pulOutLen = pCap->Length;
|
*pulOutLen = pCap->Length;
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*pulOutLen = 0;
|
*pulOutLen = 0;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("_query_802_11_capability(): szAuthEnc size is too large.\n"));
|
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("_query_802_11_capability(): szAuthEnc size is too large.\n"));
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
||||||
|
|
||||||
pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
||||||
|
|
||||||
if (check_fwstate( pmlmepriv, _FW_UNDER_LINKING|_FW_LINKED)==_TRUE)
|
if (check_fwstate( pmlmepriv, _FW_UNDER_LINKING|_FW_LINKED)==true)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (psecuritypriv->ndisauthtype>=Ndis802_11AuthModeWPA2)
|
if (psecuritypriv->ndisauthtype>=Ndis802_11AuthModeWPA2)
|
||||||
|
@ -155,7 +155,7 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
||||||
// Association Response related information
|
// Association Response related information
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
|
||||||
if (check_fwstate( pmlmepriv, _FW_LINKED)==_TRUE)
|
if (check_fwstate( pmlmepriv, _FW_LINKED)==true)
|
||||||
{
|
{
|
||||||
tgt_network =&(pmlmepriv->cur_network);
|
tgt_network =&(pmlmepriv->cur_network);
|
||||||
if (tgt_network!=NULL){
|
if (tgt_network!=NULL){
|
||||||
|
@ -190,6 +190,6 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
||||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n exit query_802_11_association_information\n"));
|
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n exit query_802_11_association_information\n"));
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -44,19 +44,19 @@ extern void indicate_wx_scan_complete_event(_adapter *padapter);
|
||||||
( \
|
( \
|
||||||
( (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_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;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if (ssid->SsidLength > 32) {
|
if (ssid->SsidLength > 32) {
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid length >32\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid length >32\n"));
|
||||||
ret= _FALSE;
|
ret= false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ _func_enter_;
|
||||||
//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) )){
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid has nonprintabl ascii\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid has nonprintabl ascii\n"));
|
||||||
ret= _FALSE;
|
ret= false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,9 +101,9 @@ _func_enter_;
|
||||||
|
|
||||||
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);
|
||||||
|
@ -111,7 +111,7 @@ _func_enter_;
|
||||||
//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
|
||||||
#ifdef CONFIG_LAYER2_ROAMING
|
#ifdef CONFIG_LAYER2_ROAMING
|
||||||
|| pmlmepriv->to_roaming >0
|
|| pmlmepriv->to_roaming >0
|
||||||
#endif
|
#endif
|
||||||
|
@ -120,13 +120,13 @@ _func_enter_;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_do_join(): site survey if scanned_queue is empty\n."));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_do_join(): site survey if scanned_queue is empty\n."));
|
||||||
// submit site_survey_cmd
|
// submit site_survey_cmd
|
||||||
if (_SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ) {
|
if (_SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ) {
|
||||||
pmlmepriv->to_join = _FALSE;
|
pmlmepriv->to_join = false;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_do_join(): site survey return error\n."));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_do_join(): site survey return error\n."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pmlmepriv->to_join = _FALSE;
|
pmlmepriv->to_join = false;
|
||||||
ret = _FAIL;
|
ret = _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,12 +138,12 @@ _func_enter_;
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
if ((select_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv))==_SUCCESS)
|
if ((select_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv))==_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
|
||||||
|
|
||||||
|
@ -164,11 +164,11 @@ _func_enter_;
|
||||||
if (rtw_createbss_cmd(padapter)!=_SUCCESS)
|
if (rtw_createbss_cmd(padapter)!=_SUCCESS)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("***Error=>do_goin: rtw_createbss_cmd status FAIL***\n "));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("***Error=>do_goin: rtw_createbss_cmd status FAIL***\n "));
|
||||||
ret = _FALSE;
|
ret = false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
pmlmepriv->to_join = _FALSE;
|
pmlmepriv->to_join = false;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("***Error=> rtw_select_and_join_from_scanned_queue FAIL under STA_Mode***\n "));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("***Error=> rtw_select_and_join_from_scanned_queue FAIL under STA_Mode***\n "));
|
||||||
|
|
||||||
|
@ -180,21 +180,21 @@ _func_enter_;
|
||||||
|
|
||||||
//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
|
||||||
#ifdef CONFIG_LAYER2_ROAMING
|
#ifdef CONFIG_LAYER2_ROAMING
|
||||||
|| pmlmepriv->to_roaming >0
|
|| pmlmepriv->to_roaming >0
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( _SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ){
|
if ( _SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ){
|
||||||
pmlmepriv->to_join = _FALSE;
|
pmlmepriv->to_join = false;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("do_join(): site survey return error\n."));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("do_join(): site survey return error\n."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret = _FAIL;
|
ret = _FAIL;
|
||||||
pmlmepriv->to_join = _FALSE;
|
pmlmepriv->to_join = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,12 +265,12 @@ _func_enter_;
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 set_802_11_test(_adapter* padapter, NDIS_802_11_TEST *test)
|
u8 set_802_11_test(_adapter* padapter, NDIS_802_11_TEST *test)
|
||||||
{
|
{
|
||||||
u8 ret=_TRUE;
|
u8 ret=true;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ _func_enter_;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret=_FALSE;
|
ret=false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,33 +328,33 @@ _func_enter_;
|
||||||
|
|
||||||
|
|
||||||
DBG_88E("Set BSSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
DBG_88E("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)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_bssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_bssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
|
||||||
|
|
||||||
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 {
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("Set BSSID not the same bssid\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("Set BSSID not the same bssid\n"));
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_bssid="MAC_FMT"\n", MAC_ARG(bssid) ));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_bssid="MAC_FMT"\n", MAC_ARG(bssid) ));
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("cur_bssid="MAC_FMT"\n", MAC_ARG(pmlmepriv->cur_network.network.MacAddress) ));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("cur_bssid="MAC_FMT"\n", MAC_ARG(pmlmepriv->cur_network.network.MacAddress) ));
|
||||||
|
|
||||||
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);
|
rtw_indicate_disconnect(padapter);
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -365,12 +365,12 @@ handle_tkip_countermeasure:
|
||||||
//should we add something here...?
|
//should we add something here...?
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
if (padapter->securitypriv.btkip_countermeasure == _TRUE) {
|
if (padapter->securitypriv.btkip_countermeasure == true) {
|
||||||
cur_time = rtw_get_current_time();
|
cur_time = rtw_get_current_time();
|
||||||
|
|
||||||
if ( (cur_time - padapter->securitypriv.btkip_countermeasure_time) > 60 * HZ )
|
if ( (cur_time - padapter->securitypriv.btkip_countermeasure_time) > 60 * HZ )
|
||||||
{
|
{
|
||||||
padapter->securitypriv.btkip_countermeasure = _FALSE;
|
padapter->securitypriv.btkip_countermeasure = false;
|
||||||
padapter->securitypriv.btkip_countermeasure_time = 0;
|
padapter->securitypriv.btkip_countermeasure_time = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -382,10 +382,10 @@ handle_tkip_countermeasure:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_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);
|
||||||
|
@ -417,9 +417,9 @@ _func_enter_;
|
||||||
DBG_88E_LEVEL(_drv_info_, "set ssid [%s] fw_state=0x%08x\n",
|
DBG_88E_LEVEL(_drv_info_, "set ssid [%s] fw_state=0x%08x\n",
|
||||||
ssid->Ssid, get_fwstate(pmlmepriv));
|
ssid->Ssid, get_fwstate(pmlmepriv));
|
||||||
|
|
||||||
if (padapter->hw_init_completed==_FALSE){
|
if (padapter->hw_init_completed==false){
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||||
("set_ssid: hw_init_completed==_FALSE=>exit!!!\n"));
|
("set_ssid: hw_init_completed==false=>exit!!!\n"));
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -427,37 +427,37 @@ _func_enter_;
|
||||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
|
|
||||||
DBG_88E("Set SSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
DBG_88E("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)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
|
||||||
("set_ssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
|
("set_ssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
|
||||||
|
|
||||||
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))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||||
("Set SSID is the same ssid, fw_state=0x%08x\n",
|
("Set SSID is the same ssid, fw_state=0x%08x\n",
|
||||||
get_fwstate(pmlmepriv)));
|
get_fwstate(pmlmepriv)));
|
||||||
|
|
||||||
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);
|
rtw_indicate_disconnect(padapter);
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -479,14 +479,14 @@ _func_enter_;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_ssid=[%s] len=0x%x\n", ssid->Ssid, (unsigned int)ssid->SsidLength));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_ssid=[%s] len=0x%x\n", ssid->Ssid, (unsigned int)ssid->SsidLength));
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("assoc_ssid=[%s] len=0x%x\n", pmlmepriv->assoc_ssid.Ssid, (unsigned int)pmlmepriv->assoc_ssid.SsidLength));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("assoc_ssid=[%s] len=0x%x\n", pmlmepriv->assoc_ssid.Ssid, (unsigned int)pmlmepriv->assoc_ssid.SsidLength));
|
||||||
|
|
||||||
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);
|
rtw_indicate_disconnect(padapter);
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -495,11 +495,11 @@ _func_enter_;
|
||||||
|
|
||||||
handle_tkip_countermeasure:
|
handle_tkip_countermeasure:
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
if (padapter->securitypriv.btkip_countermeasure==_TRUE)
|
if (padapter->securitypriv.btkip_countermeasure==true)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER sys_time;
|
LARGE_INTEGER sys_time;
|
||||||
u32 diff_time,cur_time ;
|
u32 diff_time,cur_time ;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:padapter->securitypriv.btkip_countermeasure==_TRUE\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:padapter->securitypriv.btkip_countermeasure==true\n"));
|
||||||
NdisGetCurrentSystemTime(&sys_time);
|
NdisGetCurrentSystemTime(&sys_time);
|
||||||
cur_time=(u32)(sys_time.QuadPart/10); // In micro-second.
|
cur_time=(u32)(sys_time.QuadPart/10); // In micro-second.
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:cur_time=0x%x\n",cur_time));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:cur_time=0x%x\n",cur_time));
|
||||||
|
@ -509,7 +509,7 @@ handle_tkip_countermeasure:
|
||||||
|
|
||||||
if (diff_time > 60000000) {
|
if (diff_time > 60000000) {
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid(): countermeasure time >60s.\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid(): countermeasure time >60s.\n"));
|
||||||
padapter->securitypriv.btkip_countermeasure=_FALSE;
|
padapter->securitypriv.btkip_countermeasure=false;
|
||||||
// Update MIC error time.
|
// Update MIC error time.
|
||||||
padapter->securitypriv.btkip_countermeasure_time=0;
|
padapter->securitypriv.btkip_countermeasure_time=0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -522,12 +522,12 @@ handle_tkip_countermeasure:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
if (padapter->securitypriv.btkip_countermeasure == _TRUE) {
|
if (padapter->securitypriv.btkip_countermeasure == true) {
|
||||||
cur_time = rtw_get_current_time();
|
cur_time = rtw_get_current_time();
|
||||||
|
|
||||||
if ( (cur_time - padapter->securitypriv.btkip_countermeasure_time) > 60 * HZ )
|
if ( (cur_time - padapter->securitypriv.btkip_countermeasure_time) > 60 * HZ )
|
||||||
{
|
{
|
||||||
padapter->securitypriv.btkip_countermeasure = _FALSE;
|
padapter->securitypriv.btkip_countermeasure = false;
|
||||||
padapter->securitypriv.btkip_countermeasure_time = 0;
|
padapter->securitypriv.btkip_countermeasure_time = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -539,17 +539,17 @@ handle_tkip_countermeasure:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_VALIDATE_SSID
|
#ifdef CONFIG_VALIDATE_SSID
|
||||||
if (rtw_validate_ssid(ssid) == _FALSE) {
|
if (rtw_validate_ssid(ssid) == false) {
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
goto release_mlme_lock;
|
goto release_mlme_lock;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_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);
|
||||||
|
@ -599,16 +599,16 @@ _func_enter_;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
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); //will clr Linked_state; before this function, we must have chked whether issue dis-assoc_cmd or not
|
rtw_indicate_disconnect(padapter); //will clr Linked_state; before this function, we must have chked whether issue dis-assoc_cmd or not
|
||||||
}
|
}
|
||||||
|
@ -652,7 +652,7 @@ _func_enter_;
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -665,11 +665,11 @@ _func_enter_;
|
||||||
|
|
||||||
_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)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_disassociate: rtw_indicate_disconnect\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_disassociate: rtw_indicate_disconnect\n"));
|
||||||
|
|
||||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
rtw_disassoc_cmd(padapter, 0, true);
|
||||||
rtw_indicate_disconnect(padapter);
|
rtw_indicate_disconnect(padapter);
|
||||||
rtw_free_assoc_resources(padapter, 1);
|
rtw_free_assoc_resources(padapter, 1);
|
||||||
rtw_pwr_wakeup(padapter);
|
rtw_pwr_wakeup(padapter);
|
||||||
|
@ -679,40 +679,40 @@ _func_enter_;
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, NDIS_802_11_SSID *pssid, int ssid_max_num)
|
u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, NDIS_802_11_SSID *pssid, int ssid_max_num)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||||
u8 res=_TRUE;
|
u8 res=true;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("+rtw_set_802_11_bssid_list_scan(), fw_state=%x\n", get_fwstate(pmlmepriv)));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("+rtw_set_802_11_bssid_list_scan(), fw_state=%x\n", get_fwstate(pmlmepriv)));
|
||||||
|
|
||||||
if (padapter == NULL) {
|
if (padapter == NULL) {
|
||||||
res=_FALSE;
|
res=false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (padapter->hw_init_completed==_FALSE){
|
if (padapter->hw_init_completed==false){
|
||||||
res = _FALSE;
|
res = false;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n===rtw_set_802_11_bssid_list_scan:hw_init_completed==_FALSE===\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n===rtw_set_802_11_bssid_list_scan:hw_init_completed==false===\n"));
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE) ||
|
if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) ||
|
||||||
(pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE))
|
(pmlmepriv->LinkDetectInfo.bBusyTraffic == true))
|
||||||
{
|
{
|
||||||
// Scan or linking is in progress, do nothing.
|
// Scan or linking is in progress, do nothing.
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_bssid_list_scan fail since fw_state = %x\n", get_fwstate(pmlmepriv)));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_bssid_list_scan fail since fw_state = %x\n", get_fwstate(pmlmepriv)));
|
||||||
res = _TRUE;
|
res = true;
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))== _TRUE){
|
if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))== true){
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
|
||||||
} else {
|
} else {
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###pmlmepriv->sitesurveyctrl.traffic_busy==_TRUE\n\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###pmlmepriv->sitesurveyctrl.traffic_busy==true\n\n"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rtw_is_scan_deny(padapter)) {
|
if (rtw_is_scan_deny(padapter)) {
|
||||||
|
@ -759,9 +759,9 @@ _func_enter_;
|
||||||
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;
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
|
@ -778,14 +778,14 @@ u8 rtw_set_802_11_add_wep(_adapter* padapter, NDIS_802_11_WEP *wep){
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MgntActrtw_set_802_11_add_wep:keyid>4=>fail\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MgntActrtw_set_802_11_add_wep:keyid>4=>fail\n"));
|
||||||
ret=_FALSE;
|
ret=false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -823,7 +823,7 @@ _func_enter_;
|
||||||
res=rtw_set_key(padapter,psecuritypriv, keyid, 1);
|
res=rtw_set_key(padapter,psecuritypriv, keyid, 1);
|
||||||
|
|
||||||
if (res==_FAIL)
|
if (res==_FAIL)
|
||||||
ret= _FALSE;
|
ret= false;
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
@ -840,7 +840,7 @@ _func_enter_;
|
||||||
|
|
||||||
if (keyindex >= 0x80000000 || padapter == NULL){
|
if (keyindex >= 0x80000000 || padapter == NULL){
|
||||||
|
|
||||||
ret=_FALSE;
|
ret=false;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -880,8 +880,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;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -933,10 +933,10 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check BSSID
|
// check BSSID
|
||||||
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == _TRUE){
|
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true){
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MacAddr_isBcst(key->BSSID)\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MacAddr_isBcst(key->BSSID)\n"));
|
||||||
ret= _FALSE;
|
ret= false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,7 +967,7 @@ _func_enter_;
|
||||||
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.
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
|
||||||
|
@ -1017,7 +1017,7 @@ _func_enter_;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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)) {
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" IBSS but BSSID is not Broadcast Address.\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" IBSS but BSSID is not Broadcast Address.\n"));
|
||||||
ret= _FAIL;
|
ret= _FAIL;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -1046,15 +1046,15 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n") );
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n") );
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("[Group Key set]\n") );
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("[Group Key set]\n") );
|
||||||
|
@ -1097,7 +1097,7 @@ _func_enter_;
|
||||||
if (key->KeyIndex & 0x20000000){
|
if (key->KeyIndex & 0x20000000){
|
||||||
// SetRSC
|
// SetRSC
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
|
||||||
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);
|
||||||
|
@ -1112,11 +1112,11 @@ _func_enter_;
|
||||||
|
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
@ -1162,9 +1162,9 @@ _func_enter_;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("reset group key"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("reset group key"));
|
||||||
|
|
||||||
|
@ -1191,7 +1191,7 @@ _func_enter_;
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
@ -1218,15 +1218,15 @@ _func_enter_;
|
||||||
//Set key to CAM through H2C command
|
//Set key to CAM through H2C command
|
||||||
if (bgrouptkey)//never go to here
|
if (bgrouptkey)//never go to here
|
||||||
{
|
{
|
||||||
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, _FALSE);
|
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, false);
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(group)\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(group)\n"));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, _TRUE);
|
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, true);
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(unicast)\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(unicast)\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res ==_FALSE)
|
if (res ==false)
|
||||||
ret= _FAIL;
|
ret= _FAIL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1245,7 +1245,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;
|
||||||
|
|
||||||
|
@ -1256,7 +1256,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
@ -1289,7 +1289,7 @@ exit:
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1320,13 +1320,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;
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
|
|
|
@ -99,27 +99,27 @@ 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;
|
||||||
|
|
||||||
#ifdef CONFIG_USB_HCI
|
#ifdef CONFIG_USB_HCI
|
||||||
if ((2 == adapter->registrypriv.fw_iol) && (!adapter_to_dvobj(adapter)->ishighspeed))
|
if ((2 == adapter->registrypriv.fw_iol) && (!adapter_to_dvobj(adapter)->ishighspeed))
|
||||||
return _TRUE;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
bool rtw_IOL_applied(ADAPTER *adapter)
|
bool rtw_IOL_applied(ADAPTER *adapter)
|
||||||
{
|
{
|
||||||
if (adapter->registrypriv.fw_iol)
|
if (adapter->registrypriv.fw_iol)
|
||||||
return _TRUE;
|
return true;
|
||||||
|
|
||||||
#ifdef CONFIG_USB_HCI
|
#ifdef CONFIG_USB_HCI
|
||||||
if (!adapter_to_dvobj(adapter)->ishighspeed)
|
if (!adapter_to_dvobj(adapter)->ishighspeed)
|
||||||
return _TRUE;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -250,14 +250,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 );
|
||||||
|
|
||||||
//printk("==> %s, pktlen(%d)\n",__func__,pxmit_frame->attrib.pktlen);
|
//printk("==> %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;
|
||||||
}
|
}
|
||||||
|
|
468
core/rtw_led.c
468
core/rtw_led.c
File diff suppressed because it is too large
Load diff
282
core/rtw_mlme.c
282
core/rtw_mlme.c
|
@ -200,7 +200,7 @@ _func_enter_;
|
||||||
|
|
||||||
_enter_critical_bh(&queue->lock, &irqL);
|
_enter_critical_bh(&queue->lock, &irqL);
|
||||||
|
|
||||||
if (_rtw_queue_empty(queue) == _TRUE)
|
if (_rtw_queue_empty(queue) == true)
|
||||||
|
|
||||||
pnetwork = NULL;
|
pnetwork = NULL;
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ _func_enter_;
|
||||||
|
|
||||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||||
|
|
||||||
if (_rtw_queue_empty(free_queue) == _TRUE) {
|
if (_rtw_queue_empty(free_queue) == true) {
|
||||||
pnetwork=NULL;
|
pnetwork=NULL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ _func_enter_;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("_rtw_alloc_network: ptr=%p\n", plist));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("_rtw_alloc_network: ptr=%p\n", plist));
|
||||||
pnetwork->network_type = 0;
|
pnetwork->network_type = 0;
|
||||||
pnetwork->fixed = _FALSE;
|
pnetwork->fixed = false;
|
||||||
pnetwork->last_scanned = rtw_get_current_time();
|
pnetwork->last_scanned = rtw_get_current_time();
|
||||||
pnetwork->aid=0;
|
pnetwork->aid=0;
|
||||||
pnetwork->join_res=0;
|
pnetwork->join_res=0;
|
||||||
|
@ -268,13 +268,13 @@ _func_enter_;
|
||||||
if (pnetwork == NULL)
|
if (pnetwork == NULL)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if (pnetwork->fixed == _TRUE)
|
if (pnetwork->fixed == true)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
curr_time = rtw_get_current_time();
|
curr_time = rtw_get_current_time();
|
||||||
|
|
||||||
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 ) )
|
||||||
lifetime = 1;
|
lifetime = 1;
|
||||||
|
|
||||||
if (!isfreeall)
|
if (!isfreeall)
|
||||||
|
@ -342,7 +342,7 @@ _func_enter_;
|
||||||
if (pnetwork == NULL)
|
if (pnetwork == NULL)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if (pnetwork->fixed == _TRUE)
|
if (pnetwork->fixed == true)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
//_enter_critical(&free_queue->lock, &irqL);
|
//_enter_critical(&free_queue->lock, &irqL);
|
||||||
|
@ -391,7 +391,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network ,list);
|
pnetwork = LIST_CONTAINOR(plist, struct wlan_network ,list);
|
||||||
|
|
||||||
if (_rtw_memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN) == _TRUE)
|
if (_rtw_memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN) == true)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
|
@ -427,7 +427,7 @@ _func_enter_;
|
||||||
phead = get_list_head(scanned_queue);
|
phead = get_list_head(scanned_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)
|
||||||
{
|
{
|
||||||
|
|
||||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||||
|
@ -453,12 +453,12 @@ sint rtw_if_up(_adapter *padapter) {
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if ( padapter->bDriverStopped || padapter->bSurpriseRemoved ||
|
if ( padapter->bDriverStopped || padapter->bSurpriseRemoved ||
|
||||||
(check_fwstate(&padapter->mlmepriv, _FW_LINKED)== _FALSE)){
|
(check_fwstate(&padapter->mlmepriv, _FW_LINKED)== false)){
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_if_up:bDriverStopped(%d) OR bSurpriseRemoved(%d)", padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_if_up:bDriverStopped(%d) OR bSurpriseRemoved(%d)", padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
||||||
res=_FALSE;
|
res=false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
res= _TRUE;
|
res= true;
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
return res;
|
return res;
|
||||||
|
@ -597,22 +597,22 @@ struct wlan_network *rtw_find_network(_queue *scanned_queue, u8 *addr)
|
||||||
|
|
||||||
int rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork)
|
int rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork)
|
||||||
{
|
{
|
||||||
int ret=_TRUE;
|
int ret=true;
|
||||||
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
||||||
|
|
||||||
if ( (psecuritypriv->dot11PrivacyAlgrthm != _NO_PRIVACY_ ) &&
|
if ( (psecuritypriv->dot11PrivacyAlgrthm != _NO_PRIVACY_ ) &&
|
||||||
( pnetwork->network.Privacy == 0 ) )
|
( pnetwork->network.Privacy == 0 ) )
|
||||||
{
|
{
|
||||||
ret=_FALSE;
|
ret=false;
|
||||||
}
|
}
|
||||||
else if ((psecuritypriv->dot11PrivacyAlgrthm == _NO_PRIVACY_ ) &&
|
else if ((psecuritypriv->dot11PrivacyAlgrthm == _NO_PRIVACY_ ) &&
|
||||||
( pnetwork->network.Privacy == 1 ) )
|
( pnetwork->network.Privacy == 1 ) )
|
||||||
{
|
{
|
||||||
ret=_FALSE;
|
ret=false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret=_TRUE;
|
ret=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -625,7 +625,7 @@ inline int is_same_ess(WLAN_BSSID_EX *a, WLAN_BSSID_EX *b)
|
||||||
//RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("(%s,%d)(%s,%d)\n",
|
//RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("(%s,%d)(%s,%d)\n",
|
||||||
// a->Ssid.Ssid,a->Ssid.SsidLength,b->Ssid.Ssid,b->Ssid.SsidLength));
|
// a->Ssid.Ssid,a->Ssid.SsidLength,b->Ssid.Ssid,b->Ssid.SsidLength));
|
||||||
return (a->Ssid.SsidLength == b->Ssid.SsidLength)
|
return (a->Ssid.SsidLength == b->Ssid.SsidLength)
|
||||||
&& _rtw_memcmp(a->Ssid.Ssid, b->Ssid.Ssid, a->Ssid.SsidLength)==_TRUE;
|
&& _rtw_memcmp(a->Ssid.Ssid, b->Ssid.Ssid, a->Ssid.SsidLength)==true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst)
|
int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst)
|
||||||
|
@ -644,7 +644,7 @@ _func_enter_;
|
||||||
|
|
||||||
KeBugCheckEx(0x87110000, (ULONG_PTR)dst, (ULONG_PTR)src,(ULONG_PTR)&s_cap, (ULONG_PTR)&d_cap);
|
KeBugCheckEx(0x87110000, (ULONG_PTR)dst, (ULONG_PTR)src,(ULONG_PTR)&s_cap, (ULONG_PTR)&d_cap);
|
||||||
|
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -660,8 +660,8 @@ _func_exit_;
|
||||||
|
|
||||||
return ((src->Ssid.SsidLength == dst->Ssid.SsidLength) &&
|
return ((src->Ssid.SsidLength == dst->Ssid.SsidLength) &&
|
||||||
// (src->Configuration.DSConfig == dst->Configuration.DSConfig) &&
|
// (src->Configuration.DSConfig == dst->Configuration.DSConfig) &&
|
||||||
( (_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN)) == _TRUE) &&
|
( (_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN)) == true) &&
|
||||||
( (_rtw_memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength)) == _TRUE) &&
|
( (_rtw_memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength)) == true) &&
|
||||||
((s_cap & WLAN_CAPABILITY_IBSS) ==
|
((s_cap & WLAN_CAPABILITY_IBSS) ==
|
||||||
(d_cap & WLAN_CAPABILITY_IBSS)) &&
|
(d_cap & WLAN_CAPABILITY_IBSS)) &&
|
||||||
((s_cap & WLAN_CAPABILITY_BSS) ==
|
((s_cap & WLAN_CAPABILITY_BSS) ==
|
||||||
|
@ -684,12 +684,12 @@ _func_enter_;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (rtw_end_of_queue_search(phead,plist)== _TRUE)
|
if (rtw_end_of_queue_search(phead,plist)== true)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
pwlan= LIST_CONTAINOR(plist, struct wlan_network, list);
|
pwlan= LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||||
|
|
||||||
if (pwlan->fixed!=_TRUE)
|
if (pwlan->fixed!=true)
|
||||||
{
|
{
|
||||||
if (oldest == NULL ||time_after(oldest->last_scanned, pwlan->last_scanned))
|
if (oldest == NULL ||time_after(oldest->last_scanned, pwlan->last_scanned))
|
||||||
oldest = pwlan;
|
oldest = pwlan;
|
||||||
|
@ -790,9 +790,9 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork)))
|
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork)))
|
||||||
{
|
{
|
||||||
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, _TRUE);
|
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, true);
|
||||||
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof (NDIS_802_11_FIXED_IEs),
|
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof (NDIS_802_11_FIXED_IEs),
|
||||||
pmlmepriv->cur_network.network.IELength);
|
pmlmepriv->cur_network.network.IELength);
|
||||||
}
|
}
|
||||||
|
@ -820,7 +820,7 @@ _func_enter_;
|
||||||
|
|
||||||
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);
|
||||||
|
@ -846,9 +846,9 @@ _func_enter_;
|
||||||
|
|
||||||
/* If we didn't find a match, then get a new network slot to initialize
|
/* If we didn't find a match, then get a new network slot to initialize
|
||||||
* with this beacon's information */
|
* with this beacon's information */
|
||||||
if (rtw_end_of_queue_search(phead,plist)== _TRUE) {
|
if (rtw_end_of_queue_search(phead,plist)== true) {
|
||||||
|
|
||||||
if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == _TRUE) {
|
if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == true) {
|
||||||
/* If there are no more slots, expire the oldest */
|
/* If there are no more slots, expire the oldest */
|
||||||
//list_del_init(&oldest->list);
|
//list_del_init(&oldest->list);
|
||||||
pnetwork = oldest;
|
pnetwork = oldest;
|
||||||
|
@ -860,7 +860,7 @@ _func_enter_;
|
||||||
_rtw_memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
|
_rtw_memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
|
||||||
//pnetwork->last_scanned = rtw_get_current_time();
|
//pnetwork->last_scanned = rtw_get_current_time();
|
||||||
// variable initialize
|
// variable initialize
|
||||||
pnetwork->fixed = _FALSE;
|
pnetwork->fixed = false;
|
||||||
pnetwork->last_scanned = rtw_get_current_time();
|
pnetwork->last_scanned = rtw_get_current_time();
|
||||||
|
|
||||||
pnetwork->network_type = 0;
|
pnetwork->network_type = 0;
|
||||||
|
@ -904,13 +904,13 @@ _func_enter_;
|
||||||
* be already expired. In this case we do the same as we found a new
|
* be already expired. In this case we do the same as we found a new
|
||||||
* net and call the new_net handler
|
* net and call the new_net handler
|
||||||
*/
|
*/
|
||||||
bool update_ie = _TRUE;
|
bool update_ie = true;
|
||||||
|
|
||||||
pnetwork->last_scanned = rtw_get_current_time();
|
pnetwork->last_scanned = rtw_get_current_time();
|
||||||
|
|
||||||
//target.Reserved[0]==1, means that scaned network is a bcn frame.
|
//target.Reserved[0]==1, means that scaned network is a bcn frame.
|
||||||
if ((pnetwork->network.IELength>target->IELength) && (target->Reserved[0]==1))
|
if ((pnetwork->network.IELength>target->IELength) && (target->Reserved[0]==1))
|
||||||
update_ie = _FALSE;
|
update_ie = false;
|
||||||
|
|
||||||
update_network(&(pnetwork->network), target,adapter, update_ie);
|
update_network(&(pnetwork->network), target,adapter, update_ie);
|
||||||
}
|
}
|
||||||
|
@ -962,7 +962,7 @@ int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork)
|
||||||
//u8 wps_ie[512];
|
//u8 wps_ie[512];
|
||||||
uint wps_ielen;
|
uint wps_ielen;
|
||||||
|
|
||||||
int bselected = _TRUE;
|
int bselected = true;
|
||||||
|
|
||||||
desired_encmode = psecuritypriv->ndisencryptstatus;
|
desired_encmode = psecuritypriv->ndisencryptstatus;
|
||||||
privacy = pnetwork->network.Privacy;
|
privacy = pnetwork->network.Privacy;
|
||||||
|
@ -971,29 +971,29 @@ int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork)
|
||||||
{
|
{
|
||||||
if (rtw_get_wps_ie(pnetwork->network.IEs+_FIXED_IE_LENGTH_, pnetwork->network.IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen)!=NULL)
|
if (rtw_get_wps_ie(pnetwork->network.IEs+_FIXED_IE_LENGTH_, pnetwork->network.IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen)!=NULL)
|
||||||
{
|
{
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (adapter->registrypriv.wifi_spec == 1) //for correct flow of 8021X to do....
|
if (adapter->registrypriv.wifi_spec == 1) //for correct flow of 8021X to do....
|
||||||
{
|
{
|
||||||
if ((desired_encmode == Ndis802_11EncryptionDisabled) && (privacy != 0))
|
if ((desired_encmode == Ndis802_11EncryptionDisabled) && (privacy != 0))
|
||||||
bselected = _FALSE;
|
bselected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) {
|
if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) {
|
||||||
DBG_88E("desired_encmode: %d, privacy: %d\n", desired_encmode, privacy);
|
DBG_88E("desired_encmode: %d, privacy: %d\n", desired_encmode, privacy);
|
||||||
bselected = _FALSE;
|
bselected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)
|
||||||
{
|
{
|
||||||
if (pnetwork->network.InfrastructureMode != pmlmepriv->cur_network.network.InfrastructureMode)
|
if (pnetwork->network.InfrastructureMode != pmlmepriv->cur_network.network.InfrastructureMode)
|
||||||
bselected = _FALSE;
|
bselected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1054,7 +1054,7 @@ _func_enter_;
|
||||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
|
|
||||||
// update IBSS_network 's timestamp
|
// update IBSS_network 's timestamp
|
||||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == _TRUE)
|
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true)
|
||||||
{
|
{
|
||||||
//RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,"rtw_survey_event_callback : WIFI_ADHOC_MASTER_STATE\n\n");
|
//RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,"rtw_survey_event_callback : WIFI_ADHOC_MASTER_STATE\n\n");
|
||||||
if (_rtw_memcmp(&(pmlmepriv->cur_network.network.MacAddress), pnetwork->MacAddress, ETH_ALEN))
|
if (_rtw_memcmp(&(pmlmepriv->cur_network.network.MacAddress), pnetwork->MacAddress, ETH_ALEN))
|
||||||
|
@ -1076,7 +1076,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// lock pmlmepriv->lock when you accessing network_q
|
// lock pmlmepriv->lock when you accessing network_q
|
||||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == _FALSE)
|
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == false)
|
||||||
{
|
{
|
||||||
if ( pnetwork->Ssid.Ssid[0] == 0 )
|
if ( pnetwork->Ssid.Ssid[0] == 0 )
|
||||||
{
|
{
|
||||||
|
@ -1138,11 +1138,11 @@ _func_enter_;
|
||||||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pmlmepriv->to_join == _TRUE)
|
if (pmlmepriv->to_join == true)
|
||||||
{
|
{
|
||||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==_TRUE) )
|
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true) )
|
||||||
{
|
{
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED)==_FALSE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED)==false)
|
||||||
{
|
{
|
||||||
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
||||||
|
|
||||||
|
@ -1173,7 +1173,7 @@ _func_enter_;
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("Error=>rtw_createbss_cmd status FAIL\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("Error=>rtw_createbss_cmd status FAIL\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
pmlmepriv->to_join = _FALSE;
|
pmlmepriv->to_join = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1181,7 +1181,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
int s_ret;
|
int s_ret;
|
||||||
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
||||||
pmlmepriv->to_join = _FALSE;
|
pmlmepriv->to_join = false;
|
||||||
if (_SUCCESS == (s_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv)))
|
if (_SUCCESS == (s_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv)))
|
||||||
{
|
{
|
||||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
|
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
|
||||||
|
@ -1208,7 +1208,7 @@ _func_enter_;
|
||||||
rtw_free_assoc_resources(adapter, 1);
|
rtw_free_assoc_resources(adapter, 1);
|
||||||
rtw_indicate_disconnect(adapter);
|
rtw_indicate_disconnect(adapter);
|
||||||
} else {
|
} else {
|
||||||
pmlmepriv->to_join = _TRUE;
|
pmlmepriv->to_join = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1223,7 +1223,7 @@ _func_enter_;
|
||||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
|
|
||||||
#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(adapter, P2P_PS_SCAN_DONE, 0);
|
p2p_ps_wk_cmd(adapter, P2P_PS_SCAN_DONE, 0);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_P2P_PS
|
#endif // CONFIG_P2P_PS
|
||||||
|
@ -1363,7 +1363,7 @@ _func_enter_;
|
||||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||||
if (pwlan)
|
if (pwlan)
|
||||||
{
|
{
|
||||||
pwlan->fixed = _FALSE;
|
pwlan->fixed = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1398,7 +1398,7 @@ _func_enter_;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_indicate_connect\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_indicate_connect\n"));
|
||||||
|
|
||||||
pmlmepriv->to_join = _FALSE;
|
pmlmepriv->to_join = false;
|
||||||
|
|
||||||
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED))
|
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED))
|
||||||
{
|
{
|
||||||
|
@ -1499,7 +1499,7 @@ _func_enter_;
|
||||||
|
|
||||||
#ifdef CONFIG_LPS
|
#ifdef CONFIG_LPS
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
if (padapter->pwrctrlpriv.wowlan_mode==_FALSE)
|
if (padapter->pwrctrlpriv.wowlan_mode==false)
|
||||||
#endif //CONFIG_WOWLAN
|
#endif //CONFIG_WOWLAN
|
||||||
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 1);
|
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 1);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1520,7 +1520,7 @@ void rtw_scan_abort(_adapter *adapter)
|
||||||
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
||||||
|
|
||||||
start = rtw_get_current_time();
|
start = rtw_get_current_time();
|
||||||
pmlmeext->scan_abort = _TRUE;
|
pmlmeext->scan_abort = true;
|
||||||
while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)
|
while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)
|
||||||
&& rtw_get_passing_time_ms(start) <= 200) {
|
&& rtw_get_passing_time_ms(start) <= 200) {
|
||||||
|
|
||||||
|
@ -1539,9 +1539,9 @@ void rtw_scan_abort(_adapter *adapter)
|
||||||
set_survey_timer(pmlmeext, 0);
|
set_survey_timer(pmlmeext, 0);
|
||||||
_set_timer(&pmlmepriv->scan_to_timer, 50);
|
_set_timer(&pmlmepriv->scan_to_timer, 50);
|
||||||
#endif
|
#endif
|
||||||
rtw_indicate_scan_done(adapter, _TRUE);
|
rtw_indicate_scan_done(adapter, true);
|
||||||
}
|
}
|
||||||
pmlmeext->scan_abort = _FALSE;
|
pmlmeext->scan_abort = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wlan_network *pnetwork)
|
static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wlan_network *pnetwork)
|
||||||
|
@ -1572,16 +1572,16 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//sta mode
|
//sta mode
|
||||||
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,_TRUE);
|
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,true);
|
||||||
|
|
||||||
//security related
|
//security related
|
||||||
if (padapter->securitypriv.dot11AuthAlgrthm== dot11AuthAlgrthm_8021X)
|
if (padapter->securitypriv.dot11AuthAlgrthm== dot11AuthAlgrthm_8021X)
|
||||||
{
|
{
|
||||||
padapter->securitypriv.binstallGrpkey=_FALSE;
|
padapter->securitypriv.binstallGrpkey=false;
|
||||||
padapter->securitypriv.busetkipkey=_FALSE;
|
padapter->securitypriv.busetkipkey=false;
|
||||||
padapter->securitypriv.bgrpkey_handshake=_FALSE;
|
padapter->securitypriv.bgrpkey_handshake=false;
|
||||||
|
|
||||||
psta->ieee8021x_blocked=_TRUE;
|
psta->ieee8021x_blocked=true;
|
||||||
psta->dot118021XPrivacy=padapter->securitypriv.dot11PrivacyAlgrthm;
|
psta->dot118021XPrivacy=padapter->securitypriv.dot11PrivacyAlgrthm;
|
||||||
|
|
||||||
_rtw_memset((u8 *)&psta->dot118021x_UncstKey, 0, sizeof (union Keytype));
|
_rtw_memset((u8 *)&psta->dot118021x_UncstKey, 0, sizeof (union Keytype));
|
||||||
|
@ -1598,7 +1598,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
||||||
// And the Wi-Fi driver shouldn't allow the data packet to be tramsmitted.
|
// And the Wi-Fi driver shouldn't allow the data packet to be tramsmitted.
|
||||||
if ( padapter->securitypriv.wps_ie_len != 0 )
|
if ( padapter->securitypriv.wps_ie_len != 0 )
|
||||||
{
|
{
|
||||||
psta->ieee8021x_blocked=_TRUE;
|
psta->ieee8021x_blocked=true;
|
||||||
padapter->securitypriv.wps_ie_len = 0;
|
padapter->securitypriv.wps_ie_len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1610,7 +1610,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
||||||
{
|
{
|
||||||
//preorder_ctrl = &precvpriv->recvreorder_ctrl[i];
|
//preorder_ctrl = &precvpriv->recvreorder_ctrl[i];
|
||||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||||
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
|
||||||
DBG_88E("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __func__, __LINE__,
|
DBG_88E("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __func__, __LINE__,
|
||||||
|
@ -1628,7 +1628,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
||||||
{
|
{
|
||||||
//preorder_ctrl = &precvpriv->recvreorder_ctrl[i];
|
//preorder_ctrl = &precvpriv->recvreorder_ctrl[i];
|
||||||
preorder_ctrl = &bmc_sta->recvreorder_ctrl[i];
|
preorder_ctrl = &bmc_sta->recvreorder_ctrl[i];
|
||||||
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
|
||||||
DBG_88E("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __func__, __LINE__,
|
DBG_88E("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __func__, __LINE__,
|
||||||
|
@ -1740,7 +1740,7 @@ void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf)
|
||||||
struct wlan_network *pnetwork = (struct wlan_network *)pbuf;
|
struct wlan_network *pnetwork = (struct wlan_network *)pbuf;
|
||||||
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
||||||
struct wlan_network *pcur_wlan = NULL, *ptarget_wlan = NULL;
|
struct wlan_network *pcur_wlan = NULL, *ptarget_wlan = NULL;
|
||||||
unsigned int the_same_macaddr = _FALSE;
|
unsigned int the_same_macaddr = false;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -1801,14 +1801,14 @@ _func_enter_;
|
||||||
//s1. find ptarget_wlan
|
//s1. find ptarget_wlan
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) )
|
if (check_fwstate(pmlmepriv, _FW_LINKED) )
|
||||||
{
|
{
|
||||||
if (the_same_macaddr == _TRUE)
|
if (the_same_macaddr == true)
|
||||||
{
|
{
|
||||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pcur_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
pcur_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
||||||
if (pcur_wlan) pcur_wlan->fixed = _FALSE;
|
if (pcur_wlan) pcur_wlan->fixed = false;
|
||||||
|
|
||||||
pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
|
pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
|
||||||
if (pcur_sta){
|
if (pcur_sta){
|
||||||
|
@ -1818,8 +1818,8 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
|
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE){
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true){
|
||||||
if (ptarget_wlan) ptarget_wlan->fixed = _TRUE;
|
if (ptarget_wlan) ptarget_wlan->fixed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1827,8 +1827,8 @@ _func_enter_;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
|
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE){
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true){
|
||||||
if (ptarget_wlan) ptarget_wlan->fixed = _TRUE;
|
if (ptarget_wlan) ptarget_wlan->fixed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1846,7 +1846,7 @@ _func_enter_;
|
||||||
|
|
||||||
|
|
||||||
//s3. find ptarget_sta & update ptarget_sta after update cur_network only for station mode
|
//s3. find ptarget_sta & update ptarget_sta after update cur_network only for station mode
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||||
{
|
{
|
||||||
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
||||||
if (ptarget_sta==NULL)
|
if (ptarget_sta==NULL)
|
||||||
|
@ -1858,7 +1858,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//s4. indicate connect
|
//s4. indicate connect
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||||
{
|
{
|
||||||
rtw_indicate_connect(adapter);
|
rtw_indicate_connect(adapter);
|
||||||
}
|
}
|
||||||
|
@ -1892,7 +1892,7 @@ _func_enter_;
|
||||||
|
|
||||||
//rtw_free_assoc_resources(adapter, 1);
|
//rtw_free_assoc_resources(adapter, 1);
|
||||||
|
|
||||||
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == _TRUE)
|
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == true)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("fail! clear _FW_UNDER_LINKING ^^^fw_state=%x\n", get_fwstate(pmlmepriv)));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("fail! clear _FW_UNDER_LINKING ^^^fw_state=%x\n", get_fwstate(pmlmepriv)));
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||||
|
@ -2032,7 +2032,7 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if (rtw_access_ctrl(adapter, pstassoc->macaddr) == _FALSE)
|
if (rtw_access_ctrl(adapter, pstassoc->macaddr) == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME)
|
#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME)
|
||||||
|
@ -2107,7 +2107,7 @@ _func_enter_;
|
||||||
//psta->aid = (uint)pstassoc->cam_id;
|
//psta->aid = (uint)pstassoc->cam_id;
|
||||||
DBG_88E("%s\n",__func__);
|
DBG_88E("%s\n",__func__);
|
||||||
//for ad-hoc mode
|
//for ad-hoc mode
|
||||||
rtw_hal_set_odm_var(adapter,HAL_ODM_STA_INFO,psta,_TRUE);
|
rtw_hal_set_odm_var(adapter,HAL_ODM_STA_INFO,psta,true);
|
||||||
|
|
||||||
rtw_stassoc_hw_rpt(adapter,psta);
|
rtw_stassoc_hw_rpt(adapter,psta);
|
||||||
|
|
||||||
|
@ -2115,18 +2115,18 @@ _func_enter_;
|
||||||
psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
|
psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
|
||||||
|
|
||||||
|
|
||||||
psta->ieee8021x_blocked = _FALSE;
|
psta->ieee8021x_blocked = false;
|
||||||
|
|
||||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
|
|
||||||
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 ) )
|
||||||
{
|
{
|
||||||
if (adapter->stapriv.asoc_sta_count== 2)
|
if (adapter->stapriv.asoc_sta_count== 2)
|
||||||
{
|
{
|
||||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
||||||
if (ptarget_wlan) ptarget_wlan->fixed = _TRUE;
|
if (ptarget_wlan) ptarget_wlan->fixed = true;
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
// a sta + bc/mc_stainfo (not Ibss_stainfo)
|
// a sta + bc/mc_stainfo (not Ibss_stainfo)
|
||||||
rtw_indicate_connect(adapter);
|
rtw_indicate_connect(adapter);
|
||||||
|
@ -2140,7 +2140,7 @@ _func_enter_;
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8711
|
#ifdef CONFIG_RTL8711
|
||||||
//submit SetStaKey_cmd to tell fw, fw will allocate an CAM entry for this sta
|
//submit SetStaKey_cmd to tell fw, fw will allocate an CAM entry for this sta
|
||||||
rtw_setstakey_cmd(adapter, (unsigned char*)psta, _FALSE);
|
rtw_setstakey_cmd(adapter, (unsigned char*)psta, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -2218,7 +2218,7 @@ _func_enter_;
|
||||||
// remove the network entry in scanned_queue
|
// remove the network entry in scanned_queue
|
||||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||||
if (pwlan) {
|
if (pwlan) {
|
||||||
pwlan->fixed = _FALSE;
|
pwlan->fixed = false;
|
||||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||||
}
|
}
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
|
@ -2245,7 +2245,7 @@ _func_enter_;
|
||||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||||
if (pwlan)
|
if (pwlan)
|
||||||
{
|
{
|
||||||
pwlan->fixed = _FALSE;
|
pwlan->fixed = false;
|
||||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||||
}
|
}
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
|
@ -2402,7 +2402,7 @@ void rtw_scan_timeout_handler (_adapter *adapter)
|
||||||
|
|
||||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
|
|
||||||
rtw_indicate_scan_done(adapter, _TRUE);
|
rtw_indicate_scan_done(adapter, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2418,13 +2418,13 @@ static void rtw_auto_scan_handler(_adapter *padapter)
|
||||||
if (pmlmepriv->scan_interval==0)
|
if (pmlmepriv->scan_interval==0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||||
{
|
{
|
||||||
DBG_88E("exit %s when _FW_UNDER_SURVEY|_FW_UNDER_LINKING ->\n", __func__);
|
DBG_88E("exit %s when _FW_UNDER_SURVEY|_FW_UNDER_LINKING ->\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pmlmepriv->sitesurveyctrl.traffic_busy == _TRUE)
|
if (pmlmepriv->sitesurveyctrl.traffic_busy == true)
|
||||||
{
|
{
|
||||||
DBG_88E("%s exit cause traffic_busy(%x)\n",__func__, pmlmepriv->sitesurveyctrl.traffic_busy);
|
DBG_88E("%s exit cause traffic_busy(%x)\n",__func__, pmlmepriv->sitesurveyctrl.traffic_busy);
|
||||||
return;
|
return;
|
||||||
|
@ -2434,8 +2434,8 @@ static void rtw_auto_scan_handler(_adapter *padapter)
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (rtw_buddy_adapter_up(padapter))
|
if (rtw_buddy_adapter_up(padapter))
|
||||||
{
|
{
|
||||||
if ((check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE) ||
|
if ((check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) ||
|
||||||
(padapter->pbuddy_adapter->mlmepriv.LinkDetectInfo.bBusyTraffic == _TRUE))
|
(padapter->pbuddy_adapter->mlmepriv.LinkDetectInfo.bBusyTraffic == true))
|
||||||
{
|
{
|
||||||
DBG_88E("%s, but buddy_intf is under scanning or linking or BusyTraffic\n", __func__);
|
DBG_88E("%s, but buddy_intf is under scanning or linking or BusyTraffic\n", __func__);
|
||||||
return;
|
return;
|
||||||
|
@ -2471,24 +2471,24 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
||||||
if (adapter->HalFunc.hal_checke_bt_hang)
|
if (adapter->HalFunc.hal_checke_bt_hang)
|
||||||
adapter->HalFunc.hal_checke_bt_hang(adapter);
|
adapter->HalFunc.hal_checke_bt_hang(adapter);
|
||||||
#endif
|
#endif
|
||||||
if (adapter->hw_init_completed == _FALSE)
|
if (adapter->hw_init_completed == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((adapter->bDriverStopped == _TRUE)||(adapter->bSurpriseRemoved== _TRUE))
|
if ((adapter->bDriverStopped == true)||(adapter->bSurpriseRemoved== true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (pbuddy_adapter)
|
if (pbuddy_adapter)
|
||||||
{
|
{
|
||||||
if (adapter->net_closed == _TRUE && pbuddy_adapter->net_closed == _TRUE)
|
if (adapter->net_closed == true && pbuddy_adapter->net_closed == true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif //CONFIG_CONCURRENT_MODE
|
#endif //CONFIG_CONCURRENT_MODE
|
||||||
if (adapter->net_closed == _TRUE)
|
if (adapter->net_closed == true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2509,7 +2509,7 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
||||||
|
|
||||||
#ifndef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
|
#ifndef 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(adapter);
|
expire_timeout_chk(adapter);
|
||||||
}
|
}
|
||||||
|
@ -2527,7 +2527,7 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
||||||
#else // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
#else // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||||
if ( rcu_dereference(adapter->pnetdev->rx_handler_data)
|
if ( rcu_dereference(adapter->pnetdev->rx_handler_data)
|
||||||
#endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
#endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||||
&& (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) )
|
&& (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) )
|
||||||
{
|
{
|
||||||
// expire NAT2.5 entry
|
// expire NAT2.5 entry
|
||||||
void nat25_db_expire(_adapter *priv);
|
void nat25_db_expire(_adapter *priv);
|
||||||
|
@ -2556,7 +2556,7 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
||||||
inline bool rtw_is_scan_deny(_adapter *adapter)
|
inline bool rtw_is_scan_deny(_adapter *adapter)
|
||||||
{
|
{
|
||||||
struct mlme_priv *mlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *mlmepriv = &adapter->mlmepriv;
|
||||||
return (ATOMIC_READ(&mlmepriv->set_scan_deny) != 0) ? _TRUE : _FALSE;
|
return (ATOMIC_READ(&mlmepriv->set_scan_deny) != 0) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void rtw_clear_scan_deny(_adapter *adapter)
|
inline void rtw_clear_scan_deny(_adapter *adapter)
|
||||||
|
@ -2607,37 +2607,37 @@ void rtw_set_scan_deny(_adapter *adapter, u32 ms)
|
||||||
#ifndef PLATFORM_FREEBSD
|
#ifndef PLATFORM_FREEBSD
|
||||||
/*
|
/*
|
||||||
* Select a new join candidate from the original @param candidate and @param competitor
|
* Select a new join candidate from the original @param candidate and @param competitor
|
||||||
* @return _TRUE: candidate is updated
|
* @return true: candidate is updated
|
||||||
* @return _FALSE: candidate is not updated
|
* @return false: candidate is not updated
|
||||||
*/
|
*/
|
||||||
static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
||||||
, struct wlan_network **candidate, struct wlan_network *competitor)
|
, struct wlan_network **candidate, struct wlan_network *competitor)
|
||||||
{
|
{
|
||||||
int updated = _FALSE;
|
int updated = false;
|
||||||
_adapter *adapter = container_of(pmlmepriv, _adapter, mlmepriv);
|
_adapter *adapter = container_of(pmlmepriv, _adapter, mlmepriv);
|
||||||
|
|
||||||
|
|
||||||
//check bssid, if needed
|
//check bssid, if needed
|
||||||
if (pmlmepriv->assoc_by_bssid==_TRUE) {
|
if (pmlmepriv->assoc_by_bssid==true) {
|
||||||
if (_rtw_memcmp(competitor->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN) ==_FALSE)
|
if (_rtw_memcmp(competitor->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN) ==false)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//check ssid, if needed
|
//check ssid, if needed
|
||||||
if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) {
|
if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) {
|
||||||
if ( competitor->network.Ssid.SsidLength != pmlmepriv->assoc_ssid.SsidLength
|
if ( competitor->network.Ssid.SsidLength != pmlmepriv->assoc_ssid.SsidLength
|
||||||
|| _rtw_memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength) == _FALSE
|
|| _rtw_memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength) == false
|
||||||
)
|
)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtw_is_desired_network(adapter, competitor) == _FALSE)
|
if (rtw_is_desired_network(adapter, competitor) == false)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
#ifdef CONFIG_LAYER2_ROAMING
|
#ifdef CONFIG_LAYER2_ROAMING
|
||||||
if (pmlmepriv->to_roaming) {
|
if (pmlmepriv->to_roaming) {
|
||||||
if ( rtw_get_passing_time_ms((u32)competitor->last_scanned) >= RTW_SCAN_RESULT_EXPIRE
|
if ( rtw_get_passing_time_ms((u32)competitor->last_scanned) >= RTW_SCAN_RESULT_EXPIRE
|
||||||
|| is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == _FALSE
|
|| is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == false
|
||||||
)
|
)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -2646,7 +2646,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
||||||
if (*candidate == NULL ||(*candidate)->network.Rssi<competitor->network.Rssi )
|
if (*candidate == NULL ||(*candidate)->network.Rssi<competitor->network.Rssi )
|
||||||
{
|
{
|
||||||
*candidate = competitor;
|
*candidate = competitor;
|
||||||
updated = _TRUE;
|
updated = true;
|
||||||
}
|
}
|
||||||
if (updated){
|
if (updated){
|
||||||
DBG_88E("[by_bssid:%u][assoc_ssid:%s]"
|
DBG_88E("[by_bssid:%u][assoc_ssid:%s]"
|
||||||
|
@ -2685,7 +2685,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
_queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
struct wlan_network *candidate = NULL;
|
struct wlan_network *candidate = NULL;
|
||||||
u8 bSupportAntDiv = _FALSE;
|
u8 bSupportAntDiv = false;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -2725,12 +2725,12 @@ _func_enter_;
|
||||||
|
|
||||||
|
|
||||||
// check for situation of _FW_LINKED
|
// check for situation of _FW_LINKED
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||||
{
|
{
|
||||||
DBG_88E("%s: _FW_LINKED while ask_for_joinbss!!!\n", __func__);
|
DBG_88E("%s: _FW_LINKED while ask_for_joinbss!!!\n", __func__);
|
||||||
|
|
||||||
{
|
{
|
||||||
rtw_disassoc_cmd(adapter, 0, _TRUE);
|
rtw_disassoc_cmd(adapter, 0, true);
|
||||||
rtw_indicate_disconnect(adapter);
|
rtw_indicate_disconnect(adapter);
|
||||||
rtw_free_assoc_resources(adapter, 0);
|
rtw_free_assoc_resources(adapter, 0);
|
||||||
}
|
}
|
||||||
|
@ -2738,7 +2738,7 @@ _func_enter_;
|
||||||
|
|
||||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||||
rtw_hal_get_def_var(adapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv));
|
rtw_hal_get_def_var(adapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv));
|
||||||
if (_TRUE == bSupportAntDiv)
|
if (true == bSupportAntDiv)
|
||||||
{
|
{
|
||||||
u8 CurrentAntenna;
|
u8 CurrentAntenna;
|
||||||
rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(CurrentAntenna));
|
rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(CurrentAntenna));
|
||||||
|
@ -2797,13 +2797,13 @@ _func_enter_;
|
||||||
|
|
||||||
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
|
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
|
||||||
|
|
||||||
if (pmlmepriv->assoc_by_bssid==_TRUE)
|
if (pmlmepriv->assoc_by_bssid==true)
|
||||||
{
|
{
|
||||||
if (_rtw_memcmp(pnetwork->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN)==_TRUE)
|
if (_rtw_memcmp(pnetwork->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN)==true)
|
||||||
{
|
{
|
||||||
//remove the condition @ 20081125
|
//remove the condition @ 20081125
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||||
{
|
{
|
||||||
if (is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network))
|
if (is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network))
|
||||||
{
|
{
|
||||||
|
@ -2813,7 +2813,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rtw_disassoc_cmd(adapter, 0, _TRUE);
|
rtw_disassoc_cmd(adapter, 0, true);
|
||||||
rtw_indicate_disconnect(adapter);
|
rtw_indicate_disconnect(adapter);
|
||||||
rtw_free_assoc_resources(adapter, 0);
|
rtw_free_assoc_resources(adapter, 0);
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
|
@ -2852,7 +2852,7 @@ _func_enter_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else if ( (pnetwork->network.Ssid.SsidLength==pmlmepriv->assoc_ssid.SsidLength)
|
} else if ( (pnetwork->network.Ssid.SsidLength==pmlmepriv->assoc_ssid.SsidLength)
|
||||||
&&((_rtw_memcmp(dst_ssid, src_ssid, pmlmepriv->assoc_ssid.SsidLength)) == _TRUE)
|
&&((_rtw_memcmp(dst_ssid, src_ssid, pmlmepriv->assoc_ssid.SsidLength)) == true)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("dst_ssid=%s, src_ssid=%s\n", dst_ssid, src_ssid));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("dst_ssid=%s, src_ssid=%s\n", dst_ssid, src_ssid));
|
||||||
|
@ -2870,16 +2870,16 @@ _func_enter_;
|
||||||
// goto ask_for_joinbss;
|
// goto ask_for_joinbss;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (pmlmepriv->assoc_by_rssi==_TRUE)//if the ssid is the same, select the bss which has the max rssi
|
if (pmlmepriv->assoc_by_rssi==true)//if the ssid is the same, select the bss which has the max rssi
|
||||||
{
|
{
|
||||||
if ( NULL==pnetwork_max_rssi|| pnetwork->network.Rssi > pnetwork_max_rssi->network.Rssi)
|
if ( NULL==pnetwork_max_rssi|| pnetwork->network.Rssi > pnetwork_max_rssi->network.Rssi)
|
||||||
pnetwork_max_rssi = pnetwork;
|
pnetwork_max_rssi = pnetwork;
|
||||||
}
|
}
|
||||||
else if (rtw_is_desired_network(adapter, pnetwork) == _TRUE)
|
else if (rtw_is_desired_network(adapter, pnetwork) == true)
|
||||||
{
|
{
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||||
{
|
{
|
||||||
rtw_disassoc_cmd(adapter, 0, _TRUE);
|
rtw_disassoc_cmd(adapter, 0, true);
|
||||||
rtw_free_assoc_resources(adapter, 0);
|
rtw_free_assoc_resources(adapter, 0);
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
goto ask_for_joinbss;
|
goto ask_for_joinbss;
|
||||||
|
@ -2904,7 +2904,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((pmlmepriv->assoc_by_rssi==_TRUE) && (pnetwork_max_rssi!=NULL))
|
if ((pmlmepriv->assoc_by_rssi==true) && (pnetwork_max_rssi!=NULL))
|
||||||
{
|
{
|
||||||
pnetwork = pnetwork_max_rssi;
|
pnetwork = pnetwork_max_rssi;
|
||||||
DBG_88E("select_and_join_from_scanned_queue: pnetwork_max_rssi: %s("MAC_FMT")\n",
|
DBG_88E("select_and_join_from_scanned_queue: pnetwork_max_rssi: %s("MAC_FMT")\n",
|
||||||
|
@ -3013,7 +3013,7 @@ _func_enter_;
|
||||||
psetkeyparm->set_tx = set_tx;
|
psetkeyparm->set_tx = set_tx;
|
||||||
pmlmepriv->key_mask |= BIT(psetkeyparm->keyid);
|
pmlmepriv->key_mask |= BIT(psetkeyparm->keyid);
|
||||||
#ifdef CONFIG_AUTOSUSPEND
|
#ifdef CONFIG_AUTOSUSPEND
|
||||||
if ( _TRUE == adapter->pwrctrlpriv.bInternalAutoSuspend)
|
if ( true == adapter->pwrctrlpriv.bInternalAutoSuspend)
|
||||||
{
|
{
|
||||||
adapter->pwrctrlpriv.wepkeymask = pmlmepriv->key_mask;
|
adapter->pwrctrlpriv.wepkeymask = pmlmepriv->key_mask;
|
||||||
DBG_88E("....AutoSuspend pwrctrlpriv.wepkeymask(%x)\n",adapter->pwrctrlpriv.wepkeymask);
|
DBG_88E("....AutoSuspend pwrctrlpriv.wepkeymask(%x)\n",adapter->pwrctrlpriv.wepkeymask);
|
||||||
|
@ -3132,7 +3132,7 @@ static int SecIsInPMKIDList(_adapter *Adapter, u8 *bssid)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if ( ( psecuritypriv->PMKIDList[i].bUsed ) &&
|
if ( ( psecuritypriv->PMKIDList[i].bUsed ) &&
|
||||||
( _rtw_memcmp( psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN ) == _TRUE ) )
|
( _rtw_memcmp( psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN ) == true ) )
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3369,7 +3369,7 @@ void rtw_joinbss_reset(_adapter *padapter)
|
||||||
|
|
||||||
pmlmepriv->num_sta_no_ht = 0;
|
pmlmepriv->num_sta_no_ht = 0;
|
||||||
|
|
||||||
phtpriv->ampdu_enable = _FALSE;//reset to disabled
|
phtpriv->ampdu_enable = false;//reset to disabled
|
||||||
|
|
||||||
#ifdef CONFIG_USB_HCI
|
#ifdef CONFIG_USB_HCI
|
||||||
// TH=1 => means that invalidate usb rx aggregation
|
// TH=1 => means that invalidate usb rx aggregation
|
||||||
|
@ -3409,7 +3409,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||||
|
|
||||||
|
|
||||||
phtpriv->ht_option = _FALSE;
|
phtpriv->ht_option = false;
|
||||||
|
|
||||||
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
|
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
|
||||||
|
|
||||||
|
@ -3472,7 +3472,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||||
//*pout_len = *pout_len + (ielen+2);
|
//*pout_len = *pout_len + (ielen+2);
|
||||||
|
|
||||||
|
|
||||||
phtpriv->ht_option = _TRUE;
|
phtpriv->ht_option = true;
|
||||||
|
|
||||||
p = rtw_get_ie(in_ie+12, _HT_ADD_INFO_IE_, &ielen, in_len-12);
|
p = rtw_get_ie(in_ie+12, _HT_ADD_INFO_IE_, &ielen, in_len-12);
|
||||||
if (p && (ielen==sizeof(struct ieee80211_ht_addt_info)))
|
if (p && (ielen==sizeof(struct ieee80211_ht_addt_info)))
|
||||||
|
@ -3514,20 +3514,20 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len)
|
||||||
DBG_88E("+rtw_update_ht_cap()\n");
|
DBG_88E("+rtw_update_ht_cap()\n");
|
||||||
|
|
||||||
//maybe needs check if ap supports rx ampdu.
|
//maybe needs check if ap supports rx ampdu.
|
||||||
if ((phtpriv->ampdu_enable==_FALSE) &&(pregistrypriv->ampdu_enable==1))
|
if ((phtpriv->ampdu_enable==false) &&(pregistrypriv->ampdu_enable==1))
|
||||||
{
|
{
|
||||||
if (pregistrypriv->wifi_spec==1)
|
if (pregistrypriv->wifi_spec==1)
|
||||||
{
|
{
|
||||||
phtpriv->ampdu_enable = _FALSE;
|
phtpriv->ampdu_enable = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
phtpriv->ampdu_enable = _TRUE;
|
phtpriv->ampdu_enable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pregistrypriv->ampdu_enable==2)
|
else if (pregistrypriv->ampdu_enable==2)
|
||||||
{
|
{
|
||||||
phtpriv->ampdu_enable = _TRUE;
|
phtpriv->ampdu_enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3657,7 +3657,7 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||||
|
|
||||||
phtpriv = &psta->htpriv;
|
phtpriv = &psta->htpriv;
|
||||||
|
|
||||||
if ((phtpriv->ht_option==_TRUE) && (phtpriv->ampdu_enable==_TRUE))
|
if ((phtpriv->ht_option==true) && (phtpriv->ampdu_enable==true))
|
||||||
{
|
{
|
||||||
issued = (phtpriv->agg_enable_bitmap>>priority)&0x1;
|
issued = (phtpriv->agg_enable_bitmap>>priority)&0x1;
|
||||||
issued |= (phtpriv->candidate_tid_bitmap>>priority)&0x1;
|
issued |= (phtpriv->candidate_tid_bitmap>>priority)&0x1;
|
||||||
|
@ -3702,7 +3702,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network)
|
||||||
pnetwork->network.Ssid.SsidLength);
|
pnetwork->network.Ssid.SsidLength);
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, sizeof(NDIS_802_11_SSID));
|
_rtw_memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
pmlmepriv->assoc_by_bssid = _FALSE;
|
pmlmepriv->assoc_by_bssid = false;
|
||||||
|
|
||||||
#ifdef CONFIG_WAPI_SUPPORT
|
#ifdef CONFIG_WAPI_SUPPORT
|
||||||
rtw_wapi_return_all_sta_info(padapter);
|
rtw_wapi_return_all_sta_info(padapter);
|
||||||
|
@ -3732,7 +3732,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network)
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
sint rtw_buddy_adapter_up(_adapter *padapter)
|
sint rtw_buddy_adapter_up(_adapter *padapter)
|
||||||
{
|
{
|
||||||
sint res = _FALSE;
|
sint res = false;
|
||||||
|
|
||||||
if (padapter == NULL)
|
if (padapter == NULL)
|
||||||
return res;
|
return res;
|
||||||
|
@ -3740,16 +3740,16 @@ sint rtw_buddy_adapter_up(_adapter *padapter)
|
||||||
|
|
||||||
if (padapter->pbuddy_adapter == NULL)
|
if (padapter->pbuddy_adapter == NULL)
|
||||||
{
|
{
|
||||||
res = _FALSE;
|
res = false;
|
||||||
}
|
}
|
||||||
else if ( (padapter->pbuddy_adapter->bDriverStopped) || (padapter->pbuddy_adapter->bSurpriseRemoved) ||
|
else if ( (padapter->pbuddy_adapter->bDriverStopped) || (padapter->pbuddy_adapter->bSurpriseRemoved) ||
|
||||||
(padapter->pbuddy_adapter->bup == _FALSE) || (padapter->pbuddy_adapter->hw_init_completed == _FALSE))
|
(padapter->pbuddy_adapter->bup == false) || (padapter->pbuddy_adapter->hw_init_completed == false))
|
||||||
{
|
{
|
||||||
res = _FALSE;
|
res = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
res = _TRUE;
|
res = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
@ -3759,34 +3759,34 @@ sint rtw_buddy_adapter_up(_adapter *padapter)
|
||||||
sint check_buddy_fwstate(_adapter *padapter, sint state)
|
sint check_buddy_fwstate(_adapter *padapter, sint state)
|
||||||
{
|
{
|
||||||
if (padapter == NULL)
|
if (padapter == NULL)
|
||||||
return _FALSE;
|
return false;
|
||||||
|
|
||||||
if (padapter->pbuddy_adapter == NULL)
|
if (padapter->pbuddy_adapter == NULL)
|
||||||
return _FALSE;
|
return false;
|
||||||
|
|
||||||
if ((state == WIFI_FW_NULL_STATE) &&
|
if ((state == WIFI_FW_NULL_STATE) &&
|
||||||
(padapter->pbuddy_adapter->mlmepriv.fw_state == WIFI_FW_NULL_STATE))
|
(padapter->pbuddy_adapter->mlmepriv.fw_state == WIFI_FW_NULL_STATE))
|
||||||
return _TRUE;
|
return true;
|
||||||
|
|
||||||
if (padapter->pbuddy_adapter->mlmepriv.fw_state & state)
|
if (padapter->pbuddy_adapter->mlmepriv.fw_state & state)
|
||||||
return _TRUE;
|
return true;
|
||||||
|
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
sint check_buddy_fw_link(_adapter *padapter)
|
sint check_buddy_fw_link(_adapter *padapter)
|
||||||
{
|
{
|
||||||
if ( (check_buddy_fwstate(padapter, WIFI_AP_STATE) == _TRUE) ||
|
if ( (check_buddy_fwstate(padapter, WIFI_AP_STATE) == true) ||
|
||||||
(check_buddy_fwstate(padapter, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == _TRUE))
|
(check_buddy_fwstate(padapter, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == true))
|
||||||
{
|
{
|
||||||
if (padapter->pbuddy_adapter->stapriv.asoc_sta_count > 2)
|
if (padapter->pbuddy_adapter->stapriv.asoc_sta_count > 2)
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //Station mode
|
{ //Station mode
|
||||||
if (check_buddy_fwstate(padapter, _FW_LINKED)== _TRUE)
|
if (check_buddy_fwstate(padapter, _FW_LINKED)== true)
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_CONCURRENT_MODE
|
#endif //CONFIG_CONCURRENT_MODE
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -187,7 +187,7 @@ void mp_wi_callback(
|
||||||
}
|
}
|
||||||
|
|
||||||
NdisAcquireSpinLock(&(pmp_wi_cntx->mp_wi_lock));
|
NdisAcquireSpinLock(&(pmp_wi_cntx->mp_wi_lock));
|
||||||
pmp_wi_cntx->bmp_wi_progress= _FALSE;
|
pmp_wi_cntx->bmp_wi_progress= false;
|
||||||
NdisReleaseSpinLock(&(pmp_wi_cntx->mp_wi_lock));
|
NdisReleaseSpinLock(&(pmp_wi_cntx->mp_wi_lock));
|
||||||
|
|
||||||
if (pmp_wi_cntx->bmpdrv_unload)
|
if (pmp_wi_cntx->bmpdrv_unload)
|
||||||
|
@ -212,8 +212,8 @@ static int init_mp_priv_by_os(struct mp_priv *pmp_priv)
|
||||||
pmp_priv->tx_testcnt1 = 0;
|
pmp_priv->tx_testcnt1 = 0;
|
||||||
|
|
||||||
pmp_wi_cntx = &pmp_priv->wi_cntx
|
pmp_wi_cntx = &pmp_priv->wi_cntx
|
||||||
pmp_wi_cntx->bmpdrv_unload = _FALSE;
|
pmp_wi_cntx->bmpdrv_unload = false;
|
||||||
pmp_wi_cntx->bmp_wi_progress = _FALSE;
|
pmp_wi_cntx->bmp_wi_progress = false;
|
||||||
pmp_wi_cntx->curractfunc = NULL;
|
pmp_wi_cntx->curractfunc = NULL;
|
||||||
|
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
|
@ -290,8 +290,8 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter)
|
||||||
// do_queue_select(padapter, pattrib);
|
// do_queue_select(padapter, pattrib);
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 init_mp_priv(PADAPTER padapter)
|
s32 init_mp_priv(PADAPTER padapter)
|
||||||
|
@ -375,22 +375,22 @@ MPT_InitializeAdapter(
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// SW Initialization for 8190 MP.
|
// SW Initialization for 8190 MP.
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
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 mpt event. */
|
/* Init mpt event. */
|
||||||
//init for BT MP
|
//init for BT MP
|
||||||
#ifdef CONFIG_RTL8723A
|
#ifdef CONFIG_RTL8723A
|
||||||
pMptCtx->bMPh2c_timeout = _FALSE;
|
pMptCtx->bMPh2c_timeout = false;
|
||||||
pMptCtx->MptH2cRspEvent = _FALSE;
|
pMptCtx->MptH2cRspEvent = false;
|
||||||
pMptCtx->MptBtC2hEvent = _FALSE;
|
pMptCtx->MptBtC2hEvent = false;
|
||||||
|
|
||||||
_rtw_init_sema(&pMptCtx->MPh2c_Sema, 0);
|
_rtw_init_sema(&pMptCtx->MPh2c_Sema, 0);
|
||||||
_init_timer( &pMptCtx->MPh2c_timeout_timer, pAdapter->pnetdev, MPh2c_timeout_handle, pAdapter );
|
_init_timer( &pMptCtx->MPh2c_timeout_timer, pAdapter->pnetdev, MPh2c_timeout_handle, pAdapter );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pMptCtx->bMptWorkItemInProgress = _FALSE;
|
pMptCtx->bMptWorkItemInProgress = false;
|
||||||
pMptCtx->CurrMptAct = NULL;
|
pMptCtx->CurrMptAct = NULL;
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ MPT_InitializeAdapter(
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PHY_IQCalibrate(pAdapter, _FALSE);
|
PHY_IQCalibrate(pAdapter, false);
|
||||||
dm_CheckTXPowerTracking(&pHalData->odmpriv); //trigger thermal meter
|
dm_CheckTXPowerTracking(&pHalData->odmpriv); //trigger thermal meter
|
||||||
PHY_LCCalibrate(pAdapter);
|
PHY_LCCalibrate(pAdapter);
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ MPT_DeInitAdapter(
|
||||||
{
|
{
|
||||||
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx;
|
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx;
|
||||||
|
|
||||||
pMptCtx->bMptDrvUnload = _TRUE;
|
pMptCtx->bMptDrvUnload = true;
|
||||||
#ifdef CONFIG_RTL8723A
|
#ifdef CONFIG_RTL8723A
|
||||||
_rtw_free_sema(&(pMptCtx->MPh2c_Sema));
|
_rtw_free_sema(&(pMptCtx->MPh2c_Sema));
|
||||||
_cancel_timer_ex( &pMptCtx->MPh2c_timeout_timer);
|
_cancel_timer_ex( &pMptCtx->MPh2c_timeout_timer);
|
||||||
|
@ -486,13 +486,13 @@ static u8 mpt_ProStartTest(PADAPTER padapter)
|
||||||
{
|
{
|
||||||
PMPT_CONTEXT pMptCtx = &padapter->mppriv.MptCtx;
|
PMPT_CONTEXT pMptCtx = &padapter->mppriv.MptCtx;
|
||||||
|
|
||||||
pMptCtx->bMassProdTest = _TRUE;
|
pMptCtx->bMassProdTest = true;
|
||||||
pMptCtx->bStartContTx = _FALSE;
|
pMptCtx->bStartContTx = false;
|
||||||
pMptCtx->bCckContTx = _FALSE;
|
pMptCtx->bCckContTx = false;
|
||||||
pMptCtx->bOfdmContTx = _FALSE;
|
pMptCtx->bOfdmContTx = false;
|
||||||
pMptCtx->bSingleCarrier = _FALSE;
|
pMptCtx->bSingleCarrier = false;
|
||||||
pMptCtx->bCarrierSuppression = _FALSE;
|
pMptCtx->bCarrierSuppression = false;
|
||||||
pMptCtx->bSingleTone = _FALSE;
|
pMptCtx->bSingleTone = false;
|
||||||
|
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -535,13 +535,13 @@ static void disable_dm(PADAPTER padapter)
|
||||||
// disable Dynamic Initial Gain
|
// disable Dynamic Initial Gain
|
||||||
// disable High Power
|
// disable High Power
|
||||||
// disable Power Tracking
|
// disable Power Tracking
|
||||||
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||||
|
|
||||||
// enable APK, LCK and IQK but disable power tracking
|
// enable APK, LCK and IQK but disable power tracking
|
||||||
#ifndef CONFIG_RTL8188E
|
#ifndef CONFIG_RTL8188E
|
||||||
pdmpriv->TxPowerTrackControl = _FALSE;
|
pdmpriv->TxPowerTrackControl = false;
|
||||||
#endif
|
#endif
|
||||||
Switch_DM_Func(padapter, DYNAMIC_RF_CALIBRATION, _TRUE);
|
Switch_DM_Func(padapter, DYNAMIC_RF_CALIBRATION, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//This function initializes the DUT to the MP test mode
|
//This function initializes the DUT to the MP test mode
|
||||||
|
@ -610,12 +610,12 @@ s32 mp_start_test(PADAPTER padapter)
|
||||||
|
|
||||||
_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);
|
rtw_indicate_disconnect(padapter);
|
||||||
rtw_free_assoc_resources(padapter, 1);
|
rtw_free_assoc_resources(padapter, 1);
|
||||||
}
|
}
|
||||||
|
@ -689,7 +689,7 @@ void mp_stop_test(PADAPTER padapter)
|
||||||
{
|
{
|
||||||
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
|
||||||
|
@ -1303,7 +1303,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) {
|
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) {
|
||||||
RT_TRACE(_module_mp_, _drv_warning_, ("mp_query_psd: Fail! not in MP mode!\n"));
|
RT_TRACE(_module_mp_, _drv_warning_, ("mp_query_psd: Fail! not in MP mode!\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1405,7 +1405,7 @@ void _rtw_mp_xmit_priv (struct xmit_priv *pxmitpriv)
|
||||||
|
|
||||||
pxmitbuf->priv_data = NULL;
|
pxmitbuf->priv_data = NULL;
|
||||||
pxmitbuf->padapter = padapter;
|
pxmitbuf->padapter = padapter;
|
||||||
pxmitbuf->ext_tag = _TRUE;
|
pxmitbuf->ext_tag = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
pxmitbuf->pallocated_buf = rtw_zmalloc(max_xmit_extbuf_size);
|
pxmitbuf->pallocated_buf = rtw_zmalloc(max_xmit_extbuf_size);
|
||||||
|
|
|
@ -1232,7 +1232,7 @@ _func_enter_;
|
||||||
("+oid_rt_pro_read_efuse_hd: buf_len=%d addr=%d cnts=%d\n",
|
("+oid_rt_pro_read_efuse_hd: buf_len=%d addr=%d cnts=%d\n",
|
||||||
poid_par_priv->information_buf_len, addr, cnts));
|
poid_par_priv->information_buf_len, addr, cnts));
|
||||||
|
|
||||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, _FALSE);
|
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
|
||||||
|
|
||||||
if ((addr + cnts) > max_available_size) {
|
if ((addr + cnts) > max_available_size) {
|
||||||
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_read_efuse_hdl: parameter error!\n"));
|
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_read_efuse_hdl: parameter error!\n"));
|
||||||
|
@ -1240,7 +1240,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
_irqlevel_changed_(&oldirql, LOWER);
|
_irqlevel_changed_(&oldirql, LOWER);
|
||||||
if (rtw_efuse_access(Adapter, _FALSE, addr, cnts, data) == _FAIL) {
|
if (rtw_efuse_access(Adapter, false, addr, cnts, data) == _FAIL) {
|
||||||
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_read_efuse_hdl: rtw_efuse_access FAIL!\n"));
|
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_read_efuse_hdl: rtw_efuse_access FAIL!\n"));
|
||||||
status = NDIS_STATUS_FAILURE;
|
status = NDIS_STATUS_FAILURE;
|
||||||
} else
|
} else
|
||||||
|
@ -1278,7 +1278,7 @@ _func_enter_;
|
||||||
("+oid_rt_pro_write_efuse_hdl: buf_len=%d addr=0x%04x cnts=%d\n",
|
("+oid_rt_pro_write_efuse_hdl: buf_len=%d addr=0x%04x cnts=%d\n",
|
||||||
poid_par_priv->information_buf_len, addr, cnts));
|
poid_par_priv->information_buf_len, addr, cnts));
|
||||||
|
|
||||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, _FALSE);
|
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
|
||||||
|
|
||||||
if ((addr + cnts) > max_available_size) {
|
if ((addr + cnts) > max_available_size) {
|
||||||
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_write_efuse_hdl: parameter error"));
|
RT_TRACE(_module_mp_, _drv_err_, ("!oid_rt_pro_write_efuse_hdl: parameter error"));
|
||||||
|
@ -1286,7 +1286,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
_irqlevel_changed_(&oldirql, LOWER);
|
_irqlevel_changed_(&oldirql, LOWER);
|
||||||
if (rtw_efuse_access(Adapter, _TRUE, addr, cnts, data) == _FAIL)
|
if (rtw_efuse_access(Adapter, true, addr, cnts, data) == _FAIL)
|
||||||
status = NDIS_STATUS_FAILURE;
|
status = NDIS_STATUS_FAILURE;
|
||||||
_irqlevel_changed_(&oldirql, RAISE);
|
_irqlevel_changed_(&oldirql, RAISE);
|
||||||
|
|
||||||
|
@ -1323,23 +1323,23 @@ _func_enter_;
|
||||||
("oid_rt_pro_rw_efuse_pgpkt_hdl: Read offset=0x%x\n",\
|
("oid_rt_pro_rw_efuse_pgpkt_hdl: Read offset=0x%x\n",\
|
||||||
ppgpkt->offset));
|
ppgpkt->offset));
|
||||||
|
|
||||||
Efuse_PowerSwitch(Adapter, _FALSE, _TRUE);
|
Efuse_PowerSwitch(Adapter, false, true);
|
||||||
if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, _FALSE) == _TRUE)
|
if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, false) == true)
|
||||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||||
else
|
else
|
||||||
status = NDIS_STATUS_FAILURE;
|
status = NDIS_STATUS_FAILURE;
|
||||||
Efuse_PowerSwitch(Adapter, _FALSE, _FALSE);
|
Efuse_PowerSwitch(Adapter, false, false);
|
||||||
} else {
|
} else {
|
||||||
RT_TRACE(_module_mp_, _drv_notice_,
|
RT_TRACE(_module_mp_, _drv_notice_,
|
||||||
("oid_rt_pro_rw_efuse_pgpkt_hdl: Write offset=0x%x word_en=0x%x\n",\
|
("oid_rt_pro_rw_efuse_pgpkt_hdl: Write offset=0x%x word_en=0x%x\n",\
|
||||||
ppgpkt->offset, ppgpkt->word_en));
|
ppgpkt->offset, ppgpkt->word_en));
|
||||||
|
|
||||||
Efuse_PowerSwitch(Adapter, _TRUE, _TRUE);
|
Efuse_PowerSwitch(Adapter, true, true);
|
||||||
if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, _FALSE) == _TRUE)
|
if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false) == true)
|
||||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||||
else
|
else
|
||||||
status = NDIS_STATUS_FAILURE;
|
status = NDIS_STATUS_FAILURE;
|
||||||
Efuse_PowerSwitch(Adapter, _TRUE, _FALSE);
|
Efuse_PowerSwitch(Adapter, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
_irqlevel_changed_(&oldirql, RAISE);
|
_irqlevel_changed_(&oldirql, RAISE);
|
||||||
|
@ -1443,7 +1443,7 @@ _func_enter_;
|
||||||
|
|
||||||
RT_TRACE(_module_mp_, _drv_notice_, ("+oid_rt_pro_efuse_map_hdl\n"));
|
RT_TRACE(_module_mp_, _drv_notice_, ("+oid_rt_pro_efuse_map_hdl\n"));
|
||||||
|
|
||||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);
|
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||||
|
|
||||||
*poid_par_priv->bytes_rw = 0;
|
*poid_par_priv->bytes_rw = 0;
|
||||||
|
|
||||||
|
|
164
core/rtw_p2p.c
164
core/rtw_p2p.c
|
@ -44,7 +44,7 @@ int is_any_client_associated( _adapter *padapter )
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
_list *phead, *plist;
|
_list *phead, *plist;
|
||||||
int intFound = _FALSE;
|
int intFound = false;
|
||||||
|
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
|
||||||
|
@ -52,17 +52,17 @@ int is_any_client_associated( _adapter *padapter )
|
||||||
phead = &pstapriv->asoc_list;
|
phead = &pstapriv->asoc_list;
|
||||||
plist = get_next(phead);
|
plist = get_next(phead);
|
||||||
|
|
||||||
if ( rtw_end_of_queue_search(phead, plist) == _TRUE )
|
if ( rtw_end_of_queue_search(phead, plist) == true )
|
||||||
{
|
{
|
||||||
intFound = _FALSE;
|
intFound = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
intFound = _TRUE;
|
intFound = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((intFound == _FALSE && pstapriv->asoc_list_cnt)
|
if ((intFound == false && pstapriv->asoc_list_cnt)
|
||||||
|| (intFound == _TRUE && !pstapriv->asoc_list_cnt)) {
|
|| (intFound == true && !pstapriv->asoc_list_cnt)) {
|
||||||
DBG_88E("%s intFound:%d, asoc_list_cnt:%u mismatch\n", __func__
|
DBG_88E("%s intFound:%d, asoc_list_cnt:%u mismatch\n", __func__
|
||||||
, intFound, pstapriv->asoc_list_cnt);
|
, intFound, pstapriv->asoc_list_cnt);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,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);
|
||||||
|
|
||||||
|
@ -620,7 +620,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 );
|
||||||
}
|
}
|
||||||
|
@ -733,7 +733,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 );
|
||||||
}
|
}
|
||||||
|
@ -807,7 +807,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 )
|
||||||
{
|
{
|
||||||
|
@ -891,7 +891,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 );
|
||||||
}
|
}
|
||||||
|
@ -1035,7 +1035,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 );
|
||||||
}
|
}
|
||||||
|
@ -1133,7 +1133,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 );
|
||||||
}
|
}
|
||||||
|
@ -1231,7 +1231,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 );
|
||||||
}
|
}
|
||||||
|
@ -1329,7 +1329,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 );
|
||||||
}
|
}
|
||||||
|
@ -1428,7 +1428,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 );
|
||||||
}
|
}
|
||||||
|
@ -1527,7 +1527,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 );
|
||||||
}
|
}
|
||||||
|
@ -1640,7 +1640,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 );
|
||||||
}
|
}
|
||||||
|
@ -1753,7 +1753,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 );
|
||||||
}
|
}
|
||||||
|
@ -1852,7 +1852,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 );
|
||||||
}
|
}
|
||||||
|
@ -1987,7 +1987,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
// + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes)
|
// + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes)
|
||||||
//*(u16*) ( p2pie + p2pielen ) = cpu_to_le16( 21 + pwdinfo->device_name_len );
|
//*(u16*) ( p2pie + p2pielen ) = cpu_to_le16( 21 + pwdinfo->device_name_len );
|
||||||
#ifdef CONFIG_INTEL_WIDI
|
#ifdef CONFIG_INTEL_WIDI
|
||||||
if ( _rtw_memcmp( pwdinfo->padapter->mlmepriv.sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN ) == _FALSE )
|
if ( _rtw_memcmp( pwdinfo->padapter->mlmepriv.sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN ) == false )
|
||||||
{
|
{
|
||||||
RTW_PUT_LE16(p2pie + p2pielen, 21 + 8 + pwdinfo->device_name_len);
|
RTW_PUT_LE16(p2pie + p2pielen, 21 + 8 + pwdinfo->device_name_len);
|
||||||
}
|
}
|
||||||
|
@ -2025,7 +2025,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
|
|
||||||
// Number of Secondary Device Types
|
// Number of Secondary Device Types
|
||||||
#ifdef CONFIG_INTEL_WIDI
|
#ifdef CONFIG_INTEL_WIDI
|
||||||
if ( _rtw_memcmp( pwdinfo->padapter->mlmepriv.sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN ) == _FALSE )
|
if ( _rtw_memcmp( pwdinfo->padapter->mlmepriv.sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN ) == false )
|
||||||
{
|
{
|
||||||
p2pie[ p2pielen++ ] = 0x01;
|
p2pie[ p2pielen++ ] = 0x01;
|
||||||
|
|
||||||
|
@ -2251,7 +2251,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;
|
||||||
|
@ -2310,11 +2310,11 @@ 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
|
||||||
|
@ -2492,7 +2492,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);
|
||||||
|
|
||||||
|
@ -2540,13 +2540,13 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
||||||
issue_p2p_devdisc_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
|
issue_p2p_devdisc_resp(pwdinfo, GetAddr2Ptr(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 )
|
||||||
|
@ -2591,14 +2591,14 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBG_88E( "[%s] config method = %s\n", __func__, pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req );
|
DBG_88E( "[%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;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list)
|
u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list)
|
||||||
|
@ -2759,7 +2759,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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2961,7 +2961,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
||||||
cap_attr = le16_to_cpu(cap_attr);
|
cap_attr = le16_to_cpu(cap_attr);
|
||||||
#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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3271,7 +3271,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
||||||
|
|
||||||
issue_p2p_presence_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
|
issue_p2p_presence_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void find_phase_handler( _adapter* padapter )
|
void find_phase_handler( _adapter* padapter )
|
||||||
|
@ -3436,7 +3436,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
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.
|
||||||
|
@ -3474,7 +3474,7 @@ _func_enter_;
|
||||||
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, HT_CHANNEL_WIDTH_20);
|
set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||||
|
@ -3482,7 +3482,7 @@ _func_enter_;
|
||||||
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;
|
||||||
|
@ -3542,7 +3542,7 @@ _func_enter_;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
pcfg80211_wdinfo->is_ro_ch = _FALSE;
|
pcfg80211_wdinfo->is_ro_ch = false;
|
||||||
|
|
||||||
DBG_88E("cfg80211_remain_on_channel_expired\n");
|
DBG_88E("cfg80211_remain_on_channel_expired\n");
|
||||||
|
|
||||||
|
@ -3637,7 +3637,7 @@ void rtw_append_wfd_ie(_adapter *padapter, u8 *buf, u32* len)
|
||||||
{
|
{
|
||||||
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];
|
||||||
|
@ -3755,7 +3755,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||||
{
|
{
|
||||||
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];
|
||||||
|
@ -3776,16 +3776,16 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||||
u8 *cont;
|
u8 *cont;
|
||||||
uint cont_len;
|
uint cont_len;
|
||||||
case P2P_GO_NEGO_REQ:
|
case P2P_GO_NEGO_REQ:
|
||||||
DBG_88E("RTW_%s:P2P_GO_NEGO_REQ, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken);
|
DBG_88E("RTW_%s:P2P_GO_NEGO_REQ, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (check_buddy_fwstate(padapter, _FW_LINKED))
|
if (check_buddy_fwstate(padapter, _FW_LINKED))
|
||||||
|
@ -3796,11 +3796,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||||
break;
|
break;
|
||||||
case P2P_GO_NEGO_RESP:
|
case P2P_GO_NEGO_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);
|
||||||
DBG_88E("RTW_%s:P2P_GO_NEGO_RESP, dialogToken=%d, status:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
DBG_88E("RTW_%s:P2P_GO_NEGO_RESP, dialogToken=%d, status:%d\n", (tx==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||||
|
|
||||||
if (!tx)
|
if (!tx)
|
||||||
{
|
{
|
||||||
pwdev_priv->provdisc_req_issued = _FALSE;
|
pwdev_priv->provdisc_req_issued = false;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
else
|
else
|
||||||
|
@ -3812,7 +3812,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||||
break;
|
break;
|
||||||
case P2P_GO_NEGO_CONF:
|
case P2P_GO_NEGO_CONF:
|
||||||
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);
|
||||||
DBG_88E("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
DBG_88E("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d\n", (tx==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (tx)
|
if (tx)
|
||||||
|
@ -3848,7 +3848,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||||
invit_info->flags = (flags==-1) ? 0x0 : flags;
|
invit_info->flags = (flags==-1) ? 0x0 : flags;
|
||||||
invit_info->req_op_ch= op_ch;
|
invit_info->req_op_ch= op_ch;
|
||||||
|
|
||||||
DBG_88E("RTW_%s:P2P_INVIT_REQ, dialogToken=%d, flags:0x%02x, op_ch:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, flags, op_ch);
|
DBG_88E("RTW_%s:P2P_INVIT_REQ, dialogToken=%d, flags:0x%02x, op_ch:%d\n", (tx==true)?"Tx":"Rx", dialogToken, flags, op_ch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case P2P_INVIT_RESP:
|
case P2P_INVIT_RESP:
|
||||||
|
@ -3878,15 +3878,15 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||||
invit_info->rsp_op_ch= op_ch;
|
invit_info->rsp_op_ch= op_ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_88E("RTW_%s:P2P_INVIT_RESP, dialogToken=%d, status:%d, op_ch:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, status, op_ch);
|
DBG_88E("RTW_%s:P2P_INVIT_RESP, dialogToken=%d, status:%d, op_ch:%d\n", (tx==true)?"Tx":"Rx", dialogToken, status, op_ch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case P2P_DEVDISC_REQ:
|
case P2P_DEVDISC_REQ:
|
||||||
DBG_88E("RTW_%s:P2P_DEVDISC_REQ, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken);
|
DBG_88E("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);
|
||||||
DBG_88E("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
DBG_88E("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:
|
||||||
{
|
{
|
||||||
|
@ -3895,25 +3895,25 @@ 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;
|
||||||
|
|
||||||
DBG_88E("RTW_%s:P2P_PROVISION_DISC_REQ, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken);
|
DBG_88E("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;
|
||||||
|
|
||||||
if ( (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=rtw_get_p2p_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen)))
|
||||||
{
|
{
|
||||||
|
|
||||||
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
|
||||||
DBG_88E("provdisc_req_issued is _TRUE\n");
|
DBG_88E("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.
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3921,10 +3921,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:
|
||||||
DBG_88E("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", dialogToken);
|
DBG_88E("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DBG_88E("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==_TRUE)?"Tx":"Rx", OUI_Subtype, dialogToken);
|
DBG_88E("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==true)?"Tx":"Rx", OUI_Subtype, dialogToken);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3946,26 +3946,26 @@ 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:
|
||||||
DBG_88E("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", dialogToken);
|
DBG_88E("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||||
break;
|
break;
|
||||||
case P2P_PRESENCE_REQUEST:
|
case P2P_PRESENCE_REQUEST:
|
||||||
DBG_88E("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", dialogToken);
|
DBG_88E("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||||
break;
|
break;
|
||||||
case P2P_PRESENCE_RESPONSE:
|
case P2P_PRESENCE_RESPONSE:
|
||||||
DBG_88E("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", dialogToken);
|
DBG_88E("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:
|
||||||
DBG_88E("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", dialogToken);
|
DBG_88E("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DBG_88E("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==_TRUE)?"TX":"RX", OUI_Subtype, dialogToken);
|
DBG_88E("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==true)?"TX":"RX", OUI_Subtype, dialogToken);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBG_88E("RTW_%s:action frame category=%d\n", (tx==_TRUE)?"TX":"RX", category);
|
DBG_88E("RTW_%s:action frame category=%d\n", (tx==true)?"TX":"RX", category);
|
||||||
//is_p2p_frame = (-1);
|
//is_p2p_frame = (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4081,7 +4081,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;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -4104,11 +4104,11 @@ _func_enter_;
|
||||||
|
|
||||||
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) ||
|
||||||
|
@ -4147,7 +4147,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
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 (padapter->pwrctrlpriv.bFwCurrentInPSMode == _TRUE)
|
if (padapter->pwrctrlpriv.bFwCurrentInPSMode == true)
|
||||||
{
|
{
|
||||||
p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 1);
|
p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 1);
|
||||||
}
|
}
|
||||||
|
@ -4171,9 +4171,9 @@ _func_enter_;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -4202,7 +4202,7 @@ _func_enter_;
|
||||||
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 (padapter->pwrctrlpriv.bFwCurrentInPSMode == _TRUE)
|
if (padapter->pwrctrlpriv.bFwCurrentInPSMode == true)
|
||||||
{
|
{
|
||||||
if (pwrpriv->smart_ps == 0)
|
if (pwrpriv->smart_ps == 0)
|
||||||
{
|
{
|
||||||
|
@ -4353,7 +4353,7 @@ static void pre_tx_scan_timer_process (void *FunctionContext)
|
||||||
|
|
||||||
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);
|
||||||
|
@ -4362,14 +4362,14 @@ static void pre_tx_scan_timer_process (void *FunctionContext)
|
||||||
}
|
}
|
||||||
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 );
|
||||||
}
|
}
|
||||||
|
@ -4421,7 +4421,7 @@ 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;
|
||||||
pwdinfo->wfd_tdls_enable = 0;
|
pwdinfo->wfd_tdls_enable = 0;
|
||||||
pwdinfo->wfd_tdls_weaksec = 0;
|
pwdinfo->wfd_tdls_weaksec = 0;
|
||||||
}
|
}
|
||||||
|
@ -4435,13 +4435,13 @@ int rtw_init_wifi_display_info(_adapter* padapter)
|
||||||
// Used in P2P and TDLS
|
// Used in P2P and TDLS
|
||||||
pwfd_info->rtsp_ctrlport = 554;
|
pwfd_info->rtsp_ctrlport = 554;
|
||||||
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
|
||||||
_rtw_memset( pwfd_info->ip_address, 0x00, 4 );
|
_rtw_memset( pwfd_info->ip_address, 0x00, 4 );
|
||||||
|
@ -4510,7 +4510,7 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role)
|
||||||
pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ( check_buddy_fwstate(padapter, _FW_LINKED ) == _TRUE ) &&
|
if ( ( check_buddy_fwstate(padapter, _FW_LINKED ) == true ) &&
|
||||||
( ( pbuddy_mlmeext->cur_channel == 1) || ( pbuddy_mlmeext->cur_channel == 6 ) || ( pbuddy_mlmeext->cur_channel == 11 ) )
|
( ( pbuddy_mlmeext->cur_channel == 1) || ( pbuddy_mlmeext->cur_channel == 6 ) || ( pbuddy_mlmeext->cur_channel == 11 ) )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -4529,7 +4529,7 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role)
|
||||||
{
|
{
|
||||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) == _TRUE )
|
if ( check_buddy_fwstate(padapter, _FW_LINKED ) == true )
|
||||||
{
|
{
|
||||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_IDLE);
|
rtw_p2p_set_state(pwdinfo, P2P_STATE_IDLE);
|
||||||
}
|
}
|
||||||
|
@ -4743,9 +4743,9 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
|
||||||
//Enable P2P function
|
//Enable P2P function
|
||||||
init_wifidirect_info(padapter, role);
|
init_wifidirect_info(padapter, role);
|
||||||
|
|
||||||
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
|
||||||
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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4774,9 +4774,9 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
|
||||||
_rtw_memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
|
_rtw_memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
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
|
||||||
|
|
||||||
//Restore to initial setting.
|
//Restore to initial setting.
|
||||||
|
|
|
@ -51,7 +51,7 @@ void ips_enter(_adapter * padapter)
|
||||||
|
|
||||||
_enter_pwrlock(&pwrpriv->lock);
|
_enter_pwrlock(&pwrpriv->lock);
|
||||||
|
|
||||||
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;
|
||||||
|
@ -63,16 +63,16 @@ void ips_enter(_adapter * padapter)
|
||||||
#endif
|
#endif
|
||||||
if (rf_off == pwrpriv->change_rfpwrstate )
|
if (rf_off == pwrpriv->change_rfpwrstate )
|
||||||
{
|
{
|
||||||
pwrpriv->bpower_saving = _TRUE;
|
pwrpriv->bpower_saving = true;
|
||||||
DBG_88E_LEVEL(_drv_info_, "nolinked power save enter\n");
|
DBG_88E_LEVEL(_drv_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;
|
||||||
|
|
||||||
_exit_pwrlock(&pwrpriv->lock);
|
_exit_pwrlock(&pwrpriv->lock);
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ int ips_leave(_adapter * padapter)
|
||||||
|
|
||||||
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++;
|
||||||
DBG_88E("==>ips_leave cnts:%d\n",pwrpriv->ips_leave_cnts);
|
DBG_88E("==>ips_leave cnts:%d\n",pwrpriv->ips_leave_cnts);
|
||||||
|
@ -116,10 +116,10 @@ int ips_leave(_adapter * padapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_88E("==> ips_leave.....LED(0x%08x)...\n",rtw_read32(padapter,0x4c));
|
DBG_88E("==> 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit_pwrlock(&pwrpriv->lock);
|
_exit_pwrlock(&pwrpriv->lock);
|
||||||
|
@ -151,7 +151,7 @@ bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool ret = _FALSE;
|
bool ret = false;
|
||||||
|
|
||||||
if (adapter->pwrctrlpriv.ips_deny_time >= rtw_get_current_time()) {
|
if (adapter->pwrctrlpriv.ips_deny_time >= rtw_get_current_time()) {
|
||||||
//DBG_88E("%s ips_deny_time\n", __func__);
|
//DBG_88E("%s ips_deny_time\n", __func__);
|
||||||
|
@ -194,7 +194,7 @@ bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = _TRUE;
|
ret = true;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -212,10 +212,10 @@ void rtw_ps_processor(_adapter*padapter)
|
||||||
rt_rf_power_state rfpwrstate;
|
rt_rf_power_state rfpwrstate;
|
||||||
#endif //SUPPORT_HW_RFOFF_DETECTED
|
#endif //SUPPORT_HW_RFOFF_DETECTED
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
//DBG_88E("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca));
|
//DBG_88E("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca));
|
||||||
|
@ -226,8 +226,8 @@ void rtw_ps_processor(_adapter*padapter)
|
||||||
{
|
{
|
||||||
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);
|
||||||
DBG_88E("@@@@- #1 %s==> rfstate:%s\n",__func__,(rfpwrstate==rf_on)?"rf_on":"rf_off");
|
DBG_88E("@@@@- #1 %s==> rfstate:%s\n",__func__,(rfpwrstate==rf_on)?"rf_on":"rf_off");
|
||||||
|
@ -237,8 +237,8 @@ void rtw_ps_processor(_adapter*padapter)
|
||||||
{
|
{
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -256,8 +256,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->brfoffbyhw = _TRUE;
|
pwrpriv->brfoffbyhw = true;
|
||||||
padapter->bCardDisableWOHSM = _TRUE;
|
padapter->bCardDisableWOHSM = true;
|
||||||
rtw_hw_suspend(padapter );
|
rtw_hw_suspend(padapter );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -279,7 +279,7 @@ void rtw_ps_processor(_adapter*padapter)
|
||||||
)
|
)
|
||||||
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))
|
||||||
|
@ -293,22 +293,22 @@ void rtw_ps_processor(_adapter*padapter)
|
||||||
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) {
|
||||||
DBG_88E("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n",__func__,pwrpriv->bInternalAutoSuspend);
|
DBG_88E("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n",__func__,pwrpriv->bInternalAutoSuspend);
|
||||||
} else {
|
} else {
|
||||||
pwrpriv->change_rfpwrstate = rf_off;
|
pwrpriv->change_rfpwrstate = rf_off;
|
||||||
padapter->bCardDisableWOHSM = _TRUE;
|
padapter->bCardDisableWOHSM = true;
|
||||||
DBG_88E("<==%s .pwrpriv->bInternalAutoSuspend)(%x) call autosuspend_enter\n",__func__,pwrpriv->bInternalAutoSuspend);
|
DBG_88E("<==%s .pwrpriv->bInternalAutoSuspend)(%x) call autosuspend_enter\n",__func__,pwrpriv->bInternalAutoSuspend);
|
||||||
autosuspend_enter(padapter);
|
autosuspend_enter(padapter);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
padapter->bCardDisableWOHSM = _TRUE;
|
padapter->bCardDisableWOHSM = true;
|
||||||
autosuspend_enter(padapter);
|
autosuspend_enter(padapter);
|
||||||
#endif //if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
#endif //if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@ void rtw_ps_processor(_adapter*padapter)
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
|
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
|
||||||
pwrpriv->ps_processing = _FALSE;
|
pwrpriv->ps_processing = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,14 +361,14 @@ _func_enter_;
|
||||||
pslv = PS_STATE(pslv);
|
pslv = PS_STATE(pslv);
|
||||||
|
|
||||||
|
|
||||||
if (_TRUE == pwrpriv->btcoex_rfon)
|
if (true == pwrpriv->btcoex_rfon)
|
||||||
{
|
{
|
||||||
if (pslv < PS_STATE_S4)
|
if (pslv < PS_STATE_S4)
|
||||||
pslv = PS_STATE_S3;
|
pslv = PS_STATE_S3;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_LPS_RPWM_TIMER
|
#ifdef CONFIG_LPS_RPWM_TIMER
|
||||||
if (pwrpriv->brpwmtimeout == _TRUE)
|
if (pwrpriv->brpwmtimeout == true)
|
||||||
{
|
{
|
||||||
DBG_88E("%s: RPWM timeout, force to set RPWM(0x%02X) again!\n", __func__, pslv);
|
DBG_88E("%s: RPWM timeout, force to set RPWM(0x%02X) again!\n", __func__, pslv);
|
||||||
}
|
}
|
||||||
|
@ -387,8 +387,8 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((padapter->bSurpriseRemoved == _TRUE) ||
|
if ((padapter->bSurpriseRemoved == true) ||
|
||||||
(padapter->hw_init_completed == _FALSE))
|
(padapter->hw_init_completed == false))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
|
||||||
("%s: SurpriseRemoved(%d) hw_init_completed(%d)\n",
|
("%s: SurpriseRemoved(%d) hw_init_completed(%d)\n",
|
||||||
|
@ -399,7 +399,7 @@ _func_enter_;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (padapter->bDriverStopped == _TRUE)
|
if (padapter->bDriverStopped == true)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
|
||||||
("%s: change power state(0x%02X) when DriverStopped\n", __func__, pslv));
|
("%s: change power state(0x%02X) when DriverStopped\n", __func__, pslv));
|
||||||
|
@ -454,35 +454,35 @@ u8 PS_RDY_CHECK(_adapter * padapter)
|
||||||
|
|
||||||
if (delta_time < LPS_DELAY_TIME)
|
if (delta_time < LPS_DELAY_TIME)
|
||||||
{
|
{
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) ||
|
if ((check_fwstate(pmlmepriv, _FW_LINKED) == false) ||
|
||||||
(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) ||
|
(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) ||
|
||||||
(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) ||
|
(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) ||
|
||||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) ||
|
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) ||
|
||||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) )
|
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) )
|
||||||
return _FALSE;
|
return false;
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
if (_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
|
if (true == pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
|
||||||
return _TRUE;
|
return true;
|
||||||
else
|
else
|
||||||
return _FALSE;
|
return false;
|
||||||
#else
|
#else
|
||||||
if (_TRUE == pwrpriv->bInSuspend )
|
if (true == pwrpriv->bInSuspend )
|
||||||
return _FALSE;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
if ( (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == _FALSE) )
|
if ( (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == false) )
|
||||||
{
|
{
|
||||||
DBG_88E("Group handshake still in progress !!!\n");
|
DBG_88E("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;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode)
|
void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode)
|
||||||
|
@ -542,7 +542,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
|
||||||
|
@ -558,14 +558,14 @@ _func_enter_;
|
||||||
pwrpriv->pwr_mode = ps_mode;
|
pwrpriv->pwr_mode = ps_mode;
|
||||||
rtw_set_rpwm(padapter, PS_STATE_S4);
|
rtw_set_rpwm(padapter, PS_STATE_S4);
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
|
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
|
||||||
pwrpriv->bFwCurrentInPSMode = _FALSE;
|
pwrpriv->bFwCurrentInPSMode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (PS_RDY_CHECK(padapter)
|
if (PS_RDY_CHECK(padapter)
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
|| (BT_1Ant(padapter) == _TRUE)
|
|| (BT_1Ant(padapter) == true)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -579,7 +579,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
|
||||||
|
@ -592,7 +592,7 @@ _func_enter_;
|
||||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
|
|
||||||
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;
|
||||||
|
@ -629,7 +629,7 @@ _func_exit_;
|
||||||
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;
|
||||||
|
|
||||||
|
|
||||||
|
@ -637,10 +637,10 @@ s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms)
|
||||||
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 (_TRUE == padapter->bSurpriseRemoved)
|
if (true == padapter->bSurpriseRemoved)
|
||||||
{
|
{
|
||||||
err = -2;
|
err = -2;
|
||||||
DBG_88E("%s: device surprise removed!!\n", __func__);
|
DBG_88E("%s: device surprise removed!!\n", __func__);
|
||||||
|
@ -703,17 +703,17 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (PS_RDY_CHECK(padapter) == _FALSE)
|
if (PS_RDY_CHECK(padapter) == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_TRUE == pwrpriv->bLeisurePs)
|
if (true == pwrpriv->bLeisurePs)
|
||||||
{
|
{
|
||||||
// Idle for a while if we connect to AP a while ago.
|
// Idle for a while if we connect to AP a while ago.
|
||||||
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)
|
||||||
{
|
{
|
||||||
pwrpriv->bpower_saving = _TRUE;
|
pwrpriv->bpower_saving = true;
|
||||||
DBG_88E("%s smart_ps:%d\n", __func__, pwrpriv->smart_ps);
|
DBG_88E("%s smart_ps:%d\n", __func__, pwrpriv->smart_ps);
|
||||||
//For Tenda W311R IOT issue
|
//For Tenda W311R IOT issue
|
||||||
rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, pwrpriv->smart_ps, 0);
|
rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, pwrpriv->smart_ps, 0);
|
||||||
|
@ -738,7 +738,7 @@ void LPS_Leave(PADAPTER padapter)
|
||||||
|
|
||||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||||
u32 start_time;
|
u32 start_time;
|
||||||
u8 bAwake = _FALSE;
|
u8 bAwake = false;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -760,7 +760,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pwrpriv->bpower_saving = _FALSE;
|
pwrpriv->bpower_saving = false;
|
||||||
|
|
||||||
// DBG_88E("-LeisurePSLeave\n");
|
// DBG_88E("-LeisurePSLeave\n");
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ void LeaveAllPowerSaveMode(IN PADAPTER Adapter)
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
//DBG_88E("%s.....\n",__func__);
|
//DBG_88E("%s.....\n",__func__);
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||||
{ //connect
|
{ //connect
|
||||||
#ifdef CONFIG_LPS_LCLK
|
#ifdef CONFIG_LPS_LCLK
|
||||||
enqueue = 1;
|
enqueue = 1;
|
||||||
|
@ -816,7 +816,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_PLATFORM_SPRD) && defined(CONFIG_RTL8188E)
|
#if defined(CONFIG_PLATFORM_SPRD) && defined(CONFIG_RTL8188E)
|
||||||
#ifdef CONFIG_IPS
|
#ifdef CONFIG_IPS
|
||||||
if (_FALSE == ips_leave(Adapter))
|
if (false == ips_leave(Adapter))
|
||||||
{
|
{
|
||||||
DBG_88E("======> ips_leave fail.............\n");
|
DBG_88E("======> ips_leave fail.............\n");
|
||||||
}
|
}
|
||||||
|
@ -841,7 +841,7 @@ _func_enter_;
|
||||||
|
|
||||||
pwrpriv = &padapter->pwrctrlpriv;
|
pwrpriv = &padapter->pwrctrlpriv;
|
||||||
|
|
||||||
bReady = _FALSE;
|
bReady = false;
|
||||||
start_time = rtw_get_current_time();
|
start_time = rtw_get_current_time();
|
||||||
|
|
||||||
rtw_yield_os();
|
rtw_yield_os();
|
||||||
|
@ -850,20 +850,20 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
_enter_pwrlock(&pwrpriv->lock);
|
_enter_pwrlock(&pwrpriv->lock);
|
||||||
|
|
||||||
if ((padapter->bSurpriseRemoved == _TRUE)
|
if ((padapter->bSurpriseRemoved == true)
|
||||||
|| (padapter->hw_init_completed == _FALSE)
|
|| (padapter->hw_init_completed == false)
|
||||||
#ifdef CONFIG_USB_HCI
|
#ifdef CONFIG_USB_HCI
|
||||||
|| (padapter->bDriverStopped== _TRUE)
|
|| (padapter->bDriverStopped== true)
|
||||||
#endif
|
#endif
|
||||||
|| (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)
|
||||||
|
@ -978,9 +978,9 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
|
||||||
DBG_88E("%s: cpwm=%d, nothing to do!\n", __func__, pwrpriv->cpwm);
|
DBG_88E("%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);
|
||||||
|
@ -1043,7 +1043,7 @@ _func_enter_;
|
||||||
res = _SUCCESS;
|
res = _SUCCESS;
|
||||||
pwrctrl = &padapter->pwrctrlpriv;
|
pwrctrl = &padapter->pwrctrlpriv;
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
if (_TRUE == padapter->pwrctrlpriv.btcoex_rfon)
|
if (true == padapter->pwrctrlpriv.btcoex_rfon)
|
||||||
pslv = PS_STATE_S3;
|
pslv = PS_STATE_S3;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
@ -1055,7 +1055,7 @@ _func_enter_;
|
||||||
|
|
||||||
register_task_alive(pwrctrl, XMIT_ALIVE);
|
register_task_alive(pwrctrl, XMIT_ALIVE);
|
||||||
|
|
||||||
if (pwrctrl->bFwCurrentInPSMode == _TRUE)
|
if (pwrctrl->bFwCurrentInPSMode == true)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
|
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
|
||||||
("rtw_register_tx_alive: cpwm=0x%02x alives=0x%08x\n",
|
("rtw_register_tx_alive: cpwm=0x%02x alives=0x%08x\n",
|
||||||
|
@ -1101,7 +1101,7 @@ _func_enter_;
|
||||||
res = _SUCCESS;
|
res = _SUCCESS;
|
||||||
pwrctrl = &padapter->pwrctrlpriv;
|
pwrctrl = &padapter->pwrctrlpriv;
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
if (_TRUE == padapter->pwrctrlpriv.btcoex_rfon)
|
if (true == padapter->pwrctrlpriv.btcoex_rfon)
|
||||||
pslv = PS_STATE_S3;
|
pslv = PS_STATE_S3;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
@ -1113,7 +1113,7 @@ _func_enter_;
|
||||||
|
|
||||||
register_task_alive(pwrctrl, CMD_ALIVE);
|
register_task_alive(pwrctrl, CMD_ALIVE);
|
||||||
|
|
||||||
if (pwrctrl->bFwCurrentInPSMode == _TRUE)
|
if (pwrctrl->bFwCurrentInPSMode == true)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_,
|
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_,
|
||||||
("rtw_register_cmd_alive: cpwm=0x%02x alives=0x%08x\n",
|
("rtw_register_cmd_alive: cpwm=0x%02x alives=0x%08x\n",
|
||||||
|
@ -1217,7 +1217,7 @@ _func_enter_;
|
||||||
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))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
|
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
|
||||||
("%s: cpwm=0x%02x alives=0x%08x\n",
|
("%s: cpwm=0x%02x alives=0x%08x\n",
|
||||||
|
@ -1255,7 +1255,7 @@ _func_enter_;
|
||||||
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))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_,
|
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_,
|
||||||
("%s: cpwm=0x%02x alives=0x%08x\n",
|
("%s: cpwm=0x%02x alives=0x%08x\n",
|
||||||
|
@ -1335,16 +1335,16 @@ _func_enter_;
|
||||||
pwrctrlpriv->rf_pwrstate = rf_on;
|
pwrctrlpriv->rf_pwrstate = rf_on;
|
||||||
pwrctrlpriv->ips_enter_cnts=0;
|
pwrctrlpriv->ips_enter_cnts=0;
|
||||||
pwrctrlpriv->ips_leave_cnts=0;
|
pwrctrlpriv->ips_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;
|
||||||
|
|
||||||
#ifdef CONFIG_AUTOSUSPEND
|
#ifdef CONFIG_AUTOSUSPEND
|
||||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||||
|
@ -1358,9 +1358,9 @@ _func_enter_;
|
||||||
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;
|
||||||
|
@ -1371,7 +1371,7 @@ _func_enter_;
|
||||||
|
|
||||||
pwrctrlpriv->tog = 0x80;
|
pwrctrlpriv->tog = 0x80;
|
||||||
|
|
||||||
pwrctrlpriv->btcoex_rfon = _FALSE;
|
pwrctrlpriv->btcoex_rfon = false;
|
||||||
|
|
||||||
#ifdef CONFIG_LPS_LCLK
|
#ifdef CONFIG_LPS_LCLK
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&pwrctrlpriv->rpwm));
|
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&pwrctrlpriv->rpwm));
|
||||||
|
@ -1379,7 +1379,7 @@ _func_enter_;
|
||||||
_init_workitem(&pwrctrlpriv->cpwm_event, cpwm_event_callback, NULL);
|
_init_workitem(&pwrctrlpriv->cpwm_event, cpwm_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
|
||||||
|
@ -1471,7 +1471,7 @@ static void rtw_early_suspend(struct early_suspend *h)
|
||||||
DBG_88E("%s\n",__func__);
|
DBG_88E("%s\n",__func__);
|
||||||
|
|
||||||
//jeff: do nothing but set do_late_resume to false
|
//jeff: do nothing but set do_late_resume to false
|
||||||
pwrpriv->do_late_resume = _FALSE;
|
pwrpriv->do_late_resume = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtw_late_resume(struct early_suspend *h)
|
static void rtw_late_resume(struct early_suspend *h)
|
||||||
|
@ -1483,7 +1483,7 @@ static void rtw_late_resume(struct early_suspend *h)
|
||||||
if (pwrpriv->do_late_resume) {
|
if (pwrpriv->do_late_resume) {
|
||||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||||
rtw_resume_process(adapter);
|
rtw_resume_process(adapter);
|
||||||
pwrpriv->do_late_resume = _FALSE;
|
pwrpriv->do_late_resume = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1505,7 +1505,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
||||||
{
|
{
|
||||||
DBG_88E("%s\n", __func__);
|
DBG_88E("%s\n", __func__);
|
||||||
|
|
||||||
pwrpriv->do_late_resume = _FALSE;
|
pwrpriv->do_late_resume = false;
|
||||||
|
|
||||||
if (pwrpriv->early_suspend.suspend)
|
if (pwrpriv->early_suspend.suspend)
|
||||||
unregister_early_suspend(&pwrpriv->early_suspend);
|
unregister_early_suspend(&pwrpriv->early_suspend);
|
||||||
|
@ -1525,7 +1525,7 @@ static void rtw_early_suspend(android_early_suspend_t *h)
|
||||||
DBG_88E("%s\n",__func__);
|
DBG_88E("%s\n",__func__);
|
||||||
|
|
||||||
//jeff: do nothing but set do_late_resume to false
|
//jeff: do nothing but set do_late_resume to false
|
||||||
pwrpriv->do_late_resume = _FALSE;
|
pwrpriv->do_late_resume = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtw_late_resume(android_early_suspend_t *h)
|
static void rtw_late_resume(android_early_suspend_t *h)
|
||||||
|
@ -1537,7 +1537,7 @@ static void rtw_late_resume(android_early_suspend_t *h)
|
||||||
if (pwrpriv->do_late_resume) {
|
if (pwrpriv->do_late_resume) {
|
||||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||||
rtw_resume_process(adapter);
|
rtw_resume_process(adapter);
|
||||||
pwrpriv->do_late_resume = _FALSE;
|
pwrpriv->do_late_resume = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1557,7 +1557,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
||||||
{
|
{
|
||||||
DBG_88E("%s\n", __func__);
|
DBG_88E("%s\n", __func__);
|
||||||
|
|
||||||
pwrpriv->do_late_resume = _FALSE;
|
pwrpriv->do_late_resume = 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);
|
||||||
|
@ -1569,7 +1569,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;
|
||||||
|
@ -1599,7 +1599,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
||||||
if (padapter->pbuddy_adapter)
|
if (padapter->pbuddy_adapter)
|
||||||
LeaveAllPowerSaveMode(padapter->pbuddy_adapter);
|
LeaveAllPowerSaveMode(padapter->pbuddy_adapter);
|
||||||
|
|
||||||
if ((padapter->isprimary == _FALSE) && padapter->pbuddy_adapter){
|
if ((padapter->isprimary == false) && padapter->pbuddy_adapter){
|
||||||
padapter = padapter->pbuddy_adapter;
|
padapter = padapter->pbuddy_adapter;
|
||||||
pwrpriv = &padapter->pwrctrlpriv;
|
pwrpriv = &padapter->pwrctrlpriv;
|
||||||
pmlmepriv = &padapter->mlmepriv;
|
pmlmepriv = &padapter->mlmepriv;
|
||||||
|
@ -1623,22 +1623,22 @@ 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)
|
||||||
|
@ -1663,7 +1663,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_USB_HCI
|
#ifdef CONFIG_USB_HCI
|
||||||
#ifdef CONFIG_AUTOSUSPEND
|
#ifdef CONFIG_AUTOSUSPEND
|
||||||
if (pwrpriv->brfoffbyhw==_TRUE)
|
if (pwrpriv->brfoffbyhw==true)
|
||||||
{
|
{
|
||||||
DBG_88E("hw still in rf_off state ...........\n");
|
DBG_88E("hw still in rf_off state ...........\n");
|
||||||
ret = _FAIL;
|
ret = _FAIL;
|
||||||
|
@ -1705,7 +1705,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
||||||
, padapter->bDriverStopped
|
, padapter->bDriverStopped
|
||||||
, padapter->bup
|
, padapter->bup
|
||||||
, padapter->hw_init_completed);
|
, padapter->hw_init_completed);
|
||||||
ret= _FALSE;
|
ret= false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1734,7 +1734,7 @@ int rtw_pm_set_lps(_adapter *padapter, u8 mode)
|
||||||
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
|
||||||
|
|
174
core/rtw_recv.c
174
core/rtw_recv.c
|
@ -200,7 +200,7 @@ union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue)
|
||||||
struct recv_priv *precvpriv;
|
struct recv_priv *precvpriv;
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if (_rtw_queue_empty(pfree_recv_queue) == _TRUE)
|
if (_rtw_queue_empty(pfree_recv_queue) == true)
|
||||||
{
|
{
|
||||||
precvframe = NULL;
|
precvframe = NULL;
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
||||||
_enter_critical_ex(&queue->lock, &irqL);
|
_enter_critical_ex(&queue->lock, &irqL);
|
||||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||||
|
|
||||||
if (_rtw_queue_empty(queue) == _TRUE)
|
if (_rtw_queue_empty(queue) == true)
|
||||||
{
|
{
|
||||||
precvbuf = NULL;
|
precvbuf = NULL;
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,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;
|
||||||
|
@ -521,7 +521,7 @@ _func_enter_;
|
||||||
//DBG_88E("\n recvframe_chkmic: bcmc key psecuritypriv->dot118021XGrpKeyid(%d),pmlmeinfo->key_index(%d) ,recv key_id(%d)\n",
|
//DBG_88E("\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;
|
||||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n"));
|
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n"));
|
||||||
|
@ -546,17 +546,17 @@ _func_enter_;
|
||||||
|
|
||||||
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)){
|
||||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("recvframe_chkmic:miccode[%d](%02x) != *(pframemic+%d)(%02x) ",i,miccode[i],i,*(pframemic+i)));
|
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("recvframe_chkmic:miccode[%d](%02x) != *(pframemic+%d)(%02x) ",i,miccode[i],i,*(pframemic+i)));
|
||||||
bmic_err=_TRUE;
|
bmic_err=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (bmic_err==_TRUE){
|
if (bmic_err==true){
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||||
*(pframemic-8),*(pframemic-7),*(pframemic-6),*(pframemic-5),*(pframemic-4),*(pframemic-3),*(pframemic-2),*(pframemic-1)));
|
*(pframemic-8),*(pframemic-7),*(pframemic-6),*(pframemic-5),*(pframemic-4),*(pframemic-3),*(pframemic-2),*(pframemic-1)));
|
||||||
|
@ -583,10 +583,10 @@ _func_enter_;
|
||||||
|
|
||||||
// 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,(u8)IS_MCAST(prxattrib->ra));
|
rtw_handle_tkip_mic_err(adapter,(u8)IS_MCAST(prxattrib->ra));
|
||||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,(" mic error :prxattrib->bdecrypted=%d ",prxattrib->bdecrypted));
|
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,(" mic error :prxattrib->bdecrypted=%d ",prxattrib->bdecrypted));
|
||||||
|
@ -603,9 +603,9 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
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;
|
||||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("psecuritypriv->bcheck_grpkey =_TRUE"));
|
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("psecuritypriv->bcheck_grpkey =true"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,13 +663,13 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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_DECRYPTOR
|
#ifdef DBG_RX_DECRYPTOR
|
||||||
DBG_88E("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
DBG_88E("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
||||||
|
@ -701,7 +701,7 @@ _func_enter_;
|
||||||
&& (psecuritypriv->busetkipkey==1 || prxattrib->encrypt !=_TKIP_ )
|
&& (psecuritypriv->busetkipkey==1 || prxattrib->encrypt !=_TKIP_ )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
psecuritypriv->hw_decrypted=_TRUE;
|
psecuritypriv->hw_decrypted=true;
|
||||||
#ifdef DBG_RX_DECRYPTOR
|
#ifdef DBG_RX_DECRYPTOR
|
||||||
DBG_88E("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
DBG_88E("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
||||||
, prxattrib->bdecrypted ,prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
, prxattrib->bdecrypted ,prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
||||||
|
@ -1129,8 +1129,8 @@ sint sta2sta_data_frame(
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
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
|
||||||
|
@ -1155,7 +1155,7 @@ _func_enter_;
|
||||||
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
|
||||||
|
|
||||||
|
@ -1253,7 +1253,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
{
|
{
|
||||||
if (bmcast)
|
if (bmcast)
|
||||||
{
|
{
|
||||||
|
@ -1275,7 +1275,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
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, GetAddr2Ptr(ptr), ETH_ALEN);
|
_rtw_memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
|
||||||
|
@ -1307,7 +1307,7 @@ _func_enter_;
|
||||||
#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
|
||||||
|
@ -1341,9 +1341,9 @@ sint ap2sta_data_frame(
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
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 )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1420,8 +1420,8 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
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, GetAddr2Ptr(ptr), ETH_ALEN);
|
_rtw_memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
|
||||||
|
@ -1445,7 +1445,7 @@ _func_enter_;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
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;
|
||||||
|
@ -1496,7 +1496,7 @@ sint sta2ap_data_frame(
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
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))
|
||||||
|
@ -1632,7 +1632,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);
|
||||||
|
|
||||||
|
@ -1652,7 +1652,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
//DBG_88E("handling ps-poll, q_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
//DBG_88E("handling ps-poll, q_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
||||||
|
|
||||||
_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);
|
||||||
}
|
}
|
||||||
|
@ -1666,7 +1666,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, _FALSE);
|
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1692,7 +1692,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, _FALSE);
|
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1733,7 +1733,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
||||||
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBEREQ)
|
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBEREQ)
|
||||||
psta->sta_stats.rx_probereq_pkts++;
|
psta->sta_stats.rx_probereq_pkts++;
|
||||||
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) {
|
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) {
|
||||||
if (_rtw_memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == _TRUE)
|
if (_rtw_memcmp(padapter->eeprompriv.mac_addr, 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)))
|
||||||
|
@ -1745,7 +1745,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
#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 ;
|
||||||
|
@ -1904,7 +1904,7 @@ _func_enter_;
|
||||||
|
|
||||||
if (pattrib->priority!=0 && pattrib->priority!=3)
|
if (pattrib->priority!=0 && pattrib->priority!=3)
|
||||||
{
|
{
|
||||||
adapter->recvpriv.bIsAnyNonBEPkts = _TRUE;
|
adapter->recvpriv.bIsAnyNonBEPkts = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2194,16 +2194,16 @@ _func_enter_;
|
||||||
/* 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);
|
||||||
|
@ -2215,7 +2215,7 @@ _func_enter_;
|
||||||
eth_type= ntohs((unsigned short )eth_type); //pattrib->ether_type
|
eth_type= ntohs((unsigned short )eth_type); //pattrib->ether_type
|
||||||
pattrib->eth_type = eth_type;
|
pattrib->eth_type = eth_type;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -2269,12 +2269,12 @@ _func_enter_;
|
||||||
if (psnap->dsap==0xaa && psnap->ssap==0xaa && psnap->ctrl==0x03)
|
if (psnap->dsap==0xaa && psnap->ssap==0xaa && psnap->ctrl==0x03)
|
||||||
{
|
{
|
||||||
if (_rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
if (_rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
||||||
bsnaphdr=_TRUE;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
bsnaphdr=true;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||||
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
||||||
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
||||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||||
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
||||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||||
else {
|
else {
|
||||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("drop pkt due to invalid frame format!\n"));
|
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("drop pkt due to invalid frame format!\n"));
|
||||||
ret= _FAIL;
|
ret= _FAIL;
|
||||||
|
@ -2282,12 +2282,12 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else
|
} else
|
||||||
bsnaphdr=_FALSE;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
bsnaphdr=false;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||||
|
|
||||||
rmv_len = pattrib->hdrlen + pattrib->iv_len +(bsnaphdr?SNAP_SIZE:0);
|
rmv_len = pattrib->hdrlen + pattrib->iv_len +(bsnaphdr?SNAP_SIZE:0);
|
||||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("===pattrib->hdrlen: %x, pattrib->iv_len:%x ===\n", pattrib->hdrlen, pattrib->iv_len));
|
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("===pattrib->hdrlen: %x, pattrib->iv_len:%x ===\n", pattrib->hdrlen, pattrib->iv_len));
|
||||||
|
|
||||||
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;
|
||||||
|
@ -2482,7 +2482,7 @@ _func_enter_;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -2584,7 +2584,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
@ -2816,7 +2816,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
||||||
#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) )
|
||||||
{
|
{
|
||||||
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
||||||
if (nat25_handle_frame(padapter, sub_skb) == -1) {
|
if (nat25_handle_frame(padapter, sub_skb) == -1) {
|
||||||
|
@ -2971,16 +2971,16 @@ exit:
|
||||||
{
|
{
|
||||||
if ( _rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
if ( _rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
||||||
{
|
{
|
||||||
bsnaphdr=_TRUE;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
bsnaphdr=true;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||||
}
|
}
|
||||||
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
||||||
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
||||||
{
|
{
|
||||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||||
}
|
}
|
||||||
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
||||||
{
|
{
|
||||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
bsnaphdr=true; //wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2998,7 +2998,7 @@ exit:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bsnaphdr=_FALSE;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
bsnaphdr=false;//wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr += (bsnaphdr?SNAP_SIZE:0);
|
ptr += (bsnaphdr?SNAP_SIZE:0);
|
||||||
|
@ -3104,7 +3104,7 @@ exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((padapter->bDriverStopped ==_FALSE)&&( padapter->bSurpriseRemoved==_FALSE) )
|
if ((padapter->bDriverStopped ==false)&&( padapter->bSurpriseRemoved==false) )
|
||||||
{
|
{
|
||||||
rtw_recv_indicatepkt(padapter, pnrframe);//indicate this recv_frame
|
rtw_recv_indicatepkt(padapter, pnrframe);//indicate this recv_frame
|
||||||
}
|
}
|
||||||
|
@ -3159,7 +3159,7 @@ int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -3194,7 +3194,7 @@ int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
||||||
|
|
||||||
//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;
|
||||||
}
|
}
|
||||||
|
|
||||||
int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe);
|
int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe);
|
||||||
|
@ -3215,7 +3215,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
||||||
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;
|
||||||
|
@ -3231,7 +3231,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
||||||
|
|
||||||
//_exit_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
//_exit_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
||||||
|
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3255,7 +3255,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
||||||
|
|
||||||
|
|
||||||
//RT_TRACE(COMP_RX_REORDER, DBG_TRACE, ("InsertRxReorderList(): Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n", pTS->RxIndicateSeq, SeqNum));
|
//RT_TRACE(COMP_RX_REORDER, DBG_TRACE, ("InsertRxReorderList(): Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n", pTS->RxIndicateSeq, SeqNum));
|
||||||
return _TRUE;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3268,7 +3268,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;
|
||||||
|
|
||||||
|
@ -3281,10 +3281,10 @@ 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)
|
||||||
{
|
{
|
||||||
if (rtw_is_list_empty(phead))
|
if (rtw_is_list_empty(phead))
|
||||||
return _TRUE;
|
return true;
|
||||||
|
|
||||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||||
pattrib = &prframe->u.hdr.attrib;
|
pattrib = &prframe->u.hdr.attrib;
|
||||||
|
@ -3326,8 +3326,8 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
||||||
//indicate this recv_frame
|
//indicate this recv_frame
|
||||||
if (!pattrib->amsdu)
|
if (!pattrib->amsdu)
|
||||||
{
|
{
|
||||||
if ((padapter->bDriverStopped == _FALSE) &&
|
if ((padapter->bDriverStopped == false) &&
|
||||||
(padapter->bSurpriseRemoved == _FALSE))
|
(padapter->bSurpriseRemoved == false))
|
||||||
{
|
{
|
||||||
|
|
||||||
rtw_recv_indicatepkt(padapter, prframe);//indicate this recv_frame
|
rtw_recv_indicatepkt(padapter, prframe);//indicate this recv_frame
|
||||||
|
@ -3348,12 +3348,12 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3381,7 +3381,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
||||||
*/
|
*/
|
||||||
//_exit_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
//_exit_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
||||||
|
|
||||||
//return _TRUE;
|
//return true;
|
||||||
return bPktInBuf;
|
return bPktInBuf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3403,8 +3403,8 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||||
if ((pattrib->qos!=1) /*|| pattrib->priority!=0 || IS_MCAST(pattrib->ra)*/
|
if ((pattrib->qos!=1) /*|| pattrib->priority!=0 || IS_MCAST(pattrib->ra)*/
|
||||||
|| (pattrib->eth_type==0x0806) || (pattrib->ack_policy!=0))
|
|| (pattrib->eth_type==0x0806) || (pattrib->ack_policy!=0))
|
||||||
{
|
{
|
||||||
if ((padapter->bDriverStopped == _FALSE) &&
|
if ((padapter->bDriverStopped == false) &&
|
||||||
(padapter->bSurpriseRemoved == _FALSE))
|
(padapter->bSurpriseRemoved == false))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ recv_indicatepkt_reorder -recv_func recv_indicatepkt\n" ));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ recv_indicatepkt_reorder -recv_func recv_indicatepkt\n" ));
|
||||||
|
|
||||||
|
@ -3421,7 +3421,7 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preorder_ctrl->enable == _FALSE)
|
if (preorder_ctrl->enable == false)
|
||||||
{
|
{
|
||||||
//indicate this recv_frame
|
//indicate this recv_frame
|
||||||
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||||
|
@ -3450,7 +3450,7 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||||
}
|
}
|
||||||
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 = pattrib->seq_num;
|
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||||
#ifdef DBG_RX_SEQ
|
#ifdef DBG_RX_SEQ
|
||||||
|
@ -3530,8 +3530,8 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||||
// 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)
|
||||||
{
|
{
|
||||||
_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);
|
||||||
|
@ -3572,7 +3572,7 @@ 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 (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);
|
||||||
}
|
}
|
||||||
|
@ -3597,12 +3597,12 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
||||||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||||
|
|
||||||
#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];
|
||||||
|
@ -3613,8 +3613,8 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
||||||
DBG_88E("DBG_RX_DROP_FRAME %s recv_indicatepkt_reorder error!\n", __func__);
|
DBG_88E("DBG_RX_DROP_FRAME %s recv_indicatepkt_reorder error!\n", __func__);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((padapter->bDriverStopped == _FALSE) &&
|
if ((padapter->bDriverStopped == false) &&
|
||||||
(padapter->bSurpriseRemoved == _FALSE))
|
(padapter->bSurpriseRemoved == false))
|
||||||
{
|
{
|
||||||
retval = _FAIL;
|
retval = _FAIL;
|
||||||
return retval;
|
return retval;
|
||||||
|
@ -3634,7 +3634,7 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((padapter->bDriverStopped ==_FALSE)&&( padapter->bSurpriseRemoved==_FALSE))
|
if ((padapter->bDriverStopped ==false)&&( padapter->bSurpriseRemoved==false))
|
||||||
{
|
{
|
||||||
//indicate this recv_frame
|
//indicate this recv_frame
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ process_recv_indicatepkts- recv_func recv_indicatepkt\n" ));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ process_recv_indicatepkts- recv_func recv_indicatepkt\n" ));
|
||||||
|
@ -3671,14 +3671,14 @@ int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
|
||||||
#ifdef CONFIG_MP_INCLUDED
|
#ifdef CONFIG_MP_INCLUDED
|
||||||
if (padapter->registrypriv.mp_mode == 1)
|
if (padapter->registrypriv.mp_mode == 1)
|
||||||
{
|
{
|
||||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE))//&&(padapter->mppriv.check_mp_pkt == 0))
|
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == 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
|
||||||
padapter->mppriv.rx_pktcount++;
|
padapter->mppriv.rx_pktcount++;
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_MP_LPBK_STATE) == _FALSE) {
|
if (check_fwstate(pmlmepriv, WIFI_MP_LPBK_STATE) == false) {
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("MP - Not in loopback mode , drop pkt\n"));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("MP - Not in loopback mode , drop pkt\n"));
|
||||||
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
|
||||||
|
@ -3798,7 +3798,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
|
||||||
goto _recv_data_drop;
|
goto _recv_data_drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((padapter->bDriverStopped == _FALSE) && (padapter->bSurpriseRemoved == _FALSE))
|
if ((padapter->bDriverStopped == false) && (padapter->bSurpriseRemoved == false))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("@@@@ recv_func: recv_func rtw_recv_indicatepkt\n" ));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("@@@@ recv_func: recv_func rtw_recv_indicatepkt\n" ));
|
||||||
//indicate this recv_frame
|
//indicate this recv_frame
|
||||||
|
@ -3883,7 +3883,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) &&
|
||||||
!is_wep_enc(psecuritypriv->dot11PrivacyAlgrthm) &&
|
!is_wep_enc(psecuritypriv->dot11PrivacyAlgrthm) &&
|
||||||
!psecuritypriv->busetkipkey) {
|
!psecuritypriv->busetkipkey) {
|
||||||
rtw_enqueue_recvframe(rframe, &padapter->recvpriv.uc_swdec_pending_queue);
|
rtw_enqueue_recvframe(rframe, &padapter->recvpriv.uc_swdec_pending_queue);
|
||||||
|
@ -3974,7 +3974,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
||||||
}
|
}
|
||||||
|
|
||||||
//update value of signal_strength, rssi, signal_qual
|
//update value of signal_strength, rssi, signal_qual
|
||||||
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == _FALSE) {
|
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == false) {
|
||||||
tmp_s = (avg_signal_strength+(_alpha-1)*recvpriv->signal_strength);
|
tmp_s = (avg_signal_strength+(_alpha-1)*recvpriv->signal_strength);
|
||||||
if (tmp_s %_alpha)
|
if (tmp_s %_alpha)
|
||||||
tmp_s = tmp_s/_alpha + 1;
|
tmp_s = tmp_s/_alpha + 1;
|
||||||
|
|
|
@ -792,7 +792,7 @@ _func_enter_;
|
||||||
|
|
||||||
if (IS_MCAST(prxattrib->ra))
|
if (IS_MCAST(prxattrib->ra))
|
||||||
{
|
{
|
||||||
if (psecuritypriv->binstallGrpkey==_FALSE)
|
if (psecuritypriv->binstallGrpkey==false)
|
||||||
{
|
{
|
||||||
res=_FAIL;
|
res=_FAIL;
|
||||||
DBG_88E("%s:rx bc/mc packets,but didn't install group key!!!!!!!!!!\n",__func__);
|
DBG_88E("%s:rx bc/mc packets,but didn't install group key!!!!!!!!!!\n",__func__);
|
||||||
|
@ -1915,7 +1915,7 @@ _func_enter_;
|
||||||
//in concurrent we should use sw descrypt in group key, so we remove this message
|
//in concurrent we should use sw descrypt in group key, so we remove this message
|
||||||
//DBG_88E("rx bc/mc packets, to perform sw rtw_aes_decrypt\n");
|
//DBG_88E("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;
|
||||||
DBG_88E("%s:rx bc/mc packets,but didn't install group key!!!!!!!!!!\n",__func__);
|
DBG_88E("%s:rx bc/mc packets,but didn't install group key!!!!!!!!!!\n",__func__);
|
||||||
|
@ -2865,7 +2865,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
padapter->securitypriv.busetkipkey=_TRUE;
|
padapter->securitypriv.busetkipkey=true;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler padapter->securitypriv.busetkipkey=%d^^^\n",padapter->securitypriv.busetkipkey));
|
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler padapter->securitypriv.busetkipkey=%d^^^\n",padapter->securitypriv.busetkipkey));
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,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;
|
||||||
|
@ -37,7 +37,7 @@ void sreset_reset_value(_adapter *padapter)
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -51,7 +51,7 @@ u8 sreset_get_wifi_status(_adapter *padapter)
|
||||||
u8 status = WIFI_STATUS_SUCCESS;
|
u8 status = WIFI_STATUS_SUCCESS;
|
||||||
u32 val32 = 0;
|
u32 val32 = 0;
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
if (psrtpriv->silent_reset_inprogress == _TRUE)
|
if (psrtpriv->silent_reset_inprogress == true)
|
||||||
{
|
{
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ _func_enter_;
|
||||||
|
|
||||||
psta->capability = 0;
|
psta->capability = 0;
|
||||||
|
|
||||||
psta->bpairwise_key_installed = _FALSE;
|
psta->bpairwise_key_installed = false;
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_NATIVEAP_MLME
|
#ifdef CONFIG_NATIVEAP_MLME
|
||||||
|
@ -237,7 +237,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
@ -292,7 +292,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
@ -339,7 +339,7 @@ _func_enter_;
|
||||||
|
|
||||||
_enter_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
_enter_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||||
|
|
||||||
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE)
|
if (_rtw_queue_empty(pfree_sta_queue) == true)
|
||||||
{
|
{
|
||||||
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||||
psta = NULL;
|
psta = NULL;
|
||||||
|
@ -409,7 +409,7 @@ _func_enter_;
|
||||||
|
|
||||||
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
|
||||||
|
@ -568,7 +568,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(psta->state & WIFI_AP_STATE))
|
if (!(psta->state & WIFI_AP_STATE))
|
||||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, _FALSE);
|
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, false);
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
|
||||||
|
@ -710,12 +710,12 @@ _func_enter_;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -785,12 +785,12 @@ _func_exit_;
|
||||||
|
|
||||||
u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
||||||
{
|
{
|
||||||
u8 res = _TRUE;
|
u8 res = true;
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
_list *plist, *phead;
|
_list *plist, *phead;
|
||||||
struct rtw_wlan_acl_node *paclnode;
|
struct rtw_wlan_acl_node *paclnode;
|
||||||
u8 match = _FALSE;
|
u8 match = false;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||||
|
@ -798,16 +798,16 @@ u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
||||||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||||
phead = get_list_head(pacl_node_q);
|
phead = get_list_head(pacl_node_q);
|
||||||
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)
|
||||||
{
|
{
|
||||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
|
|
||||||
if (_rtw_memcmp(paclnode->addr, mac_addr, ETH_ALEN))
|
if (_rtw_memcmp(paclnode->addr, mac_addr, ETH_ALEN))
|
||||||
{
|
{
|
||||||
if (paclnode->valid == _TRUE)
|
if (paclnode->valid == true)
|
||||||
{
|
{
|
||||||
match = _TRUE;
|
match = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -817,15 +817,15 @@ u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
||||||
|
|
||||||
if (pacl_list->mode == 1)//accept unless in deny list
|
if (pacl_list->mode == 1)//accept unless in deny list
|
||||||
{
|
{
|
||||||
res = (match == _TRUE) ? _FALSE:_TRUE;
|
res = (match == true) ? false:true;
|
||||||
}
|
}
|
||||||
else if (pacl_list->mode == 2)//deny unless in accept list
|
else if (pacl_list->mode == 2)//deny unless in accept list
|
||||||
{
|
{
|
||||||
res = (match == _TRUE) ? _TRUE:_FALSE;
|
res = (match == true) ? true:false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
res = _TRUE;
|
res = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,10 +34,10 @@ 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;
|
||||||
ptdlsinfo->setup_state = TDLS_STATE_NONE;
|
ptdlsinfo->setup_state = TDLS_STATE_NONE;
|
||||||
ptdlsinfo->sta_cnt = 0;
|
ptdlsinfo->sta_cnt = 0;
|
||||||
ptdlsinfo->sta_maximum = _FALSE;
|
ptdlsinfo->sta_maximum = false;
|
||||||
ptdlsinfo->macid_index= 6;
|
ptdlsinfo->macid_index= 6;
|
||||||
ptdlsinfo->clear_cam= 0;
|
ptdlsinfo->clear_cam= 0;
|
||||||
ptdlsinfo->ch_sensing = 0;
|
ptdlsinfo->ch_sensing = 0;
|
||||||
|
@ -166,7 +166,7 @@ s32 update_tdls_attrib(_adapter *padapter, struct pkt_attrib *pattrib)
|
||||||
pattrib->priority = 0;
|
pattrib->priority = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (psta->ieee8021x_blocked == _TRUE)
|
if (psta->ieee8021x_blocked == true)
|
||||||
{
|
{
|
||||||
pattrib->encrypt = 0;
|
pattrib->encrypt = 0;
|
||||||
}
|
}
|
||||||
|
@ -217,11 +217,11 @@ s32 update_tdls_attrib(_adapter *padapter, struct pkt_attrib *pattrib)
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//qos_en, ht_en, init rate, ,bw, ch_offset, sgi
|
//qos_en, ht_en, init rate, ,bw, ch_offset, sgi
|
||||||
|
@ -231,12 +231,12 @@ s32 update_tdls_attrib(_adapter *padapter, struct pkt_attrib *pattrib)
|
||||||
pattrib->bwmode = psta->htpriv.bwmode;
|
pattrib->bwmode = psta->htpriv.bwmode;
|
||||||
pattrib->ch_offset = psta->htpriv.ch_offset;
|
pattrib->ch_offset = psta->htpriv.ch_offset;
|
||||||
pattrib->sgi= psta->htpriv.sgi;
|
pattrib->sgi= psta->htpriv.sgi;
|
||||||
pattrib->ampdu_en = _FALSE;
|
pattrib->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;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -257,13 +257,13 @@ 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);
|
||||||
if ( ptdlsinfo->sta_cnt < (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
if ( ptdlsinfo->sta_cnt < (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
||||||
{
|
{
|
||||||
ptdlsinfo->sta_maximum = _FALSE;
|
ptdlsinfo->sta_maximum = false;
|
||||||
_rtw_memset( &ptdlsinfo->ss_record, 0x00, sizeof(struct tdls_ss_record) );
|
_rtw_memset( &ptdlsinfo->ss_record, 0x00, sizeof(struct tdls_ss_record) );
|
||||||
}
|
}
|
||||||
//ready to clear cam
|
//ready to clear cam
|
||||||
if (ptdls_sta->mac_id!=0){
|
if (ptdls_sta->mac_id!=0){
|
||||||
ptdlsinfo->clear_cam=ptdls_sta->mac_id;
|
ptdlsinfo->clear_cam=ptdls_sta->mac_id;
|
||||||
rtw_setstakey_cmd(padapter, (u8 *)ptdls_sta, _TRUE);
|
rtw_setstakey_cmd(padapter, (u8 *)ptdls_sta, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ptdlsinfo->sta_cnt==0){
|
if (ptdlsinfo->sta_cnt==0){
|
||||||
|
@ -294,7 +294,7 @@ void rtw_tdls_set_key(_adapter *adapter, struct rx_pkt_attrib *prx_pkt_attrib, s
|
||||||
if (prx_pkt_attrib->encrypt)
|
if (prx_pkt_attrib->encrypt)
|
||||||
{
|
{
|
||||||
ptdls_sta->dot118021XPrivacy=_AES_;
|
ptdls_sta->dot118021XPrivacy=_AES_;
|
||||||
rtw_setstakey_cmd(adapter, (u8*)ptdls_sta, _TRUE);
|
rtw_setstakey_cmd(adapter, (u8*)ptdls_sta, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,13 +315,13 @@ void rtw_tdls_process_ht_cap(_adapter *adapter, struct sta_info *ptdls_sta, u8 *
|
||||||
|
|
||||||
if (ptdls_sta->flags & WLAN_STA_HT)
|
if (ptdls_sta->flags & WLAN_STA_HT)
|
||||||
{
|
{
|
||||||
if (adapter->registrypriv.ht_enable == _TRUE)
|
if (adapter->registrypriv.ht_enable == true)
|
||||||
{
|
{
|
||||||
ptdls_sta->htpriv.ht_option = _TRUE;
|
ptdls_sta->htpriv.ht_option = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptdls_sta->htpriv.ht_option = _FALSE;
|
ptdls_sta->htpriv.ht_option = false;
|
||||||
ptdls_sta->stat_code = _STATS_FAILURE_;
|
ptdls_sta->stat_code = _STATS_FAILURE_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,12 +331,12 @@ void rtw_tdls_process_ht_cap(_adapter *adapter, struct sta_info *ptdls_sta, u8 *
|
||||||
{
|
{
|
||||||
//check if sta supports rx ampdu
|
//check if sta supports rx ampdu
|
||||||
if (adapter->registrypriv.ampdu_enable==1)
|
if (adapter->registrypriv.ampdu_enable==1)
|
||||||
ptdls_sta->htpriv.ampdu_enable = _TRUE;
|
ptdls_sta->htpriv.ampdu_enable = true;
|
||||||
|
|
||||||
//check if sta support s Short GI
|
//check if sta support s Short GI
|
||||||
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40))
|
if (ptdls_sta->htpriv.ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40))
|
||||||
{
|
{
|
||||||
ptdls_sta->htpriv.sgi = _TRUE;
|
ptdls_sta->htpriv.sgi = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// bwmode would still followed AP's setting
|
// bwmode would still followed AP's setting
|
||||||
|
@ -550,7 +550,7 @@ void issue_tdls_setup_req(_adapter *padapter, u8 *mac_addr)
|
||||||
static u8 dialogtoken = 0;
|
static u8 dialogtoken = 0;
|
||||||
u32 timeout_interval= TPK_RESEND_COUNT * 1000; //retry timer should set at least 301 sec, using TPK_count counting 301 times.
|
u32 timeout_interval= TPK_RESEND_COUNT * 1000; //retry timer should set at least 301 sec, using TPK_count counting 301 times.
|
||||||
|
|
||||||
if (ptdlsinfo->ap_prohibited == _TRUE)
|
if (ptdlsinfo->ap_prohibited == true)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
|
@ -586,7 +586,7 @@ void issue_tdls_setup_req(_adapter *padapter, u8 *mac_addr)
|
||||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||||
if ( ptdlsinfo->sta_cnt == (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
if ( ptdlsinfo->sta_cnt == (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
||||||
{
|
{
|
||||||
ptdlsinfo->sta_maximum = _TRUE;
|
ptdlsinfo->sta_maximum = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -992,9 +992,9 @@ void issue_tdls_ch_switch_rsp(_adapter *padapter, u8 *mac_addr)
|
||||||
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, TDLS_CHANNEL_SWITCH_RESPONSE) !=_SUCCESS ){
|
if (rtw_xmit_tdls_coalesce(padapter, pmgntframe, TDLS_CHANNEL_SWITCH_RESPONSE) !=_SUCCESS ){
|
||||||
|
@ -1032,7 +1032,7 @@ sint On_TDLS_Dis_Rsp(_adapter *adapter, union recv_frame *precv_frame)
|
||||||
ptdls_sta->tdls_sta_state |= TDLS_ALIVE_STATE;
|
ptdls_sta->tdls_sta_state |= TDLS_ALIVE_STATE;
|
||||||
|
|
||||||
//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) )
|
||||||
{
|
{
|
||||||
|
@ -1052,7 +1052,7 @@ sint On_TDLS_Dis_Rsp(_adapter *adapter, 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 ) )
|
||||||
{
|
{
|
||||||
|
@ -1122,7 +1122,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
|
||||||
-PAYLOAD_TYPE_LEN
|
-PAYLOAD_TYPE_LEN
|
||||||
-FIXED_IE;
|
-FIXED_IE;
|
||||||
|
|
||||||
if (ptdlsinfo->ap_prohibited == _TRUE)
|
if (ptdlsinfo->ap_prohibited == true)
|
||||||
{
|
{
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -1192,7 +1192,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
|
||||||
ppairwise_cipher=prsnie+10;
|
ppairwise_cipher=prsnie+10;
|
||||||
_rtw_memcpy(&pairwise_count, (u16*)(ppairwise_cipher-2), 1);
|
_rtw_memcpy(&pairwise_count, (u16*)(ppairwise_cipher-2), 1);
|
||||||
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_have=1;
|
ccmp_have=1;
|
||||||
}
|
}
|
||||||
if (ccmp_have==0){
|
if (ccmp_have==0){
|
||||||
|
@ -1221,7 +1221,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, 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)
|
||||||
{
|
{
|
||||||
//not in the same BSS
|
//not in the same BSS
|
||||||
ptdls_sta->stat_code=7;
|
ptdls_sta->stat_code=7;
|
||||||
|
@ -1275,7 +1275,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
|
||||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||||
if ( ptdlsinfo->sta_cnt == (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
if ( ptdlsinfo->sta_cnt == (NUM_STA - 2) ) // -2: AP + BC/MC sta
|
||||||
{
|
{
|
||||||
ptdlsinfo->sta_maximum = _TRUE;
|
ptdlsinfo->sta_maximum = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_WFD
|
#ifdef CONFIG_WFD
|
||||||
|
@ -1380,7 +1380,7 @@ sint On_TDLS_Setup_Rsp(_adapter *adapter, 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_:
|
||||||
|
@ -1611,7 +1611,7 @@ sint On_TDLS_Dis_Req(_adapter *adapter, union recv_frame *precv_frame)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
dst = pIE->data + 12;
|
dst = pIE->data + 12;
|
||||||
if ( (MacAddr_isBcst(dst) == _FALSE) && (_rtw_memcmp(myid(&(adapter->eeprompriv)), dst, 6) == _FALSE) )
|
if ( (MacAddr_isBcst(dst) == false) && (_rtw_memcmp(myid(&(adapter->eeprompriv)), dst, 6) == false) )
|
||||||
{
|
{
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -1716,7 +1716,7 @@ sint On_TDLS_Peer_Traffic_Rsp(_adapter *adapter, 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);
|
||||||
|
@ -1731,7 +1731,7 @@ sint On_TDLS_Peer_Traffic_Rsp(_adapter *adapter, union recv_frame *precv_frame)
|
||||||
pxmitframe->attrib.eosp = 1;
|
pxmitframe->attrib.eosp = 1;
|
||||||
}
|
}
|
||||||
//pxmitframe->attrib.triggered = 1; //maybe doesn't need in TDLS
|
//pxmitframe->attrib.triggered = 1; //maybe doesn't need in TDLS
|
||||||
if (adapter->HalFunc.hal_xmit(adapter, pxmitframe) == _TRUE)
|
if (adapter->HalFunc.hal_xmit(adapter, pxmitframe) == true)
|
||||||
{
|
{
|
||||||
rtw_os_xmit_complete(adapter, pxmitframe);
|
rtw_os_xmit_complete(adapter, pxmitframe);
|
||||||
}
|
}
|
||||||
|
@ -1987,7 +1987,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 );
|
||||||
}
|
}
|
||||||
|
@ -2880,7 +2880,7 @@ int update_sgi_tdls(_adapter *padapter, struct sta_info *psta)
|
||||||
return psta_ht->sgi;
|
return psta_ht->sgi;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 update_mask_tdls(_adapter *padapter, struct sta_info *psta)
|
u32 update_mask_tdls(_adapter *padapter, struct sta_info *psta)
|
||||||
|
|
|
@ -82,10 +82,10 @@ int cckrates_included(unsigned char *rate, int ratelen)
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,10 +97,10 @@ int cckratesonly_included(unsigned char *rate, int ratelen)
|
||||||
{
|
{
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char networktype_to_raid(unsigned char network_type)
|
unsigned char networktype_to_raid(unsigned char network_type)
|
||||||
|
@ -163,11 +163,11 @@ u8 judge_network_type(_adapter *padapter, unsigned char *rate, int ratelen)
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -256,12 +256,12 @@ int is_basicrate(_adapter *padapter, unsigned char rate)
|
||||||
{
|
{
|
||||||
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);
|
||||||
|
@ -287,7 +287,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;
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ void UpdateBrateTblForSoftAP(u8 *bssrateset, u32 bssratelen)
|
||||||
|
|
||||||
void Save_DM_Func_Flag(_adapter *padapter)
|
void Save_DM_Func_Flag(_adapter *padapter)
|
||||||
{
|
{
|
||||||
u8 bSaveFlag = _TRUE;
|
u8 bSaveFlag = true;
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||||
|
@ -374,7 +374,7 @@ void Save_DM_Func_Flag(_adapter *padapter)
|
||||||
|
|
||||||
void Restore_DM_Func_Flag(_adapter *padapter)
|
void Restore_DM_Func_Flag(_adapter *padapter)
|
||||||
{
|
{
|
||||||
u8 bSaveFlag = _FALSE;
|
u8 bSaveFlag = false;
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||||
if (pbuddy_adapter)
|
if (pbuddy_adapter)
|
||||||
|
@ -389,7 +389,7 @@ void Switch_DM_Func(_adapter *padapter, u32 mode, u8 enable)
|
||||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (enable == _TRUE)
|
if (enable == true)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (pbuddy_adapter)
|
if (pbuddy_adapter)
|
||||||
|
@ -649,7 +649,7 @@ int is_client_associated_to_ap(_adapter *padapter)
|
||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
|
@ -664,7 +664,7 @@ int is_client_associated_to_ibss(_adapter *padapter)
|
||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
|
@ -686,7 +686,7 @@ int is_IBSS_empty(_adapter *padapter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -799,7 +799,7 @@ void flush_all_cam_entry(_adapter *padapter)
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
|
||||||
//if (check_buddy_mlmeinfo_state(padapter, _HW_STATE_NOLINK_))
|
//if (check_buddy_mlmeinfo_state(padapter, _HW_STATE_NOLINK_))
|
||||||
if (check_buddy_fwstate(padapter, _FW_LINKED) == _FALSE)
|
if (check_buddy_fwstate(padapter, _FW_LINKED) == false)
|
||||||
{
|
{
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, 0);
|
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, 0);
|
||||||
}
|
}
|
||||||
|
@ -822,10 +822,10 @@ void flush_all_cam_entry(_adapter *padapter)
|
||||||
cam_id = 4;
|
cam_id = 4;
|
||||||
}
|
}
|
||||||
//clear_cam_entry(padapter, cam_id);
|
//clear_cam_entry(padapter, cam_id);
|
||||||
rtw_clearstakey_cmd(padapter, (u8*)psta, cam_id, _FALSE);
|
rtw_clearstakey_cmd(padapter, (u8*)psta, cam_id, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
{
|
{
|
||||||
//clear cam when ap free per sta_info
|
//clear cam when ap free per sta_info
|
||||||
}
|
}
|
||||||
|
@ -864,7 +864,7 @@ int WFD_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||||
{
|
{
|
||||||
pwdinfo->wfd_info->peer_rtsp_ctrlport = RTW_GET_BE16( attr_content + 2 );
|
pwdinfo->wfd_info->peer_rtsp_ctrlport = RTW_GET_BE16( attr_content + 2 );
|
||||||
DBG_88E( "[%s] Peer PORT NUM = %d\n", __func__, pwdinfo->wfd_info->peer_rtsp_ctrlport );
|
DBG_88E( "[%s] Peer PORT NUM = %d\n", __func__, pwdinfo->wfd_info->peer_rtsp_ctrlport );
|
||||||
return( _TRUE );
|
return( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -891,7 +891,7 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||||
|
|
||||||
pmlmeinfo->WMM_enable = 1;
|
pmlmeinfo->WMM_enable = 1;
|
||||||
_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));
|
||||||
return _TRUE;
|
return true;
|
||||||
|
|
||||||
/*if (pregpriv->wifi_spec == 1)
|
/*if (pregpriv->wifi_spec == 1)
|
||||||
{
|
{
|
||||||
|
@ -904,7 +904,7 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||||
{
|
{
|
||||||
pmlmeinfo->WMM_enable = 1;
|
pmlmeinfo->WMM_enable = 1;
|
||||||
_rtw_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
|
_rtw_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1003,13 +1003,13 @@ void WMMOnAssocRsp(_adapter *padapter)
|
||||||
//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)
|
||||||
|
@ -1022,7 +1022,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1051,7 +1051,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) return;
|
if (phtpriv->ht_option == false) return;
|
||||||
|
|
||||||
if (pIE->Length > sizeof(struct HT_info_element))
|
if (pIE->Length > sizeof(struct HT_info_element))
|
||||||
return;
|
return;
|
||||||
|
@ -1086,7 +1086,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))
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
@ -1096,11 +1096,11 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
||||||
}
|
}
|
||||||
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);
|
||||||
|
@ -1129,7 +1129,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//pmlmeinfo->bwmode_updated = _FALSE;//bwmode_updated done, reset it!
|
//pmlmeinfo->bwmode_updated = false;//bwmode_updated done, reset it!
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif //CONFIG_80211N_HT
|
#endif //CONFIG_80211N_HT
|
||||||
|
@ -1149,7 +1149,7 @@ void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||||
|
|
||||||
if (pIE==NULL) return;
|
if (pIE==NULL) return;
|
||||||
|
|
||||||
if (phtpriv->ht_option == _FALSE) return;
|
if (phtpriv->ht_option == false) return;
|
||||||
|
|
||||||
pmlmeinfo->HT_caps_enable = 1;
|
pmlmeinfo->HT_caps_enable = 1;
|
||||||
|
|
||||||
|
@ -1232,7 +1232,7 @@ void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||||
|
|
||||||
if (pIE==NULL) return;
|
if (pIE==NULL) return;
|
||||||
|
|
||||||
if (phtpriv->ht_option == _FALSE) return;
|
if (phtpriv->ht_option == false) return;
|
||||||
|
|
||||||
|
|
||||||
if (pIE->Length > sizeof(struct HT_info_element))
|
if (pIE->Length > sizeof(struct HT_info_element))
|
||||||
|
@ -1348,14 +1348,14 @@ int check_ap_tdls_prohibited(u8 *pframe, u8 pkt_len)
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
|
|
||||||
|
@ -1381,8 +1381,8 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
||||||
unsigned short ht_cap_info;
|
unsigned short ht_cap_info;
|
||||||
unsigned char ht_info_infos_0;
|
unsigned char ht_info_infos_0;
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
@ -1391,10 +1391,10 @@ 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) {
|
||||||
DBG_88E("Oops: rtw_check_network_encrypt linked but recv other bssid bcn\n" MAC_FMT MAC_FMT,
|
DBG_88E("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;
|
||||||
}
|
}
|
||||||
|
|
||||||
bssid = (WLAN_BSSID_EX *)rtw_zmalloc(sizeof(WLAN_BSSID_EX));
|
bssid = (WLAN_BSSID_EX *)rtw_zmalloc(sizeof(WLAN_BSSID_EX));
|
||||||
|
@ -1465,12 +1465,12 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
||||||
/* checking SSID */
|
/* checking SSID */
|
||||||
if ((p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_)) == NULL) {
|
if ((p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_)) == NULL) {
|
||||||
DBG_88E("%s marc: cannot find SSID for survey event\n", __func__);
|
DBG_88E("%s marc: cannot find SSID for survey event\n", __func__);
|
||||||
hidden_ssid = _TRUE;
|
hidden_ssid = true;
|
||||||
} else {
|
} else {
|
||||||
hidden_ssid = _FALSE;
|
hidden_ssid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((NULL != p) && (_FALSE == hidden_ssid && (*(p + 1)))) {
|
if ((NULL != p) && (false == hidden_ssid && (*(p + 1)))) {
|
||||||
_rtw_memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1));
|
_rtw_memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1));
|
||||||
bssid->Ssid.SsidLength = *(p + 1);
|
bssid->Ssid.SsidLength = *(p + 1);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1483,7 +1483,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
||||||
bssid->Ssid.SsidLength, cur_network->network.Ssid.Ssid,
|
bssid->Ssid.SsidLength, cur_network->network.Ssid.Ssid,
|
||||||
cur_network->network.Ssid.SsidLength));
|
cur_network->network.Ssid.SsidLength));
|
||||||
|
|
||||||
if (_rtw_memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) == _FALSE ||
|
if (_rtw_memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) == false ||
|
||||||
bssid->Ssid.SsidLength != cur_network->network.Ssid.SsidLength) {
|
bssid->Ssid.SsidLength != cur_network->network.Ssid.SsidLength) {
|
||||||
if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) { /* not hidden ssid */
|
if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) { /* not hidden ssid */
|
||||||
DBG_88E("%s(), SSID is not match return FAIL\n", __func__);
|
DBG_88E("%s(), SSID is not match return FAIL\n", __func__);
|
||||||
|
@ -1599,8 +1599,8 @@ 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;
|
||||||
break;
|
break;
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
default:
|
default:
|
||||||
|
@ -1660,14 +1660,14 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
|
||||||
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:
|
||||||
|
@ -1677,11 +1677,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1705,13 +1705,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;
|
||||||
|
@ -1720,11 +1720,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1748,11 +1748,11 @@ unsigned int is_ap_in_wep(_adapter *padapter)
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
@ -1761,11 +1761,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2089,13 +2089,13 @@ void update_IOT_info(_adapter *padapter)
|
||||||
pmlmeinfo->turboMode_cts2self = 0;
|
pmlmeinfo->turboMode_cts2self = 0;
|
||||||
pmlmeinfo->turboMode_rtsen = 1;
|
pmlmeinfo->turboMode_rtsen = 1;
|
||||||
//disable high power
|
//disable high power
|
||||||
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), _FALSE);
|
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
|
||||||
break;
|
break;
|
||||||
case HT_IOT_PEER_REALTEK:
|
case HT_IOT_PEER_REALTEK:
|
||||||
//rtw_write16(padapter, 0x4cc, 0xffff);
|
//rtw_write16(padapter, 0x4cc, 0xffff);
|
||||||
//rtw_write16(padapter, 0x546, 0x01c0);
|
//rtw_write16(padapter, 0x546, 0x01c0);
|
||||||
//disable high power
|
//disable high power
|
||||||
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), _FALSE);
|
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pmlmeinfo->turboMode_cts2self = 0;
|
pmlmeinfo->turboMode_cts2self = 0;
|
||||||
|
@ -2120,7 +2120,7 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap)
|
||||||
{ // 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 );
|
||||||
}
|
}
|
||||||
|
@ -2129,7 +2129,7 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap)
|
||||||
{ // 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 );
|
||||||
}
|
}
|
||||||
|
@ -2207,11 +2207,11 @@ void update_wireless_mode(_adapter *padapter)
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -2320,7 +2320,7 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
|
||||||
preorder_ctrl->indicate_seq = 0xffff;
|
preorder_ctrl->indicate_seq = 0xffff;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
preorder_ctrl->enable =(pmlmeinfo->bAcceptAddbaReq == _TRUE)? _TRUE :_FALSE;
|
preorder_ctrl->enable =(pmlmeinfo->bAcceptAddbaReq == true)? true :false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2371,13 +2371,13 @@ int rtw_handle_dualmac(_adapter *adapter, bool init)
|
||||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||||
if (dvobj->InterfaceNumber == 0) {
|
if (dvobj->InterfaceNumber == 0) {
|
||||||
//set adapter_type/iface type
|
//set adapter_type/iface type
|
||||||
adapter->isprimary = _TRUE;
|
adapter->isprimary = true;
|
||||||
adapter->adapter_type = PRIMARY_ADAPTER;
|
adapter->adapter_type = PRIMARY_ADAPTER;
|
||||||
adapter->iface_type = IFACE_PORT0;
|
adapter->iface_type = IFACE_PORT0;
|
||||||
DBG_88E("%s(): PRIMARY_ADAPTER\n",__func__);
|
DBG_88E("%s(): PRIMARY_ADAPTER\n",__func__);
|
||||||
} else {
|
} else {
|
||||||
//set adapter_type/iface type
|
//set adapter_type/iface type
|
||||||
adapter->isprimary = _FALSE;
|
adapter->isprimary = false;
|
||||||
adapter->adapter_type = SECONDARY_ADAPTER;
|
adapter->adapter_type = SECONDARY_ADAPTER;
|
||||||
adapter->iface_type = IFACE_PORT1;
|
adapter->iface_type = IFACE_PORT1;
|
||||||
DBG_88E("%s(): SECONDARY_ADAPTER\n",__func__);
|
DBG_88E("%s(): SECONDARY_ADAPTER\n",__func__);
|
||||||
|
|
166
core/rtw_xmit.c
166
core/rtw_xmit.c
|
@ -181,7 +181,7 @@ _func_enter_;
|
||||||
|
|
||||||
pxmitbuf->priv_data = NULL;
|
pxmitbuf->priv_data = NULL;
|
||||||
pxmitbuf->padapter = padapter;
|
pxmitbuf->padapter = padapter;
|
||||||
pxmitbuf->ext_tag = _FALSE;
|
pxmitbuf->ext_tag = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
pxmitbuf->pallocated_buf = rtw_zmalloc(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ);
|
pxmitbuf->pallocated_buf = rtw_zmalloc(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ);
|
||||||
|
@ -244,7 +244,7 @@ _func_enter_;
|
||||||
|
|
||||||
pxmitbuf->priv_data = NULL;
|
pxmitbuf->priv_data = NULL;
|
||||||
pxmitbuf->padapter = padapter;
|
pxmitbuf->padapter = padapter;
|
||||||
pxmitbuf->ext_tag = _TRUE;
|
pxmitbuf->ext_tag = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
pxmitbuf->pallocated_buf = rtw_zmalloc(max_xmit_extbuf_size);
|
pxmitbuf->pallocated_buf = rtw_zmalloc(max_xmit_extbuf_size);
|
||||||
|
@ -301,7 +301,7 @@ _func_enter_;
|
||||||
|
|
||||||
|
|
||||||
#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
|
||||||
|
@ -457,10 +457,10 @@ static void update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitf
|
||||||
}
|
}
|
||||||
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;
|
||||||
|
@ -501,7 +501,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;
|
||||||
|
@ -535,16 +535,16 @@ static void update_attrib_phy_info(struct pkt_attrib *pattrib, struct sta_info *
|
||||||
pattrib->bwmode = psta->htpriv.bwmode;
|
pattrib->bwmode = psta->htpriv.bwmode;
|
||||||
pattrib->ch_offset = psta->htpriv.ch_offset;
|
pattrib->ch_offset = psta->htpriv.ch_offset;
|
||||||
pattrib->sgi= psta->htpriv.sgi;
|
pattrib->sgi= psta->htpriv.sgi;
|
||||||
pattrib->ampdu_en = _FALSE;
|
pattrib->ampdu_en = false;
|
||||||
#endif //CONFIG_80211N_HT
|
#endif //CONFIG_80211N_HT
|
||||||
//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;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
pattrib->retry_ctrl = _FALSE;
|
pattrib->retry_ctrl = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -633,8 +633,8 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
||||||
|
|
||||||
pattrib->pctrl = 0;
|
pattrib->pctrl = 0;
|
||||||
|
|
||||||
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, pattrib->src, ETH_ALEN);
|
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
@ -712,7 +712,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
||||||
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)))
|
||||||
{
|
{
|
||||||
res =_FAIL;
|
res =_FAIL;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -764,17 +764,17 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
||||||
|
|
||||||
//pattrib->priority = 5; //force to used VI queue, for testing
|
//pattrib->priority = 5; //force to used VI queue, for testing
|
||||||
|
|
||||||
if (psta->ieee8021x_blocked == _TRUE)
|
if (psta->ieee8021x_blocked == true)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\n psta->ieee8021x_blocked == _TRUE\n"));
|
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\n psta->ieee8021x_blocked == true\n"));
|
||||||
|
|
||||||
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))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\npsta->ieee8021x_blocked == _TRUE, pattrib->ether_type(%.4x) != 0x888e\n",pattrib->ether_type));
|
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\npsta->ieee8021x_blocked == true, pattrib->ether_type(%.4x) != 0x888e\n",pattrib->ether_type));
|
||||||
#ifdef DBG_TX_DROP_FRAME
|
#ifdef DBG_TX_DROP_FRAME
|
||||||
DBG_88E("DBG_TX_DROP_FRAME %s psta->ieee8021x_blocked == _TRUE, pattrib->ether_type(%04x) != 0x888e\n", __func__,pattrib->ether_type);
|
DBG_88E("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;
|
||||||
|
@ -857,27 +857,27 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
||||||
pattrib->encrypt, padapter->securitypriv.sw_encrypt));
|
pattrib->encrypt, padapter->securitypriv.sw_encrypt));
|
||||||
|
|
||||||
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;
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,
|
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,
|
||||||
("update_attrib: encrypt=%d securitypriv.hw_decrypted=%d bswenc=_TRUE\n",
|
("update_attrib: encrypt=%d securitypriv.hw_decrypted=%d bswenc=true\n",
|
||||||
pattrib->encrypt, padapter->securitypriv.sw_encrypt));
|
pattrib->encrypt, padapter->securitypriv.sw_encrypt));
|
||||||
} else {
|
} else {
|
||||||
pattrib->bswenc = _FALSE;
|
pattrib->bswenc = false;
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=_FALSE\n"));
|
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=false\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if ((pattrib->encrypt && bmcast) || (pattrib->encrypt ==_WEP40_) || (pattrib->encrypt ==_WEP104_))
|
if ((pattrib->encrypt && bmcast) || (pattrib->encrypt ==_WEP40_) || (pattrib->encrypt ==_WEP104_))
|
||||||
{
|
{
|
||||||
pattrib->bswenc = _TRUE;//force using sw enc.
|
pattrib->bswenc = true;//force using sw enc.
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_WAPI_SUPPORT
|
#ifdef CONFIG_WAPI_SUPPORT
|
||||||
if (pattrib->encrypt == _SMS4_)
|
if (pattrib->encrypt == _SMS4_)
|
||||||
pattrib->bswenc = _FALSE;
|
pattrib->bswenc = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rtw_set_tx_chksum_offload(pkt, pattrib);
|
rtw_set_tx_chksum_offload(pkt, pattrib);
|
||||||
|
@ -936,7 +936,7 @@ _func_enter_;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -946,7 +946,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_rtw_memcmp(&stainfo->dot11tkiptxmickey.skey[0],null_key, 16)==_TRUE){
|
if (_rtw_memcmp(&stainfo->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;
|
||||||
|
@ -1074,7 +1074,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;
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
@ -1107,7 +1107,7 @@ _func_enter_;
|
||||||
|
|
||||||
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)) {
|
||||||
//to_ds = 1, fr_ds = 0;
|
//to_ds = 1, fr_ds = 0;
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
if ((ptdlsinfo->setup_state == TDLS_LINKED_STATE)){
|
if ((ptdlsinfo->setup_state == TDLS_LINKED_STATE)){
|
||||||
|
@ -1137,10 +1137,10 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
@ -1148,16 +1148,16 @@ _func_enter_;
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
|
_rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
|
||||||
|
|
||||||
if (psta->qos_option)
|
if (psta->qos_option)
|
||||||
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->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 (psta->qos_option)
|
if (psta->qos_option)
|
||||||
qos_option = _TRUE;
|
qos_option = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("fw_state:%x is not allowed to xmit frame\n", get_fwstate(pmlmepriv)));
|
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("fw_state:%x is not allowed to xmit frame\n", get_fwstate(pmlmepriv)));
|
||||||
|
@ -1208,11 +1208,11 @@ _func_enter_;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//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;
|
||||||
|
|
||||||
|
@ -1222,19 +1222,19 @@ _func_enter_;
|
||||||
if (SN_LESS(pattrib->seqnum, tx_seq))
|
if (SN_LESS(pattrib->seqnum, tx_seq))
|
||||||
{
|
{
|
||||||
//DBG_88E("tx ampdu seqnum(%d) < tx_seq(%d)\n", pattrib->seqnum, tx_seq);
|
//DBG_88E("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
|
||||||
{
|
{
|
||||||
//DBG_88E("tx ampdu over run\n");
|
//DBG_88E("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
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1284,10 +1284,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)
|
||||||
|
@ -1769,7 +1769,7 @@ _func_enter_;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
@ -1800,7 +1800,7 @@ _func_enter_;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -1937,7 +1937,7 @@ _func_enter_;
|
||||||
|
|
||||||
_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 {
|
||||||
|
|
||||||
|
@ -1959,7 +1959,7 @@ _func_enter_;
|
||||||
|
|
||||||
|
|
||||||
pxmitbuf->priv_data = NULL;
|
pxmitbuf->priv_data = NULL;
|
||||||
//pxmitbuf->ext_tag = _TRUE;
|
//pxmitbuf->ext_tag = true;
|
||||||
|
|
||||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||||
pxmitbuf->len = 0;
|
pxmitbuf->len = 0;
|
||||||
|
@ -2025,7 +2025,7 @@ _func_enter_;
|
||||||
|
|
||||||
_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 {
|
||||||
|
|
||||||
|
@ -2047,7 +2047,7 @@ _func_enter_;
|
||||||
//DBG_88E("alloc, free_xmitbuf_cnt=%d\n", pxmitpriv->free_xmitbuf_cnt);
|
//DBG_88E("alloc, free_xmitbuf_cnt=%d\n", pxmitpriv->free_xmitbuf_cnt);
|
||||||
|
|
||||||
pxmitbuf->priv_data = NULL;
|
pxmitbuf->priv_data = NULL;
|
||||||
//pxmitbuf->ext_tag = _FALSE;
|
//pxmitbuf->ext_tag = false;
|
||||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||||
pxmitbuf->len = 0;
|
pxmitbuf->len = 0;
|
||||||
pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
|
pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
|
||||||
|
@ -2153,7 +2153,7 @@ _func_enter_;
|
||||||
|
|
||||||
_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) {
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_alloc_xmitframe:%d\n", pxmitpriv->free_xmitframe_cnt));
|
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_alloc_xmitframe:%d\n", pxmitpriv->free_xmitframe_cnt));
|
||||||
pxframe = NULL;
|
pxframe = NULL;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2262,7 +2262,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
@ -2298,7 +2298,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);
|
||||||
|
|
||||||
|
@ -2373,7 +2373,7 @@ _func_enter_;
|
||||||
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);
|
||||||
|
@ -2667,7 +2667,7 @@ 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;
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
//if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE)
|
//if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true)
|
||||||
{
|
{
|
||||||
void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb);
|
void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb);
|
||||||
int res, is_vlan_tag=0, i, do_nat25=1;
|
int res, is_vlan_tag=0, i, do_nat25=1;
|
||||||
|
@ -2874,7 +2874,7 @@ static void do_queue_select(_adapter *padapter, struct pkt_attrib *pattrib)
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("### do_queue_select priority=%d ,qsel = %d\n",pattrib->priority ,qsel));
|
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("### do_queue_select priority=%d ,qsel = %d\n",pattrib->priority ,qsel));
|
||||||
|
|
||||||
#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
|
||||||
|
|
||||||
|
@ -2922,7 +2922,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)
|
||||||
|
@ -2962,7 +2962,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);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -2970,7 +2970,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
||||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (rtw_hal_xmit(padapter, pxmitframe) == _FALSE)
|
if (rtw_hal_xmit(padapter, pxmitframe) == false)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2979,7 +2979,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;
|
||||||
|
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
struct sta_info *ptdls_sta=NULL;
|
struct sta_info *ptdls_sta=NULL;
|
||||||
|
@ -2995,7 +2995,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
||||||
|
|
||||||
if (pattrib->triggered==1)
|
if (pattrib->triggered==1)
|
||||||
{
|
{
|
||||||
ret = _TRUE;
|
ret = true;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3039,7 +3039,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
||||||
//transmit TDLS PTI via AP
|
//transmit TDLS PTI via AP
|
||||||
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_SD_PTI);
|
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_SD_PTI);
|
||||||
}
|
}
|
||||||
ret = _TRUE;
|
ret = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3056,7 +3056,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
||||||
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
|
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL 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;
|
||||||
|
@ -3072,7 +3072,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
||||||
}
|
}
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _FALSE)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == false)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (pattrib->psta)
|
if (pattrib->psta)
|
||||||
|
@ -3122,11 +3122,11 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
||||||
|
|
||||||
//DBG_88E("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
//DBG_88E("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
||||||
|
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);//tx bc/mc packets after upate bcn
|
update_beacon(padapter, _TIM_IE_, NULL, false);//tx bc/mc packets after upate bcn
|
||||||
|
|
||||||
//_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
//_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||||
|
|
||||||
ret = _TRUE;
|
ret = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3187,7 +3187,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
||||||
{
|
{
|
||||||
//DBG_88E("sleepq_len==1, update BCNTIM\n");
|
//DBG_88E("sleepq_len==1, update BCNTIM\n");
|
||||||
//upate BCN for TIM IE
|
//upate BCN for TIM IE
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3198,7 +3198,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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3222,7 +3222,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);
|
||||||
|
|
||||||
|
@ -3317,7 +3317,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);
|
||||||
|
|
||||||
|
@ -3370,7 +3370,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
||||||
pxmitframe->attrib.triggered = 1;
|
pxmitframe->attrib.triggered = 1;
|
||||||
|
|
||||||
_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);
|
||||||
}
|
}
|
||||||
|
@ -3424,7 +3424,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);
|
||||||
|
|
||||||
|
@ -3442,7 +3442,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);
|
||||||
}
|
}
|
||||||
|
@ -3470,7 +3470,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
||||||
if (update_mask)
|
if (update_mask)
|
||||||
{
|
{
|
||||||
//update_BCNTIM(padapter);
|
//update_BCNTIM(padapter);
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3488,7 +3488,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);
|
||||||
|
|
||||||
|
@ -3536,7 +3536,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
||||||
|
|
||||||
pxmitframe->attrib.triggered = 1;
|
pxmitframe->attrib.triggered = 1;
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -3555,7 +3555,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
||||||
//DBG_88E("wakeup to xmit, qlen==0, update_BCNTIM, tim=%x\n", pstapriv->tim_bitmap);
|
//DBG_88E("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, _FALSE);
|
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||||
//update_mask = BIT(0);
|
//update_mask = BIT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3606,7 +3606,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;
|
||||||
|
|
||||||
|
@ -3637,7 +3637,7 @@ 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;
|
u8 type;
|
||||||
|
@ -3687,10 +3687,10 @@ sint check_pending_xmitbuf(
|
||||||
|
|
||||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
||||||
|
|
||||||
if (_rtw_queue_empty(pqueue) == _FALSE)
|
if (_rtw_queue_empty(pqueue) == false)
|
||||||
return _TRUE;
|
return true;
|
||||||
else
|
else
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_return rtw_xmit_thread(thread_context context)
|
thread_return rtw_xmit_thread(thread_context context)
|
||||||
|
@ -3758,9 +3758,9 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2750,7 +2750,7 @@ void phy_SetRFPathSwitch_8188E(
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_MP)
|
#if (DM_ODM_SUPPORT_TYPE == ODM_MP)
|
||||||
if (!pAdapter->bHWInitReady)
|
if (!pAdapter->bHWInitReady)
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||||
if (pAdapter->hw_init_completed == _FALSE)
|
if (pAdapter->hw_init_completed == false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
u1Byte u1bTmp;
|
u1Byte u1bTmp;
|
||||||
|
|
|
@ -57,7 +57,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;
|
||||||
|
@ -130,7 +130,7 @@ u8 HalPwrSeqCmdParsing(
|
||||||
case PWR_CMD_POLLING:
|
case PWR_CMD_POLLING:
|
||||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_POLLING\n"));
|
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_POLLING\n"));
|
||||||
|
|
||||||
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)
|
||||||
|
@ -146,13 +146,13 @@ u8 HalPwrSeqCmdParsing(
|
||||||
|
|
||||||
value &= GET_PWR_CFG_MASK(PwrCfgCmd);
|
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) {
|
||||||
DBG_88E("Fail to polling Offset[%#x]\n", offset);
|
DBG_88E("Fail to polling Offset[%#x]\n", offset);
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
} while (!bPollingBit);
|
} while (!bPollingBit);
|
||||||
|
|
||||||
|
@ -169,7 +169,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
|
||||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_END\n"));
|
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_END\n"));
|
||||||
return _TRUE;
|
return true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -181,5 +181,5 @@ u8 HalPwrSeqCmdParsing(
|
||||||
AryIdx++;//Add Array Index
|
AryIdx++;//Add Array Index
|
||||||
}while (1);
|
}while (1);
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,16 +91,16 @@ hal_com_get_channel_plan(
|
||||||
u8 swConfig;
|
u8 swConfig;
|
||||||
u8 chnlPlan;
|
u8 chnlPlan;
|
||||||
|
|
||||||
swConfig = _TRUE;
|
swConfig = true;
|
||||||
if (!AutoLoadFail)
|
if (!AutoLoadFail)
|
||||||
{
|
{
|
||||||
if (!rtw_is_channel_plan_valid(sw_channel_plan))
|
if (!rtw_is_channel_plan_valid(sw_channel_plan))
|
||||||
swConfig = _FALSE;
|
swConfig = false;
|
||||||
if (hw_channel_plan & EEPROM_CHANNEL_PLAN_BY_HW_MASK)
|
if (hw_channel_plan & EEPROM_CHANNEL_PLAN_BY_HW_MASK)
|
||||||
swConfig = _FALSE;
|
swConfig = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (swConfig == _TRUE)
|
if (swConfig == true)
|
||||||
chnlPlan = sw_channel_plan;
|
chnlPlan = sw_channel_plan;
|
||||||
else
|
else
|
||||||
chnlPlan = hw_channel_plan & (~EEPROM_CHANNEL_PLAN_BY_HW_MASK);
|
chnlPlan = hw_channel_plan & (~EEPROM_CHANNEL_PLAN_BY_HW_MASK);
|
||||||
|
@ -296,9 +296,9 @@ Hal_MappingOutPipe(
|
||||||
{
|
{
|
||||||
struct registry_priv *pregistrypriv = &pAdapter->registrypriv;
|
struct registry_priv *pregistrypriv = &pAdapter->registrypriv;
|
||||||
|
|
||||||
bool bWIFICfg = (pregistrypriv->wifi_spec) ?_TRUE:_FALSE;
|
bool bWIFICfg = (pregistrypriv->wifi_spec) ?true:false;
|
||||||
|
|
||||||
bool result = _TRUE;
|
bool result = true;
|
||||||
|
|
||||||
switch (NumOutPipe)
|
switch (NumOutPipe)
|
||||||
{
|
{
|
||||||
|
@ -312,7 +312,7 @@ Hal_MappingOutPipe(
|
||||||
_OneOutPipeMapping(pAdapter);
|
_OneOutPipeMapping(pAdapter);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = _FALSE;
|
result = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,28 +97,28 @@ uint rtw_hal_init(_adapter *padapter)
|
||||||
uint status = _SUCCESS;
|
uint status = _SUCCESS;
|
||||||
|
|
||||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||||
if (padapter->hw_init_completed == _TRUE)
|
if (padapter->hw_init_completed == true)
|
||||||
{
|
{
|
||||||
DBG_88E("rtw_hal_init: hw_init_completed == _TRUE\n");
|
DBG_88E("rtw_hal_init: hw_init_completed == true\n");
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
// before init mac0, driver must init mac1 first to avoid usb rx error.
|
// before init mac0, driver must init mac1 first to avoid usb rx error.
|
||||||
if ((padapter->pbuddy_adapter != NULL) && (padapter->DualMacConcurrent == _TRUE)
|
if ((padapter->pbuddy_adapter != NULL) && (padapter->DualMacConcurrent == true)
|
||||||
&& (padapter->adapter_type == PRIMARY_ADAPTER))
|
&& (padapter->adapter_type == PRIMARY_ADAPTER))
|
||||||
{
|
{
|
||||||
if (padapter->pbuddy_adapter->hw_init_completed == _TRUE)
|
if (padapter->pbuddy_adapter->hw_init_completed == true)
|
||||||
{
|
{
|
||||||
DBG_88E("rtw_hal_init: pbuddy_adapter hw_init_completed == _TRUE\n");
|
DBG_88E("rtw_hal_init: pbuddy_adapter hw_init_completed == true\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
status = padapter->HalFunc.hal_init(padapter->pbuddy_adapter);
|
status = padapter->HalFunc.hal_init(padapter->pbuddy_adapter);
|
||||||
if (status == _SUCCESS){
|
if (status == _SUCCESS){
|
||||||
padapter->pbuddy_adapter->hw_init_completed = _TRUE;
|
padapter->pbuddy_adapter->hw_init_completed = true;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
padapter->pbuddy_adapter->hw_init_completed = _FALSE;
|
padapter->pbuddy_adapter->hw_init_completed = false;
|
||||||
RT_TRACE(_module_hal_init_c_,_drv_err_,("rtw_hal_init: hal__init fail(pbuddy_adapter)\n"));
|
RT_TRACE(_module_hal_init_c_,_drv_err_,("rtw_hal_init: hal__init fail(pbuddy_adapter)\n"));
|
||||||
DBG_88E("rtw_hal_init: hal__init fail(pbuddy_adapter)\n");
|
DBG_88E("rtw_hal_init: hal__init fail(pbuddy_adapter)\n");
|
||||||
return status;
|
return status;
|
||||||
|
@ -127,12 +127,12 @@ uint rtw_hal_init(_adapter *padapter)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
padapter->hw_init_completed=_FALSE;
|
padapter->hw_init_completed=false;
|
||||||
|
|
||||||
status = padapter->HalFunc.hal_init(padapter);
|
status = padapter->HalFunc.hal_init(padapter);
|
||||||
|
|
||||||
if (status == _SUCCESS){
|
if (status == _SUCCESS){
|
||||||
padapter->hw_init_completed = _TRUE;
|
padapter->hw_init_completed = true;
|
||||||
|
|
||||||
if (padapter->registrypriv.notch_filter == 1)
|
if (padapter->registrypriv.notch_filter == 1)
|
||||||
rtw_hal_notch_filter(padapter, 1);
|
rtw_hal_notch_filter(padapter, 1);
|
||||||
|
@ -140,7 +140,7 @@ uint rtw_hal_init(_adapter *padapter)
|
||||||
rtw_hal_reset_security_engine(padapter);
|
rtw_hal_reset_security_engine(padapter);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
padapter->hw_init_completed = _FALSE;
|
padapter->hw_init_completed = false;
|
||||||
DBG_88E("rtw_hal_init: hal__init fail\n");
|
DBG_88E("rtw_hal_init: hal__init fail\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ _func_enter_;
|
||||||
status = padapter->HalFunc.hal_deinit(padapter);
|
status = padapter->HalFunc.hal_deinit(padapter);
|
||||||
|
|
||||||
if (status == _SUCCESS){
|
if (status == _SUCCESS){
|
||||||
padapter->hw_init_completed = _FALSE;
|
padapter->hw_init_completed = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -257,7 +257,7 @@ s32 rtw_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||||
if (padapter->HalFunc.hal_xmit)
|
if (padapter->HalFunc.hal_xmit)
|
||||||
return padapter->HalFunc.hal_xmit(padapter, pxmitframe);
|
return padapter->HalFunc.hal_xmit(padapter, pxmitframe);
|
||||||
|
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe)
|
s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe)
|
||||||
|
@ -297,7 +297,7 @@ void rtw_hal_update_ra_mask(_adapter *padapter, u32 mac_id, u8 rssi_level)
|
||||||
{
|
{
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
{
|
{
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
@ -407,7 +407,7 @@ u8 rtw_hal_antdiv_before_linked(_adapter *padapter)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.AntDivBeforeLinkHandler)
|
if (padapter->HalFunc.AntDivBeforeLinkHandler)
|
||||||
return padapter->HalFunc.AntDivBeforeLinkHandler(padapter);
|
return padapter->HalFunc.AntDivBeforeLinkHandler(padapter);
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
void rtw_hal_antdiv_rssi_compared(_adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src)
|
void rtw_hal_antdiv_rssi_compared(_adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src)
|
||||||
{
|
{
|
||||||
|
|
76
hal/odm.c
76
hal/odm.c
|
@ -1759,8 +1759,8 @@ odm_DIGInit(
|
||||||
//pDM_DigTable->CurMultiSTAConnectState = DIG_MultiSTA_DISCONNECT;
|
//pDM_DigTable->CurMultiSTAConnectState = DIG_MultiSTA_DISCONNECT;
|
||||||
pDM_DigTable->RssiLowThresh = DM_DIG_THRESH_LOW;
|
pDM_DigTable->RssiLowThresh = DM_DIG_THRESH_LOW;
|
||||||
pDM_DigTable->RssiHighThresh = DM_DIG_THRESH_HIGH;
|
pDM_DigTable->RssiHighThresh = DM_DIG_THRESH_HIGH;
|
||||||
pDM_DigTable->FALowThresh = DM_FALSEALARM_THRESH_LOW;
|
pDM_DigTable->FALowThresh = DM_FALSE_ALARM_THRESH_LOW;
|
||||||
pDM_DigTable->FAHighThresh = DM_FALSEALARM_THRESH_HIGH;
|
pDM_DigTable->FAHighThresh = DM_FALSE_ALARM_THRESH_HIGH;
|
||||||
if (pDM_Odm->BoardType == ODM_BOARD_HIGHPWR)
|
if (pDM_Odm->BoardType == ODM_BOARD_HIGHPWR)
|
||||||
{
|
{
|
||||||
pDM_DigTable->rx_gain_range_max = DM_DIG_MAX_NIC;
|
pDM_DigTable->rx_gain_range_max = DM_DIG_MAX_NIC;
|
||||||
|
@ -2733,9 +2733,9 @@ odm_RateAdaptiveMaskInit(
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||||
pOdmRA->Type = DM_Type_ByDriver;
|
pOdmRA->Type = DM_Type_ByDriver;
|
||||||
if (pOdmRA->Type == DM_Type_ByDriver)
|
if (pOdmRA->Type == DM_Type_ByDriver)
|
||||||
pDM_Odm->bUseRAMask = _TRUE;
|
pDM_Odm->bUseRAMask = true;
|
||||||
else
|
else
|
||||||
pDM_Odm->bUseRAMask = _FALSE;
|
pDM_Odm->bUseRAMask = false;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3174,13 +3174,13 @@ odm_DynamicTxPowerInit(
|
||||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||||
pdmpriv->bDynamicTxPowerEnable = _FALSE;
|
pdmpriv->bDynamicTxPowerEnable = false;
|
||||||
|
|
||||||
#if (RTL8192C_SUPPORT==1)
|
#if (RTL8192C_SUPPORT==1)
|
||||||
#ifdef CONFIG_USB_HCI
|
#ifdef CONFIG_USB_HCI
|
||||||
|
|
||||||
#ifdef CONFIG_INTEL_PROXIM
|
#ifdef CONFIG_INTEL_PROXIM
|
||||||
if ((pHalData->BoardType == BOARD_USB_High_PA)||(Adapter->proximity.proxim_support==_TRUE))
|
if ((pHalData->BoardType == BOARD_USB_High_PA)||(Adapter->proximity.proxim_support==true))
|
||||||
#else
|
#else
|
||||||
if (pHalData->BoardType == BOARD_USB_High_PA)
|
if (pHalData->BoardType == BOARD_USB_High_PA)
|
||||||
#endif
|
#endif
|
||||||
|
@ -3188,11 +3188,11 @@ odm_DynamicTxPowerInit(
|
||||||
{
|
{
|
||||||
//odm_SavePowerIndex(Adapter);
|
//odm_SavePowerIndex(Adapter);
|
||||||
odm_DynamicTxPowerSavePowerIndex(pDM_Odm);
|
odm_DynamicTxPowerSavePowerIndex(pDM_Odm);
|
||||||
pdmpriv->bDynamicTxPowerEnable = _TRUE;
|
pdmpriv->bDynamicTxPowerEnable = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#else
|
#else
|
||||||
pdmpriv->bDynamicTxPowerEnable = _FALSE;
|
pdmpriv->bDynamicTxPowerEnable = false;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3509,7 +3509,7 @@ odm_DynamicTxPower_92C(
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef CONFIG_INTEL_PROXIM
|
#ifdef CONFIG_INTEL_PROXIM
|
||||||
if (Adapter->proximity.proxim_on== _TRUE){
|
if (Adapter->proximity.proxim_on== true){
|
||||||
struct proximity_priv *prox_priv=Adapter->proximity.proximity_priv;
|
struct proximity_priv *prox_priv=Adapter->proximity.proximity_priv;
|
||||||
// Intel set fixed tx power
|
// Intel set fixed tx power
|
||||||
printk("\n %s Adapter->proximity.proxim_on=%d prox_priv->proxim_modeinfo->power_output=%d\n",__func__,Adapter->proximity.proxim_on,prox_priv->proxim_modeinfo->power_output);
|
printk("\n %s Adapter->proximity.proxim_on=%d prox_priv->proxim_modeinfo->power_output=%d\n",__func__,Adapter->proximity.proxim_on,prox_priv->proxim_modeinfo->power_output);
|
||||||
|
@ -3550,7 +3550,7 @@ odm_DynamicTxPower_92C(
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// STA not connected and AP not connected
|
// STA not connected and AP not connected
|
||||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) != _TRUE) &&
|
if ((check_fwstate(pmlmepriv, _FW_LINKED) != true) &&
|
||||||
(pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0))
|
(pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0))
|
||||||
{
|
{
|
||||||
//ODM_RT_TRACE(pDM_Odm,COMP_HIPWR, DBG_LOUD, ("Not connected to any\n"));
|
//ODM_RT_TRACE(pDM_Odm,COMP_HIPWR, DBG_LOUD, ("Not connected to any\n"));
|
||||||
|
@ -3563,7 +3563,7 @@ odm_DynamicTxPower_92C(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) // Default port
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) // Default port
|
||||||
{
|
{
|
||||||
UndecoratedSmoothedPWDB = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
|
UndecoratedSmoothedPWDB = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
|
||||||
}
|
}
|
||||||
|
@ -3785,7 +3785,7 @@ odm_DynamicTxPower_92D(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If dynamic high power is disabled.
|
// If dynamic high power is disabled.
|
||||||
if ( (pdmpriv->bDynamicTxPowerEnable != _TRUE) ||
|
if ( (pdmpriv->bDynamicTxPowerEnable != true) ||
|
||||||
(!(podmpriv->SupportAbility& ODM_BB_DYNAMIC_TXPWR)) )
|
(!(podmpriv->SupportAbility& ODM_BB_DYNAMIC_TXPWR)) )
|
||||||
{
|
{
|
||||||
pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
|
pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
|
||||||
|
@ -3793,7 +3793,7 @@ odm_DynamicTxPower_92D(
|
||||||
}
|
}
|
||||||
|
|
||||||
// STA not connected and AP not connected
|
// STA not connected and AP not connected
|
||||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) != _TRUE) &&
|
if ((check_fwstate(pmlmepriv, _FW_LINKED) != true) &&
|
||||||
(pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0))
|
(pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0))
|
||||||
{
|
{
|
||||||
//ODM_RT_TRACE(pDM_Odm,COMP_HIPWR, DBG_LOUD, ("Not connected to any\n"));
|
//ODM_RT_TRACE(pDM_Odm,COMP_HIPWR, DBG_LOUD, ("Not connected to any\n"));
|
||||||
|
@ -3805,7 +3805,7 @@ odm_DynamicTxPower_92D(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) // Default port
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) // Default port
|
||||||
{
|
{
|
||||||
UndecoratedSmoothedPWDB = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
|
UndecoratedSmoothedPWDB = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
|
||||||
}
|
}
|
||||||
|
@ -3864,7 +3864,7 @@ odm_DynamicTxPower_92D(
|
||||||
pHalData->DynamicTxHighPowerLvl = Adapter->DualMacDMSPControl.CurTxHighLvlForAnotherMacOfDMSP;
|
pHalData->DynamicTxHighPowerLvl = Adapter->DualMacDMSPControl.CurTxHighLvlForAnotherMacOfDMSP;
|
||||||
PHY_SetTxPowerLevel8192D(Adapter, pHalData->CurrentChannel);
|
PHY_SetTxPowerLevel8192D(Adapter, pHalData->CurrentChannel);
|
||||||
pHalData->DynamicTxHighPowerLvl = HighPowerLvlBackForMac0;
|
pHalData->DynamicTxHighPowerLvl = HighPowerLvlBackForMac0;
|
||||||
Adapter->DualMacDMSPControl.bChangeTxHighPowerLvlForAnotherMacOfDMSP = _FALSE;
|
Adapter->DualMacDMSPControl.bChangeTxHighPowerLvlForAnotherMacOfDMSP = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3889,7 +3889,7 @@ odm_DynamicTxPower_92D(
|
||||||
if (Adapter->bSlaveOfDMSP)
|
if (Adapter->bSlaveOfDMSP)
|
||||||
{
|
{
|
||||||
//ODM_RT_TRACE(pDM_Odm,COMP_MLME,DBG_LOUD,("dm_DynamicTxPower() bslave case\n"));
|
//ODM_RT_TRACE(pDM_Odm,COMP_MLME,DBG_LOUD,("dm_DynamicTxPower() bslave case\n"));
|
||||||
BuddyAdapter->DualMacDMSPControl.bChangeTxHighPowerLvlForAnotherMacOfDMSP = _TRUE;
|
BuddyAdapter->DualMacDMSPControl.bChangeTxHighPowerLvlForAnotherMacOfDMSP = true;
|
||||||
BuddyAdapter->DualMacDMSPControl.CurTxHighLvlForAnotherMacOfDMSP = pHalData->DynamicTxHighPowerLvl;
|
BuddyAdapter->DualMacDMSPControl.CurTxHighLvlForAnotherMacOfDMSP = pHalData->DynamicTxHighPowerLvl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4104,13 +4104,13 @@ FindMinimumRSSI(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) &&
|
if ((check_fwstate(pmlmepriv, _FW_LINKED) == false) &&
|
||||||
(pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0))
|
(pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0))
|
||||||
{
|
{
|
||||||
pdmpriv->MinUndecoratedPWDBForDM = 0;
|
pdmpriv->MinUndecoratedPWDBForDM = 0;
|
||||||
//ODM_RT_TRACE(pDM_Odm,COMP_BB_POWERSAVING, DBG_LOUD, ("Not connected to any\n"));
|
//ODM_RT_TRACE(pDM_Odm,COMP_BB_POWERSAVING, DBG_LOUD, ("Not connected to any\n"));
|
||||||
}
|
}
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) // Default port
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) // Default port
|
||||||
{
|
{
|
||||||
pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
|
pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
|
||||||
}
|
}
|
||||||
|
@ -4147,7 +4147,7 @@ odm_RSSIMonitorCheckCE(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (check_fwstate(&Adapter->mlmepriv, WIFI_AP_STATE|WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == _TRUE)
|
//if (check_fwstate(&Adapter->mlmepriv, WIFI_AP_STATE|WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == true)
|
||||||
{
|
{
|
||||||
#if 1
|
#if 1
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
|
@ -4157,10 +4157,10 @@ odm_RSSIMonitorCheckCE(
|
||||||
for (i=0; i<ODM_ASSOCIATE_ENTRY_NUM; i++) {
|
for (i=0; i<ODM_ASSOCIATE_ENTRY_NUM; i++) {
|
||||||
if (IS_STA_VALID(psta = pDM_Odm->pODM_StaInfo[i])
|
if (IS_STA_VALID(psta = pDM_Odm->pODM_StaInfo[i])
|
||||||
&& (psta->state & WIFI_ASOC_STATE)
|
&& (psta->state & WIFI_ASOC_STATE)
|
||||||
&& _rtw_memcmp(psta->hwaddr, bcast_addr, ETH_ALEN) == _FALSE
|
&& _rtw_memcmp(psta->hwaddr, bcast_addr, ETH_ALEN) == false
|
||||||
&& _rtw_memcmp(psta->hwaddr, myid(&Adapter->eeprompriv), ETH_ALEN) == _FALSE
|
&& _rtw_memcmp(psta->hwaddr, myid(&Adapter->eeprompriv), ETH_ALEN) == false
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
&& (!Adapter->pbuddy_adapter || _rtw_memcmp(psta->hwaddr, myid(&Adapter->pbuddy_adapter->eeprompriv), ETH_ALEN) == _FALSE)
|
&& (!Adapter->pbuddy_adapter || _rtw_memcmp(psta->hwaddr, myid(&Adapter->pbuddy_adapter->eeprompriv), ETH_ALEN) == false)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if (psta->rssi_stat.UndecoratedSmoothedPWDB < tmpEntryMinPWDB)
|
if (psta->rssi_stat.UndecoratedSmoothedPWDB < tmpEntryMinPWDB)
|
||||||
|
@ -4191,7 +4191,7 @@ odm_RSSIMonitorCheckCE(
|
||||||
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);
|
||||||
|
|
||||||
|
@ -4232,7 +4232,7 @@ odm_RSSIMonitorCheckCE(
|
||||||
for (i=0; i< sta_cnt; i++)
|
for (i=0; i< sta_cnt; i++)
|
||||||
{
|
{
|
||||||
if (PWDB_rssi[i] != (0)){
|
if (PWDB_rssi[i] != (0)){
|
||||||
if (pHalData->fw_ractrl == _TRUE)// Report every sta's RSSI to FW
|
if (pHalData->fw_ractrl == true)// Report every sta's RSSI to FW
|
||||||
{
|
{
|
||||||
#if (RTL8192D_SUPPORT==1)
|
#if (RTL8192D_SUPPORT==1)
|
||||||
FillH2CCmd92D(Adapter, H2C_RSSI_REPORT, 3, (u8 *)(&PWDB_rssi[i]));
|
FillH2CCmd92D(Adapter, H2C_RSSI_REPORT, 3, (u8 *)(&PWDB_rssi[i]));
|
||||||
|
@ -4433,12 +4433,12 @@ odm_TXPowerTrackingThermalMeterInit(
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||||
#ifdef CONFIG_RTL8188E
|
#ifdef CONFIG_RTL8188E
|
||||||
{
|
{
|
||||||
pDM_Odm->RFCalibrateInfo.bTXPowerTracking = _TRUE;
|
pDM_Odm->RFCalibrateInfo.bTXPowerTracking = true;
|
||||||
pDM_Odm->RFCalibrateInfo.TXPowercount = 0;
|
pDM_Odm->RFCalibrateInfo.TXPowercount = 0;
|
||||||
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit = _FALSE;
|
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit = false;
|
||||||
//#if (MP_DRIVER != 1) //for mp driver, turn off txpwrtracking as default
|
//#if (MP_DRIVER != 1) //for mp driver, turn off txpwrtracking as default
|
||||||
if ( *(pDM_Odm->mp_mode) != 1)
|
if ( *(pDM_Odm->mp_mode) != 1)
|
||||||
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = _TRUE;
|
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = true;
|
||||||
//#endif//#if (MP_DRIVER != 1)
|
//#endif//#if (MP_DRIVER != 1)
|
||||||
MSG_88E("pDM_Odm TxPowerTrackControl = %d\n", pDM_Odm->RFCalibrateInfo.TxPowerTrackControl);
|
MSG_88E("pDM_Odm TxPowerTrackControl = %d\n", pDM_Odm->RFCalibrateInfo.TxPowerTrackControl);
|
||||||
}
|
}
|
||||||
|
@ -4450,13 +4450,13 @@ odm_TXPowerTrackingThermalMeterInit(
|
||||||
|
|
||||||
//if (IS_HARDWARE_TYPE_8192C(pHalData))
|
//if (IS_HARDWARE_TYPE_8192C(pHalData))
|
||||||
{
|
{
|
||||||
pdmpriv->bTXPowerTracking = _TRUE;
|
pdmpriv->bTXPowerTracking = true;
|
||||||
pdmpriv->TXPowercount = 0;
|
pdmpriv->TXPowercount = 0;
|
||||||
pdmpriv->bTXPowerTrackingInit = _FALSE;
|
pdmpriv->bTXPowerTrackingInit = false;
|
||||||
//#if (MP_DRIVER != 1) //for mp driver, turn off txpwrtracking as default
|
//#if (MP_DRIVER != 1) //for mp driver, turn off txpwrtracking as default
|
||||||
|
|
||||||
if (*(pDM_Odm->mp_mode) != 1)
|
if (*(pDM_Odm->mp_mode) != 1)
|
||||||
pdmpriv->TxPowerTrackControl = _TRUE;
|
pdmpriv->TxPowerTrackControl = true;
|
||||||
//#endif//#if (MP_DRIVER != 1)
|
//#endif//#if (MP_DRIVER != 1)
|
||||||
}
|
}
|
||||||
MSG_88E("pdmpriv->TxPowerTrackControl = %d\n", pdmpriv->TxPowerTrackControl);
|
MSG_88E("pdmpriv->TxPowerTrackControl = %d\n", pdmpriv->TxPowerTrackControl);
|
||||||
|
@ -4466,10 +4466,10 @@ odm_TXPowerTrackingThermalMeterInit(
|
||||||
#elif (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
|
#elif (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
|
||||||
#ifdef RTL8188E_SUPPORT
|
#ifdef RTL8188E_SUPPORT
|
||||||
{
|
{
|
||||||
pDM_Odm->RFCalibrateInfo.bTXPowerTracking = _TRUE;
|
pDM_Odm->RFCalibrateInfo.bTXPowerTracking = true;
|
||||||
pDM_Odm->RFCalibrateInfo.TXPowercount = 0;
|
pDM_Odm->RFCalibrateInfo.TXPowercount = 0;
|
||||||
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit = _FALSE;
|
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit = false;
|
||||||
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = _TRUE;
|
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5449,7 +5449,7 @@ void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext)
|
||||||
{
|
{
|
||||||
PDM_ODM_T pDM_Odm= (PDM_ODM_T)FunctionContext;
|
PDM_ODM_T pDM_Odm= (PDM_ODM_T)FunctionContext;
|
||||||
PADAPTER padapter = pDM_Odm->Adapter;
|
PADAPTER padapter = pDM_Odm->Adapter;
|
||||||
if (padapter->net_closed == _TRUE)
|
if (padapter->net_closed == true)
|
||||||
return;
|
return;
|
||||||
odm_SwAntDivChkAntSwitch(pDM_Odm, SWAW_STEP_DETERMINE);
|
odm_SwAntDivChkAntSwitch(pDM_Odm, SWAW_STEP_DETERMINE);
|
||||||
}
|
}
|
||||||
|
@ -6367,7 +6367,7 @@ odm_EdcaTurboCheckCE(
|
||||||
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 = _FALSE;
|
u8 bbtchange = false;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||||
struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv);
|
struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv);
|
||||||
struct recv_priv *precvpriv = &(Adapter->recvpriv);
|
struct recv_priv *precvpriv = &(Adapter->recvpriv);
|
||||||
|
@ -6449,7 +6449,7 @@ odm_EdcaTurboCheckCE(
|
||||||
pDM_Odm->DM_EDCA_Table.prv_traffic_idx = trafficIndex;
|
pDM_Odm->DM_EDCA_Table.prv_traffic_idx = trafficIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = _TRUE;
|
pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -6460,13 +6460,13 @@ odm_EdcaTurboCheckCE(
|
||||||
if (pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA)
|
if (pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA)
|
||||||
{
|
{
|
||||||
rtw_write32(Adapter, REG_EDCA_BE_PARAM, pHalData->AcParam_BE);
|
rtw_write32(Adapter, REG_EDCA_BE_PARAM, pHalData->AcParam_BE);
|
||||||
pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = _FALSE;
|
pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dm_CheckEdcaTurbo_EXIT:
|
dm_CheckEdcaTurbo_EXIT:
|
||||||
// Set variables for next time.
|
// Set variables for next time.
|
||||||
precvpriv->bIsAnyNonBEPkts = _FALSE;
|
precvpriv->bIsAnyNonBEPkts = false;
|
||||||
pxmitpriv->last_tx_bytes = pxmitpriv->tx_bytes;
|
pxmitpriv->last_tx_bytes = pxmitpriv->tx_bytes;
|
||||||
precvpriv->last_rx_bytes = precvpriv->rx_bytes;
|
precvpriv->last_rx_bytes = precvpriv->rx_bytes;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -636,7 +636,7 @@ odm_FastAntTrainingCallback(
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||||
PADAPTER padapter = pDM_Odm->Adapter;
|
PADAPTER padapter = pDM_Odm->Adapter;
|
||||||
if (padapter->net_closed == _TRUE)
|
if (padapter->net_closed == true)
|
||||||
return;
|
return;
|
||||||
//if (*pDM_Odm->pbNet_closed == TRUE)
|
//if (*pDM_Odm->pbNet_closed == TRUE)
|
||||||
// return;
|
// return;
|
||||||
|
@ -773,7 +773,7 @@ void odm_FastAntTrainingCallback(void *FunctionContext)
|
||||||
{
|
{
|
||||||
PDM_ODM_T pDM_Odm= (PDM_ODM_T)FunctionContext;
|
PDM_ODM_T pDM_Odm= (PDM_ODM_T)FunctionContext;
|
||||||
PADAPTER padapter = pDM_Odm->Adapter;
|
PADAPTER padapter = pDM_Odm->Adapter;
|
||||||
if (padapter->net_closed == _TRUE)
|
if (padapter->net_closed == true)
|
||||||
return;
|
return;
|
||||||
odm_FastAntTraining(pDM_Odm);
|
odm_FastAntTraining(pDM_Odm);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,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;
|
||||||
|
@ -50,7 +50,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;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
rtw_msleep_os(2);
|
rtw_msleep_os(2);
|
||||||
|
@ -74,7 +74,7 @@ static u8 _is_fw_read_cmd_down(_adapter* padapter, u8 msgbox_num)
|
||||||
******************************************/
|
******************************************/
|
||||||
static s32 FillH2CCmd_88E(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer)
|
static s32 FillH2CCmd_88E(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer)
|
||||||
{
|
{
|
||||||
u8 bcmd_down = _FALSE;
|
u8 bcmd_down = false;
|
||||||
s32 retry_cnts = 100;
|
s32 retry_cnts = 100;
|
||||||
u8 h2c_box_num;
|
u8 h2c_box_num;
|
||||||
u32 msgbox_addr;
|
u32 msgbox_addr;
|
||||||
|
@ -87,7 +87,7 @@ static s32 FillH2CCmd_88E(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdB
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if (padapter->bFWReady == _FALSE)
|
if (padapter->bFWReady == false)
|
||||||
{
|
{
|
||||||
DBG_88E("FillH2CCmd_88E(): return H2C cmd because fw is not ready\n");
|
DBG_88E("FillH2CCmd_88E(): return H2C cmd because fw is not ready\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -112,7 +112,7 @@ _func_enter_;
|
||||||
if (CmdLen > RTL88E_MAX_CMD_LEN) {
|
if (CmdLen > RTL88E_MAX_CMD_LEN) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (padapter->bSurpriseRemoved == _TRUE)
|
if (padapter->bSurpriseRemoved == true)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
//pay attention to if race condition happened in H2C cmd setting.
|
//pay attention to if race condition happened in H2C cmd setting.
|
||||||
|
@ -157,7 +157,7 @@ _func_enter_;
|
||||||
rtw_write32(padapter,msgbox_addr, h2c_cmd);
|
rtw_write32(padapter,msgbox_addr, h2c_cmd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bcmd_down = _TRUE;
|
bcmd_down = true;
|
||||||
|
|
||||||
// DBG_88E("MSG_BOX:%d,CmdLen(%d), reg:0x%x =>h2c_cmd:0x%x, reg:0x%x =>h2c_cmd_ex:0x%x ..\n"
|
// DBG_88E("MSG_BOX:%d,CmdLen(%d), reg:0x%x =>h2c_cmd:0x%x, reg:0x%x =>h2c_cmd_ex:0x%x ..\n"
|
||||||
// ,pHalData->LastHMEBoxNum ,CmdLen,msgbox_addr,h2c_cmd,msgbox_ex_addr,h2c_cmd_ex);
|
// ,pHalData->LastHMEBoxNum ,CmdLen,msgbox_addr,h2c_cmd,msgbox_ex_addr,h2c_cmd_ex);
|
||||||
|
@ -205,7 +205,7 @@ u8 rtl8192c_set_FwSelectSuspend_cmd(_adapter *padapter ,u8 bfwpoll, u16 period)
|
||||||
struct H2C_SS_RFOFF_PARAM param;
|
struct H2C_SS_RFOFF_PARAM param;
|
||||||
DBG_88E("==>%s bfwpoll(%x)\n",__func__,bfwpoll);
|
DBG_88E("==>%s bfwpoll(%x)\n",__func__,bfwpoll);
|
||||||
param.gpio_period = period;//Polling GPIO_11 period time
|
param.gpio_period = period;//Polling GPIO_11 period time
|
||||||
param.ROFOn = (_TRUE == bfwpoll)?1:0;
|
param.ROFOn = (true == bfwpoll)?1:0;
|
||||||
FillH2CCmd_88E(padapter, SELECTIVE_SUSPEND_ROF_CMD, sizeof(param), (u8*)(¶m));
|
FillH2CCmd_88E(padapter, SELECTIVE_SUSPEND_ROF_CMD, sizeof(param), (u8*)(¶m));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ u8 rtl8188e_set_rssi_cmd(_adapter*padapter, u8 *param)
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if (pHalData->fw_ractrl == _TRUE){
|
if (pHalData->fw_ractrl == true){
|
||||||
;
|
;
|
||||||
}else{
|
}else{
|
||||||
DBG_88E("==>%s fw dont support RA\n",__func__);
|
DBG_88E("==>%s fw dont support RA\n",__func__);
|
||||||
|
@ -235,7 +235,7 @@ u8 rtl8188e_set_raid_cmd(_adapter*padapter, u32 mask)
|
||||||
u8 res=_SUCCESS;
|
u8 res=_SUCCESS;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
if (pHalData->fw_ractrl == _TRUE){
|
if (pHalData->fw_ractrl == true){
|
||||||
_rtw_memset(buf, 0, 3);
|
_rtw_memset(buf, 0, 3);
|
||||||
mask = cpu_to_le32( mask );
|
mask = cpu_to_le32( mask );
|
||||||
_rtw_memcpy(buf, &mask, 3);
|
_rtw_memcpy(buf, &mask, 3);
|
||||||
|
@ -261,7 +261,7 @@ void rtl8188e_Add_RateATid(PADAPTER pAdapter, u32 bitmap, u8 arg, u8 rssi_level)
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||||
//struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
//struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||||
|
|
||||||
u8 macid, init_rate, raid, shortGIrate=_FALSE;
|
u8 macid, init_rate, raid, shortGIrate=false;
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (rtw_buddy_adapter_up(pAdapter) && pAdapter->adapter_type > PRIMARY_ADAPTER)
|
if (rtw_buddy_adapter_up(pAdapter) && pAdapter->adapter_type > PRIMARY_ADAPTER)
|
||||||
|
@ -283,9 +283,9 @@ void rtl8188e_Add_RateATid(PADAPTER pAdapter, u32 bitmap, u8 arg, u8 rssi_level)
|
||||||
|
|
||||||
init_rate = get_highest_rate_idx(bitmap&0x0fffffff)&0x3f;
|
init_rate = get_highest_rate_idx(bitmap&0x0fffffff)&0x3f;
|
||||||
|
|
||||||
shortGIrate = (arg&BIT(5)) ? _TRUE:_FALSE;
|
shortGIrate = (arg&BIT(5)) ? true:false;
|
||||||
|
|
||||||
if (shortGIrate==_TRUE)
|
if (shortGIrate==true)
|
||||||
init_rate |= BIT(6);
|
init_rate |= BIT(6);
|
||||||
|
|
||||||
|
|
||||||
|
@ -566,7 +566,7 @@ 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;
|
||||||
|
|
||||||
SetFrameSubType(pframe, WIFI_QOS_DATA_NULL);
|
SetFrameSubType(pframe, WIFI_QOS_DATA_NULL);
|
||||||
|
@ -706,7 +706,7 @@ static void SetFwRsvdPagePkt(PADAPTER padapter, bool bDLFinished)
|
||||||
//3 (2) ps-poll *1 page
|
//3 (2) ps-poll *1 page
|
||||||
RsvdPageLoc.LocPsPoll = PageNum;
|
RsvdPageLoc.LocPsPoll = PageNum;
|
||||||
ConstructPSPoll(padapter, &ReservedPagePacket[BufIndex], &PSPollLength);
|
ConstructPSPoll(padapter, &ReservedPagePacket[BufIndex], &PSPollLength);
|
||||||
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], PSPollLength, _TRUE, _FALSE);
|
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], PSPollLength, true, false);
|
||||||
|
|
||||||
PageNeed = (u8)PageNum_128(TxDescLen + PSPollLength);
|
PageNeed = (u8)PageNum_128(TxDescLen + PSPollLength);
|
||||||
PageNum += PageNeed;
|
PageNum += PageNeed;
|
||||||
|
@ -720,8 +720,8 @@ static void SetFwRsvdPagePkt(PADAPTER padapter, bool bDLFinished)
|
||||||
&ReservedPagePacket[BufIndex],
|
&ReservedPagePacket[BufIndex],
|
||||||
&NullDataLength,
|
&NullDataLength,
|
||||||
get_my_bssid(&pmlmeinfo->network),
|
get_my_bssid(&pmlmeinfo->network),
|
||||||
_FALSE, 0, 0, _FALSE);
|
false, 0, 0, false);
|
||||||
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], NullDataLength, _FALSE, _FALSE);
|
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], NullDataLength, false, false);
|
||||||
|
|
||||||
PageNeed = (u8)PageNum_128(TxDescLen + NullDataLength);
|
PageNeed = (u8)PageNum_128(TxDescLen + NullDataLength);
|
||||||
PageNum += PageNeed;
|
PageNum += PageNeed;
|
||||||
|
@ -735,8 +735,8 @@ static void SetFwRsvdPagePkt(PADAPTER padapter, bool bDLFinished)
|
||||||
&ReservedPagePacket[BufIndex],
|
&ReservedPagePacket[BufIndex],
|
||||||
&ProbeRspLength,
|
&ProbeRspLength,
|
||||||
get_my_bssid(&pmlmeinfo->network),
|
get_my_bssid(&pmlmeinfo->network),
|
||||||
_FALSE);
|
false);
|
||||||
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], ProbeRspLength, _FALSE, _FALSE);
|
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], ProbeRspLength, false, false);
|
||||||
|
|
||||||
PageNeed = (u8)PageNum_128(TxDescLen + ProbeRspLength);
|
PageNeed = (u8)PageNum_128(TxDescLen + ProbeRspLength);
|
||||||
PageNum += PageNeed;
|
PageNum += PageNeed;
|
||||||
|
@ -750,8 +750,8 @@ static void SetFwRsvdPagePkt(PADAPTER padapter, bool bDLFinished)
|
||||||
&ReservedPagePacket[BufIndex],
|
&ReservedPagePacket[BufIndex],
|
||||||
&QosNullLength,
|
&QosNullLength,
|
||||||
get_my_bssid(&pmlmeinfo->network),
|
get_my_bssid(&pmlmeinfo->network),
|
||||||
_TRUE, 0, 0, _FALSE);
|
true, 0, 0, false);
|
||||||
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], QosNullLength, _FALSE, _FALSE);
|
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], QosNullLength, false, false);
|
||||||
|
|
||||||
PageNeed = (u8)PageNum_128(TxDescLen + QosNullLength);
|
PageNeed = (u8)PageNum_128(TxDescLen + QosNullLength);
|
||||||
PageNum += PageNeed;
|
PageNum += PageNeed;
|
||||||
|
@ -767,8 +767,8 @@ static void SetFwRsvdPagePkt(PADAPTER padapter, bool bDLFinished)
|
||||||
&ReservedPagePacket[BufIndex],
|
&ReservedPagePacket[BufIndex],
|
||||||
&BTQosNullLength,
|
&BTQosNullLength,
|
||||||
get_my_bssid(&pmlmeinfo->network),
|
get_my_bssid(&pmlmeinfo->network),
|
||||||
_TRUE, 0, 0, _FALSE);
|
true, 0, 0, false);
|
||||||
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], BTQosNullLength, _FALSE, _TRUE);
|
rtl8188e_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], BTQosNullLength, false, true);
|
||||||
|
|
||||||
TotalPacketLen = BufIndex + BTQosNullLength;
|
TotalPacketLen = BufIndex + BTQosNullLength;
|
||||||
*/
|
*/
|
||||||
|
@ -799,8 +799,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
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);
|
||||||
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;
|
||||||
|
|
||||||
|
@ -834,7 +834,7 @@ _func_enter_;
|
||||||
if (pHalData->RegFwHwTxQCtrl&BIT6)
|
if (pHalData->RegFwHwTxQCtrl&BIT6)
|
||||||
{
|
{
|
||||||
DBG_88E("HalDownloadRSVDPage(): There is an Adapter is sending beacon.\n");
|
DBG_88E("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.
|
||||||
|
@ -848,7 +848,7 @@ _func_enter_;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// download rsvd page.
|
// download rsvd page.
|
||||||
SetFwRsvdPagePkt(padapter, _FALSE);
|
SetFwRsvdPagePkt(padapter, false);
|
||||||
DLBcnCount++;
|
DLBcnCount++;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -885,7 +885,7 @@ _func_enter_;
|
||||||
poll = 0;
|
poll = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
SetFwRsvdPagePkt(padapter, _TRUE);
|
SetFwRsvdPagePkt(padapter, true);
|
||||||
DLBcnCount++;
|
DLBcnCount++;
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -1091,7 +1091,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1119,18 +1119,18 @@ _func_enter_;
|
||||||
if (enable){
|
if (enable){
|
||||||
|
|
||||||
pwowlan_parm.mode |=FW_WOWLAN_FUN_EN;
|
pwowlan_parm.mode |=FW_WOWLAN_FUN_EN;
|
||||||
pwrpriv->wowlan_magic =_TRUE;
|
pwrpriv->wowlan_magic =true;
|
||||||
pwrpriv->wowlan_unicast =_TRUE;
|
pwrpriv->wowlan_unicast =true;
|
||||||
|
|
||||||
if (pwrpriv->wowlan_pattern ==_TRUE){
|
if (pwrpriv->wowlan_pattern ==true){
|
||||||
pwowlan_parm.mode |= FW_WOWLAN_PATTERN_MATCH;
|
pwowlan_parm.mode |= FW_WOWLAN_PATTERN_MATCH;
|
||||||
DBG_88E_LEVEL(_drv_info_, "%s 2.pwowlan_parm.mode=0x%x\n",__func__,pwowlan_parm.mode );
|
DBG_88E_LEVEL(_drv_info_, "%s 2.pwowlan_parm.mode=0x%x\n",__func__,pwowlan_parm.mode );
|
||||||
}
|
}
|
||||||
if (pwrpriv->wowlan_magic ==_TRUE){
|
if (pwrpriv->wowlan_magic ==true){
|
||||||
pwowlan_parm.mode |=FW_WOWLAN_MAGIC_PKT;
|
pwowlan_parm.mode |=FW_WOWLAN_MAGIC_PKT;
|
||||||
DBG_88E_LEVEL(_drv_info_, "%s 3.pwowlan_parm.mode=0x%x\n",__func__,pwowlan_parm.mode );
|
DBG_88E_LEVEL(_drv_info_, "%s 3.pwowlan_parm.mode=0x%x\n",__func__,pwowlan_parm.mode );
|
||||||
}
|
}
|
||||||
if (pwrpriv->wowlan_unicast ==_TRUE){
|
if (pwrpriv->wowlan_unicast ==true){
|
||||||
pwowlan_parm.mode |=FW_WOWLAN_UNICAST;
|
pwowlan_parm.mode |=FW_WOWLAN_UNICAST;
|
||||||
DBG_88E_LEVEL(_drv_info_, "%s 4.pwowlan_parm.mode=0x%x\n",__func__,pwowlan_parm.mode );
|
DBG_88E_LEVEL(_drv_info_, "%s 4.pwowlan_parm.mode=0x%x\n",__func__,pwowlan_parm.mode );
|
||||||
}
|
}
|
||||||
|
@ -1187,7 +1187,7 @@ _func_enter_;
|
||||||
pwowlan_parm.gpio_duration=0;
|
pwowlan_parm.gpio_duration=0;
|
||||||
res = FillH2CCmd_88E(padapter, H2C_COM_REMOTE_WAKE_CTRL, 3, (u8 *)&pwowlan_parm);
|
res = FillH2CCmd_88E(padapter, H2C_COM_REMOTE_WAKE_CTRL, 3, (u8 *)&pwowlan_parm);
|
||||||
} else {
|
} else {
|
||||||
pwrpriv->wowlan_magic =_FALSE;
|
pwrpriv->wowlan_magic =false;
|
||||||
res = FillH2CCmd_88E(padapter, H2C_COM_WWLAN, 2, (u8 *)&pwowlan_parm);
|
res = FillH2CCmd_88E(padapter, H2C_COM_WWLAN, 2, (u8 *)&pwowlan_parm);
|
||||||
rtw_msleep_os(2);
|
rtw_msleep_os(2);
|
||||||
res = FillH2CCmd_88E(padapter, H2C_COM_REMOTE_WAKE_CTRL, 3, (u8 *)&pwowlan_parm);
|
res = FillH2CCmd_88E(padapter, H2C_COM_REMOTE_WAKE_CTRL, 3, (u8 *)&pwowlan_parm);
|
||||||
|
|
|
@ -57,7 +57,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;
|
||||||
|
@ -81,7 +81,7 @@ static void dm_CheckPbcGPIO(_adapter *padapter)
|
||||||
|
|
||||||
if (tmp1byte&HAL_8192C_HW_GPIO_WPS_BIT)
|
if (tmp1byte&HAL_8192C_HW_GPIO_WPS_BIT)
|
||||||
{
|
{
|
||||||
bPbcPressed = _TRUE;
|
bPbcPressed = true;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
tmp1byte = rtw_read8(padapter, GPIO_IN);
|
tmp1byte = rtw_read8(padapter, GPIO_IN);
|
||||||
|
@ -92,11 +92,11 @@ static void dm_CheckPbcGPIO(_adapter *padapter)
|
||||||
|
|
||||||
if ((tmp1byte&HAL_8192C_HW_GPIO_WPS_BIT)==0)
|
if ((tmp1byte&HAL_8192C_HW_GPIO_WPS_BIT)==0)
|
||||||
{
|
{
|
||||||
bPbcPressed = _TRUE;
|
bPbcPressed = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
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
|
||||||
|
@ -140,8 +140,8 @@ dm_InterruptMigration(
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||||
struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv);
|
||||||
bool bCurrentIntMt, bCurrentACIntDisable;
|
bool bCurrentIntMt, bCurrentACIntDisable;
|
||||||
bool IntMtToSet = _FALSE;
|
bool IntMtToSet = false;
|
||||||
bool ACIntToSet = _FALSE;
|
bool ACIntToSet = false;
|
||||||
|
|
||||||
|
|
||||||
// Retrieve current interrupt migration and Tx four ACs IMR settings first.
|
// Retrieve current interrupt migration and Tx four ACs IMR settings first.
|
||||||
|
@ -153,14 +153,14 @@ dm_InterruptMigration(
|
||||||
// when interrupt migration is set before. 2010.03.05.
|
// when interrupt migration is set before. 2010.03.05.
|
||||||
//
|
//
|
||||||
if (!Adapter->registrypriv.wifi_spec &&
|
if (!Adapter->registrypriv.wifi_spec &&
|
||||||
(check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE) &&
|
(check_fwstate(pmlmepriv, _FW_LINKED)== true) &&
|
||||||
pmlmepriv->LinkDetectInfo.bHigherBusyTraffic)
|
pmlmepriv->LinkDetectInfo.bHigherBusyTraffic)
|
||||||
{
|
{
|
||||||
IntMtToSet = _TRUE;
|
IntMtToSet = true;
|
||||||
|
|
||||||
// To check whether we should disable Tx interrupt or not.
|
// To check whether we should disable Tx interrupt or not.
|
||||||
if (pmlmepriv->LinkDetectInfo.bHigherBusyRxTraffic )
|
if (pmlmepriv->LinkDetectInfo.bHigherBusyRxTraffic )
|
||||||
ACIntToSet = _TRUE;
|
ACIntToSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Update current settings.
|
//Update current settings.
|
||||||
|
@ -401,9 +401,9 @@ rtl8188e_HalDmWatchDog(
|
||||||
PADAPTER Adapter
|
PADAPTER Adapter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
bool bFwCurrentInPSMode = _FALSE;
|
bool bFwCurrentInPSMode = false;
|
||||||
bool bFwPSAwake = _TRUE;
|
bool bFwPSAwake = true;
|
||||||
u8 hw_init_completed = _FALSE;
|
u8 hw_init_completed = false;
|
||||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||||
PDM_ODM_T pDM_Odm = &(pHalData->odmpriv);
|
PDM_ODM_T pDM_Odm = &(pHalData->odmpriv);
|
||||||
|
@ -414,7 +414,7 @@ rtl8188e_HalDmWatchDog(
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
#if defined(CONFIG_CONCURRENT_MODE)
|
#if defined(CONFIG_CONCURRENT_MODE)
|
||||||
if (Adapter->isprimary == _FALSE && pbuddy_adapter) {
|
if (Adapter->isprimary == false && pbuddy_adapter) {
|
||||||
hw_init_completed = pbuddy_adapter->hw_init_completed;
|
hw_init_completed = pbuddy_adapter->hw_init_completed;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
@ -422,7 +422,7 @@ rtl8188e_HalDmWatchDog(
|
||||||
hw_init_completed = Adapter->hw_init_completed;
|
hw_init_completed = Adapter->hw_init_completed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hw_init_completed == _FALSE)
|
if (hw_init_completed == false)
|
||||||
goto skip_dm;
|
goto skip_dm;
|
||||||
|
|
||||||
#ifdef CONFIG_LPS
|
#ifdef CONFIG_LPS
|
||||||
|
@ -442,10 +442,10 @@ 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 ( (hw_init_completed == _TRUE)
|
if ( (hw_init_completed == true)
|
||||||
&& ((!bFwCurrentInPSMode) && bFwPSAwake))
|
&& ((!bFwCurrentInPSMode) && bFwPSAwake))
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -477,28 +477,28 @@ rtl8188e_HalDmWatchDog(
|
||||||
|
|
||||||
|
|
||||||
//ODM
|
//ODM
|
||||||
if (hw_init_completed == _TRUE)
|
if (hw_init_completed == true)
|
||||||
{
|
{
|
||||||
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
|
||||||
u8 bLinked=_FALSE;
|
u8 bLinked=false;
|
||||||
#ifdef CONFIG_DISABLE_ODM
|
#ifdef CONFIG_DISABLE_ODM
|
||||||
pHalData->odmpriv.SupportAbility = 0;
|
pHalData->odmpriv.SupportAbility = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) ||
|
if ( (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) ||
|
||||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == _TRUE))
|
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == true))
|
||||||
{
|
{
|
||||||
if (Adapter->stapriv.asoc_sta_count > 2)
|
if (Adapter->stapriv.asoc_sta_count > 2)
|
||||||
bLinked = _TRUE;
|
bLinked = true;
|
||||||
}
|
}
|
||||||
else{//Station mode
|
else{//Station mode
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||||
bLinked = _TRUE;
|
bLinked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (check_buddy_fw_link(Adapter))
|
if (check_buddy_fw_link(Adapter))
|
||||||
bLinked = _TRUE;
|
bLinked = true;
|
||||||
#endif //CONFIG_CONCURRENT_MODE
|
#endif //CONFIG_CONCURRENT_MODE
|
||||||
|
|
||||||
ODM_CmnInfoUpdate(&pHalData->odmpriv ,ODM_CMNINFO_LINK, bLinked);
|
ODM_CmnInfoUpdate(&pHalData->odmpriv ,ODM_CMNINFO_LINK, bLinked);
|
||||||
|
@ -583,12 +583,12 @@ u8 AntDivBeforeLink8188E(PADAPTER Adapter )
|
||||||
if (pHalData->AntDivCfg==0)
|
if (pHalData->AntDivCfg==0)
|
||||||
{
|
{
|
||||||
//DBG_88E("odm_AntDivBeforeLink8192C(): No AntDiv Mechanism.\n");
|
//DBG_88E("odm_AntDivBeforeLink8192C(): No AntDiv Mechanism.\n");
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||||
{
|
{
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -598,14 +598,14 @@ u8 AntDivBeforeLink8188E(PADAPTER Adapter )
|
||||||
pDM_SWAT_Table->CurAntenna = (pDM_SWAT_Table->CurAntenna==Antenna_A)?Antenna_B:Antenna_A;
|
pDM_SWAT_Table->CurAntenna = (pDM_SWAT_Table->CurAntenna==Antenna_A)?Antenna_B:Antenna_A;
|
||||||
|
|
||||||
//PHY_SetBBReg(Adapter, rFPGA0_XA_RFInterfaceOE, 0x300, pDM_SWAT_Table->CurAntenna);
|
//PHY_SetBBReg(Adapter, rFPGA0_XA_RFInterfaceOE, 0x300, pDM_SWAT_Table->CurAntenna);
|
||||||
rtw_antenna_select_cmd(Adapter, pDM_SWAT_Table->CurAntenna, _FALSE);
|
rtw_antenna_select_cmd(Adapter, pDM_SWAT_Table->CurAntenna, false);
|
||||||
//DBG_88E("%s change antenna to ANT_( %s ).....\n",__func__, (pDM_SWAT_Table->CurAntenna==Antenna_A)?"A":"B");
|
//DBG_88E("%s change antenna to ANT_( %s ).....\n",__func__, (pDM_SWAT_Table->CurAntenna==Antenna_A)?"A":"B");
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pDM_SWAT_Table->SWAS_NoLink_State = 0;
|
pDM_SWAT_Table->SWAS_NoLink_State = 0;
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,9 +41,9 @@ static void iol_mode_enable(PADAPTER padapter, u8 enable)
|
||||||
//DBG_88E("%s reg_0xf0:0x%02x, write 0x%02x\n", __func__, reg_0xf0, reg_0xf0|SW_OFFLOAD_EN);
|
//DBG_88E("%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)
|
||||||
{
|
{
|
||||||
printk("bFWReady == _FALSE call reset 8051...\n");
|
printk("bFWReady == false call reset 8051...\n");
|
||||||
_8051Reset88E(padapter);
|
_8051Reset88E(padapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -869,7 +869,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter)
|
||||||
// RT_TRACE(_module_hal_init_c_, _drv_err_, ("rtl8723a_FirmwareDownload: %s\n", pFwImageFileName));
|
// RT_TRACE(_module_hal_init_c_, _drv_err_, ("rtl8723a_FirmwareDownload: %s\n", pFwImageFileName));
|
||||||
|
|
||||||
#ifdef CONFIG_FILE_FWIMG
|
#ifdef CONFIG_FILE_FWIMG
|
||||||
if (rtw_is_file_readable(rtw_fw_file_path) == _TRUE)
|
if (rtw_is_file_readable(rtw_fw_file_path) == true)
|
||||||
{
|
{
|
||||||
DBG_88E("%s accquire FW from file:%s\n", __func__, rtw_fw_file_path);
|
DBG_88E("%s accquire FW from file:%s\n", __func__, rtw_fw_file_path);
|
||||||
pFirmware->eFWSource = FW_SOURCE_IMG_FILE;
|
pFirmware->eFWSource = FW_SOURCE_IMG_FILE;
|
||||||
|
@ -944,7 +944,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter)
|
||||||
_8051Reset88E(padapter);
|
_8051Reset88E(padapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
_FWDownloadEnable(padapter, _TRUE);
|
_FWDownloadEnable(padapter, true);
|
||||||
fwdl_start_time = rtw_get_current_time();
|
fwdl_start_time = rtw_get_current_time();
|
||||||
while (1) {
|
while (1) {
|
||||||
//reset the FWDL chksum
|
//reset the FWDL chksum
|
||||||
|
@ -962,7 +962,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter)
|
||||||
, rtw_get_passing_time_ms(fwdl_start_time)
|
, rtw_get_passing_time_ms(fwdl_start_time)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
_FWDownloadEnable(padapter, _FALSE);
|
_FWDownloadEnable(padapter, false);
|
||||||
if (_SUCCESS != rtStatus){
|
if (_SUCCESS != rtStatus){
|
||||||
DBG_88E("DL Firmware failed!\n");
|
DBG_88E("DL Firmware failed!\n");
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
@ -1001,7 +1001,7 @@ void rtl8188e_InitializeFirmwareVars(PADAPTER padapter)
|
||||||
pwrpriv = &padapter->pwrctrlpriv;
|
pwrpriv = &padapter->pwrctrlpriv;
|
||||||
|
|
||||||
// Init Fw LPS related.
|
// Init Fw LPS related.
|
||||||
padapter->pwrctrlpriv.bFwCurrentInPSMode = _FALSE;
|
padapter->pwrctrlpriv.bFwCurrentInPSMode = false;
|
||||||
// Init H2C counter. by tynli. 2009.12.09.
|
// Init H2C counter. by tynli. 2009.12.09.
|
||||||
pHalData->LastHMEBoxNum = 0;
|
pHalData->LastHMEBoxNum = 0;
|
||||||
}
|
}
|
||||||
|
@ -1024,7 +1024,7 @@ SetFwRelatedForWoWLAN8188ES(
|
||||||
{
|
{
|
||||||
int status=_FAIL;
|
int status=_FAIL;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
u8 bRecover = _FALSE;
|
u8 bRecover = false;
|
||||||
//
|
//
|
||||||
// 1. Before WoWLAN we need to re-download WoWLAN Fw.
|
// 1. Before WoWLAN we need to re-download WoWLAN Fw.
|
||||||
//
|
//
|
||||||
|
@ -1046,7 +1046,7 @@ void rtl8188e_InitializeFirmwareVars(PADAPTER padapter)
|
||||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(padapter);
|
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(padapter);
|
||||||
|
|
||||||
// Init Fw LPS related.
|
// Init Fw LPS related.
|
||||||
padapter->pwrctrlpriv.bFwCurrentInPSMode = _FALSE;
|
padapter->pwrctrlpriv.bFwCurrentInPSMode = false;
|
||||||
|
|
||||||
// Init H2C counter. by tynli. 2009.12.09.
|
// Init H2C counter. by tynli. 2009.12.09.
|
||||||
pHalData->LastHMEBoxNum = 0;
|
pHalData->LastHMEBoxNum = 0;
|
||||||
|
@ -1105,7 +1105,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);
|
||||||
|
|
||||||
|
@ -1129,7 +1129,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);
|
||||||
|
@ -1142,7 +1142,7 @@ hal_EfusePowerSwitch_RTL8188E(
|
||||||
{
|
{
|
||||||
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));
|
||||||
|
@ -1170,7 +1170,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.
|
||||||
|
@ -1183,7 +1183,7 @@ static bool efuse_read_phymap(
|
||||||
//
|
//
|
||||||
while (addr < limit)
|
while (addr < limit)
|
||||||
{
|
{
|
||||||
ReadEFuseByte(Adapter, addr, pos, _FALSE);
|
ReadEFuseByte(Adapter, addr, pos, false);
|
||||||
if (*pos != 0xFF)
|
if (*pos != 0xFF)
|
||||||
{
|
{
|
||||||
pos++;
|
pos++;
|
||||||
|
@ -1191,7 +1191,7 @@ static bool efuse_read_phymap(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reach_end = _TRUE;
|
reach_end = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1404,14 +1404,14 @@ 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
|
||||||
{
|
{
|
||||||
|
@ -1419,7 +1419,7 @@ Hal_EfuseSwitchToBank(
|
||||||
INCLUDE_MULTI_FUNC_BT(pAdapter))
|
INCLUDE_MULTI_FUNC_BT(pAdapter))
|
||||||
{
|
{
|
||||||
value32 = rtw_read32(pAdapter, EFUSE_TEST);
|
value32 = rtw_read32(pAdapter, EFUSE_TEST);
|
||||||
bRet = _TRUE;
|
bRet = true;
|
||||||
switch (bank)
|
switch (bank)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -1436,13 +1436,13 @@ Hal_EfuseSwitchToBank(
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
value32 = (value32 & ~EFUSE_SEL_MASK) | EFUSE_SEL(EFUSE_WIFI_SEL_0);
|
value32 = (value32 & ~EFUSE_SEL_MASK) | EFUSE_SEL(EFUSE_WIFI_SEL_0);
|
||||||
bRet = _FALSE;
|
bRet = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
rtw_write32(pAdapter, EFUSE_TEST, value32);
|
rtw_write32(pAdapter, EFUSE_TEST, value32);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bRet = _TRUE;
|
bRet = true;
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -1489,7 +1489,7 @@ ReadEFuseByIC(
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
#ifdef DBG_IOL_READ_EFUSE_MAP
|
#ifdef DBG_IOL_READ_EFUSE_MAP
|
||||||
if (_rtw_memcmp(logical_map, Adapter->eeprompriv.efuse_eeprom_data, 0x130) == _FALSE)
|
if (_rtw_memcmp(logical_map, Adapter->eeprompriv.efuse_eeprom_data, 0x130) == false)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
DBG_88E("%s compare first 0x130 byte fail\n", __func__);
|
DBG_88E("%s compare first 0x130 byte fail\n", __func__);
|
||||||
|
@ -1805,7 +1805,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;
|
||||||
|
@ -1854,7 +1854,7 @@ hal_EfuseGetCurrentSize_8188e( PADAPTER pAdapter,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bContinual = _FALSE ;
|
bContinual = false ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1915,8 +1915,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;
|
||||||
|
@ -1929,9 +1929,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;
|
||||||
|
|
||||||
_rtw_memset((void *)data, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
|
_rtw_memset((void *)data, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
|
||||||
_rtw_memset((void *)tmpdata, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
|
_rtw_memset((void *)tmpdata, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
|
||||||
|
@ -1972,7 +1972,7 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -1983,11 +1983,11 @@ hal_EfusePgPacketRead_8188e(
|
||||||
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;
|
||||||
|
@ -2001,7 +2001,7 @@ hal_EfusePgPacketRead_8188e(
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
bContinual = _FALSE ;
|
bContinual = false ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//------- Data section Read -------------
|
//------- Data section Read -------------
|
||||||
|
@ -2016,9 +2016,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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2093,7 +2093,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);
|
||||||
}
|
}
|
||||||
|
@ -2107,7 +2107,7 @@ hal_EfuseFixHeaderProcess(
|
||||||
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
|
||||||
|
@ -2118,7 +2118,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;
|
||||||
|
@ -2138,7 +2138,7 @@ hal_EfusePgPacketWrite2ByteHeader(
|
||||||
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);
|
||||||
|
@ -2160,7 +2160,7 @@ hal_EfusePgPacketWrite2ByteHeader(
|
||||||
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);
|
||||||
|
@ -2172,7 +2172,7 @@ hal_EfusePgPacketWrite2ByteHeader(
|
||||||
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
|
||||||
{
|
{
|
||||||
|
@ -2188,11 +2188,11 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2215,7 +2215,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;
|
||||||
|
@ -2230,7 +2230,7 @@ hal_EfusePgPacketWrite1ByteHeader(
|
||||||
{
|
{
|
||||||
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);
|
||||||
|
@ -2238,7 +2238,7 @@ hal_EfusePgPacketWrite1ByteHeader(
|
||||||
|
|
||||||
if (pg_header == tmp_header)
|
if (pg_header == tmp_header)
|
||||||
{
|
{
|
||||||
bRet = _TRUE;
|
bRet = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2248,7 +2248,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;
|
||||||
|
@ -2263,7 +2263,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;
|
||||||
|
@ -2274,7 +2274,7 @@ hal_EfusePgPacketWriteData(
|
||||||
{
|
{
|
||||||
// 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
|
||||||
{
|
{
|
||||||
|
@ -2284,9 +2284,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;
|
||||||
|
@ -2300,7 +2300,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)
|
||||||
{
|
{
|
||||||
|
@ -2349,9 +2349,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
|
||||||
|
@ -2362,13 +2362,13 @@ 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;
|
||||||
|
@ -2383,7 +2383,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;
|
||||||
|
@ -2421,7 +2421,7 @@ hal_EfusePartialWriteCheck(
|
||||||
{
|
{
|
||||||
if (startAddr >= efuse_max_available_len)
|
if (startAddr >= efuse_max_available_len)
|
||||||
{
|
{
|
||||||
bRet = _FALSE;
|
bRet = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2435,7 +2435,7 @@ hal_EfusePartialWriteCheck(
|
||||||
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
|
||||||
|
@ -2470,7 +2470,7 @@ hal_EfusePartialWriteCheck(
|
||||||
|
|
||||||
if (!PgWriteSuccess)
|
if (!PgWriteSuccess)
|
||||||
{
|
{
|
||||||
bRet = _FALSE; // write fail, return
|
bRet = false; // write fail, return
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2492,7 +2492,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2509,7 +2509,7 @@ 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));
|
||||||
|
@ -2517,9 +2517,9 @@ hal_EfusePgCheckAvailableAddr(
|
||||||
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
|
||||||
|
@ -2554,20 +2554,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
|
||||||
|
@ -2584,20 +2584,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3034,7 +3034,7 @@ Hal_InitPGData88E(PADAPTER padapter)
|
||||||
u32 i;
|
u32 i;
|
||||||
u16 value16;
|
u16 value16;
|
||||||
|
|
||||||
if (_FALSE == pEEPROM->bautoload_fail_flag)
|
if (false == pEEPROM->bautoload_fail_flag)
|
||||||
{ // autoload OK.
|
{ // autoload OK.
|
||||||
if (is_boot_from_eeprom(padapter))
|
if (is_boot_from_eeprom(padapter))
|
||||||
{
|
{
|
||||||
|
@ -3048,16 +3048,16 @@ 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
|
||||||
RT_TRACE(_module_hci_hal_init_c_, _drv_notice_, ("AutoLoad Fail reported from CR9346!!\n"));
|
RT_TRACE(_module_hci_hal_init_c_, _drv_notice_, ("AutoLoad Fail reported from CR9346!!\n"));
|
||||||
// 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3077,11 +3077,11 @@ Hal_EfuseParseIDCode88E(
|
||||||
if (EEPROMId != RTL_EEPROM_ID)
|
if (EEPROMId != RTL_EEPROM_ID)
|
||||||
{
|
{
|
||||||
DBG_88E("EEPROM ID(%#x) is invalid!!\n", EEPROMId);
|
DBG_88E("EEPROM ID(%#x) is invalid!!\n", EEPROMId);
|
||||||
pEEPROM->bautoload_fail_flag = _TRUE;
|
pEEPROM->bautoload_fail_flag = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pEEPROM->bautoload_fail_flag = _FALSE;
|
pEEPROM->bautoload_fail_flag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_88E("EEPROM ID=0x%04x\n", EEPROMId);
|
DBG_88E("EEPROM ID=0x%04x\n", EEPROMId);
|
||||||
|
@ -3274,11 +3274,11 @@ Hal_GetChnlGroup88E(
|
||||||
OUT u8* pGroup
|
OUT u8* pGroup
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
u8 bIn24G=_TRUE;
|
u8 bIn24G=true;
|
||||||
|
|
||||||
if (chnl<=14)
|
if (chnl<=14)
|
||||||
{
|
{
|
||||||
bIn24G=_TRUE;
|
bIn24G=true;
|
||||||
|
|
||||||
if (chnl < 3) // Chanel 1-2
|
if (chnl < 3) // Chanel 1-2
|
||||||
*pGroup = 0;
|
*pGroup = 0;
|
||||||
|
@ -3299,7 +3299,7 @@ Hal_GetChnlGroup88E(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bIn24G=_FALSE;
|
bIn24G=false;
|
||||||
|
|
||||||
if (chnl <=40)
|
if (chnl <=40)
|
||||||
*pGroup = 0;
|
*pGroup = 0;
|
||||||
|
@ -3348,8 +3348,8 @@ void Hal_ReadPowerSavingMode88E(
|
||||||
u8 tmpvalue;
|
u8 tmpvalue;
|
||||||
|
|
||||||
if (AutoLoadFail){
|
if (AutoLoadFail){
|
||||||
padapter->pwrctrlpriv.bHWPowerdown = _FALSE;
|
padapter->pwrctrlpriv.bHWPowerdown = false;
|
||||||
padapter->pwrctrlpriv.bSupportRemoteWakeup = _FALSE;
|
padapter->pwrctrlpriv.bSupportRemoteWakeup = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
@ -3363,7 +3363,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
|
||||||
#ifdef CONFIG_USB_HCI
|
#ifdef CONFIG_USB_HCI
|
||||||
padapter->pwrctrlpriv.bSupportRemoteWakeup = (hwinfo[EEPROM_USB_OPTIONAL_FUNCTION0] & BIT1)?_TRUE :_FALSE;
|
padapter->pwrctrlpriv.bSupportRemoteWakeup = (hwinfo[EEPROM_USB_OPTIONAL_FUNCTION0] & BIT1)?true :false;
|
||||||
#endif //CONFIG_USB_HCI
|
#endif //CONFIG_USB_HCI
|
||||||
|
|
||||||
//if (SUPPORT_HW_RADIO_DETECT(Adapter))
|
//if (SUPPORT_HW_RADIO_DETECT(Adapter))
|
||||||
|
@ -3623,7 +3623,7 @@ Hal_ReadThermalMeter_88E(
|
||||||
|
|
||||||
if (pHalData->EEPROMThermalMeter == 0xff || AutoloadFail)
|
if (pHalData->EEPROMThermalMeter == 0xff || AutoloadFail)
|
||||||
{
|
{
|
||||||
pHalData->bAPKThermalMeterIgnore = _TRUE;
|
pHalData->bAPKThermalMeterIgnore = true;
|
||||||
pHalData->EEPROMThermalMeter = EEPROM_Default_ThermalMeter_88E;
|
pHalData->EEPROMThermalMeter = EEPROM_Default_ThermalMeter_88E;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3651,11 +3651,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_88E("HalDetectPwrDownMode(): PDN=%d\n", pHalData->pwrdown);
|
DBG_88E("HalDetectPwrDownMode(): PDN=%d\n", pHalData->pwrdown);
|
||||||
|
@ -3666,7 +3666,7 @@ bool HalDetectPwrDownMode88E(PADAPTER Adapter)
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
void Hal_DetectWoWMode(PADAPTER pAdapter)
|
void Hal_DetectWoWMode(PADAPTER pAdapter)
|
||||||
{
|
{
|
||||||
pAdapter->pwrctrlpriv.bSupportRemoteWakeup = _TRUE;
|
pAdapter->pwrctrlpriv.bSupportRemoteWakeup = true;
|
||||||
DBG_88E("%s\n", __func__);
|
DBG_88E("%s\n", __func__);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3682,7 +3682,7 @@ void Hal_ReadRFGainOffset(
|
||||||
//
|
//
|
||||||
// BB_RF Gain Offset from EEPROM
|
// BB_RF Gain Offset from EEPROM
|
||||||
//
|
//
|
||||||
res = rtw_efuse_access(Adapter, _FALSE, 0, EFUSE_MAX_SIZE, buff);
|
res = rtw_efuse_access(Adapter, false, 0, EFUSE_MAX_SIZE, buff);
|
||||||
if (!AutoloadFail && res != _FAIL)
|
if (!AutoloadFail && res != _FAIL)
|
||||||
Adapter->eeprompriv.EEPROMRFGainOffset = buff[EEPROM_RF_GAIN_OFFSET_88E];
|
Adapter->eeprompriv.EEPROMRFGainOffset = buff[EEPROM_RF_GAIN_OFFSET_88E];
|
||||||
else
|
else
|
||||||
|
|
|
@ -40,17 +40,17 @@ s32 Hal_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) {
|
||||||
RT_TRACE(_module_mp_, _drv_warning_, ("SetPowerTracking! Fail: not in MP mode!\n"));
|
RT_TRACE(_module_mp_, _drv_warning_, ("SetPowerTracking! Fail: not in MP mode!\n"));
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
{
|
{
|
||||||
pDM_Odm->RFCalibrateInfo.bTXPowerTracking = _TRUE;
|
pDM_Odm->RFCalibrateInfo.bTXPowerTracking = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit= _FALSE;
|
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit= false;
|
||||||
|
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -85,11 +85,11 @@ static void Hal_disable_dm(PADAPTER padapter)
|
||||||
// disable Dynamic Initial Gain
|
// disable Dynamic Initial Gain
|
||||||
// disable High Power
|
// disable High Power
|
||||||
// disable Power Tracking
|
// disable Power Tracking
|
||||||
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||||
|
|
||||||
// enable APK, LCK and IQK but disable power tracking
|
// enable APK, LCK and IQK but disable power tracking
|
||||||
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = _FALSE;
|
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = false;
|
||||||
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _TRUE);
|
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
|
@ -228,12 +228,12 @@ void Hal_MPT_CCKTxPowerAdjustbyIndex(PADAPTER pAdapter, bool beven)
|
||||||
if (beven && !pMptCtx->bMptIndexEven) //odd->even
|
if (beven && !pMptCtx->bMptIndexEven) //odd->even
|
||||||
{
|
{
|
||||||
Action = 2;
|
Action = 2;
|
||||||
pMptCtx->bMptIndexEven = _TRUE;
|
pMptCtx->bMptIndexEven = true;
|
||||||
}
|
}
|
||||||
else if (!beven && pMptCtx->bMptIndexEven) //even->odd
|
else if (!beven && pMptCtx->bMptIndexEven) //even->odd
|
||||||
{
|
{
|
||||||
Action = 1;
|
Action = 1;
|
||||||
pMptCtx->bMptIndexEven = _FALSE;
|
pMptCtx->bMptIndexEven = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Action != 0)
|
if (Action != 0)
|
||||||
|
@ -244,7 +244,7 @@ void Hal_MPT_CCKTxPowerAdjustbyIndex(PADAPTER pAdapter, bool beven)
|
||||||
{
|
{
|
||||||
if (pDM_Odm->RFCalibrateInfo.bCCKinCH14)
|
if (pDM_Odm->RFCalibrateInfo.bCCKinCH14)
|
||||||
{
|
{
|
||||||
if (_rtw_memcmp((void*)&TempCCk, (void*)&CCKSwingTable_Ch14[i][2], 4) == _TRUE)
|
if (_rtw_memcmp((void*)&TempCCk, (void*)&CCKSwingTable_Ch14[i][2], 4) == true)
|
||||||
{
|
{
|
||||||
CCK_index_old = (u8) i;
|
CCK_index_old = (u8) i;
|
||||||
// RTPRINT(FINIT, INIT_TxPower,("MPT_CCKTxPowerAdjustbyIndex: Initial reg0x%x = 0x%lx, CCK_index=0x%x, ch 14 %d\n",
|
// RTPRINT(FINIT, INIT_TxPower,("MPT_CCKTxPowerAdjustbyIndex: Initial reg0x%x = 0x%lx, CCK_index=0x%x, ch 14 %d\n",
|
||||||
|
@ -254,7 +254,7 @@ void Hal_MPT_CCKTxPowerAdjustbyIndex(PADAPTER pAdapter, bool beven)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_rtw_memcmp((void*)&TempCCk, (void*)&CCKSwingTable_Ch1_Ch13[i][2], 4) == _TRUE)
|
if (_rtw_memcmp((void*)&TempCCk, (void*)&CCKSwingTable_Ch1_Ch13[i][2], 4) == true)
|
||||||
{
|
{
|
||||||
CCK_index_old = (u8) i;
|
CCK_index_old = (u8) i;
|
||||||
// RTPRINT(FINIT, INIT_TxPower,("MPT_CCKTxPowerAdjustbyIndex: Initial reg0x%x = 0x%lx, CCK_index=0x%x, ch14 %d\n",
|
// RTPRINT(FINIT, INIT_TxPower,("MPT_CCKTxPowerAdjustbyIndex: Initial reg0x%x = 0x%lx, CCK_index=0x%x, ch14 %d\n",
|
||||||
|
@ -329,11 +329,11 @@ void Hal_SetChannel(PADAPTER pAdapter)
|
||||||
SelectChannel(pAdapter, channel);
|
SelectChannel(pAdapter, channel);
|
||||||
|
|
||||||
if (pHalData->CurrentChannel == 14 && !pDM_Odm->RFCalibrateInfo.bCCKinCH14) {
|
if (pHalData->CurrentChannel == 14 && !pDM_Odm->RFCalibrateInfo.bCCKinCH14) {
|
||||||
pDM_Odm->RFCalibrateInfo.bCCKinCH14 = _TRUE;
|
pDM_Odm->RFCalibrateInfo.bCCKinCH14 = true;
|
||||||
Hal_MPT_CCKTxPowerAdjust(pAdapter, pDM_Odm->RFCalibrateInfo.bCCKinCH14);
|
Hal_MPT_CCKTxPowerAdjust(pAdapter, pDM_Odm->RFCalibrateInfo.bCCKinCH14);
|
||||||
}
|
}
|
||||||
else if (pHalData->CurrentChannel != 14 && pDM_Odm->RFCalibrateInfo.bCCKinCH14) {
|
else if (pHalData->CurrentChannel != 14 && pDM_Odm->RFCalibrateInfo.bCCKinCH14) {
|
||||||
pDM_Odm->RFCalibrateInfo.bCCKinCH14 = _FALSE;
|
pDM_Odm->RFCalibrateInfo.bCCKinCH14 = false;
|
||||||
Hal_MPT_CCKTxPowerAdjust(pAdapter, pDM_Odm->RFCalibrateInfo.bCCKinCH14);
|
Hal_MPT_CCKTxPowerAdjust(pAdapter, pDM_Odm->RFCalibrateInfo.bCCKinCH14);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -689,7 +689,7 @@ s32 Hal_SetThermalMeter(PADAPTER pAdapter, u8 target_ther)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) {
|
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) {
|
||||||
RT_TRACE(_module_mp_, _drv_warning_, ("SetThermalMeter: Fail! not in MP mode!\n"));
|
RT_TRACE(_module_mp_, _drv_warning_, ("SetThermalMeter: Fail! not in MP mode!\n"));
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
@ -993,7 +993,7 @@ void Hal_SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart)
|
||||||
}
|
}
|
||||||
|
|
||||||
pAdapter->mppriv.MptCtx.bCckContTx = bStart;
|
pAdapter->mppriv.MptCtx.bCckContTx = bStart;
|
||||||
pAdapter->mppriv.MptCtx.bOfdmContTx = _FALSE;
|
pAdapter->mppriv.MptCtx.bOfdmContTx = false;
|
||||||
}/* mpt_StartCckContTx */
|
}/* mpt_StartCckContTx */
|
||||||
|
|
||||||
void Hal_SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart)
|
void Hal_SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart)
|
||||||
|
@ -1038,7 +1038,7 @@ void Hal_SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart)
|
||||||
write_bbreg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000100);
|
write_bbreg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000100);
|
||||||
}
|
}
|
||||||
|
|
||||||
pAdapter->mppriv.MptCtx.bCckContTx = _FALSE;
|
pAdapter->mppriv.MptCtx.bCckContTx = false;
|
||||||
pAdapter->mppriv.MptCtx.bOfdmContTx = bStart;
|
pAdapter->mppriv.MptCtx.bOfdmContTx = bStart;
|
||||||
}/* mpt_StartOfdmContTx */
|
}/* mpt_StartOfdmContTx */
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ 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;
|
||||||
|
|
||||||
|
@ -97,11 +97,11 @@ sic_IsSICReady(
|
||||||
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);
|
||||||
|
@ -110,7 +110,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);
|
||||||
|
@ -252,7 +252,7 @@ SIC_SetBBReg(
|
||||||
|
|
||||||
//RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg() start\n"));
|
//RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg() start\n"));
|
||||||
/*
|
/*
|
||||||
while (PlatformAtomicExchange(&pHalData->bChangeBBInProgress, _TRUE) == _TRUE)
|
while (PlatformAtomicExchange(&pHalData->bChangeBBInProgress, true) == true)
|
||||||
{
|
{
|
||||||
BBWaitCounter ++;
|
BBWaitCounter ++;
|
||||||
delay_ms(10); // 1 ms
|
delay_ms(10); // 1 ms
|
||||||
|
@ -279,7 +279,7 @@ SIC_SetBBReg(
|
||||||
|
|
||||||
sic_Write4Byte(Adapter, RegAddr, Data);
|
sic_Write4Byte(Adapter, RegAddr, Data);
|
||||||
|
|
||||||
//PlatformAtomicExchange(&pHalData->bChangeBBInProgress, _FALSE);
|
//PlatformAtomicExchange(&pHalData->bChangeBBInProgress, false);
|
||||||
//RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg() end\n"));
|
//RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg() end\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ SIC_QueryBBReg(
|
||||||
//RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg() start\n"));
|
//RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg() start\n"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
while (PlatformAtomicExchange(&pHalData->bChangeBBInProgress, _TRUE) == _TRUE)
|
while (PlatformAtomicExchange(&pHalData->bChangeBBInProgress, true) == true)
|
||||||
{
|
{
|
||||||
BBWaitCounter ++;
|
BBWaitCounter ++;
|
||||||
delay_ms(10); // 10 ms
|
delay_ms(10); // 10 ms
|
||||||
|
@ -317,7 +317,7 @@ SIC_QueryBBReg(
|
||||||
//RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg(), 0x%x=0x%x\n", RegAddr, OriginalValue));
|
//RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg(), 0x%x=0x%x\n", RegAddr, OriginalValue));
|
||||||
//RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg() end\n"));
|
//RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg() end\n"));
|
||||||
|
|
||||||
//PlatformAtomicExchange(&pHalData->bChangeBBInProgress, _FALSE);
|
//PlatformAtomicExchange(&pHalData->bChangeBBInProgress, false);
|
||||||
return (ReturnValue);
|
return (ReturnValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,7 +354,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
|
||||||
|
|
||||||
|
@ -1523,7 +1523,7 @@ phy_BB8188E_Config_ParaFile(
|
||||||
//
|
//
|
||||||
// 2. If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt
|
// 2. If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt
|
||||||
//
|
//
|
||||||
if (pEEPROM->bautoload_fail_flag == _FALSE)
|
if (pEEPROM->bautoload_fail_flag == false)
|
||||||
{
|
{
|
||||||
pHalData->pwrGroupCnt = 0;
|
pHalData->pwrGroupCnt = 0;
|
||||||
|
|
||||||
|
@ -2367,7 +2367,7 @@ PHY_UpdateTxPowerDbm8188E(
|
||||||
|
|
||||||
//Adapter->HalFunc.SetTxPowerLevelHandler(Adapter, pHalData->CurrentChannel);//gtest:todo
|
//Adapter->HalFunc.SetTxPowerLevelHandler(Adapter, pHalData->CurrentChannel);//gtest:todo
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2637,10 +2637,10 @@ PHY_SwChnl8188E( // Call after initialization
|
||||||
u8 channel
|
u8 channel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//PADAPTER Adapter = ADJUST_TO_ADAPTIVE_ADAPTER(pAdapter, _TRUE);
|
//PADAPTER Adapter = ADJUST_TO_ADAPTIVE_ADAPTER(pAdapter, true);
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||||
u8 tmpchannel = pHalData->CurrentChannel;
|
u8 tmpchannel = pHalData->CurrentChannel;
|
||||||
bool bResult = _TRUE;
|
bool bResult = true;
|
||||||
|
|
||||||
if (pHalData->rf_chip == RF_PSEUDO_11N)
|
if (pHalData->rf_chip == RF_PSEUDO_11N)
|
||||||
{
|
{
|
||||||
|
@ -2714,7 +2714,7 @@ phy_SwChnlStepByStep(
|
||||||
OUT u32 *delay
|
OUT u32 *delay
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2732,9 +2732,9 @@ phy_SetSwChnlCmdArray(
|
||||||
SwChnlCmd* pCmd;
|
SwChnlCmd* pCmd;
|
||||||
|
|
||||||
if (CmdTable == NULL)
|
if (CmdTable == NULL)
|
||||||
return _FALSE;
|
return false;
|
||||||
if (CmdTableIdx >= CmdTableSz)
|
if (CmdTableIdx >= CmdTableSz)
|
||||||
return _FALSE;
|
return false;
|
||||||
|
|
||||||
pCmd = CmdTable + CmdTableIdx;
|
pCmd = CmdTable + CmdTableIdx;
|
||||||
pCmd->CmdID = CmdID;
|
pCmd->CmdID = CmdID;
|
||||||
|
@ -2742,7 +2742,7 @@ phy_SetSwChnlCmdArray(
|
||||||
pCmd->Para2 = Para2;
|
pCmd->Para2 = Para2;
|
||||||
pCmd->msDelay = msDelay;
|
pCmd->msDelay = msDelay;
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2841,7 +2841,7 @@ PHY_CheckIsLegalRfPath8192C(
|
||||||
u32 eRFPath)
|
u32 eRFPath)
|
||||||
{
|
{
|
||||||
// HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
// HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||||
bool rtValue = _TRUE;
|
bool rtValue = true;
|
||||||
|
|
||||||
// NOt check RF Path now.!
|
// NOt check RF Path now.!
|
||||||
return rtValue;
|
return rtValue;
|
||||||
|
@ -2890,7 +2890,7 @@ static bool _PHY_QueryRFPathSwitch(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// if (is2T)
|
// if (is2T)
|
||||||
// return _TRUE;
|
// return true;
|
||||||
|
|
||||||
if (!pAdapter->hw_init_completed)
|
if (!pAdapter->hw_init_completed)
|
||||||
{
|
{
|
||||||
|
@ -2901,16 +2901,16 @@ static bool _PHY_QueryRFPathSwitch(
|
||||||
if (is2T)
|
if (is2T)
|
||||||
{
|
{
|
||||||
if (PHY_QueryBBReg(pAdapter, rFPGA0_XB_RFInterfaceOE, BIT5|BIT6) == 0x01)
|
if (PHY_QueryBBReg(pAdapter, rFPGA0_XB_RFInterfaceOE, BIT5|BIT6) == 0x01)
|
||||||
return _TRUE;
|
return true;
|
||||||
else
|
else
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (PHY_QueryBBReg(pAdapter, rFPGA0_XA_RFInterfaceOE, 0x300) == 0x02)
|
if (PHY_QueryBBReg(pAdapter, rFPGA0_XA_RFInterfaceOE, 0x300) == 0x02)
|
||||||
return _TRUE;
|
return true;
|
||||||
else
|
else
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,12 +168,12 @@ rtl8188e_PHY_RF6052SetCckTxPower(
|
||||||
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
||||||
//PMGNT_INFO pMgntInfo=&Adapter->MgntInfo;
|
//PMGNT_INFO pMgntInfo=&Adapter->MgntInfo;
|
||||||
u32 TxAGC[2]={0, 0}, tmpval=0,pwrtrac_value;
|
u32 TxAGC[2]={0, 0}, tmpval=0,pwrtrac_value;
|
||||||
bool TurboScanOff = _FALSE;
|
bool TurboScanOff = false;
|
||||||
u8 idx1, idx2;
|
u8 idx1, idx2;
|
||||||
u8* ptr;
|
u8* ptr;
|
||||||
u8 direction;
|
u8 direction;
|
||||||
//FOR CE ,must disable turbo scan
|
//FOR CE ,must disable turbo scan
|
||||||
TurboScanOff = _TRUE;
|
TurboScanOff = true;
|
||||||
|
|
||||||
|
|
||||||
if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS)
|
if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS)
|
||||||
|
@ -181,7 +181,7 @@ rtl8188e_PHY_RF6052SetCckTxPower(
|
||||||
TxAGC[RF_PATH_A] = 0x3f3f3f3f;
|
TxAGC[RF_PATH_A] = 0x3f3f3f3f;
|
||||||
TxAGC[RF_PATH_B] = 0x3f3f3f3f;
|
TxAGC[RF_PATH_B] = 0x3f3f3f3f;
|
||||||
|
|
||||||
TurboScanOff = _TRUE;//disable turbo scan
|
TurboScanOff = true;//disable turbo scan
|
||||||
|
|
||||||
if (TurboScanOff)
|
if (TurboScanOff)
|
||||||
{
|
{
|
||||||
|
@ -827,7 +827,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 */
|
||||||
|
|
||||||
|
@ -840,21 +840,21 @@ 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 = PHY_QueryRFReg(Adapter, eRFPath, Offset, bRFRegOffsetMask);
|
reg = PHY_QueryRFReg(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;
|
||||||
//RT_TRACE(COMP_INIT, DBG_LOUD,
|
//RT_TRACE(COMP_INIT, DBG_LOUD,
|
||||||
//("PHY_RFShadowCompare RF-%d Addr%02lx Err = %05lx\n",
|
//("PHY_RFShadowCompare RF-%d Addr%02lx Err = %05lx\n",
|
||||||
//eRFPath, Offset, reg));
|
//eRFPath, Offset, reg));
|
||||||
}
|
}
|
||||||
return RF_Shadow[eRFPath][Offset].ErrorOrNot ;
|
return RF_Shadow[eRFPath][Offset].ErrorOrNot ;
|
||||||
}
|
}
|
||||||
return _FALSE;
|
return false;
|
||||||
} /* PHY_RFShadowCompare */
|
} /* PHY_RFShadowCompare */
|
||||||
|
|
||||||
|
|
||||||
|
@ -865,10 +865,10 @@ 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)
|
||||||
{
|
{
|
||||||
PHY_SetRFReg(Adapter, eRFPath, Offset, bRFRegOffsetMask,
|
PHY_SetRFReg(Adapter, eRFPath, Offset, bRFRegOffsetMask,
|
||||||
RF_Shadow[eRFPath][Offset].Value);
|
RF_Shadow[eRFPath][Offset].Value);
|
||||||
|
@ -956,9 +956,9 @@ PHY_RFShadowCompareFlagSetAll(
|
||||||
{
|
{
|
||||||
// 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, (RF_RADIO_PATH_E)eRFPath, Offset, _FALSE);
|
PHY_RFShadowCompareFlagSet(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset, false);
|
||||||
else
|
else
|
||||||
PHY_RFShadowCompareFlagSet(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset, _TRUE);
|
PHY_RFShadowCompareFlagSet(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -978,9 +978,9 @@ PHY_RFShadowRecorverFlagSetAll(
|
||||||
{
|
{
|
||||||
// 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, (RF_RADIO_PATH_E)eRFPath, Offset, _FALSE);
|
PHY_RFShadowRecorverFlagSet(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset, false);
|
||||||
else
|
else
|
||||||
PHY_RFShadowRecorverFlagSet(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset, _TRUE);
|
PHY_RFShadowRecorverFlagSet(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -998,10 +998,10 @@ PHY_RFShadowRefresh(
|
||||||
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
|
for (Offset = 0; Offset <= RF6052_MAX_REG; 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -278,9 +278,9 @@ void update_recvframe_phyinfo_88e(
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
//_irqL irqL;
|
//_irqL irqL;
|
||||||
|
|
||||||
pkt_info.bPacketMatchBSSID =_FALSE;
|
pkt_info.bPacketMatchBSSID =false;
|
||||||
pkt_info.bPacketToSelf = _FALSE;
|
pkt_info.bPacketToSelf = false;
|
||||||
pkt_info.bPacketBeacon = _FALSE;
|
pkt_info.bPacketBeacon = false;
|
||||||
|
|
||||||
wlanhdr = get_recvframe_data(precvframe);
|
wlanhdr = get_recvframe_data(precvframe);
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ void update_recvframe_phyinfo_88e(
|
||||||
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && (GetFrameSubType(wlanhdr) == WIFI_BEACON);
|
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && (GetFrameSubType(wlanhdr) == WIFI_BEACON);
|
||||||
|
|
||||||
if (pkt_info.bPacketBeacon){
|
if (pkt_info.bPacketBeacon){
|
||||||
if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE) == _TRUE){
|
if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE) == true){
|
||||||
sa = padapter->mlmepriv.cur_network.network.MacAddress;
|
sa = padapter->mlmepriv.cur_network.network.MacAddress;
|
||||||
}
|
}
|
||||||
//to do Ad-hoc
|
//to do Ad-hoc
|
||||||
|
@ -325,7 +325,7 @@ void update_recvframe_phyinfo_88e(
|
||||||
|
|
||||||
precvframe->u.hdr.psta = NULL;
|
precvframe->u.hdr.psta = NULL;
|
||||||
if (pkt_info.bPacketMatchBSSID &&
|
if (pkt_info.bPacketMatchBSSID &&
|
||||||
(check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE))
|
(check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true))
|
||||||
{
|
{
|
||||||
if (psta)
|
if (psta)
|
||||||
{
|
{
|
||||||
|
@ -336,7 +336,7 @@ void update_recvframe_phyinfo_88e(
|
||||||
}
|
}
|
||||||
else if (pkt_info.bPacketToSelf || pkt_info.bPacketBeacon)
|
else if (pkt_info.bPacketToSelf || pkt_info.bPacketBeacon)
|
||||||
{
|
{
|
||||||
if (check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == _TRUE)
|
if (check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == true)
|
||||||
{
|
{
|
||||||
if (psta)
|
if (psta)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,7 @@ static void _restore_security_setting(_adapter *padapter)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//pairwise key
|
//pairwise key
|
||||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, _TRUE);
|
rtw_setstakey_cmd(padapter, (unsigned char *)psta, true);
|
||||||
//group key
|
//group key
|
||||||
rtw_set_key(padapter,&padapter->securitypriv,padapter->securitypriv.dot118021XGrpKeyid, 0);
|
rtw_set_key(padapter,&padapter->securitypriv,padapter->securitypriv.dot118021XGrpKeyid, 0);
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ static void _restore_network_status(_adapter *padapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
//disable dynamic functions, such as high power, DIG
|
//disable dynamic functions, such as high power, DIG
|
||||||
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress);
|
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress);
|
||||||
|
@ -153,13 +153,13 @@ void rtl8188e_silentreset_for_specific_platform(_adapter *padapter)
|
||||||
tasklet_kill(&pxmitpriv->xmit_tasklet);
|
tasklet_kill(&pxmitpriv->xmit_tasklet);
|
||||||
|
|
||||||
_enter_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
|
_enter_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
|
||||||
psrtpriv->silent_reset_inprogress = _TRUE;
|
psrtpriv->silent_reset_inprogress = true;
|
||||||
pwrpriv->change_rfpwrstate = rf_off;
|
pwrpriv->change_rfpwrstate = rf_off;
|
||||||
#ifdef CONFIG_IPS
|
#ifdef CONFIG_IPS
|
||||||
ips_enter(padapter);
|
ips_enter(padapter);
|
||||||
ips_leave(padapter);
|
ips_leave(padapter);
|
||||||
#endif
|
#endif
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||||
{
|
{
|
||||||
_restore_network_status(padapter);
|
_restore_network_status(padapter);
|
||||||
_restore_security_setting(padapter);
|
_restore_security_setting(padapter);
|
||||||
|
@ -167,7 +167,7 @@ void rtl8188e_silentreset_for_specific_platform(_adapter *padapter)
|
||||||
|
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
|
||||||
|
|
||||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
psrtpriv->silent_reset_inprogress = false;
|
||||||
_exit_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
|
_exit_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
|
||||||
|
|
||||||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||||
|
|
|
@ -66,19 +66,19 @@ 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
|
||||||
DBG_88E("dump tx_desc for data frame\n");
|
DBG_88E("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
|
||||||
DBG_88E("dump tx_desc for mgnt frame\n");
|
DBG_88E("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
|
||||||
|
|
|
@ -46,7 +46,7 @@ void SwLedOn(_adapter *padapter, PLED_871x pLed)
|
||||||
u8 LedCfg;
|
u8 LedCfg;
|
||||||
//HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
//HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
|
|
||||||
if ( (padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
|
if ( (padapter->bSurpriseRemoved == true) || ( padapter->bDriverStopped == true))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void SwLedOn(_adapter *padapter, PLED_871x pLed)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pLed->bLedOn = _TRUE;
|
pLed->bLedOn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ void SwLedOff(_adapter *padapter, PLED_871x pLed)
|
||||||
u8 LedCfg;
|
u8 LedCfg;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
|
|
||||||
if ((padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
|
if ((padapter->bSurpriseRemoved == true) || ( padapter->bDriverStopped == true))
|
||||||
{
|
{
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ void SwLedOff(_adapter *padapter, PLED_871x pLed)
|
||||||
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));
|
||||||
|
@ -113,7 +113,7 @@ void SwLedOff(_adapter *padapter, PLED_871x pLed)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
pLed->bLedOn = _FALSE;
|
pLed->bLedOn = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,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
|
||||||
}
|
}
|
||||||
|
@ -277,7 +277,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
|
||||||
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 ((!bagg_pkt) &&(rtw_usb_bulk_size_boundary(padapter,TXDESC_SIZE+sz)==_FALSE))
|
//if ((!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);
|
||||||
//DBG_88E("==> non-agg-pkt,shift pointer...\n");
|
//DBG_88E("==> non-agg-pkt,shift pointer...\n");
|
||||||
|
@ -339,7 +339,7 @@ if (padapter->registrypriv.mp_mode == 0)
|
||||||
|
|
||||||
fill_txdesc_sectype(pattrib, ptxdesc);
|
fill_txdesc_sectype(pattrib, ptxdesc);
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
//SET_TX_DESC_MAX_AGG_NUM_88E(pDesc, 0x1F);
|
//SET_TX_DESC_MAX_AGG_NUM_88E(pDesc, 0x1F);
|
||||||
|
@ -469,13 +469,13 @@ if (padapter->registrypriv.mp_mode == 0)
|
||||||
|
|
||||||
//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
|
||||||
|
|
||||||
#ifdef CONFIG_INTEL_PROXIM
|
#ifdef CONFIG_INTEL_PROXIM
|
||||||
if ((padapter->proximity.proxim_on==_TRUE)&&(pattrib->intel_proxim==_TRUE)){
|
if ((padapter->proximity.proxim_on==true)&&(pattrib->intel_proxim==true)){
|
||||||
DBG_88E("\n %s pattrib->rate=%d\n",__func__,pattrib->rate);
|
DBG_88E("\n %s pattrib->rate=%d\n",__func__,pattrib->rate);
|
||||||
ptxdesc->txdw5 |= cpu_to_le32( pattrib->rate);
|
ptxdesc->txdw5 |= cpu_to_le32( pattrib->rate);
|
||||||
}
|
}
|
||||||
|
@ -570,7 +570,7 @@ s32 rtl8188eu_xmit_buf_handler(PADAPTER padapter)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = (padapter->bDriverStopped == _TRUE) || (padapter->bSurpriseRemoved == _TRUE);
|
ret = (padapter->bDriverStopped == true) || (padapter->bSurpriseRemoved == true);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
RT_TRACE(_module_hal_xmit_c_, _drv_notice_,
|
RT_TRACE(_module_hal_xmit_c_, _drv_notice_,
|
||||||
("%s: bDriverStopped(%d) bSurpriseRemoved(%d)!\n",
|
("%s: bDriverStopped(%d) bSurpriseRemoved(%d)!\n",
|
||||||
|
@ -578,7 +578,7 @@ s32 rtl8188eu_xmit_buf_handler(PADAPTER padapter)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_pending_xmitbuf(pxmitpriv) == _FALSE)
|
if (check_pending_xmitbuf(pxmitpriv) == false)
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
|
|
||||||
#ifdef CONFIG_LPS_LCLK
|
#ifdef CONFIG_LPS_LCLK
|
||||||
|
@ -652,7 +652,7 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
@ -756,7 +756,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){
|
||||||
//DBG_88E("%s #1, connot alloc xmitbuf!!!!\n",__func__);
|
//DBG_88E("%s #1, connot alloc xmitbuf!!!!\n",__func__);
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -770,7 +770,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
|
||||||
//DBG_88E("no more xmit frame ,return\n");
|
//DBG_88E("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
|
||||||
|
@ -808,7 +808,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
||||||
rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||||
#else
|
#else
|
||||||
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||||
if (res == _FALSE) {
|
if (res == false) {
|
||||||
// rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
// rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -873,7 +873,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);
|
||||||
|
@ -927,7 +927,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
||||||
rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||||
#else
|
#else
|
||||||
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||||
if (res == _FALSE) {
|
if (res == false) {
|
||||||
DBG_88E("%s coalesce failed\n",__func__);
|
DBG_88E("%s coalesce failed\n",__func__);
|
||||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||||
continue;
|
continue;
|
||||||
|
@ -938,7 +938,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);
|
||||||
|
@ -967,7 +967,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
||||||
}//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);
|
||||||
|
|
||||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||||
|
@ -991,7 +991,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
||||||
}
|
}
|
||||||
#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
|
||||||
|
@ -1017,7 +1017,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
||||||
|
|
||||||
rtw_free_xmitframe(pxmitpriv, pfirstframe);
|
rtw_free_xmitframe(pxmitpriv, pfirstframe);
|
||||||
|
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -1040,7 +1040,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
||||||
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
|
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
|
||||||
if (!pxmitbuf)
|
if (!pxmitbuf)
|
||||||
{
|
{
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1087,14 +1087,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
|
||||||
|
@ -1119,8 +1119,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)
|
||||||
{
|
{
|
||||||
|
@ -1146,11 +1146,11 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||||
goto enqueue;
|
goto enqueue;
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (check_fwstate(pbuddy_mlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
if (check_fwstate(pbuddy_mlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||||
goto enqueue;
|
goto enqueue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1169,7 +1169,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);
|
||||||
|
@ -1182,10 +1182,10 @@ enqueue:
|
||||||
// Trick, make the statistics correct
|
// Trick, make the statistics correct
|
||||||
pxmitpriv->tx_pkts--;
|
pxmitpriv->tx_pkts--;
|
||||||
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)
|
||||||
|
@ -1195,8 +1195,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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,7 +99,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);
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void rtl8188eu_interface_configure(_adapter *padapter)
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||||
|
|
||||||
if (pdvobjpriv->ishighspeed == _TRUE)
|
if (pdvobjpriv->ishighspeed == true)
|
||||||
{
|
{
|
||||||
pHalData->UsbBulkOutSize = USB_HIGH_SPEED_BULK_SIZE;//512 bytes
|
pHalData->UsbBulkOutSize = USB_HIGH_SPEED_BULK_SIZE;//512 bytes
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ static u32 rtl8188eu_InitPowerOn(_adapter *padapter)
|
||||||
u16 value16;
|
u16 value16;
|
||||||
// HW Power on sequence
|
// HW Power on sequence
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
if (_TRUE == pHalData->bMacPwrCtrlOn)
|
if (true == pHalData->bMacPwrCtrlOn)
|
||||||
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))
|
||||||
|
@ -181,7 +181,7 @@ static u32 rtl8188eu_InitPowerOn(_adapter *padapter)
|
||||||
// for SDIO - Set CR bit10 to enable 32k calibration. Suggested by SD1 Gimmy. Added by tynli. 2011.08.31.
|
// for SDIO - Set CR bit10 to enable 32k calibration. Suggested by SD1 Gimmy. Added by tynli. 2011.08.31.
|
||||||
|
|
||||||
rtw_write16(padapter, REG_CR, value16);
|
rtw_write16(padapter, REG_CR, value16);
|
||||||
pHalData->bMacPwrCtrlOn = _TRUE;
|
pHalData->bMacPwrCtrlOn = true;
|
||||||
|
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
|
|
||||||
|
@ -860,7 +860,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);
|
||||||
|
@ -989,7 +989,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;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
HalRxAggr8188EUsb(
|
HalRxAggr8188EUsb(
|
||||||
|
@ -1074,7 +1074,7 @@ _InitRFType(
|
||||||
|
|
||||||
pHalData->rf_chip = RF_6052;
|
pHalData->rf_chip = RF_6052;
|
||||||
|
|
||||||
if (_FALSE == is92CU){
|
if (false == is92CU){
|
||||||
pHalData->rf_type = RF_1T1R;
|
pHalData->rf_type = RF_1T1R;
|
||||||
DBG_88E("Set RF Chip ID to RF_6052 and RF type to 1T1R.\n");
|
DBG_88E("Set RF Chip ID to RF_6052 and RF type to 1T1R.\n");
|
||||||
return;
|
return;
|
||||||
|
@ -1199,7 +1199,7 @@ HwSuspendModeEnable_88eu(
|
||||||
// to disable HW suspend mode for IPS/radio_off.
|
// to disable HW suspend mode for IPS/radio_off.
|
||||||
//
|
//
|
||||||
//RT_TRACE(COMP_RF, DBG_LOUD, ("HwSuspendModeEnable92Cu = %d\n", Type));
|
//RT_TRACE(COMP_RF, DBG_LOUD, ("HwSuspendModeEnable92Cu = %d\n", Type));
|
||||||
if (Type == _FALSE)
|
if (Type == false)
|
||||||
{
|
{
|
||||||
reg |= BIT14;
|
reg |= BIT14;
|
||||||
//RT_TRACE(COMP_RF, DBG_LOUD, ("REG_GPIO_MUXCFG = %x\n", reg));
|
//RT_TRACE(COMP_RF, DBG_LOUD, ("REG_GPIO_MUXCFG = %x\n", reg));
|
||||||
|
@ -1373,14 +1373,14 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BEGIN);
|
||||||
_ps_open_RF(Adapter);
|
_ps_open_RF(Adapter);
|
||||||
|
|
||||||
if (pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized){
|
if (pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized){
|
||||||
// PHY_IQCalibrate(padapter, _TRUE);
|
// PHY_IQCalibrate(padapter, true);
|
||||||
PHY_IQCalibrate_8188E(Adapter,_TRUE);
|
PHY_IQCalibrate_8188E(Adapter,true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PHY_IQCalibrate(padapter, _FALSE);
|
// PHY_IQCalibrate(padapter, false);
|
||||||
PHY_IQCalibrate_8188E(Adapter,_FALSE);
|
PHY_IQCalibrate_8188E(Adapter,false);
|
||||||
pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = _TRUE;
|
pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// dm_CheckTXPowerTracking(padapter);
|
// dm_CheckTXPowerTracking(padapter);
|
||||||
|
@ -1403,7 +1403,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_PW_ON);
|
||||||
pHalData->CurrentChannel = 6;//default set to 6
|
pHalData->CurrentChannel = 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1437,27 +1437,27 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_DOWNLOAD_FW);
|
||||||
if (Adapter->registrypriv.mp_mode == 1)
|
if (Adapter->registrypriv.mp_mode == 1)
|
||||||
{
|
{
|
||||||
_InitRxSetting(Adapter);
|
_InitRxSetting(Adapter);
|
||||||
Adapter->bFWReady = _FALSE;
|
Adapter->bFWReady = false;
|
||||||
pHalData->fw_ractrl = _FALSE;
|
pHalData->fw_ractrl = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif //MP_DRIVER == 1
|
#endif //MP_DRIVER == 1
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
status = rtl8188e_FirmwareDownload(Adapter, _FALSE);
|
status = rtl8188e_FirmwareDownload(Adapter, false);
|
||||||
#else
|
#else
|
||||||
status = rtl8188e_FirmwareDownload(Adapter);
|
status = rtl8188e_FirmwareDownload(Adapter);
|
||||||
#endif //CONFIG_WOWLAN
|
#endif //CONFIG_WOWLAN
|
||||||
|
|
||||||
if (status != _SUCCESS) {
|
if (status != _SUCCESS) {
|
||||||
DBG_88E("%s: Download Firmware failed!!\n", __func__);
|
DBG_88E("%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 {
|
||||||
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("Initializepadapter8192CSdio(): Download Firmware Success!!\n"));
|
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("Initializepadapter8192CSdio(): Download Firmware Success!!\n"));
|
||||||
Adapter->bFWReady = _TRUE;
|
Adapter->bFWReady = true;
|
||||||
pHalData->fw_ractrl = _FALSE;
|
pHalData->fw_ractrl = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rtl8188e_InitializeFirmwareVars(Adapter);
|
rtl8188e_InitializeFirmwareVars(Adapter);
|
||||||
|
@ -1529,7 +1529,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC02);
|
||||||
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
|
||||||
|
@ -1685,12 +1685,12 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_IQK);
|
||||||
if (pwrctrlpriv->rf_pwrstate == rf_on)
|
if (pwrctrlpriv->rf_pwrstate == rf_on)
|
||||||
{
|
{
|
||||||
if (pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized){
|
if (pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized){
|
||||||
PHY_IQCalibrate_8188E(Adapter,_TRUE);
|
PHY_IQCalibrate_8188E(Adapter,true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PHY_IQCalibrate_8188E(Adapter,_FALSE);
|
PHY_IQCalibrate_8188E(Adapter,false);
|
||||||
pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = _TRUE;
|
pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_PW_TRACK);
|
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_PW_TRACK);
|
||||||
|
@ -1809,8 +1809,8 @@ CardDisableRTL8188EU(
|
||||||
val8 = rtw_read8(Adapter, REG_GPIO_IO_SEL+1);
|
val8 = rtw_read8(Adapter, REG_GPIO_IO_SEL+1);
|
||||||
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
|
||||||
pHalData->bMacPwrCtrlOn = _FALSE;
|
pHalData->bMacPwrCtrlOn = false;
|
||||||
Adapter->bFWReady = _FALSE;
|
Adapter->bFWReady = false;
|
||||||
}
|
}
|
||||||
static void rtl8192cu_hw_power_down(_adapter *padapter)
|
static void rtl8192cu_hw_power_down(_adapter *padapter)
|
||||||
{
|
{
|
||||||
|
@ -1844,7 +1844,7 @@ u32 rtl8188eu_hal_deinit(PADAPTER Adapter)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (Adapter->hw_init_completed == _TRUE){
|
if (Adapter->hw_init_completed == true){
|
||||||
CardDisableRTL8188EU(Adapter);
|
CardDisableRTL8188EU(Adapter);
|
||||||
|
|
||||||
if ((Adapter->pwrctrlpriv.bHWPwrPindetect ) && (Adapter->pwrctrlpriv.bHWPowerdown))
|
if ((Adapter->pwrctrlpriv.bHWPwrPindetect ) && (Adapter->pwrctrlpriv.bHWPowerdown))
|
||||||
|
@ -1884,7 +1884,7 @@ _func_enter_;
|
||||||
//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 ) {
|
||||||
RT_TRACE(_module_hci_hal_init_c_,_drv_err_,("usb_rx_init: usb_read_port error\n"));
|
RT_TRACE(_module_hci_hal_init_c_,_drv_err_,("usb_rx_init: usb_read_port error\n"));
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -1902,7 +1902,7 @@ _func_enter_;
|
||||||
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 ) {
|
||||||
RT_TRACE(_module_hci_hal_init_c_, _drv_err_,
|
RT_TRACE(_module_hci_hal_init_c_, _drv_err_,
|
||||||
("usb_rx_init: usb_read_interrupt error\n"));
|
("usb_rx_init: usb_read_interrupt error\n"));
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
|
@ -1960,7 +1960,7 @@ _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)
|
||||||
{
|
{
|
||||||
|
@ -1968,7 +1968,7 @@ _ReadLEDSetting(
|
||||||
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
|
||||||
|
@ -2119,7 +2119,7 @@ static u32 Hal_readPGDataFromConfigFile(
|
||||||
|
|
||||||
fp = filp_open("/system/etc/wifi/wifi_efuse.map", O_RDWR, 0644);
|
fp = filp_open("/system/etc/wifi/wifi_efuse.map", O_RDWR, 0644);
|
||||||
if (IS_ERR(fp)) {
|
if (IS_ERR(fp)) {
|
||||||
pEEPROM->bloadfile_fail_flag = _TRUE;
|
pEEPROM->bloadfile_fail_flag = true;
|
||||||
DBG_88E("Error, Efuse configure file doesn't exist.\n");
|
DBG_88E("Error, Efuse configure file doesn't exist.\n");
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
@ -2139,7 +2139,7 @@ static u32 Hal_readPGDataFromConfigFile(
|
||||||
|
|
||||||
filp_close(fp, NULL);
|
filp_close(fp, NULL);
|
||||||
|
|
||||||
pEEPROM->bloadfile_fail_flag = _FALSE;
|
pEEPROM->bloadfile_fail_flag = false;
|
||||||
|
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -2166,7 +2166,7 @@ Hal_ReadMACAddrFromFile_8188EU(
|
||||||
|
|
||||||
fp = filp_open("/data/wifimac.txt", O_RDWR, 0644);
|
fp = filp_open("/data/wifimac.txt", O_RDWR, 0644);
|
||||||
if (IS_ERR(fp)) {
|
if (IS_ERR(fp)) {
|
||||||
pEEPROM->bloadmac_fail_flag = _TRUE;
|
pEEPROM->bloadmac_fail_flag = true;
|
||||||
DBG_88E("Error, wifi mac address file doesn't exist.\n");
|
DBG_88E("Error, wifi mac address file doesn't exist.\n");
|
||||||
} else {
|
} else {
|
||||||
fs = get_fs();
|
fs = get_fs();
|
||||||
|
@ -2194,7 +2194,7 @@ Hal_ReadMACAddrFromFile_8188EU(
|
||||||
}
|
}
|
||||||
DBG_88E("\n");
|
DBG_88E("\n");
|
||||||
set_fs(fs);
|
set_fs(fs);
|
||||||
pEEPROM->bloadmac_fail_flag = _FALSE;
|
pEEPROM->bloadmac_fail_flag = false;
|
||||||
filp_close(fp, NULL);
|
filp_close(fp, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2258,13 +2258,13 @@ readAdapterInfo_8188EU(
|
||||||
#ifdef CONFIG_INTEL_PROXIM
|
#ifdef CONFIG_INTEL_PROXIM
|
||||||
/* for intel proximity */
|
/* for intel proximity */
|
||||||
if (pHalData->rf_type== RF_1T1R) {
|
if (pHalData->rf_type== RF_1T1R) {
|
||||||
Adapter->proximity.proxim_support = _TRUE;
|
Adapter->proximity.proxim_support = true;
|
||||||
} else if (pHalData->rf_type== RF_2T2R) {
|
} else if (pHalData->rf_type== RF_2T2R) {
|
||||||
if ((pHalData->EEPROMPID == 0x8186) &&
|
if ((pHalData->EEPROMPID == 0x8186) &&
|
||||||
(pHalData->EEPROMVID== 0x0bda))
|
(pHalData->EEPROMVID== 0x0bda))
|
||||||
Adapter->proximity.proxim_support = _TRUE;
|
Adapter->proximity.proxim_support = true;
|
||||||
} else {
|
} else {
|
||||||
Adapter->proximity.proxim_support = _FALSE;
|
Adapter->proximity.proxim_support = false;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_INTEL_PROXIM
|
#endif //CONFIG_INTEL_PROXIM
|
||||||
#endif
|
#endif
|
||||||
|
@ -2279,8 +2279,8 @@ static void _ReadPROMContent(
|
||||||
|
|
||||||
/* check system boot selection */
|
/* check system boot selection */
|
||||||
eeValue = rtw_read8(Adapter, REG_9346CR);
|
eeValue = rtw_read8(Adapter, REG_9346CR);
|
||||||
pEEPROM->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? _TRUE : _FALSE;
|
pEEPROM->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? true : false;
|
||||||
pEEPROM->bautoload_fail_flag = (eeValue & EEPROM_EN) ? _FALSE : _TRUE;
|
pEEPROM->bautoload_fail_flag = (eeValue & EEPROM_EN) ? false : true;
|
||||||
|
|
||||||
|
|
||||||
DBG_88E("Boot from %s, Autoload %s !\n", (pEEPROM->EepromOrEfuse ? "EEPROM" : "EFUSE"),
|
DBG_88E("Boot from %s, Autoload %s !\n", (pEEPROM->EepromOrEfuse ? "EEPROM" : "EFUSE"),
|
||||||
|
@ -2442,11 +2442,11 @@ 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
|
||||||
|
@ -2467,11 +2467,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
|
||||||
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
|
||||||
|
@ -2523,7 +2523,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 ( check_buddy_fwstate(Adapter, (WIFI_STATION_STATE|WIFI_ASOC_STATE)) ) {
|
if ( check_buddy_fwstate(Adapter, (WIFI_STATION_STATE|WIFI_ASOC_STATE)) ) {
|
||||||
if (reset_tsf(Adapter, IFACE_PORT1) == _FALSE)
|
if (reset_tsf(Adapter, IFACE_PORT1) == false)
|
||||||
DBG_88E("ERROR! %s()-%d: Reset port1 TSF fail\n",
|
DBG_88E("ERROR! %s()-%d: Reset port1 TSF fail\n",
|
||||||
__func__, __LINE__);
|
__func__, __LINE__);
|
||||||
}
|
}
|
||||||
|
@ -2552,11 +2552,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
|
||||||
|
@ -2576,11 +2576,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
|
||||||
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
|
||||||
|
@ -2633,7 +2633,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 ( check_buddy_fwstate(Adapter, (WIFI_STATION_STATE|WIFI_ASOC_STATE)) ) {
|
if ( check_buddy_fwstate(Adapter, (WIFI_STATION_STATE|WIFI_ASOC_STATE)) ) {
|
||||||
if (reset_tsf(Adapter, IFACE_PORT0) == _FALSE)
|
if (reset_tsf(Adapter, IFACE_PORT0) == false)
|
||||||
DBG_88E("ERROR! %s()-%d: Reset port0 TSF fail\n",
|
DBG_88E("ERROR! %s()-%d: Reset port0 TSF fail\n",
|
||||||
__func__, __LINE__);
|
__func__, __LINE__);
|
||||||
}
|
}
|
||||||
|
@ -2760,7 +2760,7 @@ static void hw_var_set_correct_tsf(PADAPTER Adapter, u8 variable, u8* val)
|
||||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(3));
|
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(3));
|
||||||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||||
// Update buddy port's TSF(TBTT) if it is SoftAP for beacon TX issue!
|
// Update buddy port's TSF(TBTT) if it is SoftAP for beacon TX issue!
|
||||||
if (reset_tsf(Adapter, IFACE_PORT0) == _FALSE)
|
if (reset_tsf(Adapter, IFACE_PORT0) == false)
|
||||||
DBG_88E("ERROR! %s()-%d: Reset port0 TSF fail\n",
|
DBG_88E("ERROR! %s()-%d: Reset port0 TSF fail\n",
|
||||||
__func__, __LINE__);
|
__func__, __LINE__);
|
||||||
|
|
||||||
|
@ -2794,7 +2794,7 @@ static void hw_var_set_correct_tsf(PADAPTER Adapter, u8 variable, u8* val)
|
||||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)|BIT(3));
|
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)|BIT(3));
|
||||||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||||
// Update buddy port's TSF if it is SoftAP for beacon TX issue!
|
// Update buddy port's TSF if it is SoftAP for beacon TX issue!
|
||||||
if (reset_tsf(Adapter, IFACE_PORT1) == _FALSE)
|
if (reset_tsf(Adapter, IFACE_PORT1) == false)
|
||||||
DBG_88E("ERROR! %s()-%d: Reset port1 TSF fail\n",
|
DBG_88E("ERROR! %s()-%d: Reset port1 TSF fail\n",
|
||||||
__func__, __LINE__);
|
__func__, __LINE__);
|
||||||
#endif // CONFIG_TSF_RESET_OFFLOAD
|
#endif // CONFIG_TSF_RESET_OFFLOAD
|
||||||
|
@ -2924,7 +2924,7 @@ 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);
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -3152,7 +3152,7 @@ _func_enter_;
|
||||||
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 ((is_client_associated_to_ap(Adapter) == _TRUE) ||
|
if ((is_client_associated_to_ap(Adapter) == true) ||
|
||||||
((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) )
|
((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) )
|
||||||
{
|
{
|
||||||
//enable to rx data frame
|
//enable to rx data frame
|
||||||
|
@ -3215,7 +3215,7 @@ _func_enter_;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -3528,7 +3528,7 @@ _func_enter_;
|
||||||
// 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) && (!IS_92C_SERIAL(pHalData->VersionID)))
|
if ( (psmode != PS_MODE_ACTIVE) && (!IS_92C_SERIAL(pHalData->VersionID)))
|
||||||
{
|
{
|
||||||
ODM_RF_Saving(podmpriv, _TRUE);
|
ODM_RF_Saving(podmpriv, true);
|
||||||
}
|
}
|
||||||
rtl8188e_set_FwPwrMode_cmd(Adapter, psmode);
|
rtl8188e_set_FwPwrMode_cmd(Adapter, psmode);
|
||||||
}
|
}
|
||||||
|
@ -3649,7 +3649,7 @@ _func_enter_;
|
||||||
//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));
|
||||||
|
@ -3718,10 +3718,10 @@ _func_enter_;
|
||||||
case WOWLAN_ENABLE:
|
case WOWLAN_ENABLE:
|
||||||
DBG_88E_LEVEL(_drv_always_, "WOWLAN_ENABLE\n");
|
DBG_88E_LEVEL(_drv_always_, "WOWLAN_ENABLE\n");
|
||||||
|
|
||||||
SetFwRelatedForWoWLAN8188ES(Adapter, _TRUE);
|
SetFwRelatedForWoWLAN8188ES(Adapter, true);
|
||||||
|
|
||||||
//Set Pattern
|
//Set Pattern
|
||||||
//if (Adapter->pwrctrlpriv.wowlan_pattern==_TRUE)
|
//if (Adapter->pwrctrlpriv.wowlan_pattern==true)
|
||||||
// rtw_wowlan_reload_pattern(Adapter);
|
// rtw_wowlan_reload_pattern(Adapter);
|
||||||
|
|
||||||
//RX DMA stop
|
//RX DMA stop
|
||||||
|
@ -3780,7 +3780,7 @@ _func_enter_;
|
||||||
if (mstatus & BIT1)
|
if (mstatus & BIT1)
|
||||||
printk("System did not release RX_DMA\n");
|
printk("System did not release RX_DMA\n");
|
||||||
else
|
else
|
||||||
SetFwRelatedForWoWLAN8188ES(Adapter, _FALSE);
|
SetFwRelatedForWoWLAN8188ES(Adapter, false);
|
||||||
|
|
||||||
rtw_msleep_os(2);
|
rtw_msleep_os(2);
|
||||||
if (!(Adapter->pwrctrlpriv.wowlan_wake_reason & FWDecisionDisconnect))
|
if (!(Adapter->pwrctrlpriv.wowlan_wake_reason & FWDecisionDisconnect))
|
||||||
|
@ -3837,7 +3837,7 @@ _func_enter_;
|
||||||
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_DM_FLAG:
|
case HW_VAR_DM_FLAG:
|
||||||
val[0] = podmpriv->SupportAbility;
|
val[0] = podmpriv->SupportAbility;
|
||||||
|
@ -3852,7 +3852,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
// 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
|
||||||
{
|
{
|
||||||
|
@ -3860,9 +3860,9 @@ _func_enter_;
|
||||||
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;
|
||||||
|
@ -3878,7 +3878,7 @@ _func_enter_;
|
||||||
*val = pHalData->bMacPwrCtrlOn;
|
*val = pHalData->bMacPwrCtrlOn;
|
||||||
break;
|
break;
|
||||||
case HW_VAR_CHK_HI_QUEUE_EMPTY:
|
case HW_VAR_CHK_HI_QUEUE_EMPTY:
|
||||||
*val = ((rtw_read32(Adapter, REG_HGQ_INFORMATION)&0x0000ff00)==0) ? _TRUE:_FALSE;
|
*val = ((rtw_read32(Adapter, REG_HGQ_INFORMATION)&0x0000ff00)==0) ? true:false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -3916,7 +3916,7 @@ GetHalDefVar8188EUsb(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else //V4 branch
|
#else //V4 branch
|
||||||
if (check_fwstate(&Adapter->mlmepriv, WIFI_STATION_STATE) == _TRUE){
|
if (check_fwstate(&Adapter->mlmepriv, WIFI_STATION_STATE) == true){
|
||||||
*((int *)pValue) = pHalData->dmpriv.UndecoratedSmoothedPWDB;
|
*((int *)pValue) = pHalData->dmpriv.UndecoratedSmoothedPWDB;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -3926,7 +3926,7 @@ GetHalDefVar8188EUsb(
|
||||||
break;
|
break;
|
||||||
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_CURRENT_ANTENNA:
|
case HAL_DEF_CURRENT_ANTENNA:
|
||||||
|
@ -3981,7 +3981,7 @@ GetHalDefVar8188EUsb(
|
||||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||||
{
|
{
|
||||||
u8 entry_id = *((u8*)pValue);
|
u8 entry_id = *((u8*)pValue);
|
||||||
if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)== _TRUE)
|
if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)== true)
|
||||||
{
|
{
|
||||||
DBG_88E("============ RA status check ===================\n");
|
DBG_88E("============ RA status check ===================\n");
|
||||||
DBG_88E("Mac_id:%d ,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d\n",
|
DBG_88E("Mac_id:%d ,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d\n",
|
||||||
|
@ -4160,7 +4160,7 @@ void UpdateHalRAMask8188EUsb(PADAPTER padapter, u32 mac_id, u8 rssi_level)
|
||||||
u8 init_rate=0;
|
u8 init_rate=0;
|
||||||
u8 networkType, raid;
|
u8 networkType, raid;
|
||||||
u32 mask,rate_bitmap;
|
u32 mask,rate_bitmap;
|
||||||
u8 shortGIrate = _FALSE;
|
u8 shortGIrate = false;
|
||||||
int supportRateNum = 0;
|
int supportRateNum = 0;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
|
@ -4201,7 +4201,7 @@ void UpdateHalRAMask8188EUsb(PADAPTER padapter, u32 mac_id, u8 rssi_level)
|
||||||
|
|
||||||
if (support_short_GI(padapter, &(pmlmeinfo->HT_caps)))
|
if (support_short_GI(padapter, &(pmlmeinfo->HT_caps)))
|
||||||
{
|
{
|
||||||
shortGIrate = _TRUE;
|
shortGIrate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -4244,7 +4244,7 @@ void UpdateHalRAMask8188EUsb(PADAPTER padapter, u32 mac_id, u8 rssi_level)
|
||||||
|
|
||||||
init_rate = get_highest_rate_idx(mask)&0x3f;
|
init_rate = get_highest_rate_idx(mask)&0x3f;
|
||||||
|
|
||||||
if (pHalData->fw_ractrl == _TRUE)
|
if (pHalData->fw_ractrl == true)
|
||||||
{
|
{
|
||||||
u8 arg = 0;
|
u8 arg = 0;
|
||||||
|
|
||||||
|
@ -4253,13 +4253,13 @@ void UpdateHalRAMask8188EUsb(PADAPTER padapter, u32 mac_id, u8 rssi_level)
|
||||||
|
|
||||||
arg |= BIT(7);
|
arg |= BIT(7);
|
||||||
|
|
||||||
if (shortGIrate==_TRUE)
|
if (shortGIrate==true)
|
||||||
arg |= BIT(5);
|
arg |= BIT(5);
|
||||||
mask |= ((raid<<28)&0xf0000000);
|
mask |= ((raid<<28)&0xf0000000);
|
||||||
DBG_88E("update raid entry, mask=0x%x, arg=0x%x\n", mask, arg);
|
DBG_88E("update raid entry, mask=0x%x, arg=0x%x\n", mask, arg);
|
||||||
psta->ra_mask=mask;
|
psta->ra_mask=mask;
|
||||||
#ifdef CONFIG_INTEL_PROXIM
|
#ifdef CONFIG_INTEL_PROXIM
|
||||||
if (padapter->proximity.proxim_on ==_TRUE){
|
if (padapter->proximity.proxim_on ==true){
|
||||||
arg &= ~BIT(6);
|
arg &= ~BIT(6);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -4344,7 +4344,7 @@ 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);
|
||||||
|
|
||||||
|
@ -4371,14 +4371,14 @@ static void rtl8188eu_init_default_value(_adapter * 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->odmpriv.RFCalibrateInfo.bIQKInitialized = _FALSE;
|
pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = false;
|
||||||
pHalData->odmpriv.RFCalibrateInfo.TM_Trigger = 0;//for IQK
|
pHalData->odmpriv.RFCalibrateInfo.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->pwrGroupCnt = 0;
|
pHalData->pwrGroupCnt = 0;
|
||||||
|
@ -4390,7 +4390,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)
|
||||||
|
|
|
@ -137,7 +137,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
if (status == (-ESHUTDOWN) || status == -ENODEV )
|
if (status == (-ESHUTDOWN) || status == -ENODEV )
|
||||||
{
|
{
|
||||||
padapter->bSurpriseRemoved = _TRUE;
|
padapter->bSurpriseRemoved = true;
|
||||||
} else {
|
} else {
|
||||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||||
{
|
{
|
||||||
|
@ -157,8 +157,8 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtw_inc_and_chk_continual_urb_error(pdvobjpriv) == _TRUE ){
|
if (rtw_inc_and_chk_continual_urb_error(pdvobjpriv) == true ){
|
||||||
padapter->bSurpriseRemoved = _TRUE;
|
padapter->bSurpriseRemoved = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,12 +416,12 @@ void interrupt_handler_8188eu(_adapter *padapter,u16 pkt_len,u8 *pbuf)
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->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(padapter);
|
set_tx_beacon_cmd(padapter);
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (check_buddy_fwstate(padapter, WIFI_AP_STATE)) {
|
if (check_buddy_fwstate(padapter, WIFI_AP_STATE)) {
|
||||||
if (padapter->pbuddy_adapter->mlmepriv.update_bcn == _TRUE)
|
if (padapter->pbuddy_adapter->mlmepriv.update_bcn == true)
|
||||||
set_tx_beacon_cmd(padapter->pbuddy_adapter);
|
set_tx_beacon_cmd(padapter->pbuddy_adapter);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -491,10 +491,10 @@ static void usb_read_interrupt_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
case -EPIPE:
|
case -EPIPE:
|
||||||
case -ENODEV:
|
case -ENODEV:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
//padapter->bSurpriseRemoved=_TRUE;
|
//padapter->bSurpriseRemoved=true;
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bSurpriseRemoved=TRUE\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bSurpriseRemoved=TRUE\n"));
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
padapter->bDriverStopped=_TRUE;
|
padapter->bDriverStopped=true;
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped=TRUE\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped=TRUE\n"));
|
||||||
break;
|
break;
|
||||||
case -EPROTO:
|
case -EPROTO:
|
||||||
|
@ -561,7 +561,7 @@ static s32 pre_recv_entry(union recv_frame *precvframe, struct recv_stat *prxsta
|
||||||
|
|
||||||
paddr1 = GetAddr1Ptr(precvframe->u.hdr.rx_data);
|
paddr1 = GetAddr1Ptr(precvframe->u.hdr.rx_data);
|
||||||
|
|
||||||
if (IS_MCAST(paddr1) == _FALSE)//unicast packets
|
if (IS_MCAST(paddr1) == false)//unicast packets
|
||||||
{
|
{
|
||||||
//primary_myid = myid(&primary_padapter->eeprompriv);
|
//primary_myid = myid(&primary_padapter->eeprompriv);
|
||||||
secondary_myid = myid(&secondary_padapter->eeprompriv);
|
secondary_myid = myid(&secondary_padapter->eeprompriv);
|
||||||
|
@ -577,9 +577,9 @@ static s32 pre_recv_entry(union recv_frame *precvframe, struct recv_stat *prxsta
|
||||||
}
|
}
|
||||||
else // Handle BC/MC Packets
|
else // Handle BC/MC Packets
|
||||||
{
|
{
|
||||||
u8 clone = _TRUE;
|
u8 clone = true;
|
||||||
|
|
||||||
if (_TRUE == clone)
|
if (true == clone)
|
||||||
{
|
{
|
||||||
//clone/copy to if2
|
//clone/copy to if2
|
||||||
u8 shift_sz = 0;
|
u8 shift_sz = 0;
|
||||||
|
@ -909,7 +909,7 @@ void rtl8188eu_recv_tasklet(void *priv)
|
||||||
|
|
||||||
while (NULL != (precvbuf = rtw_dequeue_recvbuf(&precvpriv->recv_buf_pending_queue)))
|
while (NULL != (precvbuf = rtw_dequeue_recvbuf(&precvpriv->recv_buf_pending_queue)))
|
||||||
{
|
{
|
||||||
if ((padapter->bDriverStopped == _TRUE)||(padapter->bSurpriseRemoved== _TRUE))
|
if ((padapter->bDriverStopped == true)||(padapter->bSurpriseRemoved== true))
|
||||||
{
|
{
|
||||||
DBG_88E("recv_tasklet => bDriverStopped or bSurpriseRemoved\n");
|
DBG_88E("recv_tasklet => bDriverStopped or bSurpriseRemoved\n");
|
||||||
|
|
||||||
|
@ -968,8 +968,8 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
|
|
||||||
DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status);
|
DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status);
|
||||||
|
|
||||||
if (rtw_inc_and_chk_continual_urb_error(adapter_to_dvobj(padapter)) == _TRUE ){
|
if (rtw_inc_and_chk_continual_urb_error(adapter_to_dvobj(padapter)) == true ){
|
||||||
padapter->bSurpriseRemoved = _TRUE;
|
padapter->bSurpriseRemoved = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (purb->status) {
|
switch (purb->status) {
|
||||||
|
@ -977,10 +977,10 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
case -EPIPE:
|
case -EPIPE:
|
||||||
case -ENODEV:
|
case -ENODEV:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
//padapter->bSurpriseRemoved=_TRUE;
|
//padapter->bSurpriseRemoved=true;
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bSurpriseRemoved=TRUE\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bSurpriseRemoved=TRUE\n"));
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
padapter->bDriverStopped=_TRUE;
|
padapter->bDriverStopped=true;
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped=TRUE\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped=TRUE\n"));
|
||||||
break;
|
break;
|
||||||
case -EPROTO:
|
case -EPROTO:
|
||||||
|
@ -1308,7 +1308,7 @@ void rtl8188eu_recv_tasklet(void *priv)
|
||||||
|
|
||||||
while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue)))
|
while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue)))
|
||||||
{
|
{
|
||||||
if ((padapter->bDriverStopped == _TRUE)||(padapter->bSurpriseRemoved== _TRUE))
|
if ((padapter->bDriverStopped == true)||(padapter->bSurpriseRemoved== true))
|
||||||
{
|
{
|
||||||
DBG_88E("recv_tasklet => bDriverStopped or bSurpriseRemoved\n");
|
DBG_88E("recv_tasklet => bDriverStopped or bSurpriseRemoved\n");
|
||||||
dev_kfree_skb_any(pskb);
|
dev_kfree_skb_any(pskb);
|
||||||
|
@ -1345,7 +1345,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete!!!\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete!!!\n"));
|
||||||
|
|
||||||
//_enter_critical(&precvpriv->lock, &irqL);
|
//_enter_critical(&precvpriv->lock, &irqL);
|
||||||
//precvbuf->irp_pending=_FALSE;
|
//precvbuf->irp_pending=false;
|
||||||
//precvpriv->rx_pending_cnt --;
|
//precvpriv->rx_pending_cnt --;
|
||||||
//_exit_critical(&precvpriv->lock, &irqL);
|
//_exit_critical(&precvpriv->lock, &irqL);
|
||||||
|
|
||||||
|
@ -1362,7 +1362,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped(%d) OR bSurpriseRemoved(%d)\n", padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped(%d) OR bSurpriseRemoved(%d)\n", padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
||||||
|
|
||||||
#ifdef CONFIG_PREALLOC_RECV_SKB
|
#ifdef CONFIG_PREALLOC_RECV_SKB
|
||||||
precvbuf->reuse = _TRUE;
|
precvbuf->reuse = true;
|
||||||
#else
|
#else
|
||||||
if (precvbuf->pskb){
|
if (precvbuf->pskb){
|
||||||
DBG_88E("==> free skb(%p)\n",precvbuf->pskb);
|
DBG_88E("==> free skb(%p)\n",precvbuf->pskb);
|
||||||
|
@ -1379,7 +1379,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
if ((purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE))
|
if ((purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE))
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete: (purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete: (purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)\n"));
|
||||||
precvbuf->reuse = _TRUE;
|
precvbuf->reuse = true;
|
||||||
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
||||||
DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__);
|
DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__);
|
||||||
}
|
}
|
||||||
|
@ -1395,7 +1395,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||||
|
|
||||||
precvbuf->pskb = NULL;
|
precvbuf->pskb = NULL;
|
||||||
precvbuf->reuse = _FALSE;
|
precvbuf->reuse = false;
|
||||||
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1405,8 +1405,8 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
|
|
||||||
DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status);
|
DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status);
|
||||||
|
|
||||||
if (rtw_inc_and_chk_continual_urb_error(adapter_to_dvobj(padapter)) == _TRUE ){
|
if (rtw_inc_and_chk_continual_urb_error(adapter_to_dvobj(padapter)) == true ){
|
||||||
padapter->bSurpriseRemoved = _TRUE;
|
padapter->bSurpriseRemoved = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (purb->status) {
|
switch (purb->status) {
|
||||||
|
@ -1414,10 +1414,10 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
case -EPIPE:
|
case -EPIPE:
|
||||||
case -ENODEV:
|
case -ENODEV:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
//padapter->bSurpriseRemoved=_TRUE;
|
//padapter->bSurpriseRemoved=true;
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bSurpriseRemoved=TRUE\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bSurpriseRemoved=TRUE\n"));
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
padapter->bDriverStopped=_TRUE;
|
padapter->bDriverStopped=true;
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped=TRUE\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped=TRUE\n"));
|
||||||
break;
|
break;
|
||||||
case -EPROTO:
|
case -EPROTO:
|
||||||
|
@ -1428,7 +1428,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
pHalData->srestpriv.Wifi_Error_Status = USB_READ_PORT_FAIL;
|
pHalData->srestpriv.Wifi_Error_Status = USB_READ_PORT_FAIL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
precvbuf->reuse = _TRUE;
|
precvbuf->reuse = true;
|
||||||
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
||||||
break;
|
break;
|
||||||
case -EINPROGRESS:
|
case -EINPROGRESS:
|
||||||
|
@ -1471,11 +1471,11 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PREALLOC_RECV_SKB
|
#ifdef CONFIG_PREALLOC_RECV_SKB
|
||||||
if ((precvbuf->reuse == _FALSE) || (precvbuf->pskb == NULL))
|
if ((precvbuf->reuse == false) || (precvbuf->pskb == NULL))
|
||||||
{
|
{
|
||||||
if (NULL != (precvbuf->pskb = skb_dequeue(&precvpriv->free_recv_skb_queue)))
|
if (NULL != (precvbuf->pskb = skb_dequeue(&precvpriv->free_recv_skb_queue)))
|
||||||
{
|
{
|
||||||
precvbuf->reuse = _TRUE;
|
precvbuf->reuse = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1486,7 +1486,7 @@ _func_enter_;
|
||||||
rtl8188eu_init_recvbuf(adapter, precvbuf);
|
rtl8188eu_init_recvbuf(adapter, precvbuf);
|
||||||
|
|
||||||
//re-assign for linux based on skb
|
//re-assign for linux based on skb
|
||||||
if ((precvbuf->reuse == _FALSE) || (precvbuf->pskb == NULL))
|
if ((precvbuf->reuse == false) || (precvbuf->pskb == NULL))
|
||||||
{
|
{
|
||||||
//precvbuf->pskb = alloc_skb(MAX_RECVBUF_SZ, GFP_ATOMIC);//don't use this after v2.6.25
|
//precvbuf->pskb = alloc_skb(MAX_RECVBUF_SZ, GFP_ATOMIC);//don't use this after v2.6.25
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) // http://www.mail-archive.com/netdev@vger.kernel.org/msg17214.html
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) // http://www.mail-archive.com/netdev@vger.kernel.org/msg17214.html
|
||||||
|
@ -1519,12 +1519,12 @@ _func_enter_;
|
||||||
precvbuf->pend = skb_end_pointer(precvbuf->pskb);
|
precvbuf->pend = skb_end_pointer(precvbuf->pskb);
|
||||||
precvbuf->pbuf = precvbuf->pskb->data;
|
precvbuf->pbuf = precvbuf->pskb->data;
|
||||||
|
|
||||||
precvbuf->reuse = _FALSE;
|
precvbuf->reuse = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//_enter_critical(&precvpriv->lock, &irqL);
|
//_enter_critical(&precvpriv->lock, &irqL);
|
||||||
//precvpriv->rx_pending_cnt++;
|
//precvpriv->rx_pending_cnt++;
|
||||||
//precvbuf->irp_pending = _TRUE;
|
//precvbuf->irp_pending = true;
|
||||||
//_exit_critical(&precvpriv->lock, &irqL);
|
//_exit_critical(&precvpriv->lock, &irqL);
|
||||||
|
|
||||||
precvpriv->rx_pending_cnt++;
|
precvpriv->rx_pending_cnt++;
|
||||||
|
@ -1562,16 +1562,16 @@ _func_exit_;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
if (check_fwstate(&padapter->mlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
if (check_fwstate(&padapter->mlmepriv, _FW_UNDER_SURVEY) == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if ((padapter->bDriverStopped == _TRUE)||(padapter->bSurpriseRemoved== _TRUE) || (padapter->bWritePortCancel == _TRUE))
|
if ((padapter->bDriverStopped == true)||(padapter->bSurpriseRemoved== true) || (padapter->bWritePortCancel == true))
|
||||||
{
|
{
|
||||||
DBG_88E("xmit_tasklet => bDriverStopped or bSurpriseRemoved or bWritePortCancel\n");
|
DBG_88E("xmit_tasklet => bDriverStopped or bSurpriseRemoved or bWritePortCancel\n");
|
||||||
break;
|
break;
|
||||||
|
@ -1579,7 +1579,7 @@ void rtl8188eu_xmit_tasklet(void *priv)
|
||||||
|
|
||||||
ret = rtl8188eu_xmitframe_complete(padapter, pxmitpriv, NULL);
|
ret = rtl8188eu_xmitframe_complete(padapter, pxmitpriv, NULL);
|
||||||
|
|
||||||
if (ret==_FALSE)
|
if (ret==false)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
#ifndef __HAL_VERSION_DEF_H__
|
#ifndef __HAL_VERSION_DEF_H__
|
||||||
#define __HAL_VERSION_DEF_H__
|
#define __HAL_VERSION_DEF_H__
|
||||||
|
|
||||||
#define TRUE _TRUE
|
#define TRUE true
|
||||||
#define FALSE _FALSE
|
#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
|
||||||
|
|
|
@ -26,59 +26,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
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
typedef signed char s8;
|
|
||||||
typedef unsigned char u8;
|
|
||||||
|
|
||||||
typedef signed short s16;
|
|
||||||
typedef unsigned short u16;
|
|
||||||
|
|
||||||
typedef signed long s32;
|
|
||||||
typedef unsigned long u32;
|
|
||||||
|
|
||||||
typedef unsigned int uint;
|
|
||||||
typedef signed int sint;
|
|
||||||
|
|
||||||
|
|
||||||
typedef signed long long s64;
|
|
||||||
typedef unsigned long long u64;
|
|
||||||
|
|
||||||
#ifdef NDIS50_MINIPORT
|
|
||||||
|
|
||||||
#define NDIS_MAJOR_VERSION 5
|
|
||||||
#define NDIS_MINOR_VERSION 0
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NDIS51_MINIPORT
|
|
||||||
|
|
||||||
#define NDIS_MAJOR_VERSION 5
|
|
||||||
#define NDIS_MINOR_VERSION 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef NDIS_PROC proc_t;
|
|
||||||
|
|
||||||
typedef LONG atomic_t;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#define IN
|
#define IN
|
||||||
#define OUT
|
#define OUT
|
||||||
|
@ -98,48 +45,6 @@
|
||||||
typedef __kernel_ssize_t SSIZE_T;
|
typedef __kernel_ssize_t SSIZE_T;
|
||||||
#define FIELD_OFFSET(s,field) ((SSIZE_T)&((s*)(0))->field)
|
#define FIELD_OFFSET(s,field) ((SSIZE_T)&((s*)(0))->field)
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_FREEBSD
|
|
||||||
|
|
||||||
typedef signed char s8;
|
|
||||||
typedef unsigned char u8;
|
|
||||||
|
|
||||||
typedef signed short s16;
|
|
||||||
typedef unsigned short u16;
|
|
||||||
|
|
||||||
typedef signed int s32;
|
|
||||||
typedef unsigned int u32;
|
|
||||||
|
|
||||||
typedef unsigned int uint;
|
|
||||||
typedef signed int sint;
|
|
||||||
typedef long atomic_t;
|
|
||||||
|
|
||||||
typedef signed long long s64;
|
|
||||||
typedef unsigned long long u64;
|
|
||||||
#define IN
|
|
||||||
#define OUT
|
|
||||||
#define NDIS_OID uint
|
|
||||||
#define NDIS_STATUS uint
|
|
||||||
|
|
||||||
typedef u32 dma_addr_t;
|
|
||||||
#define UCHAR u8
|
|
||||||
#define USHORT u16
|
|
||||||
#define UINT u32
|
|
||||||
#define ULONG u32
|
|
||||||
|
|
||||||
typedef void (*proc_t)(void*);
|
|
||||||
|
|
||||||
typedef unsigned int __kernel_size_t;
|
|
||||||
typedef int __kernel_ssize_t;
|
|
||||||
|
|
||||||
typedef __kernel_size_t SIZE_T;
|
|
||||||
typedef __kernel_ssize_t SSIZE_T;
|
|
||||||
#define FIELD_OFFSET(s,field) ((SSIZE_T)&((s*)(0))->field)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T))
|
#define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T))
|
||||||
#define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1)
|
#define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1)
|
||||||
|
|
||||||
|
|
|
@ -198,19 +198,19 @@ enum NETWORK_TYPE
|
||||||
#define SUPPORTED_24G_NETTYPE_MSK (WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N)
|
#define SUPPORTED_24G_NETTYPE_MSK (WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N)
|
||||||
#define SUPPORTED_5G_NETTYPE_MSK (WIRELESS_11A | WIRELESS_11_5N)
|
#define SUPPORTED_5G_NETTYPE_MSK (WIRELESS_11A | WIRELESS_11_5N)
|
||||||
|
|
||||||
#define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? _TRUE : _FALSE)
|
#define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)
|
||||||
#define IsSupported5G(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? _TRUE : _FALSE)
|
#define IsSupported5G(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 IsSupportedRxMCS(NetType) IsEnableHWOFDM(NetType)
|
#define IsSupportedRxMCS(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 IsSupportedTxMCS(NetType) ((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? _TRUE : _FALSE)
|
#define IsSupportedTxMCS(NetType) ((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? true : false)
|
||||||
|
|
||||||
|
|
||||||
typedef struct ieee_param {
|
typedef struct ieee_param {
|
||||||
|
|
|
@ -1415,8 +1415,8 @@ typedef enum tag_DIG_Connect_Definition
|
||||||
#define DM_SCAN_RSSI_TH 0x14 //scan return issue for LC
|
#define DM_SCAN_RSSI_TH 0x14 //scan return issue for LC
|
||||||
|
|
||||||
|
|
||||||
#define DM_FALSEALARM_THRESH_LOW 400
|
#define DM_FALSE_ALARM_THRESH_LOW 400
|
||||||
#define DM_FALSEALARM_THRESH_HIGH 1000
|
#define DM_FALSE_ALARM_THRESH_HIGH 1000
|
||||||
|
|
||||||
#define DM_DIG_MAX_NIC 0x3e
|
#define DM_DIG_MAX_NIC 0x3e
|
||||||
#define DM_DIG_MIN_NIC 0x1e //0x22//0x1c
|
#define DM_DIG_MIN_NIC 0x1e //0x22//0x1c
|
||||||
|
|
|
@ -136,9 +136,6 @@ typedef enum _RT_SPINLOCK_TYPE{
|
||||||
|
|
||||||
#define DEV_BUS_TYPE RT_PCI_INTERFACE
|
#define DEV_BUS_TYPE RT_PCI_INTERFACE
|
||||||
|
|
||||||
#define _TRUE 1
|
|
||||||
#define _FALSE 0
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_ADSL)
|
#elif (DM_ODM_SUPPORT_TYPE == ODM_ADSL)
|
||||||
|
|
||||||
// To let ADSL/AP project compile ok; it should be removed after all conflict are solved. Added by Annie, 2011-10-07.
|
// To let ADSL/AP project compile ok; it should be removed after all conflict are solved. Added by Annie, 2011-10-07.
|
||||||
|
@ -163,9 +160,6 @@ typedef enum _RT_SPINLOCK_TYPE{
|
||||||
|
|
||||||
#define DEV_BUS_TYPE RT_PCI_INTERFACE
|
#define DEV_BUS_TYPE RT_PCI_INTERFACE
|
||||||
|
|
||||||
#define _TRUE 1
|
|
||||||
#define _FALSE 0
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||||
#include <basic_types.h>
|
#include <basic_types.h>
|
||||||
|
|
||||||
|
@ -208,12 +202,6 @@ typedef enum _RT_SPINLOCK_TYPE{
|
||||||
#define STA_INFO_T struct sta_info
|
#define STA_INFO_T struct sta_info
|
||||||
#define PSTA_INFO_T struct sta_info *
|
#define PSTA_INFO_T struct sta_info *
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define TRUE _TRUE
|
|
||||||
#define FALSE _FALSE
|
|
||||||
|
|
||||||
|
|
||||||
#define SET_TX_DESC_ANTSEL_A_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 24, 1, __Value)
|
#define SET_TX_DESC_ANTSEL_A_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 24, 1, __Value)
|
||||||
#define SET_TX_DESC_ANTSEL_B_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 25, 1, __Value)
|
#define SET_TX_DESC_ANTSEL_B_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 25, 1, __Value)
|
||||||
#define SET_TX_DESC_ANTSEL_C_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+28, 29, 1, __Value)
|
#define SET_TX_DESC_ANTSEL_C_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+28, 29, 1, __Value)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -639,7 +639,7 @@ typedef struct hal_data_8188e HAL_DATA_TYPE, *PHAL_DATA_TYPE;
|
||||||
#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) )
|
||||||
|
|
||||||
|
|
|
@ -670,8 +670,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 BIT16
|
#define CAM_WRITE BIT16
|
||||||
#define CAM_READ 0x00000000
|
#define CAM_READ 0x00000000
|
||||||
|
|
|
@ -627,7 +627,7 @@ typedef struct hal_data_8192ce HAL_DATA_TYPE, *PHAL_DATA_TYPE;
|
||||||
#define RT_DISABLE_FUNC(__pAdapter, __FuncBits) ((__pAdapter)->DisabledFunctions |= ((RT_DF_TYPE)(__FuncBits)))
|
#define RT_DISABLE_FUNC(__pAdapter, __FuncBits) ((__pAdapter)->DisabledFunctions |= ((RT_DF_TYPE)(__FuncBits)))
|
||||||
#define RT_ENABLE_FUNC(__pAdapter, __FuncBits) ((__pAdapter)->DisabledFunctions &= (~((RT_DF_TYPE)(__FuncBits))))
|
#define RT_ENABLE_FUNC(__pAdapter, __FuncBits) ((__pAdapter)->DisabledFunctions &= (~((RT_DF_TYPE)(__FuncBits))))
|
||||||
#define RT_IS_FUNC_DISABLED(__pAdapter, __FuncBits) ( (__pAdapter)->DisabledFunctions & (__FuncBits) )
|
#define RT_IS_FUNC_DISABLED(__pAdapter, __FuncBits) ( (__pAdapter)->DisabledFunctions & (__FuncBits) )
|
||||||
#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)
|
||||||
|
|
||||||
void InterruptRecognized8192CE(PADAPTER Adapter, PRT_ISR_CONTENT pIsrContent);
|
void InterruptRecognized8192CE(PADAPTER Adapter, PRT_ISR_CONTENT pIsrContent);
|
||||||
void UpdateInterruptMask8192CE(PADAPTER Adapter, u32 AddMSR, u32 AddMSR1, u32 RemoveMSR, u32 RemoveMSR1);
|
void UpdateInterruptMask8192CE(PADAPTER Adapter, u32 AddMSR, u32 AddMSR1, u32 RemoveMSR, u32 RemoveMSR1);
|
||||||
|
|
|
@ -556,8 +556,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 BIT16
|
#define CAM_WRITE BIT16
|
||||||
#define CAM_READ 0x00000000
|
#define CAM_READ 0x00000000
|
||||||
|
|
|
@ -574,8 +574,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 BIT16
|
#define CAM_WRITE BIT16
|
||||||
#define CAM_READ 0x00000000
|
#define CAM_READ 0x00000000
|
||||||
|
|
|
@ -56,7 +56,7 @@ void BT_HaltProcess(PADAPTER padapter);
|
||||||
void BT_LpsLeave(PADAPTER padapter);
|
void BT_LpsLeave(PADAPTER padapter);
|
||||||
|
|
||||||
|
|
||||||
#define BT_HsConnectionEstablished(Adapter) _FALSE
|
#define BT_HsConnectionEstablished(Adapter) false
|
||||||
// ===== End of sync from SD7 driver COMMON/BT.h =====
|
// ===== End of sync from SD7 driver COMMON/BT.h =====
|
||||||
#endif // __BT_C__
|
#endif // __BT_C__
|
||||||
|
|
||||||
|
|
|
@ -347,7 +347,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_info{
|
struct tdls_info{
|
||||||
|
@ -641,9 +641,9 @@ __inline static u8 *get_bssid(struct mlme_priv *pmlmepriv)
|
||||||
__inline static sint check_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
__inline static sint check_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||||
{
|
{
|
||||||
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)
|
||||||
|
@ -663,7 +663,7 @@ __inline static void set_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||||
pmlmepriv->fw_state |= state;
|
pmlmepriv->fw_state |= state;
|
||||||
//FOR HW integration
|
//FOR HW integration
|
||||||
if (_FW_UNDER_SURVEY==state){
|
if (_FW_UNDER_SURVEY==state){
|
||||||
pmlmepriv->bScanInProcess = _TRUE;
|
pmlmepriv->bScanInProcess = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,7 +672,7 @@ __inline static void _clr_fwstate_(struct mlme_priv *pmlmepriv, sint state)
|
||||||
pmlmepriv->fw_state &= ~state;
|
pmlmepriv->fw_state &= ~state;
|
||||||
//FOR HW integration
|
//FOR HW integration
|
||||||
if (_FW_UNDER_SURVEY==state){
|
if (_FW_UNDER_SURVEY==state){
|
||||||
pmlmepriv->bScanInProcess = _FALSE;
|
pmlmepriv->bScanInProcess = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -685,7 +685,7 @@ __inline static void clr_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
|
|
||||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
if (check_fwstate(pmlmepriv, state) == _TRUE)
|
if (check_fwstate(pmlmepriv, state) == true)
|
||||||
pmlmepriv->fw_state ^= state;
|
pmlmepriv->fw_state ^= state;
|
||||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
}
|
}
|
||||||
|
@ -763,7 +763,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)
|
||||||
|
|
|
@ -471,8 +471,8 @@ struct bb_reg_param {
|
||||||
};
|
};
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
#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
|
||||||
|
|
|
@ -163,7 +163,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)
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,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)
|
||||||
|
|
|
@ -105,16 +105,16 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Increase and check if the continual_urb_error of this @param dvobjprive is larger than MAX_CONTINUAL_URB_ERR
|
* Increase and check if the continual_urb_error of this @param dvobjprive is larger than MAX_CONTINUAL_URB_ERR
|
||||||
* @return _TRUE:
|
* @return true:
|
||||||
* @return _FALSE:
|
* @return false:
|
||||||
*/
|
*/
|
||||||
static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
|
static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
|
||||||
{
|
{
|
||||||
int ret = _FALSE;
|
int ret = false;
|
||||||
int value;
|
int value;
|
||||||
if ( (value=ATOMIC_INC_RETURN(&dvobj->continual_urb_error)) > MAX_CONTINUAL_URB_ERR) {
|
if ( (value=ATOMIC_INC_RETURN(&dvobj->continual_urb_error)) > MAX_CONTINUAL_URB_ERR) {
|
||||||
DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_URB_ERR);
|
DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_URB_ERR);
|
||||||
ret = _TRUE;
|
ret = true;
|
||||||
} else {
|
} else {
|
||||||
//DBG_88E("[dvobj:%p] continual_urb_error:%d\n", dvobj, value);
|
//DBG_88E("[dvobj:%p] continual_urb_error:%d\n", dvobj, value);
|
||||||
}
|
}
|
||||||
|
@ -134,13 +134,13 @@ static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj)
|
||||||
|
|
||||||
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;
|
||||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||||
|
|
||||||
if (pdvobjpriv->ishighspeed == _TRUE)
|
if (pdvobjpriv->ishighspeed == true)
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -422,15 +422,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -511,9 +511,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
|
||||||
|
|
|
@ -360,7 +360,7 @@ static int rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_network *pnet
|
||||||
notify_ielen = pnetwork->network.IELength-_FIXED_IE_LENGTH_;
|
notify_ielen = pnetwork->network.IELength-_FIXED_IE_LENGTH_;
|
||||||
|
|
||||||
//We've set wiphy's signal_type as CFG80211_SIGNAL_TYPE_MBM: signal strength in mBm (100*dBm)
|
//We've set wiphy's signal_type as CFG80211_SIGNAL_TYPE_MBM: signal strength in mBm (100*dBm)
|
||||||
if ( check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE &&
|
if ( check_fwstate(pmlmepriv, _FW_LINKED)== true &&
|
||||||
is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network)) {
|
is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network)) {
|
||||||
notify_signal = 100*translate_percentage_to_dbm(padapter->recvpriv.signal_strength);//dbm
|
notify_signal = 100*translate_percentage_to_dbm(padapter->recvpriv.signal_strength);//dbm
|
||||||
} else {
|
} else {
|
||||||
|
@ -485,7 +485,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
@ -558,7 +558,7 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
@ -848,7 +848,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||||
_rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
|
_rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
|
||||||
_rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
|
_rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
|
||||||
|
|
||||||
psecuritypriv->busetkipkey = _TRUE;
|
psecuritypriv->busetkipkey = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||||
|
@ -868,7 +868,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||||
|
|
||||||
psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx;
|
psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx;
|
||||||
|
|
||||||
psecuritypriv->binstallGrpkey = _TRUE;
|
psecuritypriv->binstallGrpkey = true;
|
||||||
|
|
||||||
psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;//!!!
|
psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;//!!!
|
||||||
|
|
||||||
|
@ -877,7 +877,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||||
pbcmc_sta=rtw_get_bcmc_stainfo(padapter);
|
pbcmc_sta=rtw_get_bcmc_stainfo(padapter);
|
||||||
if (pbcmc_sta)
|
if (pbcmc_sta)
|
||||||
{
|
{
|
||||||
pbcmc_sta->ieee8021x_blocked = _FALSE;
|
pbcmc_sta->ieee8021x_blocked = false;
|
||||||
pbcmc_sta->dot118021XPrivacy= psecuritypriv->dot118021XGrpPrivacy;//rx will use bmc_sta's dot118021XPrivacy
|
pbcmc_sta->dot118021XPrivacy= psecuritypriv->dot118021XGrpPrivacy;//rx will use bmc_sta's dot118021XPrivacy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -916,7 +916,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||||
_rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8);
|
_rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8);
|
||||||
_rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8);
|
_rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8);
|
||||||
|
|
||||||
psecuritypriv->busetkipkey = _TRUE;
|
psecuritypriv->busetkipkey = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||||
|
@ -935,9 +935,9 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||||
|
|
||||||
set_pairwise_key(padapter, psta);
|
set_pairwise_key(padapter, psta);
|
||||||
|
|
||||||
psta->ieee8021x_blocked = _FALSE;
|
psta->ieee8021x_blocked = false;
|
||||||
|
|
||||||
psta->bpairwise_key_installed = _TRUE;
|
psta->bpairwise_key_installed = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else//group key???
|
else//group key???
|
||||||
|
@ -963,7 +963,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||||
_rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
|
_rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
|
||||||
_rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
|
_rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
|
||||||
|
|
||||||
psecuritypriv->busetkipkey = _TRUE;
|
psecuritypriv->busetkipkey = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||||
|
@ -979,7 +979,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||||
|
|
||||||
psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx;
|
psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx;
|
||||||
|
|
||||||
psecuritypriv->binstallGrpkey = _TRUE;
|
psecuritypriv->binstallGrpkey = true;
|
||||||
|
|
||||||
psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;//!!!
|
psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;//!!!
|
||||||
|
|
||||||
|
@ -988,7 +988,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||||
pbcmc_sta=rtw_get_bcmc_stainfo(padapter);
|
pbcmc_sta=rtw_get_bcmc_stainfo(padapter);
|
||||||
if (pbcmc_sta)
|
if (pbcmc_sta)
|
||||||
{
|
{
|
||||||
pbcmc_sta->ieee8021x_blocked = _FALSE;
|
pbcmc_sta->ieee8021x_blocked = false;
|
||||||
pbcmc_sta->dot118021XPrivacy= psecuritypriv->dot118021XGrpPrivacy;//rx will use bmc_sta's dot118021XPrivacy
|
pbcmc_sta->dot118021XPrivacy= psecuritypriv->dot118021XGrpPrivacy;//rx will use bmc_sta's dot118021XPrivacy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1097,7 +1097,7 @@ _func_enter_;
|
||||||
|
|
||||||
//DBG_88E("%s, : dot11AuthAlgrthm == dot11AuthAlgrthm_8021X\n", __func__);
|
//DBG_88E("%s, : dot11AuthAlgrthm == dot11AuthAlgrthm_8021X\n", __func__);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == _TRUE) //sta mode
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == true) //sta mode
|
||||||
{
|
{
|
||||||
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
|
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
|
||||||
if (psta == NULL) {
|
if (psta == NULL) {
|
||||||
|
@ -1108,7 +1108,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
//Jeff: don't disable ieee8021x_blocked while clearing key
|
//Jeff: don't disable ieee8021x_blocked while clearing key
|
||||||
if (strcmp(param->u.crypt.alg, "none") != 0)
|
if (strcmp(param->u.crypt.alg, "none") != 0)
|
||||||
psta->ieee8021x_blocked = _FALSE;
|
psta->ieee8021x_blocked = false;
|
||||||
|
|
||||||
|
|
||||||
if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled)||
|
if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled)||
|
||||||
|
@ -1130,21 +1130,21 @@ _func_enter_;
|
||||||
_rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8);
|
_rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8);
|
||||||
_rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8);
|
_rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8);
|
||||||
|
|
||||||
padapter->securitypriv.busetkipkey=_FALSE;
|
padapter->securitypriv.busetkipkey=false;
|
||||||
//_set_timer(&padapter->securitypriv.tkip_timer, 50);
|
//_set_timer(&padapter->securitypriv.tkip_timer, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
//DEBUG_ERR((" param->u.crypt.key_len=%d\n",param->u.crypt.key_len));
|
//DEBUG_ERR((" param->u.crypt.key_len=%d\n",param->u.crypt.key_len));
|
||||||
DBG_88E(" ~~~~set sta key:unicastkey\n");
|
DBG_88E(" ~~~~set sta key:unicastkey\n");
|
||||||
|
|
||||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, _TRUE);
|
rtw_setstakey_cmd(padapter, (unsigned char *)psta, true);
|
||||||
}
|
}
|
||||||
else//group key
|
else//group key
|
||||||
{
|
{
|
||||||
_rtw_memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key,(param->u.crypt.key_len>16 ?16:param->u.crypt.key_len));
|
_rtw_memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key,(param->u.crypt.key_len>16 ?16:param->u.crypt.key_len));
|
||||||
_rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[16]),8);
|
_rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[16]),8);
|
||||||
_rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[24]),8);
|
_rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[24]),8);
|
||||||
padapter->securitypriv.binstallGrpkey = _TRUE;
|
padapter->securitypriv.binstallGrpkey = true;
|
||||||
//DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len));
|
//DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len));
|
||||||
DBG_88E(" ~~~~set sta key:groupkey\n");
|
DBG_88E(" ~~~~set sta key:groupkey\n");
|
||||||
|
|
||||||
|
@ -1170,7 +1170,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
//Jeff: don't disable ieee8021x_blocked while clearing key
|
//Jeff: don't disable ieee8021x_blocked while clearing key
|
||||||
if (strcmp(param->u.crypt.alg, "none") != 0)
|
if (strcmp(param->u.crypt.alg, "none") != 0)
|
||||||
pbcmc_sta->ieee8021x_blocked = _FALSE;
|
pbcmc_sta->ieee8021x_blocked = false;
|
||||||
|
|
||||||
if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled)||
|
if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled)||
|
||||||
(padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption3Enabled))
|
(padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption3Enabled))
|
||||||
|
@ -1358,11 +1358,11 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
_rtw_memcpy(param->u.crypt.key, params->key, params->key_len);
|
_rtw_memcpy(param->u.crypt.key, params->key, params->key_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||||
{
|
{
|
||||||
ret = rtw_cfg80211_set_encryption(ndev, param, param_len);
|
ret = rtw_cfg80211_set_encryption(ndev, param, param_len);
|
||||||
}
|
}
|
||||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
if (mac_addr)
|
if (mac_addr)
|
||||||
|
@ -1487,7 +1487,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
|
||||||
{
|
{
|
||||||
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
||||||
|
|
||||||
if (_rtw_memcmp(mac, cur_network->network.MacAddress, ETH_ALEN) == _FALSE)
|
if (_rtw_memcmp(mac, cur_network->network.MacAddress, ETH_ALEN) == false)
|
||||||
{
|
{
|
||||||
DBG_88E("%s, mismatch bssid="MAC_FMT"\n", __func__, MAC_ARG(cur_network->network.MacAddress));
|
DBG_88E("%s, mismatch bssid="MAC_FMT"\n", __func__, MAC_ARG(cur_network->network.MacAddress));
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
@ -1559,7 +1559,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||||
#endif
|
#endif
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
u8 change = _FALSE;
|
u8 change = false;
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (!padapter->isprimary)
|
if (!padapter->isprimary)
|
||||||
|
@ -1591,7 +1591,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||||
|
|
||||||
if (old_type != type)
|
if (old_type != type)
|
||||||
{
|
{
|
||||||
change = _TRUE;
|
change = true;
|
||||||
pmlmeext->action_public_rxseq = 0xffff;
|
pmlmeext->action_public_rxseq = 0xffff;
|
||||||
pmlmeext->action_public_dialog_token = 0xff;
|
pmlmeext->action_public_dialog_token = 0xff;
|
||||||
}
|
}
|
||||||
|
@ -1639,7 +1639,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||||
|
|
||||||
rtw_wdev->iftype = type;
|
rtw_wdev->iftype = type;
|
||||||
|
|
||||||
if (rtw_set_802_11_infrastructure_mode(padapter, networkType) ==_FALSE)
|
if (rtw_set_802_11_infrastructure_mode(padapter, networkType) ==false)
|
||||||
{
|
{
|
||||||
rtw_wdev->iftype = old_type;
|
rtw_wdev->iftype = old_type;
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
|
@ -1714,7 +1714,7 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter)
|
||||||
|
|
||||||
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);
|
||||||
|
@ -1722,7 +1722,7 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter)
|
||||||
//report network only if the current channel set contains the channel to which this network belongs
|
//report network only if the current channel set contains the channel to which this network belongs
|
||||||
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0
|
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0
|
||||||
#ifdef CONFIG_VALIDATE_SSID
|
#ifdef CONFIG_VALIDATE_SSID
|
||||||
&& _TRUE == rtw_validate_ssid(&(pnetwork->network.Ssid))
|
&& true == rtw_validate_ssid(&(pnetwork->network.Ssid))
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1737,7 +1737,7 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter)
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
|
|
||||||
//call this after other things have been done
|
//call this after other things have been done
|
||||||
rtw_cfg80211_indicate_scan_done(wdev_to_priv(padapter->rtw_wdev), _FALSE);
|
rtw_cfg80211_indicate_scan_done(wdev_to_priv(padapter->rtw_wdev), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rtw_cfg80211_set_probe_req_wpsp2pie(struct net_device *net, char *buf, int len)
|
static int rtw_cfg80211_set_probe_req_wpsp2pie(struct net_device *net, char *buf, int len)
|
||||||
|
@ -1849,7 +1849,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
struct cfg80211_scan_request *request)
|
struct cfg80211_scan_request *request)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
u8 _status = _FALSE;
|
u8 _status = false;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||||
|
@ -1866,7 +1866,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
|
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
|
||||||
struct cfg80211_ssid *ssids = request->ssids;
|
struct cfg80211_ssid *ssids = request->ssids;
|
||||||
int social_channel = 0, j = 0;
|
int social_channel = 0, j = 0;
|
||||||
bool need_indicate_scan_done = _FALSE;
|
bool need_indicate_scan_done = false;
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
PADAPTER pbuddy_adapter = NULL;
|
PADAPTER pbuddy_adapter = NULL;
|
||||||
struct mlme_priv *pbuddy_mlmepriv = NULL;
|
struct mlme_priv *pbuddy_mlmepriv = NULL;
|
||||||
|
@ -1887,7 +1887,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
#ifdef CONFIG_MP_INCLUDED
|
#ifdef CONFIG_MP_INCLUDED
|
||||||
if (padapter->registrypriv.mp_mode == 1)
|
if (padapter->registrypriv.mp_mode == 1)
|
||||||
{
|
{
|
||||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||||
{
|
{
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -1899,18 +1899,18 @@ if (padapter->registrypriv.mp_mode == 1)
|
||||||
pwdev_priv->scan_request = request;
|
pwdev_priv->scan_request = request;
|
||||||
_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
|
_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_CFG80211
|
#ifdef CONFIG_DEBUG_CFG80211
|
||||||
DBG_88E("%s under WIFI_AP_STATE\n", __func__);
|
DBG_88E("%s under WIFI_AP_STATE\n", __func__);
|
||||||
#endif
|
#endif
|
||||||
//need_indicate_scan_done = _TRUE;
|
//need_indicate_scan_done = true;
|
||||||
//goto check_need_indicate_scan_done;
|
//goto check_need_indicate_scan_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||||
need_indicate_scan_done = _TRUE;
|
need_indicate_scan_done = true;
|
||||||
goto check_need_indicate_scan_done;
|
goto check_need_indicate_scan_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1923,7 +1923,7 @@ if (padapter->registrypriv.mp_mode == 1)
|
||||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||||
{
|
{
|
||||||
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
||||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = _TRUE;
|
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1950,47 +1950,47 @@ if (padapter->registrypriv.mp_mode == 1)
|
||||||
rtw_cfg80211_set_probe_req_wpsp2pie( ndev, (u8 *)request->ie, request->ie_len );
|
rtw_cfg80211_set_probe_req_wpsp2pie( ndev, (u8 *)request->ie, request->ie_len );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE)
|
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == true)
|
||||||
{
|
{
|
||||||
DBG_88E("%s, bBusyTraffic == _TRUE\n", __func__);
|
DBG_88E("%s, bBusyTraffic == true\n", __func__);
|
||||||
need_indicate_scan_done = _TRUE;
|
need_indicate_scan_done = true;
|
||||||
goto check_need_indicate_scan_done;
|
goto check_need_indicate_scan_done;
|
||||||
}
|
}
|
||||||
if (rtw_is_scan_deny(padapter)){
|
if (rtw_is_scan_deny(padapter)){
|
||||||
DBG_88E(FUNC_NDEV_FMT ": scan deny\n", FUNC_NDEV_ARG(ndev));
|
DBG_88E(FUNC_NDEV_FMT ": scan deny\n", FUNC_NDEV_ARG(ndev));
|
||||||
need_indicate_scan_done = _TRUE;
|
need_indicate_scan_done = true;
|
||||||
goto check_need_indicate_scan_done;
|
goto check_need_indicate_scan_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (pbuddy_mlmepriv && (pbuddy_mlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE))
|
if (pbuddy_mlmepriv && (pbuddy_mlmepriv->LinkDetectInfo.bBusyTraffic == true))
|
||||||
{
|
{
|
||||||
DBG_88E("%s, bBusyTraffic == _TRUE at buddy_intf\n", __func__);
|
DBG_88E("%s, bBusyTraffic == true at buddy_intf\n", __func__);
|
||||||
need_indicate_scan_done = _TRUE;
|
need_indicate_scan_done = true;
|
||||||
goto check_need_indicate_scan_done;
|
goto check_need_indicate_scan_done;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_CONCURRENT_MODE
|
#endif //CONFIG_CONCURRENT_MODE
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||||
{
|
{
|
||||||
DBG_88E("%s, fwstate=0x%x\n", __func__, pmlmepriv->fw_state);
|
DBG_88E("%s, fwstate=0x%x\n", __func__, pmlmepriv->fw_state);
|
||||||
need_indicate_scan_done = _TRUE;
|
need_indicate_scan_done = true;
|
||||||
goto check_need_indicate_scan_done;
|
goto check_need_indicate_scan_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (check_buddy_fwstate(padapter,
|
if (check_buddy_fwstate(padapter,
|
||||||
_FW_UNDER_SURVEY|_FW_UNDER_LINKING|WIFI_UNDER_WPS) == _TRUE)
|
_FW_UNDER_SURVEY|_FW_UNDER_LINKING|WIFI_UNDER_WPS) == true)
|
||||||
{
|
{
|
||||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY))
|
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY))
|
||||||
{
|
{
|
||||||
DBG_88E("scanning_via_buddy_intf\n");
|
DBG_88E("scanning_via_buddy_intf\n");
|
||||||
pmlmepriv->scanning_via_buddy_intf = _TRUE;
|
pmlmepriv->scanning_via_buddy_intf = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_88E("buddy_intf's mlme state:0x%x\n", pbuddy_mlmepriv->fw_state);
|
DBG_88E("buddy_intf's mlme state:0x%x\n", pbuddy_mlmepriv->fw_state);
|
||||||
|
|
||||||
need_indicate_scan_done = _TRUE;
|
need_indicate_scan_done = true;
|
||||||
goto check_need_indicate_scan_done;
|
goto check_need_indicate_scan_done;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2000,7 +2000,7 @@ if (padapter->registrypriv.mp_mode == 1)
|
||||||
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
|
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
|
||||||
{
|
{
|
||||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
|
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
|
||||||
rtw_free_network_queue(padapter, _TRUE);
|
rtw_free_network_queue(padapter, true);
|
||||||
|
|
||||||
if (social_channel == 0)
|
if (social_channel == 0)
|
||||||
rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
|
rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
|
||||||
|
@ -2043,7 +2043,7 @@ if (padapter->registrypriv.mp_mode == 1)
|
||||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
|
|
||||||
|
|
||||||
if (_status == _FALSE)
|
if (_status == false)
|
||||||
{
|
{
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
@ -2450,9 +2450,9 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
NDIS_802_11_SSID ndis_ssid;
|
NDIS_802_11_SSID ndis_ssid;
|
||||||
u8 *dst_ssid, *src_ssid;
|
u8 *dst_ssid, *src_ssid;
|
||||||
u8 *dst_bssid, *src_bssid;
|
u8 *dst_bssid, *src_bssid;
|
||||||
//u8 matched_by_bssid=_FALSE;
|
//u8 matched_by_bssid=false;
|
||||||
//u8 matched_by_ssid=_FALSE;
|
//u8 matched_by_ssid=false;
|
||||||
u8 matched=_FALSE;
|
u8 matched=false;
|
||||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||||
|
@ -2463,7 +2463,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
sme->privacy, sme->key, sme->key_len, sme->key_idx);
|
sme->privacy, sme->key, sme->key_len, sme->key_idx);
|
||||||
|
|
||||||
|
|
||||||
if (wdev_to_priv(padapter->rtw_wdev)->block == _TRUE)
|
if (wdev_to_priv(padapter->rtw_wdev)->block == true)
|
||||||
{
|
{
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
DBG_88E("%s wdev_priv.block is set\n", __func__);
|
DBG_88E("%s wdev_priv.block is set\n", __func__);
|
||||||
|
@ -2472,7 +2472,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
|
||||||
#ifdef CONFIG_PLATFORM_MSTAR_TITANIA12
|
#ifdef CONFIG_PLATFORM_MSTAR_TITANIA12
|
||||||
printk("MStar Android!\n");
|
printk("MStar Android!\n");
|
||||||
if ((wdev_to_priv(padapter->rtw_wdev))->bandroid_scan == _FALSE)
|
if ((wdev_to_priv(padapter->rtw_wdev))->bandroid_scan == false)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||||
|
@ -2497,12 +2497,12 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (check_buddy_fwstate(padapter, _FW_UNDER_LINKING) == _TRUE) {
|
if (check_buddy_fwstate(padapter, _FW_UNDER_LINKING) == true) {
|
||||||
DBG_88E("%s, but buddy_intf is under linking\n", __func__);
|
DBG_88E("%s, but buddy_intf is under linking\n", __func__);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY) == _TRUE) {
|
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY) == true) {
|
||||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2531,7 +2531,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
DBG_88E("bssid="MAC_FMT"\n", MAC_ARG(sme->bssid));
|
DBG_88E("bssid="MAC_FMT"\n", MAC_ARG(sme->bssid));
|
||||||
|
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||||
{
|
{
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
DBG_88E("%s, fw_state=0x%x, goto exit\n", __func__, pmlmepriv->fw_state);
|
DBG_88E("%s, fw_state=0x%x, goto exit\n", __func__, pmlmepriv->fw_state);
|
||||||
|
@ -2546,7 +2546,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == _TRUE)
|
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == true)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2558,13 +2558,13 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
dst_bssid = pnetwork->network.MacAddress;
|
dst_bssid = pnetwork->network.MacAddress;
|
||||||
|
|
||||||
if (sme->bssid) {
|
if (sme->bssid) {
|
||||||
if (_rtw_memcmp(pnetwork->network.MacAddress, sme->bssid, ETH_ALEN) == _FALSE)
|
if (_rtw_memcmp(pnetwork->network.MacAddress, sme->bssid, ETH_ALEN) == false)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sme->ssid && sme->ssid_len) {
|
if (sme->ssid && sme->ssid_len) {
|
||||||
if ( pnetwork->network.Ssid.SsidLength != sme->ssid_len
|
if ( pnetwork->network.Ssid.SsidLength != sme->ssid_len
|
||||||
|| _rtw_memcmp(pnetwork->network.Ssid.Ssid, sme->ssid, sme->ssid_len) == _FALSE
|
|| _rtw_memcmp(pnetwork->network.Ssid.Ssid, sme->ssid, sme->ssid_len) == false
|
||||||
)
|
)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2574,14 +2574,14 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
{
|
{
|
||||||
src_bssid = sme->bssid;
|
src_bssid = sme->bssid;
|
||||||
|
|
||||||
if ((_rtw_memcmp(dst_bssid, src_bssid, ETH_ALEN)) == _TRUE)
|
if ((_rtw_memcmp(dst_bssid, src_bssid, ETH_ALEN)) == true)
|
||||||
{
|
{
|
||||||
DBG_88E("matched by bssid\n");
|
DBG_88E("matched by bssid\n");
|
||||||
|
|
||||||
ndis_ssid.SsidLength = pnetwork->network.Ssid.SsidLength;
|
ndis_ssid.SsidLength = pnetwork->network.Ssid.SsidLength;
|
||||||
_rtw_memcpy(ndis_ssid.Ssid, pnetwork->network.Ssid.Ssid, pnetwork->network.Ssid.SsidLength);
|
_rtw_memcpy(ndis_ssid.Ssid, pnetwork->network.Ssid.Ssid, pnetwork->network.Ssid.SsidLength);
|
||||||
|
|
||||||
matched=_TRUE;
|
matched=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2590,11 +2590,11 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
{
|
{
|
||||||
src_ssid = ndis_ssid.Ssid;
|
src_ssid = ndis_ssid.Ssid;
|
||||||
|
|
||||||
if ((_rtw_memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength) == _TRUE) &&
|
if ((_rtw_memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength) == true) &&
|
||||||
(pnetwork->network.Ssid.SsidLength==ndis_ssid.SsidLength))
|
(pnetwork->network.Ssid.SsidLength==ndis_ssid.SsidLength))
|
||||||
{
|
{
|
||||||
DBG_88E("matched by ssid\n");
|
DBG_88E("matched by ssid\n");
|
||||||
matched=_TRUE;
|
matched=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2603,15 +2603,15 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
|
||||||
_exit_critical_bh(&queue->lock, &irqL);
|
_exit_critical_bh(&queue->lock, &irqL);
|
||||||
|
|
||||||
if ((matched == _FALSE) || (pnetwork== NULL))
|
if ((matched == false) || (pnetwork== NULL))
|
||||||
{
|
{
|
||||||
ret = -ENOENT;
|
ret = -ENOENT;
|
||||||
DBG_88E("connect, matched == _FALSE, goto exit\n");
|
DBG_88E("connect, matched == false, goto exit\n");
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode) == _FALSE)
|
if (rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode) == false)
|
||||||
{
|
{
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -2658,7 +2658,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if (sme->crypto.n_ciphers_pairwise) {
|
if (sme->crypto.n_ciphers_pairwise) {
|
||||||
ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.ciphers_pairwise[0], _TRUE);
|
ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.ciphers_pairwise[0], true);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -2725,7 +2725,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.cipher_group, _FALSE);
|
ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.cipher_group, false);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -2749,7 +2749,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
|
||||||
//rtw_set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus);
|
//rtw_set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus);
|
||||||
|
|
||||||
if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == _FALSE) {
|
if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == false) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -2775,13 +2775,13 @@ static int cfg80211_rtw_disconnect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
{
|
{
|
||||||
rtw_scan_abort(padapter);
|
rtw_scan_abort(padapter);
|
||||||
LeaveAllPowerSaveMode(padapter);
|
LeaveAllPowerSaveMode(padapter);
|
||||||
rtw_disassoc_cmd(padapter, 500, _FALSE);
|
rtw_disassoc_cmd(padapter, 500, false);
|
||||||
|
|
||||||
DBG_88E("%s...call rtw_indicate_disconnect\n", __func__);
|
DBG_88E("%s...call rtw_indicate_disconnect\n", __func__);
|
||||||
|
|
||||||
padapter->mlmepriv.not_indic_disco = _TRUE;
|
padapter->mlmepriv.not_indic_disco = true;
|
||||||
rtw_indicate_disconnect(padapter);
|
rtw_indicate_disconnect(padapter);
|
||||||
padapter->mlmepriv.not_indic_disco = _FALSE;
|
padapter->mlmepriv.not_indic_disco = false;
|
||||||
|
|
||||||
rtw_free_assoc_resources(padapter, 1);
|
rtw_free_assoc_resources(padapter, 1);
|
||||||
}
|
}
|
||||||
|
@ -2839,31 +2839,31 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
|
||||||
struct net_device *netdev,
|
struct net_device *netdev,
|
||||||
struct cfg80211_pmksa *pmksa)
|
struct cfg80211_pmksa *pmksa)
|
||||||
{
|
{
|
||||||
u8 index,blInserted = _FALSE;
|
u8 index,blInserted = false;
|
||||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||||
u8 strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
|
u8 strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
|
||||||
|
|
||||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(netdev));
|
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(netdev));
|
||||||
|
|
||||||
if ( _rtw_memcmp( pmksa->bssid, strZeroMacAddress, ETH_ALEN ) == _TRUE )
|
if ( _rtw_memcmp( pmksa->bssid, strZeroMacAddress, ETH_ALEN ) == true )
|
||||||
{
|
{
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
blInserted = _FALSE;
|
blInserted = false;
|
||||||
|
|
||||||
//overwrite PMKID
|
//overwrite PMKID
|
||||||
for (index=0 ; index<NUM_PMKID_CACHE; index++)
|
for (index=0 ; index<NUM_PMKID_CACHE; index++)
|
||||||
{
|
{
|
||||||
if ( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, pmksa->bssid, ETH_ALEN) ==_TRUE )
|
if ( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, pmksa->bssid, ETH_ALEN) ==true )
|
||||||
{ // BSSID is matched, the same AP => rewrite with new PMKID.
|
{ // BSSID is matched, the same AP => rewrite with new PMKID.
|
||||||
DBG_88E(FUNC_NDEV_FMT" BSSID exists in the PMKList.\n", FUNC_NDEV_ARG(netdev));
|
DBG_88E(FUNC_NDEV_FMT" BSSID exists in the PMKList.\n", FUNC_NDEV_ARG(netdev));
|
||||||
|
|
||||||
_rtw_memcpy( psecuritypriv->PMKIDList[index].PMKID, pmksa->pmkid, WLAN_PMKID_LEN);
|
_rtw_memcpy( psecuritypriv->PMKIDList[index].PMKID, pmksa->pmkid, WLAN_PMKID_LEN);
|
||||||
psecuritypriv->PMKIDList[index].bUsed = _TRUE;
|
psecuritypriv->PMKIDList[index].bUsed = true;
|
||||||
psecuritypriv->PMKIDIndex = index+1;
|
psecuritypriv->PMKIDIndex = index+1;
|
||||||
blInserted = _TRUE;
|
blInserted = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2877,7 +2877,7 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
|
||||||
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, pmksa->bssid, ETH_ALEN);
|
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, pmksa->bssid, ETH_ALEN);
|
||||||
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmksa->pmkid, WLAN_PMKID_LEN);
|
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmksa->pmkid, WLAN_PMKID_LEN);
|
||||||
|
|
||||||
psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = _TRUE;
|
psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
|
||||||
psecuritypriv->PMKIDIndex++ ;
|
psecuritypriv->PMKIDIndex++ ;
|
||||||
if (psecuritypriv->PMKIDIndex==16)
|
if (psecuritypriv->PMKIDIndex==16)
|
||||||
{
|
{
|
||||||
|
@ -2892,7 +2892,7 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
|
||||||
struct net_device *netdev,
|
struct net_device *netdev,
|
||||||
struct cfg80211_pmksa *pmksa)
|
struct cfg80211_pmksa *pmksa)
|
||||||
{
|
{
|
||||||
u8 index, bMatched = _FALSE;
|
u8 index, bMatched = false;
|
||||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||||
|
|
||||||
|
@ -2900,17 +2900,17 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
|
||||||
|
|
||||||
for (index=0 ; index<NUM_PMKID_CACHE; index++)
|
for (index=0 ; index<NUM_PMKID_CACHE; index++)
|
||||||
{
|
{
|
||||||
if ( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, pmksa->bssid, ETH_ALEN) ==_TRUE )
|
if ( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, pmksa->bssid, ETH_ALEN) ==true )
|
||||||
{ // BSSID is matched, the same AP => Remove this PMKID information and reset it.
|
{ // BSSID is matched, the same AP => Remove this PMKID information and reset it.
|
||||||
_rtw_memset( psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN );
|
_rtw_memset( psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN );
|
||||||
_rtw_memset( psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN );
|
_rtw_memset( psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN );
|
||||||
psecuritypriv->PMKIDList[index].bUsed = _FALSE;
|
psecuritypriv->PMKIDList[index].bUsed = false;
|
||||||
bMatched = _TRUE;
|
bMatched = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_FALSE == bMatched)
|
if (false == bMatched)
|
||||||
{
|
{
|
||||||
DBG_88E(FUNC_NDEV_FMT" do not have matched BSSID\n"
|
DBG_88E(FUNC_NDEV_FMT" do not have matched BSSID\n"
|
||||||
, FUNC_NDEV_ARG(netdev));
|
, FUNC_NDEV_ARG(netdev));
|
||||||
|
@ -3149,7 +3149,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
|
||||||
u8 category, action;
|
u8 category, action;
|
||||||
int type = -1;
|
int type = -1;
|
||||||
|
|
||||||
if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) {
|
if (rtw_action_frame_parse(buf, len, &category, &action) == false) {
|
||||||
DBG_88E(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev),
|
DBG_88E(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev),
|
||||||
le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl));
|
le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl));
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -3158,7 +3158,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
|
||||||
DBG_88E("RTW_Tx:da="MAC_FMT" via "FUNC_NDEV_FMT"\n",
|
DBG_88E("RTW_Tx:da="MAC_FMT" via "FUNC_NDEV_FMT"\n",
|
||||||
MAC_ARG(GetAddr1Ptr(buf)), FUNC_NDEV_ARG(ndev));
|
MAC_ARG(GetAddr1Ptr(buf)), FUNC_NDEV_ARG(ndev));
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
if ((type = rtw_p2p_check_frames(padapter, buf, len, _TRUE)) >= 0)
|
if ((type = rtw_p2p_check_frames(padapter, buf, len, true)) >= 0)
|
||||||
goto dump;
|
goto dump;
|
||||||
#endif
|
#endif
|
||||||
if (category == RTW_WLAN_CATEGORY_PUBLIC)
|
if (category == RTW_WLAN_CATEGORY_PUBLIC)
|
||||||
|
@ -3176,7 +3176,7 @@ dump:
|
||||||
//update attribute
|
//update attribute
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
pattrib->retry_ctrl = _FALSE;
|
pattrib->retry_ctrl = false;
|
||||||
|
|
||||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||||
|
|
||||||
|
@ -3190,7 +3190,7 @@ dump:
|
||||||
|
|
||||||
pwfd_info = padapter->wdinfo.wfd_info;
|
pwfd_info = padapter->wdinfo.wfd_info;
|
||||||
|
|
||||||
if ( _TRUE == pwfd_info->wfd_enable )
|
if ( true == pwfd_info->wfd_enable )
|
||||||
{
|
{
|
||||||
rtw_append_wfd_ie( padapter, pframe, &len );
|
rtw_append_wfd_ie( padapter, pframe, &len );
|
||||||
}
|
}
|
||||||
|
@ -3403,7 +3403,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||||
uint len, wps_ielen=0;
|
uint len, wps_ielen=0;
|
||||||
uint p2p_ielen=0;
|
uint p2p_ielen=0;
|
||||||
u8 *p2p_ie;
|
u8 *p2p_ie;
|
||||||
u8 got_p2p_ie = _FALSE;
|
u8 got_p2p_ie = false;
|
||||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||||
//struct sta_priv *pstapriv = &padapter->stapriv;
|
//struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
|
||||||
|
@ -3411,7 +3411,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||||
DBG_88E("%s beacon_head_len=%zu, beacon_tail_len=%zu\n", __func__, head_len, tail_len);
|
DBG_88E("%s beacon_head_len=%zu, beacon_tail_len=%zu\n", __func__, head_len, tail_len);
|
||||||
|
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (head_len<24)
|
if (head_len<24)
|
||||||
|
@ -3443,7 +3443,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||||
if (rtw_get_p2p_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_, NULL, &p2p_ielen))
|
if (rtw_get_p2p_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_, NULL, &p2p_ielen))
|
||||||
{
|
{
|
||||||
DBG_88E("got p2p_ie, len=%d\n", p2p_ielen);
|
DBG_88E("got p2p_ie, len=%d\n", p2p_ielen);
|
||||||
got_p2p_ie = _TRUE;
|
got_p2p_ie = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3455,7 +3455,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
//check p2p if enable
|
//check p2p if enable
|
||||||
if (got_p2p_ie == _TRUE)
|
if (got_p2p_ie == true)
|
||||||
{
|
{
|
||||||
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
|
||||||
struct wifidirect_info *pwdinfo= &(adapter->wdinfo);
|
struct wifidirect_info *pwdinfo= &(adapter->wdinfo);
|
||||||
|
@ -3464,7 +3464,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||||
{
|
{
|
||||||
DBG_88E("Enable P2P function for the first time\n");
|
DBG_88E("Enable P2P function for the first time\n");
|
||||||
rtw_p2p_enable(adapter, P2P_ROLE_GO);
|
rtw_p2p_enable(adapter, P2P_ROLE_GO);
|
||||||
wdev_to_priv(adapter->rtw_wdev)->p2p_enabled = _TRUE;
|
wdev_to_priv(adapter->rtw_wdev)->p2p_enabled = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3519,7 +3519,7 @@ static int cfg80211_rtw_set_beacon(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
|
||||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||||
|
|
||||||
pmlmeext->bstart_bss = _TRUE;
|
pmlmeext->bstart_bss = true;
|
||||||
|
|
||||||
cfg80211_rtw_add_beacon(wiphy, ndev, info);
|
cfg80211_rtw_add_beacon(wiphy, ndev, info);
|
||||||
|
|
||||||
|
@ -3590,7 +3590,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||||
|
|
||||||
DBG_88E("+"FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
DBG_88E("+"FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != _TRUE)
|
if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != true)
|
||||||
{
|
{
|
||||||
DBG_88E("%s, fw_state != FW_LINKED|WIFI_AP_STATE\n", __func__);
|
DBG_88E("%s, fw_state != FW_LINKED|WIFI_AP_STATE\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -3625,7 +3625,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||||
plist = get_next(phead);
|
plist = get_next(phead);
|
||||||
|
|
||||||
//check asoc_queue
|
//check 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);
|
||||||
|
|
||||||
|
@ -3633,9 +3633,9 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||||
|
|
||||||
if (_rtw_memcmp(mac, psta->hwaddr, ETH_ALEN))
|
if (_rtw_memcmp(mac, psta->hwaddr, ETH_ALEN))
|
||||||
{
|
{
|
||||||
if (psta->dot8021xalg == 1 && psta->bpairwise_key_installed == _FALSE)
|
if (psta->dot8021xalg == 1 && psta->bpairwise_key_installed == false)
|
||||||
{
|
{
|
||||||
DBG_88E("%s, sta's dot8021xalg = 1 and key_installed = _FALSE\n", __func__);
|
DBG_88E("%s, sta's dot8021xalg = 1 and key_installed = false\n", __func__);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3645,7 +3645,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||||
pstapriv->asoc_list_cnt--;
|
pstapriv->asoc_list_cnt--;
|
||||||
|
|
||||||
//_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
//_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
updated = ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING);
|
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||||
//_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
//_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
|
|
||||||
psta = NULL;
|
psta = NULL;
|
||||||
|
@ -3750,7 +3750,7 @@ void rtw_cfg80211_rx_action_p2p(_adapter *padapter, u8 *pmgmt_frame, uint frame_
|
||||||
|
|
||||||
DBG_88E("RTW_Rx:cur_ch=%d\n", channel);
|
DBG_88E("RTW_Rx:cur_ch=%d\n", channel);
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, _FALSE);
|
type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, false);
|
||||||
if (type >= 0)
|
if (type >= 0)
|
||||||
goto indicate;
|
goto indicate;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3782,7 +3782,7 @@ void rtw_cfg80211_rx_p2p_action_public(_adapter *padapter, u8 *pmgmt_frame, uint
|
||||||
|
|
||||||
DBG_88E("RTW_Rx:cur_ch=%d\n", channel);
|
DBG_88E("RTW_Rx:cur_ch=%d\n", channel);
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, _FALSE);
|
type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, false);
|
||||||
if (type >= 0) {
|
if (type >= 0) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case P2P_GO_NEGO_CONF:
|
case P2P_GO_NEGO_CONF:
|
||||||
|
@ -4077,11 +4077,11 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
||||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||||
struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo;
|
struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo;
|
||||||
u8 remain_ch = (u8) ieee80211_frequency_to_channel(channel->center_freq);
|
u8 remain_ch = (u8) ieee80211_frequency_to_channel(channel->center_freq);
|
||||||
u8 ready_on_channel = _FALSE;
|
u8 ready_on_channel = false;
|
||||||
|
|
||||||
DBG_88E(FUNC_NDEV_FMT" ch:%u duration:%d\n", FUNC_NDEV_ARG(ndev), remain_ch, duration);
|
DBG_88E(FUNC_NDEV_FMT" ch:%u duration:%d\n", FUNC_NDEV_ARG(ndev), remain_ch, duration);
|
||||||
|
|
||||||
if (pcfg80211_wdinfo->is_ro_ch == _TRUE)
|
if (pcfg80211_wdinfo->is_ro_ch == true)
|
||||||
{
|
{
|
||||||
DBG_88E("%s, cancel ro ch timer\n", __func__);
|
DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||||
|
|
||||||
|
@ -4094,7 +4094,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
||||||
p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK);
|
p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK);
|
||||||
}
|
}
|
||||||
|
|
||||||
pcfg80211_wdinfo->is_ro_ch = _TRUE;
|
pcfg80211_wdinfo->is_ro_ch = true;
|
||||||
|
|
||||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
|
@ -4116,7 +4116,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
||||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||||
{
|
{
|
||||||
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
||||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = _TRUE;
|
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -4166,14 +4166,14 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ready_on_channel = _TRUE;
|
ready_on_channel = true;
|
||||||
//pmlmeext->cur_channel = remain_ch;
|
//pmlmeext->cur_channel = remain_ch;
|
||||||
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||||
}else
|
}else
|
||||||
#endif //CONFIG_CONCURRENT_MODE
|
#endif //CONFIG_CONCURRENT_MODE
|
||||||
if (remain_ch != pmlmeext->cur_channel )
|
if (remain_ch != pmlmeext->cur_channel )
|
||||||
{
|
{
|
||||||
ready_on_channel = _TRUE;
|
ready_on_channel = true;
|
||||||
//pmlmeext->cur_channel = remain_ch;
|
//pmlmeext->cur_channel = remain_ch;
|
||||||
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||||
}
|
}
|
||||||
|
@ -4191,7 +4191,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
||||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 0);
|
ATOMIC_SET(&pwdev_priv->ro_ch_to, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ready_on_channel == _TRUE)
|
if (ready_on_channel == true)
|
||||||
{
|
{
|
||||||
if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) )
|
if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) )
|
||||||
pmlmeext->cur_channel = remain_ch;
|
pmlmeext->cur_channel = remain_ch;
|
||||||
|
@ -4217,7 +4217,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if (err)
|
if (err)
|
||||||
pcfg80211_wdinfo->is_ro_ch = _FALSE;
|
pcfg80211_wdinfo->is_ro_ch = false;
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -4234,7 +4234,7 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy, struct net
|
||||||
|
|
||||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||||
|
|
||||||
if (pcfg80211_wdinfo->is_ro_ch == _TRUE) {
|
if (pcfg80211_wdinfo->is_ro_ch == true) {
|
||||||
DBG_88E("%s, cancel ro ch timer\n", __func__);
|
DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||||
_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
|
@ -4249,7 +4249,7 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy, struct net
|
||||||
DBG_88E("%s, role=%d, p2p_state=%d\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo));
|
DBG_88E("%s, role=%d, p2p_state=%d\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
pcfg80211_wdinfo->is_ro_ch = _FALSE;
|
pcfg80211_wdinfo->is_ro_ch = false;
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -4262,7 +4262,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
||||||
struct pkt_attrib *pattrib;
|
struct pkt_attrib *pattrib;
|
||||||
unsigned char *pframe;
|
unsigned char *pframe;
|
||||||
int ret = _FAIL;
|
int ret = _FAIL;
|
||||||
bool ack = _TRUE;
|
bool ack = true;
|
||||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
|
||||||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
|
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
|
||||||
|
@ -4285,10 +4285,10 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
||||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||||
#endif /* CONFIG_CONCURRENT_MODE */
|
#endif /* CONFIG_CONCURRENT_MODE */
|
||||||
|
|
||||||
if (padapter->cfg80211_wdinfo.is_ro_ch == _TRUE) {
|
if (padapter->cfg80211_wdinfo.is_ro_ch == true) {
|
||||||
//DBG_88E("%s, cancel ro ch timer\n", __func__);
|
//DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||||
//_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
//_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||||
//padapter->cfg80211_wdinfo.is_ro_ch = _FALSE;
|
//padapter->cfg80211_wdinfo.is_ro_ch = false;
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
DBG_88E("%s, extend ro ch time\n", __func__);
|
DBG_88E("%s, extend ro ch time\n", __func__);
|
||||||
_set_timer( &padapter->cfg80211_wdinfo.remain_on_ch_timer, pwdinfo->ext_listen_period);
|
_set_timer( &padapter->cfg80211_wdinfo.remain_on_ch_timer, pwdinfo->ext_listen_period);
|
||||||
|
@ -4343,7 +4343,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
||||||
//update attribute
|
//update attribute
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
pattrib->retry_ctrl = _FALSE;
|
pattrib->retry_ctrl = false;
|
||||||
|
|
||||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||||
|
|
||||||
|
@ -4364,7 +4364,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
||||||
|
|
||||||
pwfd_info = padapter->wdinfo.wfd_info;
|
pwfd_info = padapter->wdinfo.wfd_info;
|
||||||
|
|
||||||
if ( _TRUE == pwfd_info->wfd_enable )
|
if ( true == pwfd_info->wfd_enable )
|
||||||
{
|
{
|
||||||
rtw_append_wfd_ie( padapter, pframe, &pattrib->pktlen );
|
rtw_append_wfd_ie( padapter, pframe, &pattrib->pktlen );
|
||||||
}
|
}
|
||||||
|
@ -4375,7 +4375,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
||||||
|
|
||||||
if (dump_mgntframe_and_wait_ack(padapter, pmgntframe) != _SUCCESS)
|
if (dump_mgntframe_and_wait_ack(padapter, pmgntframe) != _SUCCESS)
|
||||||
{
|
{
|
||||||
ack = _FALSE;
|
ack = false;
|
||||||
ret = _FAIL;
|
ret = _FAIL;
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_CFG80211
|
#ifdef CONFIG_DEBUG_CFG80211
|
||||||
|
@ -4427,7 +4427,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
int tx_ret;
|
int tx_ret;
|
||||||
u32 dump_limit = RTW_MAX_MGMT_TX_CNT;
|
u32 dump_limit = RTW_MAX_MGMT_TX_CNT;
|
||||||
u32 dump_cnt = 0;
|
u32 dump_cnt = 0;
|
||||||
bool ack = _TRUE;
|
bool ack = true;
|
||||||
u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq);
|
u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq);
|
||||||
u8 category, action;
|
u8 category, action;
|
||||||
int type = (-1);
|
int type = (-1);
|
||||||
|
@ -4450,7 +4450,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
cfg80211_action_tx_status(ndev, *cookie, buf, len, ack, GFP_KERNEL);
|
cfg80211_action_tx_status(ndev, *cookie, buf, len, ack, GFP_KERNEL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) {
|
if (rtw_action_frame_parse(buf, len, &category, &action) == false) {
|
||||||
DBG_88E(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev),
|
DBG_88E(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev),
|
||||||
le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl));
|
le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl));
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -4458,7 +4458,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
|
||||||
DBG_88E("RTW_Tx:tx_ch=%d, da="MAC_FMT"\n", tx_ch, MAC_ARG(GetAddr1Ptr(buf)));
|
DBG_88E("RTW_Tx:tx_ch=%d, da="MAC_FMT"\n", tx_ch, MAC_ARG(GetAddr1Ptr(buf)));
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
if ((type = rtw_p2p_check_frames(padapter, buf, len, _TRUE)) >= 0)
|
if ((type = rtw_p2p_check_frames(padapter, buf, len, true)) >= 0)
|
||||||
goto dump;
|
goto dump;
|
||||||
#endif
|
#endif
|
||||||
if (category == RTW_WLAN_CATEGORY_PUBLIC)
|
if (category == RTW_WLAN_CATEGORY_PUBLIC)
|
||||||
|
@ -4555,7 +4555,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
|
||||||
_rtw_memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen);
|
_rtw_memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen);
|
||||||
pmlmepriv->wps_beacon_ie_len = wps_ielen;
|
pmlmepriv->wps_beacon_ie_len = wps_ielen;
|
||||||
|
|
||||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE);
|
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4618,7 +4618,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
|
||||||
}
|
}
|
||||||
#endif //CONFIG_WFD
|
#endif //CONFIG_WFD
|
||||||
|
|
||||||
pmlmeext->bstart_bss = _TRUE;
|
pmlmeext->bstart_bss = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4692,7 +4692,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
if ((p2p_ie=rtw_get_p2p_ie(buf, len, NULL, &p2p_ielen)))
|
if ((p2p_ie=rtw_get_p2p_ie(buf, len, NULL, &p2p_ielen)))
|
||||||
{
|
{
|
||||||
u8 is_GO = _FALSE;
|
u8 is_GO = false;
|
||||||
u32 attr_contentlen = 0;
|
u32 attr_contentlen = 0;
|
||||||
u16 cap_attr=0;
|
u16 cap_attr=0;
|
||||||
|
|
||||||
|
@ -4708,14 +4708,14 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
||||||
cap_attr = le16_to_cpu(cap_attr);
|
cap_attr = le16_to_cpu(cap_attr);
|
||||||
grp_cap = (u8)((cap_attr >> 8)&0xff);
|
grp_cap = (u8)((cap_attr >> 8)&0xff);
|
||||||
|
|
||||||
is_GO = (grp_cap&BIT(0)) ? _TRUE:_FALSE;
|
is_GO = (grp_cap&BIT(0)) ? true:false;
|
||||||
|
|
||||||
if (is_GO)
|
if (is_GO)
|
||||||
DBG_88E("Got P2P Capability Attr, grp_cap=0x%x, is_GO\n", grp_cap);
|
DBG_88E("Got P2P Capability Attr, grp_cap=0x%x, is_GO\n", grp_cap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (is_GO == _FALSE)
|
if (is_GO == false)
|
||||||
{
|
{
|
||||||
if (pmlmepriv->p2p_probe_resp_ie)
|
if (pmlmepriv->p2p_probe_resp_ie)
|
||||||
{
|
{
|
||||||
|
@ -4926,7 +4926,7 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum
|
||||||
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
|
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
|
||||||
#define MAX_BIT_RATE_40MHZ_MCS7 150 /* Mbps */
|
#define MAX_BIT_RATE_40MHZ_MCS7 150 /* Mbps */
|
||||||
|
|
||||||
ht_cap->ht_supported = _TRUE;
|
ht_cap->ht_supported = true;
|
||||||
|
|
||||||
ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
||||||
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20 |
|
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20 |
|
||||||
|
@ -5093,16 +5093,16 @@ int rtw_wdev_alloc(_adapter *padapter, struct device *dev)
|
||||||
pwdev_priv->scan_request = NULL;
|
pwdev_priv->scan_request = NULL;
|
||||||
_rtw_spinlock_init(&pwdev_priv->scan_req_lock);
|
_rtw_spinlock_init(&pwdev_priv->scan_req_lock);
|
||||||
|
|
||||||
pwdev_priv->p2p_enabled = _FALSE;
|
pwdev_priv->p2p_enabled = false;
|
||||||
pwdev_priv->provdisc_req_issued = _FALSE;
|
pwdev_priv->provdisc_req_issued = false;
|
||||||
rtw_wdev_invit_info_init(&pwdev_priv->invit_info);
|
rtw_wdev_invit_info_init(&pwdev_priv->invit_info);
|
||||||
|
|
||||||
pwdev_priv->bandroid_scan = _FALSE;
|
pwdev_priv->bandroid_scan = false;
|
||||||
|
|
||||||
if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE)
|
if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE)
|
||||||
pwdev_priv->power_mgmt = _TRUE;
|
pwdev_priv->power_mgmt = true;
|
||||||
else
|
else
|
||||||
pwdev_priv->power_mgmt = _FALSE;
|
pwdev_priv->power_mgmt = false;
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 1);
|
ATOMIC_SET(&pwdev_priv->switch_ch_to, 1);
|
||||||
|
@ -5168,7 +5168,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
|
||||||
|
|
||||||
pwdev_priv = wdev_to_priv(wdev);
|
pwdev_priv = wdev_to_priv(wdev);
|
||||||
|
|
||||||
rtw_cfg80211_indicate_scan_done(pwdev_priv, _TRUE);
|
rtw_cfg80211_indicate_scan_done(pwdev_priv, true);
|
||||||
|
|
||||||
if (pwdev_priv->pmon_ndev) {
|
if (pwdev_priv->pmon_ndev) {
|
||||||
DBG_88E("%s, unregister monitor interface\n", __func__);
|
DBG_88E("%s, unregister monitor interface\n", __func__);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -137,7 +137,7 @@ int rtw_bt_sco = 3;// 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy, 5.Other
|
||||||
int rtw_bt_ampdu =1 ;// 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU.
|
int rtw_bt_ampdu =1 ;// 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rtw_AcceptAddbaReq = _TRUE;// 0:Reject AP's Add BA req, 1:Accept AP's Add BA req.
|
int rtw_AcceptAddbaReq = true;// 0:Reject AP's Add BA req, 1:Accept AP's Add BA req.
|
||||||
|
|
||||||
int rtw_antdiv_cfg = 2; // 0:OFF , 1:ON, 2:decide by Efuse config
|
int rtw_antdiv_cfg = 2; // 0:OFF , 1:ON, 2:decide by Efuse config
|
||||||
int rtw_antdiv_type = 0 ; //0:decide by efuse 1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2: for 88EE, 1Tx and 2Rx are diversity.( 2 Ant, Tx and RxCG are both on aux port, RxCS is on main port ), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port)
|
int rtw_antdiv_type = 0 ; //0:decide by efuse 1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2: for 88EE, 1Tx and 2Rx are diversity.( 2 Ant, Tx and RxCG are both on aux port, RxCS is on main port ), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port)
|
||||||
|
@ -791,7 +791,7 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||||
struct sockaddr *addr = p;
|
struct sockaddr *addr = p;
|
||||||
|
|
||||||
if (padapter->bup == _FALSE)
|
if (padapter->bup == false)
|
||||||
_rtw_memcpy(padapter->eeprompriv.mac_addr, addr->sa_data, ETH_ALEN);
|
_rtw_memcpy(padapter->eeprompriv.mac_addr, addr->sa_data, ETH_ALEN);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1014,7 +1014,7 @@ u32 rtw_start_drv_threads(_adapter *padapter)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (padapter->isprimary == _TRUE)
|
if (padapter->isprimary == true)
|
||||||
#endif //CONFIG_CONCURRENT_MODE
|
#endif //CONFIG_CONCURRENT_MODE
|
||||||
{
|
{
|
||||||
padapter->cmdThread = kthread_run(rtw_cmd_thread, padapter, "RTW_CMD_THREAD");
|
padapter->cmdThread = kthread_run(rtw_cmd_thread, padapter, "RTW_CMD_THREAD");
|
||||||
|
@ -1040,7 +1040,7 @@ void rtw_stop_drv_threads (_adapter *padapter)
|
||||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_stop_drv_threads\n"));
|
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_stop_drv_threads\n"));
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
if (padapter->isprimary == _TRUE)
|
if (padapter->isprimary == true)
|
||||||
#endif //CONFIG_CONCURRENT_MODE
|
#endif //CONFIG_CONCURRENT_MODE
|
||||||
{
|
{
|
||||||
//Below is to termindate rtw_cmd_thread & event_thread...
|
//Below is to termindate rtw_cmd_thread & event_thread...
|
||||||
|
@ -1092,7 +1092,7 @@ u8 rtw_init_default_value(_adapter *padapter)
|
||||||
|
|
||||||
//ht_priv
|
//ht_priv
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
pmlmepriv->htpriv.ampdu_enable = _FALSE;//set to disabled
|
pmlmepriv->htpriv.ampdu_enable = false;//set to disabled
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//security_priv
|
//security_priv
|
||||||
|
@ -1115,8 +1115,8 @@ u8 rtw_init_default_value(_adapter *padapter)
|
||||||
rtw_hal_def_value_init(padapter);
|
rtw_hal_def_value_init(padapter);
|
||||||
|
|
||||||
//misc.
|
//misc.
|
||||||
padapter->bReadPortCancel = _FALSE;
|
padapter->bReadPortCancel = false;
|
||||||
padapter->bWritePortCancel = _FALSE;
|
padapter->bWritePortCancel = false;
|
||||||
padapter->bRxRSSIDisplay = 0;
|
padapter->bRxRSSIDisplay = 0;
|
||||||
padapter->bNotifyChannelChange = 0;
|
padapter->bNotifyChannelChange = 0;
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
@ -1133,15 +1133,15 @@ u8 rtw_reset_drv_sw(_adapter *padapter)
|
||||||
|
|
||||||
//hal_priv
|
//hal_priv
|
||||||
rtw_hal_def_value_init(padapter);
|
rtw_hal_def_value_init(padapter);
|
||||||
padapter->bReadPortCancel = _FALSE;
|
padapter->bReadPortCancel = false;
|
||||||
padapter->bWritePortCancel = _FALSE;
|
padapter->bWritePortCancel = false;
|
||||||
padapter->bRxRSSIDisplay = 0;
|
padapter->bRxRSSIDisplay = 0;
|
||||||
pmlmepriv->scan_interval = SCAN_INTERVAL;// 30*2 sec = 60sec
|
pmlmepriv->scan_interval = SCAN_INTERVAL;// 30*2 sec = 60sec
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY |_FW_UNDER_LINKING);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY |_FW_UNDER_LINKING);
|
||||||
|
|
||||||
|
@ -1422,16 +1422,16 @@ int _netdev_if2_open(struct net_device *pnetdev)
|
||||||
|
|
||||||
DBG_88E("+88eu_drv - if2_open, bup=%d\n", padapter->bup);
|
DBG_88E("+88eu_drv - if2_open, bup=%d\n", padapter->bup);
|
||||||
|
|
||||||
if (primary_padapter->bup == _FALSE || primary_padapter->hw_init_completed == _FALSE)
|
if (primary_padapter->bup == false || primary_padapter->hw_init_completed == false)
|
||||||
_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 &&
|
||||||
primary_padapter->hw_init_completed == _TRUE) {
|
primary_padapter->hw_init_completed == true) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
padapter->bDriverStopped = _FALSE;
|
padapter->bDriverStopped = false;
|
||||||
padapter->bSurpriseRemoved = _FALSE;
|
padapter->bSurpriseRemoved = false;
|
||||||
padapter->bCardDisableWOHSM = _FALSE;
|
padapter->bCardDisableWOHSM = false;
|
||||||
|
|
||||||
rtw_hal_clone_data(padapter, primary_padapter);
|
rtw_hal_clone_data(padapter, primary_padapter);
|
||||||
|
|
||||||
|
@ -1443,7 +1443,7 @@ int _netdev_if2_open(struct net_device *pnetdev)
|
||||||
if (padapter->intf_start)
|
if (padapter->intf_start)
|
||||||
padapter->intf_start(padapter);
|
padapter->intf_start(padapter);
|
||||||
|
|
||||||
padapter->hw_init_completed = _TRUE;
|
padapter->hw_init_completed = true;
|
||||||
|
|
||||||
padapter->dir_dev = NULL;
|
padapter->dir_dev = NULL;
|
||||||
rtw_proc_init_one(pnetdev);
|
rtw_proc_init_one(pnetdev);
|
||||||
|
@ -1452,9 +1452,9 @@ int _netdev_if2_open(struct net_device *pnetdev)
|
||||||
rtw_cfg80211_init_wiphy(padapter);
|
rtw_cfg80211_init_wiphy(padapter);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
padapter->bup = _TRUE;
|
padapter->bup = true;
|
||||||
}
|
}
|
||||||
padapter->net_closed = _FALSE;
|
padapter->net_closed = false;
|
||||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||||
if (!rtw_netif_queue_stopped(pnetdev))
|
if (!rtw_netif_queue_stopped(pnetdev))
|
||||||
rtw_netif_start_queue(pnetdev);
|
rtw_netif_start_queue(pnetdev);
|
||||||
|
@ -1466,7 +1466,7 @@ int _netdev_if2_open(struct net_device *pnetdev)
|
||||||
|
|
||||||
netdev_if2_open_error:
|
netdev_if2_open_error:
|
||||||
|
|
||||||
padapter->bup = _FALSE;
|
padapter->bup = false;
|
||||||
|
|
||||||
netif_carrier_off(pnetdev);
|
netif_carrier_off(pnetdev);
|
||||||
rtw_netif_stop_queue(pnetdev);
|
rtw_netif_stop_queue(pnetdev);
|
||||||
|
@ -1489,7 +1489,7 @@ static int netdev_if2_close(struct net_device *pnetdev)
|
||||||
{
|
{
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||||
|
|
||||||
padapter->net_closed = _TRUE;
|
padapter->net_closed = true;
|
||||||
|
|
||||||
if (pnetdev) {
|
if (pnetdev) {
|
||||||
if (!rtw_netif_queue_stopped(pnetdev))
|
if (!rtw_netif_queue_stopped(pnetdev))
|
||||||
|
@ -1498,7 +1498,7 @@ static int netdev_if2_close(struct net_device *pnetdev)
|
||||||
|
|
||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
rtw_scan_abort(padapter);
|
rtw_scan_abort(padapter);
|
||||||
wdev_to_priv(padapter->rtw_wdev)->bandroid_scan = _FALSE;
|
wdev_to_priv(padapter->rtw_wdev)->bandroid_scan = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1552,13 +1552,13 @@ _adapter *rtw_drv_if2_init(_adapter *primary_padapter, char *name,
|
||||||
padapter->psetbw_mutex = primary_padapter->psetbw_mutex;
|
padapter->psetbw_mutex = primary_padapter->psetbw_mutex;
|
||||||
padapter->hw_init_mutex = primary_padapter->hw_init_mutex;
|
padapter->hw_init_mutex = primary_padapter->hw_init_mutex;
|
||||||
|
|
||||||
padapter->bup = _FALSE;
|
padapter->bup = false;
|
||||||
padapter->net_closed = _TRUE;
|
padapter->net_closed = true;
|
||||||
padapter->hw_init_completed = _FALSE;
|
padapter->hw_init_completed = false;
|
||||||
|
|
||||||
|
|
||||||
//set adapter_type/iface type
|
//set adapter_type/iface type
|
||||||
padapter->isprimary = _FALSE;
|
padapter->isprimary = false;
|
||||||
padapter->adapter_type = SECONDARY_ADAPTER;
|
padapter->adapter_type = SECONDARY_ADAPTER;
|
||||||
padapter->pbuddy_adapter = primary_padapter;
|
padapter->pbuddy_adapter = primary_padapter;
|
||||||
#ifndef CONFIG_HWPORT_SWAP //Port0 -> Pri , Port1 -> Sec
|
#ifndef CONFIG_HWPORT_SWAP //Port0 -> Pri , Port1 -> Sec
|
||||||
|
@ -1715,8 +1715,8 @@ void rtw_drv_if2_stop(_adapter *if2)
|
||||||
|
|
||||||
rtw_cancel_all_timer(padapter);
|
rtw_cancel_all_timer(padapter);
|
||||||
|
|
||||||
if (padapter->bup == _TRUE) {
|
if (padapter->bup == true) {
|
||||||
padapter->bDriverStopped = _TRUE;
|
padapter->bDriverStopped = 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);
|
||||||
|
@ -1727,7 +1727,7 @@ void rtw_drv_if2_stop(_adapter *if2)
|
||||||
|
|
||||||
rtw_stop_drv_threads(padapter);
|
rtw_stop_drv_threads(padapter);
|
||||||
|
|
||||||
padapter->bup = _FALSE;
|
padapter->bup = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
|
@ -1795,15 +1795,15 @@ int _netdev_open(struct net_device *pnetdev)
|
||||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+88eu_drv - dev_open\n"));
|
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+88eu_drv - dev_open\n"));
|
||||||
DBG_88E("+88eu_drv - drv_open, bup=%d\n", padapter->bup);
|
DBG_88E("+88eu_drv - drv_open, bup=%d\n", padapter->bup);
|
||||||
|
|
||||||
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) {
|
||||||
padapter->bDriverStopped = _FALSE;
|
padapter->bDriverStopped = false;
|
||||||
padapter->bSurpriseRemoved = _FALSE;
|
padapter->bSurpriseRemoved = false;
|
||||||
padapter->bCardDisableWOHSM = _FALSE;
|
padapter->bCardDisableWOHSM = false;
|
||||||
|
|
||||||
status = rtw_hal_init(padapter);
|
status = rtw_hal_init(padapter);
|
||||||
if (status ==_FAIL) {
|
if (status ==_FAIL) {
|
||||||
|
@ -1843,13 +1843,13 @@ int _netdev_open(struct net_device *pnetdev)
|
||||||
#endif
|
#endif
|
||||||
rtw_led_control(padapter, LED_CTL_NO_LINK);
|
rtw_led_control(padapter, LED_CTL_NO_LINK);
|
||||||
|
|
||||||
padapter->bup = _TRUE;
|
padapter->bup = true;
|
||||||
}
|
}
|
||||||
padapter->net_closed = _FALSE;
|
padapter->net_closed = false;
|
||||||
|
|
||||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||||
|
|
||||||
padapter->pwrctrlpriv.bips_processing = _FALSE;
|
padapter->pwrctrlpriv.bips_processing = false;
|
||||||
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
|
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
|
||||||
|
|
||||||
if (!rtw_netif_queue_stopped(pnetdev))
|
if (!rtw_netif_queue_stopped(pnetdev))
|
||||||
|
@ -1866,7 +1866,7 @@ netdev_open_normal_process:
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
{
|
{
|
||||||
_adapter *sec_adapter = padapter->pbuddy_adapter;
|
_adapter *sec_adapter = padapter->pbuddy_adapter;
|
||||||
if (sec_adapter && (sec_adapter->bup == _FALSE || sec_adapter->hw_init_completed == _FALSE))
|
if (sec_adapter && (sec_adapter->bup == false || sec_adapter->hw_init_completed == false))
|
||||||
_netdev_if2_open(sec_adapter->pnetdev);
|
_netdev_if2_open(sec_adapter->pnetdev);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1878,7 +1878,7 @@ netdev_open_normal_process:
|
||||||
|
|
||||||
netdev_open_error:
|
netdev_open_error:
|
||||||
|
|
||||||
padapter->bup = _FALSE;
|
padapter->bup = false;
|
||||||
|
|
||||||
netif_carrier_off(pnetdev);
|
netif_carrier_off(pnetdev);
|
||||||
rtw_netif_stop_queue(pnetdev);
|
rtw_netif_stop_queue(pnetdev);
|
||||||
|
@ -1905,12 +1905,12 @@ int netdev_open(struct net_device *pnetdev)
|
||||||
int ips_netdrv_open(_adapter *padapter)
|
int ips_netdrv_open(_adapter *padapter)
|
||||||
{
|
{
|
||||||
int status = _SUCCESS;
|
int status = _SUCCESS;
|
||||||
padapter->net_closed = _FALSE;
|
padapter->net_closed = false;
|
||||||
DBG_88E("===> %s.........\n",__func__);
|
DBG_88E("===> %s.........\n",__func__);
|
||||||
|
|
||||||
padapter->bDriverStopped = _FALSE;
|
padapter->bDriverStopped = false;
|
||||||
padapter->bSurpriseRemoved = _FALSE;
|
padapter->bSurpriseRemoved = false;
|
||||||
padapter->bCardDisableWOHSM = _FALSE;
|
padapter->bCardDisableWOHSM = false;
|
||||||
|
|
||||||
status = rtw_hal_init(padapter);
|
status = rtw_hal_init(padapter);
|
||||||
if (status ==_FAIL) {
|
if (status ==_FAIL) {
|
||||||
|
@ -1953,13 +1953,13 @@ void rtw_ips_pwr_down(_adapter *padapter)
|
||||||
u32 start_time = rtw_get_current_time();
|
u32 start_time = rtw_get_current_time();
|
||||||
DBG_88E("===> rtw_ips_pwr_down...................\n");
|
DBG_88E("===> rtw_ips_pwr_down...................\n");
|
||||||
|
|
||||||
padapter->bCardDisableWOHSM = _TRUE;
|
padapter->bCardDisableWOHSM = true;
|
||||||
padapter->net_closed = _TRUE;
|
padapter->net_closed = true;
|
||||||
|
|
||||||
rtw_led_control(padapter, LED_CTL_POWER_OFF);
|
rtw_led_control(padapter, LED_CTL_POWER_OFF);
|
||||||
|
|
||||||
rtw_ips_dev_unload(padapter);
|
rtw_ips_dev_unload(padapter);
|
||||||
padapter->bCardDisableWOHSM = _FALSE;
|
padapter->bCardDisableWOHSM = false;
|
||||||
DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
|
DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1976,7 +1976,7 @@ void rtw_ips_dev_unload(_adapter *padapter)
|
||||||
padapter->intf_stop(padapter);
|
padapter->intf_stop(padapter);
|
||||||
|
|
||||||
//s5.
|
//s5.
|
||||||
if (padapter->bSurpriseRemoved == _FALSE)
|
if (padapter->bSurpriseRemoved == false)
|
||||||
rtw_hal_deinit(padapter);
|
rtw_hal_deinit(padapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2005,7 +2005,7 @@ int pm_netdev_open(struct net_device *pnetdev,u8 bnormal)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (_TRUE == bnormal)
|
if (true == bnormal)
|
||||||
status = netdev_open(pnetdev);
|
status = netdev_open(pnetdev);
|
||||||
#ifdef CONFIG_IPS
|
#ifdef CONFIG_IPS
|
||||||
else
|
else
|
||||||
|
@ -2021,11 +2021,11 @@ static int netdev_close(struct net_device *pnetdev)
|
||||||
|
|
||||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+88eu_drv - drv_close\n"));
|
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+88eu_drv - drv_close\n"));
|
||||||
|
|
||||||
if (padapter->pwrctrlpriv.bInternalAutoSuspend == _TRUE) {
|
if (padapter->pwrctrlpriv.bInternalAutoSuspend == true) {
|
||||||
if (padapter->pwrctrlpriv.rf_pwrstate == rf_off)
|
if (padapter->pwrctrlpriv.rf_pwrstate == rf_off)
|
||||||
padapter->pwrctrlpriv.ps_flag = _TRUE;
|
padapter->pwrctrlpriv.ps_flag = true;
|
||||||
}
|
}
|
||||||
padapter->net_closed = _TRUE;
|
padapter->net_closed = true;
|
||||||
|
|
||||||
if (padapter->pwrctrlpriv.rf_pwrstate == rf_on){
|
if (padapter->pwrctrlpriv.rf_pwrstate == rf_on){
|
||||||
DBG_88E("(2)88eu_drv - drv_close, bup=%d, hw_init_completed=%d\n", padapter->bup, padapter->hw_init_completed);
|
DBG_88E("(2)88eu_drv - drv_close, bup=%d, hw_init_completed=%d\n", padapter->bup, padapter->hw_init_completed);
|
||||||
|
@ -2039,13 +2039,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);
|
rtw_indicate_disconnect(padapter);
|
||||||
//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);
|
||||||
|
@ -2057,15 +2057,15 @@ static int netdev_close(struct net_device *pnetdev)
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
if (wdev_to_priv(padapter->rtw_wdev)->p2p_enabled == _TRUE)
|
if (wdev_to_priv(padapter->rtw_wdev)->p2p_enabled == true)
|
||||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = _FALSE;
|
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = false;
|
||||||
#endif
|
#endif
|
||||||
rtw_p2p_enable(padapter, P2P_ROLE_DISABLE);
|
rtw_p2p_enable(padapter, P2P_ROLE_DISABLE);
|
||||||
#endif //CONFIG_P2P
|
#endif //CONFIG_P2P
|
||||||
|
|
||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
rtw_scan_abort(padapter);
|
rtw_scan_abort(padapter);
|
||||||
wdev_to_priv(padapter->rtw_wdev)->bandroid_scan = _FALSE;
|
wdev_to_priv(padapter->rtw_wdev)->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
|
||||||
|
|
||||||
|
|
|
@ -153,9 +153,9 @@ int _rtw_memcmp(void *dst, 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_memset(void *pbuf, int c, u32 sz)
|
void _rtw_memset(void *pbuf, int c, u32 sz)
|
||||||
|
@ -176,9 +176,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)
|
||||||
|
@ -276,9 +276,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 rtw_get_current_time(void)
|
u32 rtw_get_current_time(void)
|
||||||
|
@ -650,14 +650,14 @@ static int storeToFile(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(char *path)
|
int rtw_is_file_readable(char *path)
|
||||||
{
|
{
|
||||||
if (isFileReadable(path) == 0)
|
if (isFileReadable(path) == 0)
|
||||||
return _TRUE;
|
return true;
|
||||||
else
|
else
|
||||||
return _FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -892,22 +892,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -916,7 +916,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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -68,7 +68,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;
|
||||||
|
@ -76,7 +76,7 @@ int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf)
|
||||||
|
|
||||||
precvbuf->pskb = NULL;
|
precvbuf->pskb = NULL;
|
||||||
|
|
||||||
precvbuf->reuse = _FALSE;
|
precvbuf->reuse = false;
|
||||||
|
|
||||||
precvbuf->pallocated_buf = precvbuf->pbuf = NULL;
|
precvbuf->pallocated_buf = precvbuf->pbuf = NULL;
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ void rtw_handle_tkip_mic_err(_adapter *padapter,u8 bgroup)
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ _func_enter_;
|
||||||
("skb->head=%p skb->data=%p skb->tail=%p skb->end=%p skb->len=%d\n",
|
("skb->head=%p skb->data=%p skb->tail=%p skb->end=%p skb->len=%d\n",
|
||||||
skb->head, skb->data, skb_tail_pointer(skb), skb_end_pointer(skb), skb->len));
|
skb->head, skb->data, skb_tail_pointer(skb), skb_end_pointer(skb), skb->len));
|
||||||
|
|
||||||
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;
|
||||||
|
@ -304,7 +304,7 @@ _func_enter_;
|
||||||
|
|
||||||
//DBG_88E("bmcast=%d\n", bmcast);
|
//DBG_88E("bmcast=%d\n", bmcast);
|
||||||
|
|
||||||
if (_rtw_memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)==_FALSE) {
|
if (_rtw_memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)==false) {
|
||||||
if (bmcast) {
|
if (bmcast) {
|
||||||
psta = rtw_get_bcmc_stainfo(padapter);
|
psta = rtw_get_bcmc_stainfo(padapter);
|
||||||
pskb2 = skb_clone(skb, GFP_ATOMIC);
|
pskb2 = skb_clone(skb, GFP_ATOMIC);
|
||||||
|
@ -351,7 +351,7 @@ _func_enter_;
|
||||||
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) )
|
||||||
{
|
{
|
||||||
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
||||||
if (nat25_handle_frame(padapter, skb) == -1) {
|
if (nat25_handle_frame(padapter, skb) == -1) {
|
||||||
|
@ -424,9 +424,9 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
|
||||||
dev_kfree_skb_any(precvbuf->pskb);
|
dev_kfree_skb_any(precvbuf->pskb);
|
||||||
|
|
||||||
precvbuf->pskb = NULL;
|
precvbuf->pskb = NULL;
|
||||||
precvbuf->reuse = _FALSE;
|
precvbuf->reuse = false;
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ typedef struct 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;
|
||||||
|
|
||||||
|
|
||||||
#ifdef PNO_SUPPORT
|
#ifdef PNO_SUPPORT
|
||||||
|
@ -244,7 +244,7 @@ int rtw_android_get_rssi(struct net_device *net, char *command, int total_len)
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,7 @@ int rtw_android_set_block(struct net_device *net, char *command, int total_len)
|
||||||
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
|
||||||
wdev_to_priv(adapter->rtw_wdev)->block = (*block_value=='0')?_FALSE:_TRUE;
|
wdev_to_priv(adapter->rtw_wdev)->block = (*block_value=='0')?false:true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -395,7 +395,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_TITANIA12
|
#ifdef CONFIG_PLATFORM_MSTAR_TITANIA12
|
||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
(wdev_to_priv(net->ieee80211_ptr))->bandroid_scan = _TRUE;
|
(wdev_to_priv(net->ieee80211_ptr))->bandroid_scan = true;
|
||||||
#endif //CONFIG_IOCTL_CFG80211
|
#endif //CONFIG_IOCTL_CFG80211
|
||||||
#endif //CONFIG_PLATFORM_MSTAR_TITANIA12
|
#endif //CONFIG_PLATFORM_MSTAR_TITANIA12
|
||||||
break;
|
break;
|
||||||
|
@ -496,7 +496,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||||
_adapter* padapter = ( _adapter * ) rtw_netdev_priv(net);
|
_adapter* padapter = ( _adapter * ) rtw_netdev_priv(net);
|
||||||
|
|
||||||
pwfd_info = &padapter->wfd_info;
|
pwfd_info = &padapter->wfd_info;
|
||||||
pwfd_info->wfd_enable = _TRUE;
|
pwfd_info->wfd_enable = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,7 +510,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||||
_adapter* padapter = ( _adapter * ) rtw_netdev_priv(net);
|
_adapter* padapter = ( _adapter * ) rtw_netdev_priv(net);
|
||||||
|
|
||||||
pwfd_info = &padapter->wfd_info;
|
pwfd_info = &padapter->wfd_info;
|
||||||
pwfd_info->wfd_enable = _FALSE;
|
pwfd_info->wfd_enable = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ANDROID_WIFI_CMD_WFD_SET_TCPPORT:
|
case ANDROID_WIFI_CMD_WFD_SET_TCPPORT:
|
||||||
|
|
|
@ -559,10 +559,10 @@ _func_enter_;
|
||||||
DBG_88E("nr_endpoint=%d, in_num=%d, out_num=%d\n\n", pdvobjpriv->nr_endpoint, pdvobjpriv->RtNumInPipes, pdvobjpriv->RtNumOutPipes);
|
DBG_88E("nr_endpoint=%d, in_num=%d, out_num=%d\n\n", pdvobjpriv->nr_endpoint, pdvobjpriv->RtNumInPipes, pdvobjpriv->RtNumOutPipes);
|
||||||
|
|
||||||
if (pusbd->speed == USB_SPEED_HIGH) {
|
if (pusbd->speed == USB_SPEED_HIGH) {
|
||||||
pdvobjpriv->ishighspeed = _TRUE;
|
pdvobjpriv->ishighspeed = true;
|
||||||
DBG_88E("USB_SPEED_HIGH\n");
|
DBG_88E("USB_SPEED_HIGH\n");
|
||||||
} else {
|
} else {
|
||||||
pdvobjpriv->ishighspeed = _FALSE;
|
pdvobjpriv->ishighspeed = false;
|
||||||
DBG_88E("NON USB_SPEED_HIGH\n");
|
DBG_88E("NON USB_SPEED_HIGH\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,11 +641,11 @@ static void usb_intf_stop(_adapter *padapter)
|
||||||
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+usb_intf_stop\n"));
|
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+usb_intf_stop\n"));
|
||||||
|
|
||||||
//disabel_hw_interrupt
|
//disabel_hw_interrupt
|
||||||
if (padapter->bSurpriseRemoved == _FALSE)
|
if (padapter->bSurpriseRemoved == false)
|
||||||
{
|
{
|
||||||
//device still exists, so driver can do i/o operation
|
//device still exists, so driver can do i/o operation
|
||||||
//TODO:
|
//TODO:
|
||||||
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("SurpriseRemoved==_FALSE\n"));
|
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("SurpriseRemoved==false\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//cancel in irp
|
//cancel in irp
|
||||||
|
@ -666,11 +666,11 @@ static void rtw_dev_unload(_adapter *padapter)
|
||||||
u8 val8;
|
u8 val8;
|
||||||
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+rtw_dev_unload\n"));
|
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+rtw_dev_unload\n"));
|
||||||
|
|
||||||
if (padapter->bup == _TRUE)
|
if (padapter->bup == true)
|
||||||
{
|
{
|
||||||
DBG_88E("===> rtw_dev_unload\n");
|
DBG_88E("===> rtw_dev_unload\n");
|
||||||
|
|
||||||
padapter->bDriverStopped = _TRUE;
|
padapter->bDriverStopped = 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);
|
||||||
|
@ -688,29 +688,29 @@ static void rtw_dev_unload(_adapter *padapter)
|
||||||
|
|
||||||
|
|
||||||
//s5.
|
//s5.
|
||||||
if (padapter->bSurpriseRemoved == _FALSE)
|
if (padapter->bSurpriseRemoved == false)
|
||||||
{
|
{
|
||||||
//DBG_88E("r871x_dev_unload()->rtl871x_hal_deinit()\n");
|
//DBG_88E("r871x_dev_unload()->rtl871x_hal_deinit()\n");
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
if ((padapter->pwrctrlpriv.bSupportRemoteWakeup==_TRUE)&&(padapter->pwrctrlpriv.wowlan_mode==_TRUE)){
|
if ((padapter->pwrctrlpriv.bSupportRemoteWakeup==true)&&(padapter->pwrctrlpriv.wowlan_mode==true)){
|
||||||
DBG_88E("%s bSupportWakeOnWlan==_TRUE do not run rtw_hal_deinit()\n",__func__);
|
DBG_88E("%s bSupportWakeOnWlan==true do not run rtw_hal_deinit()\n",__func__);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif //CONFIG_WOWLAN
|
#endif //CONFIG_WOWLAN
|
||||||
{
|
{
|
||||||
rtw_hal_deinit(padapter);
|
rtw_hal_deinit(padapter);
|
||||||
}
|
}
|
||||||
padapter->bSurpriseRemoved = _TRUE;
|
padapter->bSurpriseRemoved = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
padapter->bup = _FALSE;
|
padapter->bup = false;
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
padapter->hw_init_completed=_FALSE;
|
padapter->hw_init_completed=false;
|
||||||
#endif //CONFIG_WOWLAN
|
#endif //CONFIG_WOWLAN
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("r871x_dev_unload():padapter->bup == _FALSE\n" ));
|
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("r871x_dev_unload():padapter->bup == false\n" ));
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_88E("<=== rtw_dev_unload\n");
|
DBG_88E("<=== rtw_dev_unload\n");
|
||||||
|
@ -777,8 +777,8 @@ int rtw_hw_suspend(_adapter *padapter )
|
||||||
|
|
||||||
DBG_88E("==> rtw_hw_suspend\n");
|
DBG_88E("==> 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)
|
||||||
{
|
{
|
||||||
|
@ -787,7 +787,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);
|
||||||
|
@ -813,12 +813,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);
|
||||||
}
|
}
|
||||||
|
@ -846,10 +846,10 @@ int rtw_hw_resume(_adapter *padapter)
|
||||||
{
|
{
|
||||||
DBG_88E("==> rtw_hw_resume\n");
|
DBG_88E("==> 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;
|
||||||
|
@ -863,11 +863,11 @@ int rtw_hw_resume(_adapter *padapter)
|
||||||
else
|
else
|
||||||
netif_wake_queue(pnetdev);
|
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);
|
||||||
}
|
}
|
||||||
|
@ -906,9 +906,9 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
||||||
|
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||||
padapter->pwrctrlpriv.wowlan_mode = _TRUE;
|
padapter->pwrctrlpriv.wowlan_mode = true;
|
||||||
else
|
else
|
||||||
padapter->pwrctrlpriv.wowlan_mode = _FALSE;
|
padapter->pwrctrlpriv.wowlan_mode = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((!padapter->bup) || (padapter->bDriverStopped)||(padapter->bSurpriseRemoved))
|
if ((!padapter->bup) || (padapter->bDriverStopped)||(padapter->bSurpriseRemoved))
|
||||||
|
@ -925,19 +925,19 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
||||||
// 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) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable ))
|
if ((padapter->bFWReady) && ( padapter->pwrctrlpriv.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);
|
||||||
//rtl8192c_set_FwSelectSuspend_cmd(padapter,_TRUE ,500);//note fw to support hw power down ping detect
|
//rtl8192c_set_FwSelectSuspend_cmd(padapter,true ,500);//note fw to support hw power down ping detect
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
pwrpriv->bInSuspend = _TRUE;
|
pwrpriv->bInSuspend = true;
|
||||||
rtw_cancel_all_timer(padapter);
|
rtw_cancel_all_timer(padapter);
|
||||||
LeaveAllPowerSaveMode(padapter);
|
LeaveAllPowerSaveMode(padapter);
|
||||||
|
|
||||||
_enter_pwrlock(&pwrpriv->lock);
|
_enter_pwrlock(&pwrpriv->lock);
|
||||||
//padapter->net_closed = _TRUE;
|
//padapter->net_closed = true;
|
||||||
//s1.
|
//s1.
|
||||||
if (pnetdev)
|
if (pnetdev)
|
||||||
{
|
{
|
||||||
|
@ -946,7 +946,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
if (padapter->pwrctrlpriv.bSupportRemoteWakeup==_TRUE&&padapter->pwrctrlpriv.wowlan_mode==_TRUE){
|
if (padapter->pwrctrlpriv.bSupportRemoteWakeup==true&&padapter->pwrctrlpriv.wowlan_mode==true){
|
||||||
//set H2C command
|
//set H2C command
|
||||||
poidparam.subcode=WOWLAN_ENABLE;
|
poidparam.subcode=WOWLAN_ENABLE;
|
||||||
padapter->HalFunc.SetHwRegHandler(padapter,HW_VAR_WOWLAN,(u8 *)&poidparam);
|
padapter->HalFunc.SetHwRegHandler(padapter,HW_VAR_WOWLAN,(u8 *)&poidparam);
|
||||||
|
@ -955,7 +955,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
//s2.
|
//s2.
|
||||||
rtw_disassoc_cmd(padapter, 0, _FALSE);
|
rtw_disassoc_cmd(padapter, 0, false);
|
||||||
}
|
}
|
||||||
#endif //CONFIG_WOWLAN
|
#endif //CONFIG_WOWLAN
|
||||||
|
|
||||||
|
@ -980,12 +980,12 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
||||||
if (!pwrpriv->bInternalAutoSuspend )
|
if (!pwrpriv->bInternalAutoSuspend )
|
||||||
#endif
|
#endif
|
||||||
//s2-4.
|
//s2-4.
|
||||||
rtw_free_network_queue(padapter, _TRUE);
|
rtw_free_network_queue(padapter, true);
|
||||||
|
|
||||||
rtw_dev_unload(padapter);
|
rtw_dev_unload(padapter);
|
||||||
#ifdef CONFIG_AUTOSUSPEND
|
#ifdef CONFIG_AUTOSUSPEND
|
||||||
pwrpriv->rf_pwrstate = rf_off;
|
pwrpriv->rf_pwrstate = rf_off;
|
||||||
pwrpriv->bips_processing = _FALSE;
|
pwrpriv->bips_processing = false;
|
||||||
#endif
|
#endif
|
||||||
_exit_pwrlock(&pwrpriv->lock);
|
_exit_pwrlock(&pwrpriv->lock);
|
||||||
|
|
||||||
|
@ -1024,7 +1024,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
|
||||||
if (rtw_is_earlysuspend_registered(pwrpriv)) {
|
if (rtw_is_earlysuspend_registered(pwrpriv)) {
|
||||||
#endif //CONFIG_WOWLAN
|
#endif //CONFIG_WOWLAN
|
||||||
//jeff: bypass resume here, do in late_resume
|
//jeff: bypass resume here, do in late_resume
|
||||||
pwrpriv->do_late_resume = _TRUE;
|
pwrpriv->do_late_resume = true;
|
||||||
} else {
|
} else {
|
||||||
ret = rtw_resume_process(padapter);
|
ret = rtw_resume_process(padapter);
|
||||||
}
|
}
|
||||||
|
@ -1069,19 +1069,19 @@ int rtw_resume_process(_adapter *padapter)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DBG_88E("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume );
|
DBG_88E("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;
|
||||||
DBG_88E("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend );
|
DBG_88E("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend );
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif //#ifdef CONFIG_AUTOSUSPEND
|
#endif //#ifdef CONFIG_AUTOSUSPEND
|
||||||
#endif //#ifdef CONFIG_BT_COEXIST
|
#endif //#ifdef CONFIG_BT_COEXIST
|
||||||
rtw_reset_drv_sw(padapter);
|
rtw_reset_drv_sw(padapter);
|
||||||
pwrpriv->bkeepfwalive = _FALSE;
|
pwrpriv->bkeepfwalive = false;
|
||||||
|
|
||||||
DBG_88E("bkeepfwalive(%x)\n",pwrpriv->bkeepfwalive);
|
DBG_88E("bkeepfwalive(%x)\n",pwrpriv->bkeepfwalive);
|
||||||
if (pm_netdev_open(pnetdev,_TRUE) != 0)
|
if (pm_netdev_open(pnetdev,true) != 0)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
netif_device_attach(pnetdev);
|
netif_device_attach(pnetdev);
|
||||||
|
@ -1095,24 +1095,24 @@ int rtw_resume_process(_adapter *padapter)
|
||||||
// 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) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable ))
|
if ((padapter->bFWReady) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable ))
|
||||||
{
|
{
|
||||||
//rtl8192c_set_FwSelectSuspend_cmd(padapter,_FALSE ,500);//note fw to support hw power down ping detect
|
//rtl8192c_set_FwSelectSuspend_cmd(padapter,false ,500);//note fw to support hw power down ping detect
|
||||||
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
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
DBG_88E("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume );
|
DBG_88E("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;
|
||||||
DBG_88E("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend );
|
DBG_88E("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;
|
||||||
{
|
{
|
||||||
DBG_88E("enc_algorithm(%x),wepkeymask(%x)\n",
|
DBG_88E("enc_algorithm(%x),wepkeymask(%x)\n",
|
||||||
padapter->securitypriv.dot11PrivacyAlgrthm,pwrpriv->wepkeymask);
|
padapter->securitypriv.dot11PrivacyAlgrthm,pwrpriv->wepkeymask);
|
||||||
|
@ -1150,7 +1150,7 @@ exit:
|
||||||
rtw_unlock_suspend();
|
rtw_unlock_suspend();
|
||||||
#endif //CONFIG_RESUME_IN_WORKQUEUE
|
#endif //CONFIG_RESUME_IN_WORKQUEUE
|
||||||
|
|
||||||
pwrpriv->bInSuspend = _FALSE;
|
pwrpriv->bInSuspend = false;
|
||||||
DBG_88E("<=== %s return %d.............. in %dms\n", __func__
|
DBG_88E("<=== %s return %d.............. in %dms\n", __func__
|
||||||
, ret, rtw_get_passing_time_ms(start_time));
|
, ret, rtw_get_passing_time_ms(start_time));
|
||||||
|
|
||||||
|
@ -1167,8 +1167,8 @@ void autosuspend_enter(_adapter* padapter)
|
||||||
|
|
||||||
DBG_88E("==>autosuspend_enter...........\n");
|
DBG_88E("==>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 )
|
||||||
{
|
{
|
||||||
|
@ -1228,7 +1228,7 @@ int autoresume_enter(_adapter* padapter)
|
||||||
|
|
||||||
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)
|
||||||
|
@ -1249,7 +1249,7 @@ int autoresume_enter(_adapter* padapter)
|
||||||
DBG_88E("...pm_usage_cnt(%d).....\n", dvobj->pusbintf->pm_usage_cnt);
|
DBG_88E("...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)
|
||||||
|
@ -1314,11 +1314,11 @@ _adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
||||||
padapter->dvobj = dvobj;
|
padapter->dvobj = dvobj;
|
||||||
dvobj->if1 = padapter;
|
dvobj->if1 = padapter;
|
||||||
|
|
||||||
padapter->bDriverStopped=_TRUE;
|
padapter->bDriverStopped=true;
|
||||||
|
|
||||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||||
//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;
|
||||||
#ifndef CONFIG_HWPORT_SWAP
|
#ifndef CONFIG_HWPORT_SWAP
|
||||||
padapter->iface_type = IFACE_PORT0;
|
padapter->iface_type = IFACE_PORT0;
|
||||||
|
@ -1498,7 +1498,7 @@ static void rtw_usb_if1_deinit(_adapter *if1)
|
||||||
struct mlme_priv *pmlmepriv= &if1->mlmepriv;
|
struct mlme_priv *pmlmepriv= &if1->mlmepriv;
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||||
rtw_disassoc_cmd(if1, 0, _FALSE);
|
rtw_disassoc_cmd(if1, 0, false);
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
@ -1518,7 +1518,7 @@ static void rtw_usb_if1_deinit(_adapter *if1)
|
||||||
rtw_cancel_all_timer(if1);
|
rtw_cancel_all_timer(if1);
|
||||||
|
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
if1->pwrctrlpriv.wowlan_mode=_FALSE;
|
if1->pwrctrlpriv.wowlan_mode=false;
|
||||||
#endif //CONFIG_WOWLAN
|
#endif //CONFIG_WOWLAN
|
||||||
|
|
||||||
rtw_dev_unload(if1);
|
rtw_dev_unload(if1);
|
||||||
|
@ -1751,15 +1751,15 @@ _func_enter_;
|
||||||
DBG_88E("+rtw_dev_remove\n");
|
DBG_88E("+rtw_dev_remove\n");
|
||||||
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+dev_remove()\n"));
|
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+dev_remove()\n"));
|
||||||
|
|
||||||
if (usb_drv->drv_registered == _TRUE)
|
if (usb_drv->drv_registered == true)
|
||||||
{
|
{
|
||||||
//DBG_88E("r871xu_dev_remove():padapter->bSurpriseRemoved == _TRUE\n");
|
//DBG_88E("r871xu_dev_remove():padapter->bSurpriseRemoved == true\n");
|
||||||
padapter->bSurpriseRemoved = _TRUE;
|
padapter->bSurpriseRemoved = true;
|
||||||
}
|
}
|
||||||
/*else
|
/*else
|
||||||
{
|
{
|
||||||
//DBG_88E("r871xu_dev_remove():module removed\n");
|
//DBG_88E("r871xu_dev_remove():module removed\n");
|
||||||
padapter->hw_init_completed = _FALSE;
|
padapter->hw_init_completed = false;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
|
#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
|
||||||
|
@ -1847,7 +1847,7 @@ static int __init rtw_drv_entry(void)
|
||||||
_rtw_mutex_init(&usb_drv->setbw_mutex);
|
_rtw_mutex_init(&usb_drv->setbw_mutex);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
usb_drv->drv_registered = _TRUE;
|
usb_drv->drv_registered = true;
|
||||||
return usb_register(&usb_drv->usbdrv);
|
return usb_register(&usb_drv->usbdrv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1858,7 +1858,7 @@ static void __exit rtw_drv_halt(void)
|
||||||
|
|
||||||
rtw_suspend_lock_uninit();
|
rtw_suspend_lock_uninit();
|
||||||
|
|
||||||
usb_drv->drv_registered = _FALSE;
|
usb_drv->drv_registered = false;
|
||||||
usb_deregister(&usb_drv->usbdrv);
|
usb_deregister(&usb_drv->usbdrv);
|
||||||
|
|
||||||
_rtw_mutex_free(&usb_drv->hw_init_mutex);
|
_rtw_mutex_free(&usb_drv->hw_init_mutex);
|
||||||
|
|
|
@ -286,11 +286,11 @@ void usb_read_port_cancel(struct intf_hdl *pintfhdl)
|
||||||
|
|
||||||
DBG_88E("%s\n", __func__);
|
DBG_88E("%s\n", __func__);
|
||||||
|
|
||||||
padapter->bReadPortCancel = _TRUE;
|
padapter->bReadPortCancel = true;
|
||||||
|
|
||||||
for (i=0; i < NR_RECVBUFF ; i++) {
|
for (i=0; i < NR_RECVBUFF ; i++) {
|
||||||
|
|
||||||
precvbuf->reuse = _TRUE;
|
precvbuf->reuse = true;
|
||||||
if (precvbuf->purb) {
|
if (precvbuf->purb) {
|
||||||
//DBG_88E("usb_read_port_cancel : usb_kill_urb\n");
|
//DBG_88E("usb_read_port_cancel : usb_kill_urb\n");
|
||||||
usb_kill_urb(precvbuf->purb);
|
usb_kill_urb(precvbuf->purb);
|
||||||
|
@ -416,14 +416,14 @@ _func_enter_;
|
||||||
|
|
||||||
} else if (purb->status == -ESHUTDOWN) {
|
} else if (purb->status == -ESHUTDOWN) {
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_write_port_complete: ESHUTDOWN\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_write_port_complete: ESHUTDOWN\n"));
|
||||||
padapter->bDriverStopped=_TRUE;
|
padapter->bDriverStopped=true;
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_write_port_complete:bDriverStopped=TRUE\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_write_port_complete:bDriverStopped=TRUE\n"));
|
||||||
|
|
||||||
goto check_completion;
|
goto check_completion;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
padapter->bSurpriseRemoved=_TRUE;
|
padapter->bSurpriseRemoved=true;
|
||||||
DBG_88E("bSurpriseRemoved=TRUE\n");
|
DBG_88E("bSurpriseRemoved=TRUE\n");
|
||||||
//rtl8192cu_trigger_gpio_0(padapter);
|
//rtl8192cu_trigger_gpio_0(padapter);
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_write_port_complete:bSurpriseRemoved=TRUE\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_write_port_complete:bSurpriseRemoved=TRUE\n"));
|
||||||
|
@ -459,7 +459,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
||||||
_irqL irqL;
|
_irqL 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);
|
||||||
|
@ -520,7 +520,7 @@ _func_enter_;
|
||||||
|
|
||||||
#ifdef CONFIG_REDUCE_USB_TX_INT
|
#ifdef CONFIG_REDUCE_USB_TX_INT
|
||||||
if ( (pxmitpriv->free_xmitbuf_cnt%NR_XMITBUFF == 0)
|
if ( (pxmitpriv->free_xmitbuf_cnt%NR_XMITBUFF == 0)
|
||||||
|| (pxmitbuf->ext_tag == _TRUE) )
|
|| (pxmitbuf->ext_tag == true) )
|
||||||
{
|
{
|
||||||
purb->transfer_flags &= (~URB_NO_INTERRUPT);
|
purb->transfer_flags &= (~URB_NO_INTERRUPT);
|
||||||
} else {
|
} else {
|
||||||
|
@ -556,7 +556,7 @@ _func_enter_;
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case -ENODEV:
|
case -ENODEV:
|
||||||
padapter->bDriverStopped=_TRUE;
|
padapter->bDriverStopped=true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -569,7 +569,7 @@ _func_enter_;
|
||||||
// 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);
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@ void usb_write_port_cancel(struct intf_hdl *pintfhdl)
|
||||||
|
|
||||||
DBG_88E("%s\n", __func__);
|
DBG_88E("%s\n", __func__);
|
||||||
|
|
||||||
padapter->bWritePortCancel = _TRUE;
|
padapter->bWritePortCancel = true;
|
||||||
|
|
||||||
for (i=0; i<NR_XMITBUFF; i++) {
|
for (i=0; i<NR_XMITBUFF; i++) {
|
||||||
for (j=0; j<8; j++) {
|
for (j=0; j<8; j++) {
|
||||||
|
|
|
@ -75,12 +75,12 @@ _func_enter_;
|
||||||
|
|
||||||
if (pfile->pkt_len == 0) {
|
if (pfile->pkt_len == 0) {
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
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)
|
||||||
|
@ -258,7 +258,7 @@ void rtw_os_xmit_schedule(_adapter *padapter)
|
||||||
pri_adapter = padapter->pbuddy_adapter;
|
pri_adapter = padapter->pbuddy_adapter;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (_rtw_queue_empty(&pri_adapter->xmitpriv.pending_xmitbuf_queue) == _FALSE)
|
if (_rtw_queue_empty(&pri_adapter->xmitpriv.pending_xmitbuf_queue) == false)
|
||||||
_rtw_up_sema(&pri_adapter->xmitpriv.xmit_sema);
|
_rtw_up_sema(&pri_adapter->xmitpriv.xmit_sema);
|
||||||
|
|
||||||
|
|
||||||
|
@ -326,7 +326,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)
|
||||||
{
|
{
|
||||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||||
|
|
||||||
|
@ -353,13 +353,13 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
||||||
|
|
||||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
//dev_kfree_skb_any(skb);
|
//dev_kfree_skb_any(skb);
|
||||||
return _FALSE; // Caller shall tx this multicast frame via normal way.
|
return false; // Caller shall tx this multicast frame via normal way.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
return _TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // CONFIG_TX_MCAST2UNI
|
#endif // CONFIG_TX_MCAST2UNI
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ _func_enter_;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n"));
|
||||||
|
|
||||||
if (rtw_if_up(padapter) == _FALSE) {
|
if (rtw_if_up(padapter) == false) {
|
||||||
RT_TRACE(_module_xmit_osdep_c_, _drv_err_, ("rtw_xmit_entry: rtw_if_up fail\n"));
|
RT_TRACE(_module_xmit_osdep_c_, _drv_err_, ("rtw_xmit_entry: rtw_if_up fail\n"));
|
||||||
#ifdef DBG_TX_DROP_FRAME
|
#ifdef DBG_TX_DROP_FRAME
|
||||||
DBG_88E("DBG_TX_DROP_FRAME %s if_up fail\n", __func__);
|
DBG_88E("DBG_TX_DROP_FRAME %s if_up fail\n", __func__);
|
||||||
|
@ -393,7 +393,7 @@ _func_enter_;
|
||||||
|
|
||||||
#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) )
|
||||||
&& (padapter->registrypriv.wifi_spec == 0)
|
&& (padapter->registrypriv.wifi_spec == 0)
|
||||||
|
@ -401,7 +401,7 @@ _func_enter_;
|
||||||
{
|
{
|
||||||
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 {
|
||||||
|
|
Loading…
Reference in a new issue