diff options
author | Ziyan <jaraidaniel@gmail.com> | 2016-06-06 11:27:56 +0200 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-06-06 11:37:18 +0200 |
commit | 2075a8aa23cf47db5dafdc096858805abee683af (patch) | |
tree | dd8ff01cdfd8640fe20a25e60b92cab02798631a /arch | |
parent | d8cb0c27f90b9d6f9cd2652a0d830ffb7a350163 (diff) | |
download | kernel_samsung_espresso10-2075a8aa23cf47db5dafdc096858805abee683af.zip kernel_samsung_espresso10-2075a8aa23cf47db5dafdc096858805abee683af.tar.gz kernel_samsung_espresso10-2075a8aa23cf47db5dafdc096858805abee683af.tar.bz2 |
espresso: wifi: remove old CONFIG_DHD_USE_STATIC_BUF support
This is probably broken, and it's very unlikely that we'll ever need it.
Change-Id: I93f46a8d1bbd5d6ac5f16a93daff6e7f8add10fb
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-espresso-wifi.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/arch/arm/mach-omap2/board-espresso-wifi.c b/arch/arm/mach-omap2/board-espresso-wifi.c index 8faad70..123811f 100644 --- a/arch/arm/mach-omap2/board-espresso-wifi.c +++ b/arch/arm/mach-omap2/board-espresso-wifi.c @@ -24,7 +24,6 @@ #include <linux/io.h> #include <asm/setup.h> #include <linux/if.h> -#include <linux/skbuff.h> #include <linux/wlan_plat.h> #include <linux/pm_runtime.h> #include <linux/regulator/machine.h> @@ -41,72 +40,6 @@ #define GPIO_WLAN_HOST_WAKE 81 #define GPIO_WLAN_EN 104 -#ifdef CONFIG_DHD_USE_STATIC_BUF -#define WLAN_STATIC_SCAN_BUF0 5 -#define WLAN_STATIC_SCAN_BUF1 6 -#define PREALLOC_WLAN_NUMBER_OF_SECTIONS 4 -#define PREALLOC_WLAN_NUMBER_OF_BUFFERS 160 -#define PREALLOC_WLAN_SECTION_HEADER 24 - -#define WLAN_SECTION_SIZE_0 (PREALLOC_WLAN_NUMBER_OF_BUFFERS * 128) -#define WLAN_SECTION_SIZE_1 (PREALLOC_WLAN_NUMBER_OF_BUFFERS * 128) -#define WLAN_SECTION_SIZE_2 (PREALLOC_WLAN_NUMBER_OF_BUFFERS * 512) -#define WLAN_SECTION_SIZE_3 (PREALLOC_WLAN_NUMBER_OF_BUFFERS * 1024) - -#define DHD_SKB_HDRSIZE 336 -#define DHD_SKB_1PAGE_BUFSIZE ((PAGE_SIZE*1)-DHD_SKB_HDRSIZE) -#define DHD_SKB_2PAGE_BUFSIZE ((PAGE_SIZE*2)-DHD_SKB_HDRSIZE) -#define DHD_SKB_4PAGE_BUFSIZE ((PAGE_SIZE*4)-DHD_SKB_HDRSIZE) - -#define WLAN_SKB_BUF_NUM 16 - -static struct sk_buff *wlan_static_skb[WLAN_SKB_BUF_NUM]; - -struct wifi_mem_prealloc { - void *mem_ptr; - unsigned long size; -} wifi_mem_prealloc_t; - -static wifi_mem_prealloc_t wifi_mem_array[PREALLOC_WLAN_NUMBER_OF_SECTIONS] = { - { NULL, (WLAN_SECTION_SIZE_0 + PREALLOC_WLAN_SECTION_HEADER) }, - { NULL, (WLAN_SECTION_SIZE_1 + PREALLOC_WLAN_SECTION_HEADER) }, - { NULL, (WLAN_SECTION_SIZE_2 + PREALLOC_WLAN_SECTION_HEADER) }, - { NULL, (WLAN_SECTION_SIZE_3 + PREALLOC_WLAN_SECTION_HEADER) } -}; - -static void *espresso_wifi_mem_prealloc(int section, unsigned long size) -{ - if (section == PREALLOC_WLAN_NUMBER_OF_SECTIONS) - return wlan_static_skb; - if ((section < 0) || (section > PREALLOC_WLAN_NUMBER_OF_SECTIONS)) - return NULL; - if (wifi_mem_array[section].size < size) - return NULL; - return wifi_mem_array[section].mem_ptr; -} -#endif - -int __init espresso_init_wifi_mem(void) -{ -#ifdef CONFIG_DHD_USE_STATIC_BUF - int i; - - for(i=0;( i < WLAN_SKB_BUF_NUM );i++) { - if (i < (WLAN_SKB_BUF_NUM/2)) - wlan_static_skb[i] = dev_alloc_skb(4096); - else - wlan_static_skb[i] = dev_alloc_skb(8192); - } - for(i=0;( i < PREALLOC_WLAN_NUMBER_OF_SECTIONS );i++) { - wifi_mem_array[i].mem_ptr = kmalloc(wifi_mem_array[i].size, - GFP_KERNEL); - if (wifi_mem_array[i].mem_ptr == NULL) - return -ENOMEM; - } -#endif - return 0; -} - #define WLC_CNTRY_BUF_SZ 4 /* wifi private data */ @@ -345,11 +278,6 @@ static struct wifi_platform_data espresso_wifi_control = { .set_power = espresso_wifi_power, .set_reset = espresso_wifi_reset, .set_carddetect = espresso_wifi_set_carddetect, -#ifdef CONFIG_DHD_USE_STATIC_BUF - .mem_prealloc = espresso_wifi_mem_prealloc, -#else - .mem_prealloc = NULL, -#endif .get_mac_addr = espresso_wifi_get_mac_addr, .get_country_code = espresso_wifi_get_country_code, }; @@ -380,7 +308,6 @@ void __init omap4_espresso_wifi_init(void) { pr_debug("%s\n", __func__); espresso_wlan_gpio(); - espresso_init_wifi_mem(); platform_device_register(&omap_vwlan_device); platform_device_register(&espresso_wifi_device); |