diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 29 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 9 |
5 files changed, 21 insertions, 33 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index a10a6e81769f..3df70f89f11b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -976,40 +976,21 @@ int iwl4965_hw_nic_reset(struct iwl_priv *priv) | |||
976 | /** | 976 | /** |
977 | * iwl4965_bg_statistics_periodic - Timer callback to queue statistics | 977 | * iwl4965_bg_statistics_periodic - Timer callback to queue statistics |
978 | * | 978 | * |
979 | * This callback is provided in order to queue the statistics_work | 979 | * This callback is provided in order to send a statistics request. |
980 | * in work_queue context (v. softirq) | ||
981 | * | 980 | * |
982 | * This timer function is continually reset to execute within | 981 | * This timer function is continually reset to execute within |
983 | * REG_RECALIB_PERIOD seconds since the last STATISTICS_NOTIFICATION | 982 | * REG_RECALIB_PERIOD seconds since the last STATISTICS_NOTIFICATION |
984 | * was received. We need to ensure we receive the statistics in order | 983 | * was received. We need to ensure we receive the statistics in order |
985 | * to update the temperature used for calibrating the TXPOWER. However, | 984 | * to update the temperature used for calibrating the TXPOWER. |
986 | * we can't send the statistics command from softirq context (which | ||
987 | * is the context which timers run at) so we have to queue off the | ||
988 | * statistics_work to actually send the command to the hardware. | ||
989 | */ | 985 | */ |
990 | static void iwl4965_bg_statistics_periodic(unsigned long data) | 986 | static void iwl4965_bg_statistics_periodic(unsigned long data) |
991 | { | 987 | { |
992 | struct iwl_priv *priv = (struct iwl_priv *)data; | 988 | struct iwl_priv *priv = (struct iwl_priv *)data; |
993 | 989 | ||
994 | queue_work(priv->workqueue, &priv->statistics_work); | ||
995 | } | ||
996 | |||
997 | /** | ||
998 | * iwl4965_bg_statistics_work - Send the statistics request to the hardware. | ||
999 | * | ||
1000 | * This is queued by iwl4965_bg_statistics_periodic. | ||
1001 | */ | ||
1002 | static void iwl4965_bg_statistics_work(struct work_struct *work) | ||
1003 | { | ||
1004 | struct iwl_priv *priv = container_of(work, struct iwl_priv, | ||
1005 | statistics_work); | ||
1006 | |||
1007 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 990 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
1008 | return; | 991 | return; |
1009 | 992 | ||
1010 | mutex_lock(&priv->mutex); | 993 | iwl_send_statistics_request(priv, CMD_ASYNC); |
1011 | iwl4965_send_statistics_request(priv); | ||
1012 | mutex_unlock(&priv->mutex); | ||
1013 | } | 994 | } |
1014 | 995 | ||
1015 | #define CT_LIMIT_CONST 259 | 996 | #define CT_LIMIT_CONST 259 |
@@ -2026,6 +2007,9 @@ int iwl4965_alive_notify(struct iwl_priv *priv) | |||
2026 | iwl_release_nic_access(priv); | 2007 | iwl_release_nic_access(priv); |
2027 | spin_unlock_irqrestore(&priv->lock, flags); | 2008 | spin_unlock_irqrestore(&priv->lock, flags); |
2028 | 2009 | ||
2010 | /* Ask for statistics now, the uCode will send statistics notification | ||
2011 | * periodically after association */ | ||
2012 | iwl_send_statistics_request(priv, CMD_ASYNC); | ||
2029 | return ret; | 2013 | return ret; |
2030 | } | 2014 | } |
2031 | 2015 | ||
@@ -4903,7 +4887,6 @@ void iwl4965_hw_rx_handler_setup(struct iwl_priv *priv) | |||
4903 | void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv) | 4887 | void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv) |
4904 | { | 4888 | { |
4905 | INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); | 4889 | INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); |
4906 | INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work); | ||
4907 | #ifdef CONFIG_IWL4965_SENSITIVITY | 4890 | #ifdef CONFIG_IWL4965_SENSITIVITY |
4908 | INIT_WORK(&priv->sensitivity_work, iwl4965_bg_sensitivity_work); | 4891 | INIT_WORK(&priv->sensitivity_work, iwl4965_bg_sensitivity_work); |
4909 | #endif | 4892 | #endif |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index e5ab4c01ec9b..c8e73a5212af 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -638,7 +638,6 @@ extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv, | |||
638 | const u8 *dest, int left); | 638 | const u8 *dest, int left); |
639 | extern int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv, | 639 | extern int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv, |
640 | struct iwl4965_rx_queue *q); | 640 | struct iwl4965_rx_queue *q); |
641 | extern int iwl4965_send_statistics_request(struct iwl_priv *priv); | ||
642 | extern void iwl4965_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb, | 641 | extern void iwl4965_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb, |
643 | u32 decrypt_res, | 642 | u32 decrypt_res, |
644 | struct ieee80211_rx_status *stats); | 643 | struct ieee80211_rx_status *stats); |
@@ -1206,7 +1205,6 @@ struct iwl_priv { | |||
1206 | #ifdef CONFIG_IWL4965_SENSITIVITY | 1205 | #ifdef CONFIG_IWL4965_SENSITIVITY |
1207 | struct work_struct sensitivity_work; | 1206 | struct work_struct sensitivity_work; |
1208 | #endif | 1207 | #endif |
1209 | struct work_struct statistics_work; | ||
1210 | struct timer_list statistics_periodic; | 1208 | struct timer_list statistics_periodic; |
1211 | }; /*iwl_priv */ | 1209 | }; /*iwl_priv */ |
1212 | 1210 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index d8a226e68ed1..88d62462ed4a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -277,3 +277,15 @@ int iwlcore_low_level_notify(struct iwl_priv *priv, | |||
277 | } | 277 | } |
278 | EXPORT_SYMBOL(iwlcore_low_level_notify); | 278 | EXPORT_SYMBOL(iwlcore_low_level_notify); |
279 | 279 | ||
280 | int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags) | ||
281 | { | ||
282 | u32 stat_flags = 0; | ||
283 | struct iwl_host_cmd cmd = { | ||
284 | .id = REPLY_STATISTICS_CMD, | ||
285 | .meta.flags = flags, | ||
286 | .len = sizeof(stat_flags), | ||
287 | .data = (u8 *) &stat_flags, | ||
288 | }; | ||
289 | return iwl_send_cmd(priv, &cmd); | ||
290 | } | ||
291 | EXPORT_SYMBOL(iwl_send_statistics_request); | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 23c21e38ca8a..aef1b48ea50c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -228,4 +228,6 @@ enum iwlcore_card_notify { | |||
228 | 228 | ||
229 | int iwlcore_low_level_notify(struct iwl_priv *priv, | 229 | int iwlcore_low_level_notify(struct iwl_priv *priv, |
230 | enum iwlcore_card_notify notify); | 230 | enum iwlcore_card_notify notify); |
231 | extern int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags); | ||
232 | |||
231 | #endif /* __iwl_core_h__ */ | 233 | #endif /* __iwl_core_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 5ec0af4788e4..42e519be0206 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -596,13 +596,6 @@ static void iwl4965_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt) | |||
596 | 596 | ||
597 | } | 597 | } |
598 | 598 | ||
599 | int iwl4965_send_statistics_request(struct iwl_priv *priv) | ||
600 | { | ||
601 | u32 flags = 0; | ||
602 | return iwl_send_cmd_pdu(priv, REPLY_STATISTICS_CMD, | ||
603 | sizeof(flags), &flags); | ||
604 | } | ||
605 | |||
606 | /** | 599 | /** |
607 | * iwl4965_rxon_add_station - add station into station table. | 600 | * iwl4965_rxon_add_station - add station into station table. |
608 | * | 601 | * |
@@ -7530,7 +7523,7 @@ static ssize_t show_statistics(struct device *d, | |||
7530 | return -EAGAIN; | 7523 | return -EAGAIN; |
7531 | 7524 | ||
7532 | mutex_lock(&priv->mutex); | 7525 | mutex_lock(&priv->mutex); |
7533 | rc = iwl4965_send_statistics_request(priv); | 7526 | rc = iwl_send_statistics_request(priv, 0); |
7534 | mutex_unlock(&priv->mutex); | 7527 | mutex_unlock(&priv->mutex); |
7535 | 7528 | ||
7536 | if (rc) { | 7529 | if (rc) { |