diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2008-12-18 21:37:28 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:13 -0500 |
commit | 4a8a43222db6f04c88def2160a95f978f704b515 (patch) | |
tree | c5b5666c735e4f78045688ece7f5879f9529b032 /drivers/net/wireless/iwlwifi/iwl3945-base.c | |
parent | f2c7e52100545e54af064fe0345d141fdcf2d243 (diff) |
iwl3945: replaces iwl3945_priv with iwl_priv
The patch replaces iwl3945_priv to iwl_priv. It adds 3945 specific
data members to iwl_priv.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 400 |
1 files changed, 200 insertions, 200 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 43af2595c694..f80294e6bd9b 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -55,7 +55,7 @@ | |||
55 | #include "iwl-core.h" | 55 | #include "iwl-core.h" |
56 | #include "iwl-dev.h" | 56 | #include "iwl-dev.h" |
57 | 57 | ||
58 | static int iwl3945_tx_queue_update_write_ptr(struct iwl3945_priv *priv, | 58 | static int iwl3945_tx_queue_update_write_ptr(struct iwl_priv *priv, |
59 | struct iwl3945_tx_queue *txq); | 59 | struct iwl3945_tx_queue *txq); |
60 | 60 | ||
61 | /****************************************************************************** | 61 | /****************************************************************************** |
@@ -103,7 +103,7 @@ MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR); | |||
103 | MODULE_LICENSE("GPL"); | 103 | MODULE_LICENSE("GPL"); |
104 | 104 | ||
105 | static const struct ieee80211_supported_band *iwl3945_get_band( | 105 | static const struct ieee80211_supported_band *iwl3945_get_band( |
106 | struct iwl3945_priv *priv, enum ieee80211_band band) | 106 | struct iwl_priv *priv, enum ieee80211_band band) |
107 | { | 107 | { |
108 | return priv->hw->wiphy->bands[band]; | 108 | return priv->hw->wiphy->bands[band]; |
109 | } | 109 | } |
@@ -143,7 +143,7 @@ int iwl3945_x2_queue_used(const struct iwl_queue *q, int i) | |||
143 | /** | 143 | /** |
144 | * iwl3945_queue_init - Initialize queue's high/low-water and read/write indexes | 144 | * iwl3945_queue_init - Initialize queue's high/low-water and read/write indexes |
145 | */ | 145 | */ |
146 | static int iwl3945_queue_init(struct iwl3945_priv *priv, struct iwl_queue *q, | 146 | static int iwl3945_queue_init(struct iwl_priv *priv, struct iwl_queue *q, |
147 | int count, int slots_num, u32 id) | 147 | int count, int slots_num, u32 id) |
148 | { | 148 | { |
149 | q->n_bd = count; | 149 | q->n_bd = count; |
@@ -174,7 +174,7 @@ static int iwl3945_queue_init(struct iwl3945_priv *priv, struct iwl_queue *q, | |||
174 | /** | 174 | /** |
175 | * iwl3945_tx_queue_alloc - Alloc driver data and TFD CB for one Tx/cmd queue | 175 | * iwl3945_tx_queue_alloc - Alloc driver data and TFD CB for one Tx/cmd queue |
176 | */ | 176 | */ |
177 | static int iwl3945_tx_queue_alloc(struct iwl3945_priv *priv, | 177 | static int iwl3945_tx_queue_alloc(struct iwl_priv *priv, |
178 | struct iwl3945_tx_queue *txq, u32 id) | 178 | struct iwl3945_tx_queue *txq, u32 id) |
179 | { | 179 | { |
180 | struct pci_dev *dev = priv->pci_dev; | 180 | struct pci_dev *dev = priv->pci_dev; |
@@ -217,7 +217,7 @@ static int iwl3945_tx_queue_alloc(struct iwl3945_priv *priv, | |||
217 | /** | 217 | /** |
218 | * iwl3945_tx_queue_init - Allocate and initialize one tx/cmd queue | 218 | * iwl3945_tx_queue_init - Allocate and initialize one tx/cmd queue |
219 | */ | 219 | */ |
220 | int iwl3945_tx_queue_init(struct iwl3945_priv *priv, | 220 | int iwl3945_tx_queue_init(struct iwl_priv *priv, |
221 | struct iwl3945_tx_queue *txq, int slots_num, u32 txq_id) | 221 | struct iwl3945_tx_queue *txq, int slots_num, u32 txq_id) |
222 | { | 222 | { |
223 | struct pci_dev *dev = priv->pci_dev; | 223 | struct pci_dev *dev = priv->pci_dev; |
@@ -269,7 +269,7 @@ int iwl3945_tx_queue_init(struct iwl3945_priv *priv, | |||
269 | * Free all buffers. | 269 | * Free all buffers. |
270 | * 0-fill, but do not free "txq" descriptor structure. | 270 | * 0-fill, but do not free "txq" descriptor structure. |
271 | */ | 271 | */ |
272 | void iwl3945_tx_queue_free(struct iwl3945_priv *priv, struct iwl3945_tx_queue *txq) | 272 | void iwl3945_tx_queue_free(struct iwl_priv *priv, struct iwl3945_tx_queue *txq) |
273 | { | 273 | { |
274 | struct iwl_queue *q = &txq->q; | 274 | struct iwl_queue *q = &txq->q; |
275 | struct pci_dev *dev = priv->pci_dev; | 275 | struct pci_dev *dev = priv->pci_dev; |
@@ -315,7 +315,7 @@ void iwl3945_tx_queue_free(struct iwl3945_priv *priv, struct iwl3945_tx_queue *t | |||
315 | * | 315 | * |
316 | * NOTE: This does not remove station from device's station table. | 316 | * NOTE: This does not remove station from device's station table. |
317 | */ | 317 | */ |
318 | static u8 iwl3945_remove_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap) | 318 | static u8 iwl3945_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap) |
319 | { | 319 | { |
320 | int index = IWL_INVALID_STATION; | 320 | int index = IWL_INVALID_STATION; |
321 | int i; | 321 | int i; |
@@ -357,7 +357,7 @@ out: | |||
357 | * | 357 | * |
358 | * NOTE: This does not clear or otherwise alter the device's station table. | 358 | * NOTE: This does not clear or otherwise alter the device's station table. |
359 | */ | 359 | */ |
360 | static void iwl3945_clear_stations_table(struct iwl3945_priv *priv) | 360 | static void iwl3945_clear_stations_table(struct iwl_priv *priv) |
361 | { | 361 | { |
362 | unsigned long flags; | 362 | unsigned long flags; |
363 | 363 | ||
@@ -372,7 +372,7 @@ static void iwl3945_clear_stations_table(struct iwl3945_priv *priv) | |||
372 | /** | 372 | /** |
373 | * iwl3945_add_station - Add station to station tables in driver and device | 373 | * iwl3945_add_station - Add station to station tables in driver and device |
374 | */ | 374 | */ |
375 | u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap, u8 flags) | 375 | u8 iwl3945_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags) |
376 | { | 376 | { |
377 | int i; | 377 | int i; |
378 | int index = IWL_INVALID_STATION; | 378 | int index = IWL_INVALID_STATION; |
@@ -442,7 +442,7 @@ u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap, u8 | |||
442 | 442 | ||
443 | /*************** DRIVER STATUS FUNCTIONS *****/ | 443 | /*************** DRIVER STATUS FUNCTIONS *****/ |
444 | 444 | ||
445 | static inline int iwl3945_is_ready(struct iwl3945_priv *priv) | 445 | static inline int iwl3945_is_ready(struct iwl_priv *priv) |
446 | { | 446 | { |
447 | /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are | 447 | /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are |
448 | * set but EXIT_PENDING is not */ | 448 | * set but EXIT_PENDING is not */ |
@@ -451,33 +451,33 @@ static inline int iwl3945_is_ready(struct iwl3945_priv *priv) | |||
451 | !test_bit(STATUS_EXIT_PENDING, &priv->status); | 451 | !test_bit(STATUS_EXIT_PENDING, &priv->status); |
452 | } | 452 | } |
453 | 453 | ||
454 | static inline int iwl3945_is_alive(struct iwl3945_priv *priv) | 454 | static inline int iwl3945_is_alive(struct iwl_priv *priv) |
455 | { | 455 | { |
456 | return test_bit(STATUS_ALIVE, &priv->status); | 456 | return test_bit(STATUS_ALIVE, &priv->status); |
457 | } | 457 | } |
458 | 458 | ||
459 | static inline int iwl3945_is_init(struct iwl3945_priv *priv) | 459 | static inline int iwl3945_is_init(struct iwl_priv *priv) |
460 | { | 460 | { |
461 | return test_bit(STATUS_INIT, &priv->status); | 461 | return test_bit(STATUS_INIT, &priv->status); |
462 | } | 462 | } |
463 | 463 | ||
464 | static inline int iwl3945_is_rfkill_sw(struct iwl3945_priv *priv) | 464 | static inline int iwl3945_is_rfkill_sw(struct iwl_priv *priv) |
465 | { | 465 | { |
466 | return test_bit(STATUS_RF_KILL_SW, &priv->status); | 466 | return test_bit(STATUS_RF_KILL_SW, &priv->status); |
467 | } | 467 | } |
468 | 468 | ||
469 | static inline int iwl3945_is_rfkill_hw(struct iwl3945_priv *priv) | 469 | static inline int iwl3945_is_rfkill_hw(struct iwl_priv *priv) |
470 | { | 470 | { |
471 | return test_bit(STATUS_RF_KILL_HW, &priv->status); | 471 | return test_bit(STATUS_RF_KILL_HW, &priv->status); |
472 | } | 472 | } |
473 | 473 | ||
474 | static inline int iwl3945_is_rfkill(struct iwl3945_priv *priv) | 474 | static inline int iwl3945_is_rfkill(struct iwl_priv *priv) |
475 | { | 475 | { |
476 | return iwl3945_is_rfkill_hw(priv) || | 476 | return iwl3945_is_rfkill_hw(priv) || |
477 | iwl3945_is_rfkill_sw(priv); | 477 | iwl3945_is_rfkill_sw(priv); |
478 | } | 478 | } |
479 | 479 | ||
480 | static inline int iwl3945_is_ready_rf(struct iwl3945_priv *priv) | 480 | static inline int iwl3945_is_ready_rf(struct iwl_priv *priv) |
481 | { | 481 | { |
482 | 482 | ||
483 | if (iwl3945_is_rfkill(priv)) | 483 | if (iwl3945_is_rfkill(priv)) |
@@ -500,7 +500,7 @@ static inline int iwl3945_is_ready_rf(struct iwl3945_priv *priv) | |||
500 | * failed. On success, it turns the index (> 0) of command in the | 500 | * failed. On success, it turns the index (> 0) of command in the |
501 | * command queue. | 501 | * command queue. |
502 | */ | 502 | */ |
503 | static int iwl3945_enqueue_hcmd(struct iwl3945_priv *priv, struct iwl3945_host_cmd *cmd) | 503 | static int iwl3945_enqueue_hcmd(struct iwl_priv *priv, struct iwl3945_host_cmd *cmd) |
504 | { | 504 | { |
505 | struct iwl3945_tx_queue *txq = &priv->txq39[IWL_CMD_QUEUE_NUM]; | 505 | struct iwl3945_tx_queue *txq = &priv->txq39[IWL_CMD_QUEUE_NUM]; |
506 | struct iwl_queue *q = &txq->q; | 506 | struct iwl_queue *q = &txq->q; |
@@ -579,7 +579,7 @@ static int iwl3945_enqueue_hcmd(struct iwl3945_priv *priv, struct iwl3945_host_c | |||
579 | return ret ? ret : idx; | 579 | return ret ? ret : idx; |
580 | } | 580 | } |
581 | 581 | ||
582 | static int iwl3945_send_cmd_async(struct iwl3945_priv *priv, struct iwl3945_host_cmd *cmd) | 582 | static int iwl3945_send_cmd_async(struct iwl_priv *priv, struct iwl3945_host_cmd *cmd) |
583 | { | 583 | { |
584 | int ret; | 584 | int ret; |
585 | 585 | ||
@@ -603,7 +603,7 @@ static int iwl3945_send_cmd_async(struct iwl3945_priv *priv, struct iwl3945_host | |||
603 | return 0; | 603 | return 0; |
604 | } | 604 | } |
605 | 605 | ||
606 | static int iwl3945_send_cmd_sync(struct iwl3945_priv *priv, struct iwl3945_host_cmd *cmd) | 606 | static int iwl3945_send_cmd_sync(struct iwl_priv *priv, struct iwl3945_host_cmd *cmd) |
607 | { | 607 | { |
608 | int cmd_idx; | 608 | int cmd_idx; |
609 | int ret; | 609 | int ret; |
@@ -691,7 +691,7 @@ out: | |||
691 | return ret; | 691 | return ret; |
692 | } | 692 | } |
693 | 693 | ||
694 | int iwl3945_send_cmd(struct iwl3945_priv *priv, struct iwl3945_host_cmd *cmd) | 694 | int iwl3945_send_cmd(struct iwl_priv *priv, struct iwl3945_host_cmd *cmd) |
695 | { | 695 | { |
696 | if (cmd->meta.flags & CMD_ASYNC) | 696 | if (cmd->meta.flags & CMD_ASYNC) |
697 | return iwl3945_send_cmd_async(priv, cmd); | 697 | return iwl3945_send_cmd_async(priv, cmd); |
@@ -699,7 +699,7 @@ int iwl3945_send_cmd(struct iwl3945_priv *priv, struct iwl3945_host_cmd *cmd) | |||
699 | return iwl3945_send_cmd_sync(priv, cmd); | 699 | return iwl3945_send_cmd_sync(priv, cmd); |
700 | } | 700 | } |
701 | 701 | ||
702 | int iwl3945_send_cmd_pdu(struct iwl3945_priv *priv, u8 id, u16 len, const void *data) | 702 | int iwl3945_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len, const void *data) |
703 | { | 703 | { |
704 | struct iwl3945_host_cmd cmd = { | 704 | struct iwl3945_host_cmd cmd = { |
705 | .id = id, | 705 | .id = id, |
@@ -710,7 +710,7 @@ int iwl3945_send_cmd_pdu(struct iwl3945_priv *priv, u8 id, u16 len, const void * | |||
710 | return iwl3945_send_cmd_sync(priv, &cmd); | 710 | return iwl3945_send_cmd_sync(priv, &cmd); |
711 | } | 711 | } |
712 | 712 | ||
713 | static int __must_check iwl3945_send_cmd_u32(struct iwl3945_priv *priv, u8 id, u32 val) | 713 | static int __must_check iwl3945_send_cmd_u32(struct iwl_priv *priv, u8 id, u32 val) |
714 | { | 714 | { |
715 | struct iwl3945_host_cmd cmd = { | 715 | struct iwl3945_host_cmd cmd = { |
716 | .id = id, | 716 | .id = id, |
@@ -721,7 +721,7 @@ static int __must_check iwl3945_send_cmd_u32(struct iwl3945_priv *priv, u8 id, u | |||
721 | return iwl3945_send_cmd_sync(priv, &cmd); | 721 | return iwl3945_send_cmd_sync(priv, &cmd); |
722 | } | 722 | } |
723 | 723 | ||
724 | int iwl3945_send_statistics_request(struct iwl3945_priv *priv) | 724 | int iwl3945_send_statistics_request(struct iwl_priv *priv) |
725 | { | 725 | { |
726 | return iwl3945_send_cmd_u32(priv, REPLY_STATISTICS_CMD, 0); | 726 | return iwl3945_send_cmd_u32(priv, REPLY_STATISTICS_CMD, 0); |
727 | } | 727 | } |
@@ -736,7 +736,7 @@ int iwl3945_send_statistics_request(struct iwl3945_priv *priv) | |||
736 | * NOTE: Does not commit to the hardware; it sets appropriate bit fields | 736 | * NOTE: Does not commit to the hardware; it sets appropriate bit fields |
737 | * in the staging RXON flag structure based on the band | 737 | * in the staging RXON flag structure based on the band |
738 | */ | 738 | */ |
739 | static int iwl3945_set_rxon_channel(struct iwl3945_priv *priv, | 739 | static int iwl3945_set_rxon_channel(struct iwl_priv *priv, |
740 | enum ieee80211_band band, | 740 | enum ieee80211_band band, |
741 | u16 channel) | 741 | u16 channel) |
742 | { | 742 | { |
@@ -770,7 +770,7 @@ static int iwl3945_set_rxon_channel(struct iwl3945_priv *priv, | |||
770 | * be #ifdef'd out once the driver is stable and folks aren't actively | 770 | * be #ifdef'd out once the driver is stable and folks aren't actively |
771 | * making changes | 771 | * making changes |
772 | */ | 772 | */ |
773 | static int iwl3945_check_rxon_cmd(struct iwl3945_priv *priv) | 773 | static int iwl3945_check_rxon_cmd(struct iwl_priv *priv) |
774 | { | 774 | { |
775 | int error = 0; | 775 | int error = 0; |
776 | int counter = 1; | 776 | int counter = 1; |
@@ -851,7 +851,7 @@ static int iwl3945_check_rxon_cmd(struct iwl3945_priv *priv) | |||
851 | * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that | 851 | * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that |
852 | * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required. | 852 | * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required. |
853 | */ | 853 | */ |
854 | static int iwl3945_full_rxon_required(struct iwl3945_priv *priv) | 854 | static int iwl3945_full_rxon_required(struct iwl_priv *priv) |
855 | { | 855 | { |
856 | 856 | ||
857 | /* These items are only settable from the full RXON command */ | 857 | /* These items are only settable from the full RXON command */ |
@@ -886,7 +886,7 @@ static int iwl3945_full_rxon_required(struct iwl3945_priv *priv) | |||
886 | return 0; | 886 | return 0; |
887 | } | 887 | } |
888 | 888 | ||
889 | static int iwl3945_send_rxon_assoc(struct iwl3945_priv *priv) | 889 | static int iwl3945_send_rxon_assoc(struct iwl_priv *priv) |
890 | { | 890 | { |
891 | int rc = 0; | 891 | int rc = 0; |
892 | struct iwl_rx_packet *res = NULL; | 892 | struct iwl_rx_packet *res = NULL; |
@@ -938,7 +938,7 @@ static int iwl3945_send_rxon_assoc(struct iwl3945_priv *priv) | |||
938 | * function correctly transitions out of the RXON_ASSOC_MSK state if | 938 | * function correctly transitions out of the RXON_ASSOC_MSK state if |
939 | * a HW tune is required based on the RXON structure changes. | 939 | * a HW tune is required based on the RXON structure changes. |
940 | */ | 940 | */ |
941 | static int iwl3945_commit_rxon(struct iwl3945_priv *priv) | 941 | static int iwl3945_commit_rxon(struct iwl_priv *priv) |
942 | { | 942 | { |
943 | /* cast away the const for active_rxon in this function */ | 943 | /* cast away the const for active_rxon in this function */ |
944 | struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active39_rxon; | 944 | struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active39_rxon; |
@@ -1056,7 +1056,7 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv) | |||
1056 | return 0; | 1056 | return 0; |
1057 | } | 1057 | } |
1058 | 1058 | ||
1059 | static int iwl3945_send_bt_config(struct iwl3945_priv *priv) | 1059 | static int iwl3945_send_bt_config(struct iwl_priv *priv) |
1060 | { | 1060 | { |
1061 | struct iwl_bt_cmd bt_cmd = { | 1061 | struct iwl_bt_cmd bt_cmd = { |
1062 | .flags = 3, | 1062 | .flags = 3, |
@@ -1070,7 +1070,7 @@ static int iwl3945_send_bt_config(struct iwl3945_priv *priv) | |||
1070 | sizeof(bt_cmd), &bt_cmd); | 1070 | sizeof(bt_cmd), &bt_cmd); |
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | static int iwl3945_send_scan_abort(struct iwl3945_priv *priv) | 1073 | static int iwl3945_send_scan_abort(struct iwl_priv *priv) |
1074 | { | 1074 | { |
1075 | int rc = 0; | 1075 | int rc = 0; |
1076 | struct iwl_rx_packet *res; | 1076 | struct iwl_rx_packet *res; |
@@ -1111,7 +1111,7 @@ static int iwl3945_send_scan_abort(struct iwl3945_priv *priv) | |||
1111 | return rc; | 1111 | return rc; |
1112 | } | 1112 | } |
1113 | 1113 | ||
1114 | static int iwl3945_card_state_sync_callback(struct iwl3945_priv *priv, | 1114 | static int iwl3945_card_state_sync_callback(struct iwl_priv *priv, |
1115 | struct iwl3945_cmd *cmd, | 1115 | struct iwl3945_cmd *cmd, |
1116 | struct sk_buff *skb) | 1116 | struct sk_buff *skb) |
1117 | { | 1117 | { |
@@ -1128,7 +1128,7 @@ static int iwl3945_card_state_sync_callback(struct iwl3945_priv *priv, | |||
1128 | * When in the 'halt' state, the card is shut down and must be fully | 1128 | * When in the 'halt' state, the card is shut down and must be fully |
1129 | * restarted to come back on. | 1129 | * restarted to come back on. |
1130 | */ | 1130 | */ |
1131 | static int iwl3945_send_card_state(struct iwl3945_priv *priv, u32 flags, u8 meta_flag) | 1131 | static int iwl3945_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag) |
1132 | { | 1132 | { |
1133 | struct iwl3945_host_cmd cmd = { | 1133 | struct iwl3945_host_cmd cmd = { |
1134 | .id = REPLY_CARD_STATE_CMD, | 1134 | .id = REPLY_CARD_STATE_CMD, |
@@ -1143,7 +1143,7 @@ static int iwl3945_send_card_state(struct iwl3945_priv *priv, u32 flags, u8 meta | |||
1143 | return iwl3945_send_cmd(priv, &cmd); | 1143 | return iwl3945_send_cmd(priv, &cmd); |
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | static int iwl3945_add_sta_sync_callback(struct iwl3945_priv *priv, | 1146 | static int iwl3945_add_sta_sync_callback(struct iwl_priv *priv, |
1147 | struct iwl3945_cmd *cmd, struct sk_buff *skb) | 1147 | struct iwl3945_cmd *cmd, struct sk_buff *skb) |
1148 | { | 1148 | { |
1149 | struct iwl_rx_packet *res = NULL; | 1149 | struct iwl_rx_packet *res = NULL; |
@@ -1171,7 +1171,7 @@ static int iwl3945_add_sta_sync_callback(struct iwl3945_priv *priv, | |||
1171 | return 1; | 1171 | return 1; |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | int iwl3945_send_add_station(struct iwl3945_priv *priv, | 1174 | int iwl3945_send_add_station(struct iwl_priv *priv, |
1175 | struct iwl3945_addsta_cmd *sta, u8 flags) | 1175 | struct iwl3945_addsta_cmd *sta, u8 flags) |
1176 | { | 1176 | { |
1177 | struct iwl_rx_packet *res = NULL; | 1177 | struct iwl_rx_packet *res = NULL; |
@@ -1218,7 +1218,7 @@ int iwl3945_send_add_station(struct iwl3945_priv *priv, | |||
1218 | return rc; | 1218 | return rc; |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | static int iwl3945_update_sta_key_info(struct iwl3945_priv *priv, | 1221 | static int iwl3945_update_sta_key_info(struct iwl_priv *priv, |
1222 | struct ieee80211_key_conf *keyconf, | 1222 | struct ieee80211_key_conf *keyconf, |
1223 | u8 sta_id) | 1223 | u8 sta_id) |
1224 | { | 1224 | { |
@@ -1256,7 +1256,7 @@ static int iwl3945_update_sta_key_info(struct iwl3945_priv *priv, | |||
1256 | return 0; | 1256 | return 0; |
1257 | } | 1257 | } |
1258 | 1258 | ||
1259 | static int iwl3945_clear_sta_key_info(struct iwl3945_priv *priv, u8 sta_id) | 1259 | static int iwl3945_clear_sta_key_info(struct iwl_priv *priv, u8 sta_id) |
1260 | { | 1260 | { |
1261 | unsigned long flags; | 1261 | unsigned long flags; |
1262 | 1262 | ||
@@ -1274,7 +1274,7 @@ static int iwl3945_clear_sta_key_info(struct iwl3945_priv *priv, u8 sta_id) | |||
1274 | return 0; | 1274 | return 0; |
1275 | } | 1275 | } |
1276 | 1276 | ||
1277 | static void iwl3945_clear_free_frames(struct iwl3945_priv *priv) | 1277 | static void iwl3945_clear_free_frames(struct iwl_priv *priv) |
1278 | { | 1278 | { |
1279 | struct list_head *element; | 1279 | struct list_head *element; |
1280 | 1280 | ||
@@ -1295,7 +1295,7 @@ static void iwl3945_clear_free_frames(struct iwl3945_priv *priv) | |||
1295 | } | 1295 | } |
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | static struct iwl3945_frame *iwl3945_get_free_frame(struct iwl3945_priv *priv) | 1298 | static struct iwl3945_frame *iwl3945_get_free_frame(struct iwl_priv *priv) |
1299 | { | 1299 | { |
1300 | struct iwl3945_frame *frame; | 1300 | struct iwl3945_frame *frame; |
1301 | struct list_head *element; | 1301 | struct list_head *element; |
@@ -1315,13 +1315,13 @@ static struct iwl3945_frame *iwl3945_get_free_frame(struct iwl3945_priv *priv) | |||
1315 | return list_entry(element, struct iwl3945_frame, list); | 1315 | return list_entry(element, struct iwl3945_frame, list); |
1316 | } | 1316 | } |
1317 | 1317 | ||
1318 | static void iwl3945_free_frame(struct iwl3945_priv *priv, struct iwl3945_frame *frame) | 1318 | static void iwl3945_free_frame(struct iwl_priv *priv, struct iwl3945_frame *frame) |
1319 | { | 1319 | { |
1320 | memset(frame, 0, sizeof(*frame)); | 1320 | memset(frame, 0, sizeof(*frame)); |
1321 | list_add(&frame->list, &priv->free_frames); | 1321 | list_add(&frame->list, &priv->free_frames); |
1322 | } | 1322 | } |
1323 | 1323 | ||
1324 | unsigned int iwl3945_fill_beacon_frame(struct iwl3945_priv *priv, | 1324 | unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv, |
1325 | struct ieee80211_hdr *hdr, | 1325 | struct ieee80211_hdr *hdr, |
1326 | int left) | 1326 | int left) |
1327 | { | 1327 | { |
@@ -1339,7 +1339,7 @@ unsigned int iwl3945_fill_beacon_frame(struct iwl3945_priv *priv, | |||
1339 | return priv->ibss_beacon->len; | 1339 | return priv->ibss_beacon->len; |
1340 | } | 1340 | } |
1341 | 1341 | ||
1342 | static u8 iwl3945_rate_get_lowest_plcp(struct iwl3945_priv *priv) | 1342 | static u8 iwl3945_rate_get_lowest_plcp(struct iwl_priv *priv) |
1343 | { | 1343 | { |
1344 | u8 i; | 1344 | u8 i; |
1345 | int rate_mask; | 1345 | int rate_mask; |
@@ -1363,7 +1363,7 @@ static u8 iwl3945_rate_get_lowest_plcp(struct iwl3945_priv *priv) | |||
1363 | return IWL_RATE_6M_PLCP; | 1363 | return IWL_RATE_6M_PLCP; |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | static int iwl3945_send_beacon_cmd(struct iwl3945_priv *priv) | 1366 | static int iwl3945_send_beacon_cmd(struct iwl_priv *priv) |
1367 | { | 1367 | { |
1368 | struct iwl3945_frame *frame; | 1368 | struct iwl3945_frame *frame; |
1369 | unsigned int frame_size; | 1369 | unsigned int frame_size; |
@@ -1396,7 +1396,7 @@ static int iwl3945_send_beacon_cmd(struct iwl3945_priv *priv) | |||
1396 | * | 1396 | * |
1397 | ******************************************************************************/ | 1397 | ******************************************************************************/ |
1398 | 1398 | ||
1399 | static void get_eeprom_mac(struct iwl3945_priv *priv, u8 *mac) | 1399 | static void get_eeprom_mac(struct iwl_priv *priv, u8 *mac) |
1400 | { | 1400 | { |
1401 | memcpy(mac, priv->eeprom39.mac_address, 6); | 1401 | memcpy(mac, priv->eeprom39.mac_address, 6); |
1402 | } | 1402 | } |
@@ -1409,7 +1409,7 @@ static void get_eeprom_mac(struct iwl3945_priv *priv, u8 *mac) | |||
1409 | * simply claims ownership, which should be safe when this function is called | 1409 | * simply claims ownership, which should be safe when this function is called |
1410 | * (i.e. before loading uCode!). | 1410 | * (i.e. before loading uCode!). |
1411 | */ | 1411 | */ |
1412 | static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv) | 1412 | static inline int iwl3945_eeprom_acquire_semaphore(struct iwl_priv *priv) |
1413 | { | 1413 | { |
1414 | _iwl3945_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK); | 1414 | _iwl3945_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK); |
1415 | return 0; | 1415 | return 0; |
@@ -1422,7 +1422,7 @@ static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv) | |||
1422 | * | 1422 | * |
1423 | * NOTE: This routine uses the non-debug IO access functions. | 1423 | * NOTE: This routine uses the non-debug IO access functions. |
1424 | */ | 1424 | */ |
1425 | int iwl3945_eeprom_init(struct iwl3945_priv *priv) | 1425 | int iwl3945_eeprom_init(struct iwl_priv *priv) |
1426 | { | 1426 | { |
1427 | u16 *e = (u16 *)&priv->eeprom39; | 1427 | u16 *e = (u16 *)&priv->eeprom39; |
1428 | u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP); | 1428 | u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP); |
@@ -1470,7 +1470,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv) | |||
1470 | return 0; | 1470 | return 0; |
1471 | } | 1471 | } |
1472 | 1472 | ||
1473 | static void iwl3945_unset_hw_params(struct iwl3945_priv *priv) | 1473 | static void iwl3945_unset_hw_params(struct iwl_priv *priv) |
1474 | { | 1474 | { |
1475 | if (priv->shared_virt) | 1475 | if (priv->shared_virt) |
1476 | pci_free_consistent(priv->pci_dev, | 1476 | pci_free_consistent(priv->pci_dev, |
@@ -1511,7 +1511,7 @@ static u16 iwl3945_supported_rate_to_ie(u8 *ie, u16 supported_rate, | |||
1511 | /** | 1511 | /** |
1512 | * iwl3945_fill_probe_req - fill in all required fields and IE for probe request | 1512 | * iwl3945_fill_probe_req - fill in all required fields and IE for probe request |
1513 | */ | 1513 | */ |
1514 | static u16 iwl3945_fill_probe_req(struct iwl3945_priv *priv, | 1514 | static u16 iwl3945_fill_probe_req(struct iwl_priv *priv, |
1515 | struct ieee80211_mgmt *frame, | 1515 | struct ieee80211_mgmt *frame, |
1516 | int left) | 1516 | int left) |
1517 | { | 1517 | { |
@@ -1591,7 +1591,7 @@ static u16 iwl3945_fill_probe_req(struct iwl3945_priv *priv, | |||
1591 | /* | 1591 | /* |
1592 | * QoS support | 1592 | * QoS support |
1593 | */ | 1593 | */ |
1594 | static int iwl3945_send_qos_params_command(struct iwl3945_priv *priv, | 1594 | static int iwl3945_send_qos_params_command(struct iwl_priv *priv, |
1595 | struct iwl_qosparam_cmd *qos) | 1595 | struct iwl_qosparam_cmd *qos) |
1596 | { | 1596 | { |
1597 | 1597 | ||
@@ -1599,7 +1599,7 @@ static int iwl3945_send_qos_params_command(struct iwl3945_priv *priv, | |||
1599 | sizeof(struct iwl_qosparam_cmd), qos); | 1599 | sizeof(struct iwl_qosparam_cmd), qos); |
1600 | } | 1600 | } |
1601 | 1601 | ||
1602 | static void iwl3945_reset_qos(struct iwl3945_priv *priv) | 1602 | static void iwl3945_reset_qos(struct iwl_priv *priv) |
1603 | { | 1603 | { |
1604 | u16 cw_min = 15; | 1604 | u16 cw_min = 15; |
1605 | u16 cw_max = 1023; | 1605 | u16 cw_max = 1023; |
@@ -1690,7 +1690,7 @@ static void iwl3945_reset_qos(struct iwl3945_priv *priv) | |||
1690 | spin_unlock_irqrestore(&priv->lock, flags); | 1690 | spin_unlock_irqrestore(&priv->lock, flags); |
1691 | } | 1691 | } |
1692 | 1692 | ||
1693 | static void iwl3945_activate_qos(struct iwl3945_priv *priv, u8 force) | 1693 | static void iwl3945_activate_qos(struct iwl_priv *priv, u8 force) |
1694 | { | 1694 | { |
1695 | unsigned long flags; | 1695 | unsigned long flags; |
1696 | 1696 | ||
@@ -1760,7 +1760,7 @@ static struct iwl_power_vec_entry range_1[IWL39_POWER_AC] = { | |||
1760 | SLP_VEC(4, 7, 10, 10, 0xFF)}, 0} | 1760 | SLP_VEC(4, 7, 10, 10, 0xFF)}, 0} |
1761 | }; | 1761 | }; |
1762 | 1762 | ||
1763 | int iwl3945_power_init_handle(struct iwl3945_priv *priv) | 1763 | int iwl3945_power_init_handle(struct iwl_priv *priv) |
1764 | { | 1764 | { |
1765 | int rc = 0, i; | 1765 | int rc = 0, i; |
1766 | struct iwl3945_power_mgr *pow_data; | 1766 | struct iwl3945_power_mgr *pow_data; |
@@ -1799,7 +1799,7 @@ int iwl3945_power_init_handle(struct iwl3945_priv *priv) | |||
1799 | return rc; | 1799 | return rc; |
1800 | } | 1800 | } |
1801 | 1801 | ||
1802 | static int iwl3945_update_power_cmd(struct iwl3945_priv *priv, | 1802 | static int iwl3945_update_power_cmd(struct iwl_priv *priv, |
1803 | struct iwl_powertable_cmd *cmd, u32 mode) | 1803 | struct iwl_powertable_cmd *cmd, u32 mode) |
1804 | { | 1804 | { |
1805 | int rc = 0, i; | 1805 | int rc = 0, i; |
@@ -1863,7 +1863,7 @@ static int iwl3945_update_power_cmd(struct iwl3945_priv *priv, | |||
1863 | return rc; | 1863 | return rc; |
1864 | } | 1864 | } |
1865 | 1865 | ||
1866 | static int iwl3945_send_power_mode(struct iwl3945_priv *priv, u32 mode) | 1866 | static int iwl3945_send_power_mode(struct iwl_priv *priv, u32 mode) |
1867 | { | 1867 | { |
1868 | u32 uninitialized_var(final_mode); | 1868 | u32 uninitialized_var(final_mode); |
1869 | int rc; | 1869 | int rc; |
@@ -1903,7 +1903,7 @@ static int iwl3945_send_power_mode(struct iwl3945_priv *priv, u32 mode) | |||
1903 | * | 1903 | * |
1904 | * NOTE: priv->mutex is not required before calling this function | 1904 | * NOTE: priv->mutex is not required before calling this function |
1905 | */ | 1905 | */ |
1906 | static int iwl3945_scan_cancel(struct iwl3945_priv *priv) | 1906 | static int iwl3945_scan_cancel(struct iwl_priv *priv) |
1907 | { | 1907 | { |
1908 | if (!test_bit(STATUS_SCAN_HW, &priv->status)) { | 1908 | if (!test_bit(STATUS_SCAN_HW, &priv->status)) { |
1909 | clear_bit(STATUS_SCANNING, &priv->status); | 1909 | clear_bit(STATUS_SCANNING, &priv->status); |
@@ -1931,7 +1931,7 @@ static int iwl3945_scan_cancel(struct iwl3945_priv *priv) | |||
1931 | * | 1931 | * |
1932 | * NOTE: priv->mutex must be held before calling this function | 1932 | * NOTE: priv->mutex must be held before calling this function |
1933 | */ | 1933 | */ |
1934 | static int iwl3945_scan_cancel_timeout(struct iwl3945_priv *priv, unsigned long ms) | 1934 | static int iwl3945_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms) |
1935 | { | 1935 | { |
1936 | unsigned long now = jiffies; | 1936 | unsigned long now = jiffies; |
1937 | int ret; | 1937 | int ret; |
@@ -1966,7 +1966,7 @@ static __le16 iwl3945_adjust_beacon_interval(u16 beacon_val) | |||
1966 | return cpu_to_le16(new_val); | 1966 | return cpu_to_le16(new_val); |
1967 | } | 1967 | } |
1968 | 1968 | ||
1969 | static void iwl3945_setup_rxon_timing(struct iwl3945_priv *priv) | 1969 | static void iwl3945_setup_rxon_timing(struct iwl_priv *priv) |
1970 | { | 1970 | { |
1971 | u64 interval_tm_unit; | 1971 | u64 interval_tm_unit; |
1972 | u64 tsf, result; | 1972 | u64 tsf, result; |
@@ -2019,7 +2019,7 @@ static void iwl3945_setup_rxon_timing(struct iwl3945_priv *priv) | |||
2019 | le16_to_cpu(priv->rxon_timing.atim_window)); | 2019 | le16_to_cpu(priv->rxon_timing.atim_window)); |
2020 | } | 2020 | } |
2021 | 2021 | ||
2022 | static int iwl3945_scan_initiate(struct iwl3945_priv *priv) | 2022 | static int iwl3945_scan_initiate(struct iwl_priv *priv) |
2023 | { | 2023 | { |
2024 | if (!iwl3945_is_ready_rf(priv)) { | 2024 | if (!iwl3945_is_ready_rf(priv)) { |
2025 | IWL_DEBUG_SCAN("Aborting scan due to not ready.\n"); | 2025 | IWL_DEBUG_SCAN("Aborting scan due to not ready.\n"); |
@@ -2051,7 +2051,7 @@ static int iwl3945_scan_initiate(struct iwl3945_priv *priv) | |||
2051 | return 0; | 2051 | return 0; |
2052 | } | 2052 | } |
2053 | 2053 | ||
2054 | static int iwl3945_set_rxon_hwcrypto(struct iwl3945_priv *priv, int hw_decrypt) | 2054 | static int iwl3945_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt) |
2055 | { | 2055 | { |
2056 | struct iwl3945_rxon_cmd *rxon = &priv->staging39_rxon; | 2056 | struct iwl3945_rxon_cmd *rxon = &priv->staging39_rxon; |
2057 | 2057 | ||
@@ -2063,7 +2063,7 @@ static int iwl3945_set_rxon_hwcrypto(struct iwl3945_priv *priv, int hw_decrypt) | |||
2063 | return 0; | 2063 | return 0; |
2064 | } | 2064 | } |
2065 | 2065 | ||
2066 | static void iwl3945_set_flags_for_phymode(struct iwl3945_priv *priv, | 2066 | static void iwl3945_set_flags_for_phymode(struct iwl_priv *priv, |
2067 | enum ieee80211_band band) | 2067 | enum ieee80211_band band) |
2068 | { | 2068 | { |
2069 | if (band == IEEE80211_BAND_5GHZ) { | 2069 | if (band == IEEE80211_BAND_5GHZ) { |
@@ -2090,7 +2090,7 @@ static void iwl3945_set_flags_for_phymode(struct iwl3945_priv *priv, | |||
2090 | /* | 2090 | /* |
2091 | * initialize rxon structure with default values from eeprom | 2091 | * initialize rxon structure with default values from eeprom |
2092 | */ | 2092 | */ |
2093 | static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv, | 2093 | static void iwl3945_connection_init_rx_config(struct iwl_priv *priv, |
2094 | int mode) | 2094 | int mode) |
2095 | { | 2095 | { |
2096 | const struct iwl_channel_info *ch_info; | 2096 | const struct iwl_channel_info *ch_info; |
@@ -2160,7 +2160,7 @@ static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv, | |||
2160 | (IWL_CCK_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF; | 2160 | (IWL_CCK_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF; |
2161 | } | 2161 | } |
2162 | 2162 | ||
2163 | static int iwl3945_set_mode(struct iwl3945_priv *priv, int mode) | 2163 | static int iwl3945_set_mode(struct iwl_priv *priv, int mode) |
2164 | { | 2164 | { |
2165 | if (mode == NL80211_IFTYPE_ADHOC) { | 2165 | if (mode == NL80211_IFTYPE_ADHOC) { |
2166 | const struct iwl_channel_info *ch_info; | 2166 | const struct iwl_channel_info *ch_info; |
@@ -2197,7 +2197,7 @@ static int iwl3945_set_mode(struct iwl3945_priv *priv, int mode) | |||
2197 | return 0; | 2197 | return 0; |
2198 | } | 2198 | } |
2199 | 2199 | ||
2200 | static void iwl3945_build_tx_cmd_hwcrypto(struct iwl3945_priv *priv, | 2200 | static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv, |
2201 | struct ieee80211_tx_info *info, | 2201 | struct ieee80211_tx_info *info, |
2202 | struct iwl3945_cmd *cmd, | 2202 | struct iwl3945_cmd *cmd, |
2203 | struct sk_buff *skb_frag, | 2203 | struct sk_buff *skb_frag, |
@@ -2247,7 +2247,7 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl3945_priv *priv, | |||
2247 | /* | 2247 | /* |
2248 | * handle build REPLY_TX command notification. | 2248 | * handle build REPLY_TX command notification. |
2249 | */ | 2249 | */ |
2250 | static void iwl3945_build_tx_cmd_basic(struct iwl3945_priv *priv, | 2250 | static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv, |
2251 | struct iwl3945_cmd *cmd, | 2251 | struct iwl3945_cmd *cmd, |
2252 | struct ieee80211_tx_info *info, | 2252 | struct ieee80211_tx_info *info, |
2253 | struct ieee80211_hdr *hdr, | 2253 | struct ieee80211_hdr *hdr, |
@@ -2314,7 +2314,7 @@ static void iwl3945_build_tx_cmd_basic(struct iwl3945_priv *priv, | |||
2314 | /** | 2314 | /** |
2315 | * iwl3945_get_sta_id - Find station's index within station table | 2315 | * iwl3945_get_sta_id - Find station's index within station table |
2316 | */ | 2316 | */ |
2317 | static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *hdr) | 2317 | static int iwl3945_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) |
2318 | { | 2318 | { |
2319 | int sta_id; | 2319 | int sta_id; |
2320 | u16 fc = le16_to_cpu(hdr->frame_control); | 2320 | u16 fc = le16_to_cpu(hdr->frame_control); |
@@ -2371,7 +2371,7 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h | |||
2371 | /* | 2371 | /* |
2372 | * start REPLY_TX command process | 2372 | * start REPLY_TX command process |
2373 | */ | 2373 | */ |
2374 | static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb) | 2374 | static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) |
2375 | { | 2375 | { |
2376 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 2376 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
2377 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 2377 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
@@ -2594,7 +2594,7 @@ drop: | |||
2594 | return -1; | 2594 | return -1; |
2595 | } | 2595 | } |
2596 | 2596 | ||
2597 | static void iwl3945_set_rate(struct iwl3945_priv *priv) | 2597 | static void iwl3945_set_rate(struct iwl_priv *priv) |
2598 | { | 2598 | { |
2599 | const struct ieee80211_supported_band *sband = NULL; | 2599 | const struct ieee80211_supported_band *sband = NULL; |
2600 | struct ieee80211_rate *rate; | 2600 | struct ieee80211_rate *rate; |
@@ -2648,7 +2648,7 @@ static void iwl3945_set_rate(struct iwl3945_priv *priv) | |||
2648 | (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF; | 2648 | (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF; |
2649 | } | 2649 | } |
2650 | 2650 | ||
2651 | static void iwl3945_radio_kill_sw(struct iwl3945_priv *priv, int disable_radio) | 2651 | static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio) |
2652 | { | 2652 | { |
2653 | unsigned long flags; | 2653 | unsigned long flags; |
2654 | 2654 | ||
@@ -2698,7 +2698,7 @@ static void iwl3945_radio_kill_sw(struct iwl3945_priv *priv, int disable_radio) | |||
2698 | return; | 2698 | return; |
2699 | } | 2699 | } |
2700 | 2700 | ||
2701 | void iwl3945_set_decrypted_flag(struct iwl3945_priv *priv, struct sk_buff *skb, | 2701 | void iwl3945_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb, |
2702 | u32 decrypt_res, struct ieee80211_rx_status *stats) | 2702 | u32 decrypt_res, struct ieee80211_rx_status *stats) |
2703 | { | 2703 | { |
2704 | u16 fc = | 2704 | u16 fc = |
@@ -2783,7 +2783,7 @@ static __le32 iwl3945_add_beacon_time(u32 base, u32 addon, u32 beacon_interval) | |||
2783 | return cpu_to_le32(res); | 2783 | return cpu_to_le32(res); |
2784 | } | 2784 | } |
2785 | 2785 | ||
2786 | static int iwl3945_get_measurement(struct iwl3945_priv *priv, | 2786 | static int iwl3945_get_measurement(struct iwl_priv *priv, |
2787 | struct ieee80211_measurement_params *params, | 2787 | struct ieee80211_measurement_params *params, |
2788 | u8 type) | 2788 | u8 type) |
2789 | { | 2789 | { |
@@ -2862,7 +2862,7 @@ static int iwl3945_get_measurement(struct iwl3945_priv *priv, | |||
2862 | } | 2862 | } |
2863 | #endif | 2863 | #endif |
2864 | 2864 | ||
2865 | static void iwl3945_rx_reply_alive(struct iwl3945_priv *priv, | 2865 | static void iwl3945_rx_reply_alive(struct iwl_priv *priv, |
2866 | struct iwl_rx_mem_buffer *rxb) | 2866 | struct iwl_rx_mem_buffer *rxb) |
2867 | { | 2867 | { |
2868 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 2868 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
@@ -2898,7 +2898,7 @@ static void iwl3945_rx_reply_alive(struct iwl3945_priv *priv, | |||
2898 | IWL_WARNING("uCode did not respond OK.\n"); | 2898 | IWL_WARNING("uCode did not respond OK.\n"); |
2899 | } | 2899 | } |
2900 | 2900 | ||
2901 | static void iwl3945_rx_reply_add_sta(struct iwl3945_priv *priv, | 2901 | static void iwl3945_rx_reply_add_sta(struct iwl_priv *priv, |
2902 | struct iwl_rx_mem_buffer *rxb) | 2902 | struct iwl_rx_mem_buffer *rxb) |
2903 | { | 2903 | { |
2904 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 2904 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
@@ -2907,7 +2907,7 @@ static void iwl3945_rx_reply_add_sta(struct iwl3945_priv *priv, | |||
2907 | return; | 2907 | return; |
2908 | } | 2908 | } |
2909 | 2909 | ||
2910 | static void iwl3945_rx_reply_error(struct iwl3945_priv *priv, | 2910 | static void iwl3945_rx_reply_error(struct iwl_priv *priv, |
2911 | struct iwl_rx_mem_buffer *rxb) | 2911 | struct iwl_rx_mem_buffer *rxb) |
2912 | { | 2912 | { |
2913 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 2913 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
@@ -2923,7 +2923,7 @@ static void iwl3945_rx_reply_error(struct iwl3945_priv *priv, | |||
2923 | 2923 | ||
2924 | #define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x | 2924 | #define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x |
2925 | 2925 | ||
2926 | static void iwl3945_rx_csa(struct iwl3945_priv *priv, struct iwl_rx_mem_buffer *rxb) | 2926 | static void iwl3945_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) |
2927 | { | 2927 | { |
2928 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 2928 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
2929 | struct iwl3945_rxon_cmd *rxon = (void *)&priv->active39_rxon; | 2929 | struct iwl3945_rxon_cmd *rxon = (void *)&priv->active39_rxon; |
@@ -2934,7 +2934,7 @@ static void iwl3945_rx_csa(struct iwl3945_priv *priv, struct iwl_rx_mem_buffer * | |||
2934 | priv->staging39_rxon.channel = csa->channel; | 2934 | priv->staging39_rxon.channel = csa->channel; |
2935 | } | 2935 | } |
2936 | 2936 | ||
2937 | static void iwl3945_rx_spectrum_measure_notif(struct iwl3945_priv *priv, | 2937 | static void iwl3945_rx_spectrum_measure_notif(struct iwl_priv *priv, |
2938 | struct iwl_rx_mem_buffer *rxb) | 2938 | struct iwl_rx_mem_buffer *rxb) |
2939 | { | 2939 | { |
2940 | #ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT | 2940 | #ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT |
@@ -2952,7 +2952,7 @@ static void iwl3945_rx_spectrum_measure_notif(struct iwl3945_priv *priv, | |||
2952 | #endif | 2952 | #endif |
2953 | } | 2953 | } |
2954 | 2954 | ||
2955 | static void iwl3945_rx_pm_sleep_notif(struct iwl3945_priv *priv, | 2955 | static void iwl3945_rx_pm_sleep_notif(struct iwl_priv *priv, |
2956 | struct iwl_rx_mem_buffer *rxb) | 2956 | struct iwl_rx_mem_buffer *rxb) |
2957 | { | 2957 | { |
2958 | #ifdef CONFIG_IWL3945_DEBUG | 2958 | #ifdef CONFIG_IWL3945_DEBUG |
@@ -2963,7 +2963,7 @@ static void iwl3945_rx_pm_sleep_notif(struct iwl3945_priv *priv, | |||
2963 | #endif | 2963 | #endif |
2964 | } | 2964 | } |
2965 | 2965 | ||
2966 | static void iwl3945_rx_pm_debug_statistics_notif(struct iwl3945_priv *priv, | 2966 | static void iwl3945_rx_pm_debug_statistics_notif(struct iwl_priv *priv, |
2967 | struct iwl_rx_mem_buffer *rxb) | 2967 | struct iwl_rx_mem_buffer *rxb) |
2968 | { | 2968 | { |
2969 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 2969 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
@@ -2976,8 +2976,8 @@ static void iwl3945_rx_pm_debug_statistics_notif(struct iwl3945_priv *priv, | |||
2976 | 2976 | ||
2977 | static void iwl3945_bg_beacon_update(struct work_struct *work) | 2977 | static void iwl3945_bg_beacon_update(struct work_struct *work) |
2978 | { | 2978 | { |
2979 | struct iwl3945_priv *priv = | 2979 | struct iwl_priv *priv = |
2980 | container_of(work, struct iwl3945_priv, beacon_update); | 2980 | container_of(work, struct iwl_priv, beacon_update); |
2981 | struct sk_buff *beacon; | 2981 | struct sk_buff *beacon; |
2982 | 2982 | ||
2983 | /* Pull updated AP beacon from mac80211. will fail if not in AP mode */ | 2983 | /* Pull updated AP beacon from mac80211. will fail if not in AP mode */ |
@@ -2999,7 +2999,7 @@ static void iwl3945_bg_beacon_update(struct work_struct *work) | |||
2999 | iwl3945_send_beacon_cmd(priv); | 2999 | iwl3945_send_beacon_cmd(priv); |
3000 | } | 3000 | } |
3001 | 3001 | ||
3002 | static void iwl3945_rx_beacon_notif(struct iwl3945_priv *priv, | 3002 | static void iwl3945_rx_beacon_notif(struct iwl_priv *priv, |
3003 | struct iwl_rx_mem_buffer *rxb) | 3003 | struct iwl_rx_mem_buffer *rxb) |
3004 | { | 3004 | { |
3005 | #ifdef CONFIG_IWL3945_DEBUG | 3005 | #ifdef CONFIG_IWL3945_DEBUG |
@@ -3022,7 +3022,7 @@ static void iwl3945_rx_beacon_notif(struct iwl3945_priv *priv, | |||
3022 | } | 3022 | } |
3023 | 3023 | ||
3024 | /* Service response to REPLY_SCAN_CMD (0x80) */ | 3024 | /* Service response to REPLY_SCAN_CMD (0x80) */ |
3025 | static void iwl3945_rx_reply_scan(struct iwl3945_priv *priv, | 3025 | static void iwl3945_rx_reply_scan(struct iwl_priv *priv, |
3026 | struct iwl_rx_mem_buffer *rxb) | 3026 | struct iwl_rx_mem_buffer *rxb) |
3027 | { | 3027 | { |
3028 | #ifdef CONFIG_IWL3945_DEBUG | 3028 | #ifdef CONFIG_IWL3945_DEBUG |
@@ -3035,7 +3035,7 @@ static void iwl3945_rx_reply_scan(struct iwl3945_priv *priv, | |||
3035 | } | 3035 | } |
3036 | 3036 | ||
3037 | /* Service SCAN_START_NOTIFICATION (0x82) */ | 3037 | /* Service SCAN_START_NOTIFICATION (0x82) */ |
3038 | static void iwl3945_rx_scan_start_notif(struct iwl3945_priv *priv, | 3038 | static void iwl3945_rx_scan_start_notif(struct iwl_priv *priv, |
3039 | struct iwl_rx_mem_buffer *rxb) | 3039 | struct iwl_rx_mem_buffer *rxb) |
3040 | { | 3040 | { |
3041 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 3041 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
@@ -3052,7 +3052,7 @@ static void iwl3945_rx_scan_start_notif(struct iwl3945_priv *priv, | |||
3052 | } | 3052 | } |
3053 | 3053 | ||
3054 | /* Service SCAN_RESULTS_NOTIFICATION (0x83) */ | 3054 | /* Service SCAN_RESULTS_NOTIFICATION (0x83) */ |
3055 | static void iwl3945_rx_scan_results_notif(struct iwl3945_priv *priv, | 3055 | static void iwl3945_rx_scan_results_notif(struct iwl_priv *priv, |
3056 | struct iwl_rx_mem_buffer *rxb) | 3056 | struct iwl_rx_mem_buffer *rxb) |
3057 | { | 3057 | { |
3058 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 3058 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
@@ -3077,7 +3077,7 @@ static void iwl3945_rx_scan_results_notif(struct iwl3945_priv *priv, | |||
3077 | } | 3077 | } |
3078 | 3078 | ||
3079 | /* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ | 3079 | /* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ |
3080 | static void iwl3945_rx_scan_complete_notif(struct iwl3945_priv *priv, | 3080 | static void iwl3945_rx_scan_complete_notif(struct iwl_priv *priv, |
3081 | struct iwl_rx_mem_buffer *rxb) | 3081 | struct iwl_rx_mem_buffer *rxb) |
3082 | { | 3082 | { |
3083 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 3083 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
@@ -3140,7 +3140,7 @@ reschedule: | |||
3140 | 3140 | ||
3141 | /* Handle notification from uCode that card's power state is changing | 3141 | /* Handle notification from uCode that card's power state is changing |
3142 | * due to software, hardware, or critical temperature RFKILL */ | 3142 | * due to software, hardware, or critical temperature RFKILL */ |
3143 | static void iwl3945_rx_card_state_notif(struct iwl3945_priv *priv, | 3143 | static void iwl3945_rx_card_state_notif(struct iwl_priv *priv, |
3144 | struct iwl_rx_mem_buffer *rxb) | 3144 | struct iwl_rx_mem_buffer *rxb) |
3145 | { | 3145 | { |
3146 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 3146 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
@@ -3185,7 +3185,7 @@ static void iwl3945_rx_card_state_notif(struct iwl3945_priv *priv, | |||
3185 | * This function chains into the hardware specific files for them to setup | 3185 | * This function chains into the hardware specific files for them to setup |
3186 | * any hardware specific handlers as well. | 3186 | * any hardware specific handlers as well. |
3187 | */ | 3187 | */ |
3188 | static void iwl3945_setup_rx_handlers(struct iwl3945_priv *priv) | 3188 | static void iwl3945_setup_rx_handlers(struct iwl_priv *priv) |
3189 | { | 3189 | { |
3190 | priv->rx_handlers[REPLY_ALIVE] = iwl3945_rx_reply_alive; | 3190 | priv->rx_handlers[REPLY_ALIVE] = iwl3945_rx_reply_alive; |
3191 | priv->rx_handlers[REPLY_ADD_STA] = iwl3945_rx_reply_add_sta; | 3191 | priv->rx_handlers[REPLY_ADD_STA] = iwl3945_rx_reply_add_sta; |
@@ -3223,7 +3223,7 @@ static void iwl3945_setup_rx_handlers(struct iwl3945_priv *priv) | |||
3223 | * When FW advances 'R' index, all entries between old and new 'R' index | 3223 | * When FW advances 'R' index, all entries between old and new 'R' index |
3224 | * need to be reclaimed. | 3224 | * need to be reclaimed. |
3225 | */ | 3225 | */ |
3226 | static void iwl3945_cmd_queue_reclaim(struct iwl3945_priv *priv, | 3226 | static void iwl3945_cmd_queue_reclaim(struct iwl_priv *priv, |
3227 | int txq_id, int index) | 3227 | int txq_id, int index) |
3228 | { | 3228 | { |
3229 | struct iwl3945_tx_queue *txq = &priv->txq39[txq_id]; | 3229 | struct iwl3945_tx_queue *txq = &priv->txq39[txq_id]; |
@@ -3258,7 +3258,7 @@ static void iwl3945_cmd_queue_reclaim(struct iwl3945_priv *priv, | |||
3258 | * will be executed. The attached skb (if present) will only be freed | 3258 | * will be executed. The attached skb (if present) will only be freed |
3259 | * if the callback returns 1 | 3259 | * if the callback returns 1 |
3260 | */ | 3260 | */ |
3261 | static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv, | 3261 | static void iwl3945_tx_cmd_complete(struct iwl_priv *priv, |
3262 | struct iwl_rx_mem_buffer *rxb) | 3262 | struct iwl_rx_mem_buffer *rxb) |
3263 | { | 3263 | { |
3264 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | 3264 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; |
@@ -3373,7 +3373,7 @@ static int iwl3945_rx_queue_space(const struct iwl_rx_queue *q) | |||
3373 | /** | 3373 | /** |
3374 | * iwl3945_rx_queue_update_write_ptr - Update the write pointer for the RX queue | 3374 | * iwl3945_rx_queue_update_write_ptr - Update the write pointer for the RX queue |
3375 | */ | 3375 | */ |
3376 | int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv, struct iwl_rx_queue *q) | 3376 | int iwl3945_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl_rx_queue *q) |
3377 | { | 3377 | { |
3378 | u32 reg = 0; | 3378 | u32 reg = 0; |
3379 | int rc = 0; | 3379 | int rc = 0; |
@@ -3419,7 +3419,7 @@ int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv, struct iwl_rx_q | |||
3419 | /** | 3419 | /** |
3420 | * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr | 3420 | * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr |
3421 | */ | 3421 | */ |
3422 | static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl3945_priv *priv, | 3422 | static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl_priv *priv, |
3423 | dma_addr_t dma_addr) | 3423 | dma_addr_t dma_addr) |
3424 | { | 3424 | { |
3425 | return cpu_to_le32((u32)dma_addr); | 3425 | return cpu_to_le32((u32)dma_addr); |
@@ -3436,7 +3436,7 @@ static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl3945_priv *priv, | |||
3436 | * also updates the memory address in the firmware to reference the new | 3436 | * also updates the memory address in the firmware to reference the new |
3437 | * target buffer. | 3437 | * target buffer. |
3438 | */ | 3438 | */ |
3439 | static int iwl3945_rx_queue_restock(struct iwl3945_priv *priv) | 3439 | static int iwl3945_rx_queue_restock(struct iwl_priv *priv) |
3440 | { | 3440 | { |
3441 | struct iwl_rx_queue *rxq = &priv->rxq; | 3441 | struct iwl_rx_queue *rxq = &priv->rxq; |
3442 | struct list_head *element; | 3442 | struct list_head *element; |
@@ -3488,7 +3488,7 @@ static int iwl3945_rx_queue_restock(struct iwl3945_priv *priv) | |||
3488 | * Also restock the Rx queue via iwl3945_rx_queue_restock. | 3488 | * Also restock the Rx queue via iwl3945_rx_queue_restock. |
3489 | * This is called as a scheduled work item (except for during initialization) | 3489 | * This is called as a scheduled work item (except for during initialization) |
3490 | */ | 3490 | */ |
3491 | static void iwl3945_rx_allocate(struct iwl3945_priv *priv) | 3491 | static void iwl3945_rx_allocate(struct iwl_priv *priv) |
3492 | { | 3492 | { |
3493 | struct iwl_rx_queue *rxq = &priv->rxq; | 3493 | struct iwl_rx_queue *rxq = &priv->rxq; |
3494 | struct list_head *element; | 3494 | struct list_head *element; |
@@ -3538,7 +3538,7 @@ static void iwl3945_rx_allocate(struct iwl3945_priv *priv) | |||
3538 | */ | 3538 | */ |
3539 | static void __iwl3945_rx_replenish(void *data) | 3539 | static void __iwl3945_rx_replenish(void *data) |
3540 | { | 3540 | { |
3541 | struct iwl3945_priv *priv = data; | 3541 | struct iwl_priv *priv = data; |
3542 | 3542 | ||
3543 | iwl3945_rx_allocate(priv); | 3543 | iwl3945_rx_allocate(priv); |
3544 | iwl3945_rx_queue_restock(priv); | 3544 | iwl3945_rx_queue_restock(priv); |
@@ -3547,7 +3547,7 @@ static void __iwl3945_rx_replenish(void *data) | |||
3547 | 3547 | ||
3548 | void iwl3945_rx_replenish(void *data) | 3548 | void iwl3945_rx_replenish(void *data) |
3549 | { | 3549 | { |
3550 | struct iwl3945_priv *priv = data; | 3550 | struct iwl_priv *priv = data; |
3551 | unsigned long flags; | 3551 | unsigned long flags; |
3552 | 3552 | ||
3553 | iwl3945_rx_allocate(priv); | 3553 | iwl3945_rx_allocate(priv); |
@@ -3562,7 +3562,7 @@ void iwl3945_rx_replenish(void *data) | |||
3562 | * This free routine walks the list of POOL entries and if SKB is set to | 3562 | * This free routine walks the list of POOL entries and if SKB is set to |
3563 | * non NULL it is unmapped and freed | 3563 | * non NULL it is unmapped and freed |
3564 | */ | 3564 | */ |
3565 | static void iwl3945_rx_queue_free(struct iwl3945_priv *priv, struct iwl_rx_queue *rxq) | 3565 | static void iwl3945_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq) |
3566 | { | 3566 | { |
3567 | int i; | 3567 | int i; |
3568 | for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { | 3568 | for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { |
@@ -3579,7 +3579,7 @@ static void iwl3945_rx_queue_free(struct iwl3945_priv *priv, struct iwl_rx_queue | |||
3579 | rxq->bd = NULL; | 3579 | rxq->bd = NULL; |
3580 | } | 3580 | } |
3581 | 3581 | ||
3582 | int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv) | 3582 | int iwl3945_rx_queue_alloc(struct iwl_priv *priv) |
3583 | { | 3583 | { |
3584 | struct iwl_rx_queue *rxq = &priv->rxq; | 3584 | struct iwl_rx_queue *rxq = &priv->rxq; |
3585 | struct pci_dev *dev = priv->pci_dev; | 3585 | struct pci_dev *dev = priv->pci_dev; |
@@ -3606,7 +3606,7 @@ int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv) | |||
3606 | return 0; | 3606 | return 0; |
3607 | } | 3607 | } |
3608 | 3608 | ||
3609 | void iwl3945_rx_queue_reset(struct iwl3945_priv *priv, struct iwl_rx_queue *rxq) | 3609 | void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq) |
3610 | { | 3610 | { |
3611 | unsigned long flags; | 3611 | unsigned long flags; |
3612 | int i; | 3612 | int i; |
@@ -3720,7 +3720,7 @@ int iwl3945_calc_sig_qual(int rssi_dbm, int noise_dbm) | |||
3720 | * the appropriate handlers, including command responses, | 3720 | * the appropriate handlers, including command responses, |
3721 | * frame-received notifications, and other notifications. | 3721 | * frame-received notifications, and other notifications. |
3722 | */ | 3722 | */ |
3723 | static void iwl3945_rx_handle(struct iwl3945_priv *priv) | 3723 | static void iwl3945_rx_handle(struct iwl_priv *priv) |
3724 | { | 3724 | { |
3725 | struct iwl_rx_mem_buffer *rxb; | 3725 | struct iwl_rx_mem_buffer *rxb; |
3726 | struct iwl_rx_packet *pkt; | 3726 | struct iwl_rx_packet *pkt; |
@@ -3828,7 +3828,7 @@ static void iwl3945_rx_handle(struct iwl3945_priv *priv) | |||
3828 | /** | 3828 | /** |
3829 | * iwl3945_tx_queue_update_write_ptr - Send new write index to hardware | 3829 | * iwl3945_tx_queue_update_write_ptr - Send new write index to hardware |
3830 | */ | 3830 | */ |
3831 | static int iwl3945_tx_queue_update_write_ptr(struct iwl3945_priv *priv, | 3831 | static int iwl3945_tx_queue_update_write_ptr(struct iwl_priv *priv, |
3832 | struct iwl3945_tx_queue *txq) | 3832 | struct iwl3945_tx_queue *txq) |
3833 | { | 3833 | { |
3834 | u32 reg = 0; | 3834 | u32 reg = 0; |
@@ -3872,7 +3872,7 @@ static int iwl3945_tx_queue_update_write_ptr(struct iwl3945_priv *priv, | |||
3872 | } | 3872 | } |
3873 | 3873 | ||
3874 | #ifdef CONFIG_IWL3945_DEBUG | 3874 | #ifdef CONFIG_IWL3945_DEBUG |
3875 | static void iwl3945_print_rx_config_cmd(struct iwl3945_priv *priv, | 3875 | static void iwl3945_print_rx_config_cmd(struct iwl_priv *priv, |
3876 | struct iwl3945_rxon_cmd *rxon) | 3876 | struct iwl3945_rxon_cmd *rxon) |
3877 | { | 3877 | { |
3878 | IWL_DEBUG_RADIO("RX CONFIG:\n"); | 3878 | IWL_DEBUG_RADIO("RX CONFIG:\n"); |
@@ -3891,7 +3891,7 @@ static void iwl3945_print_rx_config_cmd(struct iwl3945_priv *priv, | |||
3891 | } | 3891 | } |
3892 | #endif | 3892 | #endif |
3893 | 3893 | ||
3894 | static void iwl3945_enable_interrupts(struct iwl3945_priv *priv) | 3894 | static void iwl3945_enable_interrupts(struct iwl_priv *priv) |
3895 | { | 3895 | { |
3896 | IWL_DEBUG_ISR("Enabling interrupts\n"); | 3896 | IWL_DEBUG_ISR("Enabling interrupts\n"); |
3897 | set_bit(STATUS_INT_ENABLED, &priv->status); | 3897 | set_bit(STATUS_INT_ENABLED, &priv->status); |
@@ -3900,7 +3900,7 @@ static void iwl3945_enable_interrupts(struct iwl3945_priv *priv) | |||
3900 | 3900 | ||
3901 | 3901 | ||
3902 | /* call this function to flush any scheduled tasklet */ | 3902 | /* call this function to flush any scheduled tasklet */ |
3903 | static inline void iwl_synchronize_irq(struct iwl3945_priv *priv) | 3903 | static inline void iwl_synchronize_irq(struct iwl_priv *priv) |
3904 | { | 3904 | { |
3905 | /* wait to make sure we flush pending tasklet*/ | 3905 | /* wait to make sure we flush pending tasklet*/ |
3906 | synchronize_irq(priv->pci_dev->irq); | 3906 | synchronize_irq(priv->pci_dev->irq); |
@@ -3908,7 +3908,7 @@ static inline void iwl_synchronize_irq(struct iwl3945_priv *priv) | |||
3908 | } | 3908 | } |
3909 | 3909 | ||
3910 | 3910 | ||
3911 | static inline void iwl3945_disable_interrupts(struct iwl3945_priv *priv) | 3911 | static inline void iwl3945_disable_interrupts(struct iwl_priv *priv) |
3912 | { | 3912 | { |
3913 | clear_bit(STATUS_INT_ENABLED, &priv->status); | 3913 | clear_bit(STATUS_INT_ENABLED, &priv->status); |
3914 | 3914 | ||
@@ -3945,7 +3945,7 @@ static const char *desc_lookup(int i) | |||
3945 | #define ERROR_START_OFFSET (1 * sizeof(u32)) | 3945 | #define ERROR_START_OFFSET (1 * sizeof(u32)) |
3946 | #define ERROR_ELEM_SIZE (7 * sizeof(u32)) | 3946 | #define ERROR_ELEM_SIZE (7 * sizeof(u32)) |
3947 | 3947 | ||
3948 | static void iwl3945_dump_nic_error_log(struct iwl3945_priv *priv) | 3948 | static void iwl3945_dump_nic_error_log(struct iwl_priv *priv) |
3949 | { | 3949 | { |
3950 | u32 i; | 3950 | u32 i; |
3951 | u32 desc, time, count, base, data1; | 3951 | u32 desc, time, count, base, data1; |
@@ -4008,7 +4008,7 @@ static void iwl3945_dump_nic_error_log(struct iwl3945_priv *priv) | |||
4008 | * | 4008 | * |
4009 | * NOTE: Must be called with iwl3945_grab_nic_access() already obtained! | 4009 | * NOTE: Must be called with iwl3945_grab_nic_access() already obtained! |
4010 | */ | 4010 | */ |
4011 | static void iwl3945_print_event_log(struct iwl3945_priv *priv, u32 start_idx, | 4011 | static void iwl3945_print_event_log(struct iwl_priv *priv, u32 start_idx, |
4012 | u32 num_events, u32 mode) | 4012 | u32 num_events, u32 mode) |
4013 | { | 4013 | { |
4014 | u32 i; | 4014 | u32 i; |
@@ -4046,7 +4046,7 @@ static void iwl3945_print_event_log(struct iwl3945_priv *priv, u32 start_idx, | |||
4046 | } | 4046 | } |
4047 | } | 4047 | } |
4048 | 4048 | ||
4049 | static void iwl3945_dump_nic_event_log(struct iwl3945_priv *priv) | 4049 | static void iwl3945_dump_nic_event_log(struct iwl_priv *priv) |
4050 | { | 4050 | { |
4051 | int rc; | 4051 | int rc; |
4052 | u32 base; /* SRAM byte address of event log header */ | 4052 | u32 base; /* SRAM byte address of event log header */ |
@@ -4101,7 +4101,7 @@ static void iwl3945_dump_nic_event_log(struct iwl3945_priv *priv) | |||
4101 | /** | 4101 | /** |
4102 | * iwl3945_irq_handle_error - called for HW or SW error interrupt from card | 4102 | * iwl3945_irq_handle_error - called for HW or SW error interrupt from card |
4103 | */ | 4103 | */ |
4104 | static void iwl3945_irq_handle_error(struct iwl3945_priv *priv) | 4104 | static void iwl3945_irq_handle_error(struct iwl_priv *priv) |
4105 | { | 4105 | { |
4106 | /* Set the FW error flag -- cleared on iwl3945_down */ | 4106 | /* Set the FW error flag -- cleared on iwl3945_down */ |
4107 | set_bit(STATUS_FW_ERROR, &priv->status); | 4107 | set_bit(STATUS_FW_ERROR, &priv->status); |
@@ -4136,7 +4136,7 @@ static void iwl3945_irq_handle_error(struct iwl3945_priv *priv) | |||
4136 | } | 4136 | } |
4137 | } | 4137 | } |
4138 | 4138 | ||
4139 | static void iwl3945_error_recovery(struct iwl3945_priv *priv) | 4139 | static void iwl3945_error_recovery(struct iwl_priv *priv) |
4140 | { | 4140 | { |
4141 | unsigned long flags; | 4141 | unsigned long flags; |
4142 | 4142 | ||
@@ -4153,7 +4153,7 @@ static void iwl3945_error_recovery(struct iwl3945_priv *priv) | |||
4153 | spin_unlock_irqrestore(&priv->lock, flags); | 4153 | spin_unlock_irqrestore(&priv->lock, flags); |
4154 | } | 4154 | } |
4155 | 4155 | ||
4156 | static void iwl3945_irq_tasklet(struct iwl3945_priv *priv) | 4156 | static void iwl3945_irq_tasklet(struct iwl_priv *priv) |
4157 | { | 4157 | { |
4158 | u32 inta, handled = 0; | 4158 | u32 inta, handled = 0; |
4159 | u32 inta_fh; | 4159 | u32 inta_fh; |
@@ -4295,7 +4295,7 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv) | |||
4295 | 4295 | ||
4296 | static irqreturn_t iwl3945_isr(int irq, void *data) | 4296 | static irqreturn_t iwl3945_isr(int irq, void *data) |
4297 | { | 4297 | { |
4298 | struct iwl3945_priv *priv = data; | 4298 | struct iwl_priv *priv = data; |
4299 | u32 inta, inta_mask; | 4299 | u32 inta, inta_mask; |
4300 | u32 inta_fh; | 4300 | u32 inta_fh; |
4301 | if (!priv) | 4301 | if (!priv) |
@@ -4403,7 +4403,7 @@ static const u8 iwl3945_eeprom_band_5[] = { /* 5725-5825MHz */ | |||
4403 | 145, 149, 153, 157, 161, 165 | 4403 | 145, 149, 153, 157, 161, 165 |
4404 | }; | 4404 | }; |
4405 | 4405 | ||
4406 | static void iwl3945_init_band_reference(const struct iwl3945_priv *priv, int band, | 4406 | static void iwl3945_init_band_reference(const struct iwl_priv *priv, int band, |
4407 | int *eeprom_ch_count, | 4407 | int *eeprom_ch_count, |
4408 | const struct iwl_eeprom_channel | 4408 | const struct iwl_eeprom_channel |
4409 | **eeprom_ch_info, | 4409 | **eeprom_ch_info, |
@@ -4447,7 +4447,7 @@ static void iwl3945_init_band_reference(const struct iwl3945_priv *priv, int ban | |||
4447 | * Based on band and channel number. | 4447 | * Based on band and channel number. |
4448 | */ | 4448 | */ |
4449 | const struct iwl_channel_info * | 4449 | const struct iwl_channel_info * |
4450 | iwl3945_get_channel_info(const struct iwl3945_priv *priv, | 4450 | iwl3945_get_channel_info(const struct iwl_priv *priv, |
4451 | enum ieee80211_band band, u16 channel) | 4451 | enum ieee80211_band band, u16 channel) |
4452 | { | 4452 | { |
4453 | int i; | 4453 | int i; |
@@ -4477,7 +4477,7 @@ iwl3945_get_channel_info(const struct iwl3945_priv *priv, | |||
4477 | /** | 4477 | /** |
4478 | * iwl3945_init_channel_map - Set up driver's info for all possible channels | 4478 | * iwl3945_init_channel_map - Set up driver's info for all possible channels |
4479 | */ | 4479 | */ |
4480 | static int iwl3945_init_channel_map(struct iwl3945_priv *priv) | 4480 | static int iwl3945_init_channel_map(struct iwl_priv *priv) |
4481 | { | 4481 | { |
4482 | int eeprom_ch_count = 0; | 4482 | int eeprom_ch_count = 0; |
4483 | const u8 *eeprom_ch_index = NULL; | 4483 | const u8 *eeprom_ch_index = NULL; |
@@ -4596,7 +4596,7 @@ static int iwl3945_init_channel_map(struct iwl3945_priv *priv) | |||
4596 | /* | 4596 | /* |
4597 | * iwl3945_free_channel_map - undo allocations in iwl3945_init_channel_map | 4597 | * iwl3945_free_channel_map - undo allocations in iwl3945_init_channel_map |
4598 | */ | 4598 | */ |
4599 | static void iwl3945_free_channel_map(struct iwl3945_priv *priv) | 4599 | static void iwl3945_free_channel_map(struct iwl_priv *priv) |
4600 | { | 4600 | { |
4601 | kfree(priv->channel_info); | 4601 | kfree(priv->channel_info); |
4602 | priv->channel_count = 0; | 4602 | priv->channel_count = 0; |
@@ -4630,7 +4630,7 @@ static void iwl3945_free_channel_map(struct iwl3945_priv *priv) | |||
4630 | 4630 | ||
4631 | #define IWL_SCAN_PROBE_MASK(n) (BIT(n) | (BIT(n) - BIT(1))) | 4631 | #define IWL_SCAN_PROBE_MASK(n) (BIT(n) | (BIT(n) - BIT(1))) |
4632 | 4632 | ||
4633 | static inline u16 iwl3945_get_active_dwell_time(struct iwl3945_priv *priv, | 4633 | static inline u16 iwl3945_get_active_dwell_time(struct iwl_priv *priv, |
4634 | enum ieee80211_band band, | 4634 | enum ieee80211_band band, |
4635 | u8 n_probes) | 4635 | u8 n_probes) |
4636 | { | 4636 | { |
@@ -4642,7 +4642,7 @@ static inline u16 iwl3945_get_active_dwell_time(struct iwl3945_priv *priv, | |||
4642 | IWL_ACTIVE_DWELL_FACTOR_24GHZ * (n_probes + 1); | 4642 | IWL_ACTIVE_DWELL_FACTOR_24GHZ * (n_probes + 1); |
4643 | } | 4643 | } |
4644 | 4644 | ||
4645 | static u16 iwl3945_get_passive_dwell_time(struct iwl3945_priv *priv, | 4645 | static u16 iwl3945_get_passive_dwell_time(struct iwl_priv *priv, |
4646 | enum ieee80211_band band) | 4646 | enum ieee80211_band band) |
4647 | { | 4647 | { |
4648 | u16 passive = (band == IEEE80211_BAND_2GHZ) ? | 4648 | u16 passive = (band == IEEE80211_BAND_2GHZ) ? |
@@ -4662,7 +4662,7 @@ static u16 iwl3945_get_passive_dwell_time(struct iwl3945_priv *priv, | |||
4662 | return passive; | 4662 | return passive; |
4663 | } | 4663 | } |
4664 | 4664 | ||
4665 | static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv, | 4665 | static int iwl3945_get_channels_for_scan(struct iwl_priv *priv, |
4666 | enum ieee80211_band band, | 4666 | enum ieee80211_band band, |
4667 | u8 is_active, u8 n_probes, | 4667 | u8 is_active, u8 n_probes, |
4668 | struct iwl3945_scan_channel *scan_ch) | 4668 | struct iwl3945_scan_channel *scan_ch) |
@@ -4756,7 +4756,7 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv, | |||
4756 | return added; | 4756 | return added; |
4757 | } | 4757 | } |
4758 | 4758 | ||
4759 | static void iwl3945_init_hw_rates(struct iwl3945_priv *priv, | 4759 | static void iwl3945_init_hw_rates(struct iwl_priv *priv, |
4760 | struct ieee80211_rate *rates) | 4760 | struct ieee80211_rate *rates) |
4761 | { | 4761 | { |
4762 | int i; | 4762 | int i; |
@@ -4779,7 +4779,7 @@ static void iwl3945_init_hw_rates(struct iwl3945_priv *priv, | |||
4779 | /** | 4779 | /** |
4780 | * iwl3945_init_geos - Initialize mac80211's geo/channel info based from eeprom | 4780 | * iwl3945_init_geos - Initialize mac80211's geo/channel info based from eeprom |
4781 | */ | 4781 | */ |
4782 | static int iwl3945_init_geos(struct iwl3945_priv *priv) | 4782 | static int iwl3945_init_geos(struct iwl_priv *priv) |
4783 | { | 4783 | { |
4784 | struct iwl_channel_info *ch; | 4784 | struct iwl_channel_info *ch; |
4785 | struct ieee80211_supported_band *sband; | 4785 | struct ieee80211_supported_band *sband; |
@@ -4901,7 +4901,7 @@ static int iwl3945_init_geos(struct iwl3945_priv *priv) | |||
4901 | /* | 4901 | /* |
4902 | * iwl3945_free_geos - undo allocations in iwl3945_init_geos | 4902 | * iwl3945_free_geos - undo allocations in iwl3945_init_geos |
4903 | */ | 4903 | */ |
4904 | static void iwl3945_free_geos(struct iwl3945_priv *priv) | 4904 | static void iwl3945_free_geos(struct iwl_priv *priv) |
4905 | { | 4905 | { |
4906 | kfree(priv->ieee_channels); | 4906 | kfree(priv->ieee_channels); |
4907 | kfree(priv->ieee_rates); | 4907 | kfree(priv->ieee_rates); |
@@ -4914,7 +4914,7 @@ static void iwl3945_free_geos(struct iwl3945_priv *priv) | |||
4914 | * | 4914 | * |
4915 | ******************************************************************************/ | 4915 | ******************************************************************************/ |
4916 | 4916 | ||
4917 | static void iwl3945_dealloc_ucode_pci(struct iwl3945_priv *priv) | 4917 | static void iwl3945_dealloc_ucode_pci(struct iwl_priv *priv) |
4918 | { | 4918 | { |
4919 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code); | 4919 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code); |
4920 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data); | 4920 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data); |
@@ -4928,7 +4928,7 @@ static void iwl3945_dealloc_ucode_pci(struct iwl3945_priv *priv) | |||
4928 | * iwl3945_verify_inst_full - verify runtime uCode image in card vs. host, | 4928 | * iwl3945_verify_inst_full - verify runtime uCode image in card vs. host, |
4929 | * looking at all data. | 4929 | * looking at all data. |
4930 | */ | 4930 | */ |
4931 | static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 *image, u32 len) | 4931 | static int iwl3945_verify_inst_full(struct iwl_priv *priv, __le32 *image, u32 len) |
4932 | { | 4932 | { |
4933 | u32 val; | 4933 | u32 val; |
4934 | u32 save_len = len; | 4934 | u32 save_len = len; |
@@ -4975,7 +4975,7 @@ static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 *image, u3 | |||
4975 | * using sample data 100 bytes apart. If these sample points are good, | 4975 | * using sample data 100 bytes apart. If these sample points are good, |
4976 | * it's a pretty good bet that everything between them is good, too. | 4976 | * it's a pretty good bet that everything between them is good, too. |
4977 | */ | 4977 | */ |
4978 | static int iwl3945_verify_inst_sparse(struct iwl3945_priv *priv, __le32 *image, u32 len) | 4978 | static int iwl3945_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 len) |
4979 | { | 4979 | { |
4980 | u32 val; | 4980 | u32 val; |
4981 | int rc = 0; | 4981 | int rc = 0; |
@@ -5018,7 +5018,7 @@ static int iwl3945_verify_inst_sparse(struct iwl3945_priv *priv, __le32 *image, | |||
5018 | * iwl3945_verify_ucode - determine which instruction image is in SRAM, | 5018 | * iwl3945_verify_ucode - determine which instruction image is in SRAM, |
5019 | * and verify its contents | 5019 | * and verify its contents |
5020 | */ | 5020 | */ |
5021 | static int iwl3945_verify_ucode(struct iwl3945_priv *priv) | 5021 | static int iwl3945_verify_ucode(struct iwl_priv *priv) |
5022 | { | 5022 | { |
5023 | __le32 *image; | 5023 | __le32 *image; |
5024 | u32 len; | 5024 | u32 len; |
@@ -5065,7 +5065,7 @@ static int iwl3945_verify_ucode(struct iwl3945_priv *priv) | |||
5065 | 5065 | ||
5066 | 5066 | ||
5067 | /* check contents of special bootstrap uCode SRAM */ | 5067 | /* check contents of special bootstrap uCode SRAM */ |
5068 | static int iwl3945_verify_bsm(struct iwl3945_priv *priv) | 5068 | static int iwl3945_verify_bsm(struct iwl_priv *priv) |
5069 | { | 5069 | { |
5070 | __le32 *image = priv->ucode_boot.v_addr; | 5070 | __le32 *image = priv->ucode_boot.v_addr; |
5071 | u32 len = priv->ucode_boot.len; | 5071 | u32 len = priv->ucode_boot.len; |
@@ -5127,7 +5127,7 @@ static int iwl3945_verify_bsm(struct iwl3945_priv *priv) | |||
5127 | * the runtime uCode instructions and the backup data cache into SRAM, | 5127 | * the runtime uCode instructions and the backup data cache into SRAM, |
5128 | * and re-launches the runtime uCode from where it left off. | 5128 | * and re-launches the runtime uCode from where it left off. |
5129 | */ | 5129 | */ |
5130 | static int iwl3945_load_bsm(struct iwl3945_priv *priv) | 5130 | static int iwl3945_load_bsm(struct iwl_priv *priv) |
5131 | { | 5131 | { |
5132 | __le32 *image = priv->ucode_boot.v_addr; | 5132 | __le32 *image = priv->ucode_boot.v_addr; |
5133 | u32 len = priv->ucode_boot.len; | 5133 | u32 len = priv->ucode_boot.len; |
@@ -5213,7 +5213,7 @@ static int iwl3945_load_bsm(struct iwl3945_priv *priv) | |||
5213 | return 0; | 5213 | return 0; |
5214 | } | 5214 | } |
5215 | 5215 | ||
5216 | static void iwl3945_nic_start(struct iwl3945_priv *priv) | 5216 | static void iwl3945_nic_start(struct iwl_priv *priv) |
5217 | { | 5217 | { |
5218 | /* Remove all resets to allow NIC to operate */ | 5218 | /* Remove all resets to allow NIC to operate */ |
5219 | iwl3945_write32(priv, CSR_RESET, 0); | 5219 | iwl3945_write32(priv, CSR_RESET, 0); |
@@ -5224,7 +5224,7 @@ static void iwl3945_nic_start(struct iwl3945_priv *priv) | |||
5224 | * | 5224 | * |
5225 | * Copy into buffers for card to fetch via bus-mastering | 5225 | * Copy into buffers for card to fetch via bus-mastering |
5226 | */ | 5226 | */ |
5227 | static int iwl3945_read_ucode(struct iwl3945_priv *priv) | 5227 | static int iwl3945_read_ucode(struct iwl_priv *priv) |
5228 | { | 5228 | { |
5229 | struct iwl_ucode *ucode; | 5229 | struct iwl_ucode *ucode; |
5230 | int ret = -EINVAL, index; | 5230 | int ret = -EINVAL, index; |
@@ -5465,7 +5465,7 @@ static int iwl3945_read_ucode(struct iwl3945_priv *priv) | |||
5465 | * We need to replace them to load runtime uCode inst and data, | 5465 | * We need to replace them to load runtime uCode inst and data, |
5466 | * and to save runtime data when powering down. | 5466 | * and to save runtime data when powering down. |
5467 | */ | 5467 | */ |
5468 | static int iwl3945_set_ucode_ptrs(struct iwl3945_priv *priv) | 5468 | static int iwl3945_set_ucode_ptrs(struct iwl_priv *priv) |
5469 | { | 5469 | { |
5470 | dma_addr_t pinst; | 5470 | dma_addr_t pinst; |
5471 | dma_addr_t pdata; | 5471 | dma_addr_t pdata; |
@@ -5510,7 +5510,7 @@ static int iwl3945_set_ucode_ptrs(struct iwl3945_priv *priv) | |||
5510 | * | 5510 | * |
5511 | * Tell "initialize" uCode to go ahead and load the runtime uCode. | 5511 | * Tell "initialize" uCode to go ahead and load the runtime uCode. |
5512 | */ | 5512 | */ |
5513 | static void iwl3945_init_alive_start(struct iwl3945_priv *priv) | 5513 | static void iwl3945_init_alive_start(struct iwl_priv *priv) |
5514 | { | 5514 | { |
5515 | /* Check alive response for "valid" sign from uCode */ | 5515 | /* Check alive response for "valid" sign from uCode */ |
5516 | if (priv->card_alive_init.is_valid != UCODE_VALID_OK) { | 5516 | if (priv->card_alive_init.is_valid != UCODE_VALID_OK) { |
@@ -5556,7 +5556,7 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, | |||
5556 | * from protocol/runtime uCode (initialization uCode's | 5556 | * from protocol/runtime uCode (initialization uCode's |
5557 | * Alive gets handled by iwl3945_init_alive_start()). | 5557 | * Alive gets handled by iwl3945_init_alive_start()). |
5558 | */ | 5558 | */ |
5559 | static void iwl3945_alive_start(struct iwl3945_priv *priv) | 5559 | static void iwl3945_alive_start(struct iwl_priv *priv) |
5560 | { | 5560 | { |
5561 | int rc = 0; | 5561 | int rc = 0; |
5562 | int thermal_spin = 0; | 5562 | int thermal_spin = 0; |
@@ -5668,9 +5668,9 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv) | |||
5668 | queue_work(priv->workqueue, &priv->restart); | 5668 | queue_work(priv->workqueue, &priv->restart); |
5669 | } | 5669 | } |
5670 | 5670 | ||
5671 | static void iwl3945_cancel_deferred_work(struct iwl3945_priv *priv); | 5671 | static void iwl3945_cancel_deferred_work(struct iwl_priv *priv); |
5672 | 5672 | ||
5673 | static void __iwl3945_down(struct iwl3945_priv *priv) | 5673 | static void __iwl3945_down(struct iwl_priv *priv) |
5674 | { | 5674 | { |
5675 | unsigned long flags; | 5675 | unsigned long flags; |
5676 | int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); | 5676 | int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); |
@@ -5769,7 +5769,7 @@ static void __iwl3945_down(struct iwl3945_priv *priv) | |||
5769 | iwl3945_clear_free_frames(priv); | 5769 | iwl3945_clear_free_frames(priv); |
5770 | } | 5770 | } |
5771 | 5771 | ||
5772 | static void iwl3945_down(struct iwl3945_priv *priv) | 5772 | static void iwl3945_down(struct iwl_priv *priv) |
5773 | { | 5773 | { |
5774 | mutex_lock(&priv->mutex); | 5774 | mutex_lock(&priv->mutex); |
5775 | __iwl3945_down(priv); | 5775 | __iwl3945_down(priv); |
@@ -5780,7 +5780,7 @@ static void iwl3945_down(struct iwl3945_priv *priv) | |||
5780 | 5780 | ||
5781 | #define MAX_HW_RESTARTS 5 | 5781 | #define MAX_HW_RESTARTS 5 |
5782 | 5782 | ||
5783 | static int __iwl3945_up(struct iwl3945_priv *priv) | 5783 | static int __iwl3945_up(struct iwl_priv *priv) |
5784 | { | 5784 | { |
5785 | int rc, i; | 5785 | int rc, i; |
5786 | 5786 | ||
@@ -5884,8 +5884,8 @@ static int __iwl3945_up(struct iwl3945_priv *priv) | |||
5884 | 5884 | ||
5885 | static void iwl3945_bg_init_alive_start(struct work_struct *data) | 5885 | static void iwl3945_bg_init_alive_start(struct work_struct *data) |
5886 | { | 5886 | { |
5887 | struct iwl3945_priv *priv = | 5887 | struct iwl_priv *priv = |
5888 | container_of(data, struct iwl3945_priv, init_alive_start.work); | 5888 | container_of(data, struct iwl_priv, init_alive_start.work); |
5889 | 5889 | ||
5890 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 5890 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
5891 | return; | 5891 | return; |
@@ -5897,8 +5897,8 @@ static void iwl3945_bg_init_alive_start(struct work_struct *data) | |||
5897 | 5897 | ||
5898 | static void iwl3945_bg_alive_start(struct work_struct *data) | 5898 | static void iwl3945_bg_alive_start(struct work_struct *data) |
5899 | { | 5899 | { |
5900 | struct iwl3945_priv *priv = | 5900 | struct iwl_priv *priv = |
5901 | container_of(data, struct iwl3945_priv, alive_start.work); | 5901 | container_of(data, struct iwl_priv, alive_start.work); |
5902 | 5902 | ||
5903 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 5903 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
5904 | return; | 5904 | return; |
@@ -5910,7 +5910,7 @@ static void iwl3945_bg_alive_start(struct work_struct *data) | |||
5910 | 5910 | ||
5911 | static void iwl3945_bg_rf_kill(struct work_struct *work) | 5911 | static void iwl3945_bg_rf_kill(struct work_struct *work) |
5912 | { | 5912 | { |
5913 | struct iwl3945_priv *priv = container_of(work, struct iwl3945_priv, rf_kill); | 5913 | struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill); |
5914 | 5914 | ||
5915 | wake_up_interruptible(&priv->wait_command_queue); | 5915 | wake_up_interruptible(&priv->wait_command_queue); |
5916 | 5916 | ||
@@ -5944,8 +5944,8 @@ static void iwl3945_bg_rf_kill(struct work_struct *work) | |||
5944 | 5944 | ||
5945 | static void iwl3945_bg_scan_check(struct work_struct *data) | 5945 | static void iwl3945_bg_scan_check(struct work_struct *data) |
5946 | { | 5946 | { |
5947 | struct iwl3945_priv *priv = | 5947 | struct iwl_priv *priv = |
5948 | container_of(data, struct iwl3945_priv, scan_check.work); | 5948 | container_of(data, struct iwl_priv, scan_check.work); |
5949 | 5949 | ||
5950 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 5950 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
5951 | return; | 5951 | return; |
@@ -5965,8 +5965,8 @@ static void iwl3945_bg_scan_check(struct work_struct *data) | |||
5965 | 5965 | ||
5966 | static void iwl3945_bg_request_scan(struct work_struct *data) | 5966 | static void iwl3945_bg_request_scan(struct work_struct *data) |
5967 | { | 5967 | { |
5968 | struct iwl3945_priv *priv = | 5968 | struct iwl_priv *priv = |
5969 | container_of(data, struct iwl3945_priv, request_scan); | 5969 | container_of(data, struct iwl_priv, request_scan); |
5970 | struct iwl3945_host_cmd cmd = { | 5970 | struct iwl3945_host_cmd cmd = { |
5971 | .id = REPLY_SCAN_CMD, | 5971 | .id = REPLY_SCAN_CMD, |
5972 | .len = sizeof(struct iwl3945_scan_cmd), | 5972 | .len = sizeof(struct iwl3945_scan_cmd), |
@@ -6161,7 +6161,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
6161 | 6161 | ||
6162 | static void iwl3945_bg_up(struct work_struct *data) | 6162 | static void iwl3945_bg_up(struct work_struct *data) |
6163 | { | 6163 | { |
6164 | struct iwl3945_priv *priv = container_of(data, struct iwl3945_priv, up); | 6164 | struct iwl_priv *priv = container_of(data, struct iwl_priv, up); |
6165 | 6165 | ||
6166 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 6166 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
6167 | return; | 6167 | return; |
@@ -6174,7 +6174,7 @@ static void iwl3945_bg_up(struct work_struct *data) | |||
6174 | 6174 | ||
6175 | static void iwl3945_bg_restart(struct work_struct *data) | 6175 | static void iwl3945_bg_restart(struct work_struct *data) |
6176 | { | 6176 | { |
6177 | struct iwl3945_priv *priv = container_of(data, struct iwl3945_priv, restart); | 6177 | struct iwl_priv *priv = container_of(data, struct iwl_priv, restart); |
6178 | 6178 | ||
6179 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 6179 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
6180 | return; | 6180 | return; |
@@ -6185,8 +6185,8 @@ static void iwl3945_bg_restart(struct work_struct *data) | |||
6185 | 6185 | ||
6186 | static void iwl3945_bg_rx_replenish(struct work_struct *data) | 6186 | static void iwl3945_bg_rx_replenish(struct work_struct *data) |
6187 | { | 6187 | { |
6188 | struct iwl3945_priv *priv = | 6188 | struct iwl_priv *priv = |
6189 | container_of(data, struct iwl3945_priv, rx_replenish); | 6189 | container_of(data, struct iwl_priv, rx_replenish); |
6190 | 6190 | ||
6191 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 6191 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
6192 | return; | 6192 | return; |
@@ -6198,7 +6198,7 @@ static void iwl3945_bg_rx_replenish(struct work_struct *data) | |||
6198 | 6198 | ||
6199 | #define IWL_DELAY_NEXT_SCAN (HZ*2) | 6199 | #define IWL_DELAY_NEXT_SCAN (HZ*2) |
6200 | 6200 | ||
6201 | static void iwl3945_post_associate(struct iwl3945_priv *priv) | 6201 | static void iwl3945_post_associate(struct iwl_priv *priv) |
6202 | { | 6202 | { |
6203 | int rc = 0; | 6203 | int rc = 0; |
6204 | struct ieee80211_conf *conf = NULL; | 6204 | struct ieee80211_conf *conf = NULL; |
@@ -6290,7 +6290,7 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv) | |||
6290 | 6290 | ||
6291 | static void iwl3945_bg_abort_scan(struct work_struct *work) | 6291 | static void iwl3945_bg_abort_scan(struct work_struct *work) |
6292 | { | 6292 | { |
6293 | struct iwl3945_priv *priv = container_of(work, struct iwl3945_priv, abort_scan); | 6293 | struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan); |
6294 | 6294 | ||
6295 | if (!iwl3945_is_ready(priv)) | 6295 | if (!iwl3945_is_ready(priv)) |
6296 | return; | 6296 | return; |
@@ -6307,8 +6307,8 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed); | |||
6307 | 6307 | ||
6308 | static void iwl3945_bg_scan_completed(struct work_struct *work) | 6308 | static void iwl3945_bg_scan_completed(struct work_struct *work) |
6309 | { | 6309 | { |
6310 | struct iwl3945_priv *priv = | 6310 | struct iwl_priv *priv = |
6311 | container_of(work, struct iwl3945_priv, scan_completed); | 6311 | container_of(work, struct iwl_priv, scan_completed); |
6312 | 6312 | ||
6313 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, "SCAN complete scan\n"); | 6313 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, "SCAN complete scan\n"); |
6314 | 6314 | ||
@@ -6337,7 +6337,7 @@ static void iwl3945_bg_scan_completed(struct work_struct *work) | |||
6337 | 6337 | ||
6338 | static int iwl3945_mac_start(struct ieee80211_hw *hw) | 6338 | static int iwl3945_mac_start(struct ieee80211_hw *hw) |
6339 | { | 6339 | { |
6340 | struct iwl3945_priv *priv = hw->priv; | 6340 | struct iwl_priv *priv = hw->priv; |
6341 | int ret; | 6341 | int ret; |
6342 | 6342 | ||
6343 | IWL_DEBUG_MAC80211("enter\n"); | 6343 | IWL_DEBUG_MAC80211("enter\n"); |
@@ -6416,7 +6416,7 @@ out_disable_msi: | |||
6416 | 6416 | ||
6417 | static void iwl3945_mac_stop(struct ieee80211_hw *hw) | 6417 | static void iwl3945_mac_stop(struct ieee80211_hw *hw) |
6418 | { | 6418 | { |
6419 | struct iwl3945_priv *priv = hw->priv; | 6419 | struct iwl_priv *priv = hw->priv; |
6420 | 6420 | ||
6421 | IWL_DEBUG_MAC80211("enter\n"); | 6421 | IWL_DEBUG_MAC80211("enter\n"); |
6422 | 6422 | ||
@@ -6449,7 +6449,7 @@ static void iwl3945_mac_stop(struct ieee80211_hw *hw) | |||
6449 | 6449 | ||
6450 | static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 6450 | static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) |
6451 | { | 6451 | { |
6452 | struct iwl3945_priv *priv = hw->priv; | 6452 | struct iwl_priv *priv = hw->priv; |
6453 | 6453 | ||
6454 | IWL_DEBUG_MAC80211("enter\n"); | 6454 | IWL_DEBUG_MAC80211("enter\n"); |
6455 | 6455 | ||
@@ -6466,7 +6466,7 @@ static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
6466 | static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, | 6466 | static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, |
6467 | struct ieee80211_if_init_conf *conf) | 6467 | struct ieee80211_if_init_conf *conf) |
6468 | { | 6468 | { |
6469 | struct iwl3945_priv *priv = hw->priv; | 6469 | struct iwl_priv *priv = hw->priv; |
6470 | unsigned long flags; | 6470 | unsigned long flags; |
6471 | 6471 | ||
6472 | IWL_DEBUG_MAC80211("enter: type %d\n", conf->type); | 6472 | IWL_DEBUG_MAC80211("enter: type %d\n", conf->type); |
@@ -6507,7 +6507,7 @@ static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, | |||
6507 | */ | 6507 | */ |
6508 | static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed) | 6508 | static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed) |
6509 | { | 6509 | { |
6510 | struct iwl3945_priv *priv = hw->priv; | 6510 | struct iwl_priv *priv = hw->priv; |
6511 | const struct iwl_channel_info *ch_info; | 6511 | const struct iwl_channel_info *ch_info; |
6512 | struct ieee80211_conf *conf = &hw->conf; | 6512 | struct ieee80211_conf *conf = &hw->conf; |
6513 | unsigned long flags; | 6513 | unsigned long flags; |
@@ -6590,7 +6590,7 @@ out: | |||
6590 | return ret; | 6590 | return ret; |
6591 | } | 6591 | } |
6592 | 6592 | ||
6593 | static void iwl3945_config_ap(struct iwl3945_priv *priv) | 6593 | static void iwl3945_config_ap(struct iwl_priv *priv) |
6594 | { | 6594 | { |
6595 | int rc = 0; | 6595 | int rc = 0; |
6596 | 6596 | ||
@@ -6649,9 +6649,9 @@ static void iwl3945_config_ap(struct iwl3945_priv *priv) | |||
6649 | 6649 | ||
6650 | static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | 6650 | static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, |
6651 | struct ieee80211_vif *vif, | 6651 | struct ieee80211_vif *vif, |
6652 | struct ieee80211_if_conf *conf) | 6652 | struct ieee80211_if_conf *conf) |
6653 | { | 6653 | { |
6654 | struct iwl3945_priv *priv = hw->priv; | 6654 | struct iwl_priv *priv = hw->priv; |
6655 | int rc; | 6655 | int rc; |
6656 | 6656 | ||
6657 | if (conf == NULL) | 6657 | if (conf == NULL) |
@@ -6752,7 +6752,7 @@ static void iwl3945_configure_filter(struct ieee80211_hw *hw, | |||
6752 | unsigned int *total_flags, | 6752 | unsigned int *total_flags, |
6753 | int mc_count, struct dev_addr_list *mc_list) | 6753 | int mc_count, struct dev_addr_list *mc_list) |
6754 | { | 6754 | { |
6755 | struct iwl3945_priv *priv = hw->priv; | 6755 | struct iwl_priv *priv = hw->priv; |
6756 | __le32 *filter_flags = &priv->staging39_rxon.filter_flags; | 6756 | __le32 *filter_flags = &priv->staging39_rxon.filter_flags; |
6757 | 6757 | ||
6758 | IWL_DEBUG_MAC80211("Enter: changed: 0x%x, total: 0x%x\n", | 6758 | IWL_DEBUG_MAC80211("Enter: changed: 0x%x, total: 0x%x\n", |
@@ -6796,7 +6796,7 @@ static void iwl3945_configure_filter(struct ieee80211_hw *hw, | |||
6796 | static void iwl3945_mac_remove_interface(struct ieee80211_hw *hw, | 6796 | static void iwl3945_mac_remove_interface(struct ieee80211_hw *hw, |
6797 | struct ieee80211_if_init_conf *conf) | 6797 | struct ieee80211_if_init_conf *conf) |
6798 | { | 6798 | { |
6799 | struct iwl3945_priv *priv = hw->priv; | 6799 | struct iwl_priv *priv = hw->priv; |
6800 | 6800 | ||
6801 | IWL_DEBUG_MAC80211("enter\n"); | 6801 | IWL_DEBUG_MAC80211("enter\n"); |
6802 | 6802 | ||
@@ -6823,7 +6823,7 @@ static void iwl3945_bss_info_changed(struct ieee80211_hw *hw, | |||
6823 | struct ieee80211_bss_conf *bss_conf, | 6823 | struct ieee80211_bss_conf *bss_conf, |
6824 | u32 changes) | 6824 | u32 changes) |
6825 | { | 6825 | { |
6826 | struct iwl3945_priv *priv = hw->priv; | 6826 | struct iwl_priv *priv = hw->priv; |
6827 | 6827 | ||
6828 | IWL_DEBUG_MAC80211("changes = 0x%X\n", changes); | 6828 | IWL_DEBUG_MAC80211("changes = 0x%X\n", changes); |
6829 | 6829 | ||
@@ -6875,7 +6875,7 @@ static int iwl3945_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
6875 | { | 6875 | { |
6876 | int rc = 0; | 6876 | int rc = 0; |
6877 | unsigned long flags; | 6877 | unsigned long flags; |
6878 | struct iwl3945_priv *priv = hw->priv; | 6878 | struct iwl_priv *priv = hw->priv; |
6879 | DECLARE_SSID_BUF(ssid_buf); | 6879 | DECLARE_SSID_BUF(ssid_buf); |
6880 | 6880 | ||
6881 | IWL_DEBUG_MAC80211("enter\n"); | 6881 | IWL_DEBUG_MAC80211("enter\n"); |
@@ -6928,7 +6928,7 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
6928 | const u8 *local_addr, const u8 *addr, | 6928 | const u8 *local_addr, const u8 *addr, |
6929 | struct ieee80211_key_conf *key) | 6929 | struct ieee80211_key_conf *key) |
6930 | { | 6930 | { |
6931 | struct iwl3945_priv *priv = hw->priv; | 6931 | struct iwl_priv *priv = hw->priv; |
6932 | int rc = 0; | 6932 | int rc = 0; |
6933 | u8 sta_id; | 6933 | u8 sta_id; |
6934 | 6934 | ||
@@ -6986,7 +6986,7 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
6986 | static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | 6986 | static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, |
6987 | const struct ieee80211_tx_queue_params *params) | 6987 | const struct ieee80211_tx_queue_params *params) |
6988 | { | 6988 | { |
6989 | struct iwl3945_priv *priv = hw->priv; | 6989 | struct iwl_priv *priv = hw->priv; |
6990 | unsigned long flags; | 6990 | unsigned long flags; |
6991 | int q; | 6991 | int q; |
6992 | 6992 | ||
@@ -7032,7 +7032,7 @@ static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
7032 | static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw, | 7032 | static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw, |
7033 | struct ieee80211_tx_queue_stats *stats) | 7033 | struct ieee80211_tx_queue_stats *stats) |
7034 | { | 7034 | { |
7035 | struct iwl3945_priv *priv = hw->priv; | 7035 | struct iwl_priv *priv = hw->priv; |
7036 | int i, avail; | 7036 | int i, avail; |
7037 | struct iwl3945_tx_queue *txq; | 7037 | struct iwl3945_tx_queue *txq; |
7038 | struct iwl_queue *q; | 7038 | struct iwl_queue *q; |
@@ -7066,7 +7066,7 @@ static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
7066 | 7066 | ||
7067 | static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) | 7067 | static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) |
7068 | { | 7068 | { |
7069 | struct iwl3945_priv *priv = hw->priv; | 7069 | struct iwl_priv *priv = hw->priv; |
7070 | unsigned long flags; | 7070 | unsigned long flags; |
7071 | 7071 | ||
7072 | mutex_lock(&priv->mutex); | 7072 | mutex_lock(&priv->mutex); |
@@ -7125,7 +7125,7 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) | |||
7125 | 7125 | ||
7126 | static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | 7126 | static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
7127 | { | 7127 | { |
7128 | struct iwl3945_priv *priv = hw->priv; | 7128 | struct iwl_priv *priv = hw->priv; |
7129 | unsigned long flags; | 7129 | unsigned long flags; |
7130 | 7130 | ||
7131 | IWL_DEBUG_MAC80211("enter\n"); | 7131 | IWL_DEBUG_MAC80211("enter\n"); |
@@ -7178,7 +7178,7 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk | |||
7178 | static ssize_t show_debug_level(struct device *d, | 7178 | static ssize_t show_debug_level(struct device *d, |
7179 | struct device_attribute *attr, char *buf) | 7179 | struct device_attribute *attr, char *buf) |
7180 | { | 7180 | { |
7181 | struct iwl3945_priv *priv = d->driver_data; | 7181 | struct iwl_priv *priv = d->driver_data; |
7182 | 7182 | ||
7183 | return sprintf(buf, "0x%08X\n", priv->debug_level); | 7183 | return sprintf(buf, "0x%08X\n", priv->debug_level); |
7184 | } | 7184 | } |
@@ -7186,7 +7186,7 @@ static ssize_t store_debug_level(struct device *d, | |||
7186 | struct device_attribute *attr, | 7186 | struct device_attribute *attr, |
7187 | const char *buf, size_t count) | 7187 | const char *buf, size_t count) |
7188 | { | 7188 | { |
7189 | struct iwl3945_priv *priv = d->driver_data; | 7189 | struct iwl_priv *priv = d->driver_data; |
7190 | unsigned long val; | 7190 | unsigned long val; |
7191 | int ret; | 7191 | int ret; |
7192 | 7192 | ||
@@ -7208,7 +7208,7 @@ static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, | |||
7208 | static ssize_t show_temperature(struct device *d, | 7208 | static ssize_t show_temperature(struct device *d, |
7209 | struct device_attribute *attr, char *buf) | 7209 | struct device_attribute *attr, char *buf) |
7210 | { | 7210 | { |
7211 | struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; | 7211 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7212 | 7212 | ||
7213 | if (!iwl3945_is_alive(priv)) | 7213 | if (!iwl3945_is_alive(priv)) |
7214 | return -EAGAIN; | 7214 | return -EAGAIN; |
@@ -7221,7 +7221,7 @@ static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL); | |||
7221 | static ssize_t show_tx_power(struct device *d, | 7221 | static ssize_t show_tx_power(struct device *d, |
7222 | struct device_attribute *attr, char *buf) | 7222 | struct device_attribute *attr, char *buf) |
7223 | { | 7223 | { |
7224 | struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; | 7224 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7225 | return sprintf(buf, "%d\n", priv->user_txpower_limit); | 7225 | return sprintf(buf, "%d\n", priv->user_txpower_limit); |
7226 | } | 7226 | } |
7227 | 7227 | ||
@@ -7229,7 +7229,7 @@ static ssize_t store_tx_power(struct device *d, | |||
7229 | struct device_attribute *attr, | 7229 | struct device_attribute *attr, |
7230 | const char *buf, size_t count) | 7230 | const char *buf, size_t count) |
7231 | { | 7231 | { |
7232 | struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; | 7232 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7233 | char *p = (char *)buf; | 7233 | char *p = (char *)buf; |
7234 | u32 val; | 7234 | u32 val; |
7235 | 7235 | ||
@@ -7248,7 +7248,7 @@ static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power); | |||
7248 | static ssize_t show_flags(struct device *d, | 7248 | static ssize_t show_flags(struct device *d, |
7249 | struct device_attribute *attr, char *buf) | 7249 | struct device_attribute *attr, char *buf) |
7250 | { | 7250 | { |
7251 | struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; | 7251 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7252 | 7252 | ||
7253 | return sprintf(buf, "0x%04X\n", priv->active39_rxon.flags); | 7253 | return sprintf(buf, "0x%04X\n", priv->active39_rxon.flags); |
7254 | } | 7254 | } |
@@ -7257,7 +7257,7 @@ static ssize_t store_flags(struct device *d, | |||
7257 | struct device_attribute *attr, | 7257 | struct device_attribute *attr, |
7258 | const char *buf, size_t count) | 7258 | const char *buf, size_t count) |
7259 | { | 7259 | { |
7260 | struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; | 7260 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7261 | u32 flags = simple_strtoul(buf, NULL, 0); | 7261 | u32 flags = simple_strtoul(buf, NULL, 0); |
7262 | 7262 | ||
7263 | mutex_lock(&priv->mutex); | 7263 | mutex_lock(&priv->mutex); |
@@ -7282,7 +7282,7 @@ static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, show_flags, store_flags); | |||
7282 | static ssize_t show_filter_flags(struct device *d, | 7282 | static ssize_t show_filter_flags(struct device *d, |
7283 | struct device_attribute *attr, char *buf) | 7283 | struct device_attribute *attr, char *buf) |
7284 | { | 7284 | { |
7285 | struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; | 7285 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7286 | 7286 | ||
7287 | return sprintf(buf, "0x%04X\n", | 7287 | return sprintf(buf, "0x%04X\n", |
7288 | le32_to_cpu(priv->active39_rxon.filter_flags)); | 7288 | le32_to_cpu(priv->active39_rxon.filter_flags)); |
@@ -7292,7 +7292,7 @@ static ssize_t store_filter_flags(struct device *d, | |||
7292 | struct device_attribute *attr, | 7292 | struct device_attribute *attr, |
7293 | const char *buf, size_t count) | 7293 | const char *buf, size_t count) |
7294 | { | 7294 | { |
7295 | struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; | 7295 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7296 | u32 filter_flags = simple_strtoul(buf, NULL, 0); | 7296 | u32 filter_flags = simple_strtoul(buf, NULL, 0); |
7297 | 7297 | ||
7298 | mutex_lock(&priv->mutex); | 7298 | mutex_lock(&priv->mutex); |
@@ -7321,7 +7321,7 @@ static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, show_filter_flags, | |||
7321 | static ssize_t show_measurement(struct device *d, | 7321 | static ssize_t show_measurement(struct device *d, |
7322 | struct device_attribute *attr, char *buf) | 7322 | struct device_attribute *attr, char *buf) |
7323 | { | 7323 | { |
7324 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7324 | struct iwl_priv *priv = dev_get_drvdata(d); |
7325 | struct iwl_spectrum_notification measure_report; | 7325 | struct iwl_spectrum_notification measure_report; |
7326 | u32 size = sizeof(measure_report), len = 0, ofs = 0; | 7326 | u32 size = sizeof(measure_report), len = 0, ofs = 0; |
7327 | u8 *data = (u8 *)&measure_report; | 7327 | u8 *data = (u8 *)&measure_report; |
@@ -7354,7 +7354,7 @@ static ssize_t store_measurement(struct device *d, | |||
7354 | struct device_attribute *attr, | 7354 | struct device_attribute *attr, |
7355 | const char *buf, size_t count) | 7355 | const char *buf, size_t count) |
7356 | { | 7356 | { |
7357 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7357 | struct iwl_priv *priv = dev_get_drvdata(d); |
7358 | struct ieee80211_measurement_params params = { | 7358 | struct ieee80211_measurement_params params = { |
7359 | .channel = le16_to_cpu(priv->active39_rxon.channel), | 7359 | .channel = le16_to_cpu(priv->active39_rxon.channel), |
7360 | .start_time = cpu_to_le64(priv->last_tsf), | 7360 | .start_time = cpu_to_le64(priv->last_tsf), |
@@ -7393,7 +7393,7 @@ static ssize_t store_retry_rate(struct device *d, | |||
7393 | struct device_attribute *attr, | 7393 | struct device_attribute *attr, |
7394 | const char *buf, size_t count) | 7394 | const char *buf, size_t count) |
7395 | { | 7395 | { |
7396 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7396 | struct iwl_priv *priv = dev_get_drvdata(d); |
7397 | 7397 | ||
7398 | priv->retry_rate = simple_strtoul(buf, NULL, 0); | 7398 | priv->retry_rate = simple_strtoul(buf, NULL, 0); |
7399 | if (priv->retry_rate <= 0) | 7399 | if (priv->retry_rate <= 0) |
@@ -7405,7 +7405,7 @@ static ssize_t store_retry_rate(struct device *d, | |||
7405 | static ssize_t show_retry_rate(struct device *d, | 7405 | static ssize_t show_retry_rate(struct device *d, |
7406 | struct device_attribute *attr, char *buf) | 7406 | struct device_attribute *attr, char *buf) |
7407 | { | 7407 | { |
7408 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7408 | struct iwl_priv *priv = dev_get_drvdata(d); |
7409 | return sprintf(buf, "%d", priv->retry_rate); | 7409 | return sprintf(buf, "%d", priv->retry_rate); |
7410 | } | 7410 | } |
7411 | 7411 | ||
@@ -7416,7 +7416,7 @@ static ssize_t store_power_level(struct device *d, | |||
7416 | struct device_attribute *attr, | 7416 | struct device_attribute *attr, |
7417 | const char *buf, size_t count) | 7417 | const char *buf, size_t count) |
7418 | { | 7418 | { |
7419 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7419 | struct iwl_priv *priv = dev_get_drvdata(d); |
7420 | int rc; | 7420 | int rc; |
7421 | int mode; | 7421 | int mode; |
7422 | 7422 | ||
@@ -7471,7 +7471,7 @@ static const s32 period_duration[] = { | |||
7471 | static ssize_t show_power_level(struct device *d, | 7471 | static ssize_t show_power_level(struct device *d, |
7472 | struct device_attribute *attr, char *buf) | 7472 | struct device_attribute *attr, char *buf) |
7473 | { | 7473 | { |
7474 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7474 | struct iwl_priv *priv = dev_get_drvdata(d); |
7475 | int level = IWL_POWER_LEVEL(priv->power_mode); | 7475 | int level = IWL_POWER_LEVEL(priv->power_mode); |
7476 | char *p = buf; | 7476 | char *p = buf; |
7477 | 7477 | ||
@@ -7515,7 +7515,7 @@ static DEVICE_ATTR(channels, S_IRUSR, show_channels, NULL); | |||
7515 | static ssize_t show_statistics(struct device *d, | 7515 | static ssize_t show_statistics(struct device *d, |
7516 | struct device_attribute *attr, char *buf) | 7516 | struct device_attribute *attr, char *buf) |
7517 | { | 7517 | { |
7518 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7518 | struct iwl_priv *priv = dev_get_drvdata(d); |
7519 | u32 size = sizeof(struct iwl3945_notif_statistics); | 7519 | u32 size = sizeof(struct iwl3945_notif_statistics); |
7520 | u32 len = 0, ofs = 0; | 7520 | u32 len = 0, ofs = 0; |
7521 | u8 *data = (u8 *)&priv->statistics_39; | 7521 | u8 *data = (u8 *)&priv->statistics_39; |
@@ -7553,7 +7553,7 @@ static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL); | |||
7553 | static ssize_t show_antenna(struct device *d, | 7553 | static ssize_t show_antenna(struct device *d, |
7554 | struct device_attribute *attr, char *buf) | 7554 | struct device_attribute *attr, char *buf) |
7555 | { | 7555 | { |
7556 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7556 | struct iwl_priv *priv = dev_get_drvdata(d); |
7557 | 7557 | ||
7558 | if (!iwl3945_is_alive(priv)) | 7558 | if (!iwl3945_is_alive(priv)) |
7559 | return -EAGAIN; | 7559 | return -EAGAIN; |
@@ -7566,7 +7566,7 @@ static ssize_t store_antenna(struct device *d, | |||
7566 | const char *buf, size_t count) | 7566 | const char *buf, size_t count) |
7567 | { | 7567 | { |
7568 | int ant; | 7568 | int ant; |
7569 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7569 | struct iwl_priv *priv = dev_get_drvdata(d); |
7570 | 7570 | ||
7571 | if (count == 0) | 7571 | if (count == 0) |
7572 | return 0; | 7572 | return 0; |
@@ -7591,7 +7591,7 @@ static DEVICE_ATTR(antenna, S_IWUSR | S_IRUGO, show_antenna, store_antenna); | |||
7591 | static ssize_t show_status(struct device *d, | 7591 | static ssize_t show_status(struct device *d, |
7592 | struct device_attribute *attr, char *buf) | 7592 | struct device_attribute *attr, char *buf) |
7593 | { | 7593 | { |
7594 | struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; | 7594 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7595 | if (!iwl3945_is_alive(priv)) | 7595 | if (!iwl3945_is_alive(priv)) |
7596 | return -EAGAIN; | 7596 | return -EAGAIN; |
7597 | return sprintf(buf, "0x%08x\n", (int)priv->status); | 7597 | return sprintf(buf, "0x%08x\n", (int)priv->status); |
@@ -7606,7 +7606,7 @@ static ssize_t dump_error_log(struct device *d, | |||
7606 | char *p = (char *)buf; | 7606 | char *p = (char *)buf; |
7607 | 7607 | ||
7608 | if (p[0] == '1') | 7608 | if (p[0] == '1') |
7609 | iwl3945_dump_nic_error_log((struct iwl3945_priv *)d->driver_data); | 7609 | iwl3945_dump_nic_error_log((struct iwl_priv *)d->driver_data); |
7610 | 7610 | ||
7611 | return strnlen(buf, count); | 7611 | return strnlen(buf, count); |
7612 | } | 7612 | } |
@@ -7620,7 +7620,7 @@ static ssize_t dump_event_log(struct device *d, | |||
7620 | char *p = (char *)buf; | 7620 | char *p = (char *)buf; |
7621 | 7621 | ||
7622 | if (p[0] == '1') | 7622 | if (p[0] == '1') |
7623 | iwl3945_dump_nic_event_log((struct iwl3945_priv *)d->driver_data); | 7623 | iwl3945_dump_nic_event_log((struct iwl_priv *)d->driver_data); |
7624 | 7624 | ||
7625 | return strnlen(buf, count); | 7625 | return strnlen(buf, count); |
7626 | } | 7626 | } |
@@ -7633,7 +7633,7 @@ static DEVICE_ATTR(dump_events, S_IWUSR, NULL, dump_event_log); | |||
7633 | * | 7633 | * |
7634 | *****************************************************************************/ | 7634 | *****************************************************************************/ |
7635 | 7635 | ||
7636 | static void iwl3945_setup_deferred_work(struct iwl3945_priv *priv) | 7636 | static void iwl3945_setup_deferred_work(struct iwl_priv *priv) |
7637 | { | 7637 | { |
7638 | priv->workqueue = create_workqueue(DRV_NAME); | 7638 | priv->workqueue = create_workqueue(DRV_NAME); |
7639 | 7639 | ||
@@ -7657,7 +7657,7 @@ static void iwl3945_setup_deferred_work(struct iwl3945_priv *priv) | |||
7657 | iwl3945_irq_tasklet, (unsigned long)priv); | 7657 | iwl3945_irq_tasklet, (unsigned long)priv); |
7658 | } | 7658 | } |
7659 | 7659 | ||
7660 | static void iwl3945_cancel_deferred_work(struct iwl3945_priv *priv) | 7660 | static void iwl3945_cancel_deferred_work(struct iwl_priv *priv) |
7661 | { | 7661 | { |
7662 | iwl3945_hw_cancel_deferred_work(priv); | 7662 | iwl3945_hw_cancel_deferred_work(priv); |
7663 | 7663 | ||
@@ -7714,7 +7714,7 @@ static struct ieee80211_ops iwl3945_hw_ops = { | |||
7714 | static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 7714 | static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
7715 | { | 7715 | { |
7716 | int err = 0; | 7716 | int err = 0; |
7717 | struct iwl3945_priv *priv; | 7717 | struct iwl_priv *priv; |
7718 | struct ieee80211_hw *hw; | 7718 | struct ieee80211_hw *hw; |
7719 | struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); | 7719 | struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); |
7720 | unsigned long flags; | 7720 | unsigned long flags; |
@@ -7725,7 +7725,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
7725 | 7725 | ||
7726 | /* mac80211 allocates memory for this device instance, including | 7726 | /* mac80211 allocates memory for this device instance, including |
7727 | * space for this driver's private structure */ | 7727 | * space for this driver's private structure */ |
7728 | hw = ieee80211_alloc_hw(sizeof(struct iwl3945_priv), &iwl3945_hw_ops); | 7728 | hw = ieee80211_alloc_hw(sizeof(struct iwl_priv), &iwl3945_hw_ops); |
7729 | if (hw == NULL) { | 7729 | if (hw == NULL) { |
7730 | printk(KERN_ERR DRV_NAME "Can not allocate network device\n"); | 7730 | printk(KERN_ERR DRV_NAME "Can not allocate network device\n"); |
7731 | err = -ENOMEM; | 7731 | err = -ENOMEM; |
@@ -7988,7 +7988,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
7988 | 7988 | ||
7989 | static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) | 7989 | static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) |
7990 | { | 7990 | { |
7991 | struct iwl3945_priv *priv = pci_get_drvdata(pdev); | 7991 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
7992 | unsigned long flags; | 7992 | unsigned long flags; |
7993 | 7993 | ||
7994 | if (!priv) | 7994 | if (!priv) |
@@ -8051,7 +8051,7 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) | |||
8051 | 8051 | ||
8052 | static int iwl3945_pci_suspend(struct pci_dev *pdev, pm_message_t state) | 8052 | static int iwl3945_pci_suspend(struct pci_dev *pdev, pm_message_t state) |
8053 | { | 8053 | { |
8054 | struct iwl3945_priv *priv = pci_get_drvdata(pdev); | 8054 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
8055 | 8055 | ||
8056 | if (priv->is_open) { | 8056 | if (priv->is_open) { |
8057 | set_bit(STATUS_IN_SUSPEND, &priv->status); | 8057 | set_bit(STATUS_IN_SUSPEND, &priv->status); |
@@ -8066,7 +8066,7 @@ static int iwl3945_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
8066 | 8066 | ||
8067 | static int iwl3945_pci_resume(struct pci_dev *pdev) | 8067 | static int iwl3945_pci_resume(struct pci_dev *pdev) |
8068 | { | 8068 | { |
8069 | struct iwl3945_priv *priv = pci_get_drvdata(pdev); | 8069 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
8070 | 8070 | ||
8071 | pci_set_power_state(pdev, PCI_D0); | 8071 | pci_set_power_state(pdev, PCI_D0); |
8072 | 8072 | ||
@@ -8084,7 +8084,7 @@ static int iwl3945_pci_resume(struct pci_dev *pdev) | |||
8084 | /* software rf-kill from user */ | 8084 | /* software rf-kill from user */ |
8085 | static int iwl3945_rfkill_soft_rf_kill(void *data, enum rfkill_state state) | 8085 | static int iwl3945_rfkill_soft_rf_kill(void *data, enum rfkill_state state) |
8086 | { | 8086 | { |
8087 | struct iwl3945_priv *priv = data; | 8087 | struct iwl_priv *priv = data; |
8088 | int err = 0; | 8088 | int err = 0; |
8089 | 8089 | ||
8090 | if (!priv->rfkill) | 8090 | if (!priv->rfkill) |
@@ -8117,7 +8117,7 @@ out_unlock: | |||
8117 | return err; | 8117 | return err; |
8118 | } | 8118 | } |
8119 | 8119 | ||
8120 | int iwl3945_rfkill_init(struct iwl3945_priv *priv) | 8120 | int iwl3945_rfkill_init(struct iwl_priv *priv) |
8121 | { | 8121 | { |
8122 | struct device *device = wiphy_dev(priv->hw->wiphy); | 8122 | struct device *device = wiphy_dev(priv->hw->wiphy); |
8123 | int ret = 0; | 8123 | int ret = 0; |
@@ -8160,7 +8160,7 @@ error: | |||
8160 | return ret; | 8160 | return ret; |
8161 | } | 8161 | } |
8162 | 8162 | ||
8163 | void iwl3945_rfkill_unregister(struct iwl3945_priv *priv) | 8163 | void iwl3945_rfkill_unregister(struct iwl_priv *priv) |
8164 | { | 8164 | { |
8165 | if (priv->rfkill) | 8165 | if (priv->rfkill) |
8166 | rfkill_unregister(priv->rfkill); | 8166 | rfkill_unregister(priv->rfkill); |
@@ -8169,7 +8169,7 @@ void iwl3945_rfkill_unregister(struct iwl3945_priv *priv) | |||
8169 | } | 8169 | } |
8170 | 8170 | ||
8171 | /* set rf-kill to the right state. */ | 8171 | /* set rf-kill to the right state. */ |
8172 | void iwl3945_rfkill_set_hw_state(struct iwl3945_priv *priv) | 8172 | void iwl3945_rfkill_set_hw_state(struct iwl_priv *priv) |
8173 | { | 8173 | { |
8174 | 8174 | ||
8175 | if (!priv->rfkill) | 8175 | if (!priv->rfkill) |