aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-26 02:10:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:25:31 -0400
commit74e28e44095e30ffd2d0258e4fe91826a15247e7 (patch)
treeb4bc7ab6bc8e3a0690815c3b2078550a12b4265a /drivers/net/wireless/iwlwifi
parentcefeaa5fa0be02cd51968975fec9cfaf7973bb3a (diff)
iwlagn: workqueue moves to iwl_shared
Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tt.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c2
10 files changed, 28 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 6db90854048d..355a81cca18b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -388,7 +388,7 @@ void iwl_check_abort_status(struct iwl_priv *priv,
388 if (frame_count == 1 && status == TX_STATUS_FAIL_RFKILL_FLUSH) { 388 if (frame_count == 1 && status == TX_STATUS_FAIL_RFKILL_FLUSH) {
389 IWL_ERR(priv, "Tx flush command to flush out all frames\n"); 389 IWL_ERR(priv, "Tx flush command to flush out all frames\n");
390 if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) 390 if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
391 queue_work(priv->workqueue, &priv->tx_flush); 391 queue_work(priv->shrd->workqueue, &priv->tx_flush);
392 } 392 }
393} 393}
394 394
@@ -1620,7 +1620,7 @@ static void iwlagn_set_kill_msk(struct iwl_priv *priv,
1620 priv->kill_cts_mask = bt_kill_cts_msg[kill_msk]; 1620 priv->kill_cts_mask = bt_kill_cts_msg[kill_msk];
1621 1621
1622 /* schedule to send runtime bt_config */ 1622 /* schedule to send runtime bt_config */
1623 queue_work(priv->workqueue, &priv->bt_runtime_config); 1623 queue_work(priv->shrd->workqueue, &priv->bt_runtime_config);
1624 } 1624 }
1625} 1625}
1626 1626
@@ -1664,7 +1664,7 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,
1664 IWL_BT_COEX_TRAFFIC_LOAD_NONE; 1664 IWL_BT_COEX_TRAFFIC_LOAD_NONE;
1665 } 1665 }
1666 priv->bt_status = coex->bt_status; 1666 priv->bt_status = coex->bt_status;
1667 queue_work(priv->workqueue, 1667 queue_work(priv->shrd->workqueue,
1668 &priv->bt_traffic_change_work); 1668 &priv->bt_traffic_change_work);
1669 } 1669 }
1670 } 1670 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 3ca6e553fcd2..6812409a57c4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -893,7 +893,7 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
893 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); 893 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate);
894 iwl_send_lq_cmd(priv, ctx, &lq_sta->lq, CMD_ASYNC, false); 894 iwl_send_lq_cmd(priv, ctx, &lq_sta->lq, CMD_ASYNC, false);
895 895
896 queue_work(priv->workqueue, &priv->bt_full_concurrency); 896 queue_work(priv->shrd->workqueue, &priv->bt_full_concurrency);
897 } 897 }
898} 898}
899 899
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
index f501d742984c..2c5558a82b81 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
@@ -569,7 +569,7 @@ void iwl_tt_enter_ct_kill(struct iwl_priv *priv)
569 return; 569 return;
570 570
571 IWL_DEBUG_TEMP(priv, "Queueing critical temperature enter.\n"); 571 IWL_DEBUG_TEMP(priv, "Queueing critical temperature enter.\n");
572 queue_work(priv->workqueue, &priv->ct_enter); 572 queue_work(priv->shrd->workqueue, &priv->ct_enter);
573} 573}
574 574
575void iwl_tt_exit_ct_kill(struct iwl_priv *priv) 575void iwl_tt_exit_ct_kill(struct iwl_priv *priv)
@@ -578,7 +578,7 @@ void iwl_tt_exit_ct_kill(struct iwl_priv *priv)
578 return; 578 return;
579 579
580 IWL_DEBUG_TEMP(priv, "Queueing critical temperature exit.\n"); 580 IWL_DEBUG_TEMP(priv, "Queueing critical temperature exit.\n");
581 queue_work(priv->workqueue, &priv->ct_exit); 581 queue_work(priv->shrd->workqueue, &priv->ct_exit);
582} 582}
583 583
584static void iwl_bg_tt_work(struct work_struct *work) 584static void iwl_bg_tt_work(struct work_struct *work)
@@ -604,7 +604,7 @@ void iwl_tt_handler(struct iwl_priv *priv)
604 return; 604 return;
605 605
606 IWL_DEBUG_TEMP(priv, "Queueing thermal throttling work.\n"); 606 IWL_DEBUG_TEMP(priv, "Queueing thermal throttling work.\n");
607 queue_work(priv->workqueue, &priv->tt_work); 607 queue_work(priv->shrd->workqueue, &priv->tt_work);
608} 608}
609 609
610/* Thermal throttling initialization 610/* Thermal throttling initialization
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e61c68958b8c..a3e2ef4d3443 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2286,7 +2286,7 @@ static void iwlagn_mac_stop(struct ieee80211_hw *hw)
2286 2286
2287 iwl_down(priv); 2287 iwl_down(priv);
2288 2288
2289 flush_workqueue(priv->workqueue); 2289 flush_workqueue(priv->shrd->workqueue);
2290 2290
2291 /* User space software may expect getting rfkill changes 2291 /* User space software may expect getting rfkill changes
2292 * even if interface is down */ 2292 * even if interface is down */
@@ -3340,7 +3340,7 @@ static int iwl_mac_cancel_remain_on_channel(struct ieee80211_hw *hw)
3340 3340
3341static void iwl_setup_deferred_work(struct iwl_priv *priv) 3341static void iwl_setup_deferred_work(struct iwl_priv *priv)
3342{ 3342{
3343 priv->workqueue = create_singlethread_workqueue(DRV_NAME); 3343 priv->shrd->workqueue = create_singlethread_workqueue(DRV_NAME);
3344 3344
3345 init_waitqueue_head(&priv->wait_command_queue); 3345 init_waitqueue_head(&priv->wait_command_queue);
3346 3346
@@ -3746,8 +3746,8 @@ int iwl_probe(struct iwl_bus *bus, struct iwl_cfg *cfg)
3746 return 0; 3746 return 0;
3747 3747
3748out_destroy_workqueue: 3748out_destroy_workqueue:
3749 destroy_workqueue(priv->workqueue); 3749 destroy_workqueue(priv->shrd->workqueue);
3750 priv->workqueue = NULL; 3750 priv->shrd->workqueue = NULL;
3751 iwl_uninit_drv(priv); 3751 iwl_uninit_drv(priv);
3752out_free_eeprom: 3752out_free_eeprom:
3753 iwl_eeprom_free(priv); 3753 iwl_eeprom_free(priv);
@@ -3808,13 +3808,13 @@ void __devexit iwl_remove(struct iwl_priv * priv)
3808 iwl_eeprom_free(priv); 3808 iwl_eeprom_free(priv);
3809 3809
3810 /*netif_stop_queue(dev); */ 3810 /*netif_stop_queue(dev); */
3811 flush_workqueue(priv->workqueue); 3811 flush_workqueue(priv->shrd->workqueue);
3812 3812
3813 /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes 3813 /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes
3814 * priv->workqueue... so we can't take down the workqueue 3814 * priv->shrd->workqueue... so we can't take down the workqueue
3815 * until now... */ 3815 * until now... */
3816 destroy_workqueue(priv->workqueue); 3816 destroy_workqueue(priv->shrd->workqueue);
3817 priv->workqueue = NULL; 3817 priv->shrd->workqueue = NULL;
3818 iwl_free_traffic_mem(priv); 3818 iwl_free_traffic_mem(priv);
3819 3819
3820 trans_free(&priv->trans); 3820 trans_free(&priv->trans);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 02b70dcb93c3..b62ccd7acb4f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -894,7 +894,7 @@ void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
894 if (iwlagn_mod_params.restart_fw) { 894 if (iwlagn_mod_params.restart_fw) {
895 IWL_DEBUG(priv, IWL_DL_FW_ERRORS, 895 IWL_DEBUG(priv, IWL_DL_FW_ERRORS,
896 "Restarting adapter due to uCode error.\n"); 896 "Restarting adapter due to uCode error.\n");
897 queue_work(priv->workqueue, &priv->restart); 897 queue_work(priv->shrd->workqueue, &priv->restart);
898 } else 898 } else
899 IWL_DEBUG(priv, IWL_DL_FW_ERRORS, 899 IWL_DEBUG(priv, IWL_DL_FW_ERRORS,
900 "Detected FW error, but not restarting\n"); 900 "Detected FW error, but not restarting\n");
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 19a0ea9f5045..67e422b730e4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1431,8 +1431,6 @@ struct iwl_priv {
1431 1431
1432 u32 inta_mask; 1432 u32 inta_mask;
1433 1433
1434 struct workqueue_struct *workqueue;
1435
1436 struct work_struct restart; 1434 struct work_struct restart;
1437 struct work_struct scan_completed; 1435 struct work_struct scan_completed;
1438 struct work_struct rx_replenish; 1436 struct work_struct rx_replenish;
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index 8b3a08958cc8..c8af4549a0f9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -150,7 +150,7 @@ static void iwl_rx_beacon_notif(struct iwl_priv *priv,
150 priv->ibss_manager = le32_to_cpu(beacon->ibss_mgr_status); 150 priv->ibss_manager = le32_to_cpu(beacon->ibss_mgr_status);
151 151
152 if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) 152 if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
153 queue_work(priv->workqueue, &priv->beacon_update); 153 queue_work(priv->shrd->workqueue, &priv->beacon_update);
154} 154}
155 155
156/* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */ 156/* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */
@@ -487,7 +487,7 @@ static void iwl_rx_statistics(struct iwl_priv *priv,
487 if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) && 487 if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) &&
488 (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) { 488 (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) {
489 iwl_rx_calc_noise(priv); 489 iwl_rx_calc_noise(priv);
490 queue_work(priv->workqueue, &priv->run_time_calib_work); 490 queue_work(priv->shrd->workqueue, &priv->run_time_calib_work);
491 } 491 }
492 if (priv->cfg->lib->temperature && change) 492 if (priv->cfg->lib->temperature && change)
493 priv->cfg->lib->temperature(priv); 493 priv->cfg->lib->temperature(priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index bddb2daf31bd..6610b1d687c8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -160,7 +160,7 @@ static void iwl_do_scan_abort(struct iwl_priv *priv)
160int iwl_scan_cancel(struct iwl_priv *priv) 160int iwl_scan_cancel(struct iwl_priv *priv)
161{ 161{
162 IWL_DEBUG_SCAN(priv, "Queuing abort scan\n"); 162 IWL_DEBUG_SCAN(priv, "Queuing abort scan\n");
163 queue_work(priv->workqueue, &priv->abort_scan); 163 queue_work(priv->shrd->workqueue, &priv->abort_scan);
164 return 0; 164 return 0;
165} 165}
166 166
@@ -263,7 +263,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
263 (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", 263 (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2",
264 jiffies_to_msecs(jiffies - priv->scan_start)); 264 jiffies_to_msecs(jiffies - priv->scan_start));
265 265
266 queue_work(priv->workqueue, &priv->scan_completed); 266 queue_work(priv->shrd->workqueue, &priv->scan_completed);
267 267
268 if (priv->iw_mode != NL80211_IFTYPE_ADHOC && 268 if (priv->iw_mode != NL80211_IFTYPE_ADHOC &&
269 iwl_advanced_bt_coexist(priv) && 269 iwl_advanced_bt_coexist(priv) &&
@@ -283,7 +283,8 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
283 IWL_BT_COEX_TRAFFIC_LOAD_NONE; 283 IWL_BT_COEX_TRAFFIC_LOAD_NONE;
284 } 284 }
285 priv->bt_status = scan_notif->bt_status; 285 priv->bt_status = scan_notif->bt_status;
286 queue_work(priv->workqueue, &priv->bt_traffic_change_work); 286 queue_work(priv->shrd->workqueue,
287 &priv->bt_traffic_change_work);
287 } 288 }
288} 289}
289 290
@@ -394,7 +395,7 @@ int __must_check iwl_scan_initiate(struct iwl_priv *priv,
394 return ret; 395 return ret;
395 } 396 }
396 397
397 queue_delayed_work(priv->workqueue, &priv->scan_check, 398 queue_delayed_work(priv->shrd->workqueue, &priv->scan_check,
398 IWL_SCAN_CHECK_WATCHDOG); 399 IWL_SCAN_CHECK_WATCHDOG);
399 400
400 return 0; 401 return 0;
@@ -450,7 +451,7 @@ out_unlock:
450 */ 451 */
451void iwl_internal_short_hw_scan(struct iwl_priv *priv) 452void iwl_internal_short_hw_scan(struct iwl_priv *priv)
452{ 453{
453 queue_work(priv->workqueue, &priv->start_internal_scan); 454 queue_work(priv->shrd->workqueue, &priv->start_internal_scan);
454} 455}
455 456
456static void iwl_bg_start_internal_scan(struct work_struct *work) 457static void iwl_bg_start_internal_scan(struct work_struct *work)
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index 05621746825a..85d5a6231393 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -147,6 +147,7 @@ struct iwl_hw_params {
147 * @bus: pointer to the bus layer data 147 * @bus: pointer to the bus layer data
148 * @priv: pointer to the upper layer data 148 * @priv: pointer to the upper layer data
149 * @hw_params: see struct iwl_hw_params 149 * @hw_params: see struct iwl_hw_params
150 * @workqueue: the workqueue used by all the layers of the driver
150 */ 151 */
151struct iwl_shared { 152struct iwl_shared {
152#ifdef CONFIG_IWLWIFI_DEBUG 153#ifdef CONFIG_IWLWIFI_DEBUG
@@ -158,6 +159,8 @@ struct iwl_shared {
158 struct iwl_bus *bus; 159 struct iwl_bus *bus;
159 struct iwl_priv *priv; 160 struct iwl_priv *priv;
160 struct iwl_hw_params hw_params; 161 struct iwl_hw_params hw_params;
162
163 struct workqueue_struct *workqueue;
161}; 164};
162 165
163/*Whatever _m is (iwl_trans, iwl_priv, iwl_bus, these macros will work */ 166/*Whatever _m is (iwl_trans, iwl_priv, iwl_bus, these macros will work */
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
index 52edd6a10c7a..10627f88c4e2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
@@ -224,7 +224,7 @@ static void iwlagn_rx_queue_restock(struct iwl_priv *priv)
224 /* If the pre-allocated buffer pool is dropping low, schedule to 224 /* If the pre-allocated buffer pool is dropping low, schedule to
225 * refill it */ 225 * refill it */
226 if (rxq->free_count <= RX_LOW_WATERMARK) 226 if (rxq->free_count <= RX_LOW_WATERMARK)
227 queue_work(priv->workqueue, &priv->rx_replenish); 227 queue_work(priv->shrd->workqueue, &priv->rx_replenish);
228 228
229 229
230 /* If we've added more space for the firmware to place data, tell it. 230 /* If we've added more space for the firmware to place data, tell it.