Staging: rt2870: remove dead INF_AMAZON_SE code
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 26 Apr 2009 14:05:34 +0000 (16:05 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:46 +0000 (11:00 -0700)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rt2870/common/rtusb_io.c
drivers/staging/rt2870/rt_main_dev.c
drivers/staging/rt2870/rtmp.h

index 7587e4d..3c4d418 100644 (file)
@@ -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",
index 87d7c78..1c8ea2a 100644 (file)
@@ -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 @@ err1:
 
        // 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 */
index 5e22a3a..f27c610 100644 (file)
@@ -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;