Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #1702 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Changeset 2798 causes ioctls to fail

Reported by: Przemyslaw Bruski Assigned to:
Priority: major Milestone: version 0.9.5
Component: madwifi: other Version: trunk
Keywords: Cc:
Patch is attached: 0 Pending:



I've noticed that starting with revision 2798 I cannot associate to AP based on that (or later) revision of madwifi. The problem seems to lie in the ioctls that accept key index as a parameter. When this parameter is set to -1/65535 (which is expected by the caller to be IEEE80211_KEYIX_NONE), madwifi compares it against the new constant modified in the mentioned changeset, equal to 255. I believe that simply backing out 2798 will fix the issue and not introduce other problems (it should be safe, since the compiler won't let compare 16bit KEYIX_NONE against 8bit value from hostapd anyway, so the cast will always have to be added).

Alternatively, ioctl key index parameters have to be sanitized for comparisons with 8bit KEYIX_NONE before use. I think that using 255 as KEYIX_NONE in a 16bit variable is a workaround anyway and it would be better to stick to 65535 and cast the keyix from ieee80211req_del_key instead.

I think this problem was already reported in #1693 where two problems (association problem and oops) are reported. #1693 was diagnosed to contain only the oops.


Przemyslaw Bruski

Change History

12/20/07 03:03:26 changed by mentor

  • priority changed from critical to major.

12/20/07 03:05:39 changed by mentor

Interesting, I'd just looked at that today. The correct solution is to have delkey ioctls use ieee80211_keyix_t, but that changes ABI, and will require hostapd to be recompiled.

I was just about to post to the -devel list to see what people think.

12/21/07 18:52:58 changed by anonymous


I've noticed that you've checked in a solution that involves recompilation of hostapd. How about making it configurable? Adding ifdefs to the cast and ieee80211req_del_key structure seems simple enough and would make obligatory recompilation of hostapd unnecessary - you would only need to compile madwifi appropriately.


Przemyslaw Bruski

12/21/07 19:01:22 changed by mentor

I'm not so keen on adding that much complexity to maintaining an ABI that is clearly wrong and has never been claimed to be stable.

12/21/07 19:27:49 changed by mentor

12/22/07 02:37:41 changed by mentor

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone set to version 0.9.4.

02/11/08 06:23:22 changed by mrenzmann

  • milestone changed from version 0.9.4 to version 0.9.5.