mac80211: improve CSA locking
The patch improves channel switch related locking (STA, IBSS, AP, mesh). Now read access to sdata->vif.csa_active is protected by wdev.mtx and local->mtx so holding either is enough for read access but both are required for write access. Keep in mind sdata lock must be taken before local->mtx. Taking them in reverse order creates a deadlock situation. The only exception is ieee80211_beacon_get_tim() but it's safe to leave it as is and it doesn't influence mac80211 state in any way. The patch adds a few lockdep assertions along for easier code/locking maintenance. This also prepares for multi-interface CSA. Signed-off-by:Michal Kazior <michal.kazior@tieto.com> (cherry picked from http://mid.gmane.org/1390227670-19030-6-git-send-email-michal.kazior@tieto.com)
Loading
Please sign in to comment