diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-05-16 16:54:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-05 15:32:14 -0400 |
commit | ac91f910455f0ff323d965123b76d112afb49dd6 (patch) | |
tree | 37bbccbb7ba6f419ba44fd1e897d7c55e90bf987 | |
parent | cc5f7e39761382d3a44be70bb665c2c78ae15dac (diff) |
iwlwifi: move notification wait into core
This code is a library to be used by multiple
opmodes, so move it into the iwlwifi module.
Reviewed-by: Donald H Fry <donald.h.fry@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-notif-wait.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index f284ea850bb2..931002738c9f 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile | |||
@@ -7,7 +7,6 @@ iwldvm-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-rx.o | |||
7 | iwldvm-objs += iwl-eeprom.o iwl-power.o | 7 | iwldvm-objs += iwl-eeprom.o iwl-power.o |
8 | iwldvm-objs += iwl-scan.o iwl-led.o | 8 | iwldvm-objs += iwl-scan.o iwl-led.o |
9 | iwldvm-objs += iwl-agn-rxon.o iwl-agn-devices.o | 9 | iwldvm-objs += iwl-agn-rxon.o iwl-agn-devices.o |
10 | iwldvm-objs += iwl-notif-wait.o | ||
11 | 10 | ||
12 | iwldvm-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o | 11 | iwldvm-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o |
13 | iwldvm-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-testmode.o | 12 | iwldvm-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-testmode.o |
@@ -24,6 +23,7 @@ iwlwifi-objs += iwl-io.o | |||
24 | iwlwifi-objs += iwl-pci.o | 23 | iwlwifi-objs += iwl-pci.o |
25 | iwlwifi-objs += iwl-drv.o | 24 | iwlwifi-objs += iwl-drv.o |
26 | iwlwifi-objs += iwl-debug.o | 25 | iwlwifi-objs += iwl-debug.o |
26 | iwlwifi-objs += iwl-notif-wait.o | ||
27 | iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o | 27 | iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o |
28 | 28 | ||
29 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o | 29 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o |
diff --git a/drivers/net/wireless/iwlwifi/iwl-notif-wait.c b/drivers/net/wireless/iwlwifi/iwl-notif-wait.c index 0066b899fe5c..5cfed29b1b18 100644 --- a/drivers/net/wireless/iwlwifi/iwl-notif-wait.c +++ b/drivers/net/wireless/iwlwifi/iwl-notif-wait.c | |||
@@ -61,6 +61,7 @@ | |||
61 | * | 61 | * |
62 | *****************************************************************************/ | 62 | *****************************************************************************/ |
63 | #include <linux/sched.h> | 63 | #include <linux/sched.h> |
64 | #include <linux/export.h> | ||
64 | 65 | ||
65 | #include "iwl-notif-wait.h" | 66 | #include "iwl-notif-wait.h" |
66 | 67 | ||
@@ -71,6 +72,7 @@ void iwl_notification_wait_init(struct iwl_notif_wait_data *notif_wait) | |||
71 | INIT_LIST_HEAD(¬if_wait->notif_waits); | 72 | INIT_LIST_HEAD(¬if_wait->notif_waits); |
72 | init_waitqueue_head(¬if_wait->notif_waitq); | 73 | init_waitqueue_head(¬if_wait->notif_waitq); |
73 | } | 74 | } |
75 | EXPORT_SYMBOL_GPL(iwl_notification_wait_init); | ||
74 | 76 | ||
75 | void iwl_notification_wait_notify(struct iwl_notif_wait_data *notif_wait, | 77 | void iwl_notification_wait_notify(struct iwl_notif_wait_data *notif_wait, |
76 | struct iwl_rx_packet *pkt) | 78 | struct iwl_rx_packet *pkt) |
@@ -115,6 +117,7 @@ void iwl_notification_wait_notify(struct iwl_notif_wait_data *notif_wait, | |||
115 | if (triggered) | 117 | if (triggered) |
116 | wake_up_all(¬if_wait->notif_waitq); | 118 | wake_up_all(¬if_wait->notif_waitq); |
117 | } | 119 | } |
120 | EXPORT_SYMBOL_GPL(iwl_notification_wait_notify); | ||
118 | 121 | ||
119 | void iwl_abort_notification_waits(struct iwl_notif_wait_data *notif_wait) | 122 | void iwl_abort_notification_waits(struct iwl_notif_wait_data *notif_wait) |
120 | { | 123 | { |
@@ -128,7 +131,7 @@ void iwl_abort_notification_waits(struct iwl_notif_wait_data *notif_wait) | |||
128 | 131 | ||
129 | wake_up_all(¬if_wait->notif_waitq); | 132 | wake_up_all(¬if_wait->notif_waitq); |
130 | } | 133 | } |
131 | 134 | EXPORT_SYMBOL_GPL(iwl_abort_notification_waits); | |
132 | 135 | ||
133 | void | 136 | void |
134 | iwl_init_notification_wait(struct iwl_notif_wait_data *notif_wait, | 137 | iwl_init_notification_wait(struct iwl_notif_wait_data *notif_wait, |
@@ -152,6 +155,7 @@ iwl_init_notification_wait(struct iwl_notif_wait_data *notif_wait, | |||
152 | list_add(&wait_entry->list, ¬if_wait->notif_waits); | 155 | list_add(&wait_entry->list, ¬if_wait->notif_waits); |
153 | spin_unlock_bh(¬if_wait->notif_wait_lock); | 156 | spin_unlock_bh(¬if_wait->notif_wait_lock); |
154 | } | 157 | } |
158 | EXPORT_SYMBOL_GPL(iwl_init_notification_wait); | ||
155 | 159 | ||
156 | int iwl_wait_notification(struct iwl_notif_wait_data *notif_wait, | 160 | int iwl_wait_notification(struct iwl_notif_wait_data *notif_wait, |
157 | struct iwl_notification_wait *wait_entry, | 161 | struct iwl_notification_wait *wait_entry, |
@@ -175,6 +179,7 @@ int iwl_wait_notification(struct iwl_notif_wait_data *notif_wait, | |||
175 | return -ETIMEDOUT; | 179 | return -ETIMEDOUT; |
176 | return 0; | 180 | return 0; |
177 | } | 181 | } |
182 | EXPORT_SYMBOL_GPL(iwl_wait_notification); | ||
178 | 183 | ||
179 | void iwl_remove_notification(struct iwl_notif_wait_data *notif_wait, | 184 | void iwl_remove_notification(struct iwl_notif_wait_data *notif_wait, |
180 | struct iwl_notification_wait *wait_entry) | 185 | struct iwl_notification_wait *wait_entry) |
@@ -183,3 +188,4 @@ void iwl_remove_notification(struct iwl_notif_wait_data *notif_wait, | |||
183 | list_del(&wait_entry->list); | 188 | list_del(&wait_entry->list); |
184 | spin_unlock_bh(¬if_wait->notif_wait_lock); | 189 | spin_unlock_bh(¬if_wait->notif_wait_lock); |
185 | } | 190 | } |
191 | EXPORT_SYMBOL_GPL(iwl_remove_notification); | ||