Commit 2891e908 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman
Browse files

Staging: rt2870: remove dead INF_AMAZON_SE code

parent 2074a80c
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
@@ -1194,21 +1194,6 @@ NTSTATUS RTUSB_VendorRequest(
		void	*tmpBuf = TransferBuffer;

		// Acquire Control token
#ifdef INF_AMAZON_SE
		//Semaphore fix INF_AMAZON_SE hang
		//pAd->UsbVendorReqBuf is the swap for DEVICE_VENDOR_REQUEST_IN to fix dma bug.
		ret = down_interruptible(&(pAd->UsbVendorReq_semaphore));
		if (pAd->UsbVendorReqBuf)
		{
			ASSERT(TransferBufferLength <MAX_PARAM_BUFFER_SIZE);

		   	tmpBuf = (void *)pAd->UsbVendorReqBuf;
		   	NdisZeroMemory(pAd->UsbVendorReqBuf, TransferBufferLength);

		   	if (RequestType == DEVICE_VENDOR_REQUEST_OUT)
		   	 NdisMoveMemory(tmpBuf, TransferBuffer, TransferBufferLength);
		}
#endif // INF_AMAZON_SE //
		do {
		if( RequestType == DEVICE_VENDOR_REQUEST_OUT)
			ret=usb_control_msg(pObj->pUsb_Dev, usb_sndctrlpipe( pObj->pUsb_Dev, 0 ), Request, RequestType, Value,Index, tmpBuf, TransferBufferLength, CONTROL_TIMEOUT_JIFFIES);
@@ -1227,12 +1212,6 @@ NTSTATUS RTUSB_VendorRequest(
			}
		} while((ret < 0) && (retryCount < MAX_RETRY_COUNT));

#ifdef INF_AMAZON_SE
	  	if ((pAd->UsbVendorReqBuf) && (RequestType == DEVICE_VENDOR_REQUEST_IN))
			NdisMoveMemory(TransferBuffer, tmpBuf, TransferBufferLength);
	  	up(&(pAd->UsbVendorReq_semaphore));
#endif // INF_AMAZON_SE //

        if (ret < 0) {
//			DBGPRINT(RT_DEBUG_ERROR, ("USBVendorRequest failed ret=%d \n",ret));
			DBGPRINT(RT_DEBUG_ERROR, ("RTUSB_VendorRequest failed(%d),TxFlags=0x%x, ReqType=%s, Req=0x%x, Index=0x%x\n",
+1 −22
Original line number Diff line number Diff line
@@ -349,13 +349,6 @@ int rt28xx_close(IN PNET_DEV dev)
	ba_reordering_resource_release(pAd);
#endif // DOT11_N_SUPPORT //

#ifdef RT2870
#ifdef INF_AMAZON_SE
	if (pAd->UsbVendorReqBuf)
		os_free_mem(pAd, pAd->UsbVendorReqBuf);
#endif // INF_AMAZON_SE //
#endif // RT2870 //

	RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_START_UP);

	return 0; // close ok
@@ -369,18 +362,6 @@ static int rt28xx_init(IN struct net_device *net_dev)
	NDIS_STATUS				Status;
	UINT32 		MacCsr0 = 0;

#ifdef RT2870
#ifdef INF_AMAZON_SE
	init_MUTEX(&(pAd->UsbVendorReq_semaphore));
	os_alloc_mem(pAd, (PUCHAR)&pAd->UsbVendorReqBuf, MAX_PARAM_BUFFER_SIZE - 1);
	if (pAd->UsbVendorReqBuf == NULL)
	{
		DBGPRINT(RT_DEBUG_ERROR, ("Allocate vendor request temp buffer failed!\n"));
		goto err0;
	}
#endif // INF_AMAZON_SE //
#endif // RT2870 //

#ifdef DOT11_N_SUPPORT
	// Allocate BA Reordering memory
	ba_reordering_resource_init(pAd, MAX_REORDERING_MPDU_NUM);
@@ -632,9 +613,7 @@ static int rt28xx_init(IN struct net_device *net_dev)

	// shall not set ml_priv to NULL here because the ml_priv didn't been free yet.
	//net_dev->ml_priv = 0;
#ifdef INF_AMAZON_SE
err0:
#endif // INF_AMAZON_SE //

	printk("!!! %s Initialized fail !!!\n", RT28xx_CHIP_NAME);
	return FALSE;
} /* End of rt28xx_init */
+1 −4
Original line number Diff line number Diff line
@@ -2497,10 +2497,7 @@ typedef struct _RTMP_ADAPTER
	struct semaphore			mlme_semaphore;			/* to sleep thread on	*/
	struct semaphore			RTUSBCmd_semaphore;		/* to sleep thread on	*/
	struct semaphore			RTUSBTimer_semaphore;
#ifdef INF_AMAZON_SE
	struct semaphore			UsbVendorReq_semaphore;
	PVOID						UsbVendorReqBuf;
#endif // INF_AMAZON_SE //

	struct completion			TimerQComplete;
	struct completion			mlmeComplete;
	struct completion			CmdQComplete;