UINT                    i=0, atemode;
        PRXD_STRUC              pRxD;
        PRTMP_TX_RING   pTxRing = &pAd->TxRing[QID_AC_BE];
-#ifndef UCOS
        NDIS_STATUS             Status = NDIS_STATUS_SUCCESS;
-#endif // UCOS //
 #ifdef RT_BIG_ENDIAN
     PTXD_STRUC      pDestTxD;
     TXD_STRUC       TxD;
        {
                ATEDBGPRINT(RT_DEBUG_TRACE, ("ATE: ATESTART\n"));
 
-#ifndef UCOS
                // check if we have removed the firmware
                if (!(ATE_ON(pAd)))
                {
                        NICEraseFirmware(pAd);
                }
-#endif // !UCOS //
+
                atemode = pAd->ate.Mode;
                pAd->ate.Mode = ATE_START;
 //             pAd->ate.TxDoneCount = pAd->ate.TxCount;
                //
 //      LinkDown(pAd, FALSE);
 //             AsicEnableBssSync(pAd);
-#ifndef UCOS
+
                netif_stop_queue(pAd->net_dev);
-#endif // !UCOS //
+
                //
                // If we skip "LinkDown()", we should disable protection
                // to prevent from sending out RTS or CTS-to-self.
                // Abort Tx, RX DMA.
                RtmpDmaEnable(pAd, 0);
 
-#ifndef UCOS
                pAd->ate.bFWLoading = TRUE;
                Status = NICLoadFirmware(pAd);
                if (Status != NDIS_STATUS_SUCCESS)
                        ATEDBGPRINT(RT_DEBUG_ERROR, ("NICLoadFirmware failed, Status[=0x%08x]\n", Status));
                        return FALSE;
                }
-#endif // !UCOS //
+
                pAd->ate.Mode = ATE_STOP;
 
 
 #ifdef CONFIG_STA_SUPPORT
                RTMPStationStart(pAd);
 #endif // CONFIG_STA_SUPPORT //
-#ifndef UCOS
+
                netif_start_queue(pAd->net_dev);
-#endif // !UCOS //
        }
        else if (!strcmp(arg, "TXCARR"))        // Tx Carrier
        {
                TRUE if all parameters are OK, FALSE otherwise
     ==========================================================================
 */
-#ifndef UCOS
 INT Set_ATE_Load_E2P_Proc(
        IN      PRTMP_ADAPTER   pAd,
        IN      PUCHAR                  arg)
     return ret;
 
 }
