mac80211: remove unused and unneeded remove_sta_debugfs callback
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jun 2019 14:26:58 +0000 (16:26 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 26 Jul 2019 11:21:12 +0000 (13:21 +0200)
The remove_sta_debugfs callback in struct rate_control_ops is no longer
used by any driver, as there is no need for it (the debugfs directory is
already removed recursivly by the mac80211 core.)  Because no one needs
it, just remove it to keep anyone else from accidentally using it in the
future.

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20190612142658.12792-5-gregkh@linuxfoundation.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/rate.h
net/mac80211/sta_info.c

index e39bf85ae4c2eb5ab7c1d4c819568f99b0bddcc9..6cc5b25edf9dfe72a8dcdc28ebf3de50c3b14b20 100644 (file)
@@ -5946,7 +5946,6 @@ struct rate_control_ops {
 
        void (*add_sta_debugfs)(void *priv, void *priv_sta,
                                struct dentry *dir);
-       void (*remove_sta_debugfs)(void *priv, void *priv_sta);
 
        u32 (*get_expected_throughput)(void *priv_sta);
 };
index 5d5348bc41ecbce24be289936a36381bbc8e1106..5397c6dad056124db564f335404c20736ddd7ab4 100644 (file)
@@ -60,15 +60,6 @@ static inline void rate_control_add_sta_debugfs(struct sta_info *sta)
 #endif
 }
 
-static inline void rate_control_remove_sta_debugfs(struct sta_info *sta)
-{
-#ifdef CONFIG_MAC80211_DEBUGFS
-       struct rate_control_ref *ref = sta->rate_ctrl;
-       if (ref && ref->ops->remove_sta_debugfs)
-               ref->ops->remove_sta_debugfs(ref->priv, sta->rate_ctrl_priv);
-#endif
-}
-
 void ieee80211_check_rate_mask(struct ieee80211_sub_if_data *sdata);
 
 /* Get a reference to the rate control algorithm. If `name' is NULL, get the
index 95eb8220e2e47def69ad381539330ec1d47bd599..fb6614f57cbce1fc73831d8a303c634a379e1688 100644 (file)
@@ -1065,7 +1065,6 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
        cfg80211_del_sta_sinfo(sdata->dev, sta->sta.addr, sinfo, GFP_KERNEL);
        kfree(sinfo);
 
-       rate_control_remove_sta_debugfs(sta);
        ieee80211_sta_debugfs_remove(sta);
 
        cleanup_single_sta(sta);