summaryrefslogtreecommitdiffstats
path: root/net/mac80211/trace.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-12-04 16:39:17 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 05:29:44 -0500
commit6a9d1b91f34df1935bc0ad98114801a44db0f98c (patch)
treeecf4637a32c57786a6ac468be5bc392bb28e779d /net/mac80211/trace.h
parentc4de673b775e4db48cd2db6277e0c6714332ca0c (diff)
mac80211: add pre-RCU-sync sta removal driver operation
Currently, mac80211 allows drivers to keep RCU-protected station references that are cleared when the station is removed from the driver and consequently needs to synchronize twice, once before removing the station from the driver (so it can guarantee that the station is no longer used in TX towards the driver) and once after the station is removed from the driver. Add a new pre-RCU-synchronisation station removal operation to the API to allow drivers to clear/invalidate their RCU-protected station pointers before the RCU synchronisation. This will allow removing the second synchronisation by changing the driver API so that the driver may no longer assume a valid RCU-protected pointer after sta_remove/sta_state returns. The alternative to this would be to synchronize_rcu() in all the drivers that currently rely on this behaviour (only iwlmvm) but that would defeat the purpose. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/trace.h')
-rw-r--r--net/mac80211/trace.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 854bc5943127..3a669d7ec7ad 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -766,7 +766,7 @@ TRACE_EVENT(drv_sta_rc_update,
766 ) 766 )
767); 767);
768 768
769TRACE_EVENT(drv_sta_add, 769DECLARE_EVENT_CLASS(sta_event,
770 TP_PROTO(struct ieee80211_local *local, 770 TP_PROTO(struct ieee80211_local *local,
771 struct ieee80211_sub_if_data *sdata, 771 struct ieee80211_sub_if_data *sdata,
772 struct ieee80211_sta *sta), 772 struct ieee80211_sta *sta),
@@ -791,29 +791,25 @@ TRACE_EVENT(drv_sta_add,
791 ) 791 )
792); 792);
793 793
794TRACE_EVENT(drv_sta_remove, 794DEFINE_EVENT(sta_event, drv_sta_add,
795 TP_PROTO(struct ieee80211_local *local, 795 TP_PROTO(struct ieee80211_local *local,
796 struct ieee80211_sub_if_data *sdata, 796 struct ieee80211_sub_if_data *sdata,
797 struct ieee80211_sta *sta), 797 struct ieee80211_sta *sta),
798 TP_ARGS(local, sdata, sta)
799);
798 800
799 TP_ARGS(local, sdata, sta), 801DEFINE_EVENT(sta_event, drv_sta_remove,
800 802 TP_PROTO(struct ieee80211_local *local,
801 TP_STRUCT__entry( 803 struct ieee80211_sub_if_data *sdata,
802 LOCAL_ENTRY 804 struct ieee80211_sta *sta),
803 VIF_ENTRY 805 TP_ARGS(local, sdata, sta)
804 STA_ENTRY 806);
805 ),
806
807 TP_fast_assign(
808 LOCAL_ASSIGN;
809 VIF_ASSIGN;
810 STA_ASSIGN;
811 ),
812 807
813 TP_printk( 808DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
814 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, 809 TP_PROTO(struct ieee80211_local *local,
815 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG 810 struct ieee80211_sub_if_data *sdata,
816 ) 811 struct ieee80211_sta *sta),
812 TP_ARGS(local, sdata, sta)
817); 813);
818 814
819TRACE_EVENT(drv_conf_tx, 815TRACE_EVENT(drv_conf_tx,