diff options
author | Zhao, Gang <gamerh2o@gmail.com> | 2014-04-21 12:53:05 +0800 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-25 17:34:25 +0200 |
commit | 8bd811aa6c407a8a4712d7142fb9909f1b2a5fa4 (patch) | |
tree | 1a0c928d6028ee89be50404c1fbb5cf072e386d1 /net/mac80211/iface.c | |
parent | 6784c7db8d43d29aab7f520b54f3aa0c5d51ecbc (diff) | |
download | op-kernel-dev-8bd811aa6c407a8a4712d7142fb9909f1b2a5fa4.zip op-kernel-dev-8bd811aa6c407a8a4712d7142fb9909f1b2a5fa4.tar.gz |
mac80211: change return value of notifier function
Return NOTIFY_DONE if we don't care this time's notification, return
NOTIFY_OK if we successfully handled this time's notification. That's
the formal way to do it.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index e91569d..7fff3dc 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -1787,20 +1787,19 @@ static int netdev_notify(struct notifier_block *nb, struct ieee80211_sub_if_data *sdata; if (state != NETDEV_CHANGENAME) - return 0; + return NOTIFY_DONE; if (!dev->ieee80211_ptr || !dev->ieee80211_ptr->wiphy) - return 0; + return NOTIFY_DONE; if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid) - return 0; + return NOTIFY_DONE; sdata = IEEE80211_DEV_TO_SUB_IF(dev); - memcpy(sdata->name, dev->name, IFNAMSIZ); - ieee80211_debugfs_rename_netdev(sdata); - return 0; + + return NOTIFY_OK; } static struct notifier_block mac80211_netdev_notifier = { |