Silex Unwired

Adding SDIO Support in ath10k Driver – Another Silex Initiative for Mass Market Wi-Fi

Posted by Safi Khan on August 16, 2017

Customer feedback is important to us at Silex and whenever we can do something extra that makes them happy, it makes us happy! A recent example of our customer focus at Silex is the ath10k initiative. I want to share  the technical details of this initiative and how our engineering team overcame some of the challenges to making this work. We have had a long history of supporting open-source drivers for Qualcomm Atheros low power Wi-Fi radios dating back to ath5k for some of our legacy modules. Since then, we have supported ath6k, ath9k, and now finally, I want to talk about ath10k.

For a long time, the ath10k open source driver did not support SDIO WiFi radios as only a PCIe interface was available. This lack of SDIO support meant that our customers who use our SX-SDxAC 802.11ac+BT radio modules couldn’t choose the path of staying on the latest open source driver even though they strongly prefer to be on the latest mainline Linux kernel. One of the main reasons they choose open source is to get the benefits of having the latest Kernel version. This ensures they get the latest security updates and enhancements in the Linux kernel.

The ath10k driver is updated to support SDIO interface and validated using QCA9377 reference card with openly available QCA9377 SDIO firmware.

Silex ath10k qca9377 sdio patch image.jpg

When customers approached us to help them, we listened, and today we are happy to share with you some of the technical hurdles we overcame to make the SDIO interface in ath10k fully functional with acceptable performance in terms of latency and driver performance. Here is a brief description from one of our engineering leads that explains how we got here:

  • For the development and validation, we decided to use one ARM based platform and one x86 based platform, as these are the most commonly used platforms for the SDIO drivers. For the ARM base, we decided to use i.MX6SX-SDB platform which has SDIO3.0 controller support which is required to harness the high performance 11AC throughputs of SDMAC.  For the x86 base, we used a Ubuntu Desktop platform with PCIe to SDIO controller.
  • For the i.MX6 SoloX and other Development boards, the vendor provided BSP would only support an older Linux kernel version. But for the driver development, we would have to use the Latest kernel.  We used Yocto based build with 4.1.15 kernel and then replaced only the kernel with 4.13 (The current branch used by ath10k developers/maintainers)
  • There was an SDIO patch available for ath10k. The driver was scanning but not connecting with any access point.  This was because the patch followed the code-aurora driver (which is Ethernet frame based), but it had to be configured for the Native-Wi-Fi frame format.
  • Even after configuring the driver for all correct parameters, we struggled to connect with an Access Point.  Everything looked perfect from the driver, but still no luck.  We reviewed the firmware download process, BMI register configuration, WMI commands with packet dump and all looked perfect.  This was tested on i.MX6 SoloX platform and we could not move forward.  The same driver when tested on the x86 platform worked fine to our surprise.  We then figured out the root-cause to be the problem of i.MX6 host controller driver not able to handle the transfer buffers provided by the ath10k driver for DMA.  We then implemented the DMA buffer method, but this introduces a latency due to memory copy.
  • The implementation did not have proper handlers for Receive packet bundling. This is implemented in the MBOX level.

 

Want to evaluate?

Our patch will be made available to download in the next couple of weeks and it will be upstreamed into the mainline Linux kernel in the coming months. To request early access to the patch before we post it to the open community for download, please send in your request to marketing@silexamerica.com

 

 

Tags: SDIO, ath10k