Menu Home

Using rt2x00 wireless driver with hostapd

Using rt2x00 wireless driver with hostapd

The problem

A few month ago i bought an rt73-base usb wifi dongle to make a low-cost access-point from my old linux box. Unfortunately i couldn’t make it work until last week, when i finally figured out the root of the problem. First of all, i used the latest rt2x00 development kernel (how to get it), and the latest hostapd from the git repository. The official howto on the rt2x00 wiki is quite good, but it didn’t work with my TL-WN321G wifi dongle, so i had to find out what’s the problem. First the hostapd started up, and the clients could associate, but when i tried to send packages, the hostapd dropped error messages in an infinite loop:

wlan0: STA 00:12:f0:76:03:b9 IEEE 802.11: association OK (aid 1)
MGMT (TX callback) fail
mgmt::assoc_resp cb
wlan0: STA 00:12:f0:76:03:b9 IEEE 802.11: did not acknowledge association
Sending disassociation info to STA 00:12:f0:76:03:b9
MGMT (TX callback) fail
unknown mgmt cb frame subtype 10


And then it reassociates with the client, does it again and again. So after few days spent on trying to figure out what is the problem, i found some interesting posts on hostapd, and rt2x00 mailing lists on this topic. The most interesting is this thread. The discussion is about three patch, and the first one is the important one. They say, that the driver can not ackowledge the completion of sending certain frames, because of hardware limitations. So, the case is, that the driver can’t acknowledge these frames, but the hostapd wants an acknowledgement, or it won’t function function properly.

The possible solutions

There are two solutions.

  • Patch the driver to acknowledge the frames even if it is not sure that they have been succesfully sent.
  • Patch hostapd to ignore the lack of acknowledgement.

The second one seems to be the easier way, so i have chosen to patch hostapd.

Patching hostapd

You have to comment out two lines in the ieee802_11.c file. Search for “did not acknowledge” in the file, and comment out the “return;” command after the lines that contain the “did not acknowledge” string. So after commenting out the return lines, the two blocks look like this:

if (!ok) {
hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
"did not acknowledge authentication response");

if (!ok) {
hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
"did not acknowledge association response");


15 replies

  1. I am also writing to make you understand what a incredible experience my friend’s child developed viewing your web site. She came to understand some pieces, with the inclusion of how it is like to have an amazing coaching heart to let many people without hassle master chosen very confusing topics. You actually surpassed my desires. Thanks for imparting these invaluable, trustworthy, informative and in addition cool tips about this topic to Ethel.

  2. I simply needed to say thanks again. I’m not certain the things that I would’ve sorted out without the creative ideas provided by you relating to my topic. It was actually a depressing issue in my position, nevertheless seeing the skilled style you processed the issue forced me to weep over contentment. I’m just thankful for the information and then believe you realize what a great job you were getting into training the others thru your blog post. I am sure you haven’t met all of us.

  3. I and my pals appeared to be analyzing the best solutions on the blog while the sudden developed a terrible suspicion I never expressed respect to you for those strategies. My young boys had been certainly joyful to read all of them and have unquestionably been enjoying them. Appreciate your simply being really helpful and for making a choice on some very good tips millions of individuals are really desperate to know about. Our own honest regret for not saying thanks to you sooner.

  4. I want to express appreciation to you for bailing me out of such a dilemma. After scouting through the internet and getting opinions that were not beneficial, I believed my entire life was over. Living minus the answers to the difficulties you have resolved by way of the site is a serious case, as well as ones that would have adversely damaged my career if I had not come across your web page. The capability and kindness in dealing with the whole thing was very useful. I am not sure what I would have done if I hadn’t come upon such a stuff like this. It’s possible to at this point look ahead to my future. Thanks for your time so much for this skilled and effective help. I won’t hesitate to endorse the website to any individual who needs direction on this area.

  5. I am glad for writing to let you understand of the awesome experience my wife’s daughter developed reading through your web page. She picked up a wide variety of details, including what it’s like to possess a marvelous helping spirit to get other people completely have an understanding of some complex matters. You really exceeded my expected results. Thank you for imparting such informative, trusted, revealing and even unique thoughts on this topic to Ethel.

  6. I intended to compose you the bit of remark to help thank you over again for your personal precious concepts you have featured here. It’s really strangely open-handed with people like you to allow easily precisely what most of us would’ve made available as an electronic book to make some dough on their own, specifically given that you might have tried it in case you wanted. Those points additionally worked as the great way to be sure that some people have the same fervor just as my personal own to know the truth significantly more related to this condition. I believe there are numerous more pleasurable occasions up front for individuals who go through your website.

  7. Thanks for all of your labor on this web site. Betty really loves carrying out internet research and it is easy to understand why. A lot of people know all concerning the dynamic tactic you make very helpful suggestions on your blog and strongly encourage participation from other people on the situation and our favorite child is certainly becoming educated so much. Take pleasure in the rest of the new year. You are always carrying out a fantastic job.

  8. I definitely wanted to jot down a message to appreciate you for those awesome techniques you are showing on this site. My time intensive internet look up has finally been rewarded with reputable information to write about with my visitors. I would mention that most of us visitors actually are truly fortunate to be in a good website with very many lovely individuals with good tips and hints. I feel very privileged to have seen your entire site and look forward to tons of more fun times reading here. Thank you once more for everything.

  9. I actually wanted to make a small word so as to thank you for these splendid tips and hints you are giving on this website. My prolonged internet investigation has at the end been rewarded with reputable points to exchange with my classmates and friends. I ‘d say that most of us visitors actually are definitely endowed to live in a decent website with many outstanding people with useful hints. I feel rather lucky to have seen your webpages and look forward to so many more thrilling times reading here. Thanks a lot once again for a lot of things.

  10. My husband and i got relieved when Chris managed to finish off his homework from your precious recommendations he gained using your site. It is now and again perplexing to just possibly be handing out information some other people could have been selling. And we also acknowledge we need you to thank for this. Those illustrations you have made, the easy blog navigation, the relationships your site make it possible to foster – it’s all exceptional, and it is leading our son in addition to us know that the subject is interesting, and that’s extremely indispensable. Thanks for everything!

  11. Thank you so much for providing individuals with such a superb chance to read from this blog. It’s usually very excellent and stuffed with amusement for me personally and my office co-workers to visit your website at minimum thrice a week to study the fresh tips you have. Of course, we are always astounded with your remarkable thoughts you give. Selected 1 areas on this page are in truth the best we have all had.

  12. Needed to compose you a little note to be able to thank you very much over again relating to the amazing tips you have documented here. It is incredibly open-handed with people like you to offer without restraint precisely what many of us might have made available as an electronic book to help make some dough on their own, particularly now that you might have tried it in the event you considered necessary. The thoughts also acted to provide a good way to be sure that other individuals have similar desire the same as my own to figure out a little more on the topic of this issue. I’m certain there are thousands of more enjoyable instances up front for individuals who discover your blog.

  13. Thanks a lot for giving everyone a very special possiblity to read in detail from here. It is often very pleasant and as well , jam-packed with a great time for me and my office co-workers to search your site at a minimum 3 times in a week to read the new tips you have got. Of course, I’m also always impressed concerning the incredible tips and hints served by you. Certain 4 facts on this page are certainly the most efficient we’ve had.

  14. I would like to show thanks to you just for rescuing me from this type of issue. After looking through the the net and finding opinions that were not pleasant, I figured my life was well over. Being alive without the answers to the issues you’ve resolved by way of your good write-up is a serious case, and the kind which might have in a wrong way damaged my entire career if I had not discovered your web page. Your personal natural talent and kindness in taking care of the whole lot was crucial. I don’t know what I would have done if I hadn’t discovered such a step like this. I’m able to at this time look ahead to my future. Thanks very much for the expert and sensible guide. I will not think twice to recommend your site to any individual who needs to have recommendations on this area.

  15. I would like to express my thanks to you just for rescuing me from such a dilemma. After looking throughout the search engines and meeting solutions which were not powerful, I was thinking my life was well over. Being alive without the solutions to the issues you’ve fixed by means of your main short post is a crucial case, as well as ones that could have negatively affected my career if I had not noticed your blog post. Your actual skills and kindness in dealing with the whole lot was invaluable. I’m not sure what I would’ve done if I had not discovered such a step like this. I’m able to at this moment look ahead to my future. Thanks very much for the expert and result oriented help. I will not hesitate to endorse the website to any individual who will need guidance on this issue.

Leave a Reply

Your email address will not be published.