diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 80c0e28bf549..049ce8639806 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/wireless.h> | 21 | #include <linux/wireless.h> |
22 | #include <linux/rtnetlink.h> | 22 | #include <linux/rtnetlink.h> |
23 | #include <linux/bitmap.h> | 23 | #include <linux/bitmap.h> |
24 | #include <linux/pm_qos_params.h> | ||
24 | #include <net/net_namespace.h> | 25 | #include <net/net_namespace.h> |
25 | #include <net/cfg80211.h> | 26 | #include <net/cfg80211.h> |
26 | 27 | ||
@@ -1038,25 +1039,38 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
1038 | } | 1039 | } |
1039 | } | 1040 | } |
1040 | 1041 | ||
1042 | local->network_latency_notifier.notifier_call = | ||
1043 | ieee80211_max_network_latency; | ||
1044 | result = pm_qos_add_notifier(PM_QOS_NETWORK_LATENCY, | ||
1045 | &local->network_latency_notifier); | ||
1046 | |||
1047 | if (result) { | ||
1048 | rtnl_lock(); | ||
1049 | goto fail_pm_qos; | ||
1050 | } | ||
1051 | |||
1041 | return 0; | 1052 | return 0; |
1042 | 1053 | ||
1043 | fail_wep: | 1054 | fail_pm_qos: |
1055 | ieee80211_led_exit(local); | ||
1056 | ieee80211_remove_interfaces(local); | ||
1057 | fail_wep: | ||
1044 | rate_control_deinitialize(local); | 1058 | rate_control_deinitialize(local); |
1045 | fail_rate: | 1059 | fail_rate: |
1046 | unregister_netdevice(local->mdev); | 1060 | unregister_netdevice(local->mdev); |
1047 | local->mdev = NULL; | 1061 | local->mdev = NULL; |
1048 | fail_dev: | 1062 | fail_dev: |
1049 | rtnl_unlock(); | 1063 | rtnl_unlock(); |
1050 | sta_info_stop(local); | 1064 | sta_info_stop(local); |
1051 | fail_sta_info: | 1065 | fail_sta_info: |
1052 | debugfs_hw_del(local); | 1066 | debugfs_hw_del(local); |
1053 | destroy_workqueue(local->hw.workqueue); | 1067 | destroy_workqueue(local->hw.workqueue); |
1054 | fail_workqueue: | 1068 | fail_workqueue: |
1055 | if (local->mdev) | 1069 | if (local->mdev) |
1056 | free_netdev(local->mdev); | 1070 | free_netdev(local->mdev); |
1057 | fail_mdev_alloc: | 1071 | fail_mdev_alloc: |
1058 | wiphy_unregister(local->hw.wiphy); | 1072 | wiphy_unregister(local->hw.wiphy); |
1059 | fail_wiphy_register: | 1073 | fail_wiphy_register: |
1060 | kfree(local->int_scan_req.channels); | 1074 | kfree(local->int_scan_req.channels); |
1061 | return result; | 1075 | return result; |
1062 | } | 1076 | } |
@@ -1069,6 +1083,9 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) | |||
1069 | tasklet_kill(&local->tx_pending_tasklet); | 1083 | tasklet_kill(&local->tx_pending_tasklet); |
1070 | tasklet_kill(&local->tasklet); | 1084 | tasklet_kill(&local->tasklet); |
1071 | 1085 | ||
1086 | pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY, | ||
1087 | &local->network_latency_notifier); | ||
1088 | |||
1072 | rtnl_lock(); | 1089 | rtnl_lock(); |
1073 | 1090 | ||
1074 | /* | 1091 | /* |