diff --git a/core/rtw_btcoex.c b/core/rtw_btcoex.c index 5a08501..e00ff86 100644 --- a/core/rtw_btcoex.c +++ b/core/rtw_btcoex.c @@ -589,14 +589,11 @@ u8 rtw_btcoex_parse_BT_info_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen) _rtw_memset(btinfo, 0, BT_INFO_LENGTH); -#if 1 if (BT_INFO_LENGTH != btInfoLen) { status = HCI_STATUS_INVALID_HCI_CMD_PARA_VALUE; RTW_INFO("Error BT Info Length: %d\n", btInfoLen); /* return _FAIL; */ - } else -#endif - { + } else { if (0x1 == btInfoReason || 0x2 == btInfoReason) { _rtw_memcpy(btinfo, &pcmd[4], btInfoLen); btinfo[0] = btInfoReason; diff --git a/core/rtw_debug.c b/core/rtw_debug.c index b52e5ed..636038e 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -3137,10 +3137,8 @@ int proc_get_best_channel(struct seq_file *m, void *v) best_channel_5G = pmlmeext->channel_set[i].ChannelNum; } } -#if 1 /* debug */ RTW_PRINT_SEL(m, "The rx cnt of channel %3d = %d\n", pmlmeext->channel_set[i].ChannelNum, pmlmeext->channel_set[i].rx_count); -#endif } RTW_PRINT_SEL(m, "best_channel_5G = %d\n", best_channel_5G); @@ -4415,7 +4413,6 @@ ssize_t proc_set_mcc_policy_table(struct file *file, const char __user *buffer, } if (buffer && !copy_from_user(tmp, buffer, count)) { - #if 1 struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); _adapter *iface = NULL; u8 i = 0; @@ -4441,7 +4438,6 @@ ssize_t proc_set_mcc_policy_table(struct file *file, const char __user *buffer, } rtw_hal_mcc_update_switch_channel_policy_table(padapter); - #endif } return count; diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index cf4f2dd..b67768d 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -502,7 +502,6 @@ u8 rtw_set_802_11_disassociate(_adapter *padapter) return _TRUE; } -#if 1 u8 rtw_set_802_11_bssid_list_scan(_adapter *padapter, NDIS_802_11_SSID *pssid, int ssid_max_num, struct rtw_ieee80211_channel *ch, int ch_num) { _irqL irqL; @@ -516,45 +515,6 @@ u8 rtw_set_802_11_bssid_list_scan(_adapter *padapter, NDIS_802_11_SSID *pssid, i return res; } -#else -u8 rtw_set_802_11_bssid_list_scan(_adapter *padapter, NDIS_802_11_SSID *pssid, int ssid_max_num, struct rtw_ieee80211_channel *ch, int ch_num) -{ - _irqL irqL; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - u8 res = _TRUE; - - if (padapter == NULL) { - res = _FALSE; - goto exit; - } - if (!rtw_is_hw_init_completed(padapter)) { - res = _FALSE; - goto exit; - } - - if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == _TRUE) || - (pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE)) { - /* Scan or linking is in progress, do nothing. */ - res = _TRUE; - - } else { - if (rtw_is_scan_deny(padapter)) { - RTW_INFO(FUNC_ADPT_FMT": scan deny\n", FUNC_ADPT_ARG(padapter)); - indicate_wx_scan_complete_event(padapter); - return _SUCCESS; - } - - _enter_critical_bh(&pmlmepriv->lock, &irqL); - - res = rtw_sitesurvey_cmd(padapter, pssid, ssid_max_num, NULL, 0, ch, ch_num); - - _exit_critical_bh(&pmlmepriv->lock, &irqL); - } -exit: - - return res; -} -#endif u8 rtw_set_802_11_authentication_mode(_adapter *padapter, NDIS_802_11_AUTHENTICATION_MODE authmode) { struct security_priv *psecuritypriv = &padapter->securitypriv; diff --git a/core/rtw_iol.c b/core/rtw_iol.c index e154fe5..32217a7 100644 --- a/core/rtw_iol.c +++ b/core/rtw_iol.c @@ -28,7 +28,6 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(ADAPTER *adapter) struct pkt_attrib *pattrib; struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); -#if 1 xmit_frame = rtw_alloc_xmitframe(pxmitpriv); if (xmit_frame == NULL) { RTW_INFO("%s rtw_alloc_xmitframe return null\n", __func__); @@ -54,23 +53,10 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(ADAPTER *adapter) pattrib->subtype = WIFI_BEACON; pattrib->pktlen = pattrib->last_txcmdsz = 0; -#else - xmit_frame = alloc_mgtxmitframe(pxmitpriv); - if (xmit_frame == NULL) - RTW_INFO("%s alloc_mgtxmitframe return null\n", __func__); - else { - pattrib = &xmit_frame->attrib; - update_mgntframe_attrib(adapter, pattrib); - pattrib->qsel = QSLT_BEACON; - pattrib->pktlen = pattrib->last_txcmdsz = 0; - } -#endif - exit: return xmit_frame; } - int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len) { struct pkt_attrib *pattrib = &xmit_frame->attrib; diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 5850213..5c179cd 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -3000,7 +3000,6 @@ static int rtw_check_roaming_candidate(struct mlme_priv *mlme else goto exit; } -#if 1 if (rtw_get_passing_time_ms((u32)competitor->last_scanned) >= mlme->roam_scanr_exp_ms) goto exit; @@ -3009,10 +3008,6 @@ static int rtw_check_roaming_candidate(struct mlme_priv *mlme if (*candidate != NULL && (*candidate)->network.Rssi >= competitor->network.Rssi) goto exit; -#else - goto exit; -#endif - update: *candidate = competitor; updated = _TRUE; diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 250fc74..cb52fae 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -13628,7 +13628,6 @@ exit: set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode); } -#if 1 /** * sitesurvey_ps_annc - check and doing ps announcement for all the adapters of given @dvobj * @padapter @@ -13645,43 +13644,6 @@ static u8 sitesurvey_ps_annc(_adapter *padapter, bool ps) ps_anc = 1; return ps_anc; } -#else -/** - * sitesurvey_ps_annc - check and doing ps announcement for all the adapters of given @dvobj - * @dvobj: the dvobj to check - * @ps: power saving or not - * - * Returns: 0: no ps announcement is doing. 1: ps announcement is doing - */ - -u8 sitesurvey_ps_annc(struct dvobj_priv *dvobj, bool ps) -{ - _adapter *adapter; - int i; - u8 ps_anc = 0; - - for (i = 0; i < dvobj->iface_nums; i++) { - adapter = dvobj->padapters[i]; - if (!adapter) - continue; - - if (ps) { - if (is_client_associated_to_ap(adapter) == _TRUE) { - /* TODO: TDLS peers */ - issue_nulldata(adapter, NULL, 1, 3, 500); - ps_anc = 1; - } - } else { - if (is_client_associated_to_ap(adapter) == _TRUE) { - /* TODO: TDLS peers */ - issue_nulldata(adapter, NULL, 0, 3, 500); - ps_anc = 1; - } - } - } - return ps_anc; -} -#endif static void sitesurvey_set_igi(_adapter *adapter) { diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 3f7b22c..6482f77 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -1438,16 +1438,11 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work) _exit_pwrlock(&pwrpriv->lock); if (rtw_read8(padapter, 0x100) != 0xEA) { -#if 1 struct reportpwrstate_parm report; report.state = PS_STATE_S2; RTW_INFO("\n%s: FW already leave 32K!\n\n", __func__); cpwm_int_hdl(padapter, &report); -#else - RTW_INFO("\n%s: FW already leave 32K!\n\n", __func__); - cpwm_event_callback(&pwrpriv->cpwm_event); -#endif return; } @@ -2114,11 +2109,7 @@ void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv) rtw_resume_lock_suspend(); -#if 1 queue_work(pwrpriv->rtw_workqueue, &pwrpriv->resume_work); -#else - _set_workitem(&pwrpriv->resume_work); -#endif } #endif /* CONFIG_RESUME_IN_WORKQUEUE */ diff --git a/core/rtw_recv.c b/core/rtw_recv.c index fe9a583..24658fd 100755 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -2101,7 +2101,6 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame) sc = (pattrib->seq_num << 4) | pattrib->frag_num; #endif -#if 1 /* Dump rx packets */ { u8 bDumpRxPkt = 0; @@ -2113,7 +2112,6 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame) else if ((bDumpRxPkt == 3) && (type == WIFI_DATA_TYPE)) dump_rx_packet(ptr); } -#endif switch (type) { case WIFI_MGT_TYPE: /* mgnt */ DBG_COUNTER(adapter->rx_logs.core_rx_pre_mgmt); @@ -2210,9 +2208,7 @@ exit: /* remove the wlanhdr and add the eth_hdr */ -#if 1 -sint wlanhdr_to_ethhdr(union recv_frame *precvframe); sint wlanhdr_to_ethhdr(union recv_frame *precvframe) { sint rmv_len; @@ -2326,103 +2322,6 @@ exiting: } -#else - -sint wlanhdr_to_ethhdr(union recv_frame *precvframe) -{ - sint rmv_len; - u16 eth_type; - u8 bsnaphdr; - u8 *psnap_type; - struct ieee80211_snap_hdr *psnap; - - sint ret = _SUCCESS; - _adapter *adapter = precvframe->u.hdr.adapter; - struct mlme_priv *pmlmepriv = &adapter->mlmepriv; - - u8 *ptr = get_recvframe_data(precvframe) ; /* point to frame_ctrl field */ - struct rx_pkt_attrib *pattrib = &precvframe->u.hdr.attrib; - struct _vlan *pvlan = NULL; - - - psnap = (struct ieee80211_snap_hdr *)(ptr + pattrib->hdrlen + pattrib->iv_len); - psnap_type = ptr + pattrib->hdrlen + pattrib->iv_len + SNAP_SIZE; - if (psnap->dsap == 0xaa && psnap->ssap == 0xaa && psnap->ctrl == 0x03) { - if (_rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN)) - bsnaphdr = _TRUE; /* wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042; */ - else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) && - _rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2)) - bsnaphdr = _TRUE; /* wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK; */ - else if (_rtw_memcmp(psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN)) - bsnaphdr = _TRUE; /* wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL; */ - else { - ret = _FAIL; - goto exit; - } - - } else - bsnaphdr = _FALSE; /* wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS; */ - - rmv_len = pattrib->hdrlen + pattrib->iv_len + (bsnaphdr ? SNAP_SIZE : 0); - - if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) { - ptr += rmv_len ; - *ptr = 0x87; - *(ptr + 1) = 0x12; - - /* back to original pointer */ - ptr -= rmv_len; - } - - ptr += rmv_len ; - - _rtw_memcpy(ð_type, ptr, 2); - eth_type = ntohs((unsigned short)eth_type); /* pattrib->ether_type */ - ptr += 2; - - if (pattrib->encrypt) - recvframe_pull_tail(precvframe, pattrib->icv_len); - - if (eth_type == 0x8100) { /* vlan */ - pvlan = (struct _vlan *) ptr; - - /* eth_type = get_vlan_encap_proto(pvlan); */ - /* eth_type = pvlan->h_vlan_encapsulated_proto; */ /* ? */ - rmv_len += 4; - ptr += 4; - } - - if (eth_type == 0x0800) { /* ip */ - /* struct iphdr* piphdr = (struct iphdr*) ptr; */ - /* __u8 tos = (unsigned char)(pattrib->priority & 0xff); */ - - /* piphdr->tos = tos; */ - - } else if (eth_type == 0x8712) { /* append rx status for mp test packets */ - /* ptr -= 16; */ - /* _rtw_memcpy(ptr, get_rxmem(precvframe), 16); */ - } - - if (eth_type == 0x8712) { /* append rx status for mp test packets */ - ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + 2) - 24); - _rtw_memcpy(ptr, get_rxmem(precvframe), 24); - ptr += 24; - } else - ptr = recvframe_pull(precvframe, (rmv_len - sizeof(struct ethhdr) + 2)); - - _rtw_memcpy(ptr, pattrib->dst, ETH_ALEN); - _rtw_memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); - - eth_type = htons((unsigned short)eth_type) ; - _rtw_memcpy(ptr + 12, ð_type, 2); - -exit: - - - return ret; -} -#endif - /* perform defrag */ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q); union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q) diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 859150c..66b633f 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -1501,7 +1501,6 @@ void flush_all_cam_entry(_adapter *padapter) rtw_clearstakey_cmd(padapter, psta, _FALSE); } } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { -#if 1 int cam_id = -1; u8 *addr = adapter_mac_addr(padapter); @@ -1510,23 +1509,7 @@ void flush_all_cam_entry(_adapter *padapter) clear_cam_entry(padapter, cam_id); rtw_camid_free(padapter, cam_id); } -#else - /* clear default key */ - int i, cam_id; - u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; - - for (i = 0; i < 4; i++) { - cam_id = rtw_camid_search(padapter, null_addr, i, -1); - if (cam_id >= 0) { - clear_cam_entry(padapter, cam_id); - rtw_camid_free(padapter, cam_id); - } - } - /* clear default key related key search setting */ - rtw_hal_set_hwreg(padapter, HW_VAR_SEC_DK_CFG, (u8 *)_FALSE); -#endif } - #else /*NON CONFIG_CONCURRENT_MODE*/ invalidate_cam_all(padapter); diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 78aa88e..be3141e 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -3554,7 +3554,6 @@ static int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb) { /* if (priv->dev->br_port && * !memcmp(skb->data+MACADDRLEN, priv->br_mac, MACADDRLEN)) { */ -#if 1 if (*((__be16 *)(skb->data + MACADDRLEN * 2)) == __constant_htons(ETH_P_8021Q)) { is_vlan_tag = 1; vlan_hdr = *((unsigned short *)(skb->data + MACADDRLEN * 2 + 2)); @@ -3589,7 +3588,6 @@ static int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb) } } _exit_critical_bh(&padapter->br_ext_lock, &irqL); -#endif /* 1 */ if (do_nat25) { if (nat25_db_handle(padapter, skb, NAT25_CHECK) == 0) { struct sk_buff *newskb; diff --git a/hal/hal_intf.c b/hal/hal_intf.c index b7cdc8f..35d07c8 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -1054,7 +1054,6 @@ bool rtw_hal_rfkill_poll(_adapter *adapter, u8 *valid) u8 rtw_hal_ops_check(_adapter *padapter) { u8 ret = _SUCCESS; -#if 1 /*** initialize section ***/ if (NULL == padapter->hal_func.read_chip_version) { rtw_hal_error_msg("read_chip_version"); @@ -1235,9 +1234,6 @@ u8 rtw_hal_ops_check(_adapter *padapter) ret = _FAIL; } -#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) -#endif /* CONFIG_WOWLAN */ - if (NULL == padapter->hal_func.fw_dl) { rtw_hal_error_msg("fw_dl"); ret = _FAIL; @@ -1296,7 +1292,6 @@ u8 rtw_hal_ops_check(_adapter *padapter) rtw_hal_error_msg("hal_radio_onoff_check"); ret = _FAIL; } -#endif #endif return ret; } diff --git a/hal/phydm/halphyrf_8188e_ce.c b/hal/phydm/halphyrf_8188e_ce.c index beae409..98070eb 100644 --- a/hal/phydm/halphyrf_8188e_ce.c +++ b/hal/phydm/halphyrf_8188e_ce.c @@ -1577,7 +1577,6 @@ static void _phy_ap_calibrate_8188e( continue; tmp_reg = APK_RF_init_value[path][index]; -#if 1 if (!p_dm_odm->rf_calibrate_info.is_apk_thermal_meter_ignore) { BB_offset = (tmp_reg & 0xF0000) >> 16; @@ -1597,8 +1596,6 @@ static void _phy_ap_calibrate_8188e( tmp_reg = tmp_reg | BIT(15); tmp_reg = (tmp_reg & 0xFFF0FFFF) | (BB_offset << 16); } -#endif - odm_set_rf_reg(p_dm_odm, (enum odm_rf_radio_path_e)path, RF_IPA_A, MASKDWORD, 0x8992e); ODM_RT_TRACE(p_dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("_phy_ap_calibrate_8188e() offset 0xc %x\n", phy_query_rf_reg(p_adapter, path, RF_IPA_A, MASKDWORD))); odm_set_rf_reg(p_dm_odm, (enum odm_rf_radio_path_e)path, RF_AC, MASKDWORD, APK_RF_value_0[path][index]); diff --git a/hal/phydm/phydm.h b/hal/phydm/phydm.h index 646ada2..88e321e 100644 --- a/hal/phydm/phydm.h +++ b/hal/phydm/phydm.h @@ -192,7 +192,6 @@ struct _odm_phy_dbg_info_ { /*2011/20/20 MH For MP driver RT_WLAN_STA = struct sta_info*/ /*Please declare below ODM relative info in your STA info structure.*/ -#if 1 struct _ODM_STA_INFO { /*Driver Write*/ bool is_used; /*record the sta status link or not?*/ @@ -206,7 +205,6 @@ struct _ODM_STA_INFO { u8 RXSNR[4]; }; -#endif enum odm_cmninfo_e { /*Fixed value*/ diff --git a/hal/phydm/phydm_antdiv.c b/hal/phydm/phydm_antdiv.c index 4c04065..ef16a33 100644 --- a/hal/phydm/phydm_antdiv.c +++ b/hal/phydm/phydm_antdiv.c @@ -2873,11 +2873,7 @@ odm_process_rssi_for_ant_div( pdm_sat_table->pkt_rssi_cnt[p_dm_fat_table->antsel_rx_keep_0][pdm_sat_table->fast_training_beam_num]++; pdm_sat_table->pkt_counter++; -#if 1 train_pkt_number = pdm_sat_table->beam_train_cnt[p_dm_fat_table->rx_idle_ant - 1][pdm_sat_table->fast_training_beam_num]; -#else - train_pkt_number = pdm_sat_table->per_beam_training_pkt_num; -#endif /*Swich Antenna erery N pkts*/ if (pdm_sat_table->pkt_counter == train_pkt_number) { diff --git a/hal/phydm/phydm_dynamic_rx_path.c b/hal/phydm/phydm_dynamic_rx_path.c index 3226121..d6be9c0 100644 --- a/hal/phydm/phydm_dynamic_rx_path.c +++ b/hal/phydm/phydm_dynamic_rx_path.c @@ -110,33 +110,10 @@ phydm_dynamic_rx_path( training_set_timmer_en = true; } else if (p_dm_drp_table->drp_state == DRP_TRAINING_STATE_1) { - phydm_drp_get_statistic(p_dm_odm); - p_dm_drp_table->curr_cca_all_cnt_1 = false_alm_cnt->cnt_cca_all; p_dm_drp_table->curr_fa_all_cnt_1 = false_alm_cnt->cnt_all; - -#if 1 p_dm_drp_table->drp_state = DRP_DECISION_STATE; -#else - - if (p_dm_odm->mp_mode) { - rx_ok_cal = p_dm_odm->phy_dbg_info.num_qry_phy_status_cck + p_dm_odm->phy_dbg_info.num_qry_phy_status_ofdm; - RSSI = (rx_ok_cal != 0) ? p_dm_odm->rx_pwdb_ave / rx_ok_cal : 0; - ODM_RT_TRACE(p_dm_odm, ODM_COMP_DYNAMIC_RX_PATH, ODM_DBG_LOUD, ("MP RSSI = ((%d))\n", RSSI)); - } - - if (RSSI > p_dm_drp_table->rssi_threshold) - - p_dm_drp_table->drp_state = DRP_DECISION_STATE; - - else { - - p_dm_drp_table->drp_state = DRP_TRAINING_STATE_2; - p_dm_drp_table->curr_rx_path = PHYDM_A; - training_set_timmer_en = true; - } -#endif } else if (p_dm_drp_table->drp_state == DRP_TRAINING_STATE_2) { phydm_drp_get_statistic(p_dm_odm); diff --git a/hal/phydm/phydm_rainfo.c b/hal/phydm/phydm_rainfo.c index d0930bb..94b1bde 100644 --- a/hal/phydm/phydm_rainfo.c +++ b/hal/phydm/phydm_rainfo.c @@ -882,7 +882,6 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id) h2c_parameter[4] = (p_ra_table->RA_threshold_offset & 0x7f) | (p_ra_table->RA_offset_direction << 7); ODM_RT_TRACE(p_dm_odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("RA_threshold_offset = (( %s%d ))\n", ((p_ra_table->RA_threshold_offset == 0) ? " " : ((p_ra_table->RA_offset_direction) ? "+" : "-")), p_ra_table->RA_threshold_offset)); -#if 1 if (first_connect) { ODM_RT_TRACE(p_dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("%s mac_id:%u, mac:"MAC_FMT", rssi:%d\n", __func__, p_entry->mac_id, MAC_ARG(p_entry->hwaddr), p_entry->rssi_stat.undecorated_smoothed_pwdb)); @@ -891,16 +890,13 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id) (UL_DL_STATE) ? "DL" : "UL", (tx_bf_en) ? "EN" : "DIS", (STBC_TX) ? "EN" : "DIS", (p_dm_odm->noisy_decision) ? "True" : "False", (first_connect) ? "True" : "False")); } -#endif if (p_hal_data->fw_ractrl == _TRUE) { -#if (RTL8188E_SUPPORT == 1) if (p_dm_odm->support_ic_type == ODM_RTL8188E) cmdlen = 3; -#endif odm_fill_h2c_cmd(p_dm_odm, ODM_H2C_RSSI_REPORT, cmdlen, h2c_parameter); } else { -#if ((RTL8188E_SUPPORT == 1) && (RATE_ADAPTIVE_SUPPORT == 1)) +#if ((RATE_ADAPTIVE_SUPPORT == 1)) if (p_dm_odm->support_ic_type == ODM_RTL8188E) odm_ra_set_rssi_8188e(p_dm_odm, (u8)(p_entry->mac_id & 0xFF), p_entry->rssi_stat.undecorated_smoothed_pwdb & 0x7F); #endif diff --git a/hal/phydm/phydm_rainfo.h b/hal/phydm/phydm_rainfo.h index 157bb50..aa97436 100644 --- a/hal/phydm/phydm_rainfo.h +++ b/hal/phydm/phydm_rainfo.h @@ -186,7 +186,6 @@ struct _odm_ra_info_ { u8 ra_waiting_counter; u8 ra_pending_counter; u8 ra_drop_after_down; -#if 1 /* POWER_TRAINING_ACTIVE == 1 */ /* For compile pass only~! */ u8 pt_active; /* on or off */ u8 pt_try_state; /* 0 trying state, 1 for decision state */ u8 pt_stage; /* 0~6 */ @@ -196,7 +195,6 @@ struct _odm_ra_info_ { u8 pt_mode_ss; /* decide whitch rate should do PT */ u8 ra_stage; /* StageRA, decide how many times RA will be done between PT */ u8 pt_smooth_factor; -#endif }; #endif diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index 75c875c..7ebffb8 100644 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -689,8 +689,6 @@ void rtl8188e_set_p2p_ps_offload_cmd(_adapter *padapter, u8 p2p_ps_state) struct P2P_PS_Offload_t *p2p_ps_offload = (struct P2P_PS_Offload_t *)(&pHalData->p2p_ps_offload); u8 i; - -#if 1 switch (p2p_ps_state) { case P2P_PS_DISABLE: RTW_INFO("P2P_PS_DISABLE\n"); @@ -756,9 +754,6 @@ void rtl8188e_set_p2p_ps_offload_cmd(_adapter *padapter, u8 p2p_ps_state) } FillH2CCmd_88E(padapter, H2C_PS_P2P_OFFLOAD, 1, (u8 *)p2p_ps_offload); -#endif - - } #endif /* CONFIG_P2P_PS */ diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index d13c9c8..58bc675 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -2379,11 +2379,7 @@ static void read_chip_version_8188e(PADAPTER padapter) pHalData->MultiFunc = RT_MULTI_FUNC_NONE; rtw_hal_config_rftype(padapter); - -#if 1 dump_chip_info(pHalData->version_id); -#endif - } void rtl8188e_start_thread(_adapter *padapter) diff --git a/include/hal_data.h b/include/hal_data.h index 600edbc..95cf694 100755 --- a/include/hal_data.h +++ b/include/hal_data.h @@ -20,8 +20,6 @@ #ifndef __HAL_DATA_H__ #define __HAL_DATA_H__ -#if 1/* def CONFIG_SINGLE_IMG */ - #include "../hal/phydm/phydm_precomp.h" #ifdef CONFIG_BT_COEXIST #include @@ -638,7 +636,6 @@ typedef struct hal_com_data HAL_DATA_TYPE, *PHAL_DATA_TYPE; #define is_boot_from_eeprom(adapter) (GET_HAL_DATA(adapter)->EepromOrEfuse) #define rtw_get_hw_init_completed(adapter) (GET_HAL_DATA(adapter)->hw_init_completed) #define rtw_is_hw_init_completed(adapter) (GET_HAL_DATA(adapter)->hw_init_completed == _TRUE) -#endif #ifdef CONFIG_AUTO_CHNL_SEL_NHM #define GET_ACS_STATE(padapter) (ATOMIC_READ(&GET_HAL_DATA(padapter)->acs.state)) diff --git a/include/rtl8188e_hal.h b/include/rtl8188e_hal.h index 86d9c54..9f19b00 100644 --- a/include/rtl8188e_hal.h +++ b/include/rtl8188e_hal.h @@ -51,8 +51,6 @@ #define Rtl8188E_NIC_LPS_ENTER_FLOW rtl8188E_enter_lps_flow #define Rtl8188E_NIC_LPS_LEAVE_FLOW rtl8188E_leave_lps_flow - -#if 1 /* download firmware related data structure */ #define MAX_FW_8188E_SIZE 0x8000 /* 32768, 32k / 16384, 16k */ #define FW_8188E_SIZE 0x4000 /* 16384, 16k */ @@ -107,7 +105,6 @@ typedef struct _RT_8188E_FIRMWARE_HDR { __le32 Rsvd4; __le32 Rsvd5; } RT_8188E_FIRMWARE_HDR, *PRT_8188E_FIRMWARE_HDR; -#endif /* download firmware related data structure */ #define DRIVER_EARLY_INT_TIME_8188E 0x05 diff --git a/include/rtw_br_ext.h b/include/rtw_br_ext.h index 1df8dc6..8d6d2cd 100644 --- a/include/rtw_br_ext.h +++ b/include/rtw_br_ext.h @@ -20,7 +20,6 @@ #ifndef _RTW_BR_EXT_H_ #define _RTW_BR_EXT_H_ -#if 1 /* rtw_wifi_driver */ #define CL_IPV6_PASS 1 #define MACADDRLEN 6 #define _DEBUG_ERR RTW_INFO @@ -30,7 +29,6 @@ #define DEBUG_ERR RTW_INFO /* #define GET_MY_HWADDR ((GET_MIB(priv))->dot11OperationEntry.hwaddr) */ #define GET_MY_HWADDR(padapter) (adapter_mac_addr(padapter)) -#endif /* rtw_wifi_driver */ #define NAT25_HASH_BITS 4 #define NAT25_HASH_SIZE (1 << NAT25_HASH_BITS) diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 80ec432..59ee57d 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -500,16 +500,8 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net RTW_INFO("%s, got p2p_ie\n", __func__); #endif -#if 1 bss = cfg80211_inform_bss_frame(wiphy, notify_channel, (struct ieee80211_mgmt *)pbuf, len, notify_signal, GFP_ATOMIC); -#else - - bss = cfg80211_inform_bss(wiphy, notify_channel, (const u8 *)pnetwork->network.MacAddress, - notify_timestamp, notify_capability, notify_interval, notify_ie, - notify_ielen, notify_signal, GFP_ATOMIC/*GFP_KERNEL*/); -#endif - if (unlikely(!bss)) { RTW_INFO(FUNC_ADPT_FMT" bss NULL\n", FUNC_ADPT_ARG(padapter)); goto exit; @@ -5866,7 +5858,6 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, _rtw_memcpy(txmgmt.buf, (void *)buf, txmgmt.len); /* Debug purpose */ -#if 1 RTW_INFO("%s %d\n", __func__, __LINE__); RTW_INFO("peer:"MAC_FMT", action code:%d, dialog:%d, status code:%d\n", MAC_ARG(txmgmt.peer), txmgmt.action_code, @@ -5877,7 +5868,6 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, printk("%02x ", *(txmgmt.buf + i)); RTW_INFO("len:%d\n", (u32)txmgmt.len); } -#endif switch (txmgmt.action_code) { case TDLS_SETUP_REQUEST: diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 5f43df6..76d70b8 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -2158,7 +2158,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, } #endif /* CONFIG_P2P */ -#if 1 /* Wireless Extension use EAGAIN to try */ wait_status = _FW_UNDER_SURVEY #ifndef CONFIG_ANDROID | _FW_UNDER_LINKING @@ -2167,20 +2166,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, while (check_fwstate(pmlmepriv, wait_status) == _TRUE) return -EAGAIN; -#else - wait_status = _FW_UNDER_SURVEY -#ifndef CONFIG_ANDROID - | _FW_UNDER_LINKING -#endif - ; - - while (check_fwstate(pmlmepriv, wait_status) == _TRUE) { - rtw_msleep_os(30); - cnt++; - if (cnt > wait_for_surveydone) - break; - } -#endif _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); phead = get_list_head(queue); @@ -9338,7 +9323,6 @@ static int rtw_mp_efuse_set(struct net_device *dev, printk("\n"); } printk("\n"); -#if 1 err = -EFAULT; RTW_INFO("%s: rtw_BT_efuse_map_read _rtw_memcmp\n", __func__); if ((rtw_BT_efuse_map_read(padapter, 0x00, EFUSE_BT_MAX_MAP_LEN, pEfuseHal->fakeBTEfuseInitMap) == _SUCCESS)) { @@ -9370,8 +9354,6 @@ static int rtw_mp_efuse_set(struct net_device *dev, goto exit; } } -#endif - } else if (strcmp(tmp[0], "wlfk2map") == 0) { *extra = 0; @@ -10816,11 +10798,9 @@ static int rtw_tdls_get_best_ch(struct net_device *dev, best_channel_5G = pmlmeext->channel_set[i].ChannelNum; } } -#if 1 /* debug */ RTW_INFO("The rx cnt of channel %3d = %d\n", pmlmeext->channel_set[i].ChannelNum, pmlmeext->channel_set[i].rx_count); -#endif } sprintf(extra, "\nbest_channel_24G = %d\n", best_channel_24G); diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 3648621..acbb317 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -3613,7 +3613,6 @@ int rtw_suspend_wow(_adapter *padapter) clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY); } -#if 1 if (rtw_mi_check_status(padapter, MI_LINKED)) { ch = rtw_mi_get_union_chan(padapter); bw = rtw_mi_get_union_bw(padapter); @@ -3622,14 +3621,6 @@ int rtw_suspend_wow(_adapter *padapter) FUNC_ADPT_ARG(padapter), ch, bw, offset); set_channel_bwmode(padapter, ch, offset, bw); } -#else - if (rtw_mi_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) { - RTW_INFO(FUNC_ADPT_FMT" back to linked/linking union - ch:%u, bw:%u, offset:%u\n", - FUNC_ADPT_ARG(padapter), ch, bw, offset); - set_channel_bwmode(padapter, ch, offset, bw); - rtw_mi_update_union_chan_inf(padapter, ch, offset, bw); - } -#endif #ifdef CONFIG_CONCURRENT_MODE rtw_mi_buddy_suspend_free_assoc_resource(padapter); @@ -3707,7 +3698,6 @@ int rtw_suspend_ap_wow(_adapter *padapter) rtw_hal_set_hwreg(padapter, HW_VAR_WOWLAN, (u8 *)&poidparam); RTW_INFO("%s: wowmode suspending\n", __func__); -#if 1 if (rtw_mi_check_status(padapter, MI_LINKED)) { ch = rtw_mi_get_union_chan(padapter); bw = rtw_mi_get_union_bw(padapter); @@ -3715,14 +3705,6 @@ int rtw_suspend_ap_wow(_adapter *padapter) RTW_INFO("back to linked/linking union - ch:%u, bw:%u, offset:%u\n", ch, bw, offset); set_channel_bwmode(padapter, ch, offset, bw); } -#else - if (rtw_mi_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) { - RTW_INFO("back to linked/linking union - ch:%u, bw:%u, offset:%u\n", ch, bw, offset); - set_channel_bwmode(padapter, ch, offset, bw); - rtw_mi_update_union_chan_inf(padapter, ch, offset, bw); - } -#endif - /*FOR ONE AP - TODO :Multi-AP*/ { int i; diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index 68c553a..e402f93 100644 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -32,21 +32,12 @@ int rtw_os_recvframe_duplicate_skb(_adapter *padapter, union recv_frame *pclonef RTW_INFO("%s [WARN] skb == NULL, drop frag frame\n", __func__); return _FAIL; } -#if 1 pkt_copy = rtw_skb_copy(pskb); if (pkt_copy == NULL) { RTW_INFO("%s [WARN] rtw_skb_copy fail , drop frag frame\n", __func__); return _FAIL; } -#else - pkt_copy = rtw_skb_clone(pskb); - - if (pkt_copy == NULL) { - RTW_INFO("%s [WARN] rtw_skb_clone fail , drop frag frame\n", __func__); - return _FAIL; - } -#endif pkt_copy->dev = padapter->pnetdev; pcloneframe->u.hdr.pkt = pkt_copy; @@ -453,12 +444,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri /* DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n"); */ /* return FAIL; */ -#if 1 /* bypass this frame to upper layer!! */ -#else - rtw_skb_free(sub_skb); - continue; -#endif } } #endif /* CONFIG_BR_EXT */ @@ -728,21 +714,11 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame) RTW_INFO("recv eapol packet\n"); #ifdef CONFIG_AUTO_AP_MODE -#if 1 /* for testing */ -#if 1 if (0x8899 == pattrib->eth_type) { rtw_os_ksocket_send(padapter, precv_frame); /* goto _recv_indicatepkt_drop; */ } -#else - if (0x8899 == pattrib->eth_type) { - rtw_auto_ap_mode_rx(padapter, precv_frame); - - goto _recv_indicatepkt_end; - } -#endif -#endif #endif /* CONFIG_AUTO_AP_MODE */ /* TODO: move to core */ diff --git a/os_dep/xmit_linux.c b/os_dep/xmit_linux.c index 3fc0644..2fe1ed4 100644 --- a/os_dep/xmit_linux.c +++ b/os_dep/xmit_linux.c @@ -86,13 +86,7 @@ void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib) /* skb_checksum_help(skb); */ } else if (ip->protocol == IPPROTO_UDP) { /* RTW_INFO("CHECKSUM_PARTIAL UDP\n"); */ -#if 1 skb_checksum_help(skb); -#else - /* Set UDP checksum = 0 to skip checksum check */ - struct udphdr *udp = skb_transport_header(skb); - udp->check = 0; -#endif } else { RTW_INFO("%s-%d TCP CSUM offload Error!!\n", __func__, __LINE__); WARN_ON(1); /* we need a WARN() */