diff options
Diffstat (limited to 'drivers/staging/rt2860')
-rw-r--r-- | drivers/staging/rt2860/md4.h | 42 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_linux.c | 2 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_linux.h | 46 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_main_dev.c | 6 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_profile.c | 6 | ||||
-rw-r--r-- | drivers/staging/rt2860/sta_ioctl.c | 7 |
6 files changed, 29 insertions, 80 deletions
diff --git a/drivers/staging/rt2860/md4.h b/drivers/staging/rt2860/md4.h deleted file mode 100644 index f1e5b526350a..000000000000 --- a/drivers/staging/rt2860/md4.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - ************************************************************************* - * Ralink Tech Inc. - * 5F., No.36, Taiyuan St., Jhubei City, - * Hsinchu County 302, - * Taiwan, R.O.C. - * - * (c) Copyright 2002-2007, Ralink Technology, Inc. - * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * * - ************************************************************************* - */ - -#ifndef __MD4_H__ -#define __MD4_H__ - -/* MD4 context. */ -typedef struct _MD4_CTX_ { - ULONG state[4]; /* state (ABCD) */ - ULONG count[2]; /* number of bits, modulo 2^64 (lsb first) */ - UCHAR buffer[64]; /* input buffer */ -} MD4_CTX; - -VOID MD4Init (MD4_CTX *); -VOID MD4Update (MD4_CTX *, PUCHAR, UINT); -VOID MD4Final (UCHAR [16], MD4_CTX *); - -#endif //__MD4_H__
\ No newline at end of file diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index 80176b20db07..7e4c2e41bc8d 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -776,7 +776,7 @@ VOID RTMPSendWirelessEvent( if (pAddr) pBufPtr += sprintf(pBufPtr, "(RT2860) STA(%02x:%02x:%02x:%02x:%02x:%02x) ", PRINT_MAC(pAddr)); else if (BssIdx < MAX_MBSSID_NUM) - pBufPtr += sprintf(pBufPtr, "(RT2860) BSS(ra%d) ", BssIdx); + pBufPtr += sprintf(pBufPtr, "(RT2860) BSS(wlan%d) ", BssIdx); else pBufPtr += sprintf(pBufPtr, "(RT2860) "); diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h index 85175c182432..b434824d932c 100644 --- a/drivers/staging/rt2860/rt_linux.h +++ b/drivers/staging/rt2860/rt_linux.h @@ -43,9 +43,6 @@ #include "rtmp_type.h" #include <linux/module.h> #include <linux/kernel.h> -#if !defined(RT2860) && !defined(RT30xx) -#include <linux/kthread.h> -#endif #include <linux/spinlock.h> #include <linux/init.h> @@ -93,22 +90,23 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_ // add by kathy -#ifdef RT2860 -#define STA_PROFILE_PATH "/etc/Wireless/RT2860STA/RT2860STA.dat" -#define STA_RTMP_FIRMWARE_FILE_NAME "/etc/Wireless/RT2860STA/RT2860STA.bin" -#define STA_NIC_DEVICE_NAME "RT2860STA" -#define STA_DRIVER_VERSION "1.8.1.1" -#endif -#ifdef RT2870 -#define STA_PROFILE_PATH "/etc/Wireless/RT2870STA/RT2870STA.dat" -#define STA_RT2870_IMAGE_FILE_NAME "/etc/Wireless/RT2870STA/rt2870.bin" -#define STA_NIC_DEVICE_NAME "RT2870STA" -#ifndef RT30xx -#define STA_DRIVER_VERSION "1.4.0.0" -#endif -#ifdef RT30xx -#define STA_DRIVER_VERSION "2.0.1.0" -#endif +/* order of "if defined()" is important, because for 3070 driver + both RT2870 and RT3070 are defined */ +#if defined(RT2860) + #define STA_PROFILE_PATH "/etc/Wireless/RT2860STA/RT2860STA.dat" + #define STA_RTMP_FIRMWARE_FILE_NAME "/etc/Wireless/RT2860STA/RT2860STA.bin" + #define STA_NIC_DEVICE_NAME "RT2860STA" + #define STA_DRIVER_VERSION "1.8.1.1" +#elif defined(RT3070) + #define STA_PROFILE_PATH "/etc/Wireless/RT3070STA/RT3070STA.dat" + #define STA_RT2870_IMAGE_FILE_NAME "/etc/Wireless/RT3070STA/rt2870.bin" + #define STA_NIC_DEVICE_NAME "RT3070STA" + #define STA_DRIVER_VERSION "2.0.1.0" +#elif defined(RT2870) + #define STA_PROFILE_PATH "/etc/Wireless/RT2870STA/RT2870STA.dat" + #define STA_RT2870_IMAGE_FILE_NAME "/etc/Wireless/RT2870STA/rt2870.bin" + #define STA_NIC_DEVICE_NAME "RT2870STA" + #define STA_DRIVER_VERSION "1.4.0.0" #endif #ifdef RT2860 @@ -166,9 +164,7 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_ #ifndef RT30xx typedef struct pid * THREAD_PID; -#ifdef RT2860 #define THREAD_PID_INIT_VALUE NULL -#endif #define GET_PID(_v) find_get_pid(_v) #define GET_PID_NUMBER(_v) pid_nr(_v) #define CHECK_PID_LEGALITY(_pid) if (pid_nr(_pid) >= 0) @@ -188,12 +184,12 @@ struct os_cookie { dma_addr_t pAd_pa; #endif #ifdef RT2870 - struct usb_device *pUsb_Dev; + struct usb_device *pUsb_Dev; #ifndef RT30xx - struct task_struct *MLMEThr_task; - struct task_struct *RTUSBCmdThr_task; - struct task_struct *TimerQThr_task; + THREAD_PID MLMEThr_pid; + THREAD_PID RTUSBCmdThr_pid; + THREAD_PID TimerQThr_pid; #endif #ifdef RT30xx struct pid *MLMEThr_pid; diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c index 35c59d5aa99c..495d5db0970c 100644 --- a/drivers/staging/rt2860/rt_main_dev.c +++ b/drivers/staging/rt2860/rt_main_dev.c @@ -190,7 +190,7 @@ int rt28xx_close(IN PNET_DEV dev) BOOLEAN Cancelled = FALSE; UINT32 i = 0; #ifdef RT2870 - DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup); + DECLARE_WAIT_QUEUE_HEAD_ONSTACK(unlink_wakeup); DECLARE_WAITQUEUE(wait, current); //RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_REMOVE_IN_PROGRESS); @@ -710,7 +710,7 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p // find available device name for (i = 0; i < 8; i++) { - sprintf(slot_name, "ra%d", i); + sprintf(slot_name, "wlan%d", i); device = dev_get_by_name(dev_net(dev), slot_name); if (device != NULL) @@ -727,7 +727,7 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p } else { - sprintf(dev->name, "ra%d", i); + sprintf(dev->name, "wlan%d", i); Status = NDIS_STATUS_SUCCESS; } diff --git a/drivers/staging/rt2860/rt_profile.c b/drivers/staging/rt2860/rt_profile.c index d92b14328d40..8c581c32dce1 100644 --- a/drivers/staging/rt2860/rt_profile.c +++ b/drivers/staging/rt2860/rt_profile.c @@ -710,7 +710,7 @@ static int rtmp_parse_key_buffer_from_file(IN PRTMP_ADAPTER pAd,IN char *buffe CipherAlg = CIPHER_WEP128; pAd->SharedKey[i][idx].CipherAlg = CipherAlg; - DBGPRINT(RT_DEBUG_TRACE, ("I/F(ra%d) Key%dStr=%s and type=%s\n", i, idx+1, keybuff, (KeyType == 0) ? "Hex":"Ascii")); + DBGPRINT(RT_DEBUG_TRACE, ("I/F(wlan%d) Key%dStr=%s and type=%s\n", i, idx+1, keybuff, (KeyType == 0) ? "Hex":"Ascii")); return 1; } else @@ -731,12 +731,12 @@ static int rtmp_parse_key_buffer_from_file(IN PRTMP_ADAPTER pAd,IN char *buffe CipherAlg = CIPHER_WEP128; pAd->SharedKey[i][idx].CipherAlg = CipherAlg; - DBGPRINT(RT_DEBUG_TRACE, ("I/F(ra%d) Key%dStr=%s and type=%s\n", i, idx+1, keybuff, (KeyType == 0) ? "Hex":"Ascii")); + DBGPRINT(RT_DEBUG_TRACE, ("I/F(wlan%d) Key%dStr=%s and type=%s\n", i, idx+1, keybuff, (KeyType == 0) ? "Hex":"Ascii")); return 1; } else {//Invalid key length - DBGPRINT(RT_DEBUG_ERROR, ("I/F(ra%d) Key%dStr is Invalid key length! KeyLen = %ld!\n", i, idx+1, KeyLen)); + DBGPRINT(RT_DEBUG_ERROR, ("I/F(wlan%d) Key%dStr is Invalid key length! KeyLen = %ld!\n", i, idx+1, KeyLen)); return 0; } } diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index eb0109ad2fc0..a4f22dfee573 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c @@ -531,12 +531,7 @@ rt_ioctl_giwname(struct net_device *dev, char *name, char *extra) { // PRTMP_ADAPTER pAdapter = dev->ml_priv; -#ifdef RT2860 - strncpy(name, "RT2860 Wireless", IFNAMSIZ); -#endif -#ifdef RT2870 - strncpy(name, "RT2870 Wireless", IFNAMSIZ); -#endif // RT2870 // + strncpy(name, RT28xx_CHIP_NAME " Wireless", IFNAMSIZ); return 0; } |