AnsweredAssumed Answered

i.MX6Q SABRE can't load AP6335 wifi driver on Android 5.1

Question asked by li chen on Aug 11, 2016
Latest reply on May 19, 2017 by Madhu wesly

Hi All

 

our custom product is refer to i.MX6Q SABRE and the modifications are the wifi module, ddr, emmc, ours is AMPAK's AP6335 ,2GB ddr, 32GB emmc.

 

 

we are porting this module to Android 5.1 which use 3.14.52 kernel.

 

According to the  the wifi user  guide :

 

Power control and SDIO card detection

Fill WL_REG_ON GPIO pin number and implement card detection function to dhd_gpio.c as

following:

void bcm_wlan_power_on(int flag)

{

if (flag == 1) {

printk("======== PULL WL_REG_ON HIGH! ========\n");

gpio_set_value(WIFI_WL_REG_ON, 1);

mdelay(100);

printk("======== Card detection to detect SDIO card ========\n");

wifi_card_detect();

} else {

printk("======== PULL WL_REG_ON HIGH! (flag = %d) ========\n", flag);

gpio_set_value(WIFI_WL_REG_ON, 1);

}

}

 

when i use insmod command to load ther driver , I got the following information :

 

 

insmod system/lib/modules/cfg80211.ko

cfg80211: Calling CRDA to update world regulatory domain

insmod system/lib/modules/bcmdhd.ko                                            <

dhd_module_init: in

======== bcm_wlan_set_plat_data ========

GPIO(WL_HOST_WAKE) = GPIO_4_25

host_oob_irq: 281

host_oob_irq_flags=4

dhd_wifi_platform_load: Enter

Power-up adapter 'DHD generic adapter'

wifi_platform_set_power = 1

======== PULL WL_REG_ON HIGH! ========

======== Card detection to detect SDIO card ========

wifi_platform_bus_enumerate device present 1

failed to power up DHD generic adapter, 3 retry left

wifi_platform_set_power = 0

======== PULL WL_REG_ON LOW! ========

wifi_platform_bus_enumerate device present 0

wifi_platform_set_power = 1

======== PULL WL_REG_ON HIGH! ========

======== Card detection to detect SDIO card ========

wifi_platform_bus_enumerate device present 1

failed to power up DHD generic adapter, 2 retry left

wifi_platform_set_power = 0

======== PULL WL_REG_ON LOW! ========

wifi_platform_bus_enumerate device present 0

wifi_platform_set_power = 1

======== PULL WL_REG_ON HIGH! ========

 

... ...

 

======== PULL WL_REG_ON LOW! ========

wifi_platform_bus_enumerate device present 0

failed to power up DHD generic adapter, max retry reached**

unregister wifi platform drivers

wifi_platform_bus_enumerate device present 0

dhd_module_init: Failed to load the driver, try cnt 0

dhd_module_init: Failed to load driver max retry reached**

dhd_module_init: Exit err=-19

 

I wonder if the WiFi driver I used is too old to run properly on 3.14.52 kernel , I will attach it below ,about this driver ,the file I modified is dhd_gpio.c.

 

Best regards!

 

li chen.

Original Attachment has been moved to: ap6335_driver.tar.gz

Outcomes