add to support rt5370 usb wifi

This commit is contained in:
gwl
2012-11-12 12:44:22 +08:00
parent 50e2e37004
commit babfea4e01
7 changed files with 20 additions and 4 deletions

View File

@@ -246,7 +246,7 @@ static void rk29_sdmmc_set_iomux(int device_id, unsigned int bus_width)
#define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE GPIO_HIGH
#endif
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU) || defined(CONFIG_RT5370)
#if defined(CONFIG_MACH_RK2926_V86)
#define CONFIG_USB_WIFI_POWER_CONTROLED_BY_GPIO
#define RK30SDK_WIFI_GPIO_POWER_N RK2928_PIN0_PD3
@@ -358,7 +358,7 @@ static int rk29sdk_wifi_status_register(void (*callback)(int card_present, void
return 0;
}
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU) || defined(CONFIG_RT5370)
static int __init rk29sdk_wifi_bt_gpio_control_init(void)
{
return 0;
@@ -418,7 +418,7 @@ static int __init rk29sdk_wifi_bt_gpio_control_init(void)
}
#endif
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU) || defined(CONFIG_RT5370)
static int usbwifi_power_status = 1;
int rk29sdk_wifi_power(int on)
{

View File

@@ -479,7 +479,7 @@ struct platform_device pwm_regulator_device[1] = {
/***********************************************************
* usb wifi
************************************************************/
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU) || defined(CONFIG_RT5370)
static void rkusb_wifi_power(int on) {
struct regulator *ldo = NULL;

View File

@@ -89,6 +89,7 @@ choice
source "drivers/net/wireless/rkusbwifi/rtl8192cu/Kconfig"
source "drivers/net/wireless/rkusbwifi/rtl8188eu/Kconfig"
source "drivers/net/wireless/rkusbwifi/rt5370/Kconfig"
source "drivers/net/wireless/ar6003/Kconfig"
source "drivers/net/wireless/rkwifi/Kconfig"
endchoice

1
drivers/net/wireless/Makefile Normal file → Executable file
View File

@@ -7,6 +7,7 @@ obj-$(CONFIG_MV8686) += mv8686/
obj-$(CONFIG_BCM4319) += bcm4319/
obj-$(CONFIG_RTL8192CU) += rkusbwifi/
obj-$(CONFIG_RTL8188EU) += rkusbwifi/
obj-$(CONFIG_RT5370) += rkusbwifi/
obj-$(CONFIG_AR6003) += ar6003/
obj-$(CONFIG_RKWIFI) += rkwifi/
obj-$(CONFIG_RDA5990) += rda5990/

View File

@@ -7,6 +7,7 @@ rkcfg-y += $(rk_cfg)
obj-$(CONFIG_RTL8188EU) += rkcfg.o
obj-$(CONFIG_RTL8192CU) += rkcfg.o
obj-$(CONFIG_RT5370) += rkcfg.o
.PHONY: clean

View File

@@ -0,0 +1,8 @@
config RT5370
tristate "Mediatek RT5370 USB WiFi Support"
select WIRELESS_EXT
select WEXT_PRIV
select IEEE80211
---help---
Help message of RT5370

5
drivers/net/wireless/wifi_sys/rkwifi_sys_iface.c Normal file → Executable file
View File

@@ -43,6 +43,11 @@ static ssize_t wifi_chip_read(struct class *cls, char *_buf)
printk("Current WiFi chip is RK903.\n");
#endif
#ifdef CONFIG_RT5370
count = sprintf(_buf, "%s", "RT5370");
printk("Current WiFi chip is RT5370.\n");
#endif
return count;
}