This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

R5.SP4.01 calibrator issues with wl12xx driver in 3.12.13 kernel

Hello All,

I've been investigating migrating one of our products from a 2.6.39 kernel to a much newer 3.12.13 kernel and have run into issues using the R5.SP4 version of the ti-utils calibrator utility in conjunction with the wl12xx driver from the 3.12.13 kernel.

Our custom hardware uses the wl1271-based Murata LBEE5ZSTNC-523 chip and an Atmel SAM9G25 processor.

With the 2.6.39 kernel we were using compat wireless and the R5.SP4.01 verison of the wl12xx driver as well as R5.SP4.01 versions of firmware for the chip.  We could consistently calibrate the chip without any issues whatsoever using this setup.

Using the driver from the 3.12.13 kernel, we can bring up and use the wireless interface, but we cannot calibrate it. The calibrate step fails with the following error:

wl1271_sdio: probe of mmc0:0001:1 failed with error -110
wl1271_sdio: probe of mmc0:0001:2 failed with error -110
Fail to set PLT power mode on

Clearly, the probe of the chip timed out, and it looks like the chip may not even be powered on at this point.  We are using the same calibration process, firmware, and calibrator tool as before, only the driver has changed.

Has anybody had success using the wl12xx driver included in a newer 3.x  linux kernel (3.12 specifically)?  Any suggestions or help would be appreciated.

-Mike

  • Hi Miki,

    We don't support wl12xx drivers for kernel v3.12...

    But looking at your post, I think you are directly using the drivers from the kernel source. This is not correct. You still need to use the compat wireless method to build.

    The latest wl12xx driver git tag is: "ol_R5.SP7.01" - as you can see, the one you are using is considerably old...
    I suggest that you try the compat wireless approach with the latest release.

    Regards,
    Gigi Joseph.

  • The reason we wanted to use the in-kernel driver is to simplify things and remove the compat wireless complexity if possible.  Why are those drivers in the kernel source if they're not supported?

    We have tested R5.SP7.01 drivers and had issues with wifi stability when the bluetooth interface is up.  Rolling back to R5.SP4.01 seemed to resolve these issues, which is why I'm currently using firmware and ti-utils from R5.SP4.01.  My coworker posted about that issue on this forum (http://e2e.ti.com/support/wireless_connectivity/f/307/p/327878/1151317.aspx#1151317) but never received a good answer.

    That small rant aside, I managed to get the calibrator from ti-utils R5.SP4.01 working in conjunction with the wl12xx driver built into the 3.12.13 kernel.  I stumbled across an email thread on spinics which was quite helpful (http://www.spinics.net/lists/linux-wireless/msg115021.html).  I'll explain what had to be done to get working in the hopes that it will help somebody else spend less time on a similar issue...

    I had to patch a small bug in the calibrator utility.  The buffer containing the nvs file isn't explicitly initialized with a memset call and because of that the nvs file being used was <name of nvs file> + <some garbage> and this was causing the utility to bail out after determining that that bogus file name didn't exist.  I simply added the memset call to properly initialize the buffer.  The contents of the patch are:

    Index: git/plt.c
    ===================================================================
    --- git.orig/plt.c	2014-04-21 12:40:07.000000000 -0500
    +++ git/plt.c	2014-05-02 07:39:38.700287656 -0500
    @@ -439,6 +439,9 @@
     	int i;
     	char nvs_path[PATH_MAX];
     
    +	/* MTS: initialize the buffer so it's not full of garbage */
    +	memset(nvs_path, '\0', sizeof(nvs_path));
    +
     	if (argc < 8) {
     		fprintf(stderr, "%s> Missing arguments\n", __func__);
     		return 2;
    

    I took the following steps to calibrate manually: (to start, wl12xx needs to be unloaded)

      NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin"
      REF_NVS="/usr/share/ti/wifi-utils/ini_files/127x/TQS_S_2.6.ini"
    INTERFACE="wlan0"
    WIFIMAC=<your interface mac address> calibrator set ref_nvs $REF_NVS $NVS_FILE calibrator set nvs_mac $NVS_FILE $WIFIMAC modprobe wl12xx sleep 1
    # set interface mac address ifconfig $INTERFACE hw ether $WIFIMAC
    echo "calibrating..." ifconfig $INTERFACE down calibrator dev $INTERFACE plt power_mode on calibrator dev $INTERFACE plt tune_channel 0 7 calibrator dev $INTERFACE plt nvs_ver 403 calibrator dev $INTERFACE plt tx_bip 1 0 0 0 0 0 0 0 $NVS_FILE calibrator dev $INTERFACE plt power_mode off

    This did the trick for me.  Hopefully it will help somebody else too.

    -Mike