rtl8188eu: Remove dead code inside #if 0 .... #endif

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-11-12 19:26:10 -06:00
parent e3e242b712
commit f0050d3365
52 changed files with 38 additions and 3703 deletions

View file

@ -276,10 +276,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
ret = _TRUE;
@ -936,11 +932,6 @@ static void rtw_set_hw_wmm_param(_adapter *padapter)
/*TODO:*/
acm_mask = 0;
padapter->mlmepriv.acm_mask = acm_mask;
#if 0
/* BK */
/* AIFS = AIFSN * slot time + SIFS - r2t phy delay */
#endif
AIFS = (7 * pmlmeinfo->slotTime) + aSifsTime;
ECWMin = 4;
ECWMax = 10;
@ -1530,45 +1521,7 @@ int rtw_check_beacon_data(_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
}
}
/* wpa */
@ -1589,53 +1542,12 @@ int rtw_check_beacon_data(_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;
}
if ((p == NULL) || (ie_len == 0))
break;
}
/* wmm */
@ -2246,19 +2158,6 @@ static u8 rtw_ap_bmc_frames_hdl(_adapter *padapter)
_exit_critical_bh(&pxmitpriv->lock, &irqL);
#if 0
/* HIQ Check */
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty);
while (_FALSE == empty && rtw_get_passing_time_ms(start) < 3000) {
rtw_msleep_os(100);
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty);
}
RTW_INFO("check if hiq empty=%d\n", empty);
#endif
return H2C_SUCCESS;
}
@ -2864,19 +2763,6 @@ void bss_cap_update_on_sta_join(_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) {
psta->no_short_preamble_set = 1;
@ -2905,15 +2791,6 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
}
}
#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) {
psta->nonerp_set = 1;
@ -2939,19 +2816,6 @@ void bss_cap_update_on_sta_join(_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) {
psta->no_short_slot_time_set = 1;
@ -3924,17 +3788,6 @@ void tx_beacon_handler(struct dvobj_priv *pdvobj)
/*update_beacon(padapter, _TIM_IE_, NULL, _FALSE);*/
issue_beacon(padapter, 0);
}
#if 0
/* handle any buffered BC/MC frames*/
/* Don't dynamically change DIS_ATIM due to HW will auto send ACQ after HIQ empty.*/
val8 = *((unsigned char *)priv->beaconbuf + priv->timoffset + 4);
if (val8 & 0x01) {
process_mcast_dzqueue(priv);
priv->pkt_in_dtimQ = 0;
}
#endif
}
void tx_beacon_timer_handler(struct dvobj_priv *pdvobj)

View file

@ -550,9 +550,6 @@ u8 rtw_btcoex_send_event_to_BT(_adapter *padapter, u8 status, u8 event_code, u8
/* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2;
#if 0
rtw_btcoex_dump_tx_msg((u8 *)pEvent, tx_event_length, dbg_msg);
#endif
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
return status;
@ -628,9 +625,6 @@ u8 rtw_btcoex_parse_BT_info_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen)
/* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2;
#if 0
rtw_btcoex_dump_tx_msg((u8 *)pEvent, tx_event_length, "BT_info_event");
#endif
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
return status;
@ -679,9 +673,6 @@ u8 rtw_btcoex_parse_BT_patch_ver_info_cmd(_adapter *padapter, u8 *pcmd, u16 cmdl
/* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2;
#if 0
rtw_btcoex_dump_tx_msg((u8 *)pEvent, tx_event_length, "BT_patch_event");
#endif
status = rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
return status;
/* bthci_IndicateEvent(Adapter, PPacketIrpEvent, len+2); */
@ -1258,10 +1249,6 @@ void rtw_btcoex_recvmsgbysocket(void *data)
u32 len = 0;
u16 recv_length = 0;
u16 parse_res = 0;
#if 0
u8 para_len = 0, polling_enable = 0, poling_interval = 0, reason = 0, btinfo_len = 0;
u8 btinfo[BT_INFO_LEN] = {0};
#endif
struct bt_coex_info *pcoex_info = NULL;
struct sock *sk = NULL;
@ -1292,40 +1279,6 @@ void rtw_btcoex_recvmsgbysocket(void *data)
_rtw_memcpy(recv_data, skb->data + 8, recv_length);
parse_res = rtw_btcoex_parse_recv_data(recv_data, recv_length);
#if 0
if (RX_ATTEND_ACK == parse_res) {
/* attend ack */
pcoex_info->BT_attend = _TRUE;
RTW_INFO("RX_ATTEND_ACK!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
} else if (RX_ATTEND_REQ == parse_res) {
/* attend req from BT */
pcoex_info->BT_attend = _TRUE;
RTW_INFO("RX_BT_ATTEND_REQ!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, attend_ack, sizeof(attend_ack), _FALSE);
} else if (RX_INVITE_REQ == parse_res) {
/* invite req from BT */
pcoex_info->BT_attend = _TRUE;
RTW_INFO("RX_INVITE_REQ!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, invite_rsp, sizeof(invite_rsp), _FALSE);
} else if (RX_INVITE_RSP == parse_res) {
/* invite rsp */
pcoex_info->BT_attend = _TRUE;
RTW_INFO("RX_INVITE_RSP!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
} else if (RX_LEAVE_ACK == parse_res) {
/* mean BT know wifi will leave */
pcoex_info->BT_attend = _FALSE;
RTW_INFO("RX_LEAVE_ACK!,sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
} else if (RX_BT_LEAVE == parse_res) {
/* BT leave */
rtw_btcoex_sendmsgbysocket(pbtcoexadapter, leave_ack, sizeof(leave_ack), _FALSE); /* no ack */
pcoex_info->BT_attend = _FALSE;
RTW_INFO("RX_BT_LEAVE!sock_open:%d, BT_attend:%d\n", pcoex_info->sock_open, pcoex_info->BT_attend);
} else {
/* todo: check if recv data are really hci cmds */
if (_TRUE == pcoex_info->BT_attend)
rtw_btcoex_parse_hci_cmd(pbtcoexadapter, recv_data, recv_length);
}
#endif
switch (parse_res) {
case RX_ATTEND_ACK:
/* attend ack */
@ -1618,11 +1571,7 @@ void rtw_btcoex_SendEventExtBtCoexControl(PADAPTER padapter, u8 bNeedDbgRsp, u8
/* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2;
#if 0
rtw_btcoex_dump_tx_msg((u8 *)pEvent, tx_event_length, "BT COEX CONTROL", _FALSE);
#endif
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
}
/* Porting from Windows team */
@ -1660,11 +1609,7 @@ void rtw_btcoex_SendEventExtBtInfoControl(PADAPTER padapter, u8 dataLen, void *p
/* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2;
#if 0
rtw_btcoex_dump_tx_msg((u8 *)pEvent, tx_event_length, "BT INFO CONTROL");
#endif
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
}
void rtw_btcoex_SendScanNotify(PADAPTER padapter, u8 scanType)
@ -1700,9 +1645,6 @@ void rtw_btcoex_SendScanNotify(PADAPTER padapter, u8 scanType)
/* total tx event length + EventCode length + sizeof(length) */
tx_event_length = pEvent->Length + 2;
#if 0
rtw_btcoex_dump_tx_msg((u8 *)pEvent, tx_event_length, "WIFI SCAN OPERATION");
#endif
rtw_btcoex_sendmsgbysocket(padapter, (u8 *)pEvent, tx_event_length, _FALSE);
}
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */

View file

@ -2779,14 +2779,6 @@ void rtw_dump_drv_phy_cap(void *sel, _adapter *adapter)
struct registry_priv *pregistry_priv = &adapter->registrypriv;
RTW_PRINT_SEL(sel, "\n ======== DRV's configuration ========\n");
#if 0
RTW_PRINT_SEL(sel, "[DRV CAP] TRx Capability : 0x%08x\n", phy_spec->trx_cap);
RTW_PRINT_SEL(sel, "[DRV CAP] Tx Stream Num Index : %d\n", (phy_spec->trx_cap >> 24) & 0xFF); /*Tx Stream Num Index [31:24]*/
RTW_PRINT_SEL(sel, "[DRV CAP] Rx Stream Num Index : %d\n", (phy_spec->trx_cap >> 16) & 0xFF); /*Rx Stream Num Index [23:16]*/
RTW_PRINT_SEL(sel, "[DRV CAP] Tx Path Num Index : %d\n", (phy_spec->trx_cap >> 8) & 0xFF);/*Tx Path Num Index [15:8]*/
RTW_PRINT_SEL(sel, "[DRV CAP] Rx Path Num Index : %d\n", (phy_spec->trx_cap & 0xFF));/*Rx Path Num Index [7:0]*/
#endif
RTW_PRINT_SEL(sel, "[DRV CAP] STBC Capability : 0x%02x\n", pregistry_priv->stbc_cap);
RTW_PRINT_SEL(sel, "[DRV CAP] VHT STBC Tx : %s\n", (TEST_FLAG(pregistry_priv->stbc_cap, BIT1)) ? "V" : "X"); /*BIT1: Enable VHT STBC Tx*/
RTW_PRINT_SEL(sel, "[DRV CAP] VHT STBC Rx : %s\n", (TEST_FLAG(pregistry_priv->stbc_cap, BIT0)) ? "V" : "X"); /*BIT0: Enable VHT STBC Rx*/
@ -2799,13 +2791,6 @@ void rtw_dump_drv_phy_cap(void *sel, _adapter *adapter)
RTW_PRINT_SEL(sel, "[DRV CAP] HT LDPC Tx : %s\n", (TEST_FLAG(pregistry_priv->ldpc_cap, BIT5)) ? "V" : "X"); /*BIT5: Enable HT LDPC Tx*/
RTW_PRINT_SEL(sel, "[DRV CAP] HT LDPC Rx : %s\n\n", (TEST_FLAG(pregistry_priv->ldpc_cap, BIT4)) ? "V" : "X"); /*BIT4: Enable HT LDPC Rx*/
#ifdef CONFIG_BEAMFORMING
#if 0
RTW_PRINT_SEL(sel, "[DRV CAP] TxBF parameter : 0x%08x\n", phy_spec->txbf_param);
RTW_PRINT_SEL(sel, "[DRV CAP] VHT Sounding Dim : %d\n", (phy_spec->txbf_param >> 24) & 0xFF); /*VHT Sounding Dim [31:24]*/
RTW_PRINT_SEL(sel, "[DRV CAP] VHT Steering Ant : %d\n", (phy_spec->txbf_param >> 16) & 0xFF); /*VHT Steering Ant [23:16]*/
RTW_PRINT_SEL(sel, "[DRV CAP] HT Sounding Dim : %d\n", (phy_spec->txbf_param >> 8) & 0xFF); /*HT Sounding Dim [15:8]*/
RTW_PRINT_SEL(sel, "[DRV CAP] HT Steering Ant : %d\n", phy_spec->txbf_param & 0xFF); /*HT Steering Ant [7:0]*/
#endif
/*
* BIT0: Enable VHT SU Beamformer
@ -4132,43 +4117,6 @@ int proc_get_efuse_map(struct seq_file *m, void *v)
ssize_t proc_set_efuse_map(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data)
{
#if 0
char tmp[256] = {0};
u32 addr, cnts;
u8 efuse_data;
int jj, kk;
struct net_device *dev = data;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
u8 ips_mode = IPS_NUM;
if (count < 3) {
RTW_INFO("argument size is less than 3\n");
return -EFAULT;
}
if (count > sizeof(tmp)) {
rtw_warn_on(1);
return -EFAULT;
}
if (buffer && !copy_from_user(tmp, buffer, count)) {
int num = sscanf(tmp, "%x %d %x", &addr, &cnts, &efuse_data);
if (num != 3) {
RTW_INFO("invalid write_reg parameter!\n");
return count;
}
}
ips_mode = pwrctrlpriv->ips_mode;
rtw_pm_set_ips(padapter, IPS_NONE);
if (rtw_efuse_map_write(padapter, addr, cnts, &efuse_data) == _FAIL)
RTW_INFO("WARN - rtw_efuse_map_write error!!\n");
rtw_pm_set_ips(padapter, ips_mode);
#endif
return count;
}
@ -4479,15 +4427,6 @@ ssize_t proc_set_mcc_policy_table(struct file *file, const char __user *buffer,
RTW_INFO(FUNC_ADPT_FMT ": input parameters < 7\n", FUNC_ADPT_ARG(padapter));
return -EINVAL;
}
#if 0
RTW_INFO("mcc_policy_table_idx:%d\n", mcc_policy_table_idx);
RTW_INFO("mcc_duration:%d\n", mcc_duration);
RTW_INFO("mcc_tsf_sync_offset:%d\n", mcc_tsf_sync_offset);
RTW_INFO("mcc_start_time_offset:%d\n", mcc_start_time_offset);
RTW_INFO("mcc_interval:%d\n", mcc_interval);
RTW_INFO("mcc_guard_offset0:%d\n", mcc_guard_offset0);
RTW_INFO("mcc_guard_offset1:%d\n", mcc_guard_offset1);
#endif
for (i = 0; i < dvobj->iface_nums; i++) {
iface = dvobj->padapters[i];
if (!iface)

View file

@ -825,39 +825,6 @@ void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src,
, dst->Ssid.Ssid, MAC_ARG(dst->MacAddress), dst->PhyInfo.SignalStrength, dst->PhyInfo.SignalQuality, dst->Rssi);
}
#endif
#if 0 /* old codes, may be useful one day...
* RTW_INFO("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)) {
/* RTW_INFO("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;
/* RTW_INFO("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 {
/* RTW_INFO("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 */
}
/* RTW_INFO("a:update_network: src->rssi=0x%d padapter->recvpriv.ui_rssi=%d\n",src->Rssi,padapter->recvpriv.signal); */
#endif
}
static void update_current_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork)
@ -871,13 +838,9 @@ static void update_current_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork)
&(pmlmepriv->cur_network.network));
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork, 0))) {
/* 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),
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);
}
}
@ -1712,18 +1675,6 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
psta->aid = pnetwork->join_res;
#if 0 /* alloc macid when call rtw_alloc_stainfo(), and release macid when call rtw_free_stainfo() */
#ifdef CONFIG_CONCURRENT_MODE
if (PRIMARY_ADAPTER == padapter->adapter_type)
psta->mac_id = 0;
else
psta->mac_id = 2;
#else
psta->mac_id = 0;
#endif
#endif /* removed */
update_sta_info(padapter, psta);
/* update station supportRate */
@ -2602,15 +2553,6 @@ void _rtw_join_timeout_handler(_adapter *adapter)
_irqL irqL;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
#if 0
if (rtw_is_drv_stopped(adapter)) {
_rtw_up_sema(&pmlmepriv->assoc_terminate);
return;
}
#endif
RTW_INFO("%s, fw_state=%x\n", __func__, get_fwstate(pmlmepriv));
if (RTW_CANNOT_RUN(adapter))
@ -3285,21 +3227,9 @@ candidate_exist:
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
RTW_INFO("%s: _FW_LINKED while ask_for_joinbss!!!\n", __func__);
#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)) {
RTW_INFO("%s: _FW_LINKED and is same network, it needn't join again\n", __func__);
rtw_indicate_connect(adapter);/* rtw_indicate_connect again */
ret = 2;
goto exit;
} else
#endif
{
rtw_disassoc_cmd(adapter, 0, _TRUE);
rtw_indicate_disconnect(adapter, 0, _FALSE);
rtw_free_assoc_resources(adapter, 0);
}
rtw_disassoc_cmd(adapter, 0, _TRUE);
rtw_indicate_disconnect(adapter, 0, _FALSE);
rtw_free_assoc_resources(adapter, 0);
}
#ifdef CONFIG_ANTENNA_DIVERSITY
@ -3464,16 +3394,7 @@ int rtw_restruct_wmm_ie(_adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len, u
ielength = initial_out_len;
if (in_ie[i] == 0xDD && in_ie[i + 2] == 0x00 && in_ie[i + 3] == 0x50 && in_ie[i + 4] == 0xF2 && in_ie[i + 5] == 0x02 && i + 5 < in_len) { /* WMM element ID and OUI */
/* Append WMM IE to the last index of out_ie */
#if 0
for (j = i; j < i + (in_ie[i + 1] + 2); j++) {
out_ie[ielength] = in_ie[j];
ielength++;
}
out_ie[initial_out_len + 8] = 0x00; /* force the QoS Info Field to be zero */
#endif
for (j = i; j < i + 9; j++) {
out_ie[ielength] = in_ie[j];
ielength++;
@ -3693,17 +3614,6 @@ void rtw_update_registrypriv_dev_network(_adapter *adapter)
/* struct xmit_priv *pxmitpriv = &adapter->xmitpriv; */
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
#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;

View file

@ -1093,10 +1093,6 @@ static void init_channel_list(_adapter *padapter, RT_CHANNEL_INFO *channel_set,
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 },
@ -1373,19 +1369,6 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
struct dvobj_priv *psdpriv = padapter->dvobj;
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
#if 0
{
u8 *pbuf;
pbuf = GetAddr1Ptr(pframe);
RTW_INFO("A1-%x:%x:%x:%x:%x:%x\n", *pbuf, *(pbuf + 1), *(pbuf + 2), *(pbuf + 3), *(pbuf + 4), *(pbuf + 5));
pbuf = get_addr2_ptr(pframe);
RTW_INFO("A2-%x:%x:%x:%x:%x:%x\n", *pbuf, *(pbuf + 1), *(pbuf + 2), *(pbuf + 3), *(pbuf + 4), *(pbuf + 5));
pbuf = GetAddr3Ptr(pframe);
RTW_INFO("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) {
return;
}
@ -1830,18 +1813,7 @@ unsigned int OnProbeRsp(_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) {
psta = rtw_get_stainfo(pstapriv, get_addr2_ptr(pframe));
if (psta != NULL)
psta->sta_stats.rx_mgnt_pkts++;
}
}
#endif
return _SUCCESS;
}
/* for 11n Logo 4.2.31/4.2.32 */
@ -2051,12 +2023,7 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame)
if (pmlmeext->en_hw_update_tsf)
rtw_enable_hw_update_tsf_cmd(padapter);
#if 0 /* move to validate_recv_mgnt_frame */
psta->sta_stats.rx_mgnt_pkts++;
#endif
}
} else if ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) {
_irqL irqL;
u8 rate_set[16];
@ -2552,30 +2519,8 @@ unsigned int OnAssocReq(_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) {
@ -8672,7 +8617,6 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
/* 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);
/* RTW_INFO("sta_bssrate_len=%d\n", sta_bssrate_len); */
@ -8720,22 +8664,6 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
bssrate_len = index;
RTW_INFO("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) && (pmlmeinfo->network.SupportedRates[0] != 0)) {
rtw_free_xmitbuf(pxmitpriv, pmgntframe->pxmitbuf);
rtw_free_xmitframe(pxmitpriv, pmgntframe);
@ -10330,16 +10258,8 @@ unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr)
psta = rtw_get_stainfo(pstapriv, addr);
if (psta == NULL)
return _SUCCESS;
#if 0
RTW_INFO("%s:%s\n", __func__, (initiator == 0) ? "RX_DIR" : "TX_DIR");
if (initiator == 1) /* originator */
RTW_INFO("tx agg_enable_bitmap(0x%08x)\n", psta->htpriv.agg_enable_bitmap);
#endif
for (tid = 0; tid < TID_NUM; tid++)
send_delba_sta_tid(padapter, initiator, psta, tid, 0);
return _SUCCESS;
}
@ -10528,14 +10448,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI
}
/* 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;
#ifdef CONFIG_P2P
if (subtype == WIFI_PROBEREQ) {
@ -11007,11 +10920,7 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
k++;
} else if (chplan_sta[i].ChannelNum < chplan_ap.Channel[j]) {
chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
#if 0
chplan_new[k].ScanType = chplan_sta[i].ScanType;
#else
chplan_new[k].ScanType = SCAN_PASSIVE;
#endif
i++;
k++;
} else if (chplan_sta[i].ChannelNum > chplan_ap.Channel[j]) {
@ -11027,11 +10936,7 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
&& (chplan_sta[i].ChannelNum != 0)
&& (chplan_sta[i].ChannelNum <= 14)) {
chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
#if 0
chplan_new[k].ScanType = chplan_sta[i].ScanType;
#else
chplan_new[k].ScanType = SCAN_PASSIVE;
#endif
i++;
k++;
}
@ -11076,11 +10981,7 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
k++;
} else if (chplan_sta[i].ChannelNum < chplan_ap.Channel[j]) {
chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
#if 0
chplan_new[k].ScanType = chplan_sta[i].ScanType;
#else
chplan_new[k].ScanType = SCAN_PASSIVE;
#endif
i++;
k++;
} else if (chplan_sta[i].ChannelNum > chplan_ap.Channel[j]) {
@ -11094,11 +10995,7 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
/* change AP not support channel to Passive scan */
while ((i < MAX_CHANNEL_NUM) && (chplan_sta[i].ChannelNum != 0)) {
chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
#if 0
chplan_new[k].ScanType = chplan_sta[i].ScanType;
#else
chplan_new[k].ScanType = SCAN_PASSIVE;
#endif
i++;
k++;
}
@ -11131,21 +11028,6 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
}
_RTW_INFO("}\n");
#endif
#if 0
/* recover the right channel index */
channel = chplan_sta[pmlmeext->sitesurvey_res.channel_idx].ChannelNum;
k = 0;
while ((k < MAX_CHANNEL_NUM) && (chplan_new[k].ChannelNum != 0)) {
if (chplan_new[k].ChannelNum == channel) {
RTW_INFO("%s: change mlme_ext sitesurvey channel index from %d to %d\n",
__func__, pmlmeext->sitesurvey_res.channel_idx, k);
pmlmeext->sitesurvey_res.channel_idx = k;
break;
}
k++;
}
#endif
}
/* If channel is used by AP, set channel scan type to active */
@ -14728,16 +14610,9 @@ u8 chk_bmc_sleepq_hdl(_adapter *padapter, unsigned char *pbuf)
if (xmitframe_hiq_filter(pxmitframe) == _TRUE)
pxmitframe->attrib.qsel = QSLT_HIGH;/* HIQ */
#if 0
_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
if (rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
rtw_os_xmit_complete(padapter, pxmitframe);
_enter_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
#endif
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
}
/* _exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL); */
_exit_critical_bh(&pxmitpriv->lock, &irqL);
if (rtw_get_intf_type(padapter) != RTW_PCIE) {
@ -15343,11 +15218,6 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf)
_cancel_timer_ex(&ptdls_sta->ch_sw_timer);
_cancel_timer_ex(&ptdls_sta->stay_on_base_chnl_timer);
_cancel_timer_ex(&ptdls_sta->ch_sw_monitor_timer);
#if 0
_rtw_memset(pHalData->tdls_ch_sw_iqk_info_base_chnl, 0x00, sizeof(pHalData->tdls_ch_sw_iqk_info_base_chnl));
_rtw_memset(pHalData->tdls_ch_sw_iqk_info_off_chnl, 0x00, sizeof(pHalData->tdls_ch_sw_iqk_info_off_chnl));
#endif
if (option == TDLS_CH_SW_END_TO_BASE_CHNL)
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CH_SW_TO_BASE_CHNL);

View file

