diff options
author | Don Fry <donald.h.fry@intel.com> | 2011-11-28 19:13:19 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-02 11:23:28 -0500 |
commit | dd5fe1046cb07d2a6665b6dbbfc6989b39ae063b (patch) | |
tree | 83d8f9c06d870847a6f817581416c915092a89f1 /drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |
parent | 3d6acefc0a24bf90746c1f259e9d65d1ed7ea5e2 (diff) |
iwlwifi: move ucode notification from iwl_priv to iwl_shared
Move the notification structures for ucode operations from the
iwl_priv structure to the iwl_shared structure, with associated
code changes.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-lib.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 0bc962217351..575d1bb8e8cc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -934,57 +934,6 @@ u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant, u8 valid) | |||
934 | return ant; | 934 | return ant; |
935 | } | 935 | } |
936 | 936 | ||
937 | /* notification wait support */ | ||
938 | void iwlagn_init_notification_wait(struct iwl_priv *priv, | ||
939 | struct iwl_notification_wait *wait_entry, | ||
940 | u8 cmd, | ||
941 | void (*fn)(struct iwl_priv *priv, | ||
942 | struct iwl_rx_packet *pkt, | ||
943 | void *data), | ||
944 | void *fn_data) | ||
945 | { | ||
946 | wait_entry->fn = fn; | ||
947 | wait_entry->fn_data = fn_data; | ||
948 | wait_entry->cmd = cmd; | ||
949 | wait_entry->triggered = false; | ||
950 | wait_entry->aborted = false; | ||
951 | |||
952 | spin_lock_bh(&priv->notif_wait_lock); | ||
953 | list_add(&wait_entry->list, &priv->notif_waits); | ||
954 | spin_unlock_bh(&priv->notif_wait_lock); | ||
955 | } | ||
956 | |||
957 | int iwlagn_wait_notification(struct iwl_priv *priv, | ||
958 | struct iwl_notification_wait *wait_entry, | ||
959 | unsigned long timeout) | ||
960 | { | ||
961 | int ret; | ||
962 | |||
963 | ret = wait_event_timeout(priv->notif_waitq, | ||
964 | wait_entry->triggered || wait_entry->aborted, | ||
965 | timeout); | ||
966 | |||
967 | spin_lock_bh(&priv->notif_wait_lock); | ||
968 | list_del(&wait_entry->list); | ||
969 | spin_unlock_bh(&priv->notif_wait_lock); | ||
970 | |||
971 | if (wait_entry->aborted) | ||
972 | return -EIO; | ||
973 | |||
974 | /* return value is always >= 0 */ | ||
975 | if (ret <= 0) | ||
976 | return -ETIMEDOUT; | ||
977 | return 0; | ||
978 | } | ||
979 | |||
980 | void iwlagn_remove_notification(struct iwl_priv *priv, | ||
981 | struct iwl_notification_wait *wait_entry) | ||
982 | { | ||
983 | spin_lock_bh(&priv->notif_wait_lock); | ||
984 | list_del(&wait_entry->list); | ||
985 | spin_unlock_bh(&priv->notif_wait_lock); | ||
986 | } | ||
987 | |||
988 | #ifdef CONFIG_PM_SLEEP | 937 | #ifdef CONFIG_PM_SLEEP |
989 | static void iwlagn_convert_p1k(u16 *p1k, __le16 *out) | 938 | static void iwlagn_convert_p1k(u16 *p1k, __le16 *out) |
990 | { | 939 | { |