-#else
-INT Set_ATE_Load_E2P_Proc(
-       IN      PRTMP_ADAPTER   pAd,
-       IN      PUCHAR                  arg)
-{
-       USHORT                  WriteEEPROM[(EEPROM_SIZE/2)];
-       struct iwreq    *wrq = (struct iwreq *)arg;
-
-       ATEDBGPRINT(RT_DEBUG_TRACE, ("===> %s (wrq->u.data.length = %d)\n\n", __func__, wrq->u.data.length));
-
-       if (wrq->u.data.length != EEPROM_SIZE)
-       {
-               ate_print("%s: error length (=%d) from host\n",
-                          __func__, wrq->u.data.length);
-               return FALSE;
-       }
-       else/* (wrq->u.data.length == EEPROM_SIZE) */
-       {
-               /* zero the e2p buffer */
-               NdisZeroMemory((PUCHAR)WriteEEPROM, EEPROM_SIZE);
-
-               /* fill the local buffer */
-               NdisMoveMemory((PUCHAR)WriteEEPROM, wrq->u.data.pointer, wrq->u.data.length);
-
-               do
-               {
-                               /* write the content of .bin file to EEPROM */
-                               rt_ee_write_all(pAd, WriteEEPROM);
-
-               } while(FALSE);
-               }
-
-    ATEDBGPRINT(RT_DEBUG_TRACE, ("<=== %s\n", __func__));
-
-    return TRUE;
-
-}
-#endif // !UCOS //
 
 INT Set_ATE_Read_E2P_Proc(
        IN      PRTMP_ADAPTER   pAd,
 static VOID memcpy_exs(PRTMP_ADAPTER pAd, UCHAR *dst, UCHAR *src, ULONG len);
 static VOID RTMP_IO_READ_BULK(PRTMP_ADAPTER pAd, UCHAR *dst, UCHAR *src, UINT32 len);
 
-#ifdef UCOS
-int ate_copy_to_user(
-       IN PUCHAR payload,
-       IN PUCHAR msg,
-       IN INT    len)
-{
-       memmove(payload, msg, len);
-       return 0;
-}
-
-#undef copy_to_user
-#define copy_to_user(x,y,z) ate_copy_to_user((PUCHAR)x, (PUCHAR)y, z)
-#endif // UCOS //
-
 #define        LEN_OF_ARG 16
 
 VOID RtmpDoAte(
                // We will get this command either QA is closed or ated is killed by user.
                case RACFG_CMD_ATE_STOP:
                        {
-#ifndef UCOS
                                INT32 ret;
-#endif // !UCOS //
 
                                ATEDBGPRINT(RT_DEBUG_TRACE,("RACFG_CMD_ATE_STOP\n"));
 
                                        // kill ATE daemon when leaving ATE mode.
                                        // We must kill ATE daemon first before setting ATESTOP,
                                        // or Microsoft will report sth. wrong.
-#ifndef UCOS
                                        ret = KILL_THREAD_PID(pAdapter->ate.AtePid, SIGTERM, 1);
                                        if (ret)
                                        {
                                                ATEDBGPRINT(RT_DEBUG_ERROR, ("%s: unable to signal thread\n", pAdapter->net_dev->name));
                                        }
-#endif // !UCOS //
                                }
 
                                // AP might have in ATE_STOP mode due to cmd from QA.
 
 #ifndef __ATE_H__
 #define __ATE_H__
 
-#ifndef UCOS
 #define ate_print printk
 #define ATEDBGPRINT DBGPRINT
 #define EEPROM_SIZE                                                            0x200
 #define EEPROM_BIN_FILE_NAME  "/etc/Wireless/RT2860STA/e2p.bin"
 #endif // CONFIG_STA_SUPPORT //
 
-#else // !UCOS //
-#define fATE_LOAD_EEPROM                                               0x0C43
-#ifdef CONFIG_PRINTK
-extern INT ConsoleResponse(IN PUCHAR buff);
-extern int (*remote_display)(char *);
-extern void puts (const char *s);
-
-/* specificly defined to redirect and show ate-related messages to host. */
-/* Try to define ate_print as a macro. */
-#define ate_print(fmt, args...)                 \
-do{   int (*org_remote_display)(char *) = NULL;   \
-       org_remote_display = remote_display;\
-       /* Save original "remote_display" */\
-       remote_display = (int (*)(char *))ConsoleResponse;           \
-       printk(fmt, ## args);                       \
-       /* Restore the remote_display function pointer */        \
-       remote_display = org_remote_display; }while(0)
-
-#define ATEDBGPRINT(Level, Fmt)        \
-{                                   \
-    if ((Level) <= RTDebugLevel)      \
-    {                               \
-        ate_print Fmt;                                 \
-    }                               \
-}
-#endif // CONFIG_PRINTK //
-#endif // !UCOS //
-
 #define ATE_ON(_p)              (((_p)->ate.Mode) != ATE_STOP)
 
 /* RT2880_iNIC will define "RT2860". */
 /* RT2880_iNIC will define RT2860. */
 #define EEPROM_SIZE                                                            0x200
 /* iNIC has its own EEPROM_BIN_FILE_NAME */
-#ifndef UCOS
 #ifdef CONFIG_STA_SUPPORT
 #define EEPROM_BIN_FILE_NAME  "/etc/Wireless/RT2860STA/e2p.bin"
 #endif // CONFIG_STA_SUPPORT //
-#endif // !UCOS //
-
 
 
 VOID rt_ee_read_all(