aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-06 13:18:13 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-09 11:34:35 -0500
commit9214ad7f9a0bfbfb2c204305e7391ce8b7fe4d29 (patch)
treed2f9154097739a3c9656920daf2b54f2c4dbde68
parent60762cbfebafe41425e39d32efc07f260d4a100c (diff)
mac80211: call driver method when restart completes
When the driver requests a restart (reconfiguration) it gets all the normal method calls, but can't really tell why they're happening. Call a new restart_complete op in the driver when the restart completes, so it could keep its own state about the restart and clear it there. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--include/net/mac80211.h6
-rw-r--r--net/mac80211/driver-ops.h10
-rw-r--r--net/mac80211/trace.h5
-rw-r--r--net/mac80211/util.c4
4 files changed, 24 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 23803addca3c..e1d830992319 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2400,6 +2400,10 @@ enum ieee80211_rate_control_changed {
2400 * just "paused" for scanning/ROC, which is indicated by the beacon being 2400 * just "paused" for scanning/ROC, which is indicated by the beacon being
2401 * disabled/enabled via @bss_info_changed. 2401 * disabled/enabled via @bss_info_changed.
2402 * @stop_ap: Stop operation on the AP interface. 2402 * @stop_ap: Stop operation on the AP interface.
2403 *
2404 * @restart_complete: Called after a call to ieee80211_restart_hw(), when the
2405 * reconfiguration has completed. This can help the driver implement the
2406 * reconfiguration step. This callback may sleep.
2403 */ 2407 */
2404struct ieee80211_ops { 2408struct ieee80211_ops {
2405 void (*tx)(struct ieee80211_hw *hw, 2409 void (*tx)(struct ieee80211_hw *hw,
@@ -2561,6 +2565,8 @@ struct ieee80211_ops {
2561 void (*unassign_vif_chanctx)(struct ieee80211_hw *hw, 2565 void (*unassign_vif_chanctx)(struct ieee80211_hw *hw,
2562 struct ieee80211_vif *vif, 2566 struct ieee80211_vif *vif,
2563 struct ieee80211_chanctx_conf *ctx); 2567 struct ieee80211_chanctx_conf *ctx);
2568
2569 void (*restart_complete)(struct ieee80211_hw *hw);
2564}; 2570};
2565 2571
2566/** 2572/**
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 1701ad7013a4..4dc2577886ff 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -961,4 +961,14 @@ static inline void drv_stop_ap(struct ieee80211_local *local,
961 trace_drv_return_void(local); 961 trace_drv_return_void(local);
962} 962}
963 963
964static inline void drv_restart_complete(struct ieee80211_local *local)
965{
966 might_sleep();
967
968 trace_drv_restart_complete(local);
969 if (local->ops->restart_complete)
970 local->ops->restart_complete(&local->hw);
971 trace_drv_return_void(local);
972}
973
964#endif /* __MAC80211_DRIVER_OPS */ 974#endif /* __MAC80211_DRIVER_OPS */
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 06a69ebcaede..758836c85a80 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -1411,6 +1411,11 @@ DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1411 TP_ARGS(local, sdata) 1411 TP_ARGS(local, sdata)
1412); 1412);
1413 1413
1414DEFINE_EVENT(local_only_evt, drv_restart_complete,
1415 TP_PROTO(struct ieee80211_local *local),
1416 TP_ARGS(local)
1417);
1418
1414/* 1419/*
1415 * Tracing for API calls that drivers call. 1420 * Tracing for API calls that drivers call.
1416 */ 1421 */
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 1a511afbdf07..84858a14c8bf 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1599,8 +1599,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1599 * If this is for hw restart things are still running. 1599 * If this is for hw restart things are still running.
1600 * We may want to change that later, however. 1600 * We may want to change that later, however.
1601 */ 1601 */
1602 if (!local->suspended) 1602 if (!local->suspended) {
1603 drv_restart_complete(local);
1603 return 0; 1604 return 0;
1605 }
1604 1606
1605#ifdef CONFIG_PM 1607#ifdef CONFIG_PM
1606 /* first set suspended false, then resuming */ 1608 /* first set suspended false, then resuming */