|
@@ -2495,7 +2495,11 @@ enum ieee80211_roc_type {
|
|
|
* AP, IBSS/WDS/mesh peer etc. This callback can sleep.
|
|
|
*
|
|
|
* @sta_remove: Notifies low level driver about removal of an associated
|
|
|
- * station, AP, IBSS/WDS/mesh peer etc. This callback can sleep.
|
|
|
+ * station, AP, IBSS/WDS/mesh peer etc. Note that after the callback
|
|
|
+ * returns it isn't safe to use the pointer, not even RCU protected;
|
|
|
+ * no RCU grace period is guaranteed between returning here and freeing
|
|
|
+ * the station. See @sta_pre_rcu_remove if needed.
|
|
|
+ * This callback can sleep.
|
|
|
*
|
|
|
* @sta_add_debugfs: Drivers can use this callback to add debugfs files
|
|
|
* when a station is added to mac80211's station list. This callback
|
|
@@ -2514,7 +2518,17 @@ enum ieee80211_roc_type {
|
|
|
* station (which can be the AP, a client, IBSS/WDS/mesh peer etc.)
|
|
|
* This callback is mutually exclusive with @sta_add/@sta_remove.
|
|
|
* It must not fail for down transitions but may fail for transitions
|
|
|
- * up the list of states.
|
|
|
+ * up the list of states. Also note that after the callback returns it
|
|
|
+ * isn't safe to use the pointer, not even RCU protected - no RCU grace
|
|
|
+ * period is guaranteed between returning here and freeing the station.
|
|
|
+ * See @sta_pre_rcu_remove if needed.
|
|
|
+ * The callback can sleep.
|
|
|
+ *
|
|
|
+ * @sta_pre_rcu_remove: Notify driver about station removal before RCU
|
|
|
+ * synchronisation. This is useful if a driver needs to have station
|
|
|
+ * pointers protected using RCU, it can then use this call to clear
|
|
|
+ * the pointers instead of waiting for an RCU grace period to elapse
|
|
|
+ * in @sta_state.
|
|
|
* The callback can sleep.
|
|
|
*
|
|
|
* @sta_rc_update: Notifies the driver of changes to the bitrates that can be
|
|
@@ -2827,6 +2841,9 @@ struct ieee80211_ops {
|
|
|
struct ieee80211_sta *sta,
|
|
|
enum ieee80211_sta_state old_state,
|
|
|
enum ieee80211_sta_state new_state);
|
|
|
+ void (*sta_pre_rcu_remove)(struct ieee80211_hw *hw,
|
|
|
+ struct ieee80211_vif *vif,
|
|
|
+ struct ieee80211_sta *sta);
|
|
|
void (*sta_rc_update)(struct ieee80211_hw *hw,
|
|
|
struct ieee80211_vif *vif,
|
|
|
struct ieee80211_sta *sta,
|