[PATCH v3 00/23] ath6kl cleaned up driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


last May we started working on cleaning up ath6kl driver which is
currently in staging. The work has happened in a separate
ath6kl-cleanup tree:


After over 1200 (!) patches we have now reached a state where I would
like to start discussing about pushing the driver to the wireless
trees and replacing the staging driver.

The driver is now a lot smaller and looks like a proper Linux driver.
For example, I'm now a lot more comfortable working with this driver
than the staging driver. The size of the driver (measured with simple
wc -l) dropped from 49 kLOC to 18 kLOC and the number of the .c and .h
files dropped from 107 to 22. Most importantly the number of
subdirectories reduced from 26 to zero :)

There are two remaining checkpatch warnings in the driver which we
decided to omit for now:

  WARNING: printk() should include KERN_ facility level
  WARNING: msleep < 20ms can sleep for up to 20ms; 
  see Documentation/timers/timers-howto.txt

The driver has endian annotations for all the hardware specific
structures and there are no sparse errors. Unfortunately I don't have
any big endian hardware to test that but we are trying find something.

We have been testing the driver both on x86 and arm platforms. The
code is also compiled with sparc and parisc cross compilers.

Notable missing features compared to the current staging driver are:

o HCI over SDIO support
o nl80211 testmode
o firmware logging
o suspend support (forgot to mention this in v1)

Testmode, firmware logging and suspend support will be added soon. HCI
over SDIO support will be more difficult as the HCI driver needs to
share code with the wifi driver. This is something we need to research

Even we have done a lot of cleanup, it's still not fully finished. The
todo list is available here:


The most important tasks left are:

o proper review of locking (currently 13 spin locks and one semaphore)
o excessive use of void pointers

But I think these cleanups can happen in wireless-testing tree as
well. There is no need to keep the driver out-of-tree anymore as the
changes should be pretty small compared to the changes we had until

Also I want to point out the changes I did for signed endian support.
As I wasn't able to find any support for signed endian annotations I
decided to follow what NTFS has done and added my own. Grep for sle16
and sle32, especially from wmi.h.

Various people have been working on the cleanup, the hall of
fame based on number of patches is:

   543  Vasanthakumar Thiagarajan
   403  Raja Mani
   252  Kalle Valo
    16  Vivek Natarajan
    12  Suraj Sumangala
     3  Joe Perches
     2  Jouni Malinen
I'm sending the patch in multiple emails, one file per message, to
make it easier to review. The driver is also available as one patch to
make it easier for John to commit:


Note: these patches now depend on my patch "ieee80211: add few wmm
tspec values" which I sent earlier today.

Please review and comment. John, please consider taking this driver to


Changes from v2:

o log message cleanup (joe)
o WPA1 preferred over WPA2 (kvalo)
o remove remaining wext code (kvalo)
o check errors from ath6kl_set_auth_type() (kvalo)
o don't check ssid in cfg80211.c (kvalo)
o use pairwise parameter in ath6kl_cfg80211_add_key() (kvalo)
o remove ath6kl_cfg80211_set_default_mgmt_key() (kvalo)
o return error if ibss_param->channel_fixed is set (kvalo)

Changes from v1:

o don't split log messages (kvalo)
o use wmi prefix in wmi.c (raja)
o smatch fixes (vasanth)
o use only public ieee80211 defines and remove ieee80211.h (kvalo)


Kalle Valo (23):
      ath6kl: add bmi.c
      ath6kl: add bmi.h
      ath6kl: add cfg80211.c
      ath6kl: add cfg80211.h
      ath6kl: add common.h
      ath6kl: add core.h
      ath6kl: add debug.c
      ath6kl: add debug.h
      ath6kl: add hif-ops.h
      ath6kl: add hif.h
      ath6kl: add htc.c
      ath6kl: add htc.h
      ath6kl: add htc_hif.c
      ath6kl: add htc_hif.h
      ath6kl: add init.c
      ath6kl: add main.c
      ath6kl: add node.c
      ath6kl: add sdio.c
      ath6kl: add target.h
      ath6kl: add txrx.c
      ath6kl: add wmi.c
      ath6kl: add wmi.h
      ath6kl: add Kconfig and Makefile

 drivers/net/wireless/ath/Kconfig           |    1 
 drivers/net/wireless/ath/Makefile          |    1 
 drivers/net/wireless/ath/ath6kl/Kconfig    |   17 
 drivers/net/wireless/ath/ath6kl/Makefile   |   35 
 drivers/net/wireless/ath/ath6kl/bmi.c      |  692 +++++++
 drivers/net/wireless/ath/ath6kl/bmi.h      |  250 +++
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 1538 ++++++++++++++++
 drivers/net/wireless/ath/ath6kl/cfg80211.h |   39 
 drivers/net/wireless/ath/ath6kl/common.h   |  183 ++
 drivers/net/wireless/ath/ath6kl/core.h     |  546 ++++++
 drivers/net/wireless/ath/ath6kl/debug.c    |  150 ++
 drivers/net/wireless/ath/ath6kl/debug.h    |  104 +
 drivers/net/wireless/ath/ath6kl/hif-ops.h  |   67 +
 drivers/net/wireless/ath/ath6kl/hif.h      |  214 ++
 drivers/net/wireless/ath/ath6kl/htc.c      | 2466 +++++++++++++++++++++++++
 drivers/net/wireless/ath/ath6kl/htc.h      |  596 ++++++
 drivers/net/wireless/ath/ath6kl/htc_hif.c  |  811 ++++++++
 drivers/net/wireless/ath/ath6kl/htc_hif.h  |  113 +
 drivers/net/wireless/ath/ath6kl/init.c     | 1293 +++++++++++++
 drivers/net/wireless/ath/ath6kl/main.c     | 1337 ++++++++++++++
 drivers/net/wireless/ath/ath6kl/node.c     |  238 ++
 drivers/net/wireless/ath/ath6kl/sdio.c     |  853 +++++++++
 drivers/net/wireless/ath/ath6kl/target.h   |  331 +++
 drivers/net/wireless/ath/ath6kl/txrx.c     | 1452 +++++++++++++++
 drivers/net/wireless/ath/ath6kl/wmi.c      | 2762 ++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath6kl/wmi.h      | 2024 +++++++++++++++++++++
 26 files changed, 18113 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath6kl/Kconfig
 create mode 100644 drivers/net/wireless/ath/ath6kl/Makefile
 create mode 100644 drivers/net/wireless/ath/ath6kl/bmi.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/bmi.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/cfg80211.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/cfg80211.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/common.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/core.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/debug.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/debug.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/hif-ops.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/hif.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/htc.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/htc.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/htc_hif.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/htc_hif.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/init.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/main.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/node.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/sdio.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/target.h
 create mode 100644 drivers/net/wireless/ath/ath6kl/txrx.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/wmi.c
 create mode 100644 drivers/net/wireless/ath/ath6kl/wmi.h

devel mailing list

[Video for Linux]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Free Singles Community]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Yosemite Backpacking]

Add to Google Powered by Linux