hostapd (git) with Linux > 3.2

Mihai Moldovan ionic
Mon Jan 28 11:00:38 PST 2013

Hi all,

ever since Linux 3.3, I'm experiencing issues with hostapd.

Using two ath9k cards, kernels newer than 3.2 can't handle any STAs anymore.
They just can't connect.
Downgrading the kernel to 3.2, leaving the hostapd binary intact, does fix the

Now, I've tracked this issue down by bisecting the kernel list. Thus, I'm also
CCing the ath9k mailing list - maybe people on there know one or two things
about this issue, too.

Note, that I would have done that before, but other kernel issues preventing me
from using a kernel newer than 3.1 for more than a few seconds.... those issues
are now (more or less) fixed and I could get down to the hostapd problem.

This is the result of bisecting Linux:

# bad: [02f3169eee620366301c23d29622eb0f69046607] Linux 3.4.27
# good: [20c7bbdde3de202d847f7e9f14cbd7ffeb03e81e] Linux 3.2.35
git bisect start 'v3.4.27' 'v3.2.35'
# good: [805a6af8dba5dfdd35ec35dc52ec0122400b2610] Linux 3.2
git bisect good 805a6af8dba5dfdd35ec35dc52ec0122400b2610
# bad: [3268968ddc978f12a4b72c8ebe8eafba68c26aa1] bfin: add bfin_ad73311_machine
platform device
git bisect bad 3268968ddc978f12a4b72c8ebe8eafba68c26aa1
# bad: [6296e5d3c067df41980a5fd09ad4cc6765f79bb9] Merge branch 'slab/for-linus'
of git://
git bisect bad 6296e5d3c067df41980a5fd09ad4cc6765f79bb9
# bad: [972b2c719990f91eb3b2310d44ef8a2d38955a14] Merge branch 'for-linus2' of
git bisect bad 972b2c719990f91eb3b2310d44ef8a2d38955a14
# bad: [6c349210101352103d9055636845155bc801ae9b] tipc: Streamline media
registration error checking
git bisect bad 6c349210101352103d9055636845155bc801ae9b
# bad: [7e02e5433e004713a89f5f865a243133b55dcc88] can: cc770: legacy CC770 ISA
bus driver
git bisect bad 7e02e5433e004713a89f5f865a243133b55dcc88
# good: [fc0b927d9a5024e138c4318fe19a590f23e3eeec] net: Revert ARCNET and PHYLIB
to tristate options
git bisect good fc0b927d9a5024e138c4318fe19a590f23e3eeec
# bad: [e11c259f745889b55bc5596ca78271f2f5cf08d2] Merge branch 'master' of
git:// into for-davem
git bisect bad e11c259f745889b55bc5596ca78271f2f5cf08d2
# good: [5b45e54e77cc29a760461ca64cf143ffa49493b6] brcm80211: fmac: abstract
chip buscore setup function
git bisect good 5b45e54e77cc29a760461ca64cf143ffa49493b6
# good: [8f5f69824fe221a36df781c2aee9fa1d74e89077] forcedeth: stats updated with
a deferrable timer
git bisect good 8f5f69824fe221a36df781c2aee9fa1d74e89077
# bad: [79d3eef89190ee0a7ee585e3949873241bc382e3] iwlagn: add P2P NoA to probe
git bisect bad 79d3eef89190ee0a7ee585e3949873241bc382e3
# bad: [eedf15d34d3997051cc3a4bdd2adef68f3e36f57] mwifiex: use existing helper
function mwifiex_fill_cap_info
git bisect bad eedf15d34d3997051cc3a4bdd2adef68f3e36f57
# good: [99ba15cd75ed22e4ae86804ca2982a724e8102c2] brcm80211: fmac: optimize
chip core info management
git bisect good 99ba15cd75ed22e4ae86804ca2982a724e8102c2
# bad: [fba6fe634787bb7ef95fb44682df71b4d4e8cb2d] mwifiex: remove unneeded
git bisect bad fba6fe634787bb7ef95fb44682df71b4d4e8cb2d
# bad: [a729cff8ad5120d0d5172ec28a3843d1cb458f79] mac80211: implement wifi TX status
git bisect bad a729cff8ad5120d0d5172ec28a3843d1cb458f79
# good: [1f074bd8eb7a4a210a5119cd7220f89da6c7a2c3] nl80211: advertise socket TX
status capability
git bisect good 1f074bd8eb7a4a210a5119cd7220f89da6c7a2c3

... and more specifically:

a729cff8ad5120d0d5172ec28a3843d1cb458f79 is the first bad commit
commit a729cff8ad5120d0d5172ec28a3843d1cb458f79
Author: Johannes Berg <johannes.berg at>
Date:   Sun Nov 6 14:13:34 2011 +0100

    mac80211: implement wifi TX status

    Implement the socket wifi TX status error
    queue reflection in mac80211.

    Signed-off-by: Johannes Berg <johannes.berg at>
    Signed-off-by: John W. Linville <linville at>

:040000 040000 8cf4267a6a17b252e95e963a47e0cbcd64264bb4
22efd92e05ba31737a07ba63025003685bfd28cf M    include
:040000 040000 c53d8a2281769a61fb6f473068338cb14f5fd386
c72abd25116aa662ff00e650004aeb85db8beffe M    net

I tried to revert this patch on 3.7.2. Had to fix one line and a few merge
conflicts, but afterwards it compiled fine.
For reference, the patch I used against 3.7.2 is attached.

Applying this patch made hostapd work again for me.

Having a look at the debug output of hostapd, it is revealed, that the unpatched
version of 3.7.2 is making hostapd use no monitor interface, whilst the patched
version is forcing hostapd to create a monitor interface.
I suspect, that ACKs issued by STAs are not received by the unpatched kernel.

Both debug logs are attached as well, for diffing and such.

I have also included my hostapd config files, with the password removed.
Between those two files, only the hwmodes, channels, SSIDs and capabilities differ.

What's more, I'm attaching the .config file my hostapd was built with.
I'm using the current git master with libnl3.2.14.

wlan0 is an AR5416 card (and although lspci says it's may be capable of 802.11a,
it's not):
04:00.0 Network controller [0280]: Atheros Communications Inc. AR5416 Wireless
Network Adapter [AR5008 802.11(a)bgn] [168c:0023] (rev 01)

wlan1 is an AR9380 card:
03:00.0 Network controller [0280]: Atheros Communications Inc. AR9300 Wireless
LAN adaptor [168c:0030] (rev 01)

Any help in resolving this issue is highly appreciated. Not sure if it's a
kernel issue or hostapd build issue.

Best regards,


P.S.: due to message size limits, I resend this message and point to the
following otherwise-hosted files:

  [*] - patch
reverting a729cff8ad512
  [*] -
hostapd debug log with patched kernel
  [*] -
hostapd debug log with unpatched kernel
  [*] - .config file
used to build hostapd
  [*] - hostapd config
file for wlan0
  [*] - hostapd config
file for wlan1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4506 bytes
Desc: S/MIME Cryptographic Signature
Url : 

More information about the Hostap mailing list