mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
net: wireless: rockchip_wlan: ap6255: fix irq abnormal.
the dmesg log is like: [11244.133855] Call trace: [11244.133871] Exception stack(0xffffffc075cdf820 to 0xffffffc075cdf950) [11244.133885] f820: ffffffc07b7d6040 0000008000000000 000000000169f000 ffffff80089174c4 [11244.133899] f840: 00000000804001c5 ffffff800940b1e0 0000000000000000 ffffff80091ec000 [11244.133913] f860: 0000000000000040 ffffff8008bf7000 0000000000000140 ffffff80091ec000 [11244.133924] f880: ffffff800938a830 cb88537fdc8ba653 ffffffc075cdf8e0 ffffff80080f28ec [11244.133935] f8a0: ffffffc075cdf8b0 ffffff80080eabf0 ffffffc075cdf8e0 ffffff80080f29f8 [11244.133949] f8c0: ffffffc075cdf8e0 ffffff80080f2a28 ffffff800938a830 cb88537fdc8ba653 [11244.133963] f8e0: ffffffc07b41e400 0000000000000000 0000000000000000 0000000086098608 [11244.133975] f900: 0000000000000000 0000000000000000 00000000fffffffa ffffffc07b050580 [11244.133988] f920: ffffff80082fb318 7f7f7f7f7f7f7f7f 722d6367636c6261 7f7f7f7f7f7f7f7f [11244.133998] f940: 0101010101010101 0000000000000010 [11244.134024] [<ffffff80089174c4>] clk_core_disable+0x18/0x18c [11244.134039] [<ffffff80089178f0>] clk_disable+0x2c/0x40 [11244.134064] [<ffffff80083ab5a4>] rockchip_irq_gc_mask_set_bit+0x20/0x2c [11244.134086] [<ffffff80080f7788>] irq_shutdown+0x4c/0x68 [11244.134098] [<ffffff80080f556c>] __free_irq+0x100/0x20c [11244.134109] [<ffffff80080f5708>] free_irq+0x48/0x58 [11244.134129] [<ffffff80085c274c>] bcmsdh_oob_intr_unregister+0x8c/0xa0 [11244.134143] [<ffffff80085d1184>] dhd_bus_devreset+0x84/0x2c4 [11244.134166] [<ffffff80085a1754>] dhd_net_bus_devreset+0xc4/0x104 [11244.134190] [<ffffff80085b5aec>] wl_android_wifi_off+0xb8/0x10c [11244.134205] [<ffffff80085a5560>] dhd_stop+0x6c/0x1d0 [11244.134227] [<ffffff80089bdb14>] __dev_close_many+0x9c/0xc0 [11244.134237] [<ffffff80089bdc5c>] __dev_close+0x38/0x68 [11244.134253] [<ffffff80089c6170>] __dev_change_flags+0xa8/0x140 [11244.134264] [<ffffff80089c6228>] dev_change_flags+0x20/0x5c [11244.134290] [<ffffff8008a621a0>] devinet_ioctl+0x29c/0x60c [11244.134304] [<ffffff8008a63a70>] inet_ioctl+0xc0/0xec [11244.134327] [<ffffff80089a50f4>] sock_do_ioctl+0x30/0x5c [11244.134341] [<ffffff80089a63c0>] sock_ioctl+0x2d8/0x314 [11244.134365] [<ffffff80081c6fb8>] do_vfs_ioctl+0x5e4/0x720 [11244.134377] [<ffffff80081c7154>] SyS_ioctl+0x60/0x88 [11244.134400] [<ffffff8008082930>] el0_svc_naked+0x24/0x28 Change-Id: I93cffbf170e96ccb71da53123f61c78f0ffdc98a Signed-off-by: Alex Zhao <zzc@rock-chips.com>
This commit is contained in:
@@ -51,6 +51,9 @@ extern void dhdsdio_isr(void * args);
|
||||
#include <linux/platform_data/gpio-odin.h>
|
||||
#endif /* defined(CONFIG_ARCH_ODIN) */
|
||||
#include <dhd_linux.h>
|
||||
#include <linux/rfkill-wlan.h>
|
||||
|
||||
extern int get_wifi_chip_type(void);
|
||||
|
||||
/* driver info, initialized when bcmsdh_register is called */
|
||||
static bcmsdh_driver_t drvinfo = {NULL, NULL, NULL, NULL};
|
||||
@@ -333,6 +336,7 @@ int bcmsdh_oob_intr_register(bcmsdh_info_t *bcmsdh, bcmsdh_cb_fn_t oob_irq_handl
|
||||
void* oob_irq_handler_context)
|
||||
{
|
||||
int err = 0;
|
||||
int type;
|
||||
bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
|
||||
|
||||
SDLX_MSG(("%s: Enter\n", __FUNCTION__));
|
||||
@@ -365,6 +369,9 @@ int bcmsdh_oob_intr_register(bcmsdh_info_t *bcmsdh, bcmsdh_cb_fn_t oob_irq_handl
|
||||
return err;
|
||||
}
|
||||
|
||||
type = get_wifi_chip_type();
|
||||
if (type == WIFI_AP6255)
|
||||
bcmsdh_oob_intr_set(bcmsdh, FALSE);
|
||||
#if defined(DISABLE_WOWLAN)
|
||||
SDLX_MSG(("%s: disable_irq_wake\n", __FUNCTION__));
|
||||
bcmsdh_osinfo->oob_irq_wake_enabled = FALSE;
|
||||
|
||||
@@ -73,6 +73,10 @@ if (chip == WIFI_AP6234) {
|
||||
sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_AP6234.txt");
|
||||
}
|
||||
|
||||
if (chip == WIFI_AP6255) {
|
||||
sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_bcm43455c0_ag.bin");
|
||||
sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_ap6255.txt");
|
||||
}
|
||||
if (chip == WIFI_AP6441) {
|
||||
sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_bcm43341b0_ag.bin");
|
||||
sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_AP6441.txt");
|
||||
|
||||
@@ -46,7 +46,12 @@ static ssize_t wifi_chip_read(struct class *cls, struct class_attribute *attr, c
|
||||
count = sprintf(_buf, "%s", "AP6234");
|
||||
printk("Current WiFi chip is AP6234.\n");
|
||||
}
|
||||
|
||||
|
||||
if (type == WIFI_AP6255) {
|
||||
count = sprintf(_buf, "%s", "AP6255");
|
||||
printk("Current WiFi chip is AP6255.\n");
|
||||
}
|
||||
|
||||
if(type == WIFI_AP6330) {
|
||||
count = sprintf(_buf, "%s", "AP6330");
|
||||
printk("Current WiFi chip is AP6330.\n");
|
||||
|
||||
@@ -49,6 +49,7 @@ enum {
|
||||
WIFI_AP6210,
|
||||
WIFI_AP6212,
|
||||
WIFI_AP6234,
|
||||
WIFI_AP6255,
|
||||
WIFI_AP6330,
|
||||
WIFI_AP6335,
|
||||
WIFI_AP6354,
|
||||
|
||||
@@ -115,7 +115,9 @@ int get_wifi_chip_type(void)
|
||||
} else if (strcmp(wifi_chip_type_string, "ap6181") == 0) {
|
||||
type = WIFI_AP6181;
|
||||
} else if (strcmp(wifi_chip_type_string, "ap6234") == 0) {
|
||||
type = WIFI_AP6234;
|
||||
type = WIFI_AP6234;
|
||||
} else if (strcmp(wifi_chip_type_string, "ap6255") == 0) {
|
||||
type = WIFI_AP6255;
|
||||
} else if (strcmp(wifi_chip_type_string, "ap6330") == 0) {
|
||||
type = WIFI_AP6330;
|
||||
} else if (strcmp(wifi_chip_type_string, "ap6335") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user