wifi_intel.c android lollipop build error...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

wifi_intel.c android lollipop build error...

6,372 Views
narasimma23
Contributor II

I am using the iMX6 SABRE-SDP board with android lollipop.

I am trying to add support Intel Wireless-N 7260 mini PCIE card, I followed the community guide to support PCIe Wifi.

https://community.freescale.com/docs/DOC-94045

But while building the source i got following error.

target thumb C++: netd <= system/netd/server/SoftapController.cpp

target Executable: rtl_wpa_supplicant (out/target/product/sabresd_6dq/obj/EXECUTABLES/rtl_wpa_supplicant_intermediates/LINKED/rtl_wpa_supplicant)

hardware/libhardware_legacy/wifi/wifi_intel.c: In function 'wifi_start_supplicant':

hardware/libhardware_legacy/wifi/wifi_intel.c:668:20: error: dereferencing pointer to incomplete type

         serial = pi->serial;

                    ^

hardware/libhardware_legacy/wifi/wifi_intel.c:685:26: error: dereferencing pointer to incomplete type

             } else if (pi->serial != serial &&

                          ^

hardware/libhardware_legacy/wifi/wifi_intel.c: In function 'wifi_ctrl_recv':

hardware/libhardware_legacy/wifi/wifi_intel.c:839:13: warning: implicit declaration of function 'wifi_close_sockets' [-Wimplicit-function-declaration]

             wifi_close_sockets(index);

             ^

hardware/libhardware_legacy/wifi/wifi_intel.c: At top level:

hardware/libhardware_legacy/wifi/wifi_intel.c:914:6: warning: conflicting types for 'wifi_close_sockets' [enabled by default]

void wifi_close_sockets(int index)

      ^

hardware/libhardware_legacy/wifi/wifi_intel.c:839:13: note: previous implicit declaration of 'wifi_close_sockets' was here

             wifi_close_sockets(index);

             ^

make: *** [out/target/product/sabresd_6dq/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/wifi/wifi_intel.o] Error 1

make: *** Waiting for unfinished jobs....

external/wpa_supplicant_8/wpa_supplicant/notify.c:87: error: undefined reference to 'sme_state_changed'

external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant.c:449: error: undefined reference to 'sme_deinit'

external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant.c:726: error: undefined reference to 'sme_sched_obss_scan'

external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant.c:1435: error: undefined reference to 'sme_authenticate'

external/wpa_supplicant_8/wpa_supplicant/events.c:1349: error: undefined reference to 'sme_proc_obss_scan'

external/wpa_supplicant_8/wpa_supplicant/events.c:213: error: undefined reference to 'sme_update_ft_ies'

external/wpa_supplicant_8/wpa_supplicant/events.c:2215: error: undefined reference to 'sme_disassoc_while_authenticating'

external/wpa_supplicant_8/wpa_supplicant/events.c:2971: error: undefined reference to 'sme_event_auth'

external/wpa_supplicant_8/wpa_supplicant/events.c:2687: error: undefined reference to 'sme_event_disassoc'

external/wpa_supplicant_8/wpa_supplicant/events.c:3073: error: undefined reference to 'sme_event_assoc_reject'

external/wpa_supplicant_8/wpa_supplicant/events.c:3084: error: undefined reference to 'sme_event_auth_timed_out'

external/wpa_supplicant_8/wpa_supplicant/events.c:3088: error: undefined reference to 'sme_event_assoc_timed_out'

external/wpa_supplicant_8/wpa_supplicant/events.c:2563: error: undefined reference to 'sme_associate'

external/wpa_supplicant_8/wpa_supplicant/events.c:2831: error: undefined reference to 'sme_sa_query_rx'

external/wpa_supplicant_8/wpa_supplicant/events.c:2579: error: undefined reference to 'sme_event_unprot_disconnect'

external/wpa_supplicant_8/wpa_supplicant/events.c:2592: error: undefined reference to 'sme_event_unprot_disconnect'

external/wpa_supplicant_8/wpa_supplicant/wpas_glue.c:503: error: undefined reference to 'sme_update_ft_ies'

out/target/product/sabresd_6dq/obj/EXECUTABLES/rtl_wpa_supplicant_intermediates/src/drivers/drivers.o:drivers.c:function wpa_drivers: error: undefined reference to 'wpa_driver_nl80211_ops'

collect2: error: ld returned 1 exit status

make: *** [out/target/product/sabresd_6dq/obj/EXECUTABLES/rtl_wpa_supplicant_intermediates/LINKED/rtl_wpa_supplicant] Error 1

How can i resolve this error.

Thanks in advance.

Regards,

Narasimma

Labels (2)
16 Replies

2,319 Views
james_walmsley
Contributor II

Hi Sheldon, Everyone,

I got the Intel 7260 wifi card working on Android Lollipop 5.1 and I thought I'd document how I got it working here as there is a lot of information out there and no complete solution really exists.

I'll start from the kernel level and move up the stack.

1. Kernel Modules.

    • You must build the kernel modules cfg80211.ko mac80211.ko iwlwifi.ko and iwlmvm.ko
    • In menuconfig:
      • Drivers -> Network Device Support -> Wireless LAN -> Intel Wireless WiFi Next Gen AGN [M]
      • --                                                          Wireless LAN -> Intel Wireless Wifi MVM Firmware support [M]
      • Network Support -> Wireless -> cfg80211 - wireless configuration API [M]
      • --                                            -> Generic IEEE 802.11 Networking Stack (mac80211) [M]
      • (Note. These must be kernel modules and not built-in or firmware loading will not work).
    • Edit BoardConfig.mk file to ensure kernel modules are copied:

    TARGET_KERNEL_MODULES        := \

      kernel_imx/drivers/net/wireless/iwlwifi/iwlwifi.ko:system/lib/modules/iwlwifi.ko \

      kernel_imx/drivers/net/wireless/iwlwifi/mvm/iwlmvm.ko:system/lib/modules/iwlmvm.ko \

      kernel_imx/drivers/net/wireless/iwlwifi/dvm/iwldvm.ko:system/lib/modules/iwldvm.ko \

      kernel_imx/net/mac80211/mac80211.ko:system/lib/modules/mac80211.ko \

      kernel_imx/net/wireless/cfg80211.ko:system/lib/modules/cfg80211.ko

      • From android root, rebuild your kernel modules and sync the filesystem.

      ~/myandroid $ make kernelmodules     # Build the kernel modules and copy to product out dir.

      ~/myandroid $ make snod          # Optionally rebuild the system.img (use simg2img to make a raw image).

      ~/myandroid/out/target/product/my_imx_product $ adb remount; adb -p $(pwd) sync     # Simply sync with device connected via adb.

      2. Test Loading Of Kernel Modules

      adb shell insmod /system/lib/modules/cfg80211.ko

      adb shell insmod /system/lib/modules/mac80211.ko

      adb shell insmod /system/lib/modules/iwlwifi.ko

      adb shell insmod /system/lib/modules/iwlmvm.ko

      You should see the folloiwing on your root kernel console (debug serial port).

      Intel(R) Wireless WiFi driver for Linux, in-tree:d

      Copyright(c) 2003- 2014 Intel Corporation

      PCI: enabling device 0000:01:00.0 (0140 -> 0142)

      iwlwifi 0000:01:00.0: Direct firmware load failed with error -2

      iwlwifi 0000:01:00.0: Falling back to user helper

      imx-sgtl5000 sound.27: ASoC: CODEC (null) not registered

      imx-sgtl5000 sound.27: snd_soc_register_card failed (-517)

      platform sound.27: Driver imx-sgtl5000 requests probe deferral

      iwlwifi 0000:01:00.0: Direct firmware load failed with error -2

      iwlwifi 0000:01:00.0: Falling back to user helper

      iwlwifi 0000:01:00.0: Direct firmware load failed with error -2

      iwlwifi 0000:01:00.0: Falling back to user helper

      iwlwifi 0000:01:00.0: loaded firmware version 22.1.7.0 op_mode iwlmvm

      iwlwifi 0000:01:00.0: failed to load module iwlmvm (error -2), is dynamic loading enabled?

      iwlwifi 0000:01:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144

      iwlwifi 0000:01:00.0: L1 Disabled - LTR Disabled

      iwlwifi 0000:01:00.0: L1 Disabled - LTR Disabled

      There should be a wlan0 network interface, (see ifconfig wlan0, or if you install busybox busybox ifconfig wlan0).
      At this point in time you can probably use the wpa_supplicant and wpa_cli tools to connect to a wifi network to test (a quick example).

      wpa_supplicant -iwlan0 -Dnl80211 -dd -c/data/misc/wifi/wpa_supplicant.conf -O/data/misc/wifi/sockets -B

      wpa_cli -p /data/misc/wifi/sockets

      > scan

      OK

      <3>CTRL-EVENT-SCAN-STARTED

      <3>CTRL-EVENT-SCAN-RESULTS

      > scan_results

      bssid / frequency / signal level / flags / ssid

      00:13:46:a3:67:a0       2412    -34     [ESS]   dlink

      > add_network

      1

      > set_network 1 ssid "dlink"

      OK

      > set_network 1 key_mgmt NONE

      OK

      > enable_network 1

      OK

      > select_network 1

      OK

      <3>CTRL-EVENT-DISCONNECTED bssid=00:13:46:a3:67:a0 reason=3 locally_generated=1

      <3>CTRL-EVENT-STATE-CHANGE id=0 state=0 BSSID=00:13:46:a3:67:a0 SSID=dlink

      <3>CTRL-EVENT-STATE-CHANGE id=1 state=3 BSSID=00:00:00:00:00:00 SSID=dlink

      <3>CTRL-EVENT-SCAN-STARTED

      > wlan0: authenticate with 00:13:46:a3:67:a0

      <3>CTRL-EVENT-SCAN-RESULTS wlan0: send auth to 00:13:46:a3:67:a0 (try 1/3)

      <3>SME: Trying to authenwlan0: authenticated

      ticate with 00:13:46:a3:67:a0 (SSiwlwifi 0000:01:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP

      ID='dlink' freq=2412 MHz)

        iwlwifi 0000:01:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP

      <3>CTRL-EVENT-STATE-CHANGE id=1 state=4 BSSID=00:00:00:00:00:00 SSID=dlink

      <3>Trying to associate with 00:13:46:a3:67:a0wlan0: associate with 00:13:46:a3:67:a0 (try 1/3)

      (SSID='dlink' freq=2412 MHz)

      >wlan0: RX AssocResp from 00:13:46:a3:67:a0 (capab=0x421 status=0 aid=1)

      <3>CTRL-EVENT-STATE-CHANGE iwlan0: associated

      d=1 state=5 BSSID=00:00:00:00:00:00 SSID=dlink

      <3>CTRL-EVENT-STATE-CHANGE id=1 state=6 BSSID=00:00:00:00:00:00 SSID=dlink

      <3>Associated with 00:13:46:a3:67:a0

      <3>CTRL-EVENT-CONNECTED - Connection to 00:13:46:a3:67:a0 completed [id=1 id_str=]

      <3>CTRL-EVENT-STATE-CHANGE id=1 state=9 BSSID=00:13:46:a3:67:a0 SSID=dlink

      Now the link should be active and you can create a dhcp request:

      netcfg wlan0 dhcp

      ping 192.168.0.1

      ping 8.8.8.8

      You will see the debug information on the logcat:

      adb logcat  | grep -E "Wifi|wifi|wpa"

      If you have got this far, then you know you hardware is working and its just a case of getting Android to communicate with the Wifi card and wpa_supplicant.

      3. Android Configuration  and update wpa_supplicant.

      For making the new intel wifi cards work, the bsp provided by freescale seems to be quite difficult to configure correctly. I found code in an Android port for the Tegra Jetson board to support iwlwifi based cards.

           1. Clone the iwlwifi private command driver into android/hardware/iwlwifi

      git clone git://github.com/jameswalmsley/androoid_hardware_iwlwifi hardware/iwlwifi

           2. Apply the following patch (if not already patched in my git repo).

      diff --git a/wpa_supplicant_8_lib/Android.mk b/wpa_supplicant_8_lib/Android.mk

      index ad146b9..a636ac8 100644

      --- a/wpa_supplicant_8_lib/Android.mk

      +++ b/wpa_supplicant_8_lib/Android.mk

      @@ -35,7 +35,7 @@ WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR)/src \

              $(WPA_SUPPL_DIR)/wpa_supplicant

      ifdef CONFIG_DRIVER_NL80211

      -WPA_SUPPL_DIR_INCLUDE += external/libnl-headers

      +WPA_SUPPL_DIR_INCLUDE += external/libnl/include

      WPA_SRC_FILE += driver_cmd_nl80211.c

      endif

           3. Update BoardConfig to use the correct wifi drivers. (This is my entire wifi config, just delete the stuff from freescale).

      BOARD_WPA_SUPPLICANT_DRIVER  := NL80211

      BOARD_WLAN_VENDOR                         := INTEL

      WPA_SUPPLICANT_VERSION       := VER_0_8_X

      BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_iwlwifi

      BOARD_WLAN_DEVICE            := iwlwifi

      BOARD_HOSTAPD_DRIVER         := NL80211

      BOARD_HOSTAPD_PRIVATE_LIB          := lib_driver_cmd_iwlwifi

           4. Build the wifi private command library:

      mmm hardware/iwlwifi

           5. Move back to an unmodified lollipop supplicant.

      cd external/wpa_supplicant_8

      git checkout -b android-5.1.1_r37 android-5.1.1_r37

           6. Re-build the updated supplicant

      mmm -B external/wpa_supplicant_8

           7. Check init.rc file for your board (usually output as init.product_name.rc, or init.freescale.rc)

      service wpa_supplicant /system/bin/wpa_supplicant -iwlan0 -d -d -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -I/system/etc/wifi/wpa_supplicant_overlay.conf -O/data/misc/wifi/sockets -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0

          socket wpa_wlan0 dgram 660 wifi wifi

          class late_start

          disabled

          oneshot

      I had to ensure the command line parameters for the supplicant were all on a single line for it to work.

        8. Update the ram-disk

      make ramdisk

      make bootimage

      Now sync or update your android filesystem and boot image. Ensure wifi is diabled and restart your system, then re-load your wifi kernel modules.

      Hopefully if everything worked out you should see that your wifi now works.

      You can enable wifi from adb like so:

      adb wifi enable

      adb wifi disable

      Caveats

      Currently this solution does not describe how to make the kernel modules automatically load. That magic happens inside hardware/libhardware_legacy/wifi.

      You'll have to ensure that the build is configured so that libhardware_legacy is built with wifi_unite.c or wifi_intel.c correctly patched to load your kernel modules and start the correct supplicant. (wpa_supplicant and not rtl_wpa_supplicant or bcm_wpa_supplicant).

      I'll update this thread later with this information when I have formed a complete working solution.

      2,319 Views
      warrenjan
      Contributor II

      Hi James Walmsley 

      did you have any update ? i  just study how to porting wifi  now .

      0 Kudos

      2,319 Views
      james_walmsley
      Contributor II

      Hi Sheldon,

      Many thanks for the useful information.

      I'm currently right in the middle of the port, almost to the point where you had problems.

      I'll let you know how it goes. I might be able to provide a big diff once I get the whole thing working.

      I'll have a look at your other patches to see if I missed anything.

      Can you link to the other thread?

      Thanks

      James

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Hello James,

      Sorry, I don't think I can link you to the other thread.  It was started in a professional support forum.   However, the patches were the most useful part of that thread.

      Thank you,

      Sheldon

      0 Kudos

      2,319 Views
      james_walmsley
      Contributor II

      Ok, many thanks. Just trying to get as many details as possible.

      Looks like I am so far using the wifi_intel.c file (libhardware_legacy/wifi/) and your newer patches use the UNITE file.

      Continuing further down the rabbit hole....

      James

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Yeah, I went down the path of updating the wifi_intel.c file.  However, in the end it was pretty much the same as the UNITE file.

      Sheldon

      0 Kudos

      2,319 Views
      james_walmsley
      Contributor II

      Hi Sheldon,

      Did you ever manage to get this to work? I am also porting the 7260 to Lollipop.

      James

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Hello James,

      I opened up another thread to try and get help with this issue.  In the thread Yuan posted the attached patches with the following note.

           "I have hardcoded to 4965. So, after you insmod the 7260's driver, then turn wifi on in the Android UI, and check if it can work."

      I integrated the patches into our Android source and generated a build.  I then loaded the build onto the device.  From there, I opened up the settings->wifi menu and turned wifi off.  After that I reset the device.  After the reboot I issued the following commands:

      insmod cfg80211_realtek.ko

      insmod mac80211.ko

      insmod iwlwifi.ko 

      insmod iwlmvm.ko

      Then I opened up the settings->wifi menu and turned wifi on.  After wifi was turned on I found that the wifi screen showed "Searching for Wi-Fi networks..."  I.E. no networks were reported.  However, I think probably made an error when applying the patches as Yuan provided me with his system.img which I loaded onto my device and was able to see network in the Android UI.

      It's not a complete solution but I hope it helps.

      Thank you,

      Sheldon

      0 Kudos

      2,319 Views
      b47504
      NXP Employee
      NXP Employee

      It seems some functions defination in wifi_intel.c have conflicts with wifi.c in the new source code.The diff file is just for the reference, not tested in the real device.

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Hello Yuan,

      The attached patch still leaves the wifi_intel.c with some conflicts with wifi.c.  For instance, "int wifi_connect_to_supplicant(const char *ifname);" was changed to "int wifi_connect_to_supplicant();" but that's not reflected in the previous patch.  I made some further updates using wifi_unite.c as reference however I'm not sure they're entirely correct as I still don't have Lollipop successfully talking to my Intel 7260 device.  Either way the patch is attached for reference.

      It looks like that after the updates the wifi_intel.c fails to load the wpa_supplicant because Android is specifying p2p support which I'm unable to get working with the Intel 7260 part.  To verify this I placed some debug print statements and found that p2p_supported in wifi_start_supplicant was set to true.  This then caused the p2p supplicant, p2p configuration files, and p2p interface to be required. Do you have an ideas on how to remove p2p support from Lollipop or how to enable p2p support with the Intel 7260 part.

      Thank you,

      Sheldon

      0 Kudos

      2,319 Views
      b47504
      NXP Employee
      NXP Employee

      Please try this diff to disable P2P.

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Hello Yuan,

      The patch to remove P2P support from wpa_supplicant does not remove the support requirement from Android.  Basically Android still asks for P2P support which I'm not able to supply.  So I think the support has to be removed at the Android level.  Any ideas on how I can do this?

      Just as a note of clarification - I have been able to verify that my Intel 7260 driver loads and is functional.  I'm able to see the wlan0  interface, connect it with wpa_supplicant, and use wpa_cli to scan networks.

      Thank you,

      Sheldon

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Hello Yuan,

      I think I just found how to disable p2p support in Android.  You have to set the config_enableWifiDisplay to false in the "frameworks/base/core/res/res/values/config.xml" file.  From what I can tell that's used to set the "mP2pSupported" variable in WifiStateMachine.java which i responsible for talking with the WiFi HAL. 

      I'm compiling now and I'll let you know how it turns out.

      Thank you,

      Sheldon

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Hello Yuan,

      Okay, so I was wrong in that setting config_enableWifiDisplay to false would disable P2P support in Android.  Turns out it takes an additional step of remove "frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml" from my board's make file.  Thereby removing the wifi direct permission from Android.

      Now with the above modifications Android no longer requests P2P support. :-)  However, the HAL still fails to start per the following messages,

      I/WifiNative-HAL(11950): startHal                                                                                                                                                                                                           

      E/wifi    (11950): getStaticLongField sWifiHalHandle 0x5adff8fc                                                                                                                                                                   

      D/wifi    (11950): halHandle = 0x0, mVM = 0x74f5c280, mCls = 0x100ad6

      I/WifiNative-HAL(11950): Could not start hal

      I'm looking into why this is failing now.  If you have any suggestions feel free to pass them along. :-)

      Thank you,

      Sheldon

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Hello Yuan,

      Okay, I found why the HAL couldn't get started.  The reason is that there is only one HAL currently available in the Lollipop code and it's provided by the libwifi-hal-bcm.a library which is for Broadcom modules.  This can be seen by looking at ./frameworks/opt/net/wifi/service/Android.mk file.  The relevant bit is shown below for reference.

      # set correct hal library path

      # ============================================================

      LIB_WIFI_HAL := libwifi-hal

      ifeq ($(BOARD_WLAN_DEVICE), bcmdhd)

        LIB_WIFI_HAL := libwifi-hal-bcm

      else ifeq ($(BOARD_WLAN_DEVICE), qcwcn)

        # this is commented because none of the nexus devices

        # that sport Qualcomm's wifi have support for HAL

        # LIB_WIFI_HAL := libwifi-hal-qcom

      else ifeq ($(BOARD_WLAN_DEVICE), mrvl)

        # this is commented because none of the nexus devices

        # that sport Marvell's wifi have support for HAL

        # LIB_WIFI_HAL := libwifi-hal-mrvl

      endif

      Above sets the build to use either the libwifi-hal or the libwifi-hal-bcm depending on the WLAN device type.  In my case the device type is set to INTEL which caused the build to use the libwifi-hal.  The source for the libwifi-hal library is defined at frameworks/opt/net/wifi/service/lib/wifi_hal.cpp which is basically a bunch stubs that return failure codes.  I tried hard coding LIB_WIFI_HAL to "libwifi-hal-bcm" to use the Broadcom HAL but that (not surprisingly) didn't allow the WiFi to function for then Intel 7260 part as shown below.

      I/WifiNative-HAL( 7700): startHal                                                                                                                                                                                                            

      D/wifi    ( 7700): setting scan oui 0x705c3748                                                                                                                                                                                               

      D/WifiHAL ( 7700): Sending mac address OUI                                                                                                                                                                                                   

      E/WifiHAL ( 7700): failed to set scanning mac OUI; result = -95                                                                                                                                                                              

      D/WifiScanningService( 7700): SCAN_AVAILABLE : 3

      However, now I wonder how WiFi would work with the Sabre-SD boards because when I search the fsl device code (device/fsl) for BOARD_WLAN_DEVICE I get the following results.

      ./arm2_6dq/BoardConfig.mk:BOARD_WLAN_DEVICE := ar6003

      ./arm2_6sl/BoardConfig.mk:BOARD_WLAN_DEVICE := ar6003

      ./evk_6sl/BoardConfig.mk:BOARD_WLAN_DEVICE            := UNITE

      ./hdmidongle_6dq/BoardConfig.mk:BOARD_WLAN_DEVICE := UNITE

      ./hdmidongle_6dq/BoardConfig.mk:#BOARD_WLAN_DEVICE := rtl8192du

      ./hdmidongle_6dq/BoardConfig.mk:#BOARD_WLAN_DEVICE := rtl8192ce

      ./hdmidongle_6dq/BoardConfig.mk:#BOARD_WLAN_DEVICE := rtl8192de

      ./hdmidongle_6dq/BoardConfig.mk:#BOARD_WLAN_DEVICE := rtl8723as

      ./hdmidongle_6dq/BoardConfig.mk:#BOARD_WLAN_DEVICE := rtl8723au

      ./hdmidongle_6dq/BoardConfig.mk:#BOARD_WLAN_DEVICE := rtl8188es

      ./imx53_smd/BoardConfig.mk:BOARD_WLAN_DEVICE            := UNITE

      ./sabreauto_6q/BoardConfig.mk:BOARD_WLAN_DEVICE            := UNITE

      ./sabreauto_6sx/BoardConfig.mk:BOARD_WLAN_DEVICE            := UNITE

      ./sabresd_6dq/BoardConfig.mk:BOARD_WLAN_DEVICE            := UNITE

      ./sabresd_6sx/BoardConfig.mk:BOARD_WLAN_DEVICE            := UNITE

      Notice that none of the board configuration files have the BOARD_WLAN_DEVICE set to bcmdhd as seems to be required to get the WiFi HAL to start. 

      Looking at the Jellybean code where we had the INTEL wifi module working it looks like the libwifi-hal-* was not present and is not used.  My guess is that this is something new to Lollipop.

      So at this point I'm stuck.  I'm not sure how to proceed as I'm not sure what to use for reference. Is there someone at Freescale that could provide some help in how we should proceed?

      Thank you,

      Sheldon

      0 Kudos

      2,319 Views
      sheldonlrucker
      Contributor IV

      Hello Yuan,

      Unfortunately I still don't have wifi up and running.  I found a post on the Boundary Devices website that's similar to the issue I'm facing (https://boundarydevices.com/android-wlan-the-rest-of-the-story/ ).  From this I take it that the part of code that's broken are the files located in the hardware/imx/wlan/intel/wpa_supplicant_8_lib.  These files are the bit of code that Android talks to when setting up the underlying driver to start scanning for networks.  The driver_cmd_nl80211.c file had an issue compiling due to "send_and_recv_msgs" not being defined.  I got around this issue by updating the wpa_supplicant files to expose the "send_and_recv_msgs" function (removed static keyword from function declarations).  However, I'm not sure if this is the correct way to go about updating the file.  I also tried porting over the updates to "hardware/broadcom/wlan/bcmdhd/wpa_supplicant_8_lib" as I found the intel and boradcom code was pretty much the same in Jellybean.

      Does Freescale have an up-to-date implementation for the files located in hardware/imx/wlan/intel/wpa_supplicant_8_lib?  If I'm understanding everything correctly that may be the last piece of the puzzle.

      Also, I've attached an additional log file taken with more wpa_supplicant output.  From this file I think the point of failure is the line that says, "nl80211: Scan trigger failed: ret=-22 (Invalid argument)".  Any other thoughts?

      Thank you,

      Sheldon

      0 Kudos