Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 522269 - [PATCH] Mistake while converting hostap driver to net_device_ops causes hostapd to fail
Summary: [PATCH] Mistake while converting hostap driver to net_device_ops causes hosta...
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-09-09 22:55 UTC by Martin Decky
Modified: 2009-09-29 14:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-09-29 14:33:56 UTC
Type: ---

Attachments (Terms of Use)
Patch to revert the toxic part of the upstream changeset (840 bytes, patch)
2009-09-09 22:55 UTC, Martin Decky
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Linux Kernel 14000 0 None None None Never

Description Martin Decky 2009-09-09 22:55:07 UTC
Created attachment 360364 [details]
Patch to revert the toxic part of the upstream changeset

Description of problem:
During the 2.6.30 kernel development cycle, the hostap driver was converted to use net_device_ops. Within this conversion a tiny mistake was made in hostap_main.c. The original fragment of code was:

    /* use main radio device queue */
    dev->tx_queue_len = 0;

While the equivalent new fragment (with unrelated lines marked) is:

switch(type) {
    dev->netdev_ops = &hostap_mgmt_netdev_ops;  /* unrelated */
    dev->type = ARPHRD_IEEE80211;               /* unrelated */
    dev->header_ops = &hostap_80211_ops;        /* unrelated */
    dev->tx_queue_len = 0;                 /* use main radio device queue */
    dev->netdev_ops = &hostap_master_ops;  /* unrelated */
    dev->netdev_ops = &hostap_netdev_ops;  /* unrelated */

Apparently the condition when dev->tx_queue_len is set to 0 was reversed in the new code, which is wrong.

The original changeset in kernel GIT can be examined here:

Version-Release number of selected component (if applicable):
Any kernel since 2.6.30, e.g. kernel-PAE-

How reproducible:
Always when the hostap driver is used in AP mode (via hostapd).

Steps to Reproduce:
1. Configure and run hostapd to provide AP services
2. Let a different computer/device associate with the AP

Actual results:
The size of TX queue of wifi0 (the physical wireless device) is set to zero.

WPA/WPA2 association works OK (given the configuration of hostapd is correct), but any further communication is blocked (because the size of the TX queue of wifi0 is zero) and error messages are printed to the kernel ring buffer:

Virtual device wifi0 asks to queue packet!

Expected results:
The size of TX queue of wifi0 should be non-zero, the size of queues for wlan0 and wlan0ap should be zero.

Wireless communication should work after successful association, no warnings should be printed to the kernel ring buffer.

Additional info:
Please include the attached patch in the next kernel release for Fedora 11 and rawhide. I am going to send the same patch to the upstream kernel maintainer as well.

Comment 1 Chuck Ebbert 2009-09-25 03:56:00 UTC
Fixed in ... and you should have also submitted that patch for the stable kernel series.

Comment 2 Martin Decky 2009-09-25 08:52:03 UTC
(In reply to comment #1)

Thanks a lot! The fix was merged into linux-next on 2009-09-15.

Should I try to make somebody to merge it into linux-2.6.30.y and linux-2.6.31.y myself now or are you going to do it?

Comment 3 Fedora Update System 2009-09-25 16:01:52 UTC
kernel- has been submitted as an update for Fedora 11.

Comment 4 Fedora Update System 2009-09-29 14:33:06 UTC
kernel- has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.