aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorZhao, Gang <gamerh2o@gmail.com>2014-04-21 00:53:05 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-04-25 11:34:25 -0400
commit8bd811aa6c407a8a4712d7142fb9909f1b2a5fa4 (patch)
tree1a0c928d6028ee89be50404c1fbb5cf072e386d1 /net/mac80211
parent6784c7db8d43d29aab7f520b54f3aa0c5d51ecbc (diff)
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')
-rw-r--r--net/mac80211/iface.c11
-rw-r--r--net/mac80211/main.c4
-rw-r--r--net/mac80211/mlme.c2
3 files changed, 8 insertions, 9 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index e91569d887e3..7fff3dcaac43 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1787,20 +1787,19 @@ static int netdev_notify(struct notifier_block *nb,
1787 struct ieee80211_sub_if_data *sdata; 1787 struct ieee80211_sub_if_data *sdata;
1788 1788
1789 if (state != NETDEV_CHANGENAME) 1789 if (state != NETDEV_CHANGENAME)
1790 return 0; 1790 return NOTIFY_DONE;
1791 1791
1792 if (!dev->ieee80211_ptr || !dev->ieee80211_ptr->wiphy) 1792 if (!dev->ieee80211_ptr || !dev->ieee80211_ptr->wiphy)
1793 return 0; 1793 return NOTIFY_DONE;
1794 1794
1795 if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid) 1795 if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
1796 return 0; 1796 return NOTIFY_DONE;
1797 1797
1798 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1798 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1799
1800 memcpy(sdata->name, dev->name, IFNAMSIZ); 1799 memcpy(sdata->name, dev->name, IFNAMSIZ);
1801
1802 ieee80211_debugfs_rename_netdev(sdata); 1800 ieee80211_debugfs_rename_netdev(sdata);
1803 return 0; 1801
1802 return NOTIFY_OK;
1804} 1803}
1805 1804
1806static struct notifier_block mac80211_netdev_notifier = { 1805static struct notifier_block mac80211_netdev_notifier = {
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 5854699a9082..69175f1539b7 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -338,7 +338,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb,
338 338
339 sdata_unlock(sdata); 339 sdata_unlock(sdata);
340 340
341 return NOTIFY_DONE; 341 return NOTIFY_OK;
342} 342}
343#endif 343#endif
344 344
@@ -369,7 +369,7 @@ static int ieee80211_ifa6_changed(struct notifier_block *nb,
369 369
370 drv_ipv6_addr_change(local, sdata, idev); 370 drv_ipv6_addr_change(local, sdata, idev);
371 371
372 return NOTIFY_DONE; 372 return NOTIFY_OK;
373} 373}
374#endif 374#endif
375 375
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 98755ce49af3..488826f188a7 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3701,7 +3701,7 @@ int ieee80211_max_network_latency(struct notifier_block *nb,
3701 ieee80211_recalc_ps(local, latency_usec); 3701 ieee80211_recalc_ps(local, latency_usec);
3702 mutex_unlock(&local->iflist_mtx); 3702 mutex_unlock(&local->iflist_mtx);
3703 3703
3704 return 0; 3704 return NOTIFY_OK;
3705} 3705}
3706 3706
3707static u8 ieee80211_ht_vht_rx_chains(struct ieee80211_sub_if_data *sdata, 3707static u8 ieee80211_ht_vht_rx_chains(struct ieee80211_sub_if_data *sdata,