Skip to contentSkip to conversation

compat-wireless >= 2011-12-16 broken on debian 6.0

ath9k-devel Thomas Hilber 2 participants 6 messages Jan 1, 2012 – Jan 2, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

all compat-wireless-2011-12-XX.tar.bz2 versions before 2011-12-16 work seemless on a debian 6.0. At least for my AR9280, AR9380 and AR9390 based miniPCIe cards.

The versions 2011-12-16 and above require me to encomment following code snippet in nl80211.c

------------------------------8<------------------------------------

#if 0
                /* accept only the listed bits */
                if (params.sta_flags_mask &
                                ~(BIT(NL80211_STA_FLAG_AUTHORIZED) |
                                  BIT(NL80211_STA_FLAG_SHORT_PREAMBLE) |
                                  BIT(NL80211_STA_FLAG_WME) |
                                  BIT(NL80211_STA_FLAG_MFP))) 
                        return -EINVAL;

#endif ------------------------------8<------------------------------------

to avoid messages like

------------------------------8<------------------------------------ Could not set station 00:1f:3b:xx:xx:xx flags for kernel driver (errno=95). ------------------------------8<------------------------------------

I don't know what the official way is to fix this issue. Probably hostapd must be fixed to reflect the API changes since version 2011-12-16.

cheers
Thomas

#1 lore raw
Quoted 2 lines · Thomas Hilber

I don't know what the official way is to fix this issue. Probably hostapd must be fixed to reflect the API changes since version 2011-12-16.

I now answer this myself for your convenience :-)

Following simple steps are needed for debian 6.0 to build hostapd from git. In order to make most recent versions of compat-wireless work again:

---------------8<---------------
apt-get install libnl-dev
apt-get install libssl-dev
git clone git://w1.fi/srv/git/hostap.git
cd hostap/hostapd
cp defconfig .config
vi .config
CONFIG_DRIVER_NL80211=y
CONFIG_IEEE80211N=y
make
---------------8<---------------

cheers
Thomas

#2 lore raw
In reply to Thomas Hilber
Quoted 14 lines · Thomas Hilber

all compat-wireless-2011-12-XX.tar.bz2 versions before 2011-12-16 work seemless on a debian 6.0.

The versions 2011-12-16 and above require me to encomment following code snippet in nl80211.c

#if 0
                /* accept only the listed bits */
                if (params.sta_flags_mask &
                                ~(BIT(NL80211_STA_FLAG_AUTHORIZED) |
                                  BIT(NL80211_STA_FLAG_SHORT_PREAMBLE) |
                                  BIT(NL80211_STA_FLAG_WME) |
                                  BIT(NL80211_STA_FLAG_MFP))) 
                        return -EINVAL;
Quoted 7 lines

#endif

to avoid messages like
Could not set station 00:1f:3b:xx:xx:xx flags for kernel driver (errno=95).

I don't know what the official way is to fix this issue. Probably hostapd must be fixed to reflect the API changes since version 2011-12-16.

That sounds like a regression caused by the cfg80211 changes in commit bdd90d5e36a55271beb957b3d7ca3e29b2a90207 (2011-12-14). We should not be breaking compatibility with older user space tools, so this may desire some workaround in the kernel..

Which hostapd version were you using in the failure case? Based on your follow up message, the current hostap.git snapshot does not have this issue which is good in itself, but still, we should not be forcing this type of user space upgrades with kernel changes without a very good reason.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#3 lore raw
Quoted 2 lines · Jouni Malinen

That sounds like a regression caused by the cfg80211 changes in commit bdd90d5e36a55271beb957b3d7ca3e29b2a90207 (2011-12-14). We should not be

right

Quoted 1 line

Which hostapd version were you using in the failure case? Based on your

it's debian 6.0 stock version of hostapd installed via 'apt-get install hostapd'. According to 'dpkg -l hostapd' debian 6.0 uses hostapd version '0.6.10' + some debian specific patches.

Quoted 2 lines

follow up message, the current hostap.git snapshot does not have this issue which is good in itself, but still, we should not be forcing this

correct. current hostap.git snapshot works even with compat-wireless snapshot of yesterday. It's very easy to compile hostapd from git once you have setup some build environment.

Quoted 2 lines

type of user space upgrades with kernel changes without a very good reason.

ok it's up to you how to proceed here. Thanks to all anyway for your great work on compat-wireless!

cheers
Thomas

#4 lore raw
Quoted 11 lines · Thomas Hilber
Quoted 1 line · Jouni Malinen

Which hostapd version were you using in the failure case? Based on your

it's debian 6.0 stock version of hostapd installed via 'apt-get install hostapd'. According to 'dpkg -l hostapd' debian 6.0 uses hostapd version '0.6.10' + some debian specific patches.

Quoted 2 lines

type of user space upgrades with kernel changes without a very good reason.

ok it's up to you how to proceed here. Thanks to all anyway for your great work on compat-wireless!

Johannes prepared a patch to cfg80211 that may help with this. If you can test this with compat-wireless and the old hostapd version, it would be useful to know whether it resolves the issue. The patch against wireless-testing.git is at http://paste.pocoo.org/raw/528761/

I haven't checked, but I would hope that it would apply to the latest compat-wireless, too.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#5 lore raw
Quoted 2 lines · Jouni Malinen

Johannes prepared a patch to cfg80211 that may help with this. If you can test this with compat-wireless and the old hostapd version, it would

sure. I applied the patch provided against compat-wireless-2011-12-31. It compiles and even works with both current git hostapd and debian 6.0 stock hostapd. Thanks!

cheers
Thomas