aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-11-04 04:43:54 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-04 07:49:00 -0500
commitcf2c92d840c1424bcb3bb501147c79c9b067ad77 (patch)
tree60629accc499abd5c660e5330ea5880942672e3e /net
parent13a8098af93e31788684c1f2682739beb93dc680 (diff)
mac80211: replace restart_complete() with reconfig_complete()
Drivers might want to know also when mac80211 has completed reconfiguring after resume (e.g. in order to know when frames can be passed to mac80211). Rename restart_complete() to a more-generic reconfig_complete(), and add a new enum to indicate the reconfiguration type. Update the current users with the new prototype. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/driver-ops.h10
-rw-r--r--net/mac80211/trace.h23
-rw-r--r--net/mac80211/util.c5
3 files changed, 30 insertions, 8 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 8e1889ff2e53..9759dd1f0734 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1152,13 +1152,15 @@ static inline void drv_stop_ap(struct ieee80211_local *local,
1152 trace_drv_return_void(local); 1152 trace_drv_return_void(local);
1153} 1153}
1154 1154
1155static inline void drv_restart_complete(struct ieee80211_local *local) 1155static inline void
1156drv_reconfig_complete(struct ieee80211_local *local,
1157 enum ieee80211_reconfig_type reconfig_type)
1156{ 1158{
1157 might_sleep(); 1159 might_sleep();
1158 1160
1159 trace_drv_restart_complete(local); 1161 trace_drv_reconfig_complete(local, reconfig_type);
1160 if (local->ops->restart_complete) 1162 if (local->ops->reconfig_complete)
1161 local->ops->restart_complete(&local->hw); 1163 local->ops->reconfig_complete(&local->hw, reconfig_type);
1162 trace_drv_return_void(local); 1164 trace_drv_return_void(local);
1163} 1165}
1164 1166
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index aeeace5ba47b..809a4983eb4a 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -1562,9 +1562,26 @@ DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1562 TP_ARGS(local, sdata) 1562 TP_ARGS(local, sdata)
1563); 1563);
1564 1564
1565DEFINE_EVENT(local_only_evt, drv_restart_complete, 1565TRACE_EVENT(drv_reconfig_complete,
1566 TP_PROTO(struct ieee80211_local *local), 1566 TP_PROTO(struct ieee80211_local *local,
1567 TP_ARGS(local) 1567 enum ieee80211_reconfig_type reconfig_type),
1568 TP_ARGS(local, reconfig_type),
1569
1570 TP_STRUCT__entry(
1571 LOCAL_ENTRY
1572 __field(u8, reconfig_type)
1573 ),
1574
1575 TP_fast_assign(
1576 LOCAL_ASSIGN;
1577 __entry->reconfig_type = reconfig_type;
1578 ),
1579
1580 TP_printk(
1581 LOCAL_PR_FMT " reconfig_type:%d",
1582 LOCAL_PR_ARG, __entry->reconfig_type
1583 )
1584
1568); 1585);
1569 1586
1570#if IS_ENABLED(CONFIG_IPV6) 1587#if IS_ENABLED(CONFIG_IPV6)
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 5f7b0e935b65..f9319a5dca64 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1998,7 +1998,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1998 * We may want to change that later, however. 1998 * We may want to change that later, however.
1999 */ 1999 */
2000 if (!local->suspended || reconfig_due_to_wowlan) 2000 if (!local->suspended || reconfig_due_to_wowlan)
2001 drv_restart_complete(local); 2001 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_RESTART);
2002 2002
2003 if (!local->suspended) 2003 if (!local->suspended)
2004 return 0; 2004 return 0;
@@ -2009,6 +2009,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
2009 mb(); 2009 mb();
2010 local->resuming = false; 2010 local->resuming = false;
2011 2011
2012 if (!reconfig_due_to_wowlan)
2013 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_SUSPEND);
2014
2012 list_for_each_entry(sdata, &local->interfaces, list) { 2015 list_for_each_entry(sdata, &local->interfaces, list) {
2013 if (!ieee80211_sdata_running(sdata)) 2016 if (!ieee80211_sdata_running(sdata))
2014 continue; 2017 continue;