Commit 684c215d authored by Stephen Brennan's avatar Stephen Brennan Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192u: remove code under TO_DO_LIST



Several blocks of code are guarded by #ifdef TO_DO_LIST. If this is
defined, compilation fails. No machinery exists to define this, and no
documenation on the in-progress feature exists. Since this code is dead,
let's delete it.

Signed-off-by: default avatarStephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190823162410.10038-1-stephen@brennan.io


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 76fe9cfb
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1649,10 +1649,8 @@ struct ieee80211_device {
	struct list_head		Rx_TS_Pending_List;
	struct list_head		Rx_TS_Unused_List;
	struct rx_ts_record		RxTsRecord[TOTAL_TS_NUM];
//#ifdef TO_DO_LIST
	struct rx_reorder_entry	RxReorderEntry[128];
	struct list_head		RxReorder_Unused_List;
//#endif
	// Qos related. Added by Annie, 2005-11-01.
//	PSTA_QOS			pStaQos;
	u8				ForcedPriority;		// Force per-packet priority 1~7. (default: 0, not to force it.)
+0 −21
Original line number Diff line number Diff line
@@ -302,13 +302,6 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
	if (is_multicast_ether_addr(hdr->addr1))
		return;
	//check packet and mode later
#ifdef TO_DO_LIST
	if (pTcb->PacketLength >= 4096)
		return;
	// For RTL819X, if pairwisekey = wep/tkip, we don't aggrregation.
	if (!Adapter->HalFunc.GetNmodeSupportBySecCfgHandler(Adapter))
		return;
#endif
	if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) {
		return;
	}
@@ -509,20 +502,6 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
static void ieee80211_txrate_selectmode(struct ieee80211_device *ieee,
					struct cb_desc *tcb_desc)
{
#ifdef TO_DO_LIST
	if (!IsDataFrame(pFrame)) {
		pTcb->bTxDisableRateFallBack = true;
		pTcb->bTxUseDriverAssingedRate = true;
		pTcb->RATRIndex = 7;
		return;
	}

	if (pMgntInfo->ForcedDataRate != 0) {
		pTcb->bTxDisableRateFallBack = true;
		pTcb->bTxUseDriverAssingedRate = true;
		return;
	}
#endif
	if (ieee->bTxDisableRateFallBack)
		tcb_desc->bTxDisableRateFallBack = true;

+0 −4
Original line number Diff line number Diff line
@@ -93,10 +93,6 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)
	ieee->bTxDisableRateFallBack = 0;
	ieee->bTxUseDriverAssingedRate = 0;

#ifdef	TO_DO_LIST
	// 8190 only. Assign duration operation mode to firmware
	pMgntInfo->bTxEnableFwCalcDur = (BOOLEAN)pNdisCommon->bRegTxEnableFwCalcDur;
#endif
	/*
	 * 8190 only, Realtek proprietary aggregation mode
	 * Set MPDUDensity=2,   1: Set MPDUDensity=2(32k)  for Realtek AP and set MPDUDensity=0(8k) for others
+0 −4
Original line number Diff line number Diff line
@@ -180,14 +180,12 @@ void TSInitialize(struct ieee80211_device *ieee)
	}
	// Initialize unused Rx Reorder List.
	INIT_LIST_HEAD(&ieee->RxReorder_Unused_List);
//#ifdef TO_DO_LIST
	for (count = 0; count < REORDER_ENTRY_NUM; count++) {
		list_add_tail(&pRxReorderEntry->List, &ieee->RxReorder_Unused_List);
		if (count == (REORDER_ENTRY_NUM - 1))
			break;
		pRxReorderEntry = &ieee->RxReorderEntry[count + 1];
	}
//#endif
}

static void AdmitTS(struct ieee80211_device *ieee,
@@ -417,7 +415,6 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
	TsInitDelBA(ieee, pTs, TxRxSelect);

	if (TxRxSelect == RX_DIR) {
//#ifdef TO_DO_LIST
		struct rx_reorder_entry	*pRxReorderEntry;
		struct rx_ts_record     *pRxTS = (struct rx_ts_record *)pTs;
		if (timer_pending(&pRxTS->rx_pkt_pending_timer))
@@ -445,7 +442,6 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
			spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
		}

//#endif
	} else {
		struct tx_ts_record *pTxTS = (struct tx_ts_record *)pTs;
		del_timer_sync(&pTxTS->ts_add_ba_timer);
+4 −97
Original line number Diff line number Diff line
@@ -2076,14 +2076,6 @@ static void rtl8192_SetWirelessMode(struct net_device *dev, u8 wireless_mode)
			wireless_mode = WIRELESS_MODE_B;
		}
	}
#ifdef TO_DO_LIST
	/* TODO: this function doesn't work well at this time,
	 * we should wait for FPGA
	 */
	ActUpdateChannelAccessSetting(
			pAdapter, pHalData->CurrentWirelessMode,
			&pAdapter->MgntInfo.Info8185.ChannelAccessSetting);
#endif
	priv->ieee80211->mode = wireless_mode;

	if (wireless_mode == WIRELESS_MODE_N_24G ||
@@ -2159,12 +2151,6 @@ static int rtl8192_init_priv_variable(struct net_device *dev)

	priv->ieee80211->InitialGainHandler = InitialGain819xUsb;
	priv->card_type = USB;
#ifdef TO_DO_LIST
	if (Adapter->bInHctTest) {
		pHalData->ShortRetryLimit = 7;
		pHalData->LongRetryLimit = 7;
	}
#endif
	priv->ShortRetryLimit = 0x30;
	priv->LongRetryLimit = 0x30;
	priv->EarlyRxThreshold = 7;
@@ -2180,34 +2166,6 @@ static int rtl8192_init_priv_variable(struct net_device *dev)
		 * TRUE: SW provides them
		 */
		(false ? TCR_SAT : 0);
#ifdef TO_DO_LIST
	if (Adapter->bInHctTest)
		pHalData->ReceiveConfig =
			pHalData->CSMethod |
			/* accept management/data */
			RCR_AMF | RCR_ADF |
			/* accept control frame for SW
			 * AP needs PS-poll
			 */
			RCR_ACF |
			/* accept BC/MC/UC */
			RCR_AB | RCR_AM | RCR_APM |
			/* accept ICV/CRC error
			 * packet
			 */
			RCR_AICV | RCR_ACRC32 |
			/* Max DMA Burst Size per Tx
			 * DMA Burst, 7: unlimited.
			 */
			((u32)7 << RCR_MXDMA_OFFSET) |
			/* Rx FIFO Threshold,
			 * 7: No Rx threshold.
			 */
			(pHalData->EarlyRxThreshold << RCR_FIFO_OFFSET) |
			(pHalData->EarlyRxThreshold == 7 ? RCR_OnlyErlPkt : 0);
	else

#endif
	priv->ReceiveConfig	=
		/* accept management/data */
		RCR_AMF | RCR_ADF |
@@ -2665,19 +2623,10 @@ static void rtl8192_hwconfig(struct net_device *dev)
		regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
		break;
	case WIRELESS_MODE_AUTO:
#ifdef TO_DO_LIST
		if (Adapter->bInHctTest) {
			regBwOpMode = BW_OPMODE_20MHZ;
			regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
			regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
		} else
#endif
		{
		regBwOpMode = BW_OPMODE_20MHZ;
		regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG |
			  RATE_ALL_OFDM_1SS | RATE_ALL_OFDM_2SS;
		regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
		}
		break;
	case WIRELESS_MODE_N_24G:
		/* It support CCK rate by default. CCK rate will be filtered
@@ -2848,48 +2797,6 @@ static bool rtl8192_adapter_start(struct net_device *dev)
	}
	RT_TRACE(COMP_INIT, "%s():after firmware download\n", __func__);

#ifdef TO_DO_LIST
	if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
		if (pMgntInfo->RegRfOff) { /* User disable RF via registry. */
			RT_TRACE((COMP_INIT | COMP_RF), DBG_LOUD,
				 ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
			MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
			/* Those actions will be discard in MgntActSet_RF_State
			 * because of the same state
			 */
			for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
				PHY_SetRFReg(Adapter,
					     (enum rf90_radio_path_e)eRFPath,
					     0x4, 0xC00, 0x0);
		} else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) {
			/* H/W or S/W RF OFF before sleep. */
			RT_TRACE((COMP_INIT | COMP_RF), DBG_LOUD,
				 ("InitializeAdapter819xUsb(): Turn off RF for RfOffReason(%d) ----------\n",
				  pMgntInfo->RfOffReason));
			MgntActSet_RF_State(Adapter,
					    eRfOff,
					    pMgntInfo->RfOffReason);
		} else {
			pHalData->eRFPowerState = eRfOn;
			pMgntInfo->RfOffReason = 0;
			RT_TRACE((COMP_INIT | COMP_RF), DBG_LOUD,
				 ("InitializeAdapter819xUsb(): RF is on ----------\n"));
		}
	} else {
		if (pHalData->eRFPowerState == eRfOff) {
			MgntActSet_RF_State(Adapter,
					    eRfOff,
					    pMgntInfo->RfOffReason);
			/* Those actions will be discard in MgntActSet_RF_State
			 * because of the same state
			 */
			for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
				PHY_SetRFReg(Adapter,
					     (enum rf90_radio_path_e)eRFPath,
					     0x4, 0xC00, 0x0);
		}
	}
#endif
	/* config RF. */
	if (priv->ResetProgress == RESET_TYPE_NORESET) {
		rtl8192_phy_RFConfig(dev);
Loading