Commit 2eb457f2 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt2860: remove dead UCOS code

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 625ac67a
...@@ -1525,9 +1525,6 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet( ...@@ -1525,9 +1525,6 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(
{ {
#ifdef LINUX #ifdef LINUX
NdisMoveMemory(skb_push(pRxPkt, LENGTH_802_3), Header802_3, LENGTH_802_3); NdisMoveMemory(skb_push(pRxPkt, LENGTH_802_3), Header802_3, LENGTH_802_3);
#endif
#ifdef UCOS
NdisMoveMemory(net_pkt_push(pRxPkt, LENGTH_802_3), Header802_3, LENGTH_802_3);
#endif #endif
} }
#endif // CONFIG_STA_SUPPORT // #endif // CONFIG_STA_SUPPORT //
......
...@@ -1864,7 +1864,6 @@ CHAR *GetAuthMode(CHAR auth) ...@@ -1864,7 +1864,6 @@ CHAR *GetAuthMode(CHAR auth)
return "UNKNOW"; return "UNKNOW";
} }
#if 1 //#ifndef UCOS
/* /*
========================================================================== ==========================================================================
Description: Description:
...@@ -2072,7 +2071,6 @@ VOID RTMPIoctlGetMacTable( ...@@ -2072,7 +2071,6 @@ VOID RTMPIoctlGetMacTable(
kfree(msg); kfree(msg);
} }
#endif // UCOS //
#ifdef DOT11_N_SUPPORT #ifdef DOT11_N_SUPPORT
INT Set_BASetup_Proc( INT Set_BASetup_Proc(
......
...@@ -496,9 +496,7 @@ static INT ATECmdHandler( ...@@ -496,9 +496,7 @@ static INT ATECmdHandler(
UINT i=0, atemode; UINT i=0, atemode;
PRXD_STRUC pRxD; PRXD_STRUC pRxD;
PRTMP_TX_RING pTxRing = &pAd->TxRing[QID_AC_BE]; PRTMP_TX_RING pTxRing = &pAd->TxRing[QID_AC_BE];
#ifndef UCOS
NDIS_STATUS Status = NDIS_STATUS_SUCCESS; NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
#endif // UCOS //
#ifdef RT_BIG_ENDIAN #ifdef RT_BIG_ENDIAN
PTXD_STRUC pDestTxD; PTXD_STRUC pDestTxD;
TXD_STRUC TxD; TXD_STRUC TxD;
...@@ -523,13 +521,12 @@ static INT ATECmdHandler( ...@@ -523,13 +521,12 @@ static INT ATECmdHandler(
{ {
ATEDBGPRINT(RT_DEBUG_TRACE, ("ATE: ATESTART\n")); ATEDBGPRINT(RT_DEBUG_TRACE, ("ATE: ATESTART\n"));
#ifndef UCOS
// check if we have removed the firmware // check if we have removed the firmware
if (!(ATE_ON(pAd))) if (!(ATE_ON(pAd)))
{ {
NICEraseFirmware(pAd); NICEraseFirmware(pAd);
} }
#endif // !UCOS //
atemode = pAd->ate.Mode; atemode = pAd->ate.Mode;
pAd->ate.Mode = ATE_START; pAd->ate.Mode = ATE_START;
// pAd->ate.TxDoneCount = pAd->ate.TxCount; // pAd->ate.TxDoneCount = pAd->ate.TxCount;
...@@ -658,9 +655,9 @@ static INT ATECmdHandler( ...@@ -658,9 +655,9 @@ static INT ATECmdHandler(
// //
// LinkDown(pAd, FALSE); // LinkDown(pAd, FALSE);
// AsicEnableBssSync(pAd); // AsicEnableBssSync(pAd);
#ifndef UCOS
netif_stop_queue(pAd->net_dev); netif_stop_queue(pAd->net_dev);
#endif // !UCOS //
// //
// If we skip "LinkDown()", we should disable protection // If we skip "LinkDown()", we should disable protection
// to prevent from sending out RTS or CTS-to-self. // to prevent from sending out RTS or CTS-to-self.
...@@ -694,7 +691,6 @@ static INT ATECmdHandler( ...@@ -694,7 +691,6 @@ static INT ATECmdHandler(
// Abort Tx, RX DMA. // Abort Tx, RX DMA.
RtmpDmaEnable(pAd, 0); RtmpDmaEnable(pAd, 0);
#ifndef UCOS
pAd->ate.bFWLoading = TRUE; pAd->ate.bFWLoading = TRUE;
Status = NICLoadFirmware(pAd); Status = NICLoadFirmware(pAd);
if (Status != NDIS_STATUS_SUCCESS) if (Status != NDIS_STATUS_SUCCESS)
...@@ -702,7 +698,7 @@ static INT ATECmdHandler( ...@@ -702,7 +698,7 @@ static INT ATECmdHandler(
ATEDBGPRINT(RT_DEBUG_ERROR, ("NICLoadFirmware failed, Status[=0x%08x]\n", Status)); ATEDBGPRINT(RT_DEBUG_ERROR, ("NICLoadFirmware failed, Status[=0x%08x]\n", Status));
return FALSE; return FALSE;
} }
#endif // !UCOS //
pAd->ate.Mode = ATE_STOP; pAd->ate.Mode = ATE_STOP;
...@@ -777,9 +773,8 @@ static INT ATECmdHandler( ...@@ -777,9 +773,8 @@ static INT ATECmdHandler(
#ifdef CONFIG_STA_SUPPORT #ifdef CONFIG_STA_SUPPORT
RTMPStationStart(pAd); RTMPStationStart(pAd);
#endif // CONFIG_STA_SUPPORT // #endif // CONFIG_STA_SUPPORT //
#ifndef UCOS
netif_start_queue(pAd->net_dev); netif_start_queue(pAd->net_dev);
#endif // !UCOS //
} }
else if (!strcmp(arg, "TXCARR")) // Tx Carrier else if (!strcmp(arg, "TXCARR")) // Tx Carrier
{ {
...@@ -2078,7 +2073,6 @@ INT Set_ATE_Write_RF4_Proc( ...@@ -2078,7 +2073,6 @@ INT Set_ATE_Write_RF4_Proc(
TRUE if all parameters are OK, FALSE otherwise TRUE if all parameters are OK, FALSE otherwise
========================================================================== ==========================================================================
*/ */
#ifndef UCOS
INT Set_ATE_Load_E2P_Proc( INT Set_ATE_Load_E2P_Proc(
IN PRTMP_ADAPTER pAd, IN PRTMP_ADAPTER pAd,
IN PUCHAR arg) IN PUCHAR arg)
...@@ -2173,44 +2167,6 @@ INT Set_ATE_Load_E2P_Proc( ...@@ -2173,44 +2167,6 @@ INT Set_ATE_Load_E2P_Proc(
return ret; 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( INT Set_ATE_Read_E2P_Proc(
IN PRTMP_ADAPTER pAd, IN PRTMP_ADAPTER pAd,
...@@ -3590,20 +3546,6 @@ static VOID memcpy_exl(PRTMP_ADAPTER pAd, UCHAR *dst, UCHAR *src, ULONG len); ...@@ -3590,20 +3546,6 @@ static VOID memcpy_exl(PRTMP_ADAPTER pAd, UCHAR *dst, UCHAR *src, ULONG len);
static VOID memcpy_exs(PRTMP_ADAPTER pAd, UCHAR *dst, UCHAR *src, ULONG len); 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); 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 #define LEN_OF_ARG 16
VOID RtmpDoAte( VOID RtmpDoAte(
...@@ -3669,9 +3611,7 @@ VOID RtmpDoAte( ...@@ -3669,9 +3611,7 @@ VOID RtmpDoAte(
// We will get this command either QA is closed or ated is killed by user. // We will get this command either QA is closed or ated is killed by user.
case RACFG_CMD_ATE_STOP: case RACFG_CMD_ATE_STOP:
{ {
#ifndef UCOS
INT32 ret; INT32 ret;
#endif // !UCOS //
ATEDBGPRINT(RT_DEBUG_TRACE,("RACFG_CMD_ATE_STOP\n")); ATEDBGPRINT(RT_DEBUG_TRACE,("RACFG_CMD_ATE_STOP\n"));
...@@ -3708,13 +3648,11 @@ VOID RtmpDoAte( ...@@ -3708,13 +3648,11 @@ VOID RtmpDoAte(
// kill ATE daemon when leaving ATE mode. // kill ATE daemon when leaving ATE mode.
// We must kill ATE daemon first before setting ATESTOP, // We must kill ATE daemon first before setting ATESTOP,
// or Microsoft will report sth. wrong. // or Microsoft will report sth. wrong.
#ifndef UCOS
ret = KILL_THREAD_PID(pAdapter->ate.AtePid, SIGTERM, 1); ret = KILL_THREAD_PID(pAdapter->ate.AtePid, SIGTERM, 1);
if (ret) if (ret)
{ {
ATEDBGPRINT(RT_DEBUG_ERROR, ("%s: unable to signal thread\n", pAdapter->net_dev->name)); 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. // AP might have in ATE_STOP mode due to cmd from QA.
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#ifndef __ATE_H__ #ifndef __ATE_H__
#define __ATE_H__ #define __ATE_H__
#ifndef UCOS
#define ate_print printk #define ate_print printk
#define ATEDBGPRINT DBGPRINT #define ATEDBGPRINT DBGPRINT
#define EEPROM_SIZE 0x200 #define EEPROM_SIZE 0x200
...@@ -36,34 +35,6 @@ ...@@ -36,34 +35,6 @@
#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin" #define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin"
#endif // CONFIG_STA_SUPPORT // #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) #define ATE_ON(_p) (((_p)->ate.Mode) != ATE_STOP)
/* RT2880_iNIC will define "RT2860". */ /* RT2880_iNIC will define "RT2860". */
...@@ -132,12 +103,9 @@ do{ int (*org_remote_display)(char *) = NULL; \ ...@@ -132,12 +103,9 @@ do{ int (*org_remote_display)(char *) = NULL; \
/* RT2880_iNIC will define RT2860. */ /* RT2880_iNIC will define RT2860. */
#define EEPROM_SIZE 0x200 #define EEPROM_SIZE 0x200
/* iNIC has its own EEPROM_BIN_FILE_NAME */ /* iNIC has its own EEPROM_BIN_FILE_NAME */
#ifndef UCOS
#ifdef CONFIG_STA_SUPPORT #ifdef CONFIG_STA_SUPPORT
#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin" #define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin"
#endif // CONFIG_STA_SUPPORT // #endif // CONFIG_STA_SUPPORT //
#endif // !UCOS //
VOID rt_ee_read_all( VOID rt_ee_read_all(
......
...@@ -41,12 +41,6 @@ ...@@ -41,12 +41,6 @@
#define __RT_CONFIG_H__ #define __RT_CONFIG_H__
#include "rtmp_type.h" #include "rtmp_type.h"
#ifdef UCOS
#include "includes.h"
#include <stdio.h>
#include "rt_ucos.h"
#endif
#ifdef LINUX #ifdef LINUX
#include "rt_linux.h" #include "rt_linux.h"
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment