mac80211: remove vif debugfs driver callbacks
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 8 Mar 2013 13:46:15 +0000 (14:46 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 18 Mar 2013 19:10:05 +0000 (20:10 +0100)
This basically reverts commit b207cdb07f3f01ec1adaac62e9d0cc918c60a81a.

Now is possible to use drv_{add,remove}_interface() and vif->debugfs_dir
to create/remove per interface debugfs files. Remove redundant
callbacks.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/driver-ops.h
net/mac80211/iface.c

index 8b2c7506f5cb48db8da5a66a8c3ddc0d3b8a29d4..0b912d22f82d22a9e4641de6462b99572cd51404 100644 (file)
@@ -2233,18 +2233,6 @@ enum ieee80211_roc_type {
  *     MAC address of the device going away.
  *     Hence, this callback must be implemented. It can sleep.
  *
- * @add_interface_debugfs: Drivers can use this callback to add debugfs files
- *     when a vif is added to mac80211. This callback and
- *     @remove_interface_debugfs should be within a CONFIG_MAC80211_DEBUGFS
- *     conditional. @remove_interface_debugfs must be provided for cleanup.
- *     This callback can sleep.
- *
- * @remove_interface_debugfs: Remove the debugfs files which were added using
- *     @add_interface_debugfs. This callback must remove all debugfs entries
- *     that were added because mac80211 only removes interface debugfs when the
- *     interface is destroyed, not when it is removed from the driver.
- *     This callback can sleep.
- *
  * @config: Handler for configuration requests. IEEE 802.11 code calls this
  *     function to change hardware configuration, e.g., channel.
  *     This function should never fail but returns a negative error code
@@ -2665,12 +2653,6 @@ struct ieee80211_ops {
                                   struct ieee80211_vif *vif,
                                   struct ieee80211_sta *sta,
                                   struct dentry *dir);
-       void (*add_interface_debugfs)(struct ieee80211_hw *hw,
-                                     struct ieee80211_vif *vif,
-                                     struct dentry *dir);
-       void (*remove_interface_debugfs)(struct ieee80211_hw *hw,
-                                        struct ieee80211_vif *vif,
-                                        struct dentry *dir);
 #endif
        void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                        enum sta_notify_cmd, struct ieee80211_sta *sta);
index 0059f3886d44262afee3a16bbe20166adc814d12..7b9ff53bd2e99203e4fc22ef8d689bdae9f05b98 100644 (file)
@@ -547,43 +547,6 @@ static inline void drv_sta_remove_debugfs(struct ieee80211_local *local,
                local->ops->sta_remove_debugfs(&local->hw, &sdata->vif,
                                               sta, dir);
 }
-
-static inline
-void drv_add_interface_debugfs(struct ieee80211_local *local,
-                              struct ieee80211_sub_if_data *sdata)
-{
-       might_sleep();
-
-       check_sdata_in_driver(sdata);
-
-       if (!local->ops->add_interface_debugfs)
-               return;
-
-       local->ops->add_interface_debugfs(&local->hw, &sdata->vif,
-                                         sdata->vif.debugfs_dir);
-}
-
-static inline
-void drv_remove_interface_debugfs(struct ieee80211_local *local,
-                                 struct ieee80211_sub_if_data *sdata)
-{
-       might_sleep();
-
-       check_sdata_in_driver(sdata);
-
-       if (!local->ops->remove_interface_debugfs)
-               return;
-
-       local->ops->remove_interface_debugfs(&local->hw, &sdata->vif,
-                                            sdata->vif.debugfs_dir);
-}
-#else
-static inline
-void drv_add_interface_debugfs(struct ieee80211_local *local,
-                              struct ieee80211_sub_if_data *sdata) {}
-static inline
-void drv_remove_interface_debugfs(struct ieee80211_local *local,
-                                 struct ieee80211_sub_if_data *sdata) {}
 #endif
 
 static inline __must_check
index 9875e321c9e839716c976b4986de3c7adb603f46..80e838bc875dbd61bebb144e1cd1a4c86aa2a17c 100644 (file)
@@ -557,8 +557,6 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
                                goto err_del_interface;
                }
 
-               drv_add_interface_debugfs(local, sdata);
-
                if (sdata->vif.type == NL80211_IFTYPE_AP) {
                        local->fif_pspoll++;
                        local->fif_probe_req++;
@@ -846,8 +844,6 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
        case NL80211_IFTYPE_AP:
                skb_queue_purge(&sdata->skb_queue);
 
-               drv_remove_interface_debugfs(local, sdata);
-
                if (going_down)
                        drv_remove_interface(local, sdata);
        }