Commit 89a6051d authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

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: default avatarMichal Kazior <michal.kazior@tieto.com>
(cherry picked from http://mid.gmane.org/1390227670-19030-6-git-send-email-michal.kazior@tieto.com)
parent fadae824
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment