diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-13 06:14:47 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-22 13:02:47 -0400 |
commit | 09f18afe766ea3f2c749e3af195bf65fde71b62e (patch) | |
tree | 9d8fe3c45266db491df2eb33c3d6afb56c710095 /drivers/net/wireless/iwlwifi | |
parent | 3e14c1fd75d909bfcc6caab79c544921fd02bf73 (diff) |
iwlagn: extend notification wait function
A notification wait function is called with the
command, but currently has no way of passing
data back to the caller -- fix that by adding a
void pointer to the function that can be used
between the caller and the function.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 4 |
5 files changed, 16 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 5e62a089e9ba..486a8d3a1f0d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -2256,11 +2256,14 @@ int iwl_dump_fh(struct iwl_priv *priv, char **buf, bool display) | |||
2256 | /* notification wait support */ | 2256 | /* notification wait support */ |
2257 | void iwlagn_init_notification_wait(struct iwl_priv *priv, | 2257 | void iwlagn_init_notification_wait(struct iwl_priv *priv, |
2258 | struct iwl_notification_wait *wait_entry, | 2258 | struct iwl_notification_wait *wait_entry, |
2259 | u8 cmd, | ||
2259 | void (*fn)(struct iwl_priv *priv, | 2260 | void (*fn)(struct iwl_priv *priv, |
2260 | struct iwl_rx_packet *pkt), | 2261 | struct iwl_rx_packet *pkt, |
2261 | u8 cmd) | 2262 | void *data), |
2263 | void *fn_data) | ||
2262 | { | 2264 | { |
2263 | wait_entry->fn = fn; | 2265 | wait_entry->fn = fn; |
2266 | wait_entry->fn_data = fn_data; | ||
2264 | wait_entry->cmd = cmd; | 2267 | wait_entry->cmd = cmd; |
2265 | wait_entry->triggered = false; | 2268 | wait_entry->triggered = false; |
2266 | 2269 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 56f46ee3bacd..ee7c5ba95971 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -58,8 +58,9 @@ static int iwlagn_disable_pan(struct iwl_priv *priv, | |||
58 | u8 old_dev_type = send->dev_type; | 58 | u8 old_dev_type = send->dev_type; |
59 | int ret; | 59 | int ret; |
60 | 60 | ||
61 | iwlagn_init_notification_wait(priv, &disable_wait, NULL, | 61 | iwlagn_init_notification_wait(priv, &disable_wait, |
62 | REPLY_WIPAN_DEACTIVATION_COMPLETE); | 62 | REPLY_WIPAN_DEACTIVATION_COMPLETE, |
63 | NULL, NULL); | ||
63 | 64 | ||
64 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 65 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
65 | send->dev_type = RXON_DEV_TYPE_P2P; | 66 | send->dev_type = RXON_DEV_TYPE_P2P; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index e99cd9474ba8..a9204db377a8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -769,7 +769,7 @@ static void iwl_rx_handle(struct iwl_priv *priv) | |||
769 | if (w->cmd == pkt->hdr.cmd) { | 769 | if (w->cmd == pkt->hdr.cmd) { |
770 | w->triggered = true; | 770 | w->triggered = true; |
771 | if (w->fn) | 771 | if (w->fn) |
772 | w->fn(priv, pkt); | 772 | w->fn(priv, pkt, w->fn_data); |
773 | } | 773 | } |
774 | } | 774 | } |
775 | spin_unlock(&priv->_agn.notif_wait_lock); | 775 | spin_unlock(&priv->_agn.notif_wait_lock); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index ef1bbd415b16..b9871c4b3c18 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -338,9 +338,11 @@ void iwlcore_eeprom_release_semaphore(struct iwl_priv *priv); | |||
338 | void __acquires(wait_entry) | 338 | void __acquires(wait_entry) |
339 | iwlagn_init_notification_wait(struct iwl_priv *priv, | 339 | iwlagn_init_notification_wait(struct iwl_priv *priv, |
340 | struct iwl_notification_wait *wait_entry, | 340 | struct iwl_notification_wait *wait_entry, |
341 | u8 cmd, | ||
341 | void (*fn)(struct iwl_priv *priv, | 342 | void (*fn)(struct iwl_priv *priv, |
342 | struct iwl_rx_packet *pkt), | 343 | struct iwl_rx_packet *pkt, |
343 | u8 cmd); | 344 | void *data), |
345 | void *fn_data); | ||
344 | signed long __releases(wait_entry) | 346 | signed long __releases(wait_entry) |
345 | iwlagn_wait_notification(struct iwl_priv *priv, | 347 | iwlagn_wait_notification(struct iwl_priv *priv, |
346 | struct iwl_notification_wait *wait_entry, | 348 | struct iwl_notification_wait *wait_entry, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index e84534c4d956..d8bf11727aac 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1105,7 +1105,9 @@ struct iwl_force_reset { | |||
1105 | struct iwl_notification_wait { | 1105 | struct iwl_notification_wait { |
1106 | struct list_head list; | 1106 | struct list_head list; |
1107 | 1107 | ||
1108 | void (*fn)(struct iwl_priv *priv, struct iwl_rx_packet *pkt); | 1108 | void (*fn)(struct iwl_priv *priv, struct iwl_rx_packet *pkt, |
1109 | void *data); | ||
1110 | void *fn_data; | ||
1109 | 1111 | ||
1110 | u8 cmd; | 1112 | u8 cmd; |
1111 | bool triggered; | 1113 | bool triggered; |