From 65626cd9b8da7d0b0c7d76a462ce4c5812e90079 Mon Sep 17 00:00:00 2001 From: gwl Date: Tue, 4 Mar 2014 11:41:01 +0800 Subject: [PATCH] wifi: change some function name to be more formal. --- .../rkwifi/bcmdhd/dhd_custom_gpio.c | 4 +-- .../rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c | 10 +++---- .../rtl8188eu/os_dep/linux/usb_intf.c | 8 +++--- include/linux/rfkill-wlan.h | 10 +++---- net/rfkill/rfkill-wlan.c | 27 ++++++++++--------- 5 files changed, 30 insertions(+), 29 deletions(-) diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_gpio.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_gpio.c index 6f1d1d6a4a84..39b7be94e8da 100644 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_gpio.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_gpio.c @@ -165,7 +165,7 @@ dhd_customer_gpio_wlan_ctrl(int onoff) #ifdef GET_CUSTOM_MAC_ENABLE #if defined(CUSTOMER_HW) -int rk29sdk_wifi_mac_addr(unsigned char *buf); +int rockchip_wifi_mac_addr(unsigned char *buf); #endif /* Function to get custom MAC address */ int @@ -183,7 +183,7 @@ dhd_custom_get_mac_address(unsigned char *buf) #endif #if defined(CUSTOMER_HW) - ret = rk29sdk_wifi_mac_addr(buf); + ret = rockchip_wifi_mac_addr(buf); #endif #ifdef EXAMPLE_GET_MAC diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c index 2b5e9b3a9904..7cd273097d34 100644 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c @@ -43,17 +43,17 @@ int bcm_wlan_get_oob_irq(void) } #endif -extern int rk29sdk_wifi_power(int on); +extern int rockchip_wifi_power(int on); void bcm_wlan_power_on(int flag) { if (flag == 1) { printk("======== PULL WL_REG_ON HIGH! ========\n"); - rk29sdk_wifi_power(1); + rockchip_wifi_power(1); msleep(100); } else { printk("======== PULL WL_REG_ON HIGH! (flag = %d) ========\n", flag); - rk29sdk_wifi_power(1); + rockchip_wifi_power(1); msleep(100); } } @@ -62,10 +62,10 @@ void bcm_wlan_power_off(int flag) { if (flag == 1) { printk("======== Card detection to remove SDIO card! ========\n"); - rk29sdk_wifi_power(0); + rockchip_wifi_power(0); } else { printk("======== PULL WL_REG_ON LOW! (flag = %d) ========\n", flag); - rk29sdk_wifi_power(0); + rockchip_wifi_power(0); } } diff --git a/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/usb_intf.c index c101b805c7e6..cf43875cca70 100755 --- a/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/usb_intf.c +++ b/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/usb_intf.c @@ -1939,7 +1939,7 @@ static void rtw_drv_halt(void) } #include "wifi_version.h" -extern int rk29sdk_wifi_power(int on); +extern int rockchip_wifi_power(int on); static int __init rockchip_wifi_init_module(void) { @@ -1948,9 +1948,9 @@ static int __init rockchip_wifi_init_module(void) printk("==== Launching Wi-Fi driver! (Powered by Rockchip) ====\n"); printk("=======================================================\n"); printk("Realtek 8188EU USB WiFi driver (Powered by Rockchip,Ver %s) init.\n", RTL8192_DRV_VERSION); - rk29sdk_wifi_power(0); + rockchip_wifi_power(0); msleep(100); - rk29sdk_wifi_power(1); + rockchip_wifi_power(1); return rtw_drv_entry(); } @@ -1963,7 +1963,7 @@ static void __exit rockchip_wifi_exit_module(void) printk("=======================================================\n"); printk("Realtek 8188EU USB WiFi driver (Powered by Rockchip,Ver %s) init.\n", RTL8192_DRV_VERSION); rtw_drv_halt(); - rk29sdk_wifi_power(0); + rockchip_wifi_power(0); } late_initcall(rockchip_wifi_init_module); diff --git a/include/linux/rfkill-wlan.h b/include/linux/rfkill-wlan.h index 58f2958c4220..d7fcba686231 100755 --- a/include/linux/rfkill-wlan.h +++ b/include/linux/rfkill-wlan.h @@ -38,9 +38,9 @@ struct rksdmmc_gpio_wifi_moudle { struct rksdmmc_gpio GPS_LAN; //pin33--GPS_LAN }; -void *rk29sdk_mem_prealloc(int section, unsigned long size); -int rk29sdk_wifi_power(int on); -int rk29sdk_wifi_reset(int on); -int rk29sdk_wifi_mac_addr(unsigned char *buf); -void *rk29sdk_wifi_country_code(char *ccode); +void *rockchip_mem_prealloc(int section, unsigned long size); +int rockchip_wifi_power(int on); +int rockchip_wifi_reset(int on); +int rockchip_wifi_mac_addr(unsigned char *buf); +void *rockchip_wifi_country_code(char *ccode); #endif diff --git a/net/rfkill/rfkill-wlan.c b/net/rfkill/rfkill-wlan.c index 8f2694b46804..8f475149962e 100755 --- a/net/rfkill/rfkill-wlan.c +++ b/net/rfkill/rfkill-wlan.c @@ -121,7 +121,7 @@ static struct wifi_mem_prealloc wifi_mem_array[5] = { {NULL, (WLAN_SECTION_SIZE_5 + PREALLOC_WLAN_SECTION_HEADER)} }; -static int __init rk29sdk_init_wifi_mem(void) +static int __init rockchip_init_wifi_mem(void) { int i; int j; @@ -156,7 +156,7 @@ err_skb_alloc: return -ENOMEM; } -void *rk29sdk_mem_prealloc(int section, unsigned long size) +void *rockchip_mem_prealloc(int section, unsigned long size) { if (section == PREALLOC_WLAN_SEC_NUM) return wlan_static_skb; @@ -173,9 +173,9 @@ void *rk29sdk_mem_prealloc(int section, unsigned long size) return wifi_mem_array[section].mem_ptr; } #else -void *rk29sdk_mem_prealloc(int section, unsigned long size) { return NULL;} +void *rockchip_mem_prealloc(int section, unsigned long size) { return NULL;} #endif -EXPORT_SYMBOL(rk29sdk_mem_prealloc); +EXPORT_SYMBOL(rockchip_mem_prealloc); /************************************************************************** * @@ -184,7 +184,7 @@ EXPORT_SYMBOL(rk29sdk_mem_prealloc); * 1 -> power on * *************************************************************************/ -int rk29sdk_wifi_power(int on) +int rockchip_wifi_power(int on) { struct rfkill_wlan_data *mrfkill = g_rfkill; struct rksdmmc_gpio *poweron, *reset; @@ -261,18 +261,18 @@ int rk29sdk_wifi_power(int on) return 0; } -EXPORT_SYMBOL(rk29sdk_wifi_power); +EXPORT_SYMBOL(rockchip_wifi_power); /************************************************************************** * * Wifi Reset Func * *************************************************************************/ -int rk29sdk_wifi_reset(int on) +int rockchip_wifi_reset(int on) { return 0; } -EXPORT_SYMBOL(rk29sdk_wifi_reset); +EXPORT_SYMBOL(rockchip_wifi_reset); /************************************************************************** * @@ -282,7 +282,7 @@ EXPORT_SYMBOL(rk29sdk_wifi_reset); #include u8 wifi_custom_mac_addr[6] = {0,0,0,0,0,0}; extern char GetSNSectorInfo(char * pbuf); -int rk29sdk_wifi_mac_addr(unsigned char *buf) +int rockchip_wifi_mac_addr(unsigned char *buf) { char mac_buf[20] = {0}; LOG("%s: enter.\n", __func__); @@ -322,7 +322,7 @@ int rk29sdk_wifi_mac_addr(unsigned char *buf) #endif return 0; } -EXPORT_SYMBOL(rk29sdk_wifi_mac_addr); +EXPORT_SYMBOL(rockchip_wifi_mac_addr); /************************************************************************** * @@ -337,7 +337,7 @@ struct cntry_locales_custom { static struct cntry_locales_custom country_cloc; -void *rk29sdk_wifi_country_code(char *ccode) +void *rockchip_wifi_country_code(char *ccode) { struct cntry_locales_custom *mcloc; @@ -348,6 +348,7 @@ void *rk29sdk_wifi_country_code(char *ccode) return mcloc; } +EXPORT_SYMBOL(rockchip_wifi_country_code); /**************************************************************************/ static int rfkill_rk_setup_gpio(struct rksdmmc_gpio *gpio, const char* prefix, const char* name) @@ -548,7 +549,7 @@ static int rfkill_wlan_probe(struct platform_device *pdev) } #if BCM_STATIC_MEMORY_SUPPORT - rk29sdk_init_wifi_mem(); + rockchip_init_wifi_mem(); #endif #if defined(CONFIG_HAS_EARLYSUSPEND) @@ -624,7 +625,7 @@ static struct of_device_id wlan_platdata_of_match[] = { { .compatible = "wlan-platdata" }, { } }; -MODULE_DEVICE_TABLE(of, pwm_backlight_of_match); +MODULE_DEVICE_TABLE(of, wlan_platdata_of_match); #endif //CONFIG_OF static struct platform_driver rfkill_wlan_driver = { -- 2.34.1