mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove dead code inside #if 0
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
2d60bad9ad
commit
b6b121512b
56 changed files with 121 additions and 6115 deletions
275
core/rtw_ap.c
275
core/rtw_ap.c
|
@ -332,10 +332,6 @@ u8 chk_sta_is_alive(struct sta_info *psta)
|
|||
//if(sta_last_rx_pkts(psta) == sta_rx_pkts(psta))
|
||||
if((psta->sta_stats.last_rx_data_pkts + psta->sta_stats.last_rx_ctrl_pkts) == (psta->sta_stats.rx_data_pkts + psta->sta_stats.rx_ctrl_pkts))
|
||||
{
|
||||
#if 0
|
||||
if(psta->state&WIFI_SLEEP_STATE)
|
||||
ret = _TRUE;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -647,125 +643,6 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
}
|
||||
#endif //CONFIG_80211N_HT
|
||||
|
||||
#if 0//gtest
|
||||
if(get_rf_mimo_mode(padapter) == RTL8712_RF_2T2R)
|
||||
{
|
||||
//is this a 2r STA?
|
||||
if((pstat->tx_ra_bitmap & 0x0ff00000) != 0 && !(priv->pshare->has_2r_sta & BIT(pstat->aid)))
|
||||
{
|
||||
priv->pshare->has_2r_sta |= BIT(pstat->aid);
|
||||
if(rtw_read16(padapter, 0x102501f6) != 0xffff)
|
||||
{
|
||||
rtw_write16(padapter, 0x102501f6, 0xffff);
|
||||
reset_1r_sta_RA(priv, 0xffff);
|
||||
Switch_1SS_Antenna(priv, 3);
|
||||
}
|
||||
}
|
||||
else// bg or 1R STA?
|
||||
{
|
||||
if((priv->pmib->dot11BssType.net_work_type & WIRELESS_11N) && pstat->ht_cap_len && priv->pshare->has_2r_sta == 0)
|
||||
{
|
||||
if(rtw_read16(padapter, 0x102501f6) != 0x7777)
|
||||
{ // MCS7 SGI
|
||||
rtw_write16(padapter, 0x102501f6,0x7777);
|
||||
reset_1r_sta_RA(priv, 0x7777);
|
||||
Switch_1SS_Antenna(priv, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((pstat->rssi_level < 1) || (pstat->rssi_level > 3))
|
||||
{
|
||||
if (pstat->rssi >= priv->pshare->rf_ft_var.raGoDownUpper)
|
||||
pstat->rssi_level = 1;
|
||||
else if ((pstat->rssi >= priv->pshare->rf_ft_var.raGoDown20MLower) ||
|
||||
((priv->pshare->is_40m_bw) && (pstat->ht_cap_len) &&
|
||||
(pstat->rssi >= priv->pshare->rf_ft_var.raGoDown40MLower) &&
|
||||
(pstat->ht_cap_buf.ht_cap_info & cpu_to_le16(_HTCAP_SUPPORT_CH_WDTH_))))
|
||||
pstat->rssi_level = 2;
|
||||
else
|
||||
pstat->rssi_level = 3;
|
||||
}
|
||||
|
||||
// rate adaptive by rssi
|
||||
if ((priv->pmib->dot11BssType.net_work_type & WIRELESS_11N) && pstat->ht_cap_len)
|
||||
{
|
||||
if ((get_rf_mimo_mode(priv) == MIMO_1T2R) || (get_rf_mimo_mode(priv) == MIMO_1T1R))
|
||||
{
|
||||
switch (pstat->rssi_level) {
|
||||
case 1:
|
||||
pstat->tx_ra_bitmap &= 0x100f0000;
|
||||
break;
|
||||
case 2:
|
||||
pstat->tx_ra_bitmap &= 0x100ff000;
|
||||
break;
|
||||
case 3:
|
||||
if (priv->pshare->is_40m_bw)
|
||||
pstat->tx_ra_bitmap &= 0x100ff005;
|
||||
else
|
||||
pstat->tx_ra_bitmap &= 0x100ff001;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (pstat->rssi_level) {
|
||||
case 1:
|
||||
pstat->tx_ra_bitmap &= 0x1f0f0000;
|
||||
break;
|
||||
case 2:
|
||||
pstat->tx_ra_bitmap &= 0x1f0ff000;
|
||||
break;
|
||||
case 3:
|
||||
if (priv->pshare->is_40m_bw)
|
||||
pstat->tx_ra_bitmap &= 0x000ff005;
|
||||
else
|
||||
pstat->tx_ra_bitmap &= 0x000ff001;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Don't need to mask high rates due to new rate adaptive parameters
|
||||
//if (pstat->is_broadcom_sta) // use MCS12 as the highest rate vs. Broadcom sta
|
||||
// pstat->tx_ra_bitmap &= 0x81ffffff;
|
||||
|
||||
// NIC driver will report not supporting MCS15 and MCS14 in asoc req
|
||||
//if (pstat->is_rtl8190_sta && !pstat->is_2t_mimo_sta)
|
||||
// pstat->tx_ra_bitmap &= 0x83ffffff; // if Realtek 1x2 sta, don't use MCS15 and MCS14
|
||||
}
|
||||
}
|
||||
else if ((priv->pmib->dot11BssType.net_work_type & WIRELESS_11G) && isErpSta(pstat))
|
||||
{
|
||||
switch (pstat->rssi_level) {
|
||||
case 1:
|
||||
pstat->tx_ra_bitmap &= 0x00000f00;
|
||||
break;
|
||||
case 2:
|
||||
pstat->tx_ra_bitmap &= 0x00000ff0;
|
||||
break;
|
||||
case 3:
|
||||
pstat->tx_ra_bitmap &= 0x00000ff5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pstat->tx_ra_bitmap &= 0x0000000d;
|
||||
}
|
||||
|
||||
// disable tx short GI when station cannot rx MCS15(AP is 2T2R)
|
||||
// disable tx short GI when station cannot rx MCS7 (AP is 1T2R or 1T1R)
|
||||
// if there is only 1r STA and we are 2T2R, DO NOT mask SGI rate
|
||||
if ((!(pstat->tx_ra_bitmap & 0x8000000) && (priv->pshare->has_2r_sta > 0) && (get_rf_mimo_mode(padapter) == RTL8712_RF_2T2R)) ||
|
||||
(!(pstat->tx_ra_bitmap & 0x80000) && (get_rf_mimo_mode(padapter) != RTL8712_RF_2T2R)))
|
||||
{
|
||||
pstat->tx_ra_bitmap &= ~BIT(28);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( pcur_network->Configuration.DSConfig > 14 ) {
|
||||
// 5G band
|
||||
if (tx_ra_bitmap & 0xffff000)
|
||||
|
@ -1506,45 +1383,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
|
||||
psecuritypriv->wpa2_group_cipher = group_cipher;
|
||||
psecuritypriv->wpa2_pairwise_cipher = pairwise_cipher;
|
||||
#if 0
|
||||
switch(group_cipher)
|
||||
{
|
||||
case WPA_CIPHER_NONE:
|
||||
psecuritypriv->wpa2_group_cipher = _NO_PRIVACY_;
|
||||
break;
|
||||
case WPA_CIPHER_WEP40:
|
||||
psecuritypriv->wpa2_group_cipher = _WEP40_;
|
||||
break;
|
||||
case WPA_CIPHER_TKIP:
|
||||
psecuritypriv->wpa2_group_cipher = _TKIP_;
|
||||
break;
|
||||
case WPA_CIPHER_CCMP:
|
||||
psecuritypriv->wpa2_group_cipher = _AES_;
|
||||
break;
|
||||
case WPA_CIPHER_WEP104:
|
||||
psecuritypriv->wpa2_group_cipher = _WEP104_;
|
||||
break;
|
||||
}
|
||||
|
||||
switch(pairwise_cipher)
|
||||
{
|
||||
case WPA_CIPHER_NONE:
|
||||
psecuritypriv->wpa2_pairwise_cipher = _NO_PRIVACY_;
|
||||
break;
|
||||
case WPA_CIPHER_WEP40:
|
||||
psecuritypriv->wpa2_pairwise_cipher = _WEP40_;
|
||||
break;
|
||||
case WPA_CIPHER_TKIP:
|
||||
psecuritypriv->wpa2_pairwise_cipher = _TKIP_;
|
||||
break;
|
||||
case WPA_CIPHER_CCMP:
|
||||
psecuritypriv->wpa2_pairwise_cipher = _AES_;
|
||||
break;
|
||||
case WPA_CIPHER_WEP104:
|
||||
psecuritypriv->wpa2_pairwise_cipher = _WEP104_;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1570,45 +1408,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
psecuritypriv->wpa_group_cipher = group_cipher;
|
||||
psecuritypriv->wpa_pairwise_cipher = pairwise_cipher;
|
||||
|
||||
#if 0
|
||||
switch(group_cipher)
|
||||
{
|
||||
case WPA_CIPHER_NONE:
|
||||
psecuritypriv->wpa_group_cipher = _NO_PRIVACY_;
|
||||
break;
|
||||
case WPA_CIPHER_WEP40:
|
||||
psecuritypriv->wpa_group_cipher = _WEP40_;
|
||||
break;
|
||||
case WPA_CIPHER_TKIP:
|
||||
psecuritypriv->wpa_group_cipher = _TKIP_;
|
||||
break;
|
||||
case WPA_CIPHER_CCMP:
|
||||
psecuritypriv->wpa_group_cipher = _AES_;
|
||||
break;
|
||||
case WPA_CIPHER_WEP104:
|
||||
psecuritypriv->wpa_group_cipher = _WEP104_;
|
||||
break;
|
||||
}
|
||||
|
||||
switch(pairwise_cipher)
|
||||
{
|
||||
case WPA_CIPHER_NONE:
|
||||
psecuritypriv->wpa_pairwise_cipher = _NO_PRIVACY_;
|
||||
break;
|
||||
case WPA_CIPHER_WEP40:
|
||||
psecuritypriv->wpa_pairwise_cipher = _WEP40_;
|
||||
break;
|
||||
case WPA_CIPHER_TKIP:
|
||||
psecuritypriv->wpa_pairwise_cipher = _TKIP_;
|
||||
break;
|
||||
case WPA_CIPHER_CCMP:
|
||||
psecuritypriv->wpa_pairwise_cipher = _AES_;
|
||||
break;
|
||||
case WPA_CIPHER_WEP104:
|
||||
psecuritypriv->wpa_pairwise_cipher = _WEP104_;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -2271,89 +2070,51 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
|
|||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
|
||||
|
||||
#if 0
|
||||
if (!(psta->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) &&
|
||||
!psta->no_short_preamble_set) {
|
||||
psta->no_short_preamble_set = 1;
|
||||
pmlmepriv->num_sta_no_short_preamble++;
|
||||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||
(pmlmepriv->num_sta_no_short_preamble == 1))
|
||||
ieee802_11_set_beacons(hapd->iface);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if(!(psta->flags & WLAN_STA_SHORT_PREAMBLE))
|
||||
{
|
||||
if(!psta->no_short_preamble_set)
|
||||
{
|
||||
if(!(psta->flags & WLAN_STA_SHORT_PREAMBLE)) {
|
||||
if(!psta->no_short_preamble_set) {
|
||||
psta->no_short_preamble_set = 1;
|
||||
|
||||
pmlmepriv->num_sta_no_short_preamble++;
|
||||
|
||||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||
(pmlmepriv->num_sta_no_short_preamble == 1))
|
||||
{
|
||||
(pmlmepriv->num_sta_no_short_preamble == 1)) {
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(psta->no_short_preamble_set)
|
||||
{
|
||||
} else {
|
||||
if(psta->no_short_preamble_set) {
|
||||
psta->no_short_preamble_set = 0;
|
||||
|
||||
pmlmepriv->num_sta_no_short_preamble--;
|
||||
|
||||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||
(pmlmepriv->num_sta_no_short_preamble == 0))
|
||||
{
|
||||
(pmlmepriv->num_sta_no_short_preamble == 0)) {
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, 0xFF, NULL, _TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (psta->flags & WLAN_STA_NONERP && !psta->nonerp_set) {
|
||||
psta->nonerp_set = 1;
|
||||
pmlmepriv->num_sta_non_erp++;
|
||||
if (pmlmepriv->num_sta_non_erp == 1)
|
||||
ieee802_11_set_beacons(hapd->iface);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(psta->flags & WLAN_STA_NONERP)
|
||||
{
|
||||
if(!psta->nonerp_set)
|
||||
{
|
||||
if(psta->flags & WLAN_STA_NONERP) {
|
||||
if(!psta->nonerp_set) {
|
||||
psta->nonerp_set = 1;
|
||||
|
||||
pmlmepriv->num_sta_non_erp++;
|
||||
|
||||
if (pmlmepriv->num_sta_non_erp == 1)
|
||||
{
|
||||
if (pmlmepriv->num_sta_non_erp == 1) {
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(psta->nonerp_set)
|
||||
{
|
||||
} else {
|
||||
if(psta->nonerp_set) {
|
||||
psta->nonerp_set = 0;
|
||||
|
||||
pmlmepriv->num_sta_non_erp--;
|
||||
|
||||
if (pmlmepriv->num_sta_non_erp == 0)
|
||||
{
|
||||
if (pmlmepriv->num_sta_non_erp == 0) {
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE);
|
||||
}
|
||||
|
@ -2361,18 +2122,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT) &&
|
||||
!psta->no_short_slot_time_set) {
|
||||
psta->no_short_slot_time_set = 1;
|
||||
pmlmepriv->num_sta_no_short_slot_time++;
|
||||
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
|
||||
(pmlmepriv->num_sta_no_short_slot_time == 1))
|
||||
ieee802_11_set_beacons(hapd->iface);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT))
|
||||
{
|
||||
if(!psta->no_short_slot_time_set)
|
||||
|
|
|
@ -1297,19 +1297,6 @@ _func_enter_;
|
|||
|
||||
DBG_871X("%s: smart_ps=%d\n", __func__, adapter_to_pwrctl(padapter)->smart_ps);
|
||||
|
||||
#if 0
|
||||
psecuritypriv->supplicant_ie[0]=(u8)psecnetwork->IELength;
|
||||
|
||||
if(psecnetwork->IELength < (256-1))
|
||||
{
|
||||
_rtw_memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], psecnetwork->IELength);
|
||||
}
|
||||
else
|
||||
{
|
||||
_rtw_memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], (256-1));
|
||||
}
|
||||
#endif
|
||||
|
||||
pcmd->cmdsz = get_WLAN_BSSID_EX_sz(psecnetwork);//get cmdsz before endian conversion
|
||||
|
||||
_rtw_init_listhead(&pcmd->list);
|
||||
|
@ -3114,23 +3101,6 @@ _func_enter_;
|
|||
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
#if 0
|
||||
if((pmlmepriv->fw_state) & WIFI_AP_STATE)
|
||||
{
|
||||
psta = rtw_alloc_stainfo(&padapter->stapriv, pnetwork->MacAddress);
|
||||
|
||||
if (psta == NULL) { // for AP Mode & Adhoc Master Mode
|
||||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_err_,("\nCan't alloc sta_info when createbss_cmd_callback\n"));
|
||||
goto createbss_cmd_fail ;
|
||||
}
|
||||
|
||||
rtw_indicate_connect( padapter);
|
||||
}
|
||||
else {
|
||||
|
||||
//rtw_indicate_disconnect(dev);
|
||||
}
|
||||
#endif
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
// we will set _FW_LINKED when there is one more sat to join us (rtw_stassoc_event_callback)
|
||||
|
||||
|
|
|
@ -1261,15 +1261,6 @@ int retriveAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv)
|
|||
ret = _SUCCESS;
|
||||
else
|
||||
ret = _FAIL;
|
||||
|
||||
#if 0
|
||||
if(isAdaptorInfoFileValid()) {
|
||||
return 0;
|
||||
} else {
|
||||
return _FAIL;
|
||||
}
|
||||
#endif
|
||||
|
||||
} else {
|
||||
DBG_871X("%s NULL pointer\n",__FUNCTION__);
|
||||
ret = _FAIL;
|
||||
|
|
|
@ -1691,17 +1691,6 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id)
|
|||
{
|
||||
u8 *next_attr = target_attr+target_attr_len;
|
||||
uint remain_len = ielen-(next_attr-ie);
|
||||
//dump_ies(ie, ielen);
|
||||
#if 0
|
||||
DBG_871X("[%d] ie:%p, ielen:%u\n"
|
||||
"target_attr:%p, target_attr_len:%u\n"
|
||||
"next_attr:%p, remain_len:%u\n"
|
||||
, index++
|
||||
, ie, ielen
|
||||
, target_attr, target_attr_len
|
||||
, next_attr, remain_len
|
||||
);
|
||||
#endif
|
||||
|
||||
_rtw_memset(target_attr, 0, target_attr_len);
|
||||
_rtw_memcpy(target_attr, next_attr, remain_len);
|
||||
|
@ -1711,8 +1700,6 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id)
|
|||
}
|
||||
else
|
||||
{
|
||||
//if(index>0)
|
||||
// dump_ies(ie, ielen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1728,13 +1715,6 @@ void rtw_WLAN_BSSID_EX_remove_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id)
|
|||
|
||||
if( (p2p_ie=rtw_get_p2p_ie(bss_ex->IEs+_FIXED_IE_LENGTH_, bss_ex->IELength-_FIXED_IE_LENGTH_, NULL, &p2p_ielen_ori)) )
|
||||
{
|
||||
#if 0
|
||||
if(rtw_get_p2p_attr(p2p_ie, p2p_ielen_ori, attr_id, NULL, NULL)) {
|
||||
DBG_871X("rtw_get_p2p_attr: GOT P2P_ATTR:%u!!!!!!!!\n", attr_id);
|
||||
dump_ies(bss_ex->IEs+_FIXED_IE_LENGTH_, bss_ex->IELength-_FIXED_IE_LENGTH_);
|
||||
}
|
||||
#endif
|
||||
|
||||
p2p_ielen=rtw_p2p_attr_remove(p2p_ie, p2p_ielen_ori, attr_id);
|
||||
if(p2p_ielen != p2p_ielen_ori) {
|
||||
|
||||
|
@ -1745,11 +1725,6 @@ void rtw_WLAN_BSSID_EX_remove_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id)
|
|||
_rtw_memcpy(next_ie, next_ie_ori, remain_len);
|
||||
_rtw_memset(next_ie+remain_len, 0, p2p_ielen_ori-p2p_ielen);
|
||||
bss_ex->IELength -= p2p_ielen_ori-p2p_ielen;
|
||||
|
||||
#if 0
|
||||
DBG_871X("remove P2P_ATTR:%u!\n", attr_id);
|
||||
dump_ies(bss_ex->IEs+_FIXED_IE_LENGTH_, bss_ex->IELength-_FIXED_IE_LENGTH_);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,34 +159,6 @@ struct oid_obj_priv oid_rtl_seg_03_00[] =
|
|||
NDIS_STATUS oid_rt_pro_set_fw_dig_state_hdl(struct oid_par_priv* poid_par_priv)
|
||||
{
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
_irqL oldirql;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
if(poid_par_priv->type_of_oid != SET_OID)
|
||||
{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
return status;
|
||||
}
|
||||
|
||||
_irqlevel_changed_(&oldirql,LOWER);
|
||||
if(poid_par_priv->information_buf_len >= sizeof(struct setdig_parm))
|
||||
{
|
||||
//DEBUG_ERR(("===> oid_rt_pro_set_fw_dig_state_hdl. type:0x%02x.\n",*((unsigned char*)poid_par_priv->information_buf )));
|
||||
if(!rtw_setfwdig_cmd(Adapter,*((unsigned char*)poid_par_priv->information_buf )))
|
||||
{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
}
|
||||
_irqlevel_changed_(&oldirql,RAISE);
|
||||
_func_exit_;
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -194,35 +166,6 @@ NDIS_STATUS oid_rt_pro_set_fw_ra_state_hdl(struct oid_par_priv* poid_par_priv)
|
|||
{
|
||||
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
_irqL oldirql;
|
||||
|
||||
_func_enter_;
|
||||
if(poid_par_priv->type_of_oid != SET_OID)
|
||||
{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
_irqlevel_changed_(&oldirql,LOWER);
|
||||
|
||||
if(poid_par_priv->information_buf_len >= sizeof(struct setra_parm))
|
||||
{
|
||||
//DEBUG_ERR(("===> oid_rt_pro_set_fw_ra_state_hdl. type:0x%02x.\n",*((unsigned char*)poid_par_priv->information_buf )));
|
||||
if(!rtw_setfwra_cmd(Adapter,*((unsigned char*)poid_par_priv->information_buf )))
|
||||
{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
}
|
||||
_irqlevel_changed_(&oldirql,RAISE);
|
||||
_func_exit_;
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -237,20 +180,6 @@ NDIS_STATUS oid_rt_get_signal_quality_hdl(struct oid_par_priv* poid_par_priv)
|
|||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
return status;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(pMgntInfo->mAssoc || pMgntInfo->mIbss)
|
||||
{
|
||||
ulInfo = pAdapter->RxStats.SignalQuality;
|
||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||
}
|
||||
else
|
||||
{
|
||||
ulInfo = 0xffffffff; // It stands for -1 in 4-byte integer.
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -897,56 +826,6 @@ NDIS_STATUS oid_rt_pro_rf_write_registry_hdl(struct oid_par_priv* poid_par_priv)
|
|||
NDIS_STATUS oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv* poid_par_priv)
|
||||
{
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
_irqL oldirql;
|
||||
_func_enter_;
|
||||
|
||||
//DEBUG_ERR(("<**********************oid_rt_pro_rf_read_registry_hdl \n"));
|
||||
if(poid_par_priv->type_of_oid != SET_OID) //QUERY_OID
|
||||
{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
return status;
|
||||
}
|
||||
|
||||
_irqlevel_changed_(&oldirql,LOWER);
|
||||
if(poid_par_priv->information_buf_len== (sizeof(unsigned long)*3))
|
||||
{
|
||||
if(Adapter->mppriv.act_in_progress == _TRUE)
|
||||
{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
}
|
||||
else
|
||||
{
|
||||
//init workparam
|
||||
Adapter->mppriv.act_in_progress = _TRUE;
|
||||
Adapter->mppriv.workparam.bcompleted= _FALSE;
|
||||
Adapter->mppriv.workparam.act_type = MPT_READ_RF;
|
||||
Adapter->mppriv.workparam.io_offset = *(unsigned long*)poid_par_priv->information_buf;
|
||||
Adapter->mppriv.workparam.io_value = 0xcccccccc;
|
||||
|
||||
//RegOffsetValue - The offset of RF register to read.
|
||||
//RegDataWidth - The data width of RF register to read.
|
||||
//RegDataValue - The value to read.
|
||||
//RegOffsetValue = *((unsigned long*)InformationBuffer);
|
||||
//RegDataWidth = *((unsigned long*)InformationBuffer+1);
|
||||
//RegDataValue = *((unsigned long*)InformationBuffer+2);
|
||||
if(!rtw_getrfreg_cmd(Adapter,
|
||||
*(unsigned char*)poid_par_priv->information_buf,
|
||||
(unsigned char*)&Adapter->mppriv.workparam.io_value))
|
||||
{
|
||||
status = NDIS_STATUS_NOT_ACCEPTED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
status = NDIS_STATUS_INVALID_LENGTH;
|
||||
}
|
||||
_irqlevel_changed_(&oldirql,RAISE);
|
||||
_func_exit_;
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -993,21 +872,6 @@ NDIS_STATUS oid_rt_get_connect_state_hdl(struct oid_par_priv* poid_par_priv)
|
|||
*(ULONG *)poid_par_priv->information_buf = ulInfo;
|
||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||
|
||||
#if 0
|
||||
// Rearrange the order to let the UI still shows connection when scan is in progress
|
||||
RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_GET_CONNECT_STATE.\n"));
|
||||
if(pMgntInfo->mAssoc)
|
||||
ulInfo = 1;
|
||||
else if(pMgntInfo->mIbss)
|
||||
ulInfo = 2;
|
||||
else if(pMgntInfo->bScanInProgress)
|
||||
ulInfo = 0;
|
||||
else
|
||||
ulInfo = 3;
|
||||
ulInfoLen = sizeof(ULONG);
|
||||
RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_RT_GET_CONNECT_STATE: %d\n", ulInfo));
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,27 +176,10 @@ _func_enter_;
|
|||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("***Error=> rtw_select_and_join_from_scanned_queue FAIL under STA_Mode*** \n "));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// can't associate ; reset under-linking
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
#if 0
|
||||
if((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE))
|
||||
{
|
||||
if(_rtw_memcmp(pmlmepriv->cur_network.network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength))
|
||||
{
|
||||
// for funk to do roaming
|
||||
// funk will reconnect, but funk will not sitesurvey before reconnect
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("for funk to do roaming"));
|
||||
if(pmlmepriv->sitesurveyctrl.traffic_busy==_FALSE)
|
||||
rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
//when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue
|
||||
//we try to issue sitesurvey firstly
|
||||
if(pmlmepriv->LinkDetectInfo.bBusyTraffic==_FALSE
|
||||
|
|
188
core/rtw_mlme.c
188
core/rtw_mlme.c
|
@ -754,41 +754,6 @@ _func_enter_;
|
|||
}
|
||||
#endif
|
||||
|
||||
#if 0 // old codes, may be useful one day...
|
||||
// DBG_871X("update_network: rssi=0x%lx dst->Rssi=%d ,dst->Rssi=0x%lx , src->Rssi=0x%lx",(dst->Rssi+src->Rssi)/2,dst->Rssi,dst->Rssi,src->Rssi);
|
||||
if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) && is_same_network(&(padapter->mlmepriv.cur_network.network), src, 0))
|
||||
{
|
||||
|
||||
//DBG_871X("b:ssid=%s update_network: src->rssi=0x%d padapter->recvpriv.ui_rssi=%d\n",src->Ssid.Ssid,src->Rssi,padapter->recvpriv.signal);
|
||||
if(padapter->recvpriv.signal_qual_data.total_num++ >= PHY_LINKQUALITY_SLID_WIN_MAX)
|
||||
{
|
||||
padapter->recvpriv.signal_qual_data.total_num = PHY_LINKQUALITY_SLID_WIN_MAX;
|
||||
last_evm = padapter->recvpriv.signal_qual_data.elements[padapter->recvpriv.signal_qual_data.index];
|
||||
padapter->recvpriv.signal_qual_data.total_val -= last_evm;
|
||||
}
|
||||
padapter->recvpriv.signal_qual_data.total_val += query_rx_pwr_percentage(src->Rssi);
|
||||
|
||||
padapter->recvpriv.signal_qual_data.elements[padapter->recvpriv.signal_qual_data.index++] = query_rx_pwr_percentage(src->Rssi);
|
||||
if(padapter->recvpriv.signal_qual_data.index >= PHY_LINKQUALITY_SLID_WIN_MAX)
|
||||
padapter->recvpriv.signal_qual_data.index = 0;
|
||||
|
||||
//DBG_871X("Total SQ=%d pattrib->signal_qual= %d\n", padapter->recvpriv.signal_qual_data.total_val, src->Rssi);
|
||||
|
||||
// <1> Showed on UI for user,in percentage.
|
||||
tmpVal = padapter->recvpriv.signal_qual_data.total_val/padapter->recvpriv.signal_qual_data.total_num;
|
||||
padapter->recvpriv.signal=(u8)tmpVal;//Link quality
|
||||
|
||||
src->Rssi= translate_percentage_to_dbm(padapter->recvpriv.signal) ;
|
||||
}
|
||||
else{
|
||||
// DBG_871X("ELSE:ssid=%s update_network: src->rssi=0x%d dst->rssi=%d\n",src->Ssid.Ssid,src->Rssi,dst->Rssi);
|
||||
src->Rssi=(src->Rssi +dst->Rssi)/2;//dBM
|
||||
}
|
||||
|
||||
// DBG_871X("a:update_network: src->rssi=0x%d padapter->recvpriv.ui_rssi=%d\n",src->Rssi,padapter->recvpriv.signal);
|
||||
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
}
|
||||
|
||||
|
@ -798,23 +763,11 @@ static void update_current_network(struct adapter *adapter, WLAN_BSSID_EX *pnetw
|
|||
|
||||
_func_enter_;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
if ((unsigned long)(&(pmlmepriv->cur_network.network)) < 0x7ffffff)
|
||||
{
|
||||
KeBugCheckEx(0x87111c1c, (ULONG_PTR)(&(pmlmepriv->cur_network.network)), 0, 0,0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork, 0)))
|
||||
{
|
||||
//RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,"Same Network\n");
|
||||
|
||||
//if(pmlmepriv->cur_network.network.IELength<= pnetwork->IELength)
|
||||
{
|
||||
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, _TRUE);
|
||||
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof (NDIS_802_11_FIXED_IEs),
|
||||
pmlmepriv->cur_network.network.IELength);
|
||||
}
|
||||
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, _TRUE);
|
||||
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof (NDIS_802_11_FIXED_IEs),
|
||||
pmlmepriv->cur_network.network.IELength);
|
||||
}
|
||||
|
||||
_func_exit_;
|
||||
|
@ -2384,13 +2337,6 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
|||
int do_join_r;
|
||||
#endif //CONFIG_LAYER2_ROAMING
|
||||
|
||||
#if 0
|
||||
if (adapter->bDriverStopped == _TRUE){
|
||||
_rtw_up_sema(&pmlmepriv->assoc_terminate);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
_func_enter_;
|
||||
DBG_871X("%s, fw_state=%x\n", __FUNCTION__, get_fwstate(pmlmepriv));
|
||||
|
||||
|
@ -2787,10 +2733,6 @@ _func_enter_;
|
|||
|
||||
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
|
||||
|
||||
#if 0
|
||||
DBG_871X("MacAddress:"MAC_FMT" ssid:%s\n", MAC_ARG(pnetwork->network.MacAddress), pnetwork->network.Ssid.Ssid);
|
||||
#endif
|
||||
|
||||
rtw_check_join_candidate(pmlmepriv, &candidate, pnetwork);
|
||||
|
||||
}
|
||||
|
@ -2810,27 +2752,12 @@ _func_enter_;
|
|||
|
||||
|
||||
// check for situation of _FW_LINKED
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
DBG_871X("%s: _FW_LINKED while ask_for_joinbss!!!\n", __FUNCTION__);
|
||||
|
||||
#if 0 // for WPA/WPA2 authentication, wpa_supplicant will expect authentication from AP, it is needed to reconnect AP...
|
||||
if(is_same_network(&pmlmepriv->cur_network.network, &candidate->network))
|
||||
{
|
||||
DBG_871X("%s: _FW_LINKED and is same network, it needn't join again\n", __FUNCTION__);
|
||||
|
||||
rtw_indicate_connect(adapter);//rtw_indicate_connect again
|
||||
|
||||
ret = 2;
|
||||
goto exit;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
rtw_disassoc_cmd(adapter, 0, _TRUE);
|
||||
rtw_indicate_disconnect(adapter);
|
||||
rtw_free_assoc_resources(adapter, 0);
|
||||
}
|
||||
rtw_disassoc_cmd(adapter, 0, _TRUE);
|
||||
rtw_indicate_disconnect(adapter);
|
||||
rtw_free_assoc_resources(adapter, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||
|
@ -3219,45 +3146,34 @@ void rtw_update_registrypriv_dev_network(struct adapter* adapter)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
#if 0
|
||||
pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense;
|
||||
pxmitpriv->vcs = pregistrypriv->vcs_type;
|
||||
pxmitpriv->vcs_type = pregistrypriv->vcs_type;
|
||||
//pxmitpriv->rts_thresh = pregistrypriv->rts_thresh;
|
||||
pxmitpriv->frag_len = pregistrypriv->frag_thresh;
|
||||
|
||||
adapter->qospriv.qos_option = pregistrypriv->wmm_enable;
|
||||
#endif
|
||||
|
||||
pdev_network->Privacy = (psecuritypriv->dot11PrivacyAlgrthm > 0 ? 1 : 0) ; // adhoc no 802.1x
|
||||
|
||||
pdev_network->Rssi = 0;
|
||||
|
||||
switch(pregistrypriv->wireless_mode)
|
||||
{
|
||||
case WIRELESS_11B:
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11DS);
|
||||
break;
|
||||
case WIRELESS_11G:
|
||||
case WIRELESS_11BG:
|
||||
case WIRELESS_11_24N:
|
||||
case WIRELESS_11G_24N:
|
||||
case WIRELESS_11BG_24N:
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);
|
||||
break;
|
||||
case WIRELESS_11A:
|
||||
case WIRELESS_11A_5N:
|
||||
switch(pregistrypriv->wireless_mode) {
|
||||
case WIRELESS_11B:
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11DS);
|
||||
break;
|
||||
case WIRELESS_11G:
|
||||
case WIRELESS_11BG:
|
||||
case WIRELESS_11_24N:
|
||||
case WIRELESS_11G_24N:
|
||||
case WIRELESS_11BG_24N:
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);
|
||||
break;
|
||||
case WIRELESS_11A:
|
||||
case WIRELESS_11A_5N:
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5);
|
||||
break;
|
||||
case WIRELESS_11ABGN:
|
||||
if(pregistrypriv->channel > 14)
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5);
|
||||
break;
|
||||
case WIRELESS_11ABGN:
|
||||
if(pregistrypriv->channel > 14)
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5);
|
||||
else
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);
|
||||
break;
|
||||
default :
|
||||
// TODO
|
||||
break;
|
||||
else
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);
|
||||
break;
|
||||
default :
|
||||
// TODO
|
||||
break;
|
||||
}
|
||||
|
||||
pdev_network->Configuration.DSConfig = (pregistrypriv->channel);
|
||||
|
@ -3549,50 +3465,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
|
|||
// Config current HT Protection mode.
|
||||
//
|
||||
pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3;
|
||||
|
||||
|
||||
|
||||
#if 0 //move to rtw_update_sta_info_client()
|
||||
//for A-MPDU Rx reordering buffer control for bmc_sta & sta_info
|
||||
//if A-MPDU Rx is enabled, reseting rx_ordering_ctrl wstart_b(indicate_seq) to default value=0xffff
|
||||
//todo: check if AP can send A-MPDU packets
|
||||
bmc_sta = rtw_get_bcmc_stainfo(padapter);
|
||||
if(bmc_sta)
|
||||
{
|
||||
for(i=0; i < 16 ; i++)
|
||||
{
|
||||
//preorder_ctrl = &precvpriv->recvreorder_ctrl[i];
|
||||
preorder_ctrl = &bmc_sta->recvreorder_ctrl[i];
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
DBG_871X("DBG_RX_SEQ %s:%d indicate_seq:%u \n", __FUNCTION__, __LINE__,
|
||||
preorder_ctrl->indicate_seq);
|
||||
#endif
|
||||
preorder_ctrl->wend_b= 0xffff;
|
||||
preorder_ctrl->wsize_b = 64;//max_ampdu_sz;//ex. 32(kbytes) -> wsize_b=32
|
||||
}
|
||||
}
|
||||
|
||||
psta = rtw_get_stainfo(&padapter->stapriv, pcur_network->network.MacAddress);
|
||||
if(psta)
|
||||
{
|
||||
for(i=0; i < 16 ; i++)
|
||||
{
|
||||
//preorder_ctrl = &precvpriv->recvreorder_ctrl[i];
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
DBG_871X("DBG_RX_SEQ %s:%d indicate_seq:%u \n", __FUNCTION__, __LINE__,
|
||||
preorder_ctrl->indicate_seq);
|
||||
#endif
|
||||
preorder_ctrl->wend_b= 0xffff;
|
||||
preorder_ctrl->wsize_b = 64;//max_ampdu_sz;//ex. 32(kbytes) -> wsize_b=32
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
|
|
|
@ -387,10 +387,6 @@ static void init_channel_list(struct adapter *padapter, RT_CHANNEL_INFO *channel
|
|||
struct p2p_oper_class_map op_class[] = {
|
||||
{ IEEE80211G, 81, 1, 13, 1, BW20 },
|
||||
{ IEEE80211G, 82, 14, 14, 1, BW20 },
|
||||
#if 0 /* Do not enable HT40 on 2 GHz */
|
||||
{ IEEE80211G, 83, 1, 9, 1, BW40PLUS },
|
||||
{ IEEE80211G, 84, 5, 13, 1, BW40MINUS },
|
||||
#endif
|
||||
{ IEEE80211A, 115, 36, 48, 4, BW20 },
|
||||
{ IEEE80211A, 116, 36, 44, 8, BW40PLUS },
|
||||
{ IEEE80211A, 117, 40, 48, 8, BW40MINUS },
|
||||
|
@ -653,18 +649,6 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
("+mgt_dispatcher: type(0x%x) subtype(0x%x)\n",
|
||||
GetFrameType(pframe), GetFrameSubType(pframe)));
|
||||
|
||||
#if 0
|
||||
{
|
||||
u8 *pbuf;
|
||||
pbuf = GetAddr1Ptr(pframe);
|
||||
DBG_871X("A1-%x:%x:%x:%x:%x:%x\n", *pbuf, *(pbuf+1), *(pbuf+2), *(pbuf+3), *(pbuf+4), *(pbuf+5));
|
||||
pbuf = GetAddr2Ptr(pframe);
|
||||
DBG_871X("A2-%x:%x:%x:%x:%x:%x\n", *pbuf, *(pbuf+1), *(pbuf+2), *(pbuf+3), *(pbuf+4), *(pbuf+5));
|
||||
pbuf = GetAddr3Ptr(pframe);
|
||||
DBG_871X("A3-%x:%x:%x:%x:%x:%x\n", *pbuf, *(pbuf+1), *(pbuf+2), *(pbuf+3), *(pbuf+4), *(pbuf+5));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (GetFrameType(pframe) != WIFI_MGT_TYPE)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("mgt_dispatcher: type(0x%x) error!\n", GetFrameType(pframe)));
|
||||
|
@ -1052,21 +1036,7 @@ unsigned int OnProbeRsp(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
#if 0 //move to validate_recv_mgnt_frame
|
||||
if (_rtw_memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN))
|
||||
{
|
||||
if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)
|
||||
{
|
||||
if ((psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe))) != NULL)
|
||||
{
|
||||
psta->sta_stats.rx_mgnt_pkts++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return _SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
|
||||
|
@ -1175,9 +1145,6 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
process_p2p_ps_ie(padapter, (pframe + WLAN_HDR_A3_LEN), (len - WLAN_HDR_A3_LEN));
|
||||
#endif //CONFIG_P2P_PS
|
||||
|
||||
#if 0 //move to validate_recv_mgnt_frame
|
||||
psta->sta_stats.rx_mgnt_pkts++;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE)
|
||||
|
@ -1192,9 +1159,6 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
update_beacon_info(padapter, pframe, len, psta);
|
||||
}
|
||||
|
||||
#if 0 //move to validate_recv_mgnt_frame
|
||||
psta->sta_stats.rx_mgnt_pkts++;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1648,30 +1612,8 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
pstat->state |= WIFI_FW_ASSOC_STATE;
|
||||
}
|
||||
|
||||
|
||||
#if 0// todo:tkip_countermeasures
|
||||
if (hapd->tkip_countermeasures) {
|
||||
resp = WLAN_REASON_MICHAEL_MIC_FAILURE;
|
||||
goto fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
pstat->capability = capab_info;
|
||||
|
||||
#if 0//todo:
|
||||
//check listen_interval
|
||||
if (listen_interval > hapd->conf->max_listen_interval) {
|
||||
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
|
||||
HOSTAPD_LEVEL_DEBUG,
|
||||
"Too large Listen Interval (%d)",
|
||||
listen_interval);
|
||||
resp = WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
pstat->listen_interval = listen_interval;
|
||||
#endif
|
||||
|
||||
//now parse all ieee802_11 ie to point to elems
|
||||
if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed ||
|
||||
!elems.ssid) {
|
||||
|
@ -1681,7 +1623,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
goto OnAssocReqFail;
|
||||
}
|
||||
|
||||
|
||||
// now we should check all the fields...
|
||||
// checking SSID
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, &ie_len,
|
||||
|
@ -6988,16 +6929,6 @@ static int _issue_probereq(struct adapter *padapter, NDIS_802_11_SSID *pssid, u8
|
|||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &(pattrib->pktlen));
|
||||
}
|
||||
|
||||
#if 0
|
||||
//add wps_ie for wps2.0
|
||||
if(pmlmepriv->probereq_wpsie_len>0 && pmlmepriv->probereq_wpsie_len<MAX_WPS_IE_LEN)
|
||||
{
|
||||
_rtw_memcpy(pframe, pmlmepriv->probereq_wpsie, pmlmepriv->probereq_wpsie_len);
|
||||
pframe += pmlmepriv->probereq_wpsie_len;
|
||||
pattrib->pktlen += pmlmepriv->probereq_wpsie_len;
|
||||
//pmlmepriv->probereq_wpsie_len = 0 ;//reset to zero
|
||||
}
|
||||
#else
|
||||
//add wps_ie for wps2.0
|
||||
if(pmlmepriv->wps_probe_req_ie_len>0 && pmlmepriv->wps_probe_req_ie)
|
||||
{
|
||||
|
@ -7006,7 +6937,6 @@ static int _issue_probereq(struct adapter *padapter, NDIS_802_11_SSID *pssid, u8
|
|||
pattrib->pktlen += pmlmepriv->wps_probe_req_ie_len;
|
||||
//pmlmepriv->wps_probe_req_ie_len = 0 ;//reset to zero
|
||||
}
|
||||
#endif
|
||||
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
|
||||
|
@ -7447,7 +7377,6 @@ void issue_assocreq(struct adapter *padapter)
|
|||
|
||||
//supported rate & extended supported rate
|
||||
|
||||
#if 1 // Check if the AP's supported rates are also supported by STA.
|
||||
get_rate_set(padapter, sta_bssrate, &sta_bssrate_len);
|
||||
//DBG_871X("sta_bssrate_len=%d\n", sta_bssrate_len);
|
||||
|
||||
|
@ -7495,21 +7424,6 @@ void issue_assocreq(struct adapter *padapter)
|
|||
bssrate_len = index;
|
||||
DBG_871X("bssrate_len = %d\n", bssrate_len);
|
||||
|
||||
#else // Check if the AP's supported rates are also supported by STA.
|
||||
#if 0
|
||||
get_rate_set(padapter, bssrate, &bssrate_len);
|
||||
#else
|
||||
for (bssrate_len = 0; bssrate_len < NumRates; bssrate_len++) {
|
||||
if (pmlmeinfo->network.SupportedRates[bssrate_len] == 0) break;
|
||||
|
||||
if (pmlmeinfo->network.SupportedRates[bssrate_len] == 0x2C) // Avoid the proprietary data rate (22Mbps) of Handlink WSG-4000 AP
|
||||
break;
|
||||
|
||||
bssrate[bssrate_len] = pmlmeinfo->network.SupportedRates[bssrate_len];
|
||||
}
|
||||
#endif
|
||||
#endif // Check if the AP's supported rates are also supported by STA.
|
||||
|
||||
if (bssrate_len == 0) {
|
||||
rtw_free_xmitbuf(pxmitpriv, pmgntframe->pxmitbuf);
|
||||
rtw_free_xmitframe(pxmitpriv, pmgntframe);
|
||||
|
@ -9323,16 +9237,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, WLA
|
|||
}
|
||||
|
||||
//todo:
|
||||
#if 0
|
||||
if (judge_network_type(bssid->SupportedRates, (len + i)) == WIRELESS_11B)
|
||||
{
|
||||
bssid->NetworkTypeInUse = Ndis802_11DS;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
bssid->NetworkTypeInUse = Ndis802_11OFDM24;
|
||||
}
|
||||
bssid->NetworkTypeInUse = Ndis802_11OFDM24;
|
||||
|
||||
if (bssid->IELength < 12)
|
||||
return _FAIL;
|
||||
|
@ -10538,22 +10443,6 @@ void _linked_rx_signal_strehgth_display(struct adapter *padapter)
|
|||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
u8 mac_id;
|
||||
int UndecoratedSmoothedPWDB;
|
||||
#if 0
|
||||
DBG_871X("============ linked status check ===================\n");
|
||||
DBG_871X("pathA Rx SNRdb:%d, pathB Rx SNRdb:%d\n",padapter->recvpriv.RxSNRdB[0], padapter->recvpriv.RxSNRdB[1]);
|
||||
DBG_871X("pathA Rx PWDB:%d\n",padapter->recvpriv.rxpwdb);
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB);
|
||||
DBG_871X("UndecoratedSmoothedPWDB:%d\n",UndecoratedSmoothedPWDB);
|
||||
DBG_871X("Rx RSSI:%d\n",padapter->recvpriv.rssi);
|
||||
DBG_871X("Rx Signal_strength:%d\n",padapter->recvpriv.signal_strength);
|
||||
DBG_871X("Rx Signal_qual:%d \n",padapter->recvpriv.signal_qual);
|
||||
if ( check_fwstate( &padapter->mlmepriv, _FW_LINKED ) )
|
||||
{
|
||||
DBG_871X("bw mode: %d, channel: %d\n", padapter->mlmeextpriv.cur_bwmode, padapter->mlmeextpriv.cur_channel );
|
||||
DBG_871X("received bytes = %d\n", (u32) (padapter->recvpriv.rx_bytes - padapter->recvpriv.last_rx_bytes ) );
|
||||
}
|
||||
DBG_871X("============ linked status check ===================\n");
|
||||
#endif
|
||||
if((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
|
||||
{
|
||||
mac_id=0;
|
||||
|
@ -10564,19 +10453,6 @@ void _linked_rx_signal_strehgth_display(struct adapter *padapter)
|
|||
}
|
||||
|
||||
rtw_hal_get_def_var(padapter, HW_DEF_RA_INFO_DUMP,&mac_id);
|
||||
#if 0
|
||||
DBG_871X("============ RX GAIN / FALSE ALARM ===================\n");
|
||||
DBG_871X(" DIG PATH-A(0x%02x), PATH-B(0x%02x)\n",rtw_read8(padapter,0xc50),rtw_read8(padapter,0xc58));
|
||||
DBG_871X(" OFDM -Alarm DA2(0x%04x),DA4(0x%04x),DA6(0x%04x),DA8(0x%04x)\n",
|
||||
rtw_read16(padapter,0xDA2),rtw_read16(padapter,0xDA4),rtw_read16(padapter,0xDA6),rtw_read16(padapter,0xDA8));
|
||||
|
||||
DBG_871X(" CCK -Alarm A5B(0x%02x),A5C(0x%02x)\n",rtw_read8(padapter,0xA5B),rtw_read8(padapter,0xA5C));
|
||||
#endif
|
||||
|
||||
|
||||
//rtw_hal_get_def_var(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB);
|
||||
//DBG_871X("UndecoratedSmoothedPWDB:%d\n",UndecoratedSmoothedPWDB);
|
||||
|
||||
}
|
||||
|
||||
static u8 chk_ap_is_alive(struct adapter *padapter, struct sta_info *psta)
|
||||
|
@ -10903,69 +10779,6 @@ void link_timer_hdl(struct adapter *padapter)
|
|||
issue_assocreq(padapter);
|
||||
set_link_timer(pmlmeext, REASSOC_TO);
|
||||
}
|
||||
#if 0
|
||||
else if (is_client_associated_to_ap(padapter))
|
||||
{
|
||||
//linked infrastructure client mode
|
||||
if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL)
|
||||
{
|
||||
/*to monitor whether the AP is alive or not*/
|
||||
if (rx_pkt == psta->sta_stats.rx_pkts)
|
||||
{
|
||||
receive_disconnect(padapter, pmlmeinfo->network.MacAddress);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
rx_pkt = psta->sta_stats.rx_pkts;
|
||||
set_link_timer(pmlmeext, DISCONNECT_TO);
|
||||
}
|
||||
|
||||
//update the EDCA paramter according to the Tx/RX mode
|
||||
update_EDCA_param(padapter);
|
||||
|
||||
/*to send the AP a nulldata if no frame is xmitted in order to keep alive*/
|
||||
if (pmlmeinfo->link_count++ == 0)
|
||||
{
|
||||
tx_cnt = pxmitpriv->tx_pkts;
|
||||
}
|
||||
else if ((pmlmeinfo->link_count & 0xf) == 0)
|
||||
{
|
||||
if (tx_cnt == pxmitpriv->tx_pkts)
|
||||
{
|
||||
issue_nulldata(padapter, NULL, 0, 0, 0);
|
||||
}
|
||||
|
||||
tx_cnt = pxmitpriv->tx_pkts;
|
||||
}
|
||||
} //end of if ((psta = rtw_get_stainfo(pstapriv, passoc_res->network.MacAddress)) != NULL)
|
||||
}
|
||||
else if (is_client_associated_to_ibss(padapter))
|
||||
{
|
||||
//linked IBSS mode
|
||||
//for each assoc list entry to check the rx pkt counter
|
||||
for (i = IBSS_START_MAC_ID; i < NUM_STA; i++)
|
||||
{
|
||||
if (pmlmeinfo->FW_sta_info[i].status == 1)
|
||||
{
|
||||
psta = pmlmeinfo->FW_sta_info[i].psta;
|
||||
|
||||
if (pmlmeinfo->FW_sta_info[i].rx_pkt == psta->sta_stats.rx_pkts)
|
||||
{
|
||||
pmlmeinfo->FW_sta_info[i].status = 0;
|
||||
report_del_sta_event(padapter, psta->hwaddr);
|
||||
}
|
||||
else
|
||||
{
|
||||
pmlmeinfo->FW_sta_info[i].rx_pkt = psta->sta_stats.rx_pkts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set_link_timer(pmlmeext, DISCONNECT_TO);
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -11252,35 +11065,6 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
|
|||
|
||||
i += (pIE->Length + 2);
|
||||
}
|
||||
#if 0
|
||||
if (padapter->registrypriv.wifi_spec) {
|
||||
// for WiFi test, follow WMM test plan spec
|
||||
acparm = 0x002F431C; // VO
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm));
|
||||
acparm = 0x005E541C; // VI
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm));
|
||||
acparm = 0x0000A525; // BE
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm));
|
||||
acparm = 0x0000A549; // BK
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm));
|
||||
|
||||
// for WiFi test, mixed mode with intel STA under bg mode throughput issue
|
||||
if (padapter->mlmepriv.htpriv.ht_option == _FALSE){
|
||||
acparm = 0x00004320;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm));
|
||||
}
|
||||
}
|
||||
else {
|
||||
acparm = 0x002F3217; // VO
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm));
|
||||
acparm = 0x005E4317; // VI
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm));
|
||||
acparm = 0x00105320; // BE
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm));
|
||||
acparm = 0x0000A444; // BK
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* check channel, bandwidth, offset and switch */
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
|
@ -11537,14 +11321,6 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf)
|
|||
|
||||
if ((pmlmeext->sitesurvey_res.state == SCAN_START) || (pmlmeext->sitesurvey_res.state == SCAN_TXNULL))
|
||||
{
|
||||
#ifdef CONFIG_FIND_BEST_CHANNEL
|
||||
#if 0
|
||||
for (i=0; pmlmeext->channel_set[i].ChannelNum !=0; i++) {
|
||||
pmlmeext->channel_set[i].rx_count = 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_FIND_BEST_CHANNEL */
|
||||
|
||||
//disable dynamic functions, such as high power, DIG
|
||||
Save_DM_Func_Flag(padapter);
|
||||
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
||||
|
|
|
@ -343,20 +343,6 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
|
|||
RTW_PUT_BE32(wpsie, WPSOUI);
|
||||
wpsielen += 4;
|
||||
|
||||
#if 0
|
||||
// WPS version
|
||||
// Type:
|
||||
*(u16*) ( wpsie + wpsielen ) = cpu_to_be16( WPS_ATTR_VER1 );
|
||||
wpsielen += 2;
|
||||
|
||||
// Length:
|
||||
*(u16*) ( wpsie + wpsielen ) = cpu_to_be16( 0x0001 );
|
||||
wpsielen += 2;
|
||||
|
||||
// Value:
|
||||
wpsie[wpsielen++] = WPS_VERSION_1; // Version 1.0
|
||||
#endif
|
||||
|
||||
// Config Method
|
||||
// Type:
|
||||
//*(u16*) ( wpsie + wpsielen ) = cpu_to_be16( WPS_ATTR_CONF_METHOD );
|
||||
|
@ -5172,21 +5158,7 @@ void dbg_rtw_p2p_set_pre_state(struct wifidirect_info *wdinfo, enum P2P_STATE st
|
|||
);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
void dbg_rtw_p2p_restore_state(struct wifidirect_info *wdinfo, const char *caller, int line)
|
||||
{
|
||||
if(wdinfo->pre_p2p_state != -1) {
|
||||
DBG_871X("[CONFIG_DBG_P2P]%s:%d restore from %s to %s\n", caller, line
|
||||
, p2p_state_str[wdinfo->p2p_state], p2p_state_str[wdinfo->pre_p2p_state]
|
||||
);
|
||||
_rtw_p2p_restore_state(wdinfo);
|
||||
} else {
|
||||
DBG_871X("[CONFIG_DBG_P2P]%s:%d restore no pre state, cur state %s\n", caller, line
|
||||
, p2p_state_str[wdinfo->p2p_state]
|
||||
);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void dbg_rtw_p2p_set_role(struct wifidirect_info *wdinfo, enum P2P_ROLE role, const char *caller, int line)
|
||||
{
|
||||
if(wdinfo->role != role) {
|
||||
|
|
|
@ -949,15 +949,6 @@ void cpwm_int_hdl(
|
|||
_func_enter_;
|
||||
|
||||
pwrpriv = adapter_to_pwrctl(padapter);
|
||||
#if 0
|
||||
if (pwrpriv->cpwm_tog == (preportpwrstate->state & PS_TOGGLE)) {
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
|
||||
("cpwm_int_hdl: tog(old)=0x%02x cpwm(new)=0x%02x toggle bit didn't change!?\n",
|
||||
pwrpriv->cpwm_tog, preportpwrstate->state));
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
|
||||
#ifdef CONFIG_LPS_RPWM_TIMER
|
||||
|
|
118
core/rtw_recv.c
118
core/rtw_recv.c
|
@ -664,30 +664,12 @@ _func_enter_;
|
|||
&& (psecuritypriv->busetkipkey==1 || prxattrib->encrypt !=_TKIP_ )
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
if((prxstat->icv==1)&&(prxattrib->encrypt!=_AES_))
|
||||
{
|
||||
psecuritypriv->hw_decrypted=_FALSE;
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("psecuritypriv->hw_decrypted=_FALSE"));
|
||||
|
||||
rtw_free_recvframe(precv_frame, &padapter->recvpriv.free_recv_queue);
|
||||
|
||||
return_packet=NULL;
|
||||
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
psecuritypriv->hw_decrypted=_TRUE;
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
DBG_871X("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
||||
, prxattrib->bdecrypted ,prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
psecuritypriv->hw_decrypted=_TRUE;
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
DBG_871X("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, Setting psecuritypriv->hw_decrypted = %d\n"
|
||||
, prxattrib->bdecrypted ,prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
DBG_871X("prxstat->bdecrypted:%d, prxattrib->encrypt:%d, psecuritypriv->hw_decrypted:%d\n"
|
||||
, prxattrib->bdecrypted ,prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
||||
|
@ -1630,22 +1612,12 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_
|
|||
|
||||
//DBG_871X("handling ps-poll, q_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
||||
|
||||
#if 0
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
#endif
|
||||
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
||||
|
||||
if(psta->sleepq_len==0)
|
||||
{
|
||||
pstapriv->tim_bitmap &= ~BIT(psta->aid);
|
||||
|
||||
//DBG_871X("after handling ps-poll, tim=%x\n", pstapriv->tim_bitmap);
|
||||
|
||||
//upate BCN for TIM IE
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
|
@ -1703,21 +1675,6 @@ sint validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame *precv_
|
|||
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("+validate_recv_mgnt_frame\n"));
|
||||
|
||||
#if 0
|
||||
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
{
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
mgt_dispatcher(padapter, precv_frame);
|
||||
#else
|
||||
rtw_hostapd_mlme_rx(padapter, precv_frame);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
mgt_dispatcher(padapter, precv_frame);
|
||||
}
|
||||
#endif
|
||||
|
||||
precv_frame = recvframe_chk_defrag(padapter, precv_frame);
|
||||
if (precv_frame == NULL) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_,("%s: fragment packet\n",__FUNCTION__));
|
||||
|
@ -1933,14 +1890,6 @@ _func_enter_;
|
|||
goto exit;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(psta->tdls_sta_state & TDLS_LINKED_STATE )
|
||||
{
|
||||
if(psta->dot118021XPrivacy==_AES_)
|
||||
pattrib->encrypt=psta->dot118021XPrivacy;
|
||||
}
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
if(pattrib->privacy){
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("validate_recv_data_frame:pattrib->privacy=%x\n", pattrib->privacy));
|
||||
|
@ -3071,12 +3020,6 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
|
|||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
#if 0
|
||||
// Check if there is any other indication thread running.
|
||||
if(pTS->RxIndicateState == RXTS_INDICATE_PROCESSING)
|
||||
return;
|
||||
#endif
|
||||
|
||||
// Handling some condition for forced indicate case.
|
||||
if(bforced==_TRUE)
|
||||
{
|
||||
|
@ -3109,17 +3052,6 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
|
|||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_,
|
||||
("recv_indicatepkts_in_order: indicate=%d seq=%d amsdu=%d\n",
|
||||
preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
|
||||
|
||||
#if 0
|
||||
// This protect buffer from overflow.
|
||||
if(index >= REORDER_WIN_SIZE)
|
||||
{
|
||||
RT_ASSERT(FALSE, ("IndicateRxReorderList(): Buffer overflow!! \n"));
|
||||
bPktInBuf = TRUE;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
plist = get_next(plist);
|
||||
rtw_list_delete(&(prframe->u.hdr.list));
|
||||
|
||||
|
@ -3132,20 +3064,6 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
|
|||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
index++;
|
||||
if(index==1)
|
||||
{
|
||||
//Cancel previous pending timer.
|
||||
//PlatformCancelTimer(Adapter, &pTS->RxPktPendingTimer);
|
||||
if(bforced!=_TRUE)
|
||||
{
|
||||
//DBG_871X("_cancel_timer(&preorder_ctrl->reordering_ctrl_timer, &bcancelled);\n");
|
||||
_cancel_timer(&preorder_ctrl->reordering_ctrl_timer, &bcancelled);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//Set this as a lock to make sure that only one thread is indicating packet.
|
||||
//pTS->RxIndicateState = RXTS_INDICATE_PROCESSING;
|
||||
|
||||
|
@ -3332,15 +3250,7 @@ int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *prframe
|
|||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s check_indicate_seq fail\n", __FUNCTION__);
|
||||
#endif
|
||||
#if 0
|
||||
rtw_recv_indicatepkt(padapter, prframe);
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
goto _success_exit;
|
||||
#else
|
||||
goto _err_exit;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -3543,22 +3453,6 @@ int recv_func_posthandle(struct adapter *padapter, union recv_frame *prframe)
|
|||
goto _recv_data_drop;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if ( padapter->adapter_type == PRIMARY_ADAPTER )
|
||||
{
|
||||
DBG_871X("+++\n");
|
||||
{
|
||||
int i;
|
||||
u8 *ptr = get_recvframe_data(prframe);
|
||||
for(i=0; i<140;i=i+8)
|
||||
DBG_871X("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:", *(ptr+i),
|
||||
*(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7));
|
||||
|
||||
}
|
||||
DBG_871X("---\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
//check TDLS frame
|
||||
psnap_type = get_recvframe_data(orig_prframe);
|
||||
|
|
|
@ -135,22 +135,6 @@ void sreset_restore_security_station(struct adapter *padapter)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8));
|
||||
}
|
||||
|
||||
#if 0
|
||||
if ( ( padapter->securitypriv.dot11PrivacyAlgrthm == _WEP40_ ) ||
|
||||
( padapter->securitypriv.dot11PrivacyAlgrthm == _WEP104_ ))
|
||||
{
|
||||
|
||||
for(EntryId=0; EntryId<4; EntryId++)
|
||||
{
|
||||
if(EntryId == psecuritypriv->dot11PrivacyKeyIndex)
|
||||
rtw_set_key(padapter,&padapter->securitypriv, EntryId, 1,_FALSE);
|
||||
else
|
||||
rtw_set_key(padapter,&padapter->securitypriv, EntryId, 0,_FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) ||
|
||||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_))
|
||||
{
|
||||
|
@ -174,25 +158,6 @@ void sreset_restore_network_station(struct adapter *padapter)
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
#if 0
|
||||
{
|
||||
//=======================================================
|
||||
// reset related register of Beacon control
|
||||
|
||||
//set MSR to nolink
|
||||
Set_MSR(padapter, _HW_STATE_NOLINK_);
|
||||
// reject all data frame
|
||||
rtw_write16(padapter, REG_RXFLTMAP2,0x00);
|
||||
//reset TSF
|
||||
rtw_write8(padapter, REG_DUAL_TSF_RST, (BIT(0)|BIT(1)));
|
||||
|
||||
// disable update TSF
|
||||
SetBcnCtrlReg(padapter, BIT(4), 0);
|
||||
|
||||
//=======================================================
|
||||
}
|
||||
#endif
|
||||
|
||||
rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure,_FALSE);
|
||||
|
||||
{
|
||||
|
|
|
@ -657,22 +657,7 @@ void invalidate_cam_all(struct adapter *padapter)
|
|||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL);
|
||||
}
|
||||
#if 0
|
||||
static u32 _ReadCAM(struct adapter *padapter ,u32 addr)
|
||||
{
|
||||
u32 count = 0, cmd;
|
||||
cmd = CAM_POLLINIG |addr ;
|
||||
rtw_write32(padapter, RWCAM, cmd);
|
||||
|
||||
do{
|
||||
if(0 == (rtw_read32(padapter,REG_CAMCMD) & CAM_POLLINIG)){
|
||||
break;
|
||||
}
|
||||
}while(count++ < 100);
|
||||
|
||||
return rtw_read32(padapter,REG_CAMREAD);
|
||||
}
|
||||
#endif
|
||||
void read_cam(struct adapter *padapter ,u8 entry)
|
||||
{
|
||||
u32 j,count = 0, addr;
|
||||
|
@ -738,33 +723,11 @@ void write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key)
|
|||
|
||||
void clear_cam_entry(struct adapter *padapter, u8 entry)
|
||||
{
|
||||
#if 0
|
||||
u32 addr, val=0;
|
||||
u32 cam_val[2];
|
||||
|
||||
addr = entry << 3;
|
||||
|
||||
|
||||
cam_val[0] = val;
|
||||
cam_val[1] = addr + (unsigned int)0;
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_WRITE, (u8 *)cam_val);
|
||||
|
||||
|
||||
|
||||
cam_val[0] = val;
|
||||
cam_val[1] = addr + (unsigned int)1;
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_WRITE, (u8 *)cam_val);
|
||||
#else
|
||||
|
||||
unsigned char null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
unsigned char null_key[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
write_cam(padapter, entry, 0, null_sta, null_key);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
int allocate_fw_sta_entry(struct adapter *padapter)
|
||||
|
@ -1275,57 +1238,6 @@ void HTOnAssocRsp(struct adapter *padapter)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_MIN_SPACE, (u8 *)(&min_MPDU_spacing));
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&max_AMPDU_len));
|
||||
|
||||
#if 0 //move to rtw_update_ht_cap()
|
||||
if ((pregpriv->cbw40_enable) &&
|
||||
(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & BIT(1)) &&
|
||||
(pmlmeinfo->HT_info.infos[0] & BIT(2)))
|
||||
{
|
||||
//switch to the 40M Hz mode accoring to the AP
|
||||
pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40;
|
||||
switch ((pmlmeinfo->HT_info.infos[0] & 0x3))
|
||||
{
|
||||
case HT_EXTCHNL_OFFSET_UPPER:
|
||||
pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
|
||||
break;
|
||||
|
||||
case HT_EXTCHNL_OFFSET_LOWER:
|
||||
pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
|
||||
break;
|
||||
|
||||
default:
|
||||
pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
break;
|
||||
}
|
||||
|
||||
//SelectChannel(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset);
|
||||
}
|
||||
#endif
|
||||
|
||||
//set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||
|
||||
#if 0 //move to rtw_update_ht_cap()
|
||||
//
|
||||
// Config SM Power Save setting
|
||||
//
|
||||
pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & 0x0C) >> 2;
|
||||
if(pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
|
||||
{
|
||||
/*u8 i;
|
||||
//update the MCS rates
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
pmlmeinfo->HT_caps.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i];
|
||||
}*/
|
||||
DBG_871X("%s(): WLAN_HT_CAP_SM_PS_STATIC\n",__FUNCTION__);
|
||||
}
|
||||
|
||||
//
|
||||
// Config current HT Protection mode.
|
||||
//
|
||||
pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void ERP_IE_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||
|
@ -1634,36 +1546,24 @@ void update_beacon_info(struct adapter *padapter, u8 *pframe, uint pkt_len, stru
|
|||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
#if 0
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
//todo: to update WMM paramter set while receiving beacon
|
||||
if (_rtw_memcmp(pIE->data, WMM_PARA_OUI, 6)) //WMM
|
||||
{
|
||||
(WMM_param_handler(padapter, pIE))? WMMOnAssocRsp(padapter): 0;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
case _HT_EXTRA_INFO_IE_: //HT info
|
||||
//HT_info_handler(padapter, pIE);
|
||||
bwmode_update_check(padapter, pIE);
|
||||
break;
|
||||
|
||||
case _ERPINFO_IE_:
|
||||
ERP_IE_handler(padapter, pIE);
|
||||
VCS_update(padapter, psta);
|
||||
break;
|
||||
switch (pIE->ElementID) {
|
||||
case _HT_EXTRA_INFO_IE_: //HT info
|
||||
//HT_info_handler(padapter, pIE);
|
||||
bwmode_update_check(padapter, pIE);
|
||||
break;
|
||||
|
||||
case _ERPINFO_IE_:
|
||||
ERP_IE_handler(padapter, pIE);
|
||||
VCS_update(padapter, psta);
|
||||
break;
|
||||
#ifdef CONFIG_TDLS
|
||||
case _EXT_CAP_IE_:
|
||||
if( check_ap_tdls_prohibited(pIE->data, pIE->Length) == _TRUE )
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
break;
|
||||
case _EXT_CAP_IE_:
|
||||
if( check_ap_tdls_prohibited(pIE->data, pIE->Length) == _TRUE )
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
break;
|
||||
#endif //CONFIG_TDLS
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
i += (pIE->Length + 2);
|
||||
|
@ -2300,32 +2200,8 @@ void update_wireless_mode(struct adapter *padapter)
|
|||
update_mgnt_tx_rate(padapter, IEEE80211_OFDM_RATE_6MB);
|
||||
}
|
||||
|
||||
void fire_write_MAC_cmd(struct adapter *padapter, unsigned int addr, unsigned int value);
|
||||
void fire_write_MAC_cmd(struct adapter *padapter, unsigned int addr, unsigned int value)
|
||||
{
|
||||
#if 0
|
||||
struct cmd_obj *ph2c;
|
||||
struct reg_rw_parm *pwriteMacPara;
|
||||
struct cmd_priv *pcmdpriv = &(padapter->cmdpriv);
|
||||
|
||||
if ((ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pwriteMacPara = (struct reg_rw_parm*)rtw_malloc(sizeof(struct reg_rw_parm))) == NULL)
|
||||
{
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
return;
|
||||
}
|
||||
|
||||
pwriteMacPara->rw = 1;
|
||||
pwriteMacPara->addr = addr;
|
||||
pwriteMacPara->value = value;
|
||||
|
||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pwriteMacPara, GEN_CMD_CODE(_Write_MACREG));
|
||||
rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
#endif
|
||||
}
|
||||
|
||||
void update_bmc_sta_support_rate(struct adapter *padapter, u32 mac_id)
|
||||
|
@ -2432,108 +2308,6 @@ void beacon_timing_control(struct adapter *padapter)
|
|||
rtw_hal_bcn_related_reg_setting(padapter);
|
||||
}
|
||||
|
||||
#if 0
|
||||
unsigned int setup_beacon_frame(struct adapter *padapter, unsigned char *beacon_frame)
|
||||
{
|
||||
unsigned short ATIMWindow;
|
||||
unsigned char *pframe;
|
||||
struct tx_desc *ptxdesc;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
unsigned int rate_len, len = 0;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network);
|
||||
u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
_rtw_memset(beacon_frame, 0, 256);
|
||||
|
||||
pframe = beacon_frame + TXDESC_SIZE;
|
||||
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||
|
||||
fctrl = &(pwlanhdr->frame_ctl);
|
||||
*(fctrl) = 0;
|
||||
|
||||
_rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
|
||||
|
||||
SetFrameSubType(pframe, WIFI_BEACON);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
len = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
||||
//timestamp will be inserted by hardware
|
||||
pframe += 8;
|
||||
len += 8;
|
||||
|
||||
// beacon interval: 2 bytes
|
||||
_rtw_memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2);
|
||||
|
||||
pframe += 2;
|
||||
len += 2;
|
||||
|
||||
// capability info: 2 bytes
|
||||
_rtw_memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2);
|
||||
|
||||
pframe += 2;
|
||||
len += 2;
|
||||
|
||||
// SSID
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &len);
|
||||
|
||||
// supported rates...
|
||||
rate_len = rtw_get_rateset_len(cur_network->SupportedRates);
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8)? 8: rate_len), cur_network->SupportedRates, &len);
|
||||
|
||||
// DS parameter set
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &len);
|
||||
|
||||
// IBSS Parameter Set...
|
||||
//ATIMWindow = cur->Configuration.ATIMWindow;
|
||||
ATIMWindow = 0;
|
||||
pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &len);
|
||||
|
||||
//todo: ERP IE
|
||||
|
||||
// EXTERNDED SUPPORTED RATE
|
||||
if (rate_len > 8)
|
||||
{
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &len);
|
||||
}
|
||||
|
||||
if ((len + TXDESC_SIZE) > 256)
|
||||
{
|
||||
//DBG_871X("marc: beacon frame too large\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//fill the tx descriptor
|
||||
ptxdesc = (struct tx_desc *)beacon_frame;
|
||||
|
||||
//offset 0
|
||||
ptxdesc->txdw0 |= cpu_to_le32(len & 0x0000ffff);
|
||||
ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & 0x00ff0000); //default = 32 bytes for TX Desc
|
||||
|
||||
//offset 4
|
||||
ptxdesc->txdw1 |= cpu_to_le32((0x10 << QSEL_SHT) & 0x00001f00);
|
||||
|
||||
//offset 8
|
||||
ptxdesc->txdw2 |= cpu_to_le32(BMC);
|
||||
ptxdesc->txdw2 |= cpu_to_le32(BK);
|
||||
|
||||
//offset 16
|
||||
ptxdesc->txdw4 = 0x80000000;
|
||||
|
||||
//offset 20
|
||||
ptxdesc->txdw5 = 0x00000000; //1M
|
||||
|
||||
return (len + TXDESC_SIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct adapter *pbuddy_padapter = NULL;
|
||||
|
||||
int rtw_handle_dualmac(struct adapter *adapter, bool init)
|
||||
|
@ -2542,16 +2316,6 @@ int rtw_handle_dualmac(struct adapter *adapter, bool init)
|
|||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
|
||||
if (init) {
|
||||
#if 0
|
||||
/* For SMSP on 92DU-VC, driver do not probe another Interface. */
|
||||
if(dvobj->NumInterfaces == 2 && dvobj->InterfaceNumber != 0 &&
|
||||
adapter->registrypriv.mac_phy_mode == 1) {
|
||||
DBG_871X("%s(): Do not init another USB Interface because SMSP\n",__FUNCTION__);
|
||||
status = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pbuddy_padapter == NULL) {
|
||||
pbuddy_padapter = adapter;
|
||||
DBG_871X("%s(): pbuddy_padapter == NULL, Set pbuddy_padapter\n",__FUNCTION__);
|
||||
|
|
|
@ -490,22 +490,6 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
{
|
||||
while (_TRUE)
|
||||
{
|
||||
#if 0 //Todo
|
||||
//check IOT action
|
||||
if(pHTInfo->IOTAction & HT_IOT_ACT_FORCED_CTS2SELF)
|
||||
{
|
||||
pattrib->vcs_mode = CTS_TO_SELF;
|
||||
pattrib->rts_rate = MGN_24M;
|
||||
break;
|
||||
}
|
||||
else if(pHTInfo->IOTAction & (HT_IOT_ACT_FORCED_RTS|HT_IOT_ACT_PURE_N_MODE))
|
||||
{
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
pattrib->rts_rate = MGN_24M;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
//IOT action
|
||||
if((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en==_TRUE) &&
|
||||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_ ))
|
||||
|
@ -3146,25 +3130,6 @@ int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
*((unsigned short *)(skb->data+MACADDRLEN*2+2)) = vlan_hdr;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
else{
|
||||
if (*((unsigned short *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_8021Q)) {
|
||||
is_vlan_tag = 1;
|
||||
}
|
||||
|
||||
if(is_vlan_tag){
|
||||
if(ICMPV6_MCAST_MAC(skb->data) && ICMPV6_PROTO1A_VALN(skb->data)){
|
||||
memcpy(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN);
|
||||
}
|
||||
}else
|
||||
{
|
||||
if(ICMPV6_MCAST_MAC(skb->data) && ICMPV6_PROTO1A(skb->data)){
|
||||
memcpy(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
// check if SA is equal to our MAC
|
||||
if (memcmp(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN)) {
|
||||
//priv->ext_stats.tx_drops++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue