#include <linux/module.h>\r
#include <linux/kernel.h>\r
-#include <linux/init.h> \r
-#include <linux/platform_device.h> \r
-#include <linux/delay.h> \r
-#include <linux/err.h> \r
-#include <linux/skbuff.h> \r
-#include <linux/wlan_plat.h> \r
+#include <linux/init.h>\r
+#include <linux/platform_device.h>\r
+#include <linux/delay.h>\r
+#include <linux/err.h>\r
+#include <linux/skbuff.h>\r
+#include <linux/wlan_plat.h>\r
\r
#define CONFIG_BROADCOM_WIFI_RESERVED_MEM\r
\r
#define WLAN_STATIC_SCAN_BUF0 5\r
#define WLAN_STATIC_SCAN_BUF1 6\r
#define WLAN_STATIC_DHD_INFO 7\r
-#define PREALLOC_WLAN_SEC_NUM 5\r
+#define WLAN_STATIC_DHD_WLFC_INFO 8\r
+#define PREALLOC_WLAN_SEC_NUM 6\r
#define PREALLOC_WLAN_BUF_NUM 160\r
#define PREALLOC_WLAN_SECTION_HEADER 24\r
\r
#define WLAN_SECTION_SIZE_2 (PREALLOC_WLAN_BUF_NUM * 512)\r
#define WLAN_SECTION_SIZE_3 (PREALLOC_WLAN_BUF_NUM * 1024)\r
#define WLAN_SECTION_SIZE_7 (PREALLOC_WLAN_BUF_NUM * 128)\r
+#define WLAN_SECTION_SIZE_8 (PREALLOC_WLAN_BUF_NUM * 512)\r
\r
#define DHD_SKB_HDRSIZE 336\r
#define DHD_SKB_1PAGE_BUFSIZE ((PAGE_SIZE*1)-DHD_SKB_HDRSIZE)\r
{NULL, (WLAN_SECTION_SIZE_1 + PREALLOC_WLAN_SECTION_HEADER)},\r
{NULL, (WLAN_SECTION_SIZE_2 + PREALLOC_WLAN_SECTION_HEADER)},\r
{NULL, (WLAN_SECTION_SIZE_3 + PREALLOC_WLAN_SECTION_HEADER)},\r
- {NULL, (WLAN_SECTION_SIZE_7 + PREALLOC_WLAN_SECTION_HEADER)}\r
+ {NULL, (WLAN_SECTION_SIZE_7 + PREALLOC_WLAN_SECTION_HEADER)},\r
+ {NULL, (WLAN_SECTION_SIZE_8 + PREALLOC_WLAN_SECTION_HEADER)}\r
};\r
\r
void *wlan_static_scan_buf0;\r
__FUNCTION__, section, wlan_mem_array[4].mem_ptr);\r
return wlan_mem_array[4].mem_ptr;\r
}\r
+ if (section == WLAN_STATIC_DHD_WLFC_INFO) {\r
+ printk("5 %s: section=%d, wlan_mem_array[5]=%p\n",\r
+ __FUNCTION__, section, wlan_mem_array[5].mem_ptr);\r
+ return wlan_mem_array[5].mem_ptr;\r
+ }\r
if ((section < 0) || (section > PREALLOC_WLAN_SEC_NUM)) {\r
- printk("5 %s: out of section %d\n", __FUNCTION__, section);\r
+ printk("6 %s: out of section %d\n", __FUNCTION__, section);\r
return NULL;\r
}\r
\r
if (wlan_mem_array[section].size < size) {\r
- printk("6 %s: wlan_mem_array[section].size=%lu, size=%lu\n",\r
+ printk("7 %s: wlan_mem_array[section].size=%lu, size=%lu\n",\r
__FUNCTION__, wlan_mem_array[section].size, size);\r
return NULL;\r
}\r
- printk("7 %s: wlan_mem_array[section].mem_ptr=%p, size=%lu\n",\r
+ printk("8 %s: wlan_mem_array[section].mem_ptr=%p, size=%lu\n",\r
__FUNCTION__, &wlan_mem_array[section], size);\r
\r
return wlan_mem_array[section].mem_ptr;\r
\r
EXPORT_SYMBOL(bcmdhd_mem_prealloc);\r
\r
-int bcmdhd_init_wlan_mem(void) \r
+int bcmdhd_init_wlan_mem(void)\r
{\r
int i;\r
int j;\r
for (i=0; i<8; i++) {\r
wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_1PAGE_BUFSIZE);\r
if (!wlan_static_skb[i])\r
- goto err_skb_alloc; \r
+ goto err_skb_alloc;\r
printk("1 %s: wlan_static_skb[%d]=%p, size=%lu\n",\r
__FUNCTION__, i, wlan_static_skb[i], DHD_SKB_1PAGE_BUFSIZE);\r
}\r
for (; i<16; i++) {\r
wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_2PAGE_BUFSIZE);\r
if (!wlan_static_skb[i])\r
- goto err_skb_alloc; \r
+ goto err_skb_alloc;\r
printk("2 %s: wlan_static_skb[%d]=%p, size=%lu\n",\r
__FUNCTION__, i, wlan_static_skb[i], DHD_SKB_2PAGE_BUFSIZE);\r
}\r
\r
wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_4PAGE_BUFSIZE);\r
if (!wlan_static_skb[i])\r
- goto err_skb_alloc; \r
+ goto err_skb_alloc;\r
printk("3 %s: wlan_static_skb[%d]=%p, size=%lu\n",\r
__FUNCTION__, i, wlan_static_skb[i], DHD_SKB_4PAGE_BUFSIZE);\r
\r
}\r
\r
wlan_static_scan_buf0 = kmalloc (65536, GFP_KERNEL);\r
- if(!wlan_static_scan_buf0)\r
+ if (!wlan_static_scan_buf0)\r
goto err_mem_alloc;\r
printk("5 %s: wlan_static_scan_buf0=%p, size=%d\n",\r
__FUNCTION__, wlan_static_scan_buf0, 65536);\r
\r
wlan_static_scan_buf1 = kmalloc (65536, GFP_KERNEL);\r
- if(!wlan_static_scan_buf1)\r
+ if (!wlan_static_scan_buf1)\r
goto err_mem_alloc;\r
printk("6 %s: wlan_static_scan_buf1=%p, size=%d\n",\r
__FUNCTION__, wlan_static_scan_buf1, 65536);\r