Wi-Fi Group: add esp8089 SDIO Wi-Fi support
authorlintao <lintao@rock-chips.com>
Wed, 24 Jul 2013 02:47:51 +0000 (10:47 +0800)
committerlintao <lintao@rock-chips.com>
Wed, 24 Jul 2013 02:47:51 +0000 (10:47 +0800)
arch/arm/mach-rk30/board-rk3168-tb-sdmmc-conifg.c
drivers/mmc/host/rk29_sdmmc.c
drivers/net/wireless/Kconfig
drivers/net/wireless/esp8089/Kconfig [new file with mode: 0755]
drivers/net/wireless/wifi_sys/rkwifi_sys_iface.c
net/mac80211/main.c

index 9626c1b80a8960f0ff7c942bc7d4999f99a3c6ec..ae5af8f869a338f39b996e69b9e9f8479f7b0a1c 100644 (file)
@@ -96,6 +96,10 @@ int rk31sdk_get_sdmmc0_pin_io_voltage(void)
        #define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE    GPIO_HIGH       
        #endif
 
+#elif defined(CONFIG_ESP8089)
+       #define RK30SDK_WIFI_GPIO_POWER_N               RK30_PIN3_PD0
+       #define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE    GPIO_HIGH
+
 #elif defined(CONFIG_MT6620)
     #define COMBO_MODULE_MT6620_CDT    1  // to control antsel2,antsel3 and gps_lan foot when using AcSip or Cdtech chip. 
                                              //- 1--use Cdtech chip; 0--unuse CDT chip
@@ -149,6 +153,8 @@ int rk31sdk_get_sdio_wifi_voltage(void)
     
 #elif defined(CONFIG_MT5931_MT6622)||defined(CONFIG_MT5931)
     voltage = 1800 ; //power 1800V
+#elif defined(CONFIG_ESP8089)
+       voltage = 3000 ; //power 3000V
 #elif defined(CONFIG_MT6620) 
     voltage = 2800 ; //power 2800V
 #elif defined(CONFIG_RDA5990)||defined(CONFIG_RTL8723AS)  
index a567829abc4acd6b9eb09ec772055f5109068f2a..3f4e7cc08b69b914c842900165c9dc97732d4ade 100755 (executable)
@@ -124,7 +124,7 @@ int debug_level = 5;
 //#define RK29_SDMMC_LIST_QUEUE            /* use list-queue for multi-card*/
 
 #define RK29_SDMMC_DEFAULT_SDIO_FREQ   0 // 1--run in default frequency(50Mhz); 0---run in 25Mhz, 
-#if defined(CONFIG_MT6620)
+#if defined(CONFIG_MT6620)|| defined(CONFIG_ESP8089)
 #define RK29_MAX_SDIO_FREQ   50000000    //set max-sdio-frequency 50Mhz in MTK module.
 #else
 #define RK29_MAX_SDIO_FREQ   25000000    //set max-sdio-frequency 25Mhz at the present time
index 6dc11f26463cfc95c69e3286b32b441b60c88a90..1a4e4a3dc0d29d399fa6c4c04a3c0b83abd8b9f3 100755 (executable)
@@ -118,6 +118,7 @@ source "drivers/net/wireless/rkusbwifi/rt5370/Kconfig"
 source "drivers/net/wireless/rkusbwifi/mt7601/Kconfig"
 source "drivers/net/wireless/ar6003/Kconfig"
 source "drivers/net/wireless/rtl8723as/Kconfig"
+source "drivers/net/wireless/esp8089/Kconfig"
 source "drivers/net/wireless/rkwifi/Kconfig"
 endchoice
 
diff --git a/drivers/net/wireless/esp8089/Kconfig b/drivers/net/wireless/esp8089/Kconfig
new file mode 100755 (executable)
index 0000000..5ee8bc6
--- /dev/null
@@ -0,0 +1,10 @@
+  config ESP8089
+      depends on WLAN_80211 && MMC
+      select WIRELESS_EXT
+      select WEXT_PRIV
+      select CFG80211
+      select NL80211_TESTMODE
+      bool "Espressif 8089 sdio Wi-Fi"
+      ---help---
+        Espressif 8089 sdio Wi-Fi support
+
index c36419b975bfc7372a6eca129db82115d649838d..ec2b1a74699f4b6f26a155aa6a270295b8c1f898 100755 (executable)
@@ -146,6 +146,14 @@ static ssize_t wifi_chip_read(struct class *cls, char *_buf)
     count = sprintf(_buf, "%s", "RTL8723AS");
     printk("Current WiFi chip is RTL8723AS.\n");
 #endif
+
+#ifdef CONFIG_ESP8089
+    count = sprintf(_buf, "%s", "ESP8089");
+    printk("Current WiFi chip is ESP8089.\n");
+#endif
+       
+       
+
 #endif
     return count;
 }
index 1e36fb3318cb6994a3298cd0024a253f18cb3cda..d64b6baa4715c09c014d0878ff2e702225df02e1 100644 (file)
@@ -931,6 +931,18 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
                                   "Failed to add default virtual iface\n");
        }
 
+       //add by lintao@rock-chips.com : register p2p0 IFTYPE_STA
+       #ifdef CONFIG_ESP8089 
+       if (local->hw.wiphy->interface_modes &(BIT(NL80211_IFTYPE_P2P_GO) | BIT(NL80211_IFTYPE_P2P_CLIENT))) {
+           result = ieee80211_if_add(local, "p2p%d", NULL,
+                             NL80211_IFTYPE_STATION, NULL);
+               if (result)
+                   wiphy_warn(local->hw.wiphy,
+                          "Failed to add default virtual iface\n");
+       }
+       
+       #endif
+
        rtnl_unlock();
 
        local->network_latency_notifier.notifier_call =