diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-07-03 08:45:34 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-07-21 10:27:55 -0400 |
commit | 8d30119346d52516f289016e1c57f853a835cb4a (patch) | |
tree | 0f81159149ec2d015cf786065ea3ee66208a284c /drivers | |
parent | 56d90f4c8ac186a708e6af290d23857ea901ba05 (diff) |
iwlagn: kill iwlagn_rx_handler_setup
Since iwlagn_rx_handler_setup is always called, fold it into
iwl_rx_handler_setup. BT related handlers are setup by the new
bt_rx_handler_setup lib_ops.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 16 |
8 files changed, 20 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index fe15a46e4c7e..5fa171954099 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -168,7 +168,6 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv) | |||
168 | 168 | ||
169 | static struct iwl_lib_ops iwl1000_lib = { | 169 | static struct iwl_lib_ops iwl1000_lib = { |
170 | .set_hw_params = iwl1000_hw_set_hw_params, | 170 | .set_hw_params = iwl1000_hw_set_hw_params, |
171 | .rx_handler_setup = iwlagn_rx_handler_setup, | ||
172 | .setup_deferred_work = iwlagn_setup_deferred_work, | 171 | .setup_deferred_work = iwlagn_setup_deferred_work, |
173 | .nic_config = iwl1000_nic_config, | 172 | .nic_config = iwl1000_nic_config, |
174 | .eeprom_ops = { | 173 | .eeprom_ops = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index 7e0f766e4364..c913410380c3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -167,7 +167,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv) | |||
167 | 167 | ||
168 | static struct iwl_lib_ops iwl2000_lib = { | 168 | static struct iwl_lib_ops iwl2000_lib = { |
169 | .set_hw_params = iwl2000_hw_set_hw_params, | 169 | .set_hw_params = iwl2000_hw_set_hw_params, |
170 | .rx_handler_setup = iwlagn_rx_handler_setup, | ||
171 | .setup_deferred_work = iwlagn_setup_deferred_work, | 170 | .setup_deferred_work = iwlagn_setup_deferred_work, |
172 | .nic_config = iwl2000_nic_config, | 171 | .nic_config = iwl2000_nic_config, |
173 | .eeprom_ops = { | 172 | .eeprom_ops = { |
@@ -187,7 +186,7 @@ static struct iwl_lib_ops iwl2000_lib = { | |||
187 | 186 | ||
188 | static struct iwl_lib_ops iwl2030_lib = { | 187 | static struct iwl_lib_ops iwl2030_lib = { |
189 | .set_hw_params = iwl2000_hw_set_hw_params, | 188 | .set_hw_params = iwl2000_hw_set_hw_params, |
190 | .rx_handler_setup = iwlagn_bt_rx_handler_setup, | 189 | .bt_rx_handler_setup = iwlagn_bt_rx_handler_setup, |
191 | .setup_deferred_work = iwlagn_bt_setup_deferred_work, | 190 | .setup_deferred_work = iwlagn_bt_setup_deferred_work, |
192 | .cancel_deferred_work = iwlagn_bt_cancel_deferred_work, | 191 | .cancel_deferred_work = iwlagn_bt_cancel_deferred_work, |
193 | .nic_config = iwl2000_nic_config, | 192 | .nic_config = iwl2000_nic_config, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index e0908784afc0..4e1204a5ff68 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -320,7 +320,6 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | |||
320 | 320 | ||
321 | static struct iwl_lib_ops iwl5000_lib = { | 321 | static struct iwl_lib_ops iwl5000_lib = { |
322 | .set_hw_params = iwl5000_hw_set_hw_params, | 322 | .set_hw_params = iwl5000_hw_set_hw_params, |
323 | .rx_handler_setup = iwlagn_rx_handler_setup, | ||
324 | .setup_deferred_work = iwlagn_setup_deferred_work, | 323 | .setup_deferred_work = iwlagn_setup_deferred_work, |
325 | .set_channel_switch = iwl5000_hw_channel_switch, | 324 | .set_channel_switch = iwl5000_hw_channel_switch, |
326 | .nic_config = iwl5000_nic_config, | 325 | .nic_config = iwl5000_nic_config, |
@@ -340,7 +339,6 @@ static struct iwl_lib_ops iwl5000_lib = { | |||
340 | 339 | ||
341 | static struct iwl_lib_ops iwl5150_lib = { | 340 | static struct iwl_lib_ops iwl5150_lib = { |
342 | .set_hw_params = iwl5150_hw_set_hw_params, | 341 | .set_hw_params = iwl5150_hw_set_hw_params, |
343 | .rx_handler_setup = iwlagn_rx_handler_setup, | ||
344 | .setup_deferred_work = iwlagn_setup_deferred_work, | 342 | .setup_deferred_work = iwlagn_setup_deferred_work, |
345 | .set_channel_switch = iwl5000_hw_channel_switch, | 343 | .set_channel_switch = iwl5000_hw_channel_switch, |
346 | .nic_config = iwl5000_nic_config, | 344 | .nic_config = iwl5000_nic_config, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 3b2d753b3463..f1fdcdc21eb5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -258,7 +258,6 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
258 | 258 | ||
259 | static struct iwl_lib_ops iwl6000_lib = { | 259 | static struct iwl_lib_ops iwl6000_lib = { |
260 | .set_hw_params = iwl6000_hw_set_hw_params, | 260 | .set_hw_params = iwl6000_hw_set_hw_params, |
261 | .rx_handler_setup = iwlagn_rx_handler_setup, | ||
262 | .setup_deferred_work = iwlagn_setup_deferred_work, | 261 | .setup_deferred_work = iwlagn_setup_deferred_work, |
263 | .set_channel_switch = iwl6000_hw_channel_switch, | 262 | .set_channel_switch = iwl6000_hw_channel_switch, |
264 | .nic_config = iwl6000_nic_config, | 263 | .nic_config = iwl6000_nic_config, |
@@ -279,7 +278,7 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
279 | 278 | ||
280 | static struct iwl_lib_ops iwl6030_lib = { | 279 | static struct iwl_lib_ops iwl6030_lib = { |
281 | .set_hw_params = iwl6000_hw_set_hw_params, | 280 | .set_hw_params = iwl6000_hw_set_hw_params, |
282 | .rx_handler_setup = iwlagn_bt_rx_handler_setup, | 281 | .bt_rx_handler_setup = iwlagn_bt_rx_handler_setup, |
283 | .setup_deferred_work = iwlagn_bt_setup_deferred_work, | 282 | .setup_deferred_work = iwlagn_bt_setup_deferred_work, |
284 | .cancel_deferred_work = iwlagn_bt_cancel_deferred_work, | 283 | .cancel_deferred_work = iwlagn_bt_cancel_deferred_work, |
285 | .set_channel_switch = iwl6000_hw_channel_switch, | 284 | .set_channel_switch = iwl6000_hw_channel_switch, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index e06a5c2f8355..5d6258d08e20 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -391,8 +391,7 @@ void iwl_check_abort_status(struct iwl_priv *priv, | |||
391 | } | 391 | } |
392 | } | 392 | } |
393 | 393 | ||
394 | static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | 394 | void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) |
395 | struct iwl_rx_mem_buffer *rxb) | ||
396 | { | 395 | { |
397 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 396 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
398 | u16 sequence = le16_to_cpu(pkt->hdr.sequence); | 397 | u16 sequence = le16_to_cpu(pkt->hdr.sequence); |
@@ -479,19 +478,6 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | |||
479 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 478 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
480 | } | 479 | } |
481 | 480 | ||
482 | void iwlagn_rx_handler_setup(struct iwl_priv *priv) | ||
483 | { | ||
484 | /* init calibration handlers */ | ||
485 | priv->rx_handlers[CALIBRATION_RES_NOTIFICATION] = | ||
486 | iwlagn_rx_calib_result; | ||
487 | priv->rx_handlers[REPLY_TX] = iwlagn_rx_reply_tx; | ||
488 | |||
489 | /* set up notification wait support */ | ||
490 | spin_lock_init(&priv->_agn.notif_wait_lock); | ||
491 | INIT_LIST_HEAD(&priv->_agn.notif_waits); | ||
492 | init_waitqueue_head(&priv->_agn.notif_waitq); | ||
493 | } | ||
494 | |||
495 | void iwlagn_setup_deferred_work(struct iwl_priv *priv) | 481 | void iwlagn_setup_deferred_work(struct iwl_priv *priv) |
496 | { | 482 | { |
497 | /* | 483 | /* |
@@ -1762,7 +1748,6 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv, | |||
1762 | 1748 | ||
1763 | void iwlagn_bt_rx_handler_setup(struct iwl_priv *priv) | 1749 | void iwlagn_bt_rx_handler_setup(struct iwl_priv *priv) |
1764 | { | 1750 | { |
1765 | iwlagn_rx_handler_setup(priv); | ||
1766 | priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] = | 1751 | priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] = |
1767 | iwlagn_bt_coex_profile_notif; | 1752 | iwlagn_bt_coex_profile_notif; |
1768 | } | 1753 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 0e8ccb9c99b1..d9fef639759c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -162,7 +162,6 @@ int iwlagn_load_ucode_wait_alive(struct iwl_priv *priv, | |||
162 | /* lib */ | 162 | /* lib */ |
163 | void iwl_check_abort_status(struct iwl_priv *priv, | 163 | void iwl_check_abort_status(struct iwl_priv *priv, |
164 | u8 frame_count, u32 status); | 164 | u8 frame_count, u32 status); |
165 | void iwlagn_rx_handler_setup(struct iwl_priv *priv); | ||
166 | void iwlagn_setup_deferred_work(struct iwl_priv *priv); | 165 | void iwlagn_setup_deferred_work(struct iwl_priv *priv); |
167 | int iwlagn_hw_valid_rtc_data_addr(u32 addr); | 166 | int iwlagn_hw_valid_rtc_data_addr(u32 addr); |
168 | int iwlagn_send_tx_power(struct iwl_priv *priv); | 167 | int iwlagn_send_tx_power(struct iwl_priv *priv); |
@@ -197,6 +196,7 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv, | |||
197 | int sta_id, u8 tid, int txq_id); | 196 | int sta_id, u8 tid, int txq_id); |
198 | void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, | 197 | void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, |
199 | struct iwl_rx_mem_buffer *rxb); | 198 | struct iwl_rx_mem_buffer *rxb); |
199 | void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb); | ||
200 | int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index); | 200 | int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index); |
201 | 201 | ||
202 | static inline u32 iwl_tx_status_to_mac80211(u32 status) | 202 | static inline u32 iwl_tx_status_to_mac80211(u32 status) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index c10ced58d357..6f825d3e50e9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -83,8 +83,8 @@ struct iwl_cmd; | |||
83 | struct iwl_lib_ops { | 83 | struct iwl_lib_ops { |
84 | /* set hw dependent parameters */ | 84 | /* set hw dependent parameters */ |
85 | int (*set_hw_params)(struct iwl_priv *priv); | 85 | int (*set_hw_params)(struct iwl_priv *priv); |
86 | /* setup Rx handler */ | 86 | /* setup BT Rx handler */ |
87 | void (*rx_handler_setup)(struct iwl_priv *priv); | 87 | void (*bt_rx_handler_setup)(struct iwl_priv *priv); |
88 | /* setup deferred work */ | 88 | /* setup deferred work */ |
89 | void (*setup_deferred_work)(struct iwl_priv *priv); | 89 | void (*setup_deferred_work)(struct iwl_priv *priv); |
90 | /* cancel deferred work */ | 90 | /* cancel deferred work */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 05fd75fb59ac..f67931d408b6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -966,8 +966,20 @@ void iwl_setup_rx_handlers(struct iwl_priv *priv) | |||
966 | /* block ack */ | 966 | /* block ack */ |
967 | handlers[REPLY_COMPRESSED_BA] = iwlagn_rx_reply_compressed_ba; | 967 | handlers[REPLY_COMPRESSED_BA] = iwlagn_rx_reply_compressed_ba; |
968 | 968 | ||
969 | /* Set up hardware specific Rx handlers */ | 969 | /* init calibration handlers */ |
970 | priv->cfg->lib->rx_handler_setup(priv); | 970 | priv->rx_handlers[CALIBRATION_RES_NOTIFICATION] = |
971 | iwlagn_rx_calib_result; | ||
972 | priv->rx_handlers[REPLY_TX] = iwlagn_rx_reply_tx; | ||
973 | |||
974 | /* set up notification wait support */ | ||
975 | spin_lock_init(&priv->_agn.notif_wait_lock); | ||
976 | INIT_LIST_HEAD(&priv->_agn.notif_waits); | ||
977 | init_waitqueue_head(&priv->_agn.notif_waitq); | ||
978 | |||
979 | /* Set up BT Rx handlers */ | ||
980 | if (priv->cfg->lib->bt_rx_handler_setup) | ||
981 | priv->cfg->lib->bt_rx_handler_setup(priv); | ||
982 | |||
971 | } | 983 | } |
972 | 984 | ||
973 | void iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | 985 | void iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) |