summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarson Jiang <larson.jiang@amlogic.com>2017-11-15 01:30:52 -0800
committerGerrit Code Review <gituser@scgit.amlogic.com>2017-11-15 01:30:54 -0800
commit5a2f23074fd2cd66cf3e933ba7ae1f2d92e47655 (patch)
tree9e9823753b766dafe6b642d8dfe56a5f08dc3cb9
parenta6bb23fd533f71ed2360fc1e38d5a20f172c2b38 (diff)
parent2c5c9123d6292c44bfa71a6298d3ddcfe201cf8c (diff)
downloaddhd-driver-5a2f23074fd2cd66cf3e933ba7ae1f2d92e47655.tar.gz
Merge "PD#153826 wifi: fix p2p go connect fail issue" into m-amlogic
-rw-r--r--bcmdhd.1.363.59.144.x.cn/dhd_gpio.c41
-rw-r--r--bcmdhd.1.363.59.144.x.cn/wl_cfg80211.c4
2 files changed, 15 insertions, 30 deletions
diff --git a/bcmdhd.1.363.59.144.x.cn/dhd_gpio.c b/bcmdhd.1.363.59.144.x.cn/dhd_gpio.c
index 8b9c665..c29d771 100644
--- a/bcmdhd.1.363.59.144.x.cn/dhd_gpio.c
+++ b/bcmdhd.1.363.59.144.x.cn/dhd_gpio.c
@@ -30,6 +30,7 @@ extern int wifi_irq_num(void);
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
@@ -178,17 +179,17 @@ static int dhd_wlan_get_mac_addr(unsigned char *buf)
#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));
@@ -199,22 +200,6 @@ static int dhd_wlan_get_mac_addr(unsigned char *buf)
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 {
@@ -284,7 +269,7 @@ struct wifi_platform_data dhd_wlan_control = {
.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,
};
diff --git a/bcmdhd.1.363.59.144.x.cn/wl_cfg80211.c b/bcmdhd.1.363.59.144.x.cn/wl_cfg80211.c
index bc997a0..62be3d3 100644
--- a/bcmdhd.1.363.59.144.x.cn/wl_cfg80211.c
+++ b/bcmdhd.1.363.59.144.x.cn/wl_cfg80211.c
@@ -7748,9 +7748,9 @@ static s32 wl_cfg80211_bcn_set_params(
memcpy(cfg->hostapd_ssid.SSID, info->ssid, info->ssid_len);
cfg->hostapd_ssid.SSID_len = info->ssid_len;
} else {
- /* P2P GO */
+ /* P2P GO */
memset(cfg->p2p->ssid.SSID, 0x00, DOT11_MAX_SSID_LEN);
- memcpy(cfg->p2p->ssid.SSID, info->ssid, cfg->p2p->ssid.SSID_len);
+ memcpy(cfg->p2p->ssid.SSID, info->ssid, info->ssid_len);
cfg->p2p->ssid.SSID_len = info->ssid_len;
}
}