• Johannes Berg's avatar
    mac80211: fix station destruction in AP/mesh modes · 97f97b1f
    Johannes Berg authored
    Unfortunately, commit b22cfcfc, intended to speed up roaming
    by avoiding the synchronize_rcu() broke AP/mesh modes as it moved
    some code into that work item that will still call into the driver
    at a time where it's no longer expected to handle this: after the
    AP or mesh has been stopped.
    To fix this problem remove the per-station work struct, maintain a
    station cleanup list instead and flush this list when stations are
    flushed. To keep this patch smaller for stable, do this when the
    stations are flushed (sta_info_flush()). This unfortunately brings
    back the original roaming delay; I'll fix that again in a separate
    Also, Ben reported that the original commit could sometimes (with
    many interfaces) cause long delays when an interface is set down,
    due to blocking on flush_workqueue(). Since we now maintain the
    cleanup list, this particular change of the original patch can be
    Cc: stable@vger.kernel.org [3.7]
    Reported-by: default avatarBen Greear <greearb@candelatech.com>
    Tested-by: default avatarBen Greear <greearb@candelatech.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
iface.c 43.5 KB