aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorZhao, Gang <gamerh2o@gmail.com>2014-04-25 21:43:40 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-04-28 11:52:32 -0400
commit7df180f7f19355ba3017f6d6d74c2008b66db43d (patch)
treed77aa63f53e6a3192ad0c6f6f63ebc5411687328 /net/mac80211
parent8eca1fb692cc9557f386eddce75c300a3855d11a (diff)
mac80211: avoid calling useless channel context code
ieee80211_assign_chanctx() checks if local->use_chanctx is true, so the two code block related to ieee80211_assign_chanctx() can be moved into above if clause, emphasize that these code are executed only if local->use_chanctx is true. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> [change subject] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/util.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 7a376f826cf8..cafbae701d3d 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1565,17 +1565,17 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1565 list_for_each_entry(ctx, &local->chanctx_list, list) 1565 list_for_each_entry(ctx, &local->chanctx_list, list)
1566 WARN_ON(drv_add_chanctx(local, ctx)); 1566 WARN_ON(drv_add_chanctx(local, ctx));
1567 mutex_unlock(&local->chanctx_mtx); 1567 mutex_unlock(&local->chanctx_mtx);
1568 }
1569 1568
1570 list_for_each_entry(sdata, &local->interfaces, list) { 1569 list_for_each_entry(sdata, &local->interfaces, list) {
1571 if (!ieee80211_sdata_running(sdata)) 1570 if (!ieee80211_sdata_running(sdata))
1572 continue; 1571 continue;
1573 ieee80211_assign_chanctx(local, sdata); 1572 ieee80211_assign_chanctx(local, sdata);
1574 } 1573 }
1575 1574
1576 sdata = rtnl_dereference(local->monitor_sdata); 1575 sdata = rtnl_dereference(local->monitor_sdata);
1577 if (sdata && ieee80211_sdata_running(sdata)) 1576 if (sdata && ieee80211_sdata_running(sdata))
1578 ieee80211_assign_chanctx(local, sdata); 1577 ieee80211_assign_chanctx(local, sdata);
1578 }
1579 1579
1580 /* add STAs back */ 1580 /* add STAs back */
1581 mutex_lock(&local->sta_mtx); 1581 mutex_lock(&local->sta_mtx);