extern u8 *wifi_get_mac(void);
#ifdef CONFIG_DHD_USE_STATIC_BUF
+extern void *bcmdhd_mem_prealloc(int section, unsigned long size);
#endif /* CONFIG_DHD_USE_STATIC_BUF */
static int gpio_wl_reg_on = -1; // WL_REG_ON is input pin of WLAN module
#ifdef EXAMPLE_GET_MAC_VER2
/* EXAMPLE code */
{
- char mac[6] = {0x00,0x11,0x22,0x33,0x44,0xFF};
- char macpad[56]= {
- 0x00,0xaa,0x9c,0x84,0xc7,0xbc,0x9b,0xf6,
- 0x02,0x33,0xa9,0x4d,0x5c,0xb4,0x0a,0x5d,
- 0xa8,0xef,0xb0,0xcf,0x8e,0xbf,0x24,0x8a,
- 0x87,0x0f,0x6f,0x0d,0xeb,0x83,0x6a,0x70,
- 0x4a,0xeb,0xf6,0xe6,0x3c,0xe7,0x5f,0xfc,
- 0x0e,0xa7,0xb3,0x0f,0x00,0xe4,0x4a,0xaf,
- 0x87,0x08,0x16,0x6d,0x3a,0xe3,0xc7,0x80};
- bcopy(mac, buf, sizeof(mac));
- bcopy(macpad, buf+6, sizeof(macpad));
+ char mac[6] = {0x00,0x11,0x22,0x33,0x44,0xFF};
+ char macpad[56]= {
+ 0x00,0xaa,0x9c,0x84,0xc7,0xbc,0x9b,0xf6,
+ 0x02,0x33,0xa9,0x4d,0x5c,0xb4,0x0a,0x5d,
+ 0xa8,0xef,0xb0,0xcf,0x8e,0xbf,0x24,0x8a,
+ 0x87,0x0f,0x6f,0x0d,0xeb,0x83,0x6a,0x70,
+ 0x4a,0xeb,0xf6,0xe6,0x3c,0xe7,0x5f,0xfc,
+ 0x0e,0xa7,0xb3,0x0f,0x00,0xe4,0x4a,0xaf,
+ 0x87,0x08,0x16,0x6d,0x3a,0xe3,0xc7,0x80};
+ bcopy(mac, buf, sizeof(mac));
+ bcopy(macpad, buf+6, sizeof(macpad));
}
#endif /* EXAMPLE_GET_MAC_VER2 */
bcopy((char *)wifi_get_mac(), buf, sizeof(struct ether_addr));
return err;
}
-#ifdef CONFIG_DHD_USE_STATIC_BUF
-extern void *bcmdhd_mem_prealloc(int section, unsigned long size);
-void* bcm_wlan_prealloc(int section, unsigned long size)
-{
- void *alloc_ptr = NULL;
- alloc_ptr = bcmdhd_mem_prealloc(section, size);
- if (alloc_ptr) {
- printf("success alloc section %d, size %ld\n", section, size);
- if (size != 0L)
- bzero(alloc_ptr, size);
- return alloc_ptr;
- }
- printf("can't alloc section %d\n", section);
- return NULL;
-}
-#endif
#if !defined(WL_WIRELESS_EXT)
struct cntry_locales_custom {
.set_carddetect = dhd_wlan_set_carddetect,
.get_mac_addr = dhd_wlan_get_mac_addr,
#ifdef CONFIG_DHD_USE_STATIC_BUF
- .mem_prealloc = bcm_wlan_prealloc,
+ .mem_prealloc = bcmdhd_mem_prealloc,
#endif /* CONFIG_DHD_USE_STATIC_BUF */
.get_country_code = dhd_wlan_get_country_code,
};