0 Replies Latest reply on Aug 3, 2017 5:32 AM by gaochengsiwork_2631791

    wifi driver in linux 4.1

    gaochengsiwork_2631791

      Hi:

      I am using chip bcm43438 in our customer imx7d board with Linux4.1 drawn from freescale linux 4.1-2.0.x-imx.

      The  wifi firmware I use is from wiced stdio 4.0 resources " 43438A1.bin",when i use "modprobe bcmdhd firmware_path=/lib/firmware/bcm/BCM43438/43438A1.bin nvram_path=/lib/firmware/bcm/BCM43438/43438A1.txt dhd_meg_level=0x1" i get the message:

       

      dhd_module_init in

      Power-up adapter 'DHD generic adapter'

      wifi_platform_bus_enumerate device present 1

      mmc0: new high speed SDIO card at address 0001

      F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x4

      DHD: dongle ram size is set to 524288(orig 524288) at 0x0

      wifi_platform_get_mac_addr

      CFG80211-ERROR) wl_setup_wiphy : Registering Vendor80211)

      wl_create_event_handler(): thread:wl_event_handler:189 started

      CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xa8da143c

      dhd_attach(): thread:dhd_watchdog_thread:18a started

      dhd_attach(): thread:dhd_dpc:18b started

      dhd_deferred_work_init: work queue initialized

      Dongle Host Driver, version 1.141.92 (r)

      Compiled in drivers/net/wireless/bcmdhd

      Register interface [wlan0]  MAC: 00:90:4c:11:22:33

       

       

      CFG80211-ERROR) wl_event_handler : was terminated

      wl_destroy_event_handler(): thread:wl_event_handler:189 terminated OK

      dhd_prot_ioctl : bus is down. we have nothing to do

       

      >>It seems the driver is loaded successfully, so I use try to start the wifi:

       

      root#ifconfig wlan0 up

       

      Dongle Host Driver, version 1.141.92 (r)

      Compiled in drivers/net/wireless/bcmdhd

      wl_android_wifi_on in

      F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x4

      DHD: dongle ram size is set to 524288(orig 524288) at 0x0

      dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.

      dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)

      wifi_platform_get_mac_addr

      Firmware up: op_mode=0x0005, MAC=00:90:4c:c5:12:38

      Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7

      dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79

      dhd_wlfc_init: query wlfc_mode succeed, fw_caps=0x1c

      dhd_wlfc_init(): wlfc_mode=0x1c, ret=0

      CFG80211-ERROR) wl_update_wiphybands : error reading vhtmode (-23)

      wl_create_event_handler(): thread:wl_event_handler:191 started

      CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xa8da143c

       

      root#ifconfig

      lo        Link encap:Local Loopback

                inet addr:127.0.0.1  Mask:255.0.0.0

                inet6 addr: ::1%1995740880/128 Scope:Host

                UP LOOPBACK RUNNING  MTU:65536  Metric:1

                RX packets:4 errors:0 dropped:0 overruns:0 frame:0

                TX packets:4 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:0

                RX bytes:240 (240.0 B)  TX bytes:240 (240.0 B)

       

       

      wlan0     Link encap:Ethernet  HWaddr 00:90:4C:C5:12:38

                inet6 addr: fe80::290:4cff:fec5:1238%1995740880/64 Scope:Link

                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                TX packets:19 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:1000

                RX bytes:0 (0.0 B)  TX bytes:3547 (3.4 KiB)

       

      >>so it seems the wifi module start correctly, but when i try to scan for AP, it get nothing:

       

       

       

      root#iw dev wlan0 scan

      root#

       

       

      >>it get nothing back,and when i try to connect it to my AP, it get errors:

       

      root#cat /etc/wpa_supplicant.conf

      network={

              ssid="mkg_mkg_mkg"

              #psk="mkg111mkg"

              psk=0451880a65df66aefa42bfd1a01d954e82b69e536656a5a08b1dd324fb8c5682

      }

      root#wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D nl80211

      Successfully initialized wpa_supplicant

      rfkill: Cannot open RFKILL control device

       

      >>it seems the rfkill is not loaded in, so i add it in the linux config file, but the wifi modle is still not working. When i try to connect to the ap, it just keep printing "discovering..." but can not conect it.

       

      I am thinking maybe thereis something wrong with the driver or the cmd i use, maybe they are too old? here is my dts of linux and schematic,please give me some advice.

       

      Thanks very much!

       

      bcmdhd_wlan_0: bcmdhd_wlan@0 {

      compatible = "android,bcmdhd_wlan";

      /* WL_HOST_WAKE=GPIO<5,2>, WL_REG_ON=GPIO<5,1> */

      gpios = <&gpio5 2 0>;

      wlreg_on-supply = <&wlreg_on>;

      };

       

      regulators {

      compatible = "simple-bus";

      #address-cells = <1>;

      #size-cells = <0>;

       

      wlreg_on: fixedregulator@100 {

      compatible = "regulator-fixed";

      regulator-min-microvolt = <3300000>;

      regulator-max-microvolt = <3300000>;

      regulator-name = "wlreg_on";

      gpio = <&gpio5 1 0>;

      startup-delay-us = <100>;

      enable-active-high;

      };

      };

      /*wifi*/

      &usdhc1 {

      pinctrl-names = "default", "state_100mhz", "state_200mhz";

      pinctrl-0 = <&pinctrl_usdhc1>;

      pinctrl-1 = <&pinctrl_usdhc1_100mhz>;

      pinctrl-2 = <&pinctrl_usdhc1_200mhz>;

      cd-gpios = <&gpio7 6 GPIO_ACTIVE_HIGH>;

      /*cd-post;*/

      bus-width = <4>;

      no-1-8-v;

      enable-sdio-wakeup;

      keep-power-in-suspend;

      non-removable;

      pm-ignore-notify;

      wifi-host;

      status = "okay";

      };

      pinctrl_usdhc1: usdhc1grp {

      fsl,pins = <

      MX7D_PAD_SD1_CMD__SD1_CMD 0x59

      MX7D_PAD_SD1_CLK__SD1_CLK 0x19

      MX7D_PAD_SD1_DATA0__SD1_DATA0 0x59

      MX7D_PAD_SD1_DATA1__SD1_DATA1 0x59

      MX7D_PAD_SD1_DATA2__SD1_DATA2 0x59

      MX7D_PAD_SD1_DATA3__SD1_DATA3 0x59

      MX7D_PAD_SD1_WP__GPIO5_IO1 0x59

      >;

      };