Skip to content

Commit d260ff1

Browse files
Stanislaw Gruszkajmberg-intel
authored andcommitted
mac80211: remove vif debugfs driver callbacks
This basically reverts commit b207cdb. 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 <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent ddbfe86 commit d260ff1

File tree

3 files changed

+0
-59
lines changed

3 files changed

+0
-59
lines changed

include/net/mac80211.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,18 +2233,6 @@ enum ieee80211_roc_type {
22332233
* MAC address of the device going away.
22342234
* Hence, this callback must be implemented. It can sleep.
22352235
*
2236-
* @add_interface_debugfs: Drivers can use this callback to add debugfs files
2237-
* when a vif is added to mac80211. This callback and
2238-
* @remove_interface_debugfs should be within a CONFIG_MAC80211_DEBUGFS
2239-
* conditional. @remove_interface_debugfs must be provided for cleanup.
2240-
* This callback can sleep.
2241-
*
2242-
* @remove_interface_debugfs: Remove the debugfs files which were added using
2243-
* @add_interface_debugfs. This callback must remove all debugfs entries
2244-
* that were added because mac80211 only removes interface debugfs when the
2245-
* interface is destroyed, not when it is removed from the driver.
2246-
* This callback can sleep.
2247-
*
22482236
* @config: Handler for configuration requests. IEEE 802.11 code calls this
22492237
* function to change hardware configuration, e.g., channel.
22502238
* This function should never fail but returns a negative error code
@@ -2665,12 +2653,6 @@ struct ieee80211_ops {
26652653
struct ieee80211_vif *vif,
26662654
struct ieee80211_sta *sta,
26672655
struct dentry *dir);
2668-
void (*add_interface_debugfs)(struct ieee80211_hw *hw,
2669-
struct ieee80211_vif *vif,
2670-
struct dentry *dir);
2671-
void (*remove_interface_debugfs)(struct ieee80211_hw *hw,
2672-
struct ieee80211_vif *vif,
2673-
struct dentry *dir);
26742656
#endif
26752657
void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
26762658
enum sta_notify_cmd, struct ieee80211_sta *sta);

net/mac80211/driver-ops.h

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -547,43 +547,6 @@ static inline void drv_sta_remove_debugfs(struct ieee80211_local *local,
547547
local->ops->sta_remove_debugfs(&local->hw, &sdata->vif,
548548
sta, dir);
549549
}
550-
551-
static inline
552-
void drv_add_interface_debugfs(struct ieee80211_local *local,
553-
struct ieee80211_sub_if_data *sdata)
554-
{
555-
might_sleep();
556-
557-
check_sdata_in_driver(sdata);
558-
559-
if (!local->ops->add_interface_debugfs)
560-
return;
561-
562-
local->ops->add_interface_debugfs(&local->hw, &sdata->vif,
563-
sdata->vif.debugfs_dir);
564-
}
565-
566-
static inline
567-
void drv_remove_interface_debugfs(struct ieee80211_local *local,
568-
struct ieee80211_sub_if_data *sdata)
569-
{
570-
might_sleep();
571-
572-
check_sdata_in_driver(sdata);
573-
574-
if (!local->ops->remove_interface_debugfs)
575-
return;
576-
577-
local->ops->remove_interface_debugfs(&local->hw, &sdata->vif,
578-
sdata->vif.debugfs_dir);
579-
}
580-
#else
581-
static inline
582-
void drv_add_interface_debugfs(struct ieee80211_local *local,
583-
struct ieee80211_sub_if_data *sdata) {}
584-
static inline
585-
void drv_remove_interface_debugfs(struct ieee80211_local *local,
586-
struct ieee80211_sub_if_data *sdata) {}
587550
#endif
588551

589552
static inline __must_check

net/mac80211/iface.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,6 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
557557
goto err_del_interface;
558558
}
559559

560-
drv_add_interface_debugfs(local, sdata);
561-
562560
if (sdata->vif.type == NL80211_IFTYPE_AP) {
563561
local->fif_pspoll++;
564562
local->fif_probe_req++;
@@ -846,8 +844,6 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
846844
case NL80211_IFTYPE_AP:
847845
skb_queue_purge(&sdata->skb_queue);
848846

849-
drv_remove_interface_debugfs(local, sdata);
850-
851847
if (going_down)
852848
drv_remove_interface(local, sdata);
853849
}

0 commit comments

Comments
 (0)