summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-06-15 12:08:26 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-15 12:08:26 -0400
commit41f9ba67f087756efd8c4aa490c097035c1969af (patch)
treec15dca7c530bffd3aa055e5053996c93edf236c3 /net
parentab188e8f4aad9845589ed050bde9514550a23ea5 (diff)
parentbf2b61a6838f19cbc33f6732715012c483fa3795 (diff)
Merge tag 'mac80211-for-davem-2018-06-15' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says: ==================== A handful of fixes: * missing RCU grace period enforcement led to drivers freeing data structures before; fix from Dedy Lansky. * hwsim module init error paths were messed up; fixed it myself after a report from Colin King (who had sent a partial patch) * kernel-doc tag errors; fix from Luca Coelho * initialize the on-stack sinfo data structure when getting station information; fix from Sven Eckelmann * TXQ state dumping is now done from init, and when TXQs aren't initialized yet at that point, bad things happen, move the initialization; fix from Toke Høiland-Jørgensen. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/main.c12
-rw-r--r--net/wireless/core.c1
-rw-r--r--net/wireless/util.c2
3 files changed, 9 insertions, 6 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 4d2e797e3f16..722f3d9fb416 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1098,6 +1098,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
1098 1098
1099 ieee80211_led_init(local); 1099 ieee80211_led_init(local);
1100 1100
1101 result = ieee80211_txq_setup_flows(local);
1102 if (result)
1103 goto fail_flows;
1104
1101 rtnl_lock(); 1105 rtnl_lock();
1102 1106
1103 result = ieee80211_init_rate_ctrl_alg(local, 1107 result = ieee80211_init_rate_ctrl_alg(local,
@@ -1120,10 +1124,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
1120 1124
1121 rtnl_unlock(); 1125 rtnl_unlock();
1122 1126
1123 result = ieee80211_txq_setup_flows(local);
1124 if (result)
1125 goto fail_flows;
1126
1127#ifdef CONFIG_INET 1127#ifdef CONFIG_INET
1128 local->ifa_notifier.notifier_call = ieee80211_ifa_changed; 1128 local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
1129 result = register_inetaddr_notifier(&local->ifa_notifier); 1129 result = register_inetaddr_notifier(&local->ifa_notifier);
@@ -1149,8 +1149,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
1149#if defined(CONFIG_INET) || defined(CONFIG_IPV6) 1149#if defined(CONFIG_INET) || defined(CONFIG_IPV6)
1150 fail_ifa: 1150 fail_ifa:
1151#endif 1151#endif
1152 ieee80211_txq_teardown_flows(local);
1153 fail_flows:
1154 rtnl_lock(); 1152 rtnl_lock();
1155 rate_control_deinitialize(local); 1153 rate_control_deinitialize(local);
1156 ieee80211_remove_interfaces(local); 1154 ieee80211_remove_interfaces(local);
@@ -1158,6 +1156,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
1158 rtnl_unlock(); 1156 rtnl_unlock();
1159 ieee80211_led_exit(local); 1157 ieee80211_led_exit(local);
1160 ieee80211_wep_free(local); 1158 ieee80211_wep_free(local);
1159 ieee80211_txq_teardown_flows(local);
1160 fail_flows:
1161 destroy_workqueue(local->workqueue); 1161 destroy_workqueue(local->workqueue);
1162 fail_workqueue: 1162 fail_workqueue:
1163 wiphy_unregister(local->hw.wiphy); 1163 wiphy_unregister(local->hw.wiphy);
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 5fe35aafdd9c..48e8097339ab 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1012,6 +1012,7 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev)
1012 nl80211_notify_iface(rdev, wdev, NL80211_CMD_DEL_INTERFACE); 1012 nl80211_notify_iface(rdev, wdev, NL80211_CMD_DEL_INTERFACE);
1013 1013
1014 list_del_rcu(&wdev->list); 1014 list_del_rcu(&wdev->list);
1015 synchronize_rcu();
1015 rdev->devlist_generation++; 1016 rdev->devlist_generation++;
1016 1017
1017 switch (wdev->iftype) { 1018 switch (wdev->iftype) {
diff --git a/net/wireless/util.c b/net/wireless/util.c
index b5bb1c309914..3c654cd7ba56 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1746,6 +1746,8 @@ int cfg80211_get_station(struct net_device *dev, const u8 *mac_addr,
1746 if (!rdev->ops->get_station) 1746 if (!rdev->ops->get_station)
1747 return -EOPNOTSUPP; 1747 return -EOPNOTSUPP;
1748 1748
1749 memset(sinfo, 0, sizeof(*sinfo));
1750
1749 return rdev_get_station(rdev, dev, mac_addr, sinfo); 1751 return rdev_get_station(rdev, dev, mac_addr, sinfo);
1750} 1752}
1751EXPORT_SYMBOL(cfg80211_get_station); 1753EXPORT_SYMBOL(cfg80211_get_station);