diff --git a/core/rtw_debug.c b/core/rtw_debug.c index 8128c4a..f21a823 100755 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -1088,10 +1088,8 @@ int proc_get_best_channel(char *page, char **start, best_channel_5G = pmlmeext->channel_set[i].ChannelNum; } } -#if 1 /* debug */ len += snprintf(page + len, count - len, "The rx cnt of channel %3d = %d\n", pmlmeext->channel_set[i].ChannelNum, pmlmeext->channel_set[i].rx_count); -#endif } len += snprintf(page + len, count - len, "best_channel_5G = %d\n", best_channel_5G); diff --git a/core/rtw_iol.c b/core/rtw_iol.c index 15a21d9..086a833 100755 --- a/core/rtw_iol.c +++ b/core/rtw_iol.c @@ -27,7 +27,6 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter) struct pkt_attrib *pattrib; struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); -#if 1 if ((xmit_frame = rtw_alloc_xmitframe(pxmitpriv)) == NULL) { DBG_871X("%s rtw_alloc_xmitframe return null\n", __FUNCTION__); @@ -53,19 +52,6 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter) pattrib->subtype = WIFI_BEACON; pattrib->pktlen = pattrib->last_txcmdsz = 0; -#else - if ((xmit_frame = alloc_mgtxmitframe(pxmitpriv)) == NULL) - { - DBG_871X("%s alloc_mgtxmitframe return null\n", __FUNCTION__); - } - else { - pattrib = &xmit_frame->attrib; - update_mgntframe_attrib(adapter, pattrib); - pattrib->qsel = 0x10; - pattrib->pktlen = pattrib->last_txcmdsz = 0; - } -#endif - exit: return xmit_frame; } diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index b1cbd7a..2f62e59 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -609,7 +609,6 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame) } ptable += index; -#if 1 if (psta != NULL) { if (GetRetry(pframe)) @@ -623,14 +622,6 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame) } psta->RxMgmtFrameSeqNum = precv_frame->u.hdr.attrib.seq_num; } -#else - - if(GetRetry(pframe)) - { - /* RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("drop due to decache!\n")); */ - /* return; */ - } -#endif #ifdef CONFIG_AP_MODE switch (GetFrameSubType(pframe)) diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 1771a8c..940cd5b 100755 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -770,11 +770,7 @@ void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv) /* accquire system's suspend lock preventing from falliing asleep while resume in workqueue */ rtw_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 468e5cc..9ed8f77 100755 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -1910,9 +1910,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; @@ -1989,136 +1987,6 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe) } -#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; - struct 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 { - RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("drop pkt due to invalid frame format!\n")); - 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); - RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("===pattrib->hdrlen: %x, pattrib->iv_len:%x ===\n", pattrib->hdrlen, pattrib->iv_len)); - - if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) - { - ptr += rmv_len ; - *ptr = 0x87; - *(ptr+1) = 0x12; - - /* back to original pointer */ - ptr -= rmv_len; - } - - ptr += rmv_len ; - - 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; - 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; */ - - /* if (piphdr->protocol == 0x06) */ - /* */ - /* RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("@@@===recv tcp len:%d @@@===\n", precvframe->u.hdr.len)); */ - /* */ - } - else if(eth_type==0x8712)/* append rx status for mp test packets */ - { - /* ptr -= 16; */ - /* memcpy(ptr, get_rxmem(precvframe), 16); */ - } - else - { -#ifdef PLATFORM_OS_XP - NDIS_PACKET_8021Q_INFO VlanPriInfo; - u3232 UserPriority = precvframe->u.hdr.attrib.priority; - u3232 VlanID = (pvlan!=NULL ? get_vlan_id(pvlan) : 0 ); - - VlanPriInfo.Value = /* Get current value. */ - NDIS_PER_PACKET_INFO_FROM_PACKET(precvframe->u.hdr.pkt, Ieee8021QInfo); - - VlanPriInfo.TagHeader.UserPriority = UserPriority; - VlanPriInfo.TagHeader.VlanId = VlanID ; - - VlanPriInfo.TagHeader.CanonicalFormatId = 0; /* Should be zero. */ - VlanPriInfo.TagHeader.Reserved = 0; /* Should be zero. */ - NDIS_PER_PACKET_INFO_FROM_PACKET(precvframe->u.hdr.pkt, Ieee8021QInfo) = VlanPriInfo.Value; -#endif - } - - if(eth_type==0x8712)/* append rx status for mp test packets */ - { - ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr)+2)-24); - memcpy(ptr, get_rxmem(precvframe), 24); - ptr+=24; - } - else - ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr)+2)); - - memcpy(ptr, pattrib->dst, ETH_ALEN); - memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN); - - eth_type = htons((unsigned short)eth_type) ; - memcpy(ptr+12, ð_type, 2); - -exit: - -; - - return ret; -} -#endif - - /* perform defrag */ static union recv_frame * recvframe_defrag(struct adapter *adapter,_queue *defrag_q) { @@ -2483,12 +2351,7 @@ int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe) /* 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 */ diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 8665e7b..423a0ef 100755 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -2489,11 +2489,7 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb) spin_unlock_bh(&padapter->br_ext_lock); } else - /* if (!priv->pmib->ethBrExtInfo.nat25_disable) */ { -/* 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)); @@ -2528,7 +2524,6 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb) } } spin_unlock_bh(&padapter->br_ext_lock); -#endif /* 1 */ if (do_nat25) { if (nat25_db_handle(padapter, skb, NAT25_CHECK) == 0) { diff --git a/hal/Hal8188ERateAdaptive.c b/hal/Hal8188ERateAdaptive.c index 53dd93d..aeb8944 100755 --- a/hal/Hal8188ERateAdaptive.c +++ b/hal/Hal8188ERateAdaptive.c @@ -620,7 +620,6 @@ ODM_RAInfo_Init( ) { PODM_RA_INFO_T pRaInfo = &pDM_Odm->RAInfo[MacID]; - #if 1 u8 WirelessMode=0xFF; /* invalid value */ u8 max_rate_idx = 0x13; /* MCS7 */ if(pDM_Odm->pWirelessMode!=NULL){ @@ -644,11 +643,6 @@ ODM_RAInfo_Init( pRaInfo->DecisionRate = max_rate_idx; pRaInfo->PreRate = max_rate_idx; pRaInfo->HighestRate=max_rate_idx; - #else - pRaInfo->DecisionRate = 0x13; - pRaInfo->PreRate = 0x13; - pRaInfo->HighestRate= 0x13; - #endif pRaInfo->LowestRate=0; pRaInfo->RateID=0; pRaInfo->RateMask=0xffffffff; diff --git a/hal/HalPhyRf_8188e.c b/hal/HalPhyRf_8188e.c index f1c0467..b300eb6 100755 --- a/hal/HalPhyRf_8188e.c +++ b/hal/HalPhyRf_8188e.c @@ -1790,7 +1790,6 @@ if (*(pDM_Odm->mp_mode) != 1) continue; tmpReg = APK_RF_init_value[path][index]; -#if 1 if(!pDM_Odm->RFCalibrateInfo.bAPKThermalMeterIgnore) { BB_offset = (tmpReg & 0xF0000) >> 16; @@ -1817,7 +1816,6 @@ if (*(pDM_Odm->mp_mode) != 1) } tmpReg = (tmpReg & 0xFFF0FFFF) | (BB_offset << 16); } -#endif ODM_SetRFReg(pDM_Odm, path, RF_IPA_A, bMaskDWord, 0x8992e); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0xc %x\n", PHY_QueryRFReg(pAdapter, path, RF_IPA_A, bMaskDWord))); diff --git a/hal/odm.c b/hal/odm.c index 2d9bb66..c6c89ce 100755 --- a/hal/odm.c +++ b/hal/odm.c @@ -1368,7 +1368,6 @@ odm_Adaptivity( ODM_SetBBReg(pDM_Odm, rFPGA0_XB_LSSIReadBack, 0xFFFF, ((u8)TH_H2L_dmc<<8) | (u8)TH_L2H_dmc); } -#if 1 void odm_DIGInit( IN PDM_ODM_T pDM_Odm @@ -1890,400 +1889,6 @@ odm_DigAbort( return false; } - -#else -void -odm_DIGInit( - IN PDM_ODM_T pDM_Odm - ) -{ - pDIG_T pDM_DigTable = &pDM_Odm->DM_DigTable; - - pDM_DigTable->CurIGValue = (u8) ODM_GetBBReg(pDM_Odm, ODM_REG(IGI_A,pDM_Odm), ODM_BIT(IGI,pDM_Odm)); - pDM_DigTable->RssiLowThresh = DM_DIG_THRESH_LOW; - pDM_DigTable->RssiHighThresh = DM_DIG_THRESH_HIGH; - pDM_DigTable->FALowThresh = DMfalseALARM_THRESH_LOW; - pDM_DigTable->FAHighThresh = DMfalseALARM_THRESH_HIGH; - if(pDM_Odm->BoardType & (ODM_BOARD_EXT_LNA | ODM_BOARD_EXT_PA)) - { - pDM_DigTable->rx_gain_range_max = DM_DIG_MAX_NIC; - pDM_DigTable->rx_gain_range_min = DM_DIG_MIN_NIC; - } - else - { - pDM_DigTable->rx_gain_range_max = DM_DIG_MAX_NIC; - pDM_DigTable->rx_gain_range_min = DM_DIG_MIN_NIC; - } - pDM_DigTable->BackoffVal = DM_DIG_BACKOFF_DEFAULT; - pDM_DigTable->BackoffVal_range_max = DM_DIG_BACKOFF_MAX; - pDM_DigTable->BackoffVal_range_min = DM_DIG_BACKOFF_MIN; - pDM_DigTable->PreCCK_CCAThres = 0xFF; - pDM_DigTable->CurCCK_CCAThres = 0x83; - pDM_DigTable->ForbiddenIGI = DM_DIG_MIN_NIC; - pDM_DigTable->LargeFAHit = 0; - pDM_DigTable->Recover_cnt = 0; - pDM_DigTable->DIG_Dynamic_MIN_0 =DM_DIG_MIN_NIC; - pDM_DigTable->DIG_Dynamic_MIN_1 = DM_DIG_MIN_NIC; - pDM_DigTable->bMediaConnect_0 = false; - pDM_DigTable->bMediaConnect_1 = false; - - /* To Initialize pDM_Odm->bDMInitialGainEnable == false to avoid DIG error */ - pDM_Odm->bDMInitialGainEnable = true; - -} - - -void -odm_DIG( - IN PDM_ODM_T pDM_Odm - ) -{ - - pDIG_T pDM_DigTable = &pDM_Odm->DM_DigTable; - Pfalse_ALARM_STATISTICS pFalseAlmCnt = &pDM_Odm->FalseAlmCnt; - pRXHP_T pRX_HP_Table = &pDM_Odm->DM_RXHP_Table; - u8 DIG_Dynamic_MIN; - u8 DIG_MaxOfMin; - bool FirstConnect, FirstDisConnect; - u8 dm_dig_max, dm_dig_min; - u8 CurrentIGI = pDM_DigTable->CurIGValue; - -#ifdef CONFIG_SPECIAL_SETTING_FOR_FUNAI_TV - if((pDM_Odm->bLinked) && (pDM_Odm->Adapter->registrypriv.force_igi !=0)) - { - printk("pDM_Odm->RSSI_Min=%d \n",pDM_Odm->RSSI_Min); - ODM_Write_DIG(pDM_Odm,pDM_Odm->Adapter->registrypriv.force_igi); - return; - } -#endif - ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG()==>\n")); - if((!(pDM_Odm->SupportAbility&ODM_BB_DIG)) ||(!(pDM_Odm->SupportAbility&ODM_BB_FA_CNT))) - { - ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() Return: SupportAbility ODM_BB_DIG or ODM_BB_FA_CNT is disabled\n")); - return; - } - - if(*(pDM_Odm->pbScanInProcess)) - { - ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() Return: In Scan Progress \n")); - return; - } - - /* add by Neil Chen to avoid PSD is processing */ - if(pDM_Odm->bDMInitialGainEnable == false) - { - ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() Return: PSD is Processing \n")); - return; - } - - if(pDM_Odm->SupportICType == ODM_RTL8192D) - { - if(*(pDM_Odm->pMacPhyMode) == ODM_DMSP) - { - if(*(pDM_Odm->pbMasterOfDMSP)) - { - DIG_Dynamic_MIN = pDM_DigTable->DIG_Dynamic_MIN_0; - FirstConnect = (pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_0 == false); - FirstDisConnect = (!pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_0 == true); - } - else - { - DIG_Dynamic_MIN = pDM_DigTable->DIG_Dynamic_MIN_1; - FirstConnect = (pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_1 == false); - FirstDisConnect = (!pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_1 == true); - } - } - else - { - if(*(pDM_Odm->pBandType) == ODM_BAND_5G) - { - DIG_Dynamic_MIN = pDM_DigTable->DIG_Dynamic_MIN_0; - FirstConnect = (pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_0 == false); - FirstDisConnect = (!pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_0 == true); - } - else - { - DIG_Dynamic_MIN = pDM_DigTable->DIG_Dynamic_MIN_1; - FirstConnect = (pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_1 == false); - FirstDisConnect = (!pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_1 == true); - } - } - } - else - { - DIG_Dynamic_MIN = pDM_DigTable->DIG_Dynamic_MIN_0; - FirstConnect = (pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_0 == false); - FirstDisConnect = (!pDM_Odm->bLinked) && (pDM_DigTable->bMediaConnect_0 == true); - } - - /* 1 Boundary Decision */ - if((pDM_Odm->SupportICType & (ODM_RTL8192C|ODM_RTL8723A)) && - ((if(pDM_Odm->BoardType & (ODM_BOARD_EXT_LNA | ODM_BOARD_EXT_PA))) || pDM_Odm->ExtLNA)) - { - if(pDM_Odm->SupportPlatform & (ODM_AP|ODM_ADSL)) - { - - dm_dig_max = DM_DIG_MAX_AP_HP; - dm_dig_min = DM_DIG_MIN_AP_HP; - } - else - { - dm_dig_max = DM_DIG_MAX_NIC_HP; - dm_dig_min = DM_DIG_MIN_NIC_HP; - } - DIG_MaxOfMin = DM_DIG_MAX_AP_HP; - } - else - { - if(pDM_Odm->SupportPlatform & (ODM_AP|ODM_ADSL)) - { - dm_dig_max = DM_DIG_MAX_AP; - dm_dig_min = DM_DIG_MIN_AP; - DIG_MaxOfMin = dm_dig_max; - } - else - { - dm_dig_max = DM_DIG_MAX_NIC; - dm_dig_min = DM_DIG_MIN_NIC; - DIG_MaxOfMin = DM_DIG_MAX_AP; - } - } - - - if(pDM_Odm->bLinked) - { - /* 2 8723A Series, offset need to be 10 */ - if(pDM_Odm->SupportICType==(ODM_RTL8723A)) - { - /* 2 Upper Bound */ - if(( pDM_Odm->RSSI_Min + 10) > DM_DIG_MAX_NIC ) - pDM_DigTable->rx_gain_range_max = DM_DIG_MAX_NIC; - else if(( pDM_Odm->RSSI_Min + 10) < DM_DIG_MIN_NIC ) - pDM_DigTable->rx_gain_range_max = DM_DIG_MIN_NIC; - else - pDM_DigTable->rx_gain_range_max = pDM_Odm->RSSI_Min + 10; - - /* 2 If BT is Concurrent, need to set Lower Bound */ - -#if(BT_30_SUPPORT == 1) - if(pDM_Odm->bBtBusy) - { - if(pDM_Odm->RSSI_Min>10) - { - if((pDM_Odm->RSSI_Min - 10) > DM_DIG_MAX_NIC) - DIG_Dynamic_MIN = DM_DIG_MAX_NIC; - else if((pDM_Odm->RSSI_Min - 10) < DM_DIG_MIN_NIC) - DIG_Dynamic_MIN = DM_DIG_MIN_NIC; - else - DIG_Dynamic_MIN = pDM_Odm->RSSI_Min - 10; - } - else - DIG_Dynamic_MIN=DM_DIG_MIN_NIC; - } - else -#endif - { - DIG_Dynamic_MIN=DM_DIG_MIN_NIC; - } - } - else - { - /* 2 Modify DIG upper bound */ - if((pDM_Odm->RSSI_Min + 20) > dm_dig_max ) - pDM_DigTable->rx_gain_range_max = dm_dig_max; - else if((pDM_Odm->RSSI_Min + 20) < dm_dig_min ) - pDM_DigTable->rx_gain_range_max = dm_dig_min; - else - pDM_DigTable->rx_gain_range_max = pDM_Odm->RSSI_Min + 20; - - - /* 2 Modify DIG lower bound */ - /* - if((pFalseAlmCnt->Cnt_all > 500)&&(DIG_Dynamic_MIN < 0x25)) - DIG_Dynamic_MIN++; - else if(((pFalseAlmCnt->Cnt_all < 500)||(pDM_Odm->RSSI_Min < 8))&&(DIG_Dynamic_MIN > dm_dig_min)) - DIG_Dynamic_MIN--; - */ - if(pDM_Odm->bOneEntryOnly) - { - if(pDM_Odm->RSSI_Min < dm_dig_min) - DIG_Dynamic_MIN = dm_dig_min; - else if (pDM_Odm->RSSI_Min > DIG_MaxOfMin) - DIG_Dynamic_MIN = DIG_MaxOfMin; - else - DIG_Dynamic_MIN = pDM_Odm->RSSI_Min; - ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() : bOneEntryOnly=true, DIG_Dynamic_MIN=0x%x\n",DIG_Dynamic_MIN)); - ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() : pDM_Odm->RSSI_Min=%d\n",pDM_Odm->RSSI_Min)); - } - /* 1 Lower Bound for 88E AntDiv */ - else if((pDM_Odm->SupportICType == ODM_RTL8188E)&&(pDM_Odm->SupportAbility & ODM_BB_ANT_DIV)) - { - if(pDM_Odm->AntDivType == CG_TRX_HW_ANTDIV) - { - DIG_Dynamic_MIN = (u8) pDM_DigTable->AntDiv_RSSI_max; - ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV, ODM_DBG_LOUD, ("odm_DIG(): pDM_DigTable->AntDiv_RSSI_max=%d \n",pDM_DigTable->AntDiv_RSSI_max)); - } - } - else - { - DIG_Dynamic_MIN=dm_dig_min; - } - } - } - else - { - pDM_DigTable->rx_gain_range_max = dm_dig_max; - DIG_Dynamic_MIN = dm_dig_min; - ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() : No Link\n")); - } - - /* 1 Modify DIG lower bound, deal with abnormally large false alarm */ - if(pFalseAlmCnt->Cnt_all > 10000) - { - ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("dm_DIG(): Abnornally false alarm case. \n")); - - if(pDM_DigTable->LargeFAHit != 3) - pDM_DigTable->LargeFAHit++; - if(pDM_DigTable->ForbiddenIGI < CurrentIGI)/* if(pDM_DigTable->ForbiddenIGI < pDM_DigTable->CurIGValue) */ - { - pDM_DigTable->ForbiddenIGI = CurrentIGI;/* pDM_DigTable->ForbiddenIGI = pDM_DigTable->CurIGValue; */ - pDM_DigTable->LargeFAHit = 1; - } - - if(pDM_DigTable->LargeFAHit >= 3) - { - if((pDM_DigTable->ForbiddenIGI+1) >pDM_DigTable->rx_gain_range_max) - pDM_DigTable->rx_gain_range_min = pDM_DigTable->rx_gain_range_max; - else - pDM_DigTable->rx_gain_range_min = (pDM_DigTable->ForbiddenIGI + 1); - pDM_DigTable->Recover_cnt = 3600; /* 3600=2hr */ - } - - } - else - { - /* Recovery mechanism for IGI lower bound */ - if(pDM_DigTable->Recover_cnt != 0) - pDM_DigTable->Recover_cnt --; - else - { - if(pDM_DigTable->LargeFAHit < 3) - { - if((pDM_DigTable->ForbiddenIGI -1) < DIG_Dynamic_MIN) /* DM_DIG_MIN) */ - { - pDM_DigTable->ForbiddenIGI = DIG_Dynamic_MIN; /* DM_DIG_MIN; */ - pDM_DigTable->rx_gain_range_min = DIG_Dynamic_MIN; /* DM_DIG_MIN; */ - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): Normal Case: At Lower Bound\n")); - } - else - { - pDM_DigTable->ForbiddenIGI --; - pDM_DigTable->rx_gain_range_min = (pDM_DigTable->ForbiddenIGI + 1); - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): Normal Case: Approach Lower Bound\n")); - } - } - else - { - pDM_DigTable->LargeFAHit = 0; - } - } - } - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): pDM_DigTable->LargeFAHit=%d\n",pDM_DigTable->LargeFAHit)); - - /* 1 Adjust initial gain by false alarm */ - if(pDM_Odm->bLinked) - { - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): DIG AfterLink\n")); - if(FirstConnect) - { - CurrentIGI = pDM_Odm->RSSI_Min; - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("DIG: First Connect\n")); - } - else - { - if(pDM_Odm->SupportICType == ODM_RTL8192D) - { - if(pFalseAlmCnt->Cnt_all > DM_DIG_FA_TH2_92D) - CurrentIGI = CurrentIGI + 2;/* pDM_DigTable->CurIGValue = pDM_DigTable->PreIGValue+2; */ - else if (pFalseAlmCnt->Cnt_all > DM_DIG_FA_TH1_92D) - CurrentIGI = CurrentIGI + 1; /* pDM_DigTable->CurIGValue = pDM_DigTable->PreIGValue+1; */ - else if(pFalseAlmCnt->Cnt_all < DM_DIG_FA_TH0_92D) - CurrentIGI = CurrentIGI - 1;/* pDM_DigTable->CurIGValue =pDM_DigTable->PreIGValue-1; */ - } - else - { -#if(BT_30_SUPPORT == 1) - if(pDM_Odm->bBtBusy) - { - if(pFalseAlmCnt->Cnt_all > 0x300) - CurrentIGI = CurrentIGI + 2; - else if (pFalseAlmCnt->Cnt_all > 0x250) - CurrentIGI = CurrentIGI + 1; - else if(pFalseAlmCnt->Cnt_all < DM_DIG_FA_TH0) - CurrentIGI = CurrentIGI -1; - } - else -#endif - { - if(pFalseAlmCnt->Cnt_all > DM_DIG_FA_TH2) - CurrentIGI = CurrentIGI + 4;/* pDM_DigTable->CurIGValue = pDM_DigTable->PreIGValue+2; */ - else if (pFalseAlmCnt->Cnt_all > DM_DIG_FA_TH1) - CurrentIGI = CurrentIGI + 2;/* pDM_DigTable->CurIGValue = pDM_DigTable->PreIGValue+1; */ - else if(pFalseAlmCnt->Cnt_all < DM_DIG_FA_TH0) - CurrentIGI = CurrentIGI - 2;/* pDM_DigTable->CurIGValue =pDM_DigTable->PreIGValue-1; */ - - - } - } - } - } - else - { - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): DIG BeforeLink\n")); - if(FirstDisConnect) - { - CurrentIGI = pDM_DigTable->rx_gain_range_min; - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): First DisConnect \n")); - } - else - { - /* 2012.03.30 LukeLee: enable DIG before link but with very high thresholds */ - if(pFalseAlmCnt->Cnt_all > 10000) - CurrentIGI = CurrentIGI + 2;/* pDM_DigTable->CurIGValue = pDM_DigTable->PreIGValue+2; */ - else if (pFalseAlmCnt->Cnt_all > 8000) - CurrentIGI = CurrentIGI + 1;/* pDM_DigTable->CurIGValue = pDM_DigTable->PreIGValue+1; */ - else if(pFalseAlmCnt->Cnt_all < 500) - CurrentIGI = CurrentIGI - 1;/* pDM_DigTable->CurIGValue =pDM_DigTable->PreIGValue-1; */ - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): England DIG \n")); - } - } - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): DIG End Adjust IGI\n")); - /* 1 Check initial gain by upper/lower bound */ -/* - if(pDM_DigTable->CurIGValue > pDM_DigTable->rx_gain_range_max) - pDM_DigTable->CurIGValue = pDM_DigTable->rx_gain_range_max; - if(pDM_DigTable->CurIGValue < pDM_DigTable->rx_gain_range_min) - pDM_DigTable->CurIGValue = pDM_DigTable->rx_gain_range_min; -*/ - if(CurrentIGI > pDM_DigTable->rx_gain_range_max) - CurrentIGI = pDM_DigTable->rx_gain_range_max; - if(CurrentIGI < pDM_DigTable->rx_gain_range_min) - CurrentIGI = pDM_DigTable->rx_gain_range_min; - - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): rx_gain_range_max=0x%x, rx_gain_range_min=0x%x\n", - pDM_DigTable->rx_gain_range_max, pDM_DigTable->rx_gain_range_min)); - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): TotalFA=%d\n", pFalseAlmCnt->Cnt_all)); - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): CurIGValue=0x%x\n", CurrentIGI)); - - /* 2 High power RSSI threshold */ - { - ODM_Write_DIG(pDM_Odm, CurrentIGI);/* ODM_Write_DIG(pDM_Odm, pDM_DigTable->CurIGValue); */ - pDM_DigTable->bMediaConnect_0 = pDM_Odm->bLinked; - pDM_DigTable->DIG_Dynamic_MIN_0 = DIG_Dynamic_MIN; - } - -} -#endif /* 3============================================================ */ /* 3 FASLE ALARM CHECK */ /* 3============================================================ */ @@ -3527,7 +3132,6 @@ odm_StaDefAntSel( ) { -#if 1 ODM_RT_TRACE(pDM_Odm, ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("odm_StaDefAntSelect==============>\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("OFDM_Ant1_Cnt:%d, OFDM_Ant2_Cnt:%d\n",OFDM_Ant1_Cnt,OFDM_Ant2_Cnt)); @@ -3562,21 +3166,11 @@ odm_StaDefAntSel( ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("TxAnt = %s\n",((*pDefAnt)==1)?"Ant1":"Ant2")); -#endif - /* u32 antsel = ODM_GetBBReg(pDM_Odm, 0xc88, bMaskByte0); */ - /* pDefAnt)= (u8) antsel; */ - - - - ODM_RT_TRACE(pDM_Odm, ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("<==============odm_StaDefAntSelect\n")); return true; - - } - void odm_SetRxIdleAnt( IN PDM_ODM_T pDM_Odm, @@ -3586,8 +3180,6 @@ odm_SetRxIdleAnt( { SWAT_T *pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table; - /* ODM_RT_TRACE(pDM_Odm, ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("odm_SetRxIdleAnt==============>\n")); */ - if(Ant != pDM_SWAT_Table->RxIdleAnt) { /* for path-A */ diff --git a/hal/odm.h b/hal/odm.h index 013299a..8deadb0 100755 --- a/hal/odm.h +++ b/hal/odm.h @@ -706,7 +706,6 @@ typedef enum tag_Bandwidth_Definition /* ODM_CMNINFO_CHNL */ /* ODM_CMNINFO_BOARD_TYPE */ -#if 1 typedef enum tag_Board_Definition { ODM_BOARD_DEFAULT = 0, /* The DEFAULT case. */ @@ -719,19 +718,6 @@ typedef enum tag_Board_Definition ODM_BOARD_EXT_PA_5G = BIT(6), /* 0 = no 5G ext-PA, 1 = existing 5G ext-PA */ ODM_BOARD_EXT_LNA_5G = BIT(7), /* 0 = no 5G ext-LNA, 1 = existing 5G ext-LNA */ }ODM_BOARD_TYPE_E; -#else -typedef enum tag_Board_Definition -{ - ODM_BOARD_NORMAL = 0, - ODM_BOARD_HIGHPWR = 1, - ODM_BOARD_MINICARD = 2, - ODM_BOARD_SLIM = 3, - ODM_BOARD_COMBO = 4, - -}ODM_BOARD_TYPE_E; -#endif - - /* ODM_CMNINFO_ONE_PATH_CCA */ typedef enum tag_CCA_Path @@ -765,7 +751,6 @@ typedef struct _ODM_RA_Info_ u16 RptTime; u8 RAWaitingCounter; u8 RAPendingCounter; -#if 1 /* POWER_TRAINING_ACTIVE == 1 For compile pass only~! */ u8 PTActive; /* on or off */ u8 PTTryState; /* 0 trying state, 1 for decision state */ u8 PTStage; /* 0~6 */ @@ -775,7 +760,6 @@ typedef struct _ODM_RA_Info_ u8 PTModeSS; /* decide whitch rate should do PT */ u8 RAstage; /* StageRA, decide how many times RA will be done between PT */ u8 PTSmoothFactor; -#endif } ODM_RA_INFO_T,*PODM_RA_INFO_T; typedef struct _IQK_MATRIX_REGS_SETTING{ diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index 63e9433..db51e2d 100755 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -854,9 +854,6 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state) struct P2P_PS_Offload_t *p2p_ps_offload = &pHalData->p2p_ps_offload; u8 i; -; - -#if 1 switch(p2p_ps_state) { case P2P_PS_DISABLE: @@ -930,10 +927,6 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state) } FillH2CCmd_88E(padapter, H2C_PS_P2P_OFFLOAD, 1, (u8 *)p2p_ps_offload); -#endif - -; - } #endif /* CONFIG_P2P */ diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 3893a84..bc08f78 100755 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -2533,21 +2533,17 @@ ReadChipVersion8188E( /* if DBG */ -#if 1 dump_chip_info(ChipVersion); -#endif pHalData->VersionID = ChipVersion; if (IS_1T2R(ChipVersion)){ pHalData->rf_type = RF_1T2R; pHalData->NumTotalRFPath = 2; - } - else if (IS_2T2R(ChipVersion)){ + } else if (IS_2T2R(ChipVersion)){ pHalData->rf_type = RF_2T2R; pHalData->NumTotalRFPath = 2; - } - else{ + } else{ pHalData->rf_type = RF_1T1R; pHalData->NumTotalRFPath = 1; } diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index 9f738c7..5f98538 100755 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -327,14 +327,11 @@ if (padapter->registrypriv.mp_mode == 0) data_rate =ODM_RA_GetDecisionRate_8188E(&pHalData->odmpriv,pattrib->mac_id); /* for debug */ - #if 1 if(padapter->fix_rate!= 0xFF){ data_rate = padapter->fix_rate; ptxdesc->txdw4 |= cpu_to_le32(DISDATAFB); - /* printk("==> fix data_rate:0x%02x\n",data_rate); */ } - #endif ptxdesc->txdw5 |= cpu_to_le32(data_rate & 0x3F); diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index cf7c2d9..281292e 100755 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -3001,7 +3001,6 @@ static u8 GetHalDefVar8188EUsb( switch(eVariable) { case HAL_DEF_UNDERCORATEDSMOOTHEDPWDB: -#if 1 /* trunk */ { struct mlme_priv *pmlmepriv = &Adapter->mlmepriv; struct sta_priv * pstapriv = &Adapter->stapriv; @@ -3012,14 +3011,6 @@ static u8 GetHalDefVar8188EUsb( *((int *)pValue) = psta->rssi_stat.UndecoratedSmoothedPWDB; } } -#else /* V4 branch */ - if(check_fwstate(&Adapter->mlmepriv, WIFI_STATION_STATE) == true){ - *((int *)pValue) = pHalData->dmpriv.UndecoratedSmoothedPWDB; - } - else{ - - } -#endif break; case HAL_DEF_IS_SUPPORT_ANT_DIV: *((u8 *)pValue) = (pHalData->AntDivCfg==0)?false:true; diff --git a/include/rtl8188e_hal.h b/include/rtl8188e_hal.h index 3c63f30..61926e6 100755 --- a/include/rtl8188e_hal.h +++ b/include/rtl8188e_hal.h @@ -66,8 +66,6 @@ #define DRVINFO_SZ 4 // unit is 8bytes #define PageNum_128(_Len) (u32)(((_Len)>>7) + ((_Len)&0x7F ? 1:0)) - -#if 1 // download firmware related data structure #define FW_8188E_SIZE 0x4000 //16384,16k #define FW_8188E_START_ADDRESS 0x1000 #define FW_8188E_END_ADDRESS 0x1FFF //0x5FFF @@ -128,7 +126,6 @@ typedef struct _RT_8188E_FIRMWARE_HDR u32 Rsvd4; u32 Rsvd5; }RT_8188E_FIRMWARE_HDR, *PRT_8188E_FIRMWARE_HDR; -#endif // download firmware related data structure #define DRIVER_EARLY_INT_TIME 0x05 diff --git a/include/rtw_br_ext.h b/include/rtw_br_ext.h index 0c7699a..641dd64 100755 --- 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 DBG_8192C @@ -28,9 +27,7 @@ #define DEBUG_WARN DBG_8192C #define DEBUG_INFO //DBG_8192C #define DEBUG_ERR DBG_8192C -//#define GET_MY_HWADDR ((GET_MIB(priv))->dot11OperationEntry.hwaddr) #define GET_MY_HWADDR(padapter) ((padapter)->eeprompriv.mac_addr) -#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 79ef70b..17d32d7 100755 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -444,16 +444,8 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl /* endif */ -#if 1 bss = cfg80211_inform_bss_frame(wiphy, notify_channel, (struct ieee80211_mgmt *)buf, 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)) { DBG_8192C(FUNC_ADPT_FMT" bss NULL\n", FUNC_ADPT_ARG(padapter)); goto exit; diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 8ce692c..3725561 100755 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1107,7 +1107,6 @@ int rtw_store_to_file(char *path, u8* buf, u32 sz) return ret>=0?ret:0; } -#if 1 /* ifdef MEM_ALLOC_REFINE_ADAPTOR */ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_priv) { struct net_device *pnetdev; @@ -1241,7 +1240,6 @@ error: return -1; } -#endif /* MEM_ALLOC_REFINE_ADAPTOR */ #ifdef CONFIG_PLATFORM_SPRD #ifdef do_div diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index d5fccd6..068caef 100755 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -300,14 +300,6 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame { int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb); if (nat25_handle_frame(padapter, skb) == -1) { - /* priv->ext_stats.rx_data_drops++; */ - /* DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n"); */ - /* return FAIL; */ -#if 1 - /* bypass this frame to upper layer!! */ -#else - goto _recv_indicatepkt_drop; -#endif } } diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index f302f36..33885b5 100755 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -1192,7 +1192,6 @@ static void dump_usb_interface(struct usb_interface *usb_intf) struct usb_host_endpoint *host_endp; struct usb_endpoint_descriptor *endp_desc; -#if 1 /* The usb device this usb interface belongs to */ DBG_871X("usb_interface:%p, usb_device:%p(num:%d, path:%s), usb_device_descriptor:%p\n", usb_intf, udev, udev->devnum, udev->devpath, dev_desc); DBG_871X("bLength:%u\n", dev_desc->bLength); DBG_871X("bDescriptorType:0x%02x\n", dev_desc->bDescriptorType); @@ -1208,10 +1207,7 @@ static void dump_usb_interface(struct usb_interface *usb_intf) DBG_871X("iProduct:0x%02x\n", dev_desc->iProduct); DBG_871X("iSerialNumber:0x%02x\n", dev_desc->iSerialNumber); DBG_871X("bNumConfigurations:%u\n", dev_desc->bNumConfigurations); -#endif - -#if 1 /* The acting usb_config_descriptor */ DBG_871X("\nact_conf_desc:%p\n", act_conf_desc); DBG_871X("bLength:%u\n", act_conf_desc->bLength); DBG_871X("bDescriptorType:0x%02x\n", act_conf_desc->bDescriptorType); @@ -1221,15 +1217,12 @@ static void dump_usb_interface(struct usb_interface *usb_intf) DBG_871X("iConfiguration:0x%02x\n", act_conf_desc->iConfiguration); DBG_871X("bmAttributes:0x%02x\n", act_conf_desc->bmAttributes); DBG_871X("bMaxPower=%u\n", act_conf_desc->bMaxPower); -#endif - DBG_871X("****** num of altsetting = (%d) ******/\n", usb_intf->num_altsetting); /* Get he host side alternate setting (the current alternate setting) for this interface*/ host_iface = usb_intf->cur_altsetting; iface_desc = &host_iface->desc; -#if 1 /* The current alternate setting*/ DBG_871X("\nusb_interface_descriptor:%p:\n", iface_desc); DBG_871X("bLength:%u\n", iface_desc->bLength); DBG_871X("bDescriptorType:0x%02x\n", iface_desc->bDescriptorType); @@ -1240,11 +1233,6 @@ static void dump_usb_interface(struct usb_interface *usb_intf) DBG_871X("bInterfaceSubClass=%x\n", iface_desc->bInterfaceSubClass); DBG_871X("bInterfaceProtocol=%x\n", iface_desc->bInterfaceProtocol); DBG_871X("iInterface=%x\n", iface_desc->iInterface); -#endif - - -#if 1 - /* DBG_871X("\ndump usb_endpoint_descriptor:\n"); */ for (i = 0; i < iface_desc->bNumEndpoints; i++) { @@ -1261,39 +1249,28 @@ static void dump_usb_interface(struct usb_interface *usb_intf) DBG_871X("wMaxPacketSize=%x\n",endp_desc->wMaxPacketSize); DBG_871X("wMaxPacketSize=%x\n",le16_to_cpu(endp_desc->wMaxPacketSize)); DBG_871X("bInterval=%x\n",endp_desc->bInterval); - /* DBG_871X("bRefresh=%x\n",pendp_desc->bRefresh); */ - /* DBG_871X("bSynchAddress=%x\n",pendp_desc->bSynchAddress); */ if (RT_usb_endpoint_is_bulk_in(endp_desc)) { DBG_871X("RT_usb_endpoint_is_bulk_in = %x\n", RT_usb_endpoint_num(endp_desc)); - /* pdvobjpriv->RtNumInPipes++; */ } else if (RT_usb_endpoint_is_int_in(endp_desc)) { DBG_871X("RT_usb_endpoint_is_int_in = %x, Interval = %x\n", RT_usb_endpoint_num(endp_desc),endp_desc->bInterval); - /* pdvobjpriv->RtNumInPipes++; */ } else if (RT_usb_endpoint_is_bulk_out(endp_desc)) { DBG_871X("RT_usb_endpoint_is_bulk_out = %x\n", RT_usb_endpoint_num(endp_desc)); - /* pdvobjpriv->RtNumOutPipes++; */ } - /* pdvobjpriv->ep_num[i] = RT_usb_endpoint_num(pendp_desc); */ } } - /* DBG_871X("nr_endpoint=%d, in_num=%d, out_num=%d\n\n", pdvobjpriv->nr_endpoint, pdvobjpriv->RtNumInPipes, pdvobjpriv->RtNumOutPipes); */ -#endif - if (udev->speed == USB_SPEED_HIGH) DBG_871X("USB_SPEED_HIGH\n"); else DBG_871X("NON USB_SPEED_HIGH\n"); - } - static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device_id *pdid) { int i; @@ -1302,7 +1279,6 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device struct dvobj_priv *dvobj; RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_drv_init\n")); - /* DBG_871X("+rtw_drv_init\n"); */ /* step 0. */ process_spec_devid(pdid); diff --git a/os_dep/xmit_linux.c b/os_dep/xmit_linux.c index e0f897b..163b268 100755 --- a/os_dep/xmit_linux.c +++ b/os_dep/xmit_linux.c @@ -101,13 +101,7 @@ void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib) /* skb_checksum_help(skb); */ } else if (ip->protocol == IPPROTO_UDP) { /* DBG_871X("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 { DBG_871X("%s-%d TCP CSUM offload Error!!\n", __FUNCTION__, __LINE__); WARN_ON(1); /* we need a WARN() */