@ -339,20 +339,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 ); */
@ -5241,21 +5227,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) {
RTW_INFO("[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 {
RTW_INFO("[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) {

View file

@ -884,18 +884,9 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
rtw_usleep_os(100);
} while (1);
}
#endif
#if 0 /*def CONFIG_LPS_PG*/
lps_pg_hdl_id = LPS_PG_REDLEMEM;
rtw_hal_set_hwreg(padapter, HW_VAR_LPS_PG_HANDLE, (u8 *)(&lps_pg_hdl_id));
#endif
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
#if 0 /*def CONFIG_LPS_PG*/
lps_pg_hdl_id = LPS_PG_RESEND_H2C;
rtw_hal_set_hwreg(padapter, HW_VAR_LPS_PG_HANDLE, (u8 *)(&lps_pg_hdl_id));
#endif
#ifdef CONFIG_LPS_POFF
rtw_hal_set_hwreg(padapter, HW_VAR_LPS_POFF_SET_MODE,
(u8 *)(&ps_mode));
@ -1371,12 +1362,6 @@ void cpwm_int_hdl(
goto exit;
pwrpriv = adapter_to_pwrctl(padapter);
#if 0
if (pwrpriv->cpwm_tog == (preportpwrstate->state & PS_TOGGLE)) {
goto exit;
}
#endif
_enter_pwrlock(&pwrpriv->lock);
#ifdef CONFIG_LPS_RPWM_TIMER

View file

@ -130,32 +130,18 @@ static void sreset_restore_security_station(_adapter *padapter)
val8 = 0xcf;
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_)) {
psta = rtw_get_stainfo(pstapriv, get_bssid(mlmepriv));
if (psta == NULL) {
/* DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n")); */
} else {
/* pairwise key */
rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _FALSE);
/* group key */
rtw_set_key(padapter, &padapter->securitypriv, padapter->securitypriv.dot118021XGrpKeyid, 0, _FALSE);
}
if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) ||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) {
psta = rtw_get_stainfo(pstapriv, get_bssid(mlmepriv));
if (psta == NULL) {
/* DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n")); */
} else {
/* pairwise key */
rtw_setstakey_cmd(padapter, psta, UNICAST_KEY, _FALSE);
/* group key */
rtw_set_key(padapter, &padapter->securitypriv, padapter->securitypriv.dot118021XGrpKeyid, 0, _FALSE);
}
}
}
static void sreset_restore_network_station(_adapter *padapter)
@ -165,25 +151,6 @@ static void sreset_restore_network_station(_adapter *padapter)
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 doiqk = _FALSE;
#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);
{

View file

@ -230,20 +230,6 @@ int issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsig
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
#if 0
psta = rtw_get_stainfo(&padapter->stapriv, da);
if (psta) {
if (power_mode)
rtw_hal_macid_sleep(padapter, psta->mac_id);
else
rtw_hal_macid_wakeup(padapter, psta->mac_id);
} else {
RTW_INFO(FUNC_ADPT_FMT ": Can't find sta info for " MAC_FMT ", skip macid %s!!\n",
FUNC_ADPT_ARG(padapter), MAC_ARG(da), power_mode ? "sleep" : "wakeup");
rtw_warn_on(1);
}
#endif
do {
ret = _issue_nulldata_to_TDLS_peer_STA(padapter, da, power_mode, wait_ms > 0 ? _TRUE : _FALSE);
@ -2071,20 +2057,6 @@ int On_TDLS_Teardown(_adapter *padapter, union recv_frame *precv_frame)
}
#if 0
u8 TDLS_check_ch_state(uint state)
{
if (state & TDLS_CH_SWITCH_ON_STATE &&
state & TDLS_PEER_AT_OFF_STATE) {
if (state & TDLS_PEER_SLEEP_STATE)
return 2; /* U-APSD + ch. switch */
else
return 1; /* ch. switch */
} else
return 0;
}
#endif
int On_TDLS_Peer_Traffic_Indication(_adapter *padapter, union recv_frame *precv_frame)
{
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;

View file

@ -1115,13 +1115,6 @@ static bool _rtw_sec_camid_is_used(struct cam_ctl_t *cam_ctl, u8 id)
goto exit;
}
#if 0 /* for testing */
if (rtw_sec_camid_is_drv_forbid(cam_ctl, id)) {
ret = _TRUE;
goto exit;
}
#endif
ret = rtw_sec_camid_is_set(&cam_ctl->used, id);
exit:
@ -1257,11 +1250,7 @@ static s16 rtw_get_camid(_adapter *adapter, struct sta_info *sta, u8 *addr, s16
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
int i;
#if 0 /* for testing */
static u8 start_id = 0;
#else
u8 start_id = 0;
#endif
s16 cam_id = -1;
if (addr == NULL) {
@ -1599,23 +1588,6 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
pmlmeinfo->WMM_enable = 1;
return _TRUE;
#if 0
if (pregpriv->wifi_spec == 1) {
if (pmlmeinfo->WMM_enable == 1) {
/* todo: compare the parameter set count & decide wheher to update or not */
return _FAIL;
} else {
pmlmeinfo->WMM_enable = 1;
_rtw_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
return _TRUE;
}
} else {
pmlmeinfo->WMM_enable = 0;
return _FAIL;
}
#endif
}
void WMMOnAssocRsp(_adapter *padapter)
@ -2077,52 +2049,6 @@ void HTOnAssocRsp(_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->bw_mode > 0) &&
(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 = CHANNEL_WIDTH_40;
switch ((pmlmeinfo->HT_info.infos[0] & 0x3)) {
case EXTCHNL_OFFSET_UPPER:
pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
break;
case 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;
}
}
#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) {
#if 0
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];
#endif
RTW_INFO("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__);
}
/* */
/* Config current HT Protection mode. */
/* */
pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3;
#endif
}
void ERP_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
@ -2347,27 +2273,6 @@ void rtw_dump_bcn_keys(struct beacon_keys *recv_beacon)
int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
{
#if 0
unsigned int len;
unsigned char *p;
unsigned short val16, subtype;
struct wlan_network *cur_network = &(Adapter->mlmepriv.cur_network);
/* u8 wpa_ie[255],rsn_ie[255]; */
u16 wpa_len = 0, rsn_len = 0;
u8 encryp_protocol = 0;
WLAN_BSSID_EX *bssid;
int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0;
unsigned char *pbuf;
u32 wpa_ielen = 0;
u8 *pbssid = GetAddr3Ptr(pframe);
u32 hidden_ssid = 0;
u8 cur_network_type, network_type = 0;
struct HT_info_element *pht_info = NULL;
struct rtw_ieee80211_ht_cap *pht_cap = NULL;
u32 bcn_channel;
unsigned short ht_cap_info;
unsigned char ht_info_infos_0;
#endif
unsigned int len;
u8 *pbssid = GetAddr3Ptr(pframe);
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
@ -2452,182 +2357,6 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
}
return _SUCCESS;
#if 0
bssid = (WLAN_BSSID_EX *)rtw_zmalloc(sizeof(WLAN_BSSID_EX));
if (bssid == NULL) {
RTW_INFO("%s rtw_zmalloc fail !!!\n", __func__);
return _TRUE;
}
if ((pmlmepriv->timeBcnInfoChkStart != 0) && (rtw_get_passing_time_ms(pmlmepriv->timeBcnInfoChkStart) > DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS)) {
pmlmepriv->timeBcnInfoChkStart = 0;
pmlmepriv->NumOfBcnInfoChkFail = 0;
}
subtype = get_frame_sub_type(pframe) >> 4;
if (subtype == WIFI_BEACON)
bssid->Reserved[0] = 1;
bssid->Length = sizeof(WLAN_BSSID_EX) - MAX_IE_SZ + len;
/* below is to copy the information element */
bssid->IELength = len;
_rtw_memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength);
/* check bw and channel offset */
/* parsing HT_CAP_IE */
p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_);
if (p && len > 0) {
pht_cap = (struct rtw_ieee80211_ht_cap *)(p + 2);
ht_cap_info = pht_cap->cap_info;
} else
ht_cap_info = 0;
/* parsing HT_INFO_IE */
p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_);
if (p && len > 0) {
pht_info = (struct HT_info_element *)(p + 2);
ht_info_infos_0 = pht_info->infos[0];
} else
ht_info_infos_0 = 0;
if (ht_cap_info != cur_network->BcnInfo.ht_cap_info ||
((ht_info_infos_0 & 0x03) != (cur_network->BcnInfo.ht_info_infos_0 & 0x03))) {
RTW_INFO("%s bcn now: ht_cap_info:%x ht_info_infos_0:%x\n", __func__,
ht_cap_info, ht_info_infos_0);
RTW_INFO("%s bcn link: ht_cap_info:%x ht_info_infos_0:%x\n", __func__,
cur_network->BcnInfo.ht_cap_info, cur_network->BcnInfo.ht_info_infos_0);
RTW_INFO("%s bw mode change\n", __func__);
{
/* bcn_info_update */
cur_network->BcnInfo.ht_cap_info = ht_cap_info;
cur_network->BcnInfo.ht_info_infos_0 = ht_info_infos_0;
/* to do : need to check that whether modify related register of BB or not */
}
/* goto _mismatch; */
}
/* Checking for channel */
p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _DSSET_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_);
if (p)
bcn_channel = *(p + 2);
else {/* In 5G, some ap do not have DSSET IE checking HT info for channel */
rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_);
if (pht_info)
bcn_channel = pht_info->primary_channel;
else { /* we don't find channel IE, so don't check it */
/* RTW_INFO("Oops: %s we don't find channel IE, so don't check it\n", __func__); */
bcn_channel = Adapter->mlmeextpriv.cur_channel;
}
}
if (bcn_channel != Adapter->mlmeextpriv.cur_channel) {
RTW_INFO("%s beacon channel:%d cur channel:%d disconnect\n", __func__,
bcn_channel, Adapter->mlmeextpriv.cur_channel);
goto _mismatch;
}
/* checking SSID */
p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_);
if (p == NULL) {
RTW_INFO("%s marc: cannot find SSID for survey event\n", __func__);
hidden_ssid = _TRUE;
} else
hidden_ssid = _FALSE;
if ((NULL != p) && (_FALSE == hidden_ssid && (*(p + 1)))) {
_rtw_memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1));
bssid->Ssid.SsidLength = *(p + 1);
} else {
bssid->Ssid.SsidLength = 0;
bssid->Ssid.Ssid[0] = '\0';
}
if (_rtw_memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) == _FALSE ||
bssid->Ssid.SsidLength != cur_network->network.Ssid.SsidLength) {
if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) { /* not hidden ssid */
RTW_INFO("%s(), SSID is not match\n", __func__);
goto _mismatch;
}
}
/* check encryption info */
val16 = rtw_get_capability((WLAN_BSSID_EX *)bssid);
if (val16 & BIT(4))
bssid->Privacy = 1;
else
bssid->Privacy = 0;
if (cur_network->network.Privacy != bssid->Privacy) {
RTW_INFO("%s(), privacy is not match\n", __func__);
goto _mismatch;
}
rtw_get_sec_ie(bssid->IEs, bssid->IELength, NULL, &rsn_len, NULL, &wpa_len);
if (rsn_len > 0)
encryp_protocol = ENCRYP_PROTOCOL_WPA2;
else if (wpa_len > 0)
encryp_protocol = ENCRYP_PROTOCOL_WPA;
else {
if (bssid->Privacy)
encryp_protocol = ENCRYP_PROTOCOL_WEP;
}
if (cur_network->BcnInfo.encryp_protocol != encryp_protocol) {
RTW_INFO("%s(): enctyp is not match\n", __func__);
goto _mismatch;
}
if (encryp_protocol == ENCRYP_PROTOCOL_WPA || encryp_protocol == ENCRYP_PROTOCOL_WPA2) {
pbuf = rtw_get_wpa_ie(&bssid->IEs[12], &wpa_ielen, bssid->IELength - 12);
if (pbuf && (wpa_ielen > 0)) {
rtw_parse_wpa_ie(pbuf, wpa_ielen + 2, &group_cipher, &pairwise_cipher, &is_8021x);
} else {
pbuf = rtw_get_wpa2_ie(&bssid->IEs[12], &wpa_ielen, bssid->IELength - 12);
if (pbuf && (wpa_ielen > 0)) {
rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher, &pairwise_cipher, &is_8021x);
}
}
if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher) {
RTW_INFO("%s pairwise_cipher(%x:%x) or group_cipher(%x:%x) is not match\n", __func__,
pairwise_cipher, cur_network->BcnInfo.pairwise_cipher,
group_cipher, cur_network->BcnInfo.group_cipher);
goto _mismatch;
}
if (is_8021x != cur_network->BcnInfo.is_8021x) {
RTW_INFO("%s authentication is not match\n", __func__);
goto _mismatch;
}
}
rtw_mfree((u8 *)bssid, sizeof(WLAN_BSSID_EX));
return _SUCCESS;
_mismatch:
rtw_mfree((u8 *)bssid, sizeof(WLAN_BSSID_EX));
if (pmlmepriv->NumOfBcnInfoChkFail == 0)
pmlmepriv->timeBcnInfoChkStart = rtw_get_current_time();
pmlmepriv->NumOfBcnInfoChkFail++;
RTW_INFO("%s by "ADPT_FMT" - NumOfChkFail = %d (SeqNum of this Beacon frame = %d).\n", __func__, ADPT_ARG(Adapter), pmlmepriv->NumOfBcnInfoChkFail, GetSequence(pframe));
if ((pmlmepriv->timeBcnInfoChkStart != 0) && (rtw_get_passing_time_ms(pmlmepriv->timeBcnInfoChkStart) <= DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS)
&& (pmlmepriv->NumOfBcnInfoChkFail >= DISCONNECT_BY_CHK_BCN_FAIL_THRESHOLD)) {
RTW_INFO("%s by "ADPT_FMT" - NumOfChkFail = %d >= threshold : %d (in %d ms), return FAIL.\n", __func__, ADPT_ARG(Adapter), pmlmepriv->NumOfBcnInfoChkFail,
DISCONNECT_BY_CHK_BCN_FAIL_THRESHOLD, rtw_get_passing_time_ms(pmlmepriv->timeBcnInfoChkStart));
pmlmepriv->timeBcnInfoChkStart = 0;
pmlmepriv->NumOfBcnInfoChkFail = 0;
return _FAIL;
}
return _SUCCESS;
#endif
}
void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta_info *psta)
@ -3156,14 +2885,6 @@ void update_wireless_mode(_adapter *padapter)
}
pmlmeext->cur_wireless_mode = network_type & padapter->registrypriv.wireless_mode;
/* RTW_INFO("network_type=%02x, padapter->registrypriv.wireless_mode=%02x\n", network_type, padapter->registrypriv.wireless_mode); */
#if 0
if ((pmlmeext->cur_wireless_mode == WIRELESS_11G) ||
(pmlmeext->cur_wireless_mode == WIRELESS_11BG)) /* WIRELESS_MODE_G) */
SIFS_Timer = 0x0a0a;/* CCK */
else
SIFS_Timer = 0x0e0e;/* pHalData->SifsTime; //OFDM */
#endif
SIFS_Timer = 0x0a0a0808; /* 0x0808->for CCK, 0x0a0a->for OFDM
* change this value if having IOT issues. */
@ -3186,31 +2907,8 @@ void update_wireless_mode(_adapter *padapter)
update_mgnt_tx_rate(padapter, IEEE80211_OFDM_RATE_6MB);
}
void fire_write_MAC_cmd(_adapter *padapter, unsigned int addr, unsigned int value);
void fire_write_MAC_cmd(_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);
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL)
return;
pwriteMacPara = (struct reg_rw_parm *)rtw_malloc(sizeof(struct reg_rw_parm));
if (pwriteMacPara == 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_sta_basic_rate(struct sta_info *psta, u8 wireless_mode)
@ -3826,105 +3524,6 @@ inline void rtw_macid_ctl_deinit(struct macid_ctl_t *macid_ctl)
_rtw_spinlock_free(&macid_ctl->lock);
}
#if 0
unsigned int setup_beacon_frame(_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, adapter_mac_addr(padapter), ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
set_frame_sub_type(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) {
/* RTW_INFO("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
_adapter *dvobj_get_port0_adapter(struct dvobj_priv *dvobj)
{
_adapter *port0_iface = NULL;

View file

@ -960,12 +960,6 @@ VOID
EXhalbtcoutsrc_UpdateMinBtRssi(
IN s1Byte btRssi
);
#if 0
VOID
EXhalbtcoutsrc_SetBtExist(
IN BOOLEAN bBtExist
);
#endif
VOID
EXhalbtcoutsrc_SetChipType(
IN u1Byte chipType

View file

@ -330,14 +330,6 @@ void halbtcoutsrc_NormalLps(PBTC_COEXIST pBtCoexist)
pBtCoexist->bt_info.bt_lps_on = _FALSE;
rtw_btcoex_LPS_Leave(padapter);
pBtCoexist->bt_info.bt_ctrl_lps = _FALSE;
/* recover the LPS state to the original */
#if 0
padapter->hal_func.UpdateLPSStatusHandler(
padapter,
pPSC->RegLeisurePsMode,
pPSC->RegPowerSaveMode);
#endif
}
}
@ -839,13 +831,9 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
break;
case BTC_GET_BL_WIFI_SCAN:
#if 0
*pu8 = (rtw_mi_check_fwstate(padapter, WIFI_SITE_MONITOR)) ? _TRUE : _FALSE;
#else
/* Use the value of the new variable GLBtcWiFiInScanState to judge whether WiFi is in scan state or not, since the originally used flag
WIFI_SITE_MONITOR in fwstate may not be cleared in time */
*pu8 = GLBtcWiFiInScanState;
#endif
break;
case BTC_GET_BL_WIFI_LINK:
@ -1127,11 +1115,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
/* the following are some action which will be triggered */
case BTC_SET_ACT_GET_BT_RSSI:
#if 0
BT_SendGetBtRssiEvent(padapter);
#else
ret = _FALSE;
#endif
break;
case BTC_SET_ACT_AGGREGATE_CTRL:
@ -1229,17 +1213,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
break;
case BTC_SET_ACT_CTRL_8723B_ANT:
#if 0
{
u1Byte dataLen = *pU1Tmp;
u1Byte tmpBuf[BTC_TMP_BUF_SHORT];
if (dataLen)
PlatformMoveMemory(&tmpBuf[0], pU1Tmp + 1, dataLen);
BT_Set8723bAnt(Adapter, dataLen, &tmpBuf[0]);
}
#else
ret = _FALSE;
#endif
break;
/* ===================== */
default:
@ -1288,156 +1262,6 @@ u8 halbtcoutsrc_Under32K(PBTC_COEXIST pBtCoexist)
void halbtcoutsrc_DisplayCoexStatistics(PBTC_COEXIST pBtCoexist)
{
#if 0
PADAPTER padapter = (PADAPTER)pBtCoexist->Adapter;
PBT_MGNT pBtMgnt = &padapter->MgntInfo.BtInfo.BtMgnt;
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(padapter);
u8 *cliBuf = pBtCoexist->cliBuf;
u1Byte i, j;
u1Byte tmpbuf[BTC_TMP_BUF_SHORT];
if (gl_coex_offload.cnt_h2c_sent) {
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s", "============[Coex h2c notify]============");
CL_PRINTF(cliBuf);
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = H2c(%d)/Ack(%d)", "Coex h2c/c2h overall statistics",
gl_coex_offload.cnt_h2c_sent, gl_coex_offload.cnt_c2h_ack);
for (j = 0; j < COL_STATUS_MAX; j++) {
if (gl_coex_offload.status[j]) {
CL_SPRINTF(tmpbuf, BTC_TMP_BUF_SHORT, ", %s:%d", coexH2cResultString[j], gl_coex_offload.status[j]);
CL_STRNCAT(cliBuf, BT_TMP_BUF_SIZE, tmpbuf, BTC_TMP_BUF_SHORT);
}
}
CL_PRINTF(cliBuf);
}
for (i = 0; i < COL_OP_WIFI_OPCODE_MAX; i++) {
if (gl_coex_offload.h2c_record[i].count) {
/*==========================================*/
/* H2C result statistics*/
/*==========================================*/
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = total:%d", coexOpcodeString[i], gl_coex_offload.h2c_record[i].count);
for (j = 0; j < COL_STATUS_MAX; j++) {
if (gl_coex_offload.h2c_record[i].status[j]) {
CL_SPRINTF(tmpbuf, BTC_TMP_BUF_SHORT, ", %s:%d", coexH2cResultString[j], gl_coex_offload.h2c_record[i].status[j]);
CL_STRNCAT(cliBuf, BT_TMP_BUF_SIZE, tmpbuf, BTC_TMP_BUF_SHORT);
}
}
CL_PRINTF(cliBuf);
/*==========================================*/
/* H2C/C2H content*/
/*==========================================*/
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = ", "H2C / C2H content");
for (j = 0; j < gl_coex_offload.h2c_record[i].h2c_len; j++) {
CL_SPRINTF(tmpbuf, BTC_TMP_BUF_SHORT, "%02x ", gl_coex_offload.h2c_record[i].h2c_buf[j]);
CL_STRNCAT(cliBuf, BT_TMP_BUF_SIZE, tmpbuf, 3);
}
if (gl_coex_offload.h2c_record[i].c2h_ack_len) {
CL_STRNCAT(cliBuf, BT_TMP_BUF_SIZE, "/ ", 2);
for (j = 0; j < gl_coex_offload.h2c_record[i].c2h_ack_len; j++) {
CL_SPRINTF(tmpbuf, BTC_TMP_BUF_SHORT, "%02x ", gl_coex_offload.h2c_record[i].c2h_ack_buf[j]);
CL_STRNCAT(cliBuf, BT_TMP_BUF_SIZE, tmpbuf, 3);
}
}
CL_PRINTF(cliBuf);
/*==========================================*/
}
}
if (gl_coex_offload.cnt_c2h_ind) {
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s", "============[Coex c2h indication]============");
CL_PRINTF(cliBuf);
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = Ind(%d)", "C2H indication statistics",
gl_coex_offload.cnt_c2h_ind);
for (j = 0; j < COL_STATUS_MAX; j++) {
if (gl_coex_offload.c2h_ind_status[j]) {
CL_SPRINTF(tmpbuf, BTC_TMP_BUF_SHORT, ", %s:%d", coexH2cResultString[j], gl_coex_offload.c2h_ind_status[j]);
CL_STRNCAT(cliBuf, BT_TMP_BUF_SIZE, tmpbuf, BTC_TMP_BUF_SHORT);
}
}
CL_PRINTF(cliBuf);
}
for (i = 0; i < COL_IND_MAX; i++) {
if (gl_coex_offload.c2h_ind_record[i].count) {
/*==========================================*/
/* H2C result statistics*/
/*==========================================*/
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = total:%d", coexIndTypeString[i], gl_coex_offload.c2h_ind_record[i].count);
for (j = 0; j < COL_STATUS_MAX; j++) {
if (gl_coex_offload.c2h_ind_record[i].status[j]) {
CL_SPRINTF(tmpbuf, BTC_TMP_BUF_SHORT, ", %s:%d", coexH2cResultString[j], gl_coex_offload.c2h_ind_record[i].status[j]);
CL_STRNCAT(cliBuf, BT_TMP_BUF_SIZE, tmpbuf, BTC_TMP_BUF_SHORT);
}
}
CL_PRINTF(cliBuf);
/*==========================================*/
/* content*/
/*==========================================*/
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = ", "C2H indication content");
for (j = 0; j < gl_coex_offload.c2h_ind_record[i].ind_len; j++) {
CL_SPRINTF(tmpbuf, BTC_TMP_BUF_SHORT, "%02x ", gl_coex_offload.c2h_ind_record[i].ind_buf[j]);
CL_STRNCAT(cliBuf, BT_TMP_BUF_SIZE, tmpbuf, 3);
}
CL_PRINTF(cliBuf);
/*==========================================*/
}
}
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s", "============[Statistics]============");
CL_PRINTF(cliBuf);
#if (H2C_USE_IO_THREAD != 1)
for (i = 0; i < H2C_STATUS_MAX; i++) {
if (pHalData->h2cStatistics[i]) {
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = [%s] = %d", "H2C statistics", \
h2cStaString[i], pHalData->h2cStatistics[i]);
CL_PRINTF(cliBuf);
}
}
#else
for (i = 0; i < IO_STATUS_MAX; i++) {
if (Adapter->ioComStr.ioH2cStatistics[i]) {
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = [%s] = %d", "H2C statistics", \
ioStaString[i], Adapter->ioComStr.ioH2cStatistics[i]);
CL_PRINTF(cliBuf);
}
}
#endif
#if 0
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x", "lastHMEBoxNum", \
pHalData->LastHMEBoxNum);
CL_PRINTF(cliBuf);
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x / 0x%x", "LastOkH2c/FirstFailH2c(fwNotRead)", \
pHalData->lastSuccessH2cEid, pHalData->firstFailedH2cEid);
CL_PRINTF(cliBuf);
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d/ %d/ %d", "c2hIsr/c2hIntr/clr1AF/noRdy/noBuf", \
pHalData->InterruptLog.nIMR_C2HCMD, DBG_Var.c2hInterruptCnt, DBG_Var.c2hClrReadC2hCnt,
DBG_Var.c2hNotReadyCnt, DBG_Var.c2hBufAlloFailCnt);
CL_PRINTF(cliBuf);
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "c2hPacket", \
DBG_Var.c2hPacketCnt);
CL_PRINTF(cliBuf);
#endif
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d", "Periodical/ DbgCtrl", \
pBtCoexist->statistics.cntPeriodical, pBtCoexist->statistics.cntDbgCtrl);
CL_PRINTF(cliBuf);
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d/ %d", "PowerOn/InitHw/InitCoexDm/RfStatus", \
pBtCoexist->statistics.cntPowerOn, pBtCoexist->statistics.cntInitHwConfig, pBtCoexist->statistics.cntInitCoexDm,
pBtCoexist->statistics.cntRfStatusNotify);
CL_PRINTF(cliBuf);
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d/ %d/ %d", "Ips/Lps/Scan/Connect/Mstatus", \
pBtCoexist->statistics.cntIpsNotify, pBtCoexist->statistics.cntLpsNotify,
pBtCoexist->statistics.cntScanNotify, pBtCoexist->statistics.cntConnectNotify,
pBtCoexist->statistics.cntMediaStatusNotify);
CL_PRINTF(cliBuf);
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d", "Special pkt/Bt info/ bind",
pBtCoexist->statistics.cntSpecialPacketNotify, pBtCoexist->statistics.cntBtInfoNotify,
pBtCoexist->statistics.cntBind);
CL_PRINTF(cliBuf);
#endif
PADAPTER padapter = pBtCoexist->Adapter;
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(padapter);
u8 *cliBuf = pBtCoexist->cli_buf;
@ -1454,30 +1278,6 @@ void halbtcoutsrc_DisplayCoexStatistics(PBTC_COEXIST pBtCoexist)
void halbtcoutsrc_DisplayBtLinkInfo(PBTC_COEXIST pBtCoexist)
{
#if 0
PADAPTER padapter = (PADAPTER)pBtCoexist->Adapter;
PBT_MGNT pBtMgnt = &padapter->MgntInfo.BtInfo.BtMgnt;
u8 *cliBuf = pBtCoexist->cliBuf;
u8 i;
if (pBtCoexist->stack_info.profile_notified) {
for (i = 0; i < pBtMgnt->ExtConfig.NumberOfACL; i++) {
if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s/ %s/ %s", "Bt link type/spec/role", \
BtProfileString[pBtMgnt->ExtConfig.aclLink[i].BTProfile],
BtSpecString[pBtMgnt->ExtConfig.aclLink[i].BTCoreSpec],
BtLinkRoleString[pBtMgnt->ExtConfig.aclLink[i].linkRole]);
CL_PRINTF(cliBuf);
} else {
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s/ %s", "Bt link type/spec", \
BtProfileString[pBtMgnt->ExtConfig.aclLink[i].BTProfile],
BtSpecString[pBtMgnt->ExtConfig.aclLink[i].BTCoreSpec]);
CL_PRINTF(cliBuf);
}
}
}
#endif
}
void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
@ -1779,20 +1579,7 @@ u16 halbtcoutsrc_SetBtReg(void *pBtcContext, u8 RegType, u32 RegAddr, u32 Data)
u8 halbtcoutsrc_SetBtAntDetection(void *pBtcContext, u8 txTime, u8 btChnl)
{
/* Always return _FALSE since we don't implement this yet */
#if 0
PBTC_COEXIST pBtCoexist = (PBTC_COEXIST)pBtcContext;
PADAPTER Adapter = pBtCoexist->Adapter;
u1Byte btCanTx = 0;
BOOLEAN bStatus = FALSE;
bStatus = NDBG_SetBtAntDetection(Adapter, txTime, btChnl, &btCanTx);
if (bStatus && btCanTx)
return _TRUE;
else
return _FALSE;
#else
return _FALSE;
#endif
}
BOOLEAN
@ -1802,29 +1589,7 @@ halbtcoutsrc_SetBtTRXMASK(
)
{
/* Always return _FALSE since we don't implement this yet */
#if 0
struct btc_coexist *pBtCoexist = (struct btc_coexist *)pBtcContext;
PADAPTER Adapter = pBtCoexist->Adapter;
BOOLEAN bStatus = FALSE;
u1Byte btCanTx = 0;
if (IS_HARDWARE_TYPE_8723B(pBtCoexist->Adapter) || IS_HARDWARE_TYPE_8723D(pBtCoexist->Adapter)
|| IS_HARDWARE_TYPE_8821C(pBtCoexist->Adapter)) {
if (IS_HARDWARE_TYPE_8723B(pBtCoexist->Adapter))
bStatus = NDBG_SetBtTRXMASK(Adapter, 1, bt_trx_mask, &btCanTx);
else
bStatus = NDBG_SetBtTRXMASK(Adapter, 2, bt_trx_mask, &btCanTx);
}
if (bStatus)
return TRUE;
else
return FALSE;
#else
return _FALSE;
#endif
}
u16 halbtcoutsrc_GetBtReg_with_status(void *pBtcContext, u8 RegType, u32 RegAddr, u32 *data)
@ -1903,18 +1668,6 @@ static COL_H2C_STATUS halbtcoutsrc_send_h2c(PADAPTER Adapter, PCOL_H2C pcol_h2c,
INIT_COMPLETION(gl_coex_offload.c2h_event[pcol_h2c->req_num]);
#endif
if (TRUE) {
#if 0 /*(USE_HAL_MAC_API == 1) */
if (RT_STATUS_SUCCESS == HAL_MAC_Send_BT_COEX(&GET_HAL_MAC_INFO(Adapter), (pu1Byte)(pcol_h2c), (u4Byte)h2c_cmd_len, 1)) {
if (!wait_for_completion_timeout(&gl_coex_offload.c2h_event[pcol_h2c->req_num], 20)) {
h2c_status = COL_STATUS_H2C_TIMTOUT;
}
} else {
h2c_status = COL_STATUS_H2C_HALMAC_FAIL;
}
#endif
}
return h2c_status;
}
@ -1998,21 +1751,7 @@ COL_H2C_STATUS halbtcoutsrc_CoexH2cProcess(void *pBtCoexist,
u8 halbtcoutsrc_GetAntDetValFromBt(void *pBtcContext)
{
/* Always return 0 since we don't implement this yet */
#if 0
struct btc_coexist *pBtCoexist = (struct btc_coexist *)pBtcContext;
PADAPTER Adapter = pBtCoexist->Adapter;
u1Byte AntDetVal = 0x0;
u1Byte opcodeVer = 1;
BOOLEAN status = false;
status = NDBG_GetAntDetValFromBt(Adapter, opcodeVer, &AntDetVal);
RT_TRACE(COMP_DBG, DBG_LOUD, ("$$$ halbtcoutsrc_GetAntDetValFromBt(): status = %d, feature = %x\n", status, AntDetVal));
return AntDetVal;
#else
return 0;
#endif
}
u8 halbtcoutsrc_GetBleScanTypeFromBt(void *pBtcContext)
@ -2152,128 +1891,9 @@ u32 halbtcoutsrc_phydm_query_PHY_counter(void *pBtcContext, u8 info_type)
struct btc_coexist *pBtCoexist = (struct btc_coexist *)pBtcContext;
/* switch to #if 0 in case the phydm version does not provide the function */
#if 1
return phydm_cmn_info_query((struct PHY_DM_STRUCT *)pBtCoexist->odm_priv, (enum phydm_info_query_e)info_type);
#else
return 0;
#endif
}
#if 0
static void BT_CoexOffloadRecordErrC2hAck(PADAPTER Adapter)
{
PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter);
if (pDefaultAdapter != Adapter)
return;
if (!hal_btcoex_IsBtExist(Adapter))
return;
gl_coex_offload.cnt_c2h_ack++;
gl_coex_offload.status[COL_STATUS_INVALID_C2H_LEN]++;
}
static void BT_CoexOffloadC2hAckCheck(PADAPTER Adapter, u8 *tmpBuf, u8 length)
{
PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter);
PCOL_C2H_ACK p_c2h_ack = NULL;
u8 req_num = 0xff;
if (pDefaultAdapter != Adapter)
return;
if (!hal_btcoex_IsBtExist(Adapter))
return;
gl_coex_offload.cnt_c2h_ack++;
if (length < COL_C2H_ACK_HDR_LEN) { /* c2h ack length must >= 3 (status, opcode_ver, req_num and ret_len) */
gl_coex_offload.status[COL_STATUS_INVALID_C2H_LEN]++;
} else {
BT_PrintData(Adapter, "[COL], c2h ack:", length, tmpBuf);
p_c2h_ack = (PCOL_C2H_ACK)tmpBuf;
req_num = p_c2h_ack->req_num;
_rtw_memmove(&gl_coex_offload.c2h_ack_buf[req_num][0], tmpBuf, length);
gl_coex_offload.c2h_ack_len[req_num] = length;
complete(&gl_coex_offload.c2h_event[req_num]);
}
}
static void BT_CoexOffloadC2hIndCheck(PADAPTER Adapter, u8 *tmpBuf, u8 length)
{
PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter);
PCOL_C2H_IND p_c2h_ind = NULL;
u8 ind_type = 0, ind_version = 0, ind_length = 0;
if (pDefaultAdapter != Adapter)
return;
if (!hal_btcoex_IsBtExist(Adapter))
return;
gl_coex_offload.cnt_c2h_ind++;
if (length < COL_C2H_IND_HDR_LEN) { /* c2h indication length must >= 3 (type, version and length) */
gl_coex_offload.c2h_ind_status[COL_STATUS_INVALID_C2H_LEN]++;
} else {
BT_PrintData(Adapter, "[COL], c2h indication:", length, tmpBuf);
p_c2h_ind = (PCOL_C2H_IND)tmpBuf;
ind_type = p_c2h_ind->type;
ind_version = p_c2h_ind->version;
ind_length = p_c2h_ind->length;
_rtw_memmove(&gl_coex_offload.c2h_ind_buf[0], tmpBuf, length);
gl_coex_offload.c2h_ind_len = length;
/* log */
gl_coex_offload.c2h_ind_record[ind_type].count++;
gl_coex_offload.c2h_ind_record[ind_type].status[COL_STATUS_C2H_OK]++;
_rtw_memmove(&gl_coex_offload.c2h_ind_record[ind_type].ind_buf[0], tmpBuf, length);
gl_coex_offload.c2h_ind_record[ind_type].ind_len = length;
gl_coex_offload.c2h_ind_status[COL_STATUS_C2H_OK]++;
/*TODO: need to check c2h indication length*/
/* TODO: Notification */
}
}
void BT_CoexOffloadC2hCheck(PADAPTER Adapter, u8 *Buffer, u8 Length)
{
#if 0 /*(USE_HAL_MAC_API == 1)*/
u8 c2hSubCmdId = 0, c2hAckLen = 0, h2cCmdId = 0, h2cSubCmdId = 0, c2hIndLen = 0;
BT_PrintData(Adapter, "[COL], c2h packet:", Length - 2, Buffer + 2);
c2hSubCmdId = (u1Byte)C2H_HDR_GET_C2H_SUB_CMD_ID(Buffer);
if (c2hSubCmdId == C2H_SUB_CMD_ID_H2C_ACK_HDR ||
c2hSubCmdId == C2H_SUB_CMD_ID_BT_COEX_INFO) {
if (c2hSubCmdId == C2H_SUB_CMD_ID_H2C_ACK_HDR) {
/* coex c2h ack */
h2cCmdId = (u1Byte)H2C_ACK_HDR_GET_H2C_CMD_ID(Buffer);
h2cSubCmdId = (u1Byte)H2C_ACK_HDR_GET_H2C_SUB_CMD_ID(Buffer);
if (h2cCmdId == 0xff && h2cSubCmdId == 0x60) {
c2hAckLen = (u1Byte)C2H_HDR_GET_LEN(Buffer);
if (c2hAckLen >= 8)
BT_CoexOffloadC2hAckCheck(Adapter, &Buffer[12], (u1Byte)(c2hAckLen - 8));
else
BT_CoexOffloadRecordErrC2hAck(Adapter);
}
} else if (c2hSubCmdId == C2H_SUB_CMD_ID_BT_COEX_INFO) {
/* coex c2h indication */
c2hIndLen = (u1Byte)C2H_HDR_GET_LEN(Buffer);
BT_CoexOffloadC2hIndCheck(Adapter, &Buffer[4], (u1Byte)c2hIndLen);
}
}
#endif
}
#endif
/* ************************************
* Extern functions called by other module
* ************************************ */
@ -2473,11 +2093,6 @@ void EXhalbtcoutsrc_init_hw_config(PBTC_COEXIST pBtCoexist, u8 bWifiOnly)
pBtCoexist->statistics.cnt_init_hw_config++;
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_init_hw_config(pBtCoexist, bWifiOnly);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_init_hw_config(pBtCoexist, bWifiOnly);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -2534,11 +2149,6 @@ void EXhalbtcoutsrc_init_coex_dm(PBTC_COEXIST pBtCoexist)
pBtCoexist->statistics.cnt_init_coex_dm++;
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_init_coex_dm(pBtCoexist);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_init_coex_dm(pBtCoexist);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -2604,11 +2214,6 @@ void EXhalbtcoutsrc_ips_notify(PBTC_COEXIST pBtCoexist, u8 type)
* halbtcoutsrc_LeaveLowPower(pBtCoexist); */
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_ips_notify(pBtCoexist, ipsType);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_ips_notify(pBtCoexist, ipsType);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -2672,11 +2277,6 @@ void EXhalbtcoutsrc_lps_notify(PBTC_COEXIST pBtCoexist, u8 type)
}
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_lps_notify(pBtCoexist, lpsType);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_lps_notify(pBtCoexist, lpsType);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -2739,11 +2339,6 @@ void EXhalbtcoutsrc_scan_notify(PBTC_COEXIST pBtCoexist, u8 type)
* halbtcoutsrc_LeaveLowPower(pBtCoexist); */
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_scan_notify(pBtCoexist, scanType);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_scan_notify(pBtCoexist, scanType);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -2788,32 +2383,6 @@ void EXhalbtcoutsrc_scan_notify(PBTC_COEXIST pBtCoexist, u8 type)
void EXhalbtcoutsrc_SetAntennaPathNotify(PBTC_COEXIST pBtCoexist, u8 type)
{
#if 0
u8 switchType;
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
return;
if (pBtCoexist->manual_control)
return;
halbtcoutsrc_LeaveLowPower(pBtCoexist);
switchType = type;
if (IS_HARDWARE_TYPE_8723B(pBtCoexist->Adapter)) {
if (pBtCoexist->board_info.btdm_ant_num == 1)
ex_halbtc8723b1ant_set_antenna_notify(pBtCoexist, type);
}
if (IS_HARDWARE_TYPE_8723D(pBtCoexist->Adapter)) {
if (pBtCoexist->board_info.btdm_ant_num == 1)
ex_halbtc8723d1ant_set_antenna_notify(pBtCoexist, type);
else if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8723d2ant_set_antenna_notify(pBtCoexist, type);
}
halbtcoutsrc_NormalLowPower(pBtCoexist);
#endif
}
void EXhalbtcoutsrc_connect_notify(PBTC_COEXIST pBtCoexist, u8 action)
@ -2835,11 +2404,6 @@ void EXhalbtcoutsrc_connect_notify(PBTC_COEXIST pBtCoexist, u8 action)
* halbtcoutsrc_LeaveLowPower(pBtCoexist); */
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_connect_notify(pBtCoexist, assoType);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_connect_notify(pBtCoexist, assoType);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -2902,11 +2466,6 @@ void EXhalbtcoutsrc_media_status_notify(PBTC_COEXIST pBtCoexist, RT_MEDIA_STATUS
* halbtcoutsrc_LeaveLowPower(pBtCoexist); */
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_media_status_notify(pBtCoexist, mStatus);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_media_status_notify(pBtCoexist, mStatus);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -2974,11 +2533,6 @@ void EXhalbtcoutsrc_specific_packet_notify(PBTC_COEXIST pBtCoexist, u8 pktType)
* halbtcoutsrc_LeaveLowPower(pBtCoexist); */
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_specific_packet_notify(pBtCoexist, packetType);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_specific_packet_notify(pBtCoexist, packetType);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -3032,11 +2586,6 @@ void EXhalbtcoutsrc_bt_info_notify(PBTC_COEXIST pBtCoexist, u8 *tmpBuf, u8 lengt
* halbtcoutsrc_LeaveLowPower(pBtCoexist); */
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_bt_info_notify(pBtCoexist, tmpBuf, length);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_bt_info_notify(pBtCoexist, tmpBuf, length);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -3116,28 +2665,6 @@ EXhalbtcoutsrc_RfStatusNotify(
void EXhalbtcoutsrc_StackOperationNotify(PBTC_COEXIST pBtCoexist, u8 type)
{
#if 0
u8 stackOpType;
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
return;
pBtCoexist->statistics.cntStackOperationNotify++;
if (pBtCoexist->manual_control)
return;
if ((HCI_BT_OP_INQUIRY_START == type) ||
(HCI_BT_OP_PAGING_START == type) ||
(HCI_BT_OP_PAIRING_START == type))
stackOpType = BTC_STACK_OP_INQ_PAGE_PAIR_START;
else if ((HCI_BT_OP_INQUIRY_FINISH == type) ||
(HCI_BT_OP_PAGING_SUCCESS == type) ||
(HCI_BT_OP_PAGING_UNSUCCESS == type) ||
(HCI_BT_OP_PAIRING_FINISH == type))
stackOpType = BTC_STACK_OP_INQ_PAGE_PAIR_FINISH;
else
stackOpType = BTC_STACK_OP_NONE;
#endif
}
void EXhalbtcoutsrc_halt_notify(PBTC_COEXIST pBtCoexist)
@ -3146,11 +2673,6 @@ void EXhalbtcoutsrc_halt_notify(PBTC_COEXIST pBtCoexist)
return;
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_halt_notify(pBtCoexist);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_halt_notify(pBtCoexist);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -3226,11 +2748,6 @@ void EXhalbtcoutsrc_pnp_notify(PBTC_COEXIST pBtCoexist, u8 pnpState)
else if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8723d2ant_pnp_notify(pBtCoexist, pnpState);
} else if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_pnp_notify(pBtCoexist, pnpState);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 1)
ex_halbtc8821a1ant_pnp_notify(pBtCoexist, pnpState);
else if (pBtCoexist->board_info.btdm_ant_num == 2)
@ -3296,11 +2813,6 @@ void EXhalbtcoutsrc_periodical(PBTC_COEXIST pBtCoexist)
* halbtcoutsrc_LeaveLowPower(pBtCoexist); */
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_periodical(pBtCoexist);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_periodical(pBtCoexist);
else if (pBtCoexist->board_info.btdm_ant_num == 1) {
@ -3371,34 +2883,6 @@ void EXhalbtcoutsrc_dbg_control(PBTC_COEXIST pBtCoexist, u8 opCode, u8 opLen, u8
/* halbtcoutsrc_NormalLowPower(pBtCoexist); */
}
#if 0
VOID
EXhalbtcoutsrc_AntennaDetection(
IN PBTC_COEXIST pBtCoexist,
IN u4Byte centFreq,
IN u4Byte offset,
IN u4Byte span,
IN u4Byte seconds
)
{
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
return;
/* Need to refine the following power save operations to enable this function in the future */
#if 0
IPSDisable(pBtCoexist->Adapter, FALSE, 0);
LeisurePSLeave(pBtCoexist->Adapter, LPS_DISABLE_BT_COEX);
#endif
if (IS_HARDWARE_TYPE_8723B(pBtCoexist->Adapter)) {
if (pBtCoexist->board_info.btdm_ant_num == 1)
ex_halbtc8723b1ant_AntennaDetection(pBtCoexist, centFreq, offset, span, seconds);
}
/* IPSReturn(pBtCoexist->Adapter, 0xff); */
}
#endif
void EXhalbtcoutsrc_StackUpdateProfileInfo(void)
{
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
@ -3480,12 +2964,6 @@ void EXhalbtcoutsrc_SetBtPatchVersion(u16 btHciVersion, u16 btPatchVersion)
pBtCoexist->bt_info.bt_hci_ver = btHciVersion;
}
#if 0
void EXhalbtcoutsrc_SetBtExist(u8 bBtExist)
{
GLBtCoexist.boardInfo.bBtExist = bBtExist;
}
#endif
void EXhalbtcoutsrc_SetChipType(u8 chipType)
{
switch (chipType) {
@ -3519,21 +2997,10 @@ void EXhalbtcoutsrc_SetAntNum(u8 type, u8 antNum)
if (BT_COEX_ANT_TYPE_PG == type) {
GLBtCoexist.board_info.pg_ant_num = antNum;
GLBtCoexist.board_info.btdm_ant_num = antNum;
#if 0
/* The antenna position: Main (default) or Aux for pgAntNum=2 && btdmAntNum =1 */
/* The antenna position should be determined by auto-detect mechanism */
/* The following is assumed to main, and those must be modified if y auto-detect mechanism is ready */
if ((GLBtCoexist.board_info.pg_ant_num == 2) && (GLBtCoexist.board_info.btdm_ant_num == 1))
GLBtCoexist.board_info.btdm_ant_pos = BTC_ANTENNA_AT_MAIN_PORT;
else
GLBtCoexist.board_info.btdm_ant_pos = BTC_ANTENNA_AT_MAIN_PORT;
#endif
} else if (BT_COEX_ANT_TYPE_ANTDIV == type) {
GLBtCoexist.board_info.btdm_ant_num = antNum;
/* GLBtCoexist.boardInfo.btdmAntPos = BTC_ANTENNA_AT_MAIN_PORT; */
} else if (BT_COEX_ANT_TYPE_DETECTED == type) {
GLBtCoexist.board_info.btdm_ant_num = antNum;
/* GLBtCoexist.boardInfo.btdmAntPos = BTC_ANTENNA_AT_MAIN_PORT; */
}
}
@ -3553,11 +3020,6 @@ void EXhalbtcoutsrc_DisplayBtCoexInfo(PBTC_COEXIST pBtCoexist)
halbtcoutsrc_LeaveLowPower(pBtCoexist);
if (IS_HARDWARE_TYPE_8821(pBtCoexist->Adapter)) {
#if 0
if (halbtcoutsrc_IsCsrBtCoex(pBtCoexist) == _TRUE)
ex_halbtc8821aCsr2ant_display_coex_info(pBtCoexist);
else
#endif
if (pBtCoexist->board_info.btdm_ant_num == 2)
ex_halbtc8821a2ant_display_coex_info(pBtCoexist);
else if (pBtCoexist->board_info.btdm_ant_num == 1)
@ -3890,12 +3352,8 @@ void hal_btcoex_SuspendNotify(PADAPTER padapter, u8 state)
break;
case BTCOEX_SUSPEND_STATE_SUSPEND_KEEP_ANT:
/* should switch to "#if 1" once all ICs' coex. revision are upgraded to support the KEEP_ANT case */
#if 0
EXhalbtcoutsrc_pnp_notify(&GLBtCoexist, BTC_WIFI_PNP_SLEEP_KEEP_ANT);
#else
EXhalbtcoutsrc_pnp_notify(&GLBtCoexist, BTC_WIFI_PNP_SLEEP);
EXhalbtcoutsrc_pnp_notify(&GLBtCoexist, BTC_WIFI_PNP_SLEEP_KEEP_ANT);
#endif
break;
case BTCOEX_SUSPEND_STATE_RESUME:
EXhalbtcoutsrc_pnp_notify(&GLBtCoexist, BTC_WIFI_PNP_WAKE_UP);
@ -4085,96 +3543,8 @@ u32 hal_btcoex_GetDBG(PADAPTER padapter, u8 *pStrBuf, u32 bufSize)
pstr += count;
leftSize -= count;
#if 0
count = rtw_sprintf(pstr, leftSize, "INTERFACE Debug Setting Definition:\n");
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[0]=%d for INTF_INIT\n",
GLBtcDbgType[BTC_MSG_INTERFACE] & INTF_INIT ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[2]=%d for INTF_NOTIFY\n\n",
GLBtcDbgType[BTC_MSG_INTERFACE] & INTF_NOTIFY ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "ALGORITHM Debug Setting Definition:\n");
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[0]=%d for BT_RSSI_STATE\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_BT_RSSI_STATE ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[1]=%d for WIFI_RSSI_STATE\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_WIFI_RSSI_STATE ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[2]=%d for BT_MONITOR\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_BT_MONITOR ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[3]=%d for TRACE\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_TRACE ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[4]=%d for TRACE_FW\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_TRACE_FW ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[5]=%d for TRACE_FW_DETAIL\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_TRACE_FW_DETAIL ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[6]=%d for TRACE_FW_EXEC\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_TRACE_FW_EXEC ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[7]=%d for TRACE_SW\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_TRACE_SW ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[8]=%d for TRACE_SW_DETAIL\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_TRACE_SW_DETAIL ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
count = rtw_sprintf(pstr, leftSize, "\tbit[9]=%d for TRACE_SW_EXEC\n",
GLBtcDbgType[BTC_MSG_ALGORITHM] & ALGO_TRACE_SW_EXEC ? 1 : 0);
if ((count < 0) || (count >= leftSize))
goto exit;
pstr += count;
leftSize -= count;
#endif
exit:
count = pstr - pStrBuf;
/* RTW_INFO(FUNC_ADPT_FMT ": usedsize=%d\n", FUNC_ADPT_ARG(padapter), count); */
return count;
}

View file

@ -2002,17 +2002,7 @@ void rtw_sec_write_cam_ent(_adapter *adapter, u8 id, u16 ctrl, u8 *mac, u8 *key)
u32 wdata;
/* TODO: consider other key length accordingly */
#if 0
switch ((ctrl & 0x1c) >> 2) {
case _WEP40_:
case _TKIP_:
case _AES_:
case _WEP104_:
}
#else
j = 7;
#endif
for (; j >= 0; j--) {
switch (j) {
@ -2447,44 +2437,16 @@ void rtw_mbid_cam_restore(_adapter *adapter)
void rtw_hal_set_macaddr_mbid(_adapter *adapter, u8 *mac_addr)
{
#if 0 /*TODO - modify for more flexible*/
u8 idx = 0;
/*
MBID entry_id = 0~7 ,for IFACE_ID0 ~ IFACE_IDx
*/
u8 entry_id = rtw_mbid_camid_alloc(adapter, mac_addr);
if ((check_fwstate(&adapter->mlmepriv, WIFI_STATION_STATE) == _TRUE) &&
(DEV_STA_NUM(adapter_to_dvobj(adapter)) == 1)) {
for (idx = 0; idx < 6; idx++)
rtw_write8(GET_PRIMARY_ADAPTER(adapter), (REG_MACID + idx), val[idx]);
} else {
/*MBID entry_id = 0~7 ,0 for root AP, 1~7 for VAP*/
u8 entry_id;
if ((check_fwstate(&adapter->mlmepriv, WIFI_AP_STATE) == _TRUE) &&
(DEV_AP_NUM(adapter_to_dvobj(adapter)) == 1)) {
entry_id = 0;
if (rtw_mbid_cam_assign(adapter, val, entry_id)) {
RTW_INFO(FUNC_ADPT_FMT" Root AP assigned success\n", FUNC_ADPT_ARG(adapter));
write_mbssid_cam(adapter, entry_id, val);
}
} else {
entry_id = rtw_mbid_camid_alloc(adapter, val);
if (entry_id != INVALID_CAM_ID)
write_mbssid_cam(adapter, entry_id, val);
}
if (entry_id != INVALID_CAM_ID) {
write_mbssid_cam(adapter, entry_id, mac_addr);
enable_mbssid_cam(adapter);
}
#else
{
/*
MBID entry_id = 0~7 ,for IFACE_ID0 ~ IFACE_IDx
*/
u8 entry_id = rtw_mbid_camid_alloc(adapter, mac_addr);
if (entry_id != INVALID_CAM_ID) {
write_mbssid_cam(adapter, entry_id, mac_addr);
enable_mbssid_cam(adapter);
}
}
#endif
}
void rtw_hal_change_macaddr_mbid(_adapter *adapter, u8 *mac_addr)
@ -3952,14 +3914,6 @@ void rtw_hal_set_fw_wow_related_cmd(_adapter *padapter, u8 enable)
rtw_hal_check_pno_enabled(padapter);
#endif /* CONFIG_PNO_SUPPORT */
} else {
#if 0
{
u32 PageSize = 0;
rtw_hal_get_def_var(padapter, HAL_DEF_TX_PAGE_SIZE, (u8 *)&PageSize);
dump_TX_FIFO(padapter, 4, PageSize);
}
#endif
rtw_hal_set_remote_wake_ctrl_cmd(padapter, enable);
}
RTW_PRINT("-%s()-\n", __func__);
@ -4396,21 +4350,6 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
pframe += (cur_network->IELength + len_diff);
pktlen += (cur_network->IELength + len_diff);
}
#if 0
{
u8 *wps_ie;
uint wps_ielen;
u8 sr = 0;
wps_ie = rtw_get_wps_ie(pmgntframe->buf_addr + TXDESC_OFFSET + sizeof(struct rtw_ieee80211_hdr_3addr) + _BEACON_IE_OFFSET_,
pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_, NULL, &wps_ielen);
if (wps_ie && wps_ielen > 0)
rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_SELECTED_REGISTRAR, (u8 *)(&sr), NULL);
if (sr != 0)
set_fwstate(pmlmepriv, WIFI_UNDER_WPS);
else
_clr_fwstate_(pmlmepriv, WIFI_UNDER_WPS);
}
#endif
#ifdef CONFIG_P2P
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
u32 len;
@ -4501,18 +4440,6 @@ _issue_bcn:
* #endif */ /* #if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */
*pLength = pktlen;
#if 0
/* printf dbg msg */
dbgbufLen = pktlen;
RTW_INFO("======> DBG MSG FOR CONSTRAUCT P2P BEACON\n");
for (index = 0; index < dbgbufLen; index++)
printk("%x ", *(dbgbuf + index));
printk("\n");
RTW_INFO("<====== DBG MSG FOR CONSTRAUCT P2P BEACON\n");
#endif
}
static int get_reg_classes_full_count(struct p2p_channels channel_list)
@ -4834,19 +4761,8 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
#endif
*pLength = pktlen;
#if 0
/* printf dbg msg */
dbgbufLen = pktlen;
RTW_INFO("======> DBG MSG FOR CONSTRAUCT P2P Probe Rsp\n");
for (index = 0; index < dbgbufLen; index++)
printk("%x ", *(dbgbuf + index));
printk("\n");
RTW_INFO("<====== DBG MSG FOR CONSTRAUCT P2P Probe Rsp\n");
#endif
}
static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pLength)
{
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
@ -5250,19 +5166,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
pframe += wfdielen;
pktlen += wfdielen;
#endif
*pLength = pktlen;
#if 0
/* printf dbg msg */
dbgbufLen = pktlen;
RTW_INFO("======> DBG MSG FOR CONSTRAUCT Nego Rsp\n");
for (index = 0; index < dbgbufLen; index++)
printk("%x ", *(dbgbuf + index));
printk("\n");
RTW_INFO("<====== DBG MSG FOR CONSTRAUCT Nego Rsp\n");
#endif
}
static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *pLength)
@ -5364,142 +5268,6 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
p2pie[p2pielen++] = 200; /* 2 seconds needed to be the P2P Client */
/* due to defult value is FAIL INFO UNAVAILABLE, so the following IE is not needed */
#if 0
if (status_code == P2P_STATUS_SUCCESS) {
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
/* The P2P Invitation request frame asks this Wi-Fi device to be the P2P GO */
/* In this case, the P2P Invitation response frame should carry the two more P2P attributes. */
/* First one is operating channel attribute. */
/* Second one is P2P Group BSSID attribute. */
/* Operating Channel */
/* Type: */
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
/* Length: */
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
p2pielen += 2;
/* Value: */
/* Country String */
p2pie[p2pielen++] = 'X';
p2pie[p2pielen++] = 'X';
/* The third byte should be set to 0x04. */
/* Described in the "Operating Channel Attribute" section. */
p2pie[p2pielen++] = 0x04;
/* Operating Class */
p2pie[p2pielen++] = 0x51; /* Copy from SD7 */
/* Channel Number */
p2pie[p2pielen++] = pwdinfo->operating_channel; /* operating channel number */
/* P2P Group BSSID */
/* Type: */
p2pie[p2pielen++] = P2P_ATTR_GROUP_BSSID;
/* Length: */
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN);
p2pielen += 2;
/* Value: */
/* P2P Device Address for GO */
_rtw_memcpy(p2pie + p2pielen, adapter_mac_addr(padapter), ETH_ALEN);
p2pielen += ETH_ALEN;
}
/* Channel List */
/* Type: */
p2pie[p2pielen++] = P2P_ATTR_CH_LIST;
/* Length: */
/* Country String(3) */
/* + ( Operating Class (1) + Number of Channels(1) ) * Operation Classes (?) */
/* + number of channels in all classes */
len_channellist_attr = 3
+ (1 + 1) * (u16)pmlmeext->channel_list.reg_classes
+ get_reg_classes_full_count(pmlmeext->channel_list);
#ifdef CONFIG_CONCURRENT_MODE
if (rtw_mi_check_status(padapter, MI_LINKED))
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(5 + 1);
else
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr);
#else
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr);
#endif
p2pielen += 2;
/* Value: */
/* Country String */
p2pie[p2pielen++] = 'X';
p2pie[p2pielen++] = 'X';
/* The third byte should be set to 0x04. */
/* Described in the "Operating Channel Attribute" section. */
p2pie[p2pielen++] = 0x04;
/* Channel Entry List */
#ifdef CONFIG_CONCURRENT_MODE
if (rtw_mi_check_status(padapter, MI_LINKED)) {
u8 union_ch = rtw_mi_get_union_chan(padapter);
/* Operating Class */
if (union_ch > 14) {
if (union_ch >= 149)
p2pie[p2pielen++] = 0x7c;
else
p2pie[p2pielen++] = 0x73;
} else
p2pie[p2pielen++] = 0x51;
/* Number of Channels */
/* Just support 1 channel and this channel is AP's channel */
p2pie[p2pielen++] = 1;
/* Channel List */
p2pie[p2pielen++] = union_ch;
} else {
int i, j;
for (j = 0; j < pmlmeext->channel_list.reg_classes; j++) {
/* Operating Class */
p2pie[p2pielen++] = pmlmeext->channel_list.reg_class[j].reg_class;
/* Number of Channels */
p2pie[p2pielen++] = pmlmeext->channel_list.reg_class[j].channels;
/* Channel List */
for (i = 0; i < pmlmeext->channel_list.reg_class[j].channels; i++)
p2pie[p2pielen++] = pmlmeext->channel_list.reg_class[j].channel[i];
}
}
#else /* CONFIG_CONCURRENT_MODE */
{
int i, j;
for (j = 0; j < pmlmeext->channel_list.reg_classes; j++) {
/* Operating Class */
p2pie[p2pielen++] = pmlmeext->channel_list.reg_class[j].reg_class;
/* Number of Channels */
p2pie[p2pielen++] = pmlmeext->channel_list.reg_class[j].channels;
/* Channel List */
for (i = 0; i < pmlmeext->channel_list.reg_class[j].channels; i++)
p2pie[p2pielen++] = pmlmeext->channel_list.reg_class[j].channel[i];
}
}
#endif /* CONFIG_CONCURRENT_MODE */
}
#endif
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pktlen);
#ifdef CONFIG_WFD
@ -5509,21 +5277,8 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
#endif
*pLength = pktlen;
#if 0
/* printf dbg msg */
dbgbufLen = pktlen;
RTW_INFO("======> DBG MSG FOR CONSTRAUCT Invite Rsp\n");
for (index = 0; index < dbgbufLen; index++)
printk("%x ", *(dbgbuf + index));
printk("\n");
RTW_INFO("<====== DBG MSG FOR CONSTRAUCT Invite Rsp\n");
#endif
}
static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe, u32 *pLength)
{
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
@ -5583,20 +5338,6 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe,
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 ); */
@ -5622,18 +5363,6 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe,
#endif
*pLength = pktlen;
/* printf dbg msg */
#if 0
dbgbufLen = pktlen;
RTW_INFO("======> DBG MSG FOR CONSTRAUCT ProvisionDis Rsp\n");
for (index = 0; index < dbgbufLen; index++)
printk("%x ", *(dbgbuf + index));
printk("\n");
RTW_INFO("<====== DBG MSG FOR CONSTRAUCT ProvisionDis Rsp\n");
#endif
}
u8 rtw_hal_set_FwP2PRsvdPage_cmd(_adapter *adapter, PRSVDPAGE_LOC rsvdpageloc)
@ -6521,23 +6250,6 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index,
}
CurtPktPageNum = (u8)PageNum(GTKLength, page_size);
}
#if 0
{
int i;
printk("\ntoFW KCK: ");
for (i = 0; i < 16; i++)
printk(" %02x ", kck[i]);
printk("\ntoFW KEK: ");
for (i = 0; i < 16; i++)
printk(" %02x ", kek[i]);
printk("\n");
}
RTW_INFO("%s(): HW_VAR_SET_TX_CMD: KEK KCK %p %d\n",
__func__, &pframe[index - tx_desc],
(tx_desc + RTW_KCK_LEN + RTW_KEK_LEN));
#endif
*page_num += CurtPktPageNum;
index += (CurtPktPageNum * page_size);
@ -6549,22 +6261,6 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index,
rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc],
GTKLength, _FALSE, _FALSE, _TRUE);
#if 0
{
int gj;
printk("123GTK pkt=>\n");
for (gj = 0; gj < GTKLength + tx_desc; gj++) {
printk(" %02x ", pframe[index - tx_desc + gj]);
if ((gj + 1) % 16 == 0)
printk("\n");
}
printk(" <=end\n");
}
RTW_INFO("%s(): HW_VAR_SET_TX_CMD: GTK RSP %p %d\n",
__func__, &pframe[index - tx_desc],
(tx_desc + GTKLength));
#endif
CurtPktPageNum = (u8)PageNum(tx_desc + GTKLength, page_size);
@ -7719,11 +7415,6 @@ void rtw_hal_set_p2p_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index,
rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc],
P2PBCNLength, _FALSE, _FALSE, _FALSE);
#if 0
RTW_INFO("%s(): HW_VAR_SET_TX_CMD: PROBE RSP %p %d\n",
__func__, &pframe[index - tx_desc], (P2PBCNLength + tx_desc));
#endif
CurtPktPageNum = (u8)PageNum(tx_desc + P2PBCNLength, page_size);
*page_num += CurtPktPageNum;
@ -7737,9 +7428,6 @@ void rtw_hal_set_p2p_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index,
rtw_hal_fill_fake_txdesc(adapter, &pframe[index - tx_desc],
P2PProbeRspLength, _FALSE, _FALSE, _FALSE);
/* RTW_INFO("%s(): HW_VAR_SET_TX_CMD: PROBE RSP %p %d\n", */
/* __func__, &pframe[index-tx_desc], (P2PProbeRspLength+tx_desc)); */
CurtPktPageNum = (u8)PageNum(tx_desc + P2PProbeRspLength, page_size);
*page_num += CurtPktPageNum;
@ -9560,21 +9248,8 @@ void rtw_dump_cur_efuse(PADAPTER padapter)
RTW_INFO("EFUSE FILE\n");
else
RTW_INFO("HW EFUSE\n");
#if 0 //def CONFIG_RTW_DEBUG
for (i = 0; i < mapsize; i++) {
if (i % 16 == 0)
RTW_PRINT_SEL(RTW_DBGDUMP, "0x%03x: ", i);
_RTW_PRINT_SEL(RTW_DBGDUMP, "%02X%s"
, hal_data->efuse_eeprom_data[i]
, ((i + 1) % 16 == 0) ? "\n" : " ");
}
_RTW_PRINT_SEL(RTW_DBGDUMP, "\n");
#endif
}
#ifdef CONFIG_EFUSE_CONFIG_FILE
u32 Hal_readPGDataFromConfigFile(PADAPTER padapter)
{

View file

@ -4821,25 +4821,6 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
}
} else
RTW_INFO("%s(): No File %s, Load from HWImg Array!\n", __func__, pFileName);
#if 0
for (i = 0; i < DELTA_SWINGIDX_SIZE; ++i) {
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_2ga_p[%d] = %d\n", i, pRFCalibrateInfo->delta_swing_table_idx_2ga_p[i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_2ga_n[%d] = %d\n", i, pRFCalibrateInfo->delta_swing_table_idx_2ga_n[i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_2gb_p[%d] = %d\n", i, pRFCalibrateInfo->delta_swing_table_idx_2gb_p[i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_2gb_n[%d] = %d\n", i, pRFCalibrateInfo->delta_swing_table_idx_2gb_n[i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_2g_cck_a_p[%d] = %d\n", i, pRFCalibrateInfo->delta_swing_table_idx_2g_cck_a_p[i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_2g_cck_a_n[%d] = %d\n", i, pRFCalibrateInfo->delta_swing_table_idx_2g_cck_a_n[i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_2g_cck_b_p[%d] = %d\n", i, pRFCalibrateInfo->delta_swing_table_idx_2g_cck_b_p[i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_2g_cck_b_n[%d] = %d\n", i, pRFCalibrateInfo->delta_swing_table_idx_2g_cck_b_n[i]);
for (j = 0; j < 3; ++j) {
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_5ga_p[%d][%d] = %d\n", j, i, pRFCalibrateInfo->delta_swing_table_idx_5ga_p[j][i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_5ga_n[%d][%d] = %d\n", j, i, pRFCalibrateInfo->delta_swing_table_idx_5ga_n[j][i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_5gb_p[%d][%d] = %d\n", j, i, pRFCalibrateInfo->delta_swing_table_idx_5gb_p[j][i]);
RTW_INFO("pRFCalibrateInfo->delta_swing_table_idx_5gb_n[%d][%d] = %d\n", j, i, pRFCalibrateInfo->delta_swing_table_idx_5gb_n[j][i]);
}
}
#endif
return rtStatus;
}

View file

@ -580,10 +580,6 @@ void rtw_hal_set_chnl_bw(_adapter *padapter, u8 channel, CHANNEL_WIDTH Bandwidth
/* MP mode channel don't use secondary channel */
if (rtw_mi_mp_mode_check(padapter) == _FALSE) {
#if 0
if (cch_160 != 0)
cch_80 = rtw_get_scch_by_cch_offset(cch_160, CHANNEL_WIDTH_160, Offset80);
#endif
if (cch_80 != 0)
cch_40 = rtw_get_scch_by_cch_offset(cch_80, CHANNEL_WIDTH_80, Offset80);
if (cch_40 != 0)

View file

@ -506,11 +506,6 @@ static void mpt_SetRFPath_819X(PADAPTER pAdapter)
default:
break;
}
#if 0
/* r_rx_antenna_ofdm, bit0=A, bit1=B, bit2=C, bit3=D */
/* r_cckrx_enable : CCK default, 0=A, 1=B, 2=C, 3=D */
/* r_cckrx_enable_2 : CCK option, 0=A, 1=B, 2=C, 3=D */
#endif
switch (ulAntennaRx) {
case ANTENNA_A:
r_rx_antenna_ofdm = 0x1; /* A*/
@ -607,23 +602,13 @@ u8 hal_mpt_ReadRFThermalMeter(PADAPTER pAdapter)
}
void hal_mpt_GetThermalMeter(PADAPTER pAdapter, u8 *value)
{
#if 0
fw_cmd(pAdapter, IOCMD_GET_THERMAL_METER);
rtw_msleep_os(1000);
fw_cmd_data(pAdapter, value, 1);
*value &= 0xFF;
#else
hal_mpt_TriggerRFThermalMeter(pAdapter);
rtw_msleep_os(1000);
*value = hal_mpt_ReadRFThermalMeter(pAdapter);
#endif
}
void hal_mpt_SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);

View file

@ -52,20 +52,6 @@ static u8 RETRY_PENALTY_UP[RETRYSIZE + 1] = {49, 44, 16, 16, 0, 48}; /* 12% for
static u8 PT_PENALTY[RETRYSIZE + 1] = {34, 31, 30, 24, 0, 32};
#if 0
static u8 RETRY_PENALTY_IDX[2][RATESIZE] = {{
4, 4, 4, 5, 4, 4, 5, 7, 7, 7, 8, 0x0a, /* SS>TH */
4, 4, 4, 4, 6, 0x0a, 0x0b, 0x0d,
5, 5, 7, 7, 8, 0x0b, 0x0d, 0x0f
}, /* 0329 R01 */
{
4, 4, 4, 5, 7, 7, 9, 9, 0x0c, 0x0e, 0x10, 0x12, /* SS<TH */
4, 4, 5, 5, 6, 0x0a, 0x11, 0x13,
9, 9, 9, 9, 0x0c, 0x0e, 0x11, 0x13
}
};
#endif
/* wilson modify */
static u8 RETRY_PENALTY_IDX[2][RATESIZE] = {{
@ -106,14 +92,6 @@ static u8 TRYING_NECESSARY[RATESIZE] = {2, 2, 2, 2,
4, 4, 7, 10, 10, 12, 12, 18,
5, 7, 7, 8, 11, 18, 36, 60
}; /* 0329 */ /* 1207 */
#if 0
static u8 POOL_RETRY_TH[RATESIZE] = {30, 30, 30, 30,
30, 30, 25, 25, 20, 15, 15, 10,
30, 25, 25, 20, 15, 10, 10, 10,
30, 25, 25, 20, 15, 10, 10, 10
};
#endif
static u8 DROPING_NECESSARY[RATESIZE] = {1, 1, 1, 1,
1, 2, 3, 4, 5, 6, 7, 8,
1, 2, 3, 4, 5, 6, 7, 8,
@ -630,34 +608,9 @@ odm_ra_info_init(
)
{
struct _odm_ra_info_ *p_ra_info = &p_dm_odm->ra_info[mac_id];
#if 0
u8 wireless_mode = 0xFF; /* invalid value */
u8 max_rate_idx = 0x13; /* MCS7 */
if (p_dm_odm->p_wireless_mode != NULL)
wireless_mode = *(p_dm_odm->p_wireless_mode);
if (wireless_mode != 0xFF) {
if (wireless_mode & ODM_WM_N24G)
max_rate_idx = 0x13;
else if (wireless_mode & ODM_WM_G)
max_rate_idx = 0x0b;
else if (wireless_mode & ODM_WM_B)
max_rate_idx = 0x03;
}
/* printk("%s ==>wireless_mode:0x%08x,max_raid_idx:0x%02x\n ",__func__,wireless_mode,max_rate_idx); */
ODM_RT_TRACE(p_dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
("odm_ra_info_init(): wireless_mode:0x%08x,max_raid_idx:0x%02x\n",
wireless_mode, max_rate_idx));
p_ra_info->decision_rate = max_rate_idx;
p_ra_info->pre_rate = max_rate_idx;
p_ra_info->highest_rate = max_rate_idx;
#else
p_ra_info->decision_rate = 0x13;
p_ra_info->pre_rate = 0x13;
p_ra_info->highest_rate = 0x13;
#endif
p_ra_info->lowest_rate = 0;
p_ra_info->rate_id = 0;
p_ra_info->rate_mask = 0xffffffff;

View file

@ -313,11 +313,6 @@ odm_update_rx_idle_ant(
value16 |= ((u16)optional_ant << 6);
value16 |= ((u16)default_ant << 9);
odm_write_2byte(p_dm_odm, ODM_REG_TRMUX_11AC + 2, value16);
#if 0
odm_set_bb_reg(p_dm_odm, ODM_REG_TRMUX_11AC, BIT(21) | BIT20 | BIT19, default_ant); /* Default RX */
odm_set_bb_reg(p_dm_odm, ODM_REG_TRMUX_11AC, BIT(24) | BIT23 | BIT22, optional_ant); /* Optional RX */
odm_set_bb_reg(p_dm_odm, ODM_REG_TRMUX_11AC, BIT(27) | BIT26 | BIT25, default_ant); /* Default TX */
#endif
}
if (p_dm_odm->support_ic_type == ODM_RTL8188E) {
@ -1614,39 +1609,12 @@ odm_fast_ant_training(
if (target_ant_path_a == 0)
odm_ant_div_on_off(p_dm_odm, ANTDIV_OFF);
}
#if 0
#if (RTL8192E_SUPPORT == 1)
/* 3 [path-B]--------------------------- */
if (is_pkt_filter_macth_path_b == false) {
if (p_dm_odm->fat_print_rssi == 1)
ODM_RT_TRACE(p_dm_odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD, ("***[%d]{path-B}: None Packet is matched\n\n\n", __LINE__));
} else {
if (p_dm_odm->fat_print_rssi == 1) {
ODM_RT_TRACE(p_dm_odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD,
(" ***target_ant_path_b = (( %d )) *** max_rssi = (( %d ))***\n\n\n", target_ant_path_b, max_rssi_path_b));
}
odm_set_bb_reg(p_dm_odm, 0xB38, BIT(21) | BIT20 | BIT19, target_ant_path_b); /* Default RX is Omni, Optional RX is the best decision by FAT */
odm_set_bb_reg(p_dm_odm, 0x80c, BIT(21), 1); /* Reg80c[21]=1'b1 //from TX Info */
p_dm_fat_table->antsel_pathB[p_dm_fat_table->train_idx] = target_ant_path_b;
}
#endif
#endif
/* 2 Reset counter */
for (i = 0; i < (p_dm_odm->fat_comb_a); i++) {
p_dm_fat_table->ant_sum_rssi[i] = 0;
p_dm_fat_table->ant_rssi_cnt[i] = 0;
}
/*
#if (RTL8192E_SUPPORT == 1)
for(i=0; i<=(p_dm_odm->fat_comb_b); i++)
{
p_dm_fat_table->antSumRSSI_pathB[i] = 0;
p_dm_fat_table->antRSSIcnt_pathB[i] = 0;
}
#endif
*/
p_dm_fat_table->fat_state = FAT_PREPARE_STATE;
return;
@ -3225,11 +3193,6 @@ odm_antenna_diversity_init(
{
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void;
#if 0
if (p_dm_odm->mp_mode == true)
return;
#endif
#if (defined(CONFIG_PHYDM_ANTENNA_DIVERSITY))
odm_ant_div_config(p_dm_odm);
odm_ant_div_init(p_dm_odm);

View file

@ -457,16 +457,8 @@ phydm_bb_debug_info(
u8 rf_gain_path_a, rf_gain_path_b, rf_gain_path_c, rf_gain_path_d;
u8 rx_snr_path_a, rx_snr_path_b, rx_snr_path_c, rx_snr_path_d;
s32 sig_power;
const char *L_rate[8] = {"6M", "9M", "12M", "18M", "24M", "36M", "48M", "54M"};
#if 0
const double evm_comp_20M = 0.579919469776867; /* 10*log10(64.0/56.0) */
const double evm_comp_40M = 0.503051183113957; /* 10*log10(128.0/114.0) */
const double evm_comp_80M = 0.244245993314183; /* 10*log10(256.0/242.0) */
const double evm_comp_160M = 0.244245993314183; /* 10*log10(512.0/484.0) */
#endif
if (p_dm_odm->support_ic_type & ODM_IC_11N_SERIES) {
phydm_bb_debug_info_n_series(p_dm_odm, &used, output, &out_len);
return;
@ -2300,21 +2292,6 @@ phydm_fw_trace_handler_code(
/**/
/*C2H_RA_Dbg_code(F_RA_H2C,1,0, SysMib.ODM.DEBUG.fw_trace_en, mode, macid, 0); //RA MASK*/
}
#if 0
else if (dbg_num == 2) {
if (content_0 == 1) {
ODM_RT_TRACE(p_dm_odm, ODM_FW_DEBUG_TRACE, ODM_DBG_LOUD, ("[FW][H2C=0x40] MACID=((%d)), rate ID=((%d)), SGI=((%d)), BW=((%d))\n", content_1, content_2, content_3, content_4));
/**/
} else if (content_0 == 2) {
ODM_RT_TRACE(p_dm_odm, ODM_FW_DEBUG_TRACE, ODM_DBG_LOUD, ("[FW][H2C=0x40] VHT_en=((%d)), Disable_PowerTraining=((%d)), Disable_RA=((%d)), No_Update=((%d))\n", content_1, content_2, content_3, content_4));
/**/
} else if (content_0 == 3) {
ODM_RT_TRACE(p_dm_odm, ODM_FW_DEBUG_TRACE, ODM_DBG_LOUD, ("[FW][H2C=0x40] RA_MSK=[%x | %x | %x | %x ]\n", content_1, content_2, content_3, content_4));
/**/
}
}
#endif
}
}
/*--------------------------------------------*/
@ -2359,11 +2336,6 @@ phydm_fw_trace_handler_8051(
{
#if CONFIG_PHYDM_DEBUG_FUNCTION
struct PHY_DM_STRUCT *p_dm_odm = (struct PHY_DM_STRUCT *)p_dm_void;
#if 0
if (cmd_len >= 3)
cmd_buf[cmd_len - 1] = '\0';
ODM_RT_TRACE(p_dm_odm, ODM_FW_DEBUG_TRACE, ODM_DBG_LOUD, ("[FW DBG Msg] %s\n", &(cmd_buf[3])));
#else
int i = 0;
u8 extend_c2h_sub_id = 0, extend_c2h_dbg_len = 0, extend_c2h_dbg_seq = 0;
@ -2397,6 +2369,5 @@ go_backfor_aggre_dbg_pkt:
}
#endif
#endif /*#if CONFIG_PHYDM_DEBUG_FUNCTION*/
}

View file

@ -39,20 +39,14 @@
#define _bit_all(_name) BIT_##_name
#define _bit_ic(_name, _ic) BIT_##_name##_ic
/* _cat: implemented by Token-Pasting Operator. */
#if 0
#define _cat(_name, _ic_type, _func) \
(\
_func##_all(_name) \
)
#endif
/* _cat: implemented by Token-Passing Operator. */
/*===================================
#define ODM_REG_DIG_11N 0xC50
#define ODM_REG_DIG_11AC 0xDDD
ODM_REG(DIG,_pdm_odm)
ODM_REG(DIG, _pdm_odm)
=====================================*/
#define _reg_11N(_name) ODM_REG_##_name##_11N

View file

@ -219,19 +219,7 @@ odm_ra_para_adjust_init(
u8 ra_para_pool_u8[3] = { RADBG_RTY_PENALTY, RADBG_RATE_UP_RTY_RATIO, RADBG_RATE_DOWN_RTY_RATIO};
u8 rate_size_ht_1ss = 20, rate_size_ht_2ss = 28, rate_size_ht_3ss = 36; /*4+8+8+8+8 =36*/
u8 rate_size_vht_1ss = 10, rate_size_vht_2ss = 20, rate_size_vht_3ss = 30; /*10 + 10 +10 =30*/
#if 0
/* RTY_PENALTY = 1, u8 */
/* N_HIGH = 2, */
/* N_LOW = 3, */
/* RATE_UP_TABLE = 4, */
/* RATE_DOWN_TABLE = 5, */
/* TRYING_NECESSARY = 6, */
/* DROPING_NECESSARY = 7, */
/* RATE_UP_RTY_RATIO = 8, u8 */
/* RATE_DOWN_RTY_RATIO= 9, u8 */
/* ALL_PARA = 0xff */
#endif
ODM_RT_TRACE(p_dm_odm, PHYDM_COMP_RA_DBG, ODM_DBG_LOUD, ("odm_ra_para_adjust_init\n"));
if (p_dm_odm->support_ic_type & (ODM_RTL8188F | ODM_RTL8195A | ODM_RTL8703B | ODM_RTL8723B | ODM_RTL8188E | ODM_RTL8723D))

View file

@ -288,89 +288,6 @@ static struct _RT_CHANNEL_PLAN_MAXPWR chnl_plan_pwr_max_2g[] = {
/* ...... */
};
#if 0
/* ===========================================1:(2G_WORLD, 5G_NULL) */
struct _RT_CHANNEL_PLAN_MAXPWR RT_DOMAIN_01 = {{{01, 13, 20}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}}, 1}
/* ===========================================2:(2G_ETSI1, 5G_NULL) */
RT_DOMAIN_02 = {{{01, 13, 20}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}}, 1}
/* ===========================================3:(2G_FCC1, 5G_NULL) */
RT_DOMAIN_03 = {{{01, 11, 30}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}}, 1}
/* ===========================================4:(2G_MKK1, 5G_NULL) */
RT_DOMAIN_04 = {{{01, 14, 23}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}}, 1}
/* ===========================================5:(2G_ETSI2, 5G_NULL) */
RT_DOMAIN_05 = {{{10, 13, 20}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}}, 1}
/* ===========================================6:(2G_FCC1, 5G_FCC1) */
RT_DOMAIN_06 = {{{01, 13, 30}, {36, 48, 17}, {52, 64, 24}, {100, 140, 24}, {149, 165, 30}}, 5}
/* ===========================================7:(2G_WORLD, 5G_ETSI1) */
RT_DOMAIN_07 = {{{01, 13, 20}, {36, 48, 23}, {52, 64, 23}, {100, 140, 30}, {NR, NR, 0}}, 4}
/* ===========================================8:(2G_MKK1, 5G_MKK1) */
RT_DOMAIN_08 = {{{01, 14, 23}, {36, 48, 23}, {52, 64, 23}, {100, 140, 23}, {NR, NR, 0}}, 4}
/* ===========================================9:(2G_WORLD, 5G_KCC1) */
RT_DOMAIN_09 = {{{01, 13, 20}, {36, 48, 17}, {52, 64, 23}, {100, 124, 23}, {149, 165, 23}}, 5}
/* ===========================================10:(2G_WORLD, 5G_FCC2) */
RT_DOMAIN_10 = {{{01, 13, 20}, {36, 48, 17}, {NR, NR, 0}, {NR, NR, 0}, {149, 165, 30}}, 3}
/* ===========================================11:(2G_WORLD, 5G_FCC3) */
RT_DOMAIN_11 = {{{01, 13, 20}, {36, 48, 23}, {52, 64, 23}, {NR, NR, 0}, {149, 165, 23}}, 4}
/* ===========================================12:(2G_WORLD, 5G_FCC4) */
RT_DOMAIN_12 = {{{01, 13, 20}, {36, 48, 24}, {52, 64, 24}, {NR, NR, 0}, {149, 161, 27}}, 4}
/* ===========================================13:(2G_WORLD, 5G_FCC5) */
RT_DOMAIN_13 = {{{01, 13, 20}, {NR, NR, 0}, {NR, NR, 0}, {NR, NR, 0}, {149, 165, 27}}, 2}
/* ===========================================14:(2G_WORLD, 5G_FCC6) */
RT_DOMAIN_14 = {{{01, 13, 20}, {36, 48, 17}, {52, 64, 17}, {NR, NR, 0}, {NR, NR, 0}}, 3}
/* ===========================================15:(2G_FCC1, 5G_FCC7) */
RT_DOMAIN_15 = {{{01, 11, 30}, {36, 48, 23}, {52, 64, 24}, {100, 140, 24}, {149, 165, 30}}, 5}
/* ===========================================16:(2G_WORLD, 5G_ETSI2) */
RT_DOMAIN_16 = {{{01, 13, 20}, {36, 48, 23}, {52, 64, 23}, {100, 140, 30}, {149, 165, 30}}, 5}
/* ===========================================17:(2G_WORLD, 5G_ETSI3) */
RT_DOMAIN_17 = {{{01, 13, 20}, {36, 48, 23}, {52, 64, 23}, {100, 132, 30}, {149, 165, 20}}, 5}
/* ===========================================18:(2G_MKK1, 5G_MKK2) */
RT_DOMAIN_18 = {{{01, 14, 23}, {36, 48, 23}, {52, 64, 23}, {NR, NR, 0}, {NR, NR, 0}}, 3}
/* ===========================================19:(2G_MKK1, 5G_MKK3) */
RT_DOMAIN_19 = {{{01, 14, 23}, {NR, NR, 0}, {NR, NR, 0}, {100, 140, 23}, {NR, NR, 0}}, 2}
/* ===========================================20:(2G_FCC1, 5G_NCC1) */
RT_DOMAIN_20 = {{{01, 11, 30}, {NR, NR, 0}, {56, 64, 23}, {100, 140, 24}, {149, 165, 30}}, 4}
/* ===========================================21:(2G_FCC1, 5G_NCC2) */
RT_DOMAIN_21 = {{{01, 11, 30}, {NR, NR, 0}, {56, 64, 23}, {NR, NR, 0}, {149, 165, 30}}, 3}
/* ===========================================22:(2G_WORLD, 5G_FCC3) */
RT_DOMAIN_22 = {{{01, 13, 24}, {36, 48, 20}, {52, 64, 24}, {NR, NR, 0}, {149, 165, 30}}, 4}
/* ===========================================23:(2G_WORLD, 5G_ETSI2) */
RT_DOMAIN_23 = {{{01, 13, 20}, {36, 48, 23}, {52, 64, 23}, {100, 140, 30}, {149, 165, 30}}, 5}
#endif
/*
* counter & Realtek channel plan transfer table.
* */
@ -383,93 +300,4 @@ struct _RT_CHANNEL_PLAN_COUNTRY_TRANSFER_TABLE rt_ctry_chnl_tbl[] = {
RT_5G_WORLD,
RT_CHANNEL_DOMAIN_UNDEFINED /* 2G/5G world. */
},
#if 0
{
RT_CTRY_BB, /* "Barbados巴巴多斯" */
"BB",
RT_2G_WORLD,
RT_5G_NULL,
RT_CHANNEL_DOMAIN_EFUSE_0x20 /* 2G world. 5G_NULL */
},
{
RT_CTRY_DE, /* "Germany德國" */
"DE",
RT_2G_WORLD,
RT_5G_ETSI1,
RT_CHANNEL_DOMAIN_EFUSE_0x26
},
{
RT_CTRY_US, /* "Germany德國" */
"US",
RT_2G_FCC1,
RT_5G_FCC7,
RT_CHANNEL_DOMAIN_EFUSE_0x34
},
{
RT_CTRY_JP, /* "Germany德國" */
"JP",
RT_2G_MKK1,
RT_5G_MKK1,
RT_CHANNEL_DOMAIN_EFUSE_0x34
},
{
RT_CTRY_TW, /* "Germany德國" */
"TW",
RT_2G_FCC1,
RT_5G_NCC1,
RT_CHANNEL_DOMAIN_EFUSE_0x39
},
#endif
}; /* rt_ctry_chnl_tbl */
/*
* Realtek Defined channel plan.
* */
#if 0
static struct _RT_CHANNEL_PLAN_NEW rt_chnl_plan[] = {
/* channel Plan 0x20. */
{
&rt_ctry_chnl_tbl[1], /* struct _RT_CHANNEL_PLAN_COUNTRY_TRANSFER_TABLE Country & channel plan transfer table. */
RT_CHANNEL_DOMAIN_EFUSE_0x20, /* RT_CHANNEL_DOMAIN RT channel Plan Define */
RT_2G_WORLD, /* enum rt_regulation_2g */
RT_5G_NULL, /* enum rt_regulation_5g */
RT_WORLD, /* enum rt_regulation_cmn RT Regulatory domain definition. */
RT_SREQ_NA, /* RT channel plan special & customerize requirement. */
CHNL_RT_2G_WORLD,
CHNL_RT_2G_WORLD_SCAN_TYPE,
&chnl_plan_pwr_max_2g[0],
CHNL_RT_5G_NULL,
CHNL_RT_5G_NULL_SCAN_TYPE,
},
/* channel Plan 0x26. */
{
&rt_ctry_chnl_tbl[1], /* struct _RT_CHANNEL_PLAN_COUNTRY_TRANSFER_TABLE Country & channel plan transfer table. */
RT_CHANNEL_DOMAIN_EFUSE_0x26, /* RT_CHANNEL_DOMAIN RT channel Plan Define */
RT_2G_WORLD, /* enum rt_regulation_2g */
RT_5G_ETSI1, /* enum rt_regulation_5g */
RT_WORLD, /* enum rt_regulation_cmn RT Regulatory domain definition. */
RT_SREQ_NA, /* RT channel plan special & customerize requirement. */
CHNL_RT_2G_WORLD, /* 2G workd cannel */
CHNL_RT_2G_WORLD_SCAN_TYPE,
&chnl_plan_pwr_max_2g[1],
CHNL_RT_5G_ETSI1,
CHNL_RT_5G_ETSI1_SCAN_TYPE,
}
};
#endif

View file

@ -43,57 +43,6 @@ enum rt_channel_domain_new {
};
#if 0
#define DOMAIN_CODE_2G_WORLD \
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13
#define DOMAIN_CODE_2G_ETSI1 \
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13
#define DOMAIN_CODE_2G_ETSI2 \
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11
#define DOMAIN_CODE_2G_FCC1 \
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14
#define DOMAIN_CODE_2G_MKK1 \
{10, 11, 12, 13}, 4
#define DOMAIN_CODE_5G_ETSI1 \
{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 19
#define DOMAIN_CODE_5G_ETSI2 \
{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24
#define DOMAIN_CODE_5G_ETSI3 \
{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 149, 153, 157, 161, 165}, 22
#define DOMAIN_CODE_5G_FCC1 \
{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24
#define DOMAIN_CODE_5G_FCC2 \
{36, 40, 44, 48, 149, 153, 157, 161, 165}, 9
#define DOMAIN_CODE_5G_FCC3 \
{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 13
#define DOMAIN_CODE_5G_FCC4 \
{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161}, 12
#define DOMAIN_CODE_5G_FCC5 \
{149, 153, 157, 161, 165}, 5
#define DOMAIN_CODE_5G_FCC6 \
{36, 40, 44, 48, 52, 56, 60, 64}, 8
#define DOMAIN_CODE_5G_FCC7 \
{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149, 153, 157, 161, 165}, 20
#define DOMAIN_CODE_5G_IC1 \
{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149, 153, 157, 161, 165}, 20
#define DOMAIN_CODE_5G_KCC1 \
{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 149, 153, 157, 161, 165}, 20
#define DOMAIN_CODE_5G_MKK1 \
{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 19
#define DOMAIN_CODE_5G_MKK2 \
{36, 40, 44, 48, 52, 56, 60, 64}, 8
#define DOMAIN_CODE_5G_MKK3 \
{100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 11
#define DOMAIN_CODE_5G_NCC1 \
{56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149, 153, 157, 161, 165}, 24
#define DOMAIN_CODE_5G_NCC2 \
{56, 60, 64, 149, 153, 157, 161, 165}, 8
#define UNDEFINED \
{0}, 0
#endif
/*
*
*

View file

@ -166,20 +166,7 @@ static u8 rtl8192c_h2c_msg_hdl(_adapter *padapter, unsigned char *pbuf)
return H2C_SUCCESS;
}
#if 0
#if defined(CONFIG_AUTOSUSPEND) && defined(SUPPORT_HW_RFOFF_DETECTED)
u8 rtl8192c_set_FwSelectSuspend_cmd(_adapter *padapter , u8 bfwpoll, u16 period)
{
u8 res = _SUCCESS;
struct H2C_SS_RFOFF_PARAM param;
RTW_INFO("==>%s bfwpoll(%x)\n", __func__, bfwpoll);
param.gpio_period = period;/* Polling GPIO_11 period time */
param.ROFOn = (_TRUE == bfwpoll) ? 1 : 0;
FillH2CCmd_88E(padapter, SELECTIVE_SUSPEND_ROF_CMD, sizeof(param), (u8 *)(&param));
return res;
}
#endif /* CONFIG_AUTOSUSPEND && SUPPORT_HW_RFOFF_DETECTED */
#endif
u8 rtl8188e_set_rssi_cmd(_adapter *padapter, u8 *param)
{
u8 res = _SUCCESS;

View file

@ -42,23 +42,6 @@ dm_CheckProtection(
IN PADAPTER Adapter
)
{
#if 0
PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo);
u1Byte CurRate, RateThreshold;
if (pMgntInfo->pHTInfo->bCurBW40MHz)
RateThreshold = MGN_MCS1;
else
RateThreshold = MGN_MCS3;
if (Adapter->TxStats.CurrentInitTxRate <= RateThreshold) {
pMgntInfo->bDmDisableProtect = TRUE;
dbg_print("Forced disable protect: %x\n", Adapter->TxStats.CurrentInitTxRate);
} else {
pMgntInfo->bDmDisableProtect = FALSE;
dbg_print("Enable protect: %x\n", Adapter->TxStats.CurrentInitTxRate);
}
#endif
}
static VOID
@ -66,20 +49,6 @@ dm_CheckStatistics(
IN PADAPTER Adapter
)
{
#if 0
if (!Adapter->MgntInfo.bMediaConnect)
return;
/* 2008.12.10 tynli Add for getting Current_Tx_Rate_Reg flexibly. */
rtw_hal_get_hwreg(Adapter, HW_VAR_INIT_TX_RATE, (pu1Byte)(&Adapter->TxStats.CurrentInitTxRate));
/* Calculate current Tx Rate(Successful transmited!!) */
/* Calculate current Rx Rate(Successful received!!) */
/* for tx tx retry count */
rtw_hal_get_hwreg(Adapter, HW_VAR_RETRY_COUNT, (pu1Byte)(&Adapter->TxStats.NumTxRetryCount));
#endif
}
#ifdef CONFIG_SUPPORT_HW_WPS_PBC

View file

@ -300,23 +300,7 @@ static void efuse_read_phymap_from_txpktbuf(
lo32 = rtw_read32(adapter, REG_PKTBUF_DBG_DATA_L);
hi32 = rtw_read32(adapter, REG_PKTBUF_DBG_DATA_H);
#if 0
RTW_INFO("%s lo32:0x%08x, %02x %02x %02x %02x\n", __func__, lo32
, rtw_read8(adapter, REG_PKTBUF_DBG_DATA_L)
, rtw_read8(adapter, REG_PKTBUF_DBG_DATA_L + 1)
, rtw_read8(adapter, REG_PKTBUF_DBG_DATA_L + 2)
, rtw_read8(adapter, REG_PKTBUF_DBG_DATA_L + 3)
);
RTW_INFO("%s hi32:0x%08x, %02x %02x %02x %02x\n", __func__, hi32
, rtw_read8(adapter, REG_PKTBUF_DBG_DATA_H)
, rtw_read8(adapter, REG_PKTBUF_DBG_DATA_H + 1)
, rtw_read8(adapter, REG_PKTBUF_DBG_DATA_H + 2)
, rtw_read8(adapter, REG_PKTBUF_DBG_DATA_H + 3)
);
#endif
if (i == 0) {
#if 1 /* for debug */
u8 lenc[2];
u16 lenbak, aaabak;
u16 aaa;
@ -326,7 +310,6 @@ static void efuse_read_phymap_from_txpktbuf(
aaabak = le16_to_cpup((__le16 *)lenc);
lenbak = le16_to_cpu(*((__le16 *)lenc));
aaa = le16_to_cpup((__le16 *)&lo32);
#endif
len = le16_to_cpu(*((__le16 *)&lo32));
limit = (len - 2 < limit) ? len - 2 : limit;
@ -383,34 +366,13 @@ static s32 iol_read_efuse(
rtw_write8(padapter, REG_TDECTRL + 1, txpktbuf_bndy);
_rtw_memset(physical_map, 0xFF, 512);
/* /reg_0x106 = rtw_read8(padapter, REG_PKT_BUFF_ACCESS_CTRL); */
/* RTW_INFO("%s reg_0x106:0x%02x, write 0x%02x\n", __func__, reg_0x106, 0x69); */
rtw_write8(padapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
/* RTW_INFO("%s reg_0x106:0x%02x\n", __func__, rtw_read8(padapter, 0x106)); */
status = iol_execute(padapter, CMD_READ_EFUSE_MAP);
if (status == _SUCCESS)
efuse_read_phymap_from_txpktbuf(padapter, txpktbuf_bndy, physical_map, &size);
#if 0
RTW_PRINT("%s physical map\n", __func__);
for (i = 0; i < size; i++) {
if (i % 16 == 0)
RTW_PRINT("%02x", physical_map[i]);
else
_RTW_PRINT("%02x", physical_map[i]);
if (i % 16 == 7)
_RTW_PRINT(" ");
else if (i % 16 == 15)
_RTW_PRINT("\n");
else
_RTW_PRINT(" ");
}
_RTW_PRINT("\n");
#endif
efuse_phymap_to_logical(physical_map, offset, size_byte, logical_map);
return status;
@ -1041,14 +1003,6 @@ hal_EfusePowerSwitch_RTL8188E(
if (PwrState == _TRUE) {
rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON);
#if 0
/* 1.2V Power: From VDDON with Power Cut(0x0000h[15]), defualt valid */
tmpV16 = rtw_read16(pAdapter, REG_SYS_ISO_CTRL);
if (!(tmpV16 & PWC_EV12V)) {
tmpV16 |= PWC_EV12V ;
rtw_write16(pAdapter, REG_SYS_ISO_CTRL, tmpV16);
}
#endif
/* Reset: 0x0000h[28], default valid */
tmpV16 = rtw_read16(pAdapter, REG_SYS_FUNC_EN);
if (!(tmpV16 & FEN_ELDR)) {
@ -2874,15 +2828,6 @@ Hal_ReadPAType_8188E(
pHalData->ExternalPA_2G = (GetRegAmplifierType2G(Adapter) & ODM_BOARD_EXT_PA) ? 1 : 0;
pHalData->ExternalLNA_2G = (GetRegAmplifierType2G(Adapter) & ODM_BOARD_EXT_LNA) ? 1 : 0;
}
#if 0
if (GetRegAmplifierType5G(Adapter) == 0) { /* AUTO */
pHalData->external_pa_5g = ((pHalData->PAType_5G & BIT1) && (pHalData->PAType_5G & BIT0)) ? 1 : 0;
pHalData->external_lna_5g = ((pHalData->LNAType_5G & BIT7) && (pHalData->LNAType_5G & BIT3)) ? 1 : 0; /* 5G only now. */
} else {
pHalData->external_pa_5g = (GetRegAmplifierType5G(Adapter) & ODM_BOARD_EXT_PA_5G) ? 1 : 0;
pHalData->external_lna_5g = (GetRegAmplifierType5G(Adapter) & ODM_BOARD_EXT_LNA_5G) ? 1 : 0;
}
#endif
} else {
pHalData->ExternalPA_2G = EEPROM_Default_PAType;
pHalData->external_pa_5g = EEPROM_Default_PAType;
@ -2897,16 +2842,6 @@ Hal_ReadPAType_8188E(
pHalData->ExternalPA_2G = (GetRegAmplifierType2G(Adapter) & ODM_BOARD_EXT_PA) ? 1 : 0;
pHalData->ExternalLNA_2G = (GetRegAmplifierType2G(Adapter) & ODM_BOARD_EXT_LNA) ? 1 : 0;
}
#if 0
if (GetRegAmplifierType5G(Adapter) == 0) {
/* AUTO */
pHalData->external_pa_5g = 0;
pHalData->external_lna_5g = 0;
} else {
pHalData->external_pa_5g = (GetRegAmplifierType5G(Adapter) & ODM_BOARD_EXT_PA_5G) ? 1 : 0;
pHalData->external_lna_5g = (GetRegAmplifierType5G(Adapter) & ODM_BOARD_EXT_LNA_5G) ? 1 : 0;
}
#endif
}
RTW_INFO("pHalData->ExternalPA_2G = %d , pHalData->ExternalLNA_2G = %d\n", pHalData->ExternalPA_2G, pHalData->ExternalLNA_2G);
}
@ -3273,14 +3208,6 @@ static void hw_var_set_monitor(PADAPTER Adapter, u8 variable, u8 *val)
/* Append FCS */
rcr_bits |= RCR_APPFCS;
#if 0
/*
CRC and ICV packet will drop in recvbuf2recvframe()
We no turn on it.
*/
rcr_bits |= (RCR_ACRC32 | RCR_AICV);
#endif
/* Receive all data frames */
value_rxfltmap2 = 0xFFFF;
@ -3288,15 +3215,9 @@ static void hw_var_set_monitor(PADAPTER Adapter, u8 variable, u8 *val)
rtw_write32(Adapter, REG_RCR, value_rcr);
rtw_write16(Adapter, REG_RXFLTMAP2, value_rxfltmap2);
#if 0
/* tx pause */
rtw_write8(padapter, REG_TXPAUSE, 0xFF);
#endif
} else {
/* do nothing */
}
}
static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8 *val)

View file

@ -210,25 +210,6 @@ SIC_SetBBReg(
u32 OriginalValue, BitShift;
u16 BBWaitCounter = 0;
/* RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg() start\n")); */
#if 0
while (PlatformAtomicExchange(&pHalData->bChangeBBInProgress, _TRUE) == _TRUE) {
BBWaitCounter++;
delay_ms(10); /* 1 ms */
if ((BBWaitCounter > 100) || RT_CANNOT_IO(Adapter)) {
/* Wait too long, return FALSE to avoid to be stuck here. */
RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg(), Fail to set BB offset(%#x)!!, WaitCnt(%d)\n", RegAddr, BBWaitCounter));
return;
}
}
#endif
/* */
/* Critical section start */
/* */
/* RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg(), mask=0x%x, addr[0x%x]=0x%x\n", BitMask, RegAddr, Data)); */
if (BitMask != bMaskDWord) { /* if not "double word" write */
OriginalValue = sic_Read4Byte(Adapter, RegAddr);
/* BitShift = sic_CalculateBitShift(BitMask); */
@ -237,9 +218,6 @@ SIC_SetBBReg(
}
sic_Write4Byte(Adapter, RegAddr, Data);
/* PlatformAtomicExchange(&pHalData->bChangeBBInProgress, _FALSE); */
/* RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg() end\n")); */
}
static u32
@ -253,29 +231,10 @@ SIC_QueryBBReg(
u32 ReturnValue = 0, OriginalValue, BitShift;
u16 BBWaitCounter = 0;
/* RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg() start\n")); */
#if 0
while (PlatformAtomicExchange(&pHalData->bChangeBBInProgress, _TRUE) == _TRUE) {
BBWaitCounter++;
delay_ms(10); /* 10 ms */
if ((BBWaitCounter > 100) || RT_CANNOT_IO(Adapter)) {
/* Wait too long, return FALSE to avoid to be stuck here. */
RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_QueryBBReg(), Fail to query BB offset(%#x)!!, WaitCnt(%d)\n", RegAddr, BBWaitCounter));
return ReturnValue;
}
}
#endif
OriginalValue = sic_Read4Byte(Adapter, RegAddr);
/* BitShift = sic_CalculateBitShift(BitMask); */
BitShift = PHY_CalculateBitShift(BitMask);
ReturnValue = (OriginalValue & BitMask) >> BitShift;
/* RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg(), 0x%x=0x%x\n", RegAddr, OriginalValue)); */
/* RTPRINT(FPHY, PHY_SICR, ("[SIC], SIC_QueryBBReg() end\n")); */
/* PlatformAtomicExchange(&pHalData->bChangeBBInProgress, _FALSE); */
return ReturnValue;
}
@ -450,20 +409,10 @@ phy_RFSerialRead(
u8 RfPiEnable = 0;
_enter_critical_mutex(&(adapter_to_dvobj(Adapter)->rf_read_reg_mutex) , NULL);
#if 0
if (pHalData->RFChipID == RF_8225 && Offset > 0x24) /* 36 valid regs */
return retValue;
if (pHalData->RFChipID == RF_8256 && Offset > 0x2D) /* 45 valid regs */
return retValue;
#endif
/* */
/* Make sure RF register offset is correct */
/* */
Offset &= 0xff;
/* */
/* Switch page for 8256 RF IC */
/* */
NewOffset = Offset;
/* 2009/06/17 MH We can not execute IO for power save or other accident mode. */
@ -571,48 +520,18 @@ phy_RFSerialWrite(
BB_REGISTER_DEFINITION_T *pPhyReg = &pHalData->PHYRegDef[eRFPath];
u32 NewOffset;
#if 0
/* <Roger_TODO> We should check valid regs for RF_6052 case. */
if (pHalData->RFChipID == RF_8225 && Offset > 0x24) /* 36 valid regs */
return;
if (pHalData->RFChipID == RF_8256 && Offset > 0x2D) /* 45 valid regs */
return;
#endif
/* 2009/06/17 MH We can not execute IO for power save or other accident mode. */
/* if(RT_CANNOT_IO(Adapter)) */
/* { */
/* RTPRINT(FPHY, PHY_RFW, ("phy_RFSerialWrite stop\n")); */
/* return; */
/* } */
Offset &= 0xff;
/* */
/* Shadow Update */
/* */
/* PHY_RFShadowWrite(Adapter, eRFPath, Offset, Data); */
/* */
/* Switch page for 8256 RF IC */
/* */
NewOffset = Offset;
/* */
/* Put write addr in [5:0] and write data in [31:16] */
/* */
/* DataAndAddr = (Data<<16) | (NewOffset&0x3f); */
DataAndAddr = ((NewOffset << 20) | (Data & 0x000fffff)) & 0x0fffffff; /* T65 RF */
/* */
/* Write Operation */
/* */
phy_set_bb_reg(Adapter, pPhyReg->rf3wireOffset, bMaskDWord, DataAndAddr);
/* RTPRINT(FPHY, PHY_RFW, ("RFW-%d Addr[0x%lx]=0x%lx\n", eRFPath, pPhyReg->rf3wireOffset, DataAndAddr)); */
}
/**
* Function: PHY_QueryRFReg
*
@ -806,9 +725,6 @@ phy_InitBBRFRegisterDefinition(
/* Tranceiver LSSI Readback PI mode */
pHalData->PHYRegDef[RF_PATH_A].rfLSSIReadBackPi = TransceiverA_HSPI_Readback;
pHalData->PHYRegDef[RF_PATH_B].rfLSSIReadBackPi = TransceiverB_HSPI_Readback;
/* pHalData->PHYRegDef[RF_PATH_C].rfLSSIReadBackPi = rFPGA0_XC_LSSIReadBack; */
/* pHalData->PHYRegDef[RF_PATH_D].rfLSSIReadBackPi = rFPGA0_XD_LSSIReadBack; */
}
static void
@ -816,16 +732,6 @@ phy_BB8192C_Config_1T(
IN PADAPTER Adapter
)
{
#if 0
/* for path - A */
phy_set_bb_reg(Adapter, rFPGA0_TxInfo, 0x3, 0x1);
phy_set_bb_reg(Adapter, rFPGA1_TxInfo, 0x0303, 0x0101);
phy_set_bb_reg(Adapter, 0xe74, 0x0c000000, 0x1);
phy_set_bb_reg(Adapter, 0xe78, 0x0c000000, 0x1);
phy_set_bb_reg(Adapter, 0xe7c, 0x0c000000, 0x1);
phy_set_bb_reg(Adapter, 0xe80, 0x0c000000, 0x1);
phy_set_bb_reg(Adapter, 0xe88, 0x0c000000, 0x1);
#endif
/* for path - B */
phy_set_bb_reg(Adapter, rFPGA0_TxInfo, 0x3, 0x2);
phy_set_bb_reg(Adapter, rFPGA1_TxInfo, 0x300033, 0x200022);
@ -1046,16 +952,6 @@ PHY_GetTxPowerLevel8188E(
OUT s32 *powerlevel
)
{
#if 0
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo);
s4Byte TxPwrDbm = 13;
if (pMgntInfo->ClientConfigPwrInDbm != UNSPECIFIED_PWR_DBM)
*powerlevel = pMgntInfo->ClientConfigPwrInDbm;
else
*powerlevel = TxPwrDbm;
#endif
}
/*-----------------------------------------------------------------------------
@ -1393,27 +1289,6 @@ PHY_ScanOperationBackup8188E(
IN u8 Operation
)
{
#if 0
IO_TYPE IoType;
if (!rtw_is_drv_stopped(padapter)) {
switch (Operation) {
case SCAN_OPT_BACKUP:
IoType = IO_CMD_PAUSE_DM_BY_SCAN;
rtw_hal_set_hwreg(Adapter, HW_VAR_IO_CMD, (pu1Byte)&IoType);
break;
case SCAN_OPT_RESTORE:
IoType = IO_CMD_RESUME_DM_BY_SCAN;
rtw_hal_set_hwreg(Adapter, HW_VAR_IO_CMD, (pu1Byte)&IoType);
break;
default:
break;
}
}
#endif
}
static void
@ -1424,7 +1299,6 @@ phy_SpurCalibration_8188E(
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
struct PHY_DM_STRUCT *p_dm_odm = &(pHalData->odmpriv);
/* DbgPrint("===> phy_SpurCalibration_8188E current_channel_bw = %d, current_channel = %d\n", pHalData->current_channel_bw, pHalData->current_channel);*/
if (pHalData->current_channel_bw == CHANNEL_WIDTH_20 && (pHalData->current_channel == 13 || pHalData->current_channel == 14)) {
phy_set_bb_reg(Adapter, rOFDM0_RxDSP, BIT(9), 0x1);/* enable notch filter */
phy_set_bb_reg(Adapter, rOFDM1_IntfDet, BIT(8) | BIT(7) | BIT(6), 0x2); /* intf_TH */
@ -1591,23 +1465,6 @@ _PHY_SetBWMode88E(
}
#if 0
/* -----------------------------------------------------------------------------
* * Function: SetBWMode8190Pci()
* *
* * Overview: This function is export to "HalCommon" moudule
* *
* * Input: PADAPTER Adapter
* * CHANNEL_WIDTH Bandwidth 20M or 40M
* *
* * Output: NONE
* *
* * Return: NONE
* *
* * Note: We do not take j mode into consideration now
* *--------------------------------------------------------------------------- */
#endif
void
PHY_SetBWMode8188E(
IN PADAPTER Adapter,
@ -1642,16 +1499,7 @@ PHY_SetBWMode8188E(
pHalData->current_channel_bw = Bandwidth;
#if 0
if (Offset == EXTCHNL_OFFSET_LOWER)
pHalData->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_UPPER;
else if (Offset == EXTCHNL_OFFSET_UPPER)
pHalData->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_LOWER;
else
pHalData->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
#else
pHalData->nCur40MhzPrimeSC = Offset;
#endif
if (!RTW_CANNOT_RUN(Adapter)) {
_PHY_SetBWMode88E(Adapter);

View file

@ -79,50 +79,8 @@ void rtl8188e_RF_ChangeTxPath(IN PADAPTER Adapter,
IN u16 DataRate)
{
/* We do not support gain table change inACUT now !!!! Delete later !!! */
#if 0/* (RTL92SE_FPGA_VERIFY == 0) */
static u1Byte RF_Path_Type = 2; /* 1 = 1T 2= 2T */
static u4Byte tx_gain_tbl1[6]
= {0x17f50, 0x11f40, 0x0cf30, 0x08720, 0x04310, 0x00100};
static u4Byte tx_gain_tbl2[6]
= {0x15ea0, 0x10e90, 0x0c680, 0x08250, 0x04040, 0x00030};
u1Byte i;
if (RF_Path_Type == 2 && (DataRate & 0xF) <= 0x7) {
/* Set TX SYNC power G2G3 loop filter */
phy_set_rf_reg(Adapter, RF_PATH_A,
RF_TXPA_G2, bRFRegOffsetMask, 0x0f000);
phy_set_rf_reg(Adapter, RF_PATH_A,
RF_TXPA_G3, bRFRegOffsetMask, 0xeacf1);
/* Change TX AGC gain table */
for (i = 0; i < 6; i++)
phy_set_rf_reg(Adapter, RF_PATH_A,
RF_TX_AGC, bRFRegOffsetMask, tx_gain_tbl1[i]);
/* Set PA to high value */
phy_set_rf_reg(Adapter, RF_PATH_A,
RF_TXPA_G2, bRFRegOffsetMask, 0x01e39);
} else if (RF_Path_Type == 1 && (DataRate & 0xF) >= 0x8) {
/* Set TX SYNC power G2G3 loop filter */
phy_set_rf_reg(Adapter, RF_PATH_A,
RF_TXPA_G2, bRFRegOffsetMask, 0x04440);
phy_set_rf_reg(Adapter, RF_PATH_A,
RF_TXPA_G3, bRFRegOffsetMask, 0xea4f1);
/* Change TX AGC gain table */
for (i = 0; i < 6; i++)
phy_set_rf_reg(Adapter, RF_PATH_A,
RF_TX_AGC, bRFRegOffsetMask, tx_gain_tbl2[i]);
/* Set PA low gain */
phy_set_rf_reg(Adapter, RF_PATH_A,
RF_TXPA_G2, bRFRegOffsetMask, 0x01e19);
}
#endif
} /* RF_ChangeTxPath */
/*-----------------------------------------------------------------------------
* Function: PHY_RF6052SetBandwidth()
*
@ -297,29 +255,7 @@ PHY_RF6052_Config8188E(
/* Config BB and RF */
/* */
rtStatus = phy_RF6052_Config_ParaFile(Adapter);
#if 0
switch (Adapter->MgntInfo.bRegHwParaFile) {
case 0:
phy_RF6052_Config_HardCode(Adapter);
break;
case 1:
rtStatus = phy_RF6052_Config_ParaFile(Adapter);
break;
case 2:
/* Partial Modify. */
phy_RF6052_Config_HardCode(Adapter);
phy_RF6052_Config_ParaFile(Adapter);
break;
default:
phy_RF6052_Config_HardCode(Adapter);
break;
}
#endif
return rtStatus;
}
/* End of HalRf6052.c */

View file

@ -91,22 +91,6 @@ void rtl8188e_sreset_linked_status_check(_adapter *padapter)
else if (fw_status == 2)
RTW_INFO("%s REG_FW_STATUS (0x%02x), Condition_No_Match !!\n", __func__, fw_status);
}
#if 0
u32 regc50, regc58, reg824, reg800;
regc50 = rtw_read32(padapter, 0xc50);
regc58 = rtw_read32(padapter, 0xc58);
reg824 = rtw_read32(padapter, 0x824);
reg800 = rtw_read32(padapter, 0x800);
if (((regc50 & 0xFFFFFF00) != 0x69543400) ||
((regc58 & 0xFFFFFF00) != 0x69543400) ||
(((reg824 & 0xFFFFFF00) != 0x00390000) && (((reg824 & 0xFFFFFF00) != 0x80390000))) ||
(((reg800 & 0xFFFFFF00) != 0x03040000) && ((reg800 & 0xFFFFFF00) != 0x83040000))) {
RTW_INFO("%s regc50:0x%08x, regc58:0x%08x, reg824:0x%08x, reg800:0x%08x,\n", __func__,
regc50, regc58, reg824, reg800);
rtw_hal_sreset_reset(padapter);
}
#endif
if (psrtpriv->dbg_trigger_point == SRESET_TGP_LINK_STATUS) {
psrtpriv->dbg_trigger_point = SRESET_TGP_NULL;
rtw_hal_sreset_reset(padapter);

View file

@ -38,21 +38,6 @@ void interrupt_handler_8188eu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
_rtw_memcpy(&(pHalData->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4);
_rtw_memcpy(&(pHalData->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4);
#if 0 /* DBG */
{
u32 hisr = 0 , hisr_ex = 0;
_rtw_memcpy(&hisr, &(pHalData->IntArray[0]), 4);
hisr = le32_to_cpu(hisr);
_rtw_memcpy(&hisr_ex, &(pHalData->IntArray[1]), 4);
hisr_ex = le32_to_cpu(hisr_ex);
if ((hisr != 0) || (hisr_ex != 0))
RTW_INFO("===> %s hisr:0x%08x ,hisr_ex:0x%08x\n", __func__, hisr, hisr_ex);
}
#endif
#ifdef CONFIG_LPS_LCLK
if (pHalData->IntArray[0] & IMR_CPWM_88E) {
_rtw_memcpy(&pwr_rpt.state, &(pbuf[USB_INTR_CONTENT_CPWM1_OFFSET]), 1);
@ -73,15 +58,6 @@ void interrupt_handler_8188eu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
if (pHalData->IntArray[0] & (IMR_TBDER_88E | IMR_TBDOK_88E))
#endif
{
#if 0
if (pHalData->IntArray[0] & IMR_BCNDMAINT0_88E)
RTW_INFO("%s: HISR_BCNERLY_INT\n", __func__);
if (pHalData->IntArray[0] & IMR_TBDOK_88E)
RTW_INFO("%s: HISR_TXBCNOK\n", __func__);
if (pHalData->IntArray[0] & IMR_TBDER_88E)
RTW_INFO("%s: HISR_TXBCNERR\n", __func__);
#endif
rtw_mi_set_tx_beacon_cmd(padapter);
}
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
@ -137,13 +113,7 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr)
prxstat = (struct recv_stat *)pbuf;
pkt_cnt = (le32_to_cpu(prxstat->rxdw2) >> 16) & 0xff;
#if 0 /* temp remove when disable usb rx aggregation */
if ((pkt_cnt > 10) || (pkt_cnt < 1) || (transfer_len < RXDESC_SIZE) || (pkt_len <= 0))
return _FAIL;
#endif
do {
prxstat = (struct recv_stat *)pbuf;
precvframe = rtw_alloc_recvframe(pfree_recv_queue);

View file

@ -1194,49 +1194,6 @@ struct ieee80211_txb {
#define IEEE80211_PS_UNICAST IEEE80211_DTIM_UCAST
#define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST
#define IW_ESSID_MAX_SIZE 32
#if 0
struct ieee80211_network {
/* These entries are used to identify a unique network */
u8 bssid[ETH_ALEN];
u8 channel;
/* Ensure null-terminated for any debug msgs */
u8 ssid[IW_ESSID_MAX_SIZE + 1];
u8 ssid_len;
u8 rssi; /* relative signal strength */
u8 sq; /* signal quality */
/* These are network statistics */
/* struct ieee80211_rx_stats stats; */
u16 capability;
u16 aid;
u8 rates[MAX_RATES_LENGTH];
u8 rates_len;
u8 rates_ex[MAX_RATES_EX_LENGTH];
u8 rates_ex_len;
u8 edca_parmsets[18];
u8 mode;
u8 flags;
u8 time_stamp[8];
u16 beacon_interval;
u16 listen_interval;
u16 atim_window;
u8 wpa_ie[MAX_WPA_IE_LEN];
size_t wpa_ie_len;
u8 rsn_ie[MAX_WPA_IE_LEN];
size_t rsn_ie_len;
u8 country[6];
u8 dtim_period;
u8 dtim_data;
u8 power_constraint;
u8 qosinfo;
u8 qbssload[5];
u8 network_type;
int join_res;
unsigned long last_scanned;
};
#endif
/*
join_res:
-1: authentication fail
@ -1332,19 +1289,6 @@ typedef struct tx_pending_t {
int ieee80211_is_empty_essid(const char *essid, int essid_len);
int ieee80211_get_hdrlen(u16 fc);
#if 0
/* Action frame categories (IEEE 802.11-2007, 7.3.1.11, Table 7-24) */
#define WLAN_ACTION_SPECTRUM_MGMT 0
#define WLAN_ACTION_QOS 1
#define WLAN_ACTION_DLS 2
#define WLAN_ACTION_BLOCK_ACK 3
#define WLAN_ACTION_RADIO_MEASUREMENT 5
#define WLAN_ACTION_FT 6
#define WLAN_ACTION_SA_QUERY 8
#define WLAN_ACTION_WMM 17
#endif
/* Action category code */
enum rtw_ieee80211_category {
RTW_WLAN_CATEGORY_SPECTRUM_MGMT = 0,

View file

@ -23,16 +23,10 @@
/***************************** INCLUDES *****************************/
#if 0
#include <linux/types.h> /* for __u* and __s* typedefs */
#include <linux/socket.h> /* for "struct sockaddr" et al */
#include <linux/if.h> /* for IFNAMSIZ and co... */
#else
#define __user
/* typedef uint16_t __u16; */
#include <sys/socket.h> /* for "struct sockaddr" et al */
#include <net/if.h> /* for IFNAMSIZ and co... */
#endif
#define __user
/* typedef uint16_t __u16; */
#include <sys/socket.h> /* for "struct sockaddr" et al */
#include <net/if.h> /* for IFNAMSIZ and co... */
/****************************** TYPES ******************************/
#ifdef CONFIG_COMPAT

View file

@ -20,23 +20,6 @@
#ifndef __RTL8188E_CMD_H__
#define __RTL8188E_CMD_H__
#if 0
enum cmd_msg_element_id {
NONE_CMDMSG_EID,
AP_OFFLOAD_EID = 0,
SET_PWRMODE_EID = 1,
JOINBSS_RPT_EID = 2,
RSVD_PAGE_EID = 3,
RSSI_4_EID = 4,
RSSI_SETTING_EID = 5,
MACID_CONFIG_EID = 6,
MACID_PS_MODE_EID = 7,
P2P_PS_OFFLOAD_EID = 8,
SELECTIVE_SUSPEND_ROF_CMD = 9,
P2P_PS_CTW_CMD_EID = 32,
MAX_CMDMSG_EID
};
#else
typedef enum _RTL8188E_H2C_CMD_ID {
/* Class Common */
H2C_COM_RSVD_PAGE = 0x00,
@ -82,9 +65,6 @@ typedef enum _RTL8188E_H2C_CMD_ID {
/* H2C_RESET_TSF =0xc0, */
} RTL8188E_H2C_CMD_ID;
#endif
struct cmd_msg_parm {
u8 eid; /* element id */
u8 sz; /* sz */
@ -117,26 +97,6 @@ typedef struct JOINBSSRPT_PARM_88E {
#endif /* CONFIG_WOWLAN */
} JOINBSSRPT_PARM_88E, *PJOINBSSRPT_PARM_88E;
#if 0
/* move to hal_com_h2c.h */
typedef struct _RSVDPAGE_LOC_88E {
u8 LocProbeRsp;
u8 LocPsPoll;
u8 LocNullData;
u8 LocQosNull;
u8 LocBTQosNull;
#ifdef CONFIG_WOWLAN
u8 LocRemoteCtrlInfo;
u8 LocArpRsp;
u8 LocNbrAdv;
u8 LocGTKRsp;
u8 LocGTKInfo;
u8 LocProbeReq;
u8 LocNetList;
#endif /* CONFIG_WOWLAN */
} RSVDPAGE_LOC_88E, *PRSVDPAGE_LOC_88E;
#endif
/* host message to firmware cmd */
void rtl8188e_set_FwPwrMode_cmd(PADAPTER padapter, u8 Mode);
void rtl8188e_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus);
@ -165,15 +125,4 @@ void CheckFwRsvdPageContent(PADAPTER padapter);
* ---------------------------------- H2C CMD CONTENT --------------------------------------------------
* ---------------------------------------------------------------------------------------------------------
* */
#if 0
/* move to hal_com_h2c.h
* _RSVDPAGE_LOC_CMD_0x00 */
#define SET_8188E_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
#define SET_8188E_H2CCMD_RSVDPAGE_LOC_PSPOLL(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
#define SET_8188E_H2CCMD_RSVDPAGE_LOC_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 8, __Value)
#define SET_8188E_H2CCMD_RSVDPAGE_LOC_QOS_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 8, __Value)
/* AOAC_RSVDPAGE_LOC_0x83 */
#define SET_8188E_H2CCMD_AOAC_RSVDPAGE_LOC_REMOTE_WAKE_CTRL_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 0, 8, __Value)
#define SET_8188E_H2CCMD_AOAC_RSVDPAGE_LOC_ARP_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
#endif
#endif/* __RTL8188E_CMD_H__ */

View file

@ -321,21 +321,6 @@ struct createbss_parm {
s8 req_offset;
};
#if 0
/* Caller Mode: AP, Ad-HoC, Infra */
/* Notes: To set the NIC mode of RTL8711 */
/* Command Mode */
/* The definition of mode: */
#define IW_MODE_AUTO 0 /* Let the driver decides which AP to join */
#define IW_MODE_ADHOC 1 /* Single cell network (Ad-Hoc Clients) */
#define IW_MODE_INFRA 2 /* Multi cell network, roaming, .. */
#define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */
#define IW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */
#define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */
#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */
#endif
struct setopmode_parm {
u8 mode;
u8 rsvd[3];

View file

@ -830,11 +830,6 @@ struct mlme_priv {
u8 scanning_via_buddy_intf;
#endif
#if 0
u8 NumOfBcnInfoChkFail;
u32 timeBcnInfoChkStart;
#endif
#ifdef CONFIG_APPEND_VENDOR_IE_ENABLE
u32 vendor_ie_mask[WLAN_MAX_VENDOR_IE_NUM];
u8 vendor_ie[WLAN_MAX_VENDOR_IE_NUM][WLAN_MAX_VENDOR_IE_LEN];

View file

@ -1020,10 +1020,6 @@ void addba_timer_hdl(struct sta_info *psta);
#ifdef CONFIG_IEEE80211W
void sa_query_timer_hdl(struct sta_info *psta);
#endif /* CONFIG_IEEE80211W */
#if 0
void reauth_timer_hdl(_adapter *padapter);
void reassoc_timer_hdl(_adapter *padapter);
#endif
#define set_survey_timer(mlmeext, ms) \
do { \

View file

@ -439,30 +439,9 @@ typedef struct _MP_FIRMWARE {
#define RAISE _FALSE
/* Hardware Registers */
#if 0
#if 0
#define IOCMD_CTRL_REG 0x102502C0
#define IOCMD_DATA_REG 0x102502C4
#else
#define IOCMD_CTRL_REG 0x10250370
#define IOCMD_DATA_REG 0x10250374
#endif
#define IOCMD_GET_THERMAL_METER 0xFD000028
#define IOCMD_CLASS_BB_RF 0xF0
#define IOCMD_BB_READ_IDX 0x00
#define IOCMD_BB_WRITE_IDX 0x01
#define IOCMD_RF_READ_IDX 0x02
#define IOCMD_RF_WRIT_IDX 0x03
#endif
#define BB_REG_BASE_ADDR 0x800
/* MP variables */
#if 0
#define _2MAC_MODE_ 0
#define _LOOPBOOK_MODE_ 1
#endif
typedef enum _MP_MODE_ {
MP_OFF,
MP_ON,
@ -662,10 +641,6 @@ typedef enum _MPT_TXPWR_DEF {
#define IS_MPT_CCK_RATE(_rate) (_rate >= MPT_RATE_1M && _rate <= MPT_RATE_11M)
#define IS_MPT_OFDM_RATE(_rate) (_rate >= MPT_RATE_6M && _rate <= MPT_RATE_54M)
/*************************************************************************/
#if 0
extern struct mp_xmit_frame *alloc_mp_xmitframe(struct mp_priv *pmp_priv);
extern int free_mp_xmitframe(struct xmit_priv *pxmitpriv, struct mp_xmit_frame *pmp_xmitframe);
#endif
extern s32 init_mp_priv(PADAPTER padapter);
extern void free_mp_priv(struct mp_priv *pmp_priv);

View file

@ -23,13 +23,6 @@
#include <mp_custom_oid.h>
#include <rtw_mp.h>
#if 0
#define TESTFWCMDNUMBER 1000000
#define TEST_H2CINT_WAIT_TIME 500
#define TEST_C2HINT_WAIT_TIME 500
#define HCI_TEST_SYSCFG_HWMASK 1
#define _BUSCLK_40M (4 << 2)
#endif
/* ------------------------------------------------------------------------------ */
typedef struct CFG_DBG_MSG_STRUCT {
u32 DebugLevel;

View file

@ -1065,15 +1065,6 @@
#define bWMACControl 0x1
#define bWNICControl 0x2
#if 0
#define ANTENNA_A 0x1 /* Useless */
#define ANTENNA_B 0x2
#define ANTENNA_AB 0x3 /* ANTENNA_A | ANTENNA_B */
#define ANTENNA_C 0x4
#define ANTENNA_D 0x8
#endif
#define RCR_AAP BIT(0) /* accept all physical address */
#define RCR_APM BIT(1) /* accept physical match */
#define RCR_AM BIT(2) /* accept multicast */

View file

@ -97,15 +97,7 @@ static inline void _rtw_p2p_set_pre_state(struct wifidirect_info *wdinfo, enum P
if (wdinfo->pre_p2p_state != state)
wdinfo->pre_p2p_state = state;
}
#if 0
static inline void _rtw_p2p_restore_state(struct wifidirect_info *wdinfo)
{
if (wdinfo->pre_p2p_state != -1) {
wdinfo->p2p_state = wdinfo->pre_p2p_state;
wdinfo->pre_p2p_state = -1;
}
}
#endif
static inline void _rtw_p2p_set_role(struct wifidirect_info *wdinfo, enum P2P_ROLE role)
{
if (wdinfo->role != role)

View file

@ -50,12 +50,4 @@ typedef enum _RT_USB_WVALUE {
RT_USB_BOOT_TYPE = 5
} RT_USB_WVALUE;
#if 0
BOOLEAN usbvendorrequest(PCE_USB_DEVICE CEdevice, RT_USB_BREQUEST bRequest, RT_USB_WVALUE wValue, UCHAR wIndex, PVOID Data, UCHAR DataLength, BOOLEAN isDirectionIn);
BOOLEAN CEusbGetStatusRequest(PCE_USB_DEVICE CEdevice, IN USHORT Op, IN USHORT Index, PVOID Data);
BOOLEAN CEusbFeatureRequest(PCE_USB_DEVICE CEdevice, IN USHORT Op, IN USHORT FeatureSelector, IN USHORT Index);
BOOLEAN CEusbGetDescriptorRequest(PCE_USB_DEVICE CEdevice, IN short urbLength, IN UCHAR DescriptorType, IN UCHAR Index, IN USHORT LanguageId, IN PVOID TransferBuffer, IN ULONG TransferBufferLength);
#endif
#endif

View file

@ -148,35 +148,9 @@ enum WIFI_REASON_CODE {
};
/* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */
#if 0
#define WLAN_REASON_UNSPECIFIED 1
#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
#define WLAN_REASON_DEAUTH_LEAVING 3
#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
#define WLAN_REASON_DISASSOC_AP_BUSY 5
#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
#endif
/* IEEE 802.11h */
#define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10
#define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11
#if 0
/* IEEE 802.11i */
#define WLAN_REASON_INVALID_IE 13
#define WLAN_REASON_MICHAEL_MIC_FAILURE 14
#define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15
#define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16
#define WLAN_REASON_IE_IN_4WAY_DIFFERS 17
#define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18
#define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19
#define WLAN_REASON_AKMP_NOT_VALID 20
#define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21
#define WLAN_REASON_INVALID_RSN_IE_CAPAB 22
#define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23
#define WLAN_REASON_CIPHER_SUITE_REJECTED 24
#endif
enum WIFI_STATUS_CODE {
_STATS_SUCCESSFUL_ = 0,
@ -199,19 +173,6 @@ enum WIFI_STATUS_CODE {
};
/* Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23) */
#if 0
#define WLAN_STATUS_SUCCESS 0
#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
#define WLAN_STATUS_CAPS_UNSUPPORTED 10
#define WLAN_STATUS_REASSOC_NO_ASSOC 11
#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
#define WLAN_STATUS_CHALLENGE_FAIL 15
#define WLAN_STATUS_AUTH_TIMEOUT 16
#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
#define WLAN_STATUS_ASSOC_DENIED_RATES 18
#endif
/* entended */
/* IEEE 802.11b */
#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
@ -732,16 +693,6 @@ typedef enum _ELEMENT_ID {
#define _IEEE8021X_MGT_ 1 /* WPA */
#define _IEEE8021X_PSK_ 2 /* WPA with pre-shared key */
#if 0
#define _NO_PRIVACY_ 0
#define _WEP_40_PRIVACY_ 1
#define _TKIP_PRIVACY_ 2
#define _WRAP_PRIVACY_ 3
#define _CCMP_PRIVACY_ 4
#define _WEP_104_PRIVACY_ 5
#define _WEP_WPA_MIXED_PRIVACY_ 6 /* WEP + WPA */
#endif
#ifdef CONFIG_IEEE80211W
#define _MME_IE_LENGTH_ 18
#endif /* CONFIG_IEEE80211W */

View file

@ -528,17 +528,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
#endif /* COMPAT_KERNEL_RELEASE */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38) */
#if 0
{
if (bss->information_elements == bss->proberesp_ies) {
if (bss->len_information_elements != bss->len_proberesp_ies)
RTW_INFO("error!, len_information_elements != bss->len_proberesp_ies\n");
} else if (bss->len_information_elements < bss->len_beacon_ies) {
bss->information_elements = bss->beacon_ies;
bss->len_information_elements = bss->len_beacon_ies;
}
}
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(wiphy, bss);
#else
@ -841,11 +830,6 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter, u16 reason, u8 locally
cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC);
#endif
}
#if 0
else
RTW_INFO("pwdev->sme_state=%d\n", pwdev->sme_state);
#endif
RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
#else
@ -1530,25 +1514,6 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev,
void *cookie,
void (*callback)(void *cookie, struct key_params *))
{
#if 0
struct iwm_priv *iwm = ndev_to_iwm(ndev);
struct iwm_key *key = &iwm->keys[key_index];
struct key_params params;
IWM_DBG_WEXT(iwm, DBG, "Getting key %d\n", key_index);
memset(&params, 0, sizeof(params));
params.cipher = key->cipher;
params.key_len = key->key_len;
params.seq_len = key->seq_len;
params.seq = key->seq;
params.key = key->key;
callback(cookie, &params);
return key->key_len ? 0 : -ENOENT;
#endif
RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
return 0;
}
@ -1732,23 +1697,6 @@ exit:
extern int netdev_open(struct net_device *pnetdev);
#if 0
enum nl80211_iftype {
NL80211_IFTYPE_UNSPECIFIED,
NL80211_IFTYPE_ADHOC, /* 1 */
NL80211_IFTYPE_STATION, /* 2 */
NL80211_IFTYPE_AP, /* 3 */
NL80211_IFTYPE_AP_VLAN,
NL80211_IFTYPE_WDS,
NL80211_IFTYPE_MONITOR, /* 6 */
NL80211_IFTYPE_MESH_POINT,
NL80211_IFTYPE_P2P_CLIENT, /* 8 */
NL80211_IFTYPE_P2P_GO, /* 9 */
/* keep last */
NUM_NL80211_IFTYPES,
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
};
#endif
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
struct net_device *ndev,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
@ -1870,9 +1818,6 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
case NL80211_IFTYPE_MONITOR:
networkType = Ndis802_11Monitor;
#if 0
ndev->type = ARPHRD_IEEE80211; /* IEEE 802.11 : 801 */
#endif
ndev->type = ARPHRD_IEEE80211_RADIOTAP; /* IEEE 802.11 + radiotap header : 803 */
break;
default:
@ -2060,17 +2005,6 @@ static void _rtw_cfg80211_surveydone_event_callback(_adapter *padapter, struct c
rtw_cfg80211_clear_wps_sr_of_non_target_bss(padapter, pnetwork, &target_ssid);
rtw_cfg80211_inform_bss(padapter, pnetwork);
}
#if 0
/* check ralink testbed RSN IE length */
{
if (_rtw_memcmp(pnetwork->network.Ssid.Ssid, "Ralink_11n_AP", 13)) {
uint ie_len = 0;
u8 *p = NULL;
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
RTW_INFO("ie_len=%d\n", ie_len);
}
}
#endif
plist = get_next(plist);
}
@ -2527,35 +2461,6 @@ exit:
static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
{
#if 0
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
if (changed & WIPHY_PARAM_RTS_THRESHOLD &&
(iwm->conf.rts_threshold != wiphy->rts_threshold)) {
int ret;
iwm->conf.rts_threshold = wiphy->rts_threshold;
ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX,
CFG_RTS_THRESHOLD,
iwm->conf.rts_threshold);
if (ret < 0)
return ret;
}
if (changed & WIPHY_PARAM_FRAG_THRESHOLD &&
(iwm->conf.frag_threshold != wiphy->frag_threshold)) {
int ret;
iwm->conf.frag_threshold = wiphy->frag_threshold;
ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_FA_CFG_FIX,
CFG_FRAG_THRESHOLD,
iwm->conf.frag_threshold);
if (ret < 0)
return ret;
}
#endif
RTW_INFO("%s\n", __func__);
return 0;
}
@ -2575,11 +2480,6 @@ static int rtw_cfg80211_set_wpa_version(struct security_priv *psecuritypriv, u32
if (wpa_version & (NL80211_WPA_VERSION_1 | NL80211_WPA_VERSION_2))
psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPAPSK;
#if 0
if (wpa_version & NL80211_WPA_VERSION_2)
psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPA2PSK;
#endif
#ifdef CONFIG_WAPI_SUPPORT
if (wpa_version & NL80211_WAPI_VERSION_1)
psecuritypriv->ndisauthtype = Ndis802_11AuthModeWAPI;
@ -3336,32 +3236,6 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
enum tx_power_setting type, int dbm)
#endif
{
#if 0
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
int ret;
switch (type) {
case NL80211_TX_POWER_AUTOMATIC:
return 0;
case NL80211_TX_POWER_FIXED:
if (mbm < 0 || (mbm % 100))
return -EOPNOTSUPP;
if (!test_bit(IWM_STATUS_READY, &iwm->status))
return 0;
ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX,
CFG_TX_PWR_LIMIT_USR,
MBM_TO_DBM(mbm) * 2);
if (ret < 0)
return ret;
return iwm_tx_power_trigger(iwm);
default:
IWM_ERR(iwm, "Unsupported power type: %d\n", type);
return -EOPNOTSUPP;
}
#endif
RTW_INFO("%s\n", __func__);
return 0;
}
@ -4998,14 +4872,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
/* dump_mgntframe(padapter, pmgntframe); */
if (dump_mgntframe_and_wait_ack(padapter, pmgntframe) != _SUCCESS)
RTW_INFO("%s, ack to\n", __func__);
#if 0
if(wps_devicepassword_id == WPS_DPID_REGISTRAR_SPEC) {
RTW_INFO("waiting for p2p peer key-in PIN CODE\n");
rtw_msleep_os(15000); /* 15 sec for key in PIN CODE, workaround for GS2 before issuing Nego Req. */
}
#endif
}
#ifdef CONFIG_RTW_80211R

View file

@ -1113,7 +1113,10 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
int i;
RTW_INFO("\n wpa_ie(length:%d):\n", ielen);
for (i = 0; i < ielen; i = i + 8)
RTW_INFO("0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n", buf[i], buf[i + 1], buf[i + 2], buf[i + 3], buf[i + 4], buf[i + 5], buf[i + 6], buf[i + 7]);
RTW_INFO("0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n",
buf[i], buf[i + 1], buf[i + 2],
buf[i + 3], buf[i + 4], buf[i + 5],
buf[i + 6], buf[i + 7]);
}
pos = buf;
@ -1122,19 +1125,6 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
goto exit;
}
#if 0
pos += RSN_HEADER_LEN;
left = ielen - RSN_HEADER_LEN;
if (left >= RSN_SELECTOR_LEN) {
pos += RSN_SELECTOR_LEN;
left -= RSN_SELECTOR_LEN;
} else if (left > 0) {
ret = -1;
goto exit;
}
#endif
if (rtw_parse_wpa_ie(buf, ielen, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS) {
padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeWPAPSK;
@ -1417,10 +1407,6 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
switch (wrqu->mode) {
case IW_MODE_MONITOR:
networkType = Ndis802_11Monitor;
#if 0
dev->type = ARPHRD_IEEE80211; /* IEEE 802.11 : 801 */
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
dev->type = ARPHRD_IEEE80211_RADIOTAP; /* IEEE 802.11 + radiotap header : 803 */
RTW_INFO("set_mode = IW_MODE_MONITOR\n");
@ -1522,18 +1508,6 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
u8 strIssueBssid[ETH_ALEN] = { 0x00 };
#if 0
struct iw_pmksa {
__u32 cmd;
struct sockaddr bssid;
__u8 pmkid[IW_PMKID_LEN]; /* IW_PMKID_LEN=16 */
}
There are the BSSID information in the bssid.sa_data array.
If cmd is IW_PMKSA_FLUSH, it means the wpa_suppplicant wants to clear all the PMKID information.
If cmd is IW_PMKSA_ADD, it means the wpa_supplicant wants to add a PMKID / BSSID to driver.
If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID / BSSID from driver.
#endif
_rtw_memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN);
if (pPMK->cmd == IW_PMKSA_ADD) {
RTW_INFO("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
@ -1840,19 +1814,6 @@ static int rtw_wx_set_wap(struct net_device *dev,
while (1) {
if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == _TRUE) {
#if 0
ret = -EINVAL;
goto cancel_ps_deny;
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) {
rtw_set_802_11_bssid(padapter, temp->sa_data);
goto cancel_ps_deny;
} else {
ret = -EINVAL;
goto cancel_ps_deny;
}
#endif
break;
}
@ -1923,15 +1884,6 @@ static int rtw_wx_set_mlme(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
#if 0
/* SIOCSIWMLME data */
struct iw_mlme {
__u16 cmd; /* IW_MLME_* */
__u16 reason_code;
struct sockaddr addr;
};
#endif
int ret = 0;
u16 reason;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
@ -2134,12 +2086,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
pos += 1;
len -= 1;
break;
#if 0
case WEXT_CSCAN_NPROBE_SECTION:
RTW_INFO("WEXT_CSCAN_NPROBE_SECTION\n");
break;
#endif
default:
/* RTW_INFO("Unknown CSCAN section %c\n", section); */
len = 0; /* stop parsing */
@ -2374,17 +2320,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
while (1) {
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == _TRUE) {
#if 0
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) {
rtw_set_802_11_ssid(padapter, &ndis_ssid);
goto cancel_ps_deny;
} else {
ret = -EINVAL;
goto cancel_ps_deny;
}
#endif
break;
}
@ -2663,29 +2598,6 @@ static int rtw_wx_get_retry(struct net_device *dev,
}
#if 0
#define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */
#define IW_ENCODE_FLAGS 0xFF00 /* Flags defined below */
#define IW_ENCODE_MODE 0xF000 /* Modes defined below */
#define IW_ENCODE_DISABLED 0x8000 /* Encoding disabled */
#define IW_ENCODE_ENABLED 0x0000 /* Encoding enabled */
#define IW_ENCODE_RESTRICTED 0x4000 /* Refuse non-encoded packets */
#define IW_ENCODE_OPEN 0x2000 /* Accept non-encoded packets */
#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not present */
#define IW_ENCODE_TEMP 0x0400 /* Temporary key */
/*
iwconfig wlan0 key on->flags = 0x6001->maybe it means auto
iwconfig wlan0 key off->flags = 0x8800
iwconfig wlan0 key open->flags = 0x2800
iwconfig wlan0 key open 1234567890->flags = 0x2000
iwconfig wlan0 key restricted->flags = 0x4800
iwconfig wlan0 key open [3] 1234567890->flags = 0x2003
iwconfig wlan0 key restricted [2] 1234567890->flags = 0x4002
iwconfig wlan0 key open [3] -> flags = 0x2803
iwconfig wlan0 key restricted [2] -> flags = 0x4802
*/
#endif
static int rtw_wx_set_enc(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *keybuf)
@ -3197,52 +3109,7 @@ static int rtw_wx_get_nick(struct net_device *dev,
/* rtw_signal_process(pid, SIGUSR1); */ /* for test */
/* dump debug info here */
#if 0
u32 dot11AuthAlgrthm; /* 802.11 auth, could be open, shared, and 8021x */
u32 dot11PrivacyAlgrthm; /* This specify the privacy for shared auth. algorithm. */
u32 dot118021XGrpPrivacy; /* This specify the privacy algthm. used for Grp key */
u32 ndisauthtype;
u32 ndisencryptstatus;
#endif
/* RTW_INFO("auth_alg=0x%x, enc_alg=0x%x, auth_type=0x%x, enc_type=0x%x\n", */
/* psecuritypriv->dot11AuthAlgrthm, psecuritypriv->dot11PrivacyAlgrthm, */
/* psecuritypriv->ndisauthtype, psecuritypriv->ndisencryptstatus); */
/* RTW_INFO("enc_alg=0x%x\n", psecuritypriv->dot11PrivacyAlgrthm); */
/* RTW_INFO("auth_type=0x%x\n", psecuritypriv->ndisauthtype); */
/* RTW_INFO("enc_type=0x%x\n", psecuritypriv->ndisencryptstatus); */
#if 0
RTW_INFO("dbg(0x210)=0x%x\n", rtw_read32(padapter, 0x210));
RTW_INFO("dbg(0x608)=0x%x\n", rtw_read32(padapter, 0x608));
RTW_INFO("dbg(0x280)=0x%x\n", rtw_read32(padapter, 0x280));
RTW_INFO("dbg(0x284)=0x%x\n", rtw_read32(padapter, 0x284));
RTW_INFO("dbg(0x288)=0x%x\n", rtw_read32(padapter, 0x288));
RTW_INFO("dbg(0x664)=0x%x\n", rtw_read32(padapter, 0x664));
RTW_INFO("\n");
RTW_INFO("dbg(0x430)=0x%x\n", rtw_read32(padapter, 0x430));
RTW_INFO("dbg(0x438)=0x%x\n", rtw_read32(padapter, 0x438));
RTW_INFO("dbg(0x440)=0x%x\n", rtw_read32(padapter, 0x440));
RTW_INFO("dbg(0x458)=0x%x\n", rtw_read32(padapter, 0x458));
RTW_INFO("dbg(0x484)=0x%x\n", rtw_read32(padapter, 0x484));
RTW_INFO("dbg(0x488)=0x%x\n", rtw_read32(padapter, 0x488));
RTW_INFO("dbg(0x444)=0x%x\n", rtw_read32(padapter, 0x444));
RTW_INFO("dbg(0x448)=0x%x\n", rtw_read32(padapter, 0x448));
RTW_INFO("dbg(0x44c)=0x%x\n", rtw_read32(padapter, 0x44c));
RTW_INFO("dbg(0x450)=0x%x\n", rtw_read32(padapter, 0x450));
#endif
return 0;
}
static int rtw_wx_read32(struct net_device *dev,
@ -3464,15 +3331,6 @@ typedef int (*iw_handler)(struct net_device *dev, struct iw_request_info *info,
static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
#if 0
struct iw_point {
void __user *pointer; /* Pointer to the data (in user space) */
__u16 length; /* number of fields or size in bytes */
__u16 flags; /* Optional params */
};
#endif
#ifdef CONFIG_DRVEXT_MODULE
u8 res;
struct drvext_handler *phandler;
@ -6840,73 +6698,22 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value)
* can use this to determine if the CAP_PRIVACY_ON bit should
* be set.
*/
#if 0
struct ieee80211_security sec = {
.flags = SEC_ENABLED,
.enabled = value,
};
ieee->drop_unencrypted = value;
/* We only change SEC_LEVEL for open mode. Others
* are set by ipw_wpa_set_encryption.
*/
if (!value) {
sec.flags |= SEC_LEVEL;
sec.level = SEC_LEVEL_0;
} else {
sec.flags |= SEC_LEVEL;
sec.level = SEC_LEVEL_1;
}
if (ieee->set_security)
ieee->set_security(ieee->dev, &sec);
#endif
break;
}
case IEEE_PARAM_PRIVACY_INVOKED:
/* ieee->privacy_invoked=value; */
break;
case IEEE_PARAM_AUTH_ALGS:
ret = wpa_set_auth_algs(dev, value);
break;
case IEEE_PARAM_IEEE_802_1X:
/* ieee->ieee802_1x=value; */
break;
case IEEE_PARAM_WPAX_SELECT:
/* added for WPA2 mixed mode */
/*RTW_WARN("------------------------>wpax value = %x\n", value);*/
/*
spin_lock_irqsave(&ieee->wpax_suitlist_lock,flags);
ieee->wpax_type_set = 1;
ieee->wpax_type_notify = value;
spin_unlock_irqrestore(&ieee->wpax_suitlist_lock,flags);
*/
break;
default:
ret = -EOPNOTSUPP;
break;
}
return ret;
}
static int wpa_mlme(struct net_device *dev, u32 command, u32 reason)
@ -7370,18 +7177,6 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff)
return -EINVAL;
#if 0
psta = rtw_get_stainfo(pstapriv, param->sta_addr);
if (psta) {
RTW_INFO("rtw_add_sta(), free has been added psta=%p\n", psta);
/* _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL); */
rtw_free_stainfo(padapter, psta);
/* _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); */
psta = NULL;
}
#endif
/* psta = rtw_alloc_stainfo(pstapriv, param->sta_addr); */
psta = rtw_get_stainfo(pstapriv, param->sta_addr);
if (psta) {
int flags = param->u.add_sta.flags;
@ -7494,23 +7289,6 @@ static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *par
psta = rtw_get_stainfo(pstapriv, param_ex->sta_addr);
if (psta) {
#if 0
struct {
u16 aid;
u16 capability;
int flags;
u32 sta_set;
u8 tx_supp_rates[16];
u32 tx_supp_rates_len;
struct rtw_ieee80211_ht_cap ht_cap;
u64 rx_pkts;
u64 rx_bytes;
u64 rx_drops;
u64 tx_pkts;
u64 tx_bytes;
u64 tx_drops;
} get_sta;
#endif
psta_data->aid = (u16)psta->aid;
psta_data->capability = psta->capability;
psta_data->flags = psta->flags;
@ -8602,20 +8380,6 @@ static int rtw_mp_efuse_get(struct net_device *dev,
goto exit;
}
#if 0
RTW_INFO("OFFSET\tVALUE(hex)\n");
for (i = 0; i < mapLen; i += 16) {
RTW_INFO("0x%02x\t", i);
for (j = 0; j < 8; j++)
RTW_INFO("%02X ", efuse[i + j]);
RTW_INFO("\t");
for (; j < 16; j++)
RTW_INFO("%02X ", efuse[i + j]);
RTW_INFO("\n");
}
RTW_INFO("\n");
#endif
shift = blksz * order;
efuse += shift;
cnt = mapLen - shift;
@ -11325,12 +11089,6 @@ static s32 createpseudoadhoc(PADAPTER padapter)
init_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
_exit_critical_bh(&pmlmepriv->lock, &irqL);
#if 0
err = rtw_create_ibss_cmd(padapter, 0);
if (err == _FAIL)
return _FAIL;
#else
{
struct wlan_network *pcur_network;
struct sta_info *psta;
@ -11357,7 +11115,6 @@ static s32 createpseudoadhoc(PADAPTER padapter)
Set_MSR(padapter, WIFI_FW_ADHOC_STATE);
}
#endif
return _SUCCESS;
}
@ -11981,11 +11738,6 @@ static const struct iw_priv_args rtw_private_args[] = {
SIOCIWFIRSTPRIV + 0xD,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | IFNAMSIZ, "rfr"
},
#if 0
{
SIOCIWFIRSTPRIV + 0xE, 0, 0, "wowlan_ctrl"
},
#endif
{
SIOCIWFIRSTPRIV + 0x10,
IW_PRIV_TYPE_CHAR | 1024, 0, "p2p_set"

View file

@ -639,11 +639,6 @@ static const struct net_device_ops rtl871x_mgnt_netdev_ops = {
.ndo_open = mgnt_netdev_open,
.ndo_stop = mgnt_netdev_close,
.ndo_start_xmit = mgnt_xmit_entry,
#if 0
.ndo_set_mac_address = r871x_net_set_mac_address,
.ndo_get_stats = r871x_net_get_stats,
.ndo_do_ioctl = r871x_mp_ioctl,
#endif
};
#endif

View file

@ -2060,10 +2060,6 @@ void rtw_cancel_all_timer(_adapter *padapter)
_cancel_timer_ex(&padapter->mlmepriv.assoc_timer);
#if 0
_cancel_timer_ex(&padapter->securitypriv.tkip_timer);
#endif
_cancel_timer_ex(&padapter->mlmepriv.scan_to_timer);
#ifdef CONFIG_DFS_MASTER
@ -2240,10 +2236,6 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
if (padapter->bup == _FALSE && primary_padapter->bup == _TRUE &&
rtw_is_hw_init_completed(primary_padapter)) {
padapter->bFWReady = primary_padapter->bFWReady;
#if 0 /*#ifdef CONFIG_MI_WITH_MBSSID_CAM*/
rtw_hal_set_hwreg(padapter, HW_VAR_MAC_ADDR, adapter_mac_addr(padapter)); /* set mac addr to mac register */
#endif
}
if (padapter->bup == _FALSE) {
@ -2743,10 +2735,6 @@ int _netdev_open(struct net_device *pnetdev)
if (status == _FAIL) {
goto netdev_open_error;
}
#if 0/*#ifdef CONFIG_MI_WITH_MBSSID_CAM*/
rtw_hal_set_hwreg(padapter, HW_VAR_MAC_ADDR, adapter_mac_addr(padapter)); /* set mac addr to mac register */
#endif
RTW_INFO("MAC Address = "MAC_FMT"\n", MAC_ARG(pnetdev->dev_addr));
status = rtw_start_drv_threads(padapter);
@ -2892,9 +2880,6 @@ static int ips_netdrv_open(_adapter *padapter)
if (status == _FAIL) {
goto netdev_open_error;
}
#if 0
rtw_restore_mac_addr(padapter);
#endif
rtw_intf_start(padapter);
#ifndef CONFIG_IPS_CHECK_IN_WD

View file

@ -726,18 +726,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
/* TBD: BTCOEXSCAN-STOP */
break;
case ANDROID_WIFI_CMD_BTCOEXMODE:
#if 0
uint mode = *(command + strlen(CMD_BTCOEXMODE) + 1) - '0';
if (mode == 1)
net_os_set_packet_filter(net, 0); /* DHCP starts */
else
net_os_set_packet_filter(net, 1); /* DHCP ends */
#ifdef WL_CFG80211
bytes_written = wl_cfg80211_set_btcoex_dhcp(net, command);
#endif
#endif
break;
case ANDROID_WIFI_CMD_SETSUSPENDOPT:
/* bytes_written = wl_android_set_suspendopt(net, command, priv_cmd.total_len); */
break;

View file

@ -1125,33 +1125,6 @@ static int wl_cfgvendor_priv_string_handler(struct wiphy *wiphy,
, FUNC_NDEV_ARG(wdev_to_ndev(wdev)), err);
return err;
#if 0
struct bcm_cfg80211 *cfg = wiphy_priv(wiphy);
int err = 0;
int data_len = 0;
bzero(cfg->ioctl_buf, WLC_IOCTL_MAXLEN);
if (strncmp((char *)data, BRCM_VENDOR_SCMD_CAPA, strlen(BRCM_VENDOR_SCMD_CAPA)) == 0) {
err = wldev_iovar_getbuf(bcmcfg_to_prmry_ndev(cfg), "cap", NULL, 0,
cfg->ioctl_buf, WLC_IOCTL_MAXLEN, &cfg->ioctl_buf_sync);
if (unlikely(err)) {
WL_ERR(("error (%d)\n", err));
return err;
}
data_len = strlen(cfg->ioctl_buf);
cfg->ioctl_buf[data_len] = '\0';
}
err = rtw_cfgvendor_send_cmd_reply(wiphy, bcmcfg_to_prmry_ndev(cfg),
cfg->ioctl_buf, data_len + 1);
if (unlikely(err))
WL_ERR(("Vendor Command reply failed ret:%d\n", err));
else
WL_INFORM(("Vendor Command reply sent successfully!\n"));
return err;
#endif
}
static const struct wiphy_vendor_command rtw_vendor_cmds[] = {

View file

@ -2221,47 +2221,6 @@ static ssize_t proc_set_rsvd_page_info(struct file *file, const char __user *buf
return count;
}
#if 0 /*#ifdef CONFIG_SUPPORT_FIFO_DUMP*/
static int proc_dump_fifo(struct seq_file *m, void *v)
{
struct net_device *dev = m->private;
_adapter *adapter = (_adapter *)rtw_netdev_priv(dev);
/*dump fifo*/
return 0;
}
static ssize_t proc_set_fifo_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data)
{
struct net_device *dev = data;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
char tmp[32];
u8 acs_satae = 0;
if (count < 3)
return -EFAULT;
if (count > sizeof(tmp)) {
rtw_warn_on(1);
return -EFAULT;
}
if (buffer && !copy_from_user(tmp, buffer, count)) {
/* get fifo_sel, start addr, size
int num = sscanf(tmp, "%hhu", &acs_satae);
if (num < 1)
return -EINVAL;
if (1 == acs_satae)
rtw_acs_start(padapter, _TRUE);
else
rtw_acs_start(padapter, _FALSE);
*/
}
return count;
}
#endif
#ifdef CONFIG_WOW_PATTERN_HW_CAM
int proc_dump_pattern_cam(struct seq_file *m, void *v)
{
@ -2534,9 +2493,6 @@ static const struct rtw_proc_hdl adapter_proc_hdls[] = {
RTW_PROC_HDL_SSEQ("napi_info", proc_get_napi_info, NULL),
RTW_PROC_HDL_SSEQ("rsvd_page", proc_dump_rsvd_page, proc_set_rsvd_page_info),
#if 0 /*def CONFIG_SUPPORT_FIFO_DUMP*/
/*RTW_PROC_HDL_SSEQ("fifo_dump", proc_dump_fifo, proc_set_fifo_info),*/
#endif
RTW_PROC_HDL_SSEQ("fw_info", proc_get_fw_info, NULL),
#ifdef RTW_HALMAC
RTW_PROC_HDL_SSEQ("halmac_info", proc_get_halmac_info, NULL),

View file

@ -1200,15 +1200,7 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
RTW_INFO("wlan link up\n");
rtd2885_wlan_netlink_sendMsg("linkup", "8712");
#endif
status = _SUCCESS;
#if 0 /* not used now */
os_ndevs_deinit:
if (status != _SUCCESS)
rtw_os_ndevs_deinit(dvobj);
#endif
free_if_vir:
if (status != _SUCCESS) {
#ifdef CONFIG_CONCURRENT_MODE

View file

@ -599,12 +599,6 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
purb->transfer_flags |= URB_ZERO_PACKET;
#endif
#endif
#if 0
if (bwritezero)
purb->transfer_flags |= URB_ZERO_PACKET;
#endif
status = usb_submit_urb(purb, GFP_ATOMIC);
if (!status) {
#ifdef DBG_CONFIG_ERROR_DETECT

View file

@ -130,124 +130,11 @@ static const struct ieee80211_regdomain rtw_regdom_14 = {
}
};
#if 0
static struct rtw_regulatory *rtw_regd;
#endif
static bool _rtw_is_radar_freq(u16 center_freq)
{
return center_freq >= 5260 && center_freq <= 5700;
}
#if 0 /* not_yet */
static void _rtw_reg_apply_beaconing_flags(struct wiphy *wiphy,
enum nl80211_reg_initiator initiator)
{
enum nl80211_band band;
struct ieee80211_supported_band *sband;
const struct ieee80211_reg_rule *reg_rule;
struct ieee80211_channel *ch;
unsigned int i;
u32 bandwidth = 0;
int r;
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
if (!wiphy->bands[band])
continue;
sband = wiphy->bands[band];
for (i = 0; i < sband->n_channels; i++) {
ch = &sband->channels[i];
if (_rtw_is_radar_freq(ch->center_freq) ||
(ch->flags & IEEE80211_CHAN_RADAR))
continue;
if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
r = freq_reg_info(wiphy, ch->center_freq,
bandwidth, &reg_rule);
if (r)
continue;
/*
*If 11d had a rule for this channel ensure
*we enable adhoc/beaconing if it allows us to
*use it. Note that we would have disabled it
*by applying our static world regdomain by
*default during init, prior to calling our
*regulatory_hint().
*/
if (!(reg_rule->flags & NL80211_RRF_NO_IBSS))
ch->flags &= ~IEEE80211_CHAN_NO_IBSS;
if (!
(reg_rule->flags &
NL80211_RRF_PASSIVE_SCAN))
ch->flags &=
~IEEE80211_CHAN_PASSIVE_SCAN;
} else {
if (ch->beacon_found)
ch->flags &= ~(IEEE80211_CHAN_NO_IBSS |
IEEE80211_CHAN_PASSIVE_SCAN);
}
}
}
}
/* Allows active scan scan on Ch 12 and 13 */
static void _rtw_reg_apply_active_scan_flags(struct wiphy *wiphy,
enum nl80211_reg_initiator
initiator)
{
struct ieee80211_supported_band *sband;
struct ieee80211_channel *ch;
const struct ieee80211_reg_rule *reg_rule;
u32 bandwidth = 0;
int r;
if (!wiphy->bands[NL80211_BAND_2GHZ])
return;
sband = wiphy->bands[NL80211_BAND_2GHZ];
/*
* If no country IE has been received always enable active scan
* on these channels. This is only done for specific regulatory SKUs
*/
if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
ch = &sband->channels[11]; /* CH 12 */
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
ch = &sband->channels[12]; /* CH 13 */
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
return;
}
/*
* If a country IE has been received check its rule for this
* channel first before enabling active scan. The passive scan
* would have been enforced by the initial processing of our
* custom regulatory domain.
*/
ch = &sband->channels[11]; /* CH 12 */
r = freq_reg_info(wiphy, ch->center_freq, bandwidth, &reg_rule);
if (!r) {
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
}
ch = &sband->channels[12]; /* CH 13 */
r = freq_reg_info(wiphy, ch->center_freq, bandwidth, &reg_rule);
if (!r) {
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
}
}
#endif
/*
* Always apply Radar/DFS rules on
* freq range 5260 MHz - 5700 MHz
@ -281,30 +168,11 @@ static void _rtw_reg_apply_radar_flags(struct wiphy *wiphy)
#endif
}
#endif /* CONFIG_DFS */
#if 0
/*
* We always enable radar detection/DFS on this
* frequency range. Additionally we also apply on
* this frequency range:
* - If STA mode does not yet have DFS supports disable
* active scanning
* - If adhoc mode does not support DFS yet then disable
* adhoc in the frequency.
* - If AP mode does not yet support radar detection/DFS
* do not allow AP mode
*/
if (!(ch->flags & IEEE80211_CHAN_DISABLED))
ch->flags |= IEEE80211_CHAN_RADAR |
IEEE80211_CHAN_NO_IBSS |
IEEE80211_CHAN_PASSIVE_SCAN;
#endif
}
}
static void _rtw_reg_apply_flags(struct wiphy *wiphy)
{
#if 1 /* by channel plan */
_adapter *padapter = wiphy_to_adapter(wiphy);
u8 channel_plan = padapter->mlmepriv.ChannelPlan;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@ -352,46 +220,6 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
ch->flags = 0;
}
}
#else
struct ieee80211_supported_band *sband;
struct ieee80211_channel *ch;
unsigned int i, j;
u16 channels[37] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56,
60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140,
149, 153,
157, 161, 165
};
u16 channel;
u32 freq;
for (i = 0; i < NUM_NL80211_BANDS; i++) {
sband = wiphy->bands[i];
if (sband)
for (j = 0; j < sband->n_channels; j++) {
ch = &sband->channels[j];
if (ch)
ch->flags = IEEE80211_CHAN_DISABLED;
}
}
for (i = 0; i < 37; i++) {
channel = channels[i];
freq = rtw_ch2freq(channel);
ch = ieee80211_get_channel(wiphy, freq);
if (ch) {
if (channel <= 11)
ch->flags = 0;
else
ch->flags = 0; /* IEEE80211_CHAN_PASSIVE_SCAN; */
}
/* printk("%s: freq %d(%d) flag 0x%02X\n", __func__, freq, channel, ch->flags); */
}
#endif
}
static void _rtw_reg_apply_world_flags(struct wiphy *wiphy,
@ -446,15 +274,7 @@ static const struct ieee80211_regdomain *_rtw_regdomain_select(struct
rtw_regulatory
*reg)
{
#if 0
switch (reg->country_code) {
case COUNTRY_CODE_USER:
default:
return &rtw_regdom_rd;
}
#else
return &rtw_regdom_rd;
#endif
}
static void _rtw_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
@ -527,21 +347,6 @@ int rtw_regd_init(_adapter *padapter)
{
struct wiphy *wiphy = padapter->rtw_wdev->wiphy;
#if 0
if (rtw_regd == NULL) {
rtw_regd = (struct rtw_regulatory *)
rtw_malloc(sizeof(struct rtw_regulatory));
rtw_regd->alpha2[0] = '9';
rtw_regd->alpha2[1] = '9';
rtw_regd->country_code = COUNTRY_CODE_USER;
}
RTW_INFO("%s: Country alpha2 being used: %c%c\n",
__func__, rtw_regd->alpha2[0], rtw_regd->alpha2[1]);
#endif
_rtw_regd_init_wiphy(NULL, wiphy);
return 0;