wifi驱动移植
1、在终端通过wireless-tool 可以加载驱动,加载网卡,加载网卡时候有个错误(dhd_preinit_ioctls wl ampdu_hostreorder failed -23)
2、在终端可以扫描到周围热点,也可以连接上,通过udhcp -i 可以获取到ip,可以ping 通手机热点。
3、在上层,android界面可以看到扫描到热点,也可以连接上(通过打印可以连接上),通过dhcp获取ip也正常。
4、android界面一直是获取ip,就断开,然后在扫描,连接,获取ip,在断开 ,循环
log 内容包括
1、驱动的加载的log
2、网卡启动的log
3、手动启动dhcp -d 时候的log (底层驱动打印的,上层打印的)
4、通过界面连接启动时候android上层的打印
1/*********************************************驱动加载log***************************************/
[ 107.677860] dhd_module_init: in
[ 107.681095] get into function::dhd_wifi_platform_register_drv--->step2
[ 107.687758] ======== bcm_wlan_set_plat_data ========
[ 107.692786] ------------[ cut here ]------------
[ 107.697482] WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x54/0x1b0()
[ 107.705424] autorequest GPIO-185
[ 107.708712] Modules linked in: bcmdhd(+)
[ 107.712918] [<c009efe4>] (unwind_backtrace+0x0/0x138) from [<c00d793c>] (warn_slowpath_common+0x4c/0x64)
[ 107.722520] [<c00d793c>] (warn_slowpath_common+0x4c/0x64) from [<c00d79e8>] (warn_slowpath_fmt+0x30/0x40)
[ 107.732157] [<c00d79e8>] (warn_slowpath_fmt+0x30/0x40) from [<c030bce0>] (gpio_ensure_requested+0x54/0x1b0)
[ 107.742023] [<c030bce0>] (gpio_ensure_requested+0x54/0x1b0) from [<c030c2a0>](gpio_direction_input+0xa4/0x1fc)
[ 107.752418] [<c030c2a0>] (gpio_direction_input+0xa4/0x1fc) from [<bf042740>](bcm_wlan_get_oob_irq+0xc/0x24 [bcmdhd])
[ 107.763386] [<bf042740>] (bcm_wlan_get_oob_irq+0xc/0x24 [bcmdhd]) from [<bf014ed0>] (dhd_wifi_platform_register_drv+0x84/0xfc [bcmdhd])
[ 107.775878] [<bf014ed0>] (dhd_wifi_platform_register_drv+0x84/0xfc [bcmdhd])from [<bf0a0078>] (dhd_module_init+0x78/0x154 [bcmdhd])
[ 107.788022] [<bf0a0078>] (dhd_module_init+0x78/0x154 [bcmdhd]) from [<c0091640>] (do_one_initcall+0xfc/0x164)
[ 107.798068] [<c0091640>] (do_one_initcall+0xfc/0x164) from [<c010f95c>] (sys_init_module+0xdc8/0x1c78)
[ 107.807504] [<c010f95c>] (sys_init_module+0xdc8/0x1c78) from [<c0097900>] (ret_fast_syscall+0x0/0x30)
[ 107.816841] ---[ end trace e4a110f4056e0534 ]---
[ 107.821574] host_oob_irq: 441
[ 107.824841] host_oob_irq_flags=1044
[ 107.828390] dhd_wifi_platform_load: Enter
[ 107.832473] get into function dhd_wifi_platform_load !
[ 107.837738] get into function-->dhd_wifi_platform_load_usb !
[ 107.843546] get into function dhd_wifi_platform_load_sdio !
[ 107.849245] Power-up adapter 'DHD generic adapter'
[ 107.854343] wifi_platform_set_power = 1
[ 107.858255] ======== PULL WL_REG_ON HIGH! ========
[ 107.963072] get into function --->wifi_card_detect
[ 108.041738] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 108.049081] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 108.056351] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 108.065044] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 108.140884] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
[ 108.146539] mmc2: new high speed SDIO card at address 0001
[ 108.174711] wifi_platform_bus_enumerate device present 1
[ 108.180140] ======== Card detection to detect SDIO card! ========
[ 108.217639] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 108.224951] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 108.232206] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 108.240887] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 108.286258] get into function --->wifi_card_detect
[ 108.329036] bcmsdh_register: register client driver
[ 108.397667] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 108.404954] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 108.412294] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 108.420910] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 108.492384] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[ 108.497335] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[ 108.502242] bus num (host idx)=2, slot num (rca)=1
[ 108.507109] found adapter info 'DHD generic adapter'
[ 108.512569] dhdsdio_probe : no mutex held. set lock
[ 108.517650] F1 signature read @0x18000000=0x1602a94d
[ 108.525944] F1 signature OK, socitype:0x1 chip:0xa94d rev:0x2 pkg:0x0
[ 108.533062] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 108.540317] dhd_conf_set_chiprev: chip=0xa94d, chiprev=2
[ 108.545761] dhd_conf_set_conf_path_by_nv_path: config_path=/system/etc/firmware/config.txt
[ 108.554719] dhd_conf_read_config: Ignore config file /system/etc/firmware/config.txt
[ 108.563609] wl_create_event_handler(): thread:wl_event_handler:d55 started
[ 108.563618] tsk Enter, tsk = 0xd25013f0
[ 108.575964] p2p0: P2P Interface Registered
[ 108.581628] dhd_attach(): thread:dhd_watchdog_thread:d5b started
[ 108.588378] dhd_attach(): thread:dhd_dpc:d5e started
[ 108.588394] dhd_dpc_thread: set dpc_cpucore 0 from config.txt
[ 108.599476] dhd_attach(): thread:dhd_rxf:d5f started
[ 108.604582] dhd_deferred_work_init: work queue initialized
[ 108.610485] dhdsdio_probe_init: set use_rxchain 1 from config.txt
[ 108.645319] Dongle Host Driver, version 1.201.59.4 (r506368)
[ 108.645327] Compiled in drivers/net/wireless/bcmdhd on Sep 1 2016 at 09:50:17
[ 108.659631] Register interface [wlan0] MAC: 6c:fa:a7:de:81:e0
[ 108.672047] dhd_prot_ioctl : bus is down. we have nothing to do
[ 108.678324] bcmsdh_oob_intr_unregister: Enter
[ 108.684726] bcmsdh_oob_intr_unregister: irq is not registered
[ 108.690651] dhd_txglom_enable: enable 0
[ 108.694574] dhd_bus_devreset: WLAN OFF DONE
[ 108.699108] wifi_platform_set_power = 0
[ 108.703011] ======== PULL WL_REG_ON LOW! ========
[ 108.707810] dhdsdio_probe : the lock is released.
[ 108.712929] get into function::dhd_wifi_platform_register_drv--->step3
[ 108.719544] wifi_ctrlfunc_register_drv--->err =0
[ 108.724279] dhd_module_init: Exit err=0
2/**********************************************网卡启动的log*********************************************/
[ 69.498661] dhd_open: Enter d6b1b000
[ 69.502334]
[ 69.502336] Dongle Host Driver, version 1.201.59.4 (r506368)
[ 69.502340] Compiled in drivers/net/wireless/bcmdhd on Sep 1 2016 at 09:50:17
[ 69.516959] wl_android_wifi_on in 1
[ 69.520511] wl_android_wifi_on in 2: g_wifi_on=0
[ 69.525198] wifi_platform_set_power = 1
[ 69.529095] ======== PULL WL_REG_ON HIGH! ========
[ 69.633895] get into function --->wifi_card_detect
[ 69.844747] sdio_reset_comm():
[ 69.892707] dhd_bus_devreset: == WLAN ON ==
[ 69.900232] F1 signature read @0x18000000=0x1602a94d
[ 69.909414] F1 signature OK, socitype:0x1 chip:0xa94d rev:0x2 pkg:0x0
[ 69.916586] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 69.923970] dhdsdio_probe_init: set use_rxchain 1 from config.txt
[ 69.930231] dhd_conf_read_config: Ignore config file /system/etc/firmware/config.txt
[ 69.938112] dhd_conf_set_fw_name_by_chip: firmware_path=/system/etc/firmware/fw_bcm43341b0_ag.bin
[ 69.947118] Final fw_path=/system/etc/firmware/fw_bcm43341b0_ag.bin
[ 69.953449] Final nv_path=/system/etc/firmware/nvram.txt
[ 69.958887] Final conf_path=/system/etc/firmware/config.txt
[ 70.022906] NVRAM version: AP6441_NVRAM_V1.1_20131224
[ 70.030766] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 70.197179] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 70.203398] bcmsdh_oob_intr_register: Enter
[ 70.207668] bcmsdh_oob_intr_register: HW_OOB enabled
[ 70.212750] bcmsdh_oob_intr_register OOB irq=319 flags=414
[ 70.218338] bcmsdh_oob_intr_register: enable_irq_wake
[ 70.223454] add wake up source irq 101
[ 70.229155] dhd_conf_set_band: Set band 0
[ 70.235568] Firmware up: op_mode=0x0015, MAC=6c:fa:a7:de:81:e0
[ 70.241520] dhd_conf_set_country: Set country CN, revision 0
[ 70.320133] Country code: CN (CN/0)
[ 70.324031] dhd_conf_set_roam: Set roam_off 1
[ 70.338491] Firmware version = wl0: Jan 20 2014 11:06:06 version 6.10.190.43(r449836) FWID 01-77015d04
[ 70.348040] Driver: 1.201.59.4 (r506368)
[ 70.348045] Firmware: wl0: Jan 20 2014 11:06:06 version 6.10.190.43 (r449836) FWID 01-77015d04
[ 70.361528] dhd_txglom_enable: enable 0
[ 70.365461] dhd_conf_set_disable_proptx: set disable_proptx 0
[ 70.377979] dhd_preinit_ioctls wl ampdu_hostreorder failed -23 (这个错误是什么意思,或者有什么引起的,可以忽略吗)
[ 70.384405] wl_android_wifi_on: Success
[ 70.389082] p2p0: p2p_dev_addr=6e:fa:a7:de:81:e0
[ 70.418972] dhd_open: Exit ret=0
[ 81.254753] wlan0: no IPv6 routers present
3/****************************************dhcp -d 启动的log**********************************************/
/******************************************底层的打印************************************************/
205.827209] Connectting with 6c:fa:a7:de:81:cb channel (2) ssid "QYAP-V2-23456-m2 note-fd", len (24)
[ 205.935793] wl_iw_event: Link UP with BSSID=6c:fa:a7:de:81:cb
[ 205.942046] wl_bss_connect_done succeeded with 6c:fa:a7:de:81:cb
[ 206.066152] dhd_pno_get_for_batch : wifi location service is not supported
[ 206.073382] CFG80211-ERROR) wl_is_linkdown :
[ 206.077726] ANDROID-ERROR) failed to getting batching results
[ 206.083883] Link down Reason : WLC_E_DEAUTH_IND
[ 206.088643] link down if eth1 may call cfg80211_disconnected. event : 6, reason=3 from 6c:fa:a7:de:81:cb
[ 206.090870] dhd_pno_stop_for_batch : wifi location service is not supported
[ 206.090880] NULL POINTER (_dhd_pno_clear_all_batch_results) : head->next is NULL
[ 206.090887] NULL POINTER (_dhd_pno_clear_all_batch_results) : head->next is NULL
[ 206.090893] ANDROID-ERROR) failed to stop batching scan
[ 206.127908] wl_iw_event: Link Down with BSSID=6c:fa:a7:de:81:cb
[ 206.134411] CFG80211-ERROR) wl_is_linkdown : Link down Reason : WLC_E_LINK
[ 206.143106] cfg80211: Calling CRDA to update world regulatory domain
[ 206.904686] p2p0: no IPv6 routers present
[ 207.704866] Connectting with 6c:fa:a7:de:81:cb channel (2) ssid "QYAP-V2-23456-m2 note-fd", len (24)
[ 208.695265] connect failed event=0 e->status 3 e->reason 0
[ 208.704249] CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed
/******************************************底层的打印************************************************/
/******************************************通过adb 打印出来***************************************/
1|root@sabresd_6dq:/ # dhcpcd -d eth1
dhcpcd[5990]: version 5.5.6 starting
dhcpcd[5990]: eth1: using hwaddr 6c:fa:a7:de:81:cb
dhcpcd[5990]: eth1: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd[5990]: eth1: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd[5990]: eth1: reading lease `/data/misc/dhcp/dhcpcd-eth1.lease'
dhcpcd[5990]: eth1: rebinding lease of 192.168.31.223
dhcpcd[5990]: eth1: sending REQUEST (xid 0xb954b3ee), next in 3.47 seconds
dhcpcd[5990]: eth1: acknowledged 192.168.31.223 from 192.168.31.1
dhcpcd[5990]: eth1: checking for 192.168.31.223
dhcpcd[5990]: eth1: sending ARP probe (1 of 3), next in 1.76 seconds
dhcpcd[5990]: eth1: sending ARP probe (2 of 3), next in 1.75 seconds
dhcpcd[5990]: eth1: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd[5990]: eth1: leased 192.168.31.223 for 43200 seconds
dhcpcd[5990]: eth1: adding IP address 192.168.31.223/24
dhcpcd[5990]: eth1: adding route to 192.168.31.0/24
dhcpcd[5990]: eth1: adding default route via 192.168.31.1
dhcpcd[5990]: eth1: writing lease `/data/misc/dhcp/dhcpcd-eth1.lease'
dhcpcd[5990]: eth1: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd[5990]: forking to background
dhcpcd[5990]: forked to background, child pid 6029
/******************************************通过adb 打印出来***************************************/
/****************************************dhcp -d 启动的log**********************************************/
4/******************************************通过界面连接启动时候android上层的打印***************************************/
/wpa_supplicant( 3390): eth1: Associated with 28:6c:07:56:f9:25
D/Ethernet( 2642): Interface eth1 link up
D/Ethernet( 2642): Interface eth1 link up
D/Ethernet( 2642): Interface eth1 link up
D/Ethernet( 2642): Interface eth1 link up
D/Ethernet( 2642): Interface eth1 link up
I/wpa_supplicant( 3390): eth1: WPA: Key negotiation completed with 28:6c:07:56:f9:25 [PTK=CCMP GTK=TKIP]
I/wpa_supplicant( 3390): eth1: CTRL-EVENT-CONNECTED - Connection to 28:6c:07:56:f9:25 completed (auth) [id=0 id_str=]
D/Ethernet( 2642): Interface eth1 link up
E/wpa_supplicant( 3390): wpa_driver_nl80211_driver_cmd: failed to issue private commands
E/WifiStateMachine( 2642): Unexpected BatchedScanResults :null
E/wpa_supplicant( 3390): wpa_driver_nl80211_driver_cmd: failed to issue private commands
I/wpa_supplicant( 3390): eth1: WPA: Key negotiation completed with 28:6c:07:56:f9:25 [PTK=CCMP GTK=TKIP]
D/WifiStateMachine( 2642): VerifyingLinkState enter
D/WifiStateMachine( 2642): VerifyingLinkState GOOD_LINK_DETECTED: transition to captive portal check
D/WifiStateMachine( 2642): CaptivePortalCheckState enter
D/WifiStateMachine( 2642): CaptivePortalCheckState CMD_CAPTIVE_CHECK_COMPLETE
D/ConnectivityService( 2642): Captive portal check NetworkInfo: type: WIFI[], state: CONNECTING/CAPTIVE_PORTAL_CHECK, reason: (unspecified), extra: "lovensMIWIFI", roaming: false, failover: false, isAvailable: true, isConnectedToProvisioningNetwork: false
D/ConnectivityService( 2642): handleCaptivePortalTrackerCheck: call captivePortalCheckComplete ni=NetworkInfo: type: WIFI[], state: CONNECTING/CAPTIVE_PORTAL_CHECK, reason: (unspecified), extra: "lovensMIWIFI", roaming: false, failover: false, isAvailable: true, isConnectedToProvisioningNetwork: false
D/ConnectivityService( 2642): ConnectivityChange for WIFI: CONNECTED/CONNECTED
E/ConnectivityService( 2642): Unexpected mtu value: android.net.wifi.WifiStateTracker@41965b70
D/Nat464Xlat( 2642): requiresClat: netType=1, hasIPv4Address=true
D/ConnectivityService( 2642): ConnectivityChange for ETHERNET: CONNECTED/CONNECTED
D/ConnectivityService( 2642): Policy requires WIFI teardown
I/wpa_supplicant( 3390): eth1: CTRL-EVENT-DISCONNECTED bssid=28:6c:07:56:f9:25 reason=3 locally_generated=1
E/ConnectivityService( 2642): Unexpected mtu value: android.net.EthernetDataTracker@41ae41d0
D/Ethernet( 2642): Interface eth1 link up
D/NetUtils( 2642): dhcp_do_request failed : eth1 (new)
E/Ethernet( 2642): DHCP request error:Timed out waiting for DHCP to finish
/******************************************通过界面连接启动时候android上层的打印***************************************/
大家知道这是什么原因造成的?谢谢!
Hi xiaoliang
for porting driver you may wish to request direct support from vendor
wireless.murata.com/eng/products/rf-modules-1/wi-fi-bluetooth-for-freescale-i-mx.html
Best regards
igor
Hi,
What's your kernel version?