On Wed, Sep 17, 2014 at 9:17 AM, Sujith Manoharan <suj...@msujith.org> wrote: > Grumbach, Emmanuel wrote: >> It can wait until a context switch will occur in ath9k - you should switch >> from time to time anyway to avoid starvation, and this is not under the radar >> of mac80211. > > But mac80211 doesn't wait for a switch to happen. It removes the BSS and > station > info immediately after sending the deauth frame to the driver and the driver > doesn't > get a chance to process the pending frames for the other context. I think > this race could be avoided by making sure the driver switches to the > required context before sending deauth. >
mac80211 will not wait until the context switch happen specifically, but if you can wait in the driver in the flush() callback until the deauth is being sent - whatever you need to happen to have that done, context switch, TX queues to move etc... - then you should be good? IIRC, mac80211 sends the deauth to the driver and then calls flush() - only then, it'll remove the contexts. So I guess that we agree - the solution for you I guess is to wait until you have context switch in the flush() callback. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html