aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c396
1 files changed, 198 insertions, 198 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index e05bc902ee6e..4e899ce81b32 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -50,7 +50,7 @@
50#include "iwl-4965.h" 50#include "iwl-4965.h"
51#include "iwl-helpers.h" 51#include "iwl-helpers.h"
52 52
53static int iwl4965_tx_queue_update_write_ptr(struct iwl4965_priv *priv, 53static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv,
54 struct iwl4965_tx_queue *txq); 54 struct iwl4965_tx_queue *txq);
55 55
56/****************************************************************************** 56/******************************************************************************
@@ -107,7 +107,7 @@ __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr)
107} 107}
108 108
109static const struct ieee80211_supported_band *iwl4965_get_hw_mode( 109static const struct ieee80211_supported_band *iwl4965_get_hw_mode(
110 struct iwl4965_priv *priv, enum ieee80211_band band) 110 struct iwl_priv *priv, enum ieee80211_band band)
111{ 111{
112 return priv->hw->wiphy->bands[band]; 112 return priv->hw->wiphy->bands[band];
113} 113}
@@ -216,7 +216,7 @@ static inline u8 get_cmd_index(struct iwl4965_queue *q, u32 index, int is_huge)
216/** 216/**
217 * iwl4965_queue_init - Initialize queue's high/low-water and read/write indexes 217 * iwl4965_queue_init - Initialize queue's high/low-water and read/write indexes
218 */ 218 */
219static int iwl4965_queue_init(struct iwl4965_priv *priv, struct iwl4965_queue *q, 219static int iwl4965_queue_init(struct iwl_priv *priv, struct iwl4965_queue *q,
220 int count, int slots_num, u32 id) 220 int count, int slots_num, u32 id)
221{ 221{
222 q->n_bd = count; 222 q->n_bd = count;
@@ -247,7 +247,7 @@ static int iwl4965_queue_init(struct iwl4965_priv *priv, struct iwl4965_queue *q
247/** 247/**
248 * iwl4965_tx_queue_alloc - Alloc driver data and TFD CB for one Tx/cmd queue 248 * iwl4965_tx_queue_alloc - Alloc driver data and TFD CB for one Tx/cmd queue
249 */ 249 */
250static int iwl4965_tx_queue_alloc(struct iwl4965_priv *priv, 250static int iwl4965_tx_queue_alloc(struct iwl_priv *priv,
251 struct iwl4965_tx_queue *txq, u32 id) 251 struct iwl4965_tx_queue *txq, u32 id)
252{ 252{
253 struct pci_dev *dev = priv->pci_dev; 253 struct pci_dev *dev = priv->pci_dev;
@@ -292,7 +292,7 @@ static int iwl4965_tx_queue_alloc(struct iwl4965_priv *priv,
292/** 292/**
293 * iwl4965_tx_queue_init - Allocate and initialize one tx/cmd queue 293 * iwl4965_tx_queue_init - Allocate and initialize one tx/cmd queue
294 */ 294 */
295int iwl4965_tx_queue_init(struct iwl4965_priv *priv, 295int iwl4965_tx_queue_init(struct iwl_priv *priv,
296 struct iwl4965_tx_queue *txq, int slots_num, u32 txq_id) 296 struct iwl4965_tx_queue *txq, int slots_num, u32 txq_id)
297{ 297{
298 struct pci_dev *dev = priv->pci_dev; 298 struct pci_dev *dev = priv->pci_dev;
@@ -344,7 +344,7 @@ int iwl4965_tx_queue_init(struct iwl4965_priv *priv,
344 * Free all buffers. 344 * Free all buffers.
345 * 0-fill, but do not free "txq" descriptor structure. 345 * 0-fill, but do not free "txq" descriptor structure.
346 */ 346 */
347void iwl4965_tx_queue_free(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq) 347void iwl4965_tx_queue_free(struct iwl_priv *priv, struct iwl4965_tx_queue *txq)
348{ 348{
349 struct iwl4965_queue *q = &txq->q; 349 struct iwl4965_queue *q = &txq->q;
350 struct pci_dev *dev = priv->pci_dev; 350 struct pci_dev *dev = priv->pci_dev;
@@ -395,7 +395,7 @@ const u8 iwl4965_broadcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
395 * 395 *
396 * NOTE: This does not remove station from device's station table. 396 * NOTE: This does not remove station from device's station table.
397 */ 397 */
398static u8 iwl4965_remove_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap) 398static u8 iwl4965_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
399{ 399{
400 int index = IWL_INVALID_STATION; 400 int index = IWL_INVALID_STATION;
401 int i; 401 int i;
@@ -437,7 +437,7 @@ out:
437 * 437 *
438 * NOTE: This does not clear or otherwise alter the device's station table. 438 * NOTE: This does not clear or otherwise alter the device's station table.
439 */ 439 */
440static void iwl4965_clear_stations_table(struct iwl4965_priv *priv) 440static void iwl4965_clear_stations_table(struct iwl_priv *priv)
441{ 441{
442 unsigned long flags; 442 unsigned long flags;
443 443
@@ -452,7 +452,7 @@ static void iwl4965_clear_stations_table(struct iwl4965_priv *priv)
452/** 452/**
453 * iwl4965_add_station_flags - Add station to tables in driver and device 453 * iwl4965_add_station_flags - Add station to tables in driver and device
454 */ 454 */
455u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr, 455u8 iwl4965_add_station_flags(struct iwl_priv *priv, const u8 *addr,
456 int is_ap, u8 flags, void *ht_data) 456 int is_ap, u8 flags, void *ht_data)
457{ 457{
458 int i; 458 int i;
@@ -524,7 +524,7 @@ u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr,
524 524
525/*************** DRIVER STATUS FUNCTIONS *****/ 525/*************** DRIVER STATUS FUNCTIONS *****/
526 526
527static inline int iwl4965_is_ready(struct iwl4965_priv *priv) 527static inline int iwl4965_is_ready(struct iwl_priv *priv)
528{ 528{
529 /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are 529 /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are
530 * set but EXIT_PENDING is not */ 530 * set but EXIT_PENDING is not */
@@ -533,23 +533,23 @@ static inline int iwl4965_is_ready(struct iwl4965_priv *priv)
533 !test_bit(STATUS_EXIT_PENDING, &priv->status); 533 !test_bit(STATUS_EXIT_PENDING, &priv->status);
534} 534}
535 535
536static inline int iwl4965_is_alive(struct iwl4965_priv *priv) 536static inline int iwl4965_is_alive(struct iwl_priv *priv)
537{ 537{
538 return test_bit(STATUS_ALIVE, &priv->status); 538 return test_bit(STATUS_ALIVE, &priv->status);
539} 539}
540 540
541static inline int iwl4965_is_init(struct iwl4965_priv *priv) 541static inline int iwl4965_is_init(struct iwl_priv *priv)
542{ 542{
543 return test_bit(STATUS_INIT, &priv->status); 543 return test_bit(STATUS_INIT, &priv->status);
544} 544}
545 545
546static inline int iwl4965_is_rfkill(struct iwl4965_priv *priv) 546static inline int iwl4965_is_rfkill(struct iwl_priv *priv)
547{ 547{
548 return test_bit(STATUS_RF_KILL_HW, &priv->status) || 548 return test_bit(STATUS_RF_KILL_HW, &priv->status) ||
549 test_bit(STATUS_RF_KILL_SW, &priv->status); 549 test_bit(STATUS_RF_KILL_SW, &priv->status);
550} 550}
551 551
552static inline int iwl4965_is_ready_rf(struct iwl4965_priv *priv) 552static inline int iwl4965_is_ready_rf(struct iwl_priv *priv)
553{ 553{
554 554
555 if (iwl4965_is_rfkill(priv)) 555 if (iwl4965_is_rfkill(priv))
@@ -628,7 +628,7 @@ static const char *get_cmd_string(u8 cmd)
628 * failed. On success, it turns the index (> 0) of command in the 628 * failed. On success, it turns the index (> 0) of command in the
629 * command queue. 629 * command queue.
630 */ 630 */
631static int iwl4965_enqueue_hcmd(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd) 631static int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl4965_host_cmd *cmd)
632{ 632{
633 struct iwl4965_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM]; 633 struct iwl4965_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM];
634 struct iwl4965_queue *q = &txq->q; 634 struct iwl4965_queue *q = &txq->q;
@@ -703,7 +703,7 @@ static int iwl4965_enqueue_hcmd(struct iwl4965_priv *priv, struct iwl4965_host_c
703 return ret ? ret : idx; 703 return ret ? ret : idx;
704} 704}
705 705
706static int iwl4965_send_cmd_async(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd) 706static int iwl4965_send_cmd_async(struct iwl_priv *priv, struct iwl4965_host_cmd *cmd)
707{ 707{
708 int ret; 708 int ret;
709 709
@@ -727,7 +727,7 @@ static int iwl4965_send_cmd_async(struct iwl4965_priv *priv, struct iwl4965_host
727 return 0; 727 return 0;
728} 728}
729 729
730static int iwl4965_send_cmd_sync(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd) 730static int iwl4965_send_cmd_sync(struct iwl_priv *priv, struct iwl4965_host_cmd *cmd)
731{ 731{
732 int cmd_idx; 732 int cmd_idx;
733 int ret; 733 int ret;
@@ -815,7 +815,7 @@ out:
815 return ret; 815 return ret;
816} 816}
817 817
818int iwl4965_send_cmd(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd) 818int iwl4965_send_cmd(struct iwl_priv *priv, struct iwl4965_host_cmd *cmd)
819{ 819{
820 if (cmd->meta.flags & CMD_ASYNC) 820 if (cmd->meta.flags & CMD_ASYNC)
821 return iwl4965_send_cmd_async(priv, cmd); 821 return iwl4965_send_cmd_async(priv, cmd);
@@ -823,7 +823,7 @@ int iwl4965_send_cmd(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd)
823 return iwl4965_send_cmd_sync(priv, cmd); 823 return iwl4965_send_cmd_sync(priv, cmd);
824} 824}
825 825
826int iwl4965_send_cmd_pdu(struct iwl4965_priv *priv, u8 id, u16 len, const void *data) 826int iwl4965_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len, const void *data)
827{ 827{
828 struct iwl4965_host_cmd cmd = { 828 struct iwl4965_host_cmd cmd = {
829 .id = id, 829 .id = id,
@@ -834,7 +834,7 @@ int iwl4965_send_cmd_pdu(struct iwl4965_priv *priv, u8 id, u16 len, const void *
834 return iwl4965_send_cmd_sync(priv, &cmd); 834 return iwl4965_send_cmd_sync(priv, &cmd);
835} 835}
836 836
837static int __must_check iwl4965_send_cmd_u32(struct iwl4965_priv *priv, u8 id, u32 val) 837static int __must_check iwl4965_send_cmd_u32(struct iwl_priv *priv, u8 id, u32 val)
838{ 838{
839 struct iwl4965_host_cmd cmd = { 839 struct iwl4965_host_cmd cmd = {
840 .id = id, 840 .id = id,
@@ -845,7 +845,7 @@ static int __must_check iwl4965_send_cmd_u32(struct iwl4965_priv *priv, u8 id, u
845 return iwl4965_send_cmd_sync(priv, &cmd); 845 return iwl4965_send_cmd_sync(priv, &cmd);
846} 846}
847 847
848int iwl4965_send_statistics_request(struct iwl4965_priv *priv) 848int iwl4965_send_statistics_request(struct iwl_priv *priv)
849{ 849{
850 return iwl4965_send_cmd_u32(priv, REPLY_STATISTICS_CMD, 0); 850 return iwl4965_send_cmd_u32(priv, REPLY_STATISTICS_CMD, 0);
851} 851}
@@ -856,7 +856,7 @@ int iwl4965_send_statistics_request(struct iwl4965_priv *priv)
856 * there is only one AP station with id= IWL_AP_ID 856 * there is only one AP station with id= IWL_AP_ID
857 * NOTE: mutex must be held before calling this fnction 857 * NOTE: mutex must be held before calling this fnction
858 */ 858 */
859static int iwl4965_rxon_add_station(struct iwl4965_priv *priv, 859static int iwl4965_rxon_add_station(struct iwl_priv *priv,
860 const u8 *addr, int is_ap) 860 const u8 *addr, int is_ap)
861{ 861{
862 u8 sta_id; 862 u8 sta_id;
@@ -892,7 +892,7 @@ static int iwl4965_rxon_add_station(struct iwl4965_priv *priv,
892 * NOTE: Does not commit to the hardware; it sets appropriate bit fields 892 * NOTE: Does not commit to the hardware; it sets appropriate bit fields
893 * in the staging RXON flag structure based on the phymode 893 * in the staging RXON flag structure based on the phymode
894 */ 894 */
895static int iwl4965_set_rxon_channel(struct iwl4965_priv *priv, 895static int iwl4965_set_rxon_channel(struct iwl_priv *priv,
896 enum ieee80211_band band, 896 enum ieee80211_band band,
897 u16 channel) 897 u16 channel)
898{ 898{
@@ -1000,7 +1000,7 @@ static int iwl4965_check_rxon_cmd(struct iwl4965_rxon_cmd *rxon)
1000 * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that 1000 * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that
1001 * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required. 1001 * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required.
1002 */ 1002 */
1003static int iwl4965_full_rxon_required(struct iwl4965_priv *priv) 1003static int iwl4965_full_rxon_required(struct iwl_priv *priv)
1004{ 1004{
1005 1005
1006 /* These items are only settable from the full RXON command */ 1006 /* These items are only settable from the full RXON command */
@@ -1040,7 +1040,7 @@ static int iwl4965_full_rxon_required(struct iwl4965_priv *priv)
1040 return 0; 1040 return 0;
1041} 1041}
1042 1042
1043static int iwl4965_send_rxon_assoc(struct iwl4965_priv *priv) 1043static int iwl4965_send_rxon_assoc(struct iwl_priv *priv)
1044{ 1044{
1045 int rc = 0; 1045 int rc = 0;
1046 struct iwl4965_rx_packet *res = NULL; 1046 struct iwl4965_rx_packet *res = NULL;
@@ -1102,7 +1102,7 @@ static int iwl4965_send_rxon_assoc(struct iwl4965_priv *priv)
1102 * function correctly transitions out of the RXON_ASSOC_MSK state if 1102 * function correctly transitions out of the RXON_ASSOC_MSK state if
1103 * a HW tune is required based on the RXON structure changes. 1103 * a HW tune is required based on the RXON structure changes.
1104 */ 1104 */
1105static int iwl4965_commit_rxon(struct iwl4965_priv *priv) 1105static int iwl4965_commit_rxon(struct iwl_priv *priv)
1106{ 1106{
1107 /* cast away the const for active_rxon in this function */ 1107 /* cast away the const for active_rxon in this function */
1108 struct iwl4965_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 1108 struct iwl4965_rxon_cmd *active_rxon = (void *)&priv->active_rxon;
@@ -1230,7 +1230,7 @@ static int iwl4965_commit_rxon(struct iwl4965_priv *priv)
1230 return 0; 1230 return 0;
1231} 1231}
1232 1232
1233static int iwl4965_send_bt_config(struct iwl4965_priv *priv) 1233static int iwl4965_send_bt_config(struct iwl_priv *priv)
1234{ 1234{
1235 struct iwl4965_bt_cmd bt_cmd = { 1235 struct iwl4965_bt_cmd bt_cmd = {
1236 .flags = 3, 1236 .flags = 3,
@@ -1244,7 +1244,7 @@ static int iwl4965_send_bt_config(struct iwl4965_priv *priv)
1244 sizeof(struct iwl4965_bt_cmd), &bt_cmd); 1244 sizeof(struct iwl4965_bt_cmd), &bt_cmd);
1245} 1245}
1246 1246
1247static int iwl4965_send_scan_abort(struct iwl4965_priv *priv) 1247static int iwl4965_send_scan_abort(struct iwl_priv *priv)
1248{ 1248{
1249 int rc = 0; 1249 int rc = 0;
1250 struct iwl4965_rx_packet *res; 1250 struct iwl4965_rx_packet *res;
@@ -1285,7 +1285,7 @@ static int iwl4965_send_scan_abort(struct iwl4965_priv *priv)
1285 return rc; 1285 return rc;
1286} 1286}
1287 1287
1288static int iwl4965_card_state_sync_callback(struct iwl4965_priv *priv, 1288static int iwl4965_card_state_sync_callback(struct iwl_priv *priv,
1289 struct iwl4965_cmd *cmd, 1289 struct iwl4965_cmd *cmd,
1290 struct sk_buff *skb) 1290 struct sk_buff *skb)
1291{ 1291{
@@ -1302,7 +1302,7 @@ static int iwl4965_card_state_sync_callback(struct iwl4965_priv *priv,
1302 * When in the 'halt' state, the card is shut down and must be fully 1302 * When in the 'halt' state, the card is shut down and must be fully
1303 * restarted to come back on. 1303 * restarted to come back on.
1304 */ 1304 */
1305static int iwl4965_send_card_state(struct iwl4965_priv *priv, u32 flags, u8 meta_flag) 1305static int iwl4965_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)
1306{ 1306{
1307 struct iwl4965_host_cmd cmd = { 1307 struct iwl4965_host_cmd cmd = {
1308 .id = REPLY_CARD_STATE_CMD, 1308 .id = REPLY_CARD_STATE_CMD,
@@ -1317,7 +1317,7 @@ static int iwl4965_send_card_state(struct iwl4965_priv *priv, u32 flags, u8 meta
1317 return iwl4965_send_cmd(priv, &cmd); 1317 return iwl4965_send_cmd(priv, &cmd);
1318} 1318}
1319 1319
1320static int iwl4965_add_sta_sync_callback(struct iwl4965_priv *priv, 1320static int iwl4965_add_sta_sync_callback(struct iwl_priv *priv,
1321 struct iwl4965_cmd *cmd, struct sk_buff *skb) 1321 struct iwl4965_cmd *cmd, struct sk_buff *skb)
1322{ 1322{
1323 struct iwl4965_rx_packet *res = NULL; 1323 struct iwl4965_rx_packet *res = NULL;
@@ -1345,7 +1345,7 @@ static int iwl4965_add_sta_sync_callback(struct iwl4965_priv *priv,
1345 return 1; 1345 return 1;
1346} 1346}
1347 1347
1348int iwl4965_send_add_station(struct iwl4965_priv *priv, 1348int iwl4965_send_add_station(struct iwl_priv *priv,
1349 struct iwl4965_addsta_cmd *sta, u8 flags) 1349 struct iwl4965_addsta_cmd *sta, u8 flags)
1350{ 1350{
1351 struct iwl4965_rx_packet *res = NULL; 1351 struct iwl4965_rx_packet *res = NULL;
@@ -1392,7 +1392,7 @@ int iwl4965_send_add_station(struct iwl4965_priv *priv,
1392 return rc; 1392 return rc;
1393} 1393}
1394 1394
1395static int iwl4965_update_sta_key_info(struct iwl4965_priv *priv, 1395static int iwl4965_update_sta_key_info(struct iwl_priv *priv,
1396 struct ieee80211_key_conf *keyconf, 1396 struct ieee80211_key_conf *keyconf,
1397 u8 sta_id) 1397 u8 sta_id)
1398{ 1398{
@@ -1430,7 +1430,7 @@ static int iwl4965_update_sta_key_info(struct iwl4965_priv *priv,
1430 return 0; 1430 return 0;
1431} 1431}
1432 1432
1433static int iwl4965_clear_sta_key_info(struct iwl4965_priv *priv, u8 sta_id) 1433static int iwl4965_clear_sta_key_info(struct iwl_priv *priv, u8 sta_id)
1434{ 1434{
1435 unsigned long flags; 1435 unsigned long flags;
1436 1436
@@ -1447,7 +1447,7 @@ static int iwl4965_clear_sta_key_info(struct iwl4965_priv *priv, u8 sta_id)
1447 return 0; 1447 return 0;
1448} 1448}
1449 1449
1450static void iwl4965_clear_free_frames(struct iwl4965_priv *priv) 1450static void iwl4965_clear_free_frames(struct iwl_priv *priv)
1451{ 1451{
1452 struct list_head *element; 1452 struct list_head *element;
1453 1453
@@ -1468,7 +1468,7 @@ static void iwl4965_clear_free_frames(struct iwl4965_priv *priv)
1468 } 1468 }
1469} 1469}
1470 1470
1471static struct iwl4965_frame *iwl4965_get_free_frame(struct iwl4965_priv *priv) 1471static struct iwl4965_frame *iwl4965_get_free_frame(struct iwl_priv *priv)
1472{ 1472{
1473 struct iwl4965_frame *frame; 1473 struct iwl4965_frame *frame;
1474 struct list_head *element; 1474 struct list_head *element;
@@ -1488,13 +1488,13 @@ static struct iwl4965_frame *iwl4965_get_free_frame(struct iwl4965_priv *priv)
1488 return list_entry(element, struct iwl4965_frame, list); 1488 return list_entry(element, struct iwl4965_frame, list);
1489} 1489}
1490 1490
1491static void iwl4965_free_frame(struct iwl4965_priv *priv, struct iwl4965_frame *frame) 1491static void iwl4965_free_frame(struct iwl_priv *priv, struct iwl4965_frame *frame)
1492{ 1492{
1493 memset(frame, 0, sizeof(*frame)); 1493 memset(frame, 0, sizeof(*frame));
1494 list_add(&frame->list, &priv->free_frames); 1494 list_add(&frame->list, &priv->free_frames);
1495} 1495}
1496 1496
1497unsigned int iwl4965_fill_beacon_frame(struct iwl4965_priv *priv, 1497unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
1498 struct ieee80211_hdr *hdr, 1498 struct ieee80211_hdr *hdr,
1499 const u8 *dest, int left) 1499 const u8 *dest, int left)
1500{ 1500{
@@ -1525,7 +1525,7 @@ static u8 iwl4965_rate_get_lowest_plcp(int rate_mask)
1525 return IWL_RATE_INVALID; 1525 return IWL_RATE_INVALID;
1526} 1526}
1527 1527
1528static int iwl4965_send_beacon_cmd(struct iwl4965_priv *priv) 1528static int iwl4965_send_beacon_cmd(struct iwl_priv *priv)
1529{ 1529{
1530 struct iwl4965_frame *frame; 1530 struct iwl4965_frame *frame;
1531 unsigned int frame_size; 1531 unsigned int frame_size;
@@ -1567,7 +1567,7 @@ static int iwl4965_send_beacon_cmd(struct iwl4965_priv *priv)
1567 * 1567 *
1568 ******************************************************************************/ 1568 ******************************************************************************/
1569 1569
1570static void iwl4965_unset_hw_setting(struct iwl4965_priv *priv) 1570static void iwl4965_unset_hw_setting(struct iwl_priv *priv)
1571{ 1571{
1572 if (priv->hw_setting.shared_virt) 1572 if (priv->hw_setting.shared_virt)
1573 pci_free_consistent(priv->pci_dev, 1573 pci_free_consistent(priv->pci_dev,
@@ -1608,7 +1608,7 @@ static u16 iwl4965_supported_rate_to_ie(u8 *ie, u16 supported_rate,
1608/** 1608/**
1609 * iwl4965_fill_probe_req - fill in all required fields and IE for probe request 1609 * iwl4965_fill_probe_req - fill in all required fields and IE for probe request
1610 */ 1610 */
1611static u16 iwl4965_fill_probe_req(struct iwl4965_priv *priv, 1611static u16 iwl4965_fill_probe_req(struct iwl_priv *priv,
1612 enum ieee80211_band band, 1612 enum ieee80211_band band,
1613 struct ieee80211_mgmt *frame, 1613 struct ieee80211_mgmt *frame,
1614 int left, int is_direct) 1614 int left, int is_direct)
@@ -1726,7 +1726,7 @@ static u16 iwl4965_fill_probe_req(struct iwl4965_priv *priv,
1726/* 1726/*
1727 * QoS support 1727 * QoS support
1728*/ 1728*/
1729static int iwl4965_send_qos_params_command(struct iwl4965_priv *priv, 1729static int iwl4965_send_qos_params_command(struct iwl_priv *priv,
1730 struct iwl4965_qosparam_cmd *qos) 1730 struct iwl4965_qosparam_cmd *qos)
1731{ 1731{
1732 1732
@@ -1734,7 +1734,7 @@ static int iwl4965_send_qos_params_command(struct iwl4965_priv *priv,
1734 sizeof(struct iwl4965_qosparam_cmd), qos); 1734 sizeof(struct iwl4965_qosparam_cmd), qos);
1735} 1735}
1736 1736
1737static void iwl4965_reset_qos(struct iwl4965_priv *priv) 1737static void iwl4965_reset_qos(struct iwl_priv *priv)
1738{ 1738{
1739 u16 cw_min = 15; 1739 u16 cw_min = 15;
1740 u16 cw_max = 1023; 1740 u16 cw_max = 1023;
@@ -1821,7 +1821,7 @@ static void iwl4965_reset_qos(struct iwl4965_priv *priv)
1821 spin_unlock_irqrestore(&priv->lock, flags); 1821 spin_unlock_irqrestore(&priv->lock, flags);
1822} 1822}
1823 1823
1824static void iwl4965_activate_qos(struct iwl4965_priv *priv, u8 force) 1824static void iwl4965_activate_qos(struct iwl_priv *priv, u8 force)
1825{ 1825{
1826 unsigned long flags; 1826 unsigned long flags;
1827 1827
@@ -1899,7 +1899,7 @@ static struct iwl4965_power_vec_entry range_1[IWL_POWER_AC] = {
1899 SLP_VEC(4, 7, 10, 10, 0xFF)}, 0} 1899 SLP_VEC(4, 7, 10, 10, 0xFF)}, 0}
1900}; 1900};
1901 1901
1902int iwl4965_power_init_handle(struct iwl4965_priv *priv) 1902int iwl4965_power_init_handle(struct iwl_priv *priv)
1903{ 1903{
1904 int rc = 0, i; 1904 int rc = 0, i;
1905 struct iwl4965_power_mgr *pow_data; 1905 struct iwl4965_power_mgr *pow_data;
@@ -1938,7 +1938,7 @@ int iwl4965_power_init_handle(struct iwl4965_priv *priv)
1938 return rc; 1938 return rc;
1939} 1939}
1940 1940
1941static int iwl4965_update_power_cmd(struct iwl4965_priv *priv, 1941static int iwl4965_update_power_cmd(struct iwl_priv *priv,
1942 struct iwl4965_powertable_cmd *cmd, u32 mode) 1942 struct iwl4965_powertable_cmd *cmd, u32 mode)
1943{ 1943{
1944 int rc = 0, i; 1944 int rc = 0, i;
@@ -2002,7 +2002,7 @@ static int iwl4965_update_power_cmd(struct iwl4965_priv *priv,
2002 return rc; 2002 return rc;
2003} 2003}
2004 2004
2005static int iwl4965_send_power_mode(struct iwl4965_priv *priv, u32 mode) 2005static int iwl4965_send_power_mode(struct iwl_priv *priv, u32 mode)
2006{ 2006{
2007 u32 uninitialized_var(final_mode); 2007 u32 uninitialized_var(final_mode);
2008 int rc; 2008 int rc;
@@ -2037,7 +2037,7 @@ static int iwl4965_send_power_mode(struct iwl4965_priv *priv, u32 mode)
2037 return rc; 2037 return rc;
2038} 2038}
2039 2039
2040int iwl4965_is_network_packet(struct iwl4965_priv *priv, struct ieee80211_hdr *header) 2040int iwl4965_is_network_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)
2041{ 2041{
2042 /* Filter incoming packets to determine if they are targeted toward 2042 /* Filter incoming packets to determine if they are targeted toward
2043 * this network, discarding packets coming from ourselves */ 2043 * this network, discarding packets coming from ourselves */
@@ -2098,7 +2098,7 @@ static const char *iwl4965_get_tx_fail_reason(u32 status)
2098 * 2098 *
2099 * NOTE: priv->mutex is not required before calling this function 2099 * NOTE: priv->mutex is not required before calling this function
2100 */ 2100 */
2101static int iwl4965_scan_cancel(struct iwl4965_priv *priv) 2101static int iwl4965_scan_cancel(struct iwl_priv *priv)
2102{ 2102{
2103 if (!test_bit(STATUS_SCAN_HW, &priv->status)) { 2103 if (!test_bit(STATUS_SCAN_HW, &priv->status)) {
2104 clear_bit(STATUS_SCANNING, &priv->status); 2104 clear_bit(STATUS_SCANNING, &priv->status);
@@ -2126,7 +2126,7 @@ static int iwl4965_scan_cancel(struct iwl4965_priv *priv)
2126 * 2126 *
2127 * NOTE: priv->mutex must be held before calling this function 2127 * NOTE: priv->mutex must be held before calling this function
2128 */ 2128 */
2129static int iwl4965_scan_cancel_timeout(struct iwl4965_priv *priv, unsigned long ms) 2129static int iwl4965_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms)
2130{ 2130{
2131 unsigned long now = jiffies; 2131 unsigned long now = jiffies;
2132 int ret; 2132 int ret;
@@ -2145,7 +2145,7 @@ static int iwl4965_scan_cancel_timeout(struct iwl4965_priv *priv, unsigned long
2145 return ret; 2145 return ret;
2146} 2146}
2147 2147
2148static void iwl4965_sequence_reset(struct iwl4965_priv *priv) 2148static void iwl4965_sequence_reset(struct iwl_priv *priv)
2149{ 2149{
2150 /* Reset ieee stats */ 2150 /* Reset ieee stats */
2151 2151
@@ -2175,7 +2175,7 @@ static __le16 iwl4965_adjust_beacon_interval(u16 beacon_val)
2175 return cpu_to_le16(new_val); 2175 return cpu_to_le16(new_val);
2176} 2176}
2177 2177
2178static void iwl4965_setup_rxon_timing(struct iwl4965_priv *priv) 2178static void iwl4965_setup_rxon_timing(struct iwl_priv *priv)
2179{ 2179{
2180 u64 interval_tm_unit; 2180 u64 interval_tm_unit;
2181 u64 tsf, result; 2181 u64 tsf, result;
@@ -2231,7 +2231,7 @@ static void iwl4965_setup_rxon_timing(struct iwl4965_priv *priv)
2231 le16_to_cpu(priv->rxon_timing.atim_window)); 2231 le16_to_cpu(priv->rxon_timing.atim_window));
2232} 2232}
2233 2233
2234static int iwl4965_scan_initiate(struct iwl4965_priv *priv) 2234static int iwl4965_scan_initiate(struct iwl_priv *priv)
2235{ 2235{
2236 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 2236 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
2237 IWL_ERROR("APs don't scan.\n"); 2237 IWL_ERROR("APs don't scan.\n");
@@ -2265,7 +2265,7 @@ static int iwl4965_scan_initiate(struct iwl4965_priv *priv)
2265 return 0; 2265 return 0;
2266} 2266}
2267 2267
2268static int iwl4965_set_rxon_hwcrypto(struct iwl4965_priv *priv, int hw_decrypt) 2268static int iwl4965_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt)
2269{ 2269{
2270 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon; 2270 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon;
2271 2271
@@ -2277,7 +2277,7 @@ static int iwl4965_set_rxon_hwcrypto(struct iwl4965_priv *priv, int hw_decrypt)
2277 return 0; 2277 return 0;
2278} 2278}
2279 2279
2280static void iwl4965_set_flags_for_phymode(struct iwl4965_priv *priv, 2280static void iwl4965_set_flags_for_phymode(struct iwl_priv *priv,
2281 enum ieee80211_band band) 2281 enum ieee80211_band band)
2282{ 2282{
2283 if (band == IEEE80211_BAND_5GHZ) { 2283 if (band == IEEE80211_BAND_5GHZ) {
@@ -2304,7 +2304,7 @@ static void iwl4965_set_flags_for_phymode(struct iwl4965_priv *priv,
2304/* 2304/*
2305 * initialize rxon structure with default values from eeprom 2305 * initialize rxon structure with default values from eeprom
2306 */ 2306 */
2307static void iwl4965_connection_init_rx_config(struct iwl4965_priv *priv) 2307static void iwl4965_connection_init_rx_config(struct iwl_priv *priv)
2308{ 2308{
2309 const struct iwl4965_channel_info *ch_info; 2309 const struct iwl4965_channel_info *ch_info;
2310 2310
@@ -2376,7 +2376,7 @@ static void iwl4965_connection_init_rx_config(struct iwl4965_priv *priv)
2376 iwl4965_set_rxon_chain(priv); 2376 iwl4965_set_rxon_chain(priv);
2377} 2377}
2378 2378
2379static int iwl4965_set_mode(struct iwl4965_priv *priv, int mode) 2379static int iwl4965_set_mode(struct iwl_priv *priv, int mode)
2380{ 2380{
2381 if (mode == IEEE80211_IF_TYPE_IBSS) { 2381 if (mode == IEEE80211_IF_TYPE_IBSS) {
2382 const struct iwl4965_channel_info *ch_info; 2382 const struct iwl4965_channel_info *ch_info;
@@ -2415,7 +2415,7 @@ static int iwl4965_set_mode(struct iwl4965_priv *priv, int mode)
2415 return 0; 2415 return 0;
2416} 2416}
2417 2417
2418static void iwl4965_build_tx_cmd_hwcrypto(struct iwl4965_priv *priv, 2418static void iwl4965_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
2419 struct ieee80211_tx_control *ctl, 2419 struct ieee80211_tx_control *ctl,
2420 struct iwl4965_cmd *cmd, 2420 struct iwl4965_cmd *cmd,
2421 struct sk_buff *skb_frag, 2421 struct sk_buff *skb_frag,
@@ -2466,7 +2466,7 @@ static void iwl4965_build_tx_cmd_hwcrypto(struct iwl4965_priv *priv,
2466/* 2466/*
2467 * handle build REPLY_TX command notification. 2467 * handle build REPLY_TX command notification.
2468 */ 2468 */
2469static void iwl4965_build_tx_cmd_basic(struct iwl4965_priv *priv, 2469static void iwl4965_build_tx_cmd_basic(struct iwl_priv *priv,
2470 struct iwl4965_cmd *cmd, 2470 struct iwl4965_cmd *cmd,
2471 struct ieee80211_tx_control *ctrl, 2471 struct ieee80211_tx_control *ctrl,
2472 struct ieee80211_hdr *hdr, 2472 struct ieee80211_hdr *hdr,
@@ -2535,7 +2535,7 @@ static void iwl4965_build_tx_cmd_basic(struct iwl4965_priv *priv,
2535 * 2535 *
2536 * If new IBSS station, create new entry in station table 2536 * If new IBSS station, create new entry in station table
2537 */ 2537 */
2538static int iwl4965_get_sta_id(struct iwl4965_priv *priv, 2538static int iwl4965_get_sta_id(struct iwl_priv *priv,
2539 struct ieee80211_hdr *hdr) 2539 struct ieee80211_hdr *hdr)
2540{ 2540{
2541 int sta_id; 2541 int sta_id;
@@ -2590,7 +2590,7 @@ static int iwl4965_get_sta_id(struct iwl4965_priv *priv,
2590/* 2590/*
2591 * start REPLY_TX command process 2591 * start REPLY_TX command process
2592 */ 2592 */
2593static int iwl4965_tx_skb(struct iwl4965_priv *priv, 2593static int iwl4965_tx_skb(struct iwl_priv *priv,
2594 struct sk_buff *skb, struct ieee80211_tx_control *ctl) 2594 struct sk_buff *skb, struct ieee80211_tx_control *ctl)
2595{ 2595{
2596 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 2596 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -2829,7 +2829,7 @@ drop:
2829 return -1; 2829 return -1;
2830} 2830}
2831 2831
2832static void iwl4965_set_rate(struct iwl4965_priv *priv) 2832static void iwl4965_set_rate(struct iwl_priv *priv)
2833{ 2833{
2834 const struct ieee80211_supported_band *hw = NULL; 2834 const struct ieee80211_supported_band *hw = NULL;
2835 struct ieee80211_rate *rate; 2835 struct ieee80211_rate *rate;
@@ -2876,7 +2876,7 @@ static void iwl4965_set_rate(struct iwl4965_priv *priv)
2876 (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF; 2876 (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
2877} 2877}
2878 2878
2879static void iwl4965_radio_kill_sw(struct iwl4965_priv *priv, int disable_radio) 2879static void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
2880{ 2880{
2881 unsigned long flags; 2881 unsigned long flags;
2882 2882
@@ -2925,7 +2925,7 @@ static void iwl4965_radio_kill_sw(struct iwl4965_priv *priv, int disable_radio)
2925 return; 2925 return;
2926} 2926}
2927 2927
2928void iwl4965_set_decrypted_flag(struct iwl4965_priv *priv, struct sk_buff *skb, 2928void iwl4965_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb,
2929 u32 decrypt_res, struct ieee80211_rx_status *stats) 2929 u32 decrypt_res, struct ieee80211_rx_status *stats)
2930{ 2930{
2931 u16 fc = 2931 u16 fc =
@@ -2960,7 +2960,7 @@ void iwl4965_set_decrypted_flag(struct iwl4965_priv *priv, struct sk_buff *skb,
2960 2960
2961#define IWL_PACKET_RETRY_TIME HZ 2961#define IWL_PACKET_RETRY_TIME HZ
2962 2962
2963int iwl4965_is_duplicate_packet(struct iwl4965_priv *priv, struct ieee80211_hdr *header) 2963int iwl4965_is_duplicate_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)
2964{ 2964{
2965 u16 sc = le16_to_cpu(header->seq_ctrl); 2965 u16 sc = le16_to_cpu(header->seq_ctrl);
2966 u16 seq = (sc & IEEE80211_SCTL_SEQ) >> 4; 2966 u16 seq = (sc & IEEE80211_SCTL_SEQ) >> 4;
@@ -3077,7 +3077,7 @@ static __le32 iwl4965_add_beacon_time(u32 base, u32 addon, u32 beacon_interval)
3077 return cpu_to_le32(res); 3077 return cpu_to_le32(res);
3078} 3078}
3079 3079
3080static int iwl4965_get_measurement(struct iwl4965_priv *priv, 3080static int iwl4965_get_measurement(struct iwl_priv *priv,
3081 struct ieee80211_measurement_params *params, 3081 struct ieee80211_measurement_params *params,
3082 u8 type) 3082 u8 type)
3083{ 3083{
@@ -3157,7 +3157,7 @@ static int iwl4965_get_measurement(struct iwl4965_priv *priv,
3157} 3157}
3158#endif 3158#endif
3159 3159
3160static void iwl4965_txstatus_to_ieee(struct iwl4965_priv *priv, 3160static void iwl4965_txstatus_to_ieee(struct iwl_priv *priv,
3161 struct iwl4965_tx_info *tx_sta) 3161 struct iwl4965_tx_info *tx_sta)
3162{ 3162{
3163 3163
@@ -3183,7 +3183,7 @@ static void iwl4965_txstatus_to_ieee(struct iwl4965_priv *priv,
3183 * need to be reclaimed. As result, some free space forms. If there is 3183 * need to be reclaimed. As result, some free space forms. If there is
3184 * enough free space (> low mark), wake the stack that feeds us. 3184 * enough free space (> low mark), wake the stack that feeds us.
3185 */ 3185 */
3186int iwl4965_tx_queue_reclaim(struct iwl4965_priv *priv, int txq_id, int index) 3186int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
3187{ 3187{
3188 struct iwl4965_tx_queue *txq = &priv->txq[txq_id]; 3188 struct iwl4965_tx_queue *txq = &priv->txq[txq_id];
3189 struct iwl4965_queue *q = &txq->q; 3189 struct iwl4965_queue *q = &txq->q;
@@ -3234,7 +3234,7 @@ static int iwl4965_is_tx_success(u32 status)
3234 ******************************************************************************/ 3234 ******************************************************************************/
3235#ifdef CONFIG_IWL4965_HT 3235#ifdef CONFIG_IWL4965_HT
3236 3236
3237static inline int iwl4965_get_ra_sta_id(struct iwl4965_priv *priv, 3237static inline int iwl4965_get_ra_sta_id(struct iwl_priv *priv,
3238 struct ieee80211_hdr *hdr) 3238 struct ieee80211_hdr *hdr)
3239{ 3239{
3240 if (priv->iw_mode == IEEE80211_IF_TYPE_STA) 3240 if (priv->iw_mode == IEEE80211_IF_TYPE_STA)
@@ -3246,7 +3246,7 @@ static inline int iwl4965_get_ra_sta_id(struct iwl4965_priv *priv,
3246} 3246}
3247 3247
3248static struct ieee80211_hdr *iwl4965_tx_queue_get_hdr( 3248static struct ieee80211_hdr *iwl4965_tx_queue_get_hdr(
3249 struct iwl4965_priv *priv, int txq_id, int idx) 3249 struct iwl_priv *priv, int txq_id, int idx)
3250{ 3250{
3251 if (priv->txq[txq_id].txb[idx].skb[0]) 3251 if (priv->txq[txq_id].txb[idx].skb[0])
3252 return (struct ieee80211_hdr *)priv->txq[txq_id]. 3252 return (struct ieee80211_hdr *)priv->txq[txq_id].
@@ -3265,7 +3265,7 @@ static inline u32 iwl4965_get_scd_ssn(struct iwl4965_tx_resp *tx_resp)
3265/** 3265/**
3266 * iwl4965_tx_status_reply_tx - Handle Tx rspnse for frames in aggregation queue 3266 * iwl4965_tx_status_reply_tx - Handle Tx rspnse for frames in aggregation queue
3267 */ 3267 */
3268static int iwl4965_tx_status_reply_tx(struct iwl4965_priv *priv, 3268static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
3269 struct iwl4965_ht_agg *agg, 3269 struct iwl4965_ht_agg *agg,
3270 struct iwl4965_tx_resp_agg *tx_resp, 3270 struct iwl4965_tx_resp_agg *tx_resp,
3271 u16 start_idx) 3271 u16 start_idx)
@@ -3386,7 +3386,7 @@ static int iwl4965_tx_status_reply_tx(struct iwl4965_priv *priv,
3386/** 3386/**
3387 * iwl4965_rx_reply_tx - Handle standard (non-aggregation) Tx response 3387 * iwl4965_rx_reply_tx - Handle standard (non-aggregation) Tx response
3388 */ 3388 */
3389static void iwl4965_rx_reply_tx(struct iwl4965_priv *priv, 3389static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
3390 struct iwl4965_rx_mem_buffer *rxb) 3390 struct iwl4965_rx_mem_buffer *rxb)
3391{ 3391{
3392 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3392 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3497,7 +3497,7 @@ static void iwl4965_rx_reply_tx(struct iwl4965_priv *priv,
3497} 3497}
3498 3498
3499 3499
3500static void iwl4965_rx_reply_alive(struct iwl4965_priv *priv, 3500static void iwl4965_rx_reply_alive(struct iwl_priv *priv,
3501 struct iwl4965_rx_mem_buffer *rxb) 3501 struct iwl4965_rx_mem_buffer *rxb)
3502{ 3502{
3503 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3503 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3533,7 +3533,7 @@ static void iwl4965_rx_reply_alive(struct iwl4965_priv *priv,
3533 IWL_WARNING("uCode did not respond OK.\n"); 3533 IWL_WARNING("uCode did not respond OK.\n");
3534} 3534}
3535 3535
3536static void iwl4965_rx_reply_add_sta(struct iwl4965_priv *priv, 3536static void iwl4965_rx_reply_add_sta(struct iwl_priv *priv,
3537 struct iwl4965_rx_mem_buffer *rxb) 3537 struct iwl4965_rx_mem_buffer *rxb)
3538{ 3538{
3539 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3539 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3542,7 +3542,7 @@ static void iwl4965_rx_reply_add_sta(struct iwl4965_priv *priv,
3542 return; 3542 return;
3543} 3543}
3544 3544
3545static void iwl4965_rx_reply_error(struct iwl4965_priv *priv, 3545static void iwl4965_rx_reply_error(struct iwl_priv *priv,
3546 struct iwl4965_rx_mem_buffer *rxb) 3546 struct iwl4965_rx_mem_buffer *rxb)
3547{ 3547{
3548 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3548 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3558,7 +3558,7 @@ static void iwl4965_rx_reply_error(struct iwl4965_priv *priv,
3558 3558
3559#define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x 3559#define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x
3560 3560
3561static void iwl4965_rx_csa(struct iwl4965_priv *priv, struct iwl4965_rx_mem_buffer *rxb) 3561static void iwl4965_rx_csa(struct iwl_priv *priv, struct iwl4965_rx_mem_buffer *rxb)
3562{ 3562{
3563 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3563 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
3564 struct iwl4965_rxon_cmd *rxon = (void *)&priv->active_rxon; 3564 struct iwl4965_rxon_cmd *rxon = (void *)&priv->active_rxon;
@@ -3569,7 +3569,7 @@ static void iwl4965_rx_csa(struct iwl4965_priv *priv, struct iwl4965_rx_mem_buff
3569 priv->staging_rxon.channel = csa->channel; 3569 priv->staging_rxon.channel = csa->channel;
3570} 3570}
3571 3571
3572static void iwl4965_rx_spectrum_measure_notif(struct iwl4965_priv *priv, 3572static void iwl4965_rx_spectrum_measure_notif(struct iwl_priv *priv,
3573 struct iwl4965_rx_mem_buffer *rxb) 3573 struct iwl4965_rx_mem_buffer *rxb)
3574{ 3574{
3575#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT 3575#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
@@ -3587,7 +3587,7 @@ static void iwl4965_rx_spectrum_measure_notif(struct iwl4965_priv *priv,
3587#endif 3587#endif
3588} 3588}
3589 3589
3590static void iwl4965_rx_pm_sleep_notif(struct iwl4965_priv *priv, 3590static void iwl4965_rx_pm_sleep_notif(struct iwl_priv *priv,
3591 struct iwl4965_rx_mem_buffer *rxb) 3591 struct iwl4965_rx_mem_buffer *rxb)
3592{ 3592{
3593#ifdef CONFIG_IWLWIFI_DEBUG 3593#ifdef CONFIG_IWLWIFI_DEBUG
@@ -3598,7 +3598,7 @@ static void iwl4965_rx_pm_sleep_notif(struct iwl4965_priv *priv,
3598#endif 3598#endif
3599} 3599}
3600 3600
3601static void iwl4965_rx_pm_debug_statistics_notif(struct iwl4965_priv *priv, 3601static void iwl4965_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
3602 struct iwl4965_rx_mem_buffer *rxb) 3602 struct iwl4965_rx_mem_buffer *rxb)
3603{ 3603{
3604 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3604 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3610,8 +3610,8 @@ static void iwl4965_rx_pm_debug_statistics_notif(struct iwl4965_priv *priv,
3610 3610
3611static void iwl4965_bg_beacon_update(struct work_struct *work) 3611static void iwl4965_bg_beacon_update(struct work_struct *work)
3612{ 3612{
3613 struct iwl4965_priv *priv = 3613 struct iwl_priv *priv =
3614 container_of(work, struct iwl4965_priv, beacon_update); 3614 container_of(work, struct iwl_priv, beacon_update);
3615 struct sk_buff *beacon; 3615 struct sk_buff *beacon;
3616 3616
3617 /* Pull updated AP beacon from mac80211. will fail if not in AP mode */ 3617 /* Pull updated AP beacon from mac80211. will fail if not in AP mode */
@@ -3633,7 +3633,7 @@ static void iwl4965_bg_beacon_update(struct work_struct *work)
3633 iwl4965_send_beacon_cmd(priv); 3633 iwl4965_send_beacon_cmd(priv);
3634} 3634}
3635 3635
3636static void iwl4965_rx_beacon_notif(struct iwl4965_priv *priv, 3636static void iwl4965_rx_beacon_notif(struct iwl_priv *priv,
3637 struct iwl4965_rx_mem_buffer *rxb) 3637 struct iwl4965_rx_mem_buffer *rxb)
3638{ 3638{
3639#ifdef CONFIG_IWLWIFI_DEBUG 3639#ifdef CONFIG_IWLWIFI_DEBUG
@@ -3656,7 +3656,7 @@ static void iwl4965_rx_beacon_notif(struct iwl4965_priv *priv,
3656} 3656}
3657 3657
3658/* Service response to REPLY_SCAN_CMD (0x80) */ 3658/* Service response to REPLY_SCAN_CMD (0x80) */
3659static void iwl4965_rx_reply_scan(struct iwl4965_priv *priv, 3659static void iwl4965_rx_reply_scan(struct iwl_priv *priv,
3660 struct iwl4965_rx_mem_buffer *rxb) 3660 struct iwl4965_rx_mem_buffer *rxb)
3661{ 3661{
3662#ifdef CONFIG_IWLWIFI_DEBUG 3662#ifdef CONFIG_IWLWIFI_DEBUG
@@ -3669,7 +3669,7 @@ static void iwl4965_rx_reply_scan(struct iwl4965_priv *priv,
3669} 3669}
3670 3670
3671/* Service SCAN_START_NOTIFICATION (0x82) */ 3671/* Service SCAN_START_NOTIFICATION (0x82) */
3672static void iwl4965_rx_scan_start_notif(struct iwl4965_priv *priv, 3672static void iwl4965_rx_scan_start_notif(struct iwl_priv *priv,
3673 struct iwl4965_rx_mem_buffer *rxb) 3673 struct iwl4965_rx_mem_buffer *rxb)
3674{ 3674{
3675 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3675 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3686,7 +3686,7 @@ static void iwl4965_rx_scan_start_notif(struct iwl4965_priv *priv,
3686} 3686}
3687 3687
3688/* Service SCAN_RESULTS_NOTIFICATION (0x83) */ 3688/* Service SCAN_RESULTS_NOTIFICATION (0x83) */
3689static void iwl4965_rx_scan_results_notif(struct iwl4965_priv *priv, 3689static void iwl4965_rx_scan_results_notif(struct iwl_priv *priv,
3690 struct iwl4965_rx_mem_buffer *rxb) 3690 struct iwl4965_rx_mem_buffer *rxb)
3691{ 3691{
3692 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3692 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3711,7 +3711,7 @@ static void iwl4965_rx_scan_results_notif(struct iwl4965_priv *priv,
3711} 3711}
3712 3712
3713/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ 3713/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */
3714static void iwl4965_rx_scan_complete_notif(struct iwl4965_priv *priv, 3714static void iwl4965_rx_scan_complete_notif(struct iwl_priv *priv,
3715 struct iwl4965_rx_mem_buffer *rxb) 3715 struct iwl4965_rx_mem_buffer *rxb)
3716{ 3716{
3717 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3717 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3769,7 +3769,7 @@ reschedule:
3769 3769
3770/* Handle notification from uCode that card's power state is changing 3770/* Handle notification from uCode that card's power state is changing
3771 * due to software, hardware, or critical temperature RFKILL */ 3771 * due to software, hardware, or critical temperature RFKILL */
3772static void iwl4965_rx_card_state_notif(struct iwl4965_priv *priv, 3772static void iwl4965_rx_card_state_notif(struct iwl_priv *priv,
3773 struct iwl4965_rx_mem_buffer *rxb) 3773 struct iwl4965_rx_mem_buffer *rxb)
3774{ 3774{
3775 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3775 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3847,7 +3847,7 @@ static void iwl4965_rx_card_state_notif(struct iwl4965_priv *priv,
3847 * This function chains into the hardware specific files for them to setup 3847 * This function chains into the hardware specific files for them to setup
3848 * any hardware specific handlers as well. 3848 * any hardware specific handlers as well.
3849 */ 3849 */
3850static void iwl4965_setup_rx_handlers(struct iwl4965_priv *priv) 3850static void iwl4965_setup_rx_handlers(struct iwl_priv *priv)
3851{ 3851{
3852 priv->rx_handlers[REPLY_ALIVE] = iwl4965_rx_reply_alive; 3852 priv->rx_handlers[REPLY_ALIVE] = iwl4965_rx_reply_alive;
3853 priv->rx_handlers[REPLY_ADD_STA] = iwl4965_rx_reply_add_sta; 3853 priv->rx_handlers[REPLY_ADD_STA] = iwl4965_rx_reply_add_sta;
@@ -3889,7 +3889,7 @@ static void iwl4965_setup_rx_handlers(struct iwl4965_priv *priv)
3889 * will be executed. The attached skb (if present) will only be freed 3889 * will be executed. The attached skb (if present) will only be freed
3890 * if the callback returns 1 3890 * if the callback returns 1
3891 */ 3891 */
3892static void iwl4965_tx_cmd_complete(struct iwl4965_priv *priv, 3892static void iwl4965_tx_cmd_complete(struct iwl_priv *priv,
3893 struct iwl4965_rx_mem_buffer *rxb) 3893 struct iwl4965_rx_mem_buffer *rxb)
3894{ 3894{
3895 struct iwl4965_rx_packet *pkt = (struct iwl4965_rx_packet *)rxb->skb->data; 3895 struct iwl4965_rx_packet *pkt = (struct iwl4965_rx_packet *)rxb->skb->data;
@@ -4012,7 +4012,7 @@ static int iwl4965_rx_queue_space(const struct iwl4965_rx_queue *q)
4012/** 4012/**
4013 * iwl4965_rx_queue_update_write_ptr - Update the write pointer for the RX queue 4013 * iwl4965_rx_queue_update_write_ptr - Update the write pointer for the RX queue
4014 */ 4014 */
4015int iwl4965_rx_queue_update_write_ptr(struct iwl4965_priv *priv, struct iwl4965_rx_queue *q) 4015int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl4965_rx_queue *q)
4016{ 4016{
4017 u32 reg = 0; 4017 u32 reg = 0;
4018 int rc = 0; 4018 int rc = 0;
@@ -4058,7 +4058,7 @@ int iwl4965_rx_queue_update_write_ptr(struct iwl4965_priv *priv, struct iwl4965_
4058/** 4058/**
4059 * iwl4965_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr 4059 * iwl4965_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr
4060 */ 4060 */
4061static inline __le32 iwl4965_dma_addr2rbd_ptr(struct iwl4965_priv *priv, 4061static inline __le32 iwl4965_dma_addr2rbd_ptr(struct iwl_priv *priv,
4062 dma_addr_t dma_addr) 4062 dma_addr_t dma_addr)
4063{ 4063{
4064 return cpu_to_le32((u32)(dma_addr >> 8)); 4064 return cpu_to_le32((u32)(dma_addr >> 8));
@@ -4076,7 +4076,7 @@ static inline __le32 iwl4965_dma_addr2rbd_ptr(struct iwl4965_priv *priv,
4076 * also updates the memory address in the firmware to reference the new 4076 * also updates the memory address in the firmware to reference the new
4077 * target buffer. 4077 * target buffer.
4078 */ 4078 */
4079static int iwl4965_rx_queue_restock(struct iwl4965_priv *priv) 4079static int iwl4965_rx_queue_restock(struct iwl_priv *priv)
4080{ 4080{
4081 struct iwl4965_rx_queue *rxq = &priv->rxq; 4081 struct iwl4965_rx_queue *rxq = &priv->rxq;
4082 struct list_head *element; 4082 struct list_head *element;
@@ -4128,7 +4128,7 @@ static int iwl4965_rx_queue_restock(struct iwl4965_priv *priv)
4128 * Also restock the Rx queue via iwl4965_rx_queue_restock. 4128 * Also restock the Rx queue via iwl4965_rx_queue_restock.
4129 * This is called as a scheduled work item (except for during initialization) 4129 * This is called as a scheduled work item (except for during initialization)
4130 */ 4130 */
4131static void iwl4965_rx_allocate(struct iwl4965_priv *priv) 4131static void iwl4965_rx_allocate(struct iwl_priv *priv)
4132{ 4132{
4133 struct iwl4965_rx_queue *rxq = &priv->rxq; 4133 struct iwl4965_rx_queue *rxq = &priv->rxq;
4134 struct list_head *element; 4134 struct list_head *element;
@@ -4170,7 +4170,7 @@ static void iwl4965_rx_allocate(struct iwl4965_priv *priv)
4170*/ 4170*/
4171static void __iwl4965_rx_replenish(void *data) 4171static void __iwl4965_rx_replenish(void *data)
4172{ 4172{
4173 struct iwl4965_priv *priv = data; 4173 struct iwl_priv *priv = data;
4174 4174
4175 iwl4965_rx_allocate(priv); 4175 iwl4965_rx_allocate(priv);
4176 iwl4965_rx_queue_restock(priv); 4176 iwl4965_rx_queue_restock(priv);
@@ -4179,7 +4179,7 @@ static void __iwl4965_rx_replenish(void *data)
4179 4179
4180void iwl4965_rx_replenish(void *data) 4180void iwl4965_rx_replenish(void *data)
4181{ 4181{
4182 struct iwl4965_priv *priv = data; 4182 struct iwl_priv *priv = data;
4183 unsigned long flags; 4183 unsigned long flags;
4184 4184
4185 iwl4965_rx_allocate(priv); 4185 iwl4965_rx_allocate(priv);
@@ -4194,7 +4194,7 @@ void iwl4965_rx_replenish(void *data)
4194 * This free routine walks the list of POOL entries and if SKB is set to 4194 * This free routine walks the list of POOL entries and if SKB is set to
4195 * non NULL it is unmapped and freed 4195 * non NULL it is unmapped and freed
4196 */ 4196 */
4197static void iwl4965_rx_queue_free(struct iwl4965_priv *priv, struct iwl4965_rx_queue *rxq) 4197static void iwl4965_rx_queue_free(struct iwl_priv *priv, struct iwl4965_rx_queue *rxq)
4198{ 4198{
4199 int i; 4199 int i;
4200 for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { 4200 for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
@@ -4212,7 +4212,7 @@ static void iwl4965_rx_queue_free(struct iwl4965_priv *priv, struct iwl4965_rx_q
4212 rxq->bd = NULL; 4212 rxq->bd = NULL;
4213} 4213}
4214 4214
4215int iwl4965_rx_queue_alloc(struct iwl4965_priv *priv) 4215int iwl4965_rx_queue_alloc(struct iwl_priv *priv)
4216{ 4216{
4217 struct iwl4965_rx_queue *rxq = &priv->rxq; 4217 struct iwl4965_rx_queue *rxq = &priv->rxq;
4218 struct pci_dev *dev = priv->pci_dev; 4218 struct pci_dev *dev = priv->pci_dev;
@@ -4239,7 +4239,7 @@ int iwl4965_rx_queue_alloc(struct iwl4965_priv *priv)
4239 return 0; 4239 return 0;
4240} 4240}
4241 4241
4242void iwl4965_rx_queue_reset(struct iwl4965_priv *priv, struct iwl4965_rx_queue *rxq) 4242void iwl4965_rx_queue_reset(struct iwl_priv *priv, struct iwl4965_rx_queue *rxq)
4243{ 4243{
4244 unsigned long flags; 4244 unsigned long flags;
4245 int i; 4245 int i;
@@ -4354,7 +4354,7 @@ int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm)
4354 * the appropriate handlers, including command responses, 4354 * the appropriate handlers, including command responses,
4355 * frame-received notifications, and other notifications. 4355 * frame-received notifications, and other notifications.
4356 */ 4356 */
4357static void iwl4965_rx_handle(struct iwl4965_priv *priv) 4357static void iwl4965_rx_handle(struct iwl_priv *priv)
4358{ 4358{
4359 struct iwl4965_rx_mem_buffer *rxb; 4359 struct iwl4965_rx_mem_buffer *rxb;
4360 struct iwl4965_rx_packet *pkt; 4360 struct iwl4965_rx_packet *pkt;
@@ -4467,7 +4467,7 @@ static void iwl4965_rx_handle(struct iwl4965_priv *priv)
4467/** 4467/**
4468 * iwl4965_tx_queue_update_write_ptr - Send new write index to hardware 4468 * iwl4965_tx_queue_update_write_ptr - Send new write index to hardware
4469 */ 4469 */
4470static int iwl4965_tx_queue_update_write_ptr(struct iwl4965_priv *priv, 4470static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv,
4471 struct iwl4965_tx_queue *txq) 4471 struct iwl4965_tx_queue *txq)
4472{ 4472{
4473 u32 reg = 0; 4473 u32 reg = 0;
@@ -4533,14 +4533,14 @@ static void iwl4965_print_rx_config_cmd(struct iwl4965_rxon_cmd *rxon)
4533} 4533}
4534#endif 4534#endif
4535 4535
4536static void iwl4965_enable_interrupts(struct iwl4965_priv *priv) 4536static void iwl4965_enable_interrupts(struct iwl_priv *priv)
4537{ 4537{
4538 IWL_DEBUG_ISR("Enabling interrupts\n"); 4538 IWL_DEBUG_ISR("Enabling interrupts\n");
4539 set_bit(STATUS_INT_ENABLED, &priv->status); 4539 set_bit(STATUS_INT_ENABLED, &priv->status);
4540 iwl4965_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); 4540 iwl4965_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK);
4541} 4541}
4542 4542
4543static inline void iwl4965_disable_interrupts(struct iwl4965_priv *priv) 4543static inline void iwl4965_disable_interrupts(struct iwl_priv *priv)
4544{ 4544{
4545 clear_bit(STATUS_INT_ENABLED, &priv->status); 4545 clear_bit(STATUS_INT_ENABLED, &priv->status);
4546 4546
@@ -4577,7 +4577,7 @@ static const char *desc_lookup(int i)
4577#define ERROR_START_OFFSET (1 * sizeof(u32)) 4577#define ERROR_START_OFFSET (1 * sizeof(u32))
4578#define ERROR_ELEM_SIZE (7 * sizeof(u32)) 4578#define ERROR_ELEM_SIZE (7 * sizeof(u32))
4579 4579
4580static void iwl4965_dump_nic_error_log(struct iwl4965_priv *priv) 4580static void iwl4965_dump_nic_error_log(struct iwl_priv *priv)
4581{ 4581{
4582 u32 data2, line; 4582 u32 data2, line;
4583 u32 desc, time, count, base, data1; 4583 u32 desc, time, count, base, data1;
@@ -4632,7 +4632,7 @@ static void iwl4965_dump_nic_error_log(struct iwl4965_priv *priv)
4632 * 4632 *
4633 * NOTE: Must be called with iwl4965_grab_nic_access() already obtained! 4633 * NOTE: Must be called with iwl4965_grab_nic_access() already obtained!
4634 */ 4634 */
4635static void iwl4965_print_event_log(struct iwl4965_priv *priv, u32 start_idx, 4635static void iwl4965_print_event_log(struct iwl_priv *priv, u32 start_idx,
4636 u32 num_events, u32 mode) 4636 u32 num_events, u32 mode)
4637{ 4637{
4638 u32 i; 4638 u32 i;
@@ -4670,7 +4670,7 @@ static void iwl4965_print_event_log(struct iwl4965_priv *priv, u32 start_idx,
4670 } 4670 }
4671} 4671}
4672 4672
4673static void iwl4965_dump_nic_event_log(struct iwl4965_priv *priv) 4673static void iwl4965_dump_nic_event_log(struct iwl_priv *priv)
4674{ 4674{
4675 int rc; 4675 int rc;
4676 u32 base; /* SRAM byte address of event log header */ 4676 u32 base; /* SRAM byte address of event log header */
@@ -4725,7 +4725,7 @@ static void iwl4965_dump_nic_event_log(struct iwl4965_priv *priv)
4725/** 4725/**
4726 * iwl4965_irq_handle_error - called for HW or SW error interrupt from card 4726 * iwl4965_irq_handle_error - called for HW or SW error interrupt from card
4727 */ 4727 */
4728static void iwl4965_irq_handle_error(struct iwl4965_priv *priv) 4728static void iwl4965_irq_handle_error(struct iwl_priv *priv)
4729{ 4729{
4730 /* Set the FW error flag -- cleared on iwl4965_down */ 4730 /* Set the FW error flag -- cleared on iwl4965_down */
4731 set_bit(STATUS_FW_ERROR, &priv->status); 4731 set_bit(STATUS_FW_ERROR, &priv->status);
@@ -4760,7 +4760,7 @@ static void iwl4965_irq_handle_error(struct iwl4965_priv *priv)
4760 } 4760 }
4761} 4761}
4762 4762
4763static void iwl4965_error_recovery(struct iwl4965_priv *priv) 4763static void iwl4965_error_recovery(struct iwl_priv *priv)
4764{ 4764{
4765 unsigned long flags; 4765 unsigned long flags;
4766 4766
@@ -4777,7 +4777,7 @@ static void iwl4965_error_recovery(struct iwl4965_priv *priv)
4777 spin_unlock_irqrestore(&priv->lock, flags); 4777 spin_unlock_irqrestore(&priv->lock, flags);
4778} 4778}
4779 4779
4780static void iwl4965_irq_tasklet(struct iwl4965_priv *priv) 4780static void iwl4965_irq_tasklet(struct iwl_priv *priv)
4781{ 4781{
4782 u32 inta, handled = 0; 4782 u32 inta, handled = 0;
4783 u32 inta_fh; 4783 u32 inta_fh;
@@ -4939,7 +4939,7 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)
4939 4939
4940static irqreturn_t iwl4965_isr(int irq, void *data) 4940static irqreturn_t iwl4965_isr(int irq, void *data)
4941{ 4941{
4942 struct iwl4965_priv *priv = data; 4942 struct iwl_priv *priv = data;
4943 u32 inta, inta_mask; 4943 u32 inta, inta_mask;
4944 u32 inta_fh; 4944 u32 inta_fh;
4945 if (!priv) 4945 if (!priv)
@@ -4999,7 +4999,7 @@ static irqreturn_t iwl4965_isr(int irq, void *data)
4999 * EEPROM contents to the specific channel number supported for each 4999 * EEPROM contents to the specific channel number supported for each
5000 * band. 5000 * band.
5001 * 5001 *
5002 * For example, iwl4965_priv->eeprom.band_3_channels[4] from the band_3 5002 * For example, iwl_priv->eeprom.band_3_channels[4] from the band_3
5003 * definition below maps to physical channel 42 in the 5.2GHz spectrum. 5003 * definition below maps to physical channel 42 in the 5.2GHz spectrum.
5004 * The specific geography and calibration information for that channel 5004 * The specific geography and calibration information for that channel
5005 * is contained in the eeprom map itself. 5005 * is contained in the eeprom map itself.
@@ -5054,7 +5054,7 @@ static u8 iwl4965_eeprom_band_7[] = { /* 5.2 FAT channel */
5054 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157 5054 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157
5055}; 5055};
5056 5056
5057static void iwl4965_init_band_reference(const struct iwl4965_priv *priv, 5057static void iwl4965_init_band_reference(const struct iwl_priv *priv,
5058 int band, 5058 int band,
5059 int *eeprom_ch_count, 5059 int *eeprom_ch_count,
5060 const struct iwl4965_eeprom_channel 5060 const struct iwl4965_eeprom_channel
@@ -5108,7 +5108,7 @@ static void iwl4965_init_band_reference(const struct iwl4965_priv *priv,
5108 * 5108 *
5109 * Based on band and channel number. 5109 * Based on band and channel number.
5110 */ 5110 */
5111const struct iwl4965_channel_info *iwl4965_get_channel_info(const struct iwl4965_priv *priv, 5111const struct iwl4965_channel_info *iwl4965_get_channel_info(const struct iwl_priv *priv,
5112 enum ieee80211_band band, u16 channel) 5112 enum ieee80211_band band, u16 channel)
5113{ 5113{
5114 int i; 5114 int i;
@@ -5137,7 +5137,7 @@ const struct iwl4965_channel_info *iwl4965_get_channel_info(const struct iwl4965
5137/** 5137/**
5138 * iwl4965_init_channel_map - Set up driver's info for all possible channels 5138 * iwl4965_init_channel_map - Set up driver's info for all possible channels
5139 */ 5139 */
5140static int iwl4965_init_channel_map(struct iwl4965_priv *priv) 5140static int iwl4965_init_channel_map(struct iwl_priv *priv)
5141{ 5141{
5142 int eeprom_ch_count = 0; 5142 int eeprom_ch_count = 0;
5143 const u8 *eeprom_ch_index = NULL; 5143 const u8 *eeprom_ch_index = NULL;
@@ -5289,7 +5289,7 @@ static int iwl4965_init_channel_map(struct iwl4965_priv *priv)
5289/* 5289/*
5290 * iwl4965_free_channel_map - undo allocations in iwl4965_init_channel_map 5290 * iwl4965_free_channel_map - undo allocations in iwl4965_init_channel_map
5291 */ 5291 */
5292static void iwl4965_free_channel_map(struct iwl4965_priv *priv) 5292static void iwl4965_free_channel_map(struct iwl_priv *priv)
5293{ 5293{
5294 kfree(priv->channel_info); 5294 kfree(priv->channel_info);
5295 priv->channel_count = 0; 5295 priv->channel_count = 0;
@@ -5318,7 +5318,7 @@ static void iwl4965_free_channel_map(struct iwl4965_priv *priv)
5318#define IWL_PASSIVE_DWELL_BASE (100) 5318#define IWL_PASSIVE_DWELL_BASE (100)
5319#define IWL_CHANNEL_TUNE_TIME 5 5319#define IWL_CHANNEL_TUNE_TIME 5
5320 5320
5321static inline u16 iwl4965_get_active_dwell_time(struct iwl4965_priv *priv, 5321static inline u16 iwl4965_get_active_dwell_time(struct iwl_priv *priv,
5322 enum ieee80211_band band) 5322 enum ieee80211_band band)
5323{ 5323{
5324 if (band == IEEE80211_BAND_5GHZ) 5324 if (band == IEEE80211_BAND_5GHZ)
@@ -5327,7 +5327,7 @@ static inline u16 iwl4965_get_active_dwell_time(struct iwl4965_priv *priv,
5327 return IWL_ACTIVE_DWELL_TIME_24; 5327 return IWL_ACTIVE_DWELL_TIME_24;
5328} 5328}
5329 5329
5330static u16 iwl4965_get_passive_dwell_time(struct iwl4965_priv *priv, 5330static u16 iwl4965_get_passive_dwell_time(struct iwl_priv *priv,
5331 enum ieee80211_band band) 5331 enum ieee80211_band band)
5332{ 5332{
5333 u16 active = iwl4965_get_active_dwell_time(priv, band); 5333 u16 active = iwl4965_get_active_dwell_time(priv, band);
@@ -5351,7 +5351,7 @@ static u16 iwl4965_get_passive_dwell_time(struct iwl4965_priv *priv,
5351 return passive; 5351 return passive;
5352} 5352}
5353 5353
5354static int iwl4965_get_channels_for_scan(struct iwl4965_priv *priv, 5354static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
5355 enum ieee80211_band band, 5355 enum ieee80211_band band,
5356 u8 is_active, u8 direct_mask, 5356 u8 is_active, u8 direct_mask,
5357 struct iwl4965_scan_channel *scan_ch) 5357 struct iwl4965_scan_channel *scan_ch)
@@ -5438,7 +5438,7 @@ static int iwl4965_get_channels_for_scan(struct iwl4965_priv *priv,
5438 return added; 5438 return added;
5439} 5439}
5440 5440
5441static void iwl4965_init_hw_rates(struct iwl4965_priv *priv, 5441static void iwl4965_init_hw_rates(struct iwl_priv *priv,
5442 struct ieee80211_rate *rates) 5442 struct ieee80211_rate *rates)
5443{ 5443{
5444 int i; 5444 int i;
@@ -5462,7 +5462,7 @@ static void iwl4965_init_hw_rates(struct iwl4965_priv *priv,
5462/** 5462/**
5463 * iwl4965_init_geos - Initialize mac80211's geo/channel info based from eeprom 5463 * iwl4965_init_geos - Initialize mac80211's geo/channel info based from eeprom
5464 */ 5464 */
5465static int iwl4965_init_geos(struct iwl4965_priv *priv) 5465static int iwl4965_init_geos(struct iwl_priv *priv)
5466{ 5466{
5467 struct iwl4965_channel_info *ch; 5467 struct iwl4965_channel_info *ch;
5468 struct ieee80211_supported_band *sband; 5468 struct ieee80211_supported_band *sband;
@@ -5584,7 +5584,7 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv)
5584/* 5584/*
5585 * iwl4965_free_geos - undo allocations in iwl4965_init_geos 5585 * iwl4965_free_geos - undo allocations in iwl4965_init_geos
5586 */ 5586 */
5587static void iwl4965_free_geos(struct iwl4965_priv *priv) 5587static void iwl4965_free_geos(struct iwl_priv *priv)
5588{ 5588{
5589 kfree(priv->ieee_channels); 5589 kfree(priv->ieee_channels);
5590 kfree(priv->ieee_rates); 5590 kfree(priv->ieee_rates);
@@ -5597,7 +5597,7 @@ static void iwl4965_free_geos(struct iwl4965_priv *priv)
5597 * 5597 *
5598 ******************************************************************************/ 5598 ******************************************************************************/
5599 5599
5600static void iwl4965_dealloc_ucode_pci(struct iwl4965_priv *priv) 5600static void iwl4965_dealloc_ucode_pci(struct iwl_priv *priv)
5601{ 5601{
5602 iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code); 5602 iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code);
5603 iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data); 5603 iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data);
@@ -5611,7 +5611,7 @@ static void iwl4965_dealloc_ucode_pci(struct iwl4965_priv *priv)
5611 * iwl4965_verify_inst_full - verify runtime uCode image in card vs. host, 5611 * iwl4965_verify_inst_full - verify runtime uCode image in card vs. host,
5612 * looking at all data. 5612 * looking at all data.
5613 */ 5613 */
5614static int iwl4965_verify_inst_full(struct iwl4965_priv *priv, __le32 *image, 5614static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image,
5615 u32 len) 5615 u32 len)
5616{ 5616{
5617 u32 val; 5617 u32 val;
@@ -5659,7 +5659,7 @@ static int iwl4965_verify_inst_full(struct iwl4965_priv *priv, __le32 *image,
5659 * using sample data 100 bytes apart. If these sample points are good, 5659 * using sample data 100 bytes apart. If these sample points are good,
5660 * it's a pretty good bet that everything between them is good, too. 5660 * it's a pretty good bet that everything between them is good, too.
5661 */ 5661 */
5662static int iwl4965_verify_inst_sparse(struct iwl4965_priv *priv, __le32 *image, u32 len) 5662static int iwl4965_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 len)
5663{ 5663{
5664 u32 val; 5664 u32 val;
5665 int rc = 0; 5665 int rc = 0;
@@ -5702,7 +5702,7 @@ static int iwl4965_verify_inst_sparse(struct iwl4965_priv *priv, __le32 *image,
5702 * iwl4965_verify_ucode - determine which instruction image is in SRAM, 5702 * iwl4965_verify_ucode - determine which instruction image is in SRAM,
5703 * and verify its contents 5703 * and verify its contents
5704 */ 5704 */
5705static int iwl4965_verify_ucode(struct iwl4965_priv *priv) 5705static int iwl4965_verify_ucode(struct iwl_priv *priv)
5706{ 5706{
5707 __le32 *image; 5707 __le32 *image;
5708 u32 len; 5708 u32 len;
@@ -5749,7 +5749,7 @@ static int iwl4965_verify_ucode(struct iwl4965_priv *priv)
5749 5749
5750 5750
5751/* check contents of special bootstrap uCode SRAM */ 5751/* check contents of special bootstrap uCode SRAM */
5752static int iwl4965_verify_bsm(struct iwl4965_priv *priv) 5752static int iwl4965_verify_bsm(struct iwl_priv *priv)
5753{ 5753{
5754 __le32 *image = priv->ucode_boot.v_addr; 5754 __le32 *image = priv->ucode_boot.v_addr;
5755 u32 len = priv->ucode_boot.len; 5755 u32 len = priv->ucode_boot.len;
@@ -5811,7 +5811,7 @@ static int iwl4965_verify_bsm(struct iwl4965_priv *priv)
5811 * the runtime uCode instructions and the backup data cache into SRAM, 5811 * the runtime uCode instructions and the backup data cache into SRAM,
5812 * and re-launches the runtime uCode from where it left off. 5812 * and re-launches the runtime uCode from where it left off.
5813 */ 5813 */
5814static int iwl4965_load_bsm(struct iwl4965_priv *priv) 5814static int iwl4965_load_bsm(struct iwl_priv *priv)
5815{ 5815{
5816 __le32 *image = priv->ucode_boot.v_addr; 5816 __le32 *image = priv->ucode_boot.v_addr;
5817 u32 len = priv->ucode_boot.len; 5817 u32 len = priv->ucode_boot.len;
@@ -5897,7 +5897,7 @@ static int iwl4965_load_bsm(struct iwl4965_priv *priv)
5897 return 0; 5897 return 0;
5898} 5898}
5899 5899
5900static void iwl4965_nic_start(struct iwl4965_priv *priv) 5900static void iwl4965_nic_start(struct iwl_priv *priv)
5901{ 5901{
5902 /* Remove all resets to allow NIC to operate */ 5902 /* Remove all resets to allow NIC to operate */
5903 iwl4965_write32(priv, CSR_RESET, 0); 5903 iwl4965_write32(priv, CSR_RESET, 0);
@@ -5909,7 +5909,7 @@ static void iwl4965_nic_start(struct iwl4965_priv *priv)
5909 * 5909 *
5910 * Copy into buffers for card to fetch via bus-mastering 5910 * Copy into buffers for card to fetch via bus-mastering
5911 */ 5911 */
5912static int iwl4965_read_ucode(struct iwl4965_priv *priv) 5912static int iwl4965_read_ucode(struct iwl_priv *priv)
5913{ 5913{
5914 struct iwl4965_ucode *ucode; 5914 struct iwl4965_ucode *ucode;
5915 int ret; 5915 int ret;
@@ -6110,7 +6110,7 @@ static int iwl4965_read_ucode(struct iwl4965_priv *priv)
6110 * We need to replace them to load runtime uCode inst and data, 6110 * We need to replace them to load runtime uCode inst and data,
6111 * and to save runtime data when powering down. 6111 * and to save runtime data when powering down.
6112 */ 6112 */
6113static int iwl4965_set_ucode_ptrs(struct iwl4965_priv *priv) 6113static int iwl4965_set_ucode_ptrs(struct iwl_priv *priv)
6114{ 6114{
6115 dma_addr_t pinst; 6115 dma_addr_t pinst;
6116 dma_addr_t pdata; 6116 dma_addr_t pdata;
@@ -6159,7 +6159,7 @@ static int iwl4965_set_ucode_ptrs(struct iwl4965_priv *priv)
6159 * 6159 *
6160 * Tell "initialize" uCode to go ahead and load the runtime uCode. 6160 * Tell "initialize" uCode to go ahead and load the runtime uCode.
6161*/ 6161*/
6162static void iwl4965_init_alive_start(struct iwl4965_priv *priv) 6162static void iwl4965_init_alive_start(struct iwl_priv *priv)
6163{ 6163{
6164 /* Check alive response for "valid" sign from uCode */ 6164 /* Check alive response for "valid" sign from uCode */
6165 if (priv->card_alive_init.is_valid != UCODE_VALID_OK) { 6165 if (priv->card_alive_init.is_valid != UCODE_VALID_OK) {
@@ -6204,7 +6204,7 @@ static void iwl4965_init_alive_start(struct iwl4965_priv *priv)
6204 * from protocol/runtime uCode (initialization uCode's 6204 * from protocol/runtime uCode (initialization uCode's
6205 * Alive gets handled by iwl4965_init_alive_start()). 6205 * Alive gets handled by iwl4965_init_alive_start()).
6206 */ 6206 */
6207static void iwl4965_alive_start(struct iwl4965_priv *priv) 6207static void iwl4965_alive_start(struct iwl_priv *priv)
6208{ 6208{
6209 int rc = 0; 6209 int rc = 0;
6210 6210
@@ -6289,9 +6289,9 @@ static void iwl4965_alive_start(struct iwl4965_priv *priv)
6289 queue_work(priv->workqueue, &priv->restart); 6289 queue_work(priv->workqueue, &priv->restart);
6290} 6290}
6291 6291
6292static void iwl4965_cancel_deferred_work(struct iwl4965_priv *priv); 6292static void iwl4965_cancel_deferred_work(struct iwl_priv *priv);
6293 6293
6294static void __iwl4965_down(struct iwl4965_priv *priv) 6294static void __iwl4965_down(struct iwl_priv *priv)
6295{ 6295{
6296 unsigned long flags; 6296 unsigned long flags;
6297 int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); 6297 int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status);
@@ -6383,7 +6383,7 @@ static void __iwl4965_down(struct iwl4965_priv *priv)
6383 iwl4965_clear_free_frames(priv); 6383 iwl4965_clear_free_frames(priv);
6384} 6384}
6385 6385
6386static void iwl4965_down(struct iwl4965_priv *priv) 6386static void iwl4965_down(struct iwl_priv *priv)
6387{ 6387{
6388 mutex_lock(&priv->mutex); 6388 mutex_lock(&priv->mutex);
6389 __iwl4965_down(priv); 6389 __iwl4965_down(priv);
@@ -6394,7 +6394,7 @@ static void iwl4965_down(struct iwl4965_priv *priv)
6394 6394
6395#define MAX_HW_RESTARTS 5 6395#define MAX_HW_RESTARTS 5
6396 6396
6397static int __iwl4965_up(struct iwl4965_priv *priv) 6397static int __iwl4965_up(struct iwl_priv *priv)
6398{ 6398{
6399 int rc, i; 6399 int rc, i;
6400 6400
@@ -6497,8 +6497,8 @@ static int __iwl4965_up(struct iwl4965_priv *priv)
6497 6497
6498static void iwl4965_bg_init_alive_start(struct work_struct *data) 6498static void iwl4965_bg_init_alive_start(struct work_struct *data)
6499{ 6499{
6500 struct iwl4965_priv *priv = 6500 struct iwl_priv *priv =
6501 container_of(data, struct iwl4965_priv, init_alive_start.work); 6501 container_of(data, struct iwl_priv, init_alive_start.work);
6502 6502
6503 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6503 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6504 return; 6504 return;
@@ -6510,8 +6510,8 @@ static void iwl4965_bg_init_alive_start(struct work_struct *data)
6510 6510
6511static void iwl4965_bg_alive_start(struct work_struct *data) 6511static void iwl4965_bg_alive_start(struct work_struct *data)
6512{ 6512{
6513 struct iwl4965_priv *priv = 6513 struct iwl_priv *priv =
6514 container_of(data, struct iwl4965_priv, alive_start.work); 6514 container_of(data, struct iwl_priv, alive_start.work);
6515 6515
6516 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6516 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6517 return; 6517 return;
@@ -6523,7 +6523,7 @@ static void iwl4965_bg_alive_start(struct work_struct *data)
6523 6523
6524static void iwl4965_bg_rf_kill(struct work_struct *work) 6524static void iwl4965_bg_rf_kill(struct work_struct *work)
6525{ 6525{
6526 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, rf_kill); 6526 struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
6527 6527
6528 wake_up_interruptible(&priv->wait_command_queue); 6528 wake_up_interruptible(&priv->wait_command_queue);
6529 6529
@@ -6555,8 +6555,8 @@ static void iwl4965_bg_rf_kill(struct work_struct *work)
6555 6555
6556static void iwl4965_bg_scan_check(struct work_struct *data) 6556static void iwl4965_bg_scan_check(struct work_struct *data)
6557{ 6557{
6558 struct iwl4965_priv *priv = 6558 struct iwl_priv *priv =
6559 container_of(data, struct iwl4965_priv, scan_check.work); 6559 container_of(data, struct iwl_priv, scan_check.work);
6560 6560
6561 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6561 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6562 return; 6562 return;
@@ -6576,8 +6576,8 @@ static void iwl4965_bg_scan_check(struct work_struct *data)
6576 6576
6577static void iwl4965_bg_request_scan(struct work_struct *data) 6577static void iwl4965_bg_request_scan(struct work_struct *data)
6578{ 6578{
6579 struct iwl4965_priv *priv = 6579 struct iwl_priv *priv =
6580 container_of(data, struct iwl4965_priv, request_scan); 6580 container_of(data, struct iwl_priv, request_scan);
6581 struct iwl4965_host_cmd cmd = { 6581 struct iwl4965_host_cmd cmd = {
6582 .id = REPLY_SCAN_CMD, 6582 .id = REPLY_SCAN_CMD,
6583 .len = sizeof(struct iwl4965_scan_cmd), 6583 .len = sizeof(struct iwl4965_scan_cmd),
@@ -6788,7 +6788,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
6788 6788
6789static void iwl4965_bg_up(struct work_struct *data) 6789static void iwl4965_bg_up(struct work_struct *data)
6790{ 6790{
6791 struct iwl4965_priv *priv = container_of(data, struct iwl4965_priv, up); 6791 struct iwl_priv *priv = container_of(data, struct iwl_priv, up);
6792 6792
6793 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6793 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6794 return; 6794 return;
@@ -6800,7 +6800,7 @@ static void iwl4965_bg_up(struct work_struct *data)
6800 6800
6801static void iwl4965_bg_restart(struct work_struct *data) 6801static void iwl4965_bg_restart(struct work_struct *data)
6802{ 6802{
6803 struct iwl4965_priv *priv = container_of(data, struct iwl4965_priv, restart); 6803 struct iwl_priv *priv = container_of(data, struct iwl_priv, restart);
6804 6804
6805 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6805 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6806 return; 6806 return;
@@ -6811,8 +6811,8 @@ static void iwl4965_bg_restart(struct work_struct *data)
6811 6811
6812static void iwl4965_bg_rx_replenish(struct work_struct *data) 6812static void iwl4965_bg_rx_replenish(struct work_struct *data)
6813{ 6813{
6814 struct iwl4965_priv *priv = 6814 struct iwl_priv *priv =
6815 container_of(data, struct iwl4965_priv, rx_replenish); 6815 container_of(data, struct iwl_priv, rx_replenish);
6816 6816
6817 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6817 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6818 return; 6818 return;
@@ -6826,7 +6826,7 @@ static void iwl4965_bg_rx_replenish(struct work_struct *data)
6826 6826
6827static void iwl4965_bg_post_associate(struct work_struct *data) 6827static void iwl4965_bg_post_associate(struct work_struct *data)
6828{ 6828{
6829 struct iwl4965_priv *priv = container_of(data, struct iwl4965_priv, 6829 struct iwl_priv *priv = container_of(data, struct iwl_priv,
6830 post_associate.work); 6830 post_associate.work);
6831 6831
6832 int rc = 0; 6832 int rc = 0;
@@ -6940,7 +6940,7 @@ static void iwl4965_bg_post_associate(struct work_struct *data)
6940 6940
6941static void iwl4965_bg_abort_scan(struct work_struct *work) 6941static void iwl4965_bg_abort_scan(struct work_struct *work)
6942{ 6942{
6943 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, abort_scan); 6943 struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan);
6944 6944
6945 if (!iwl4965_is_ready(priv)) 6945 if (!iwl4965_is_ready(priv))
6946 return; 6946 return;
@@ -6957,8 +6957,8 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
6957 6957
6958static void iwl4965_bg_scan_completed(struct work_struct *work) 6958static void iwl4965_bg_scan_completed(struct work_struct *work)
6959{ 6959{
6960 struct iwl4965_priv *priv = 6960 struct iwl_priv *priv =
6961 container_of(work, struct iwl4965_priv, scan_completed); 6961 container_of(work, struct iwl_priv, scan_completed);
6962 6962
6963 IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, "SCAN complete scan\n"); 6963 IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, "SCAN complete scan\n");
6964 6964
@@ -6987,7 +6987,7 @@ static void iwl4965_bg_scan_completed(struct work_struct *work)
6987 6987
6988static int iwl4965_mac_start(struct ieee80211_hw *hw) 6988static int iwl4965_mac_start(struct ieee80211_hw *hw)
6989{ 6989{
6990 struct iwl4965_priv *priv = hw->priv; 6990 struct iwl_priv *priv = hw->priv;
6991 int ret; 6991 int ret;
6992 6992
6993 IWL_DEBUG_MAC80211("enter\n"); 6993 IWL_DEBUG_MAC80211("enter\n");
@@ -7064,7 +7064,7 @@ out_disable_msi:
7064 7064
7065static void iwl4965_mac_stop(struct ieee80211_hw *hw) 7065static void iwl4965_mac_stop(struct ieee80211_hw *hw)
7066{ 7066{
7067 struct iwl4965_priv *priv = hw->priv; 7067 struct iwl_priv *priv = hw->priv;
7068 7068
7069 IWL_DEBUG_MAC80211("enter\n"); 7069 IWL_DEBUG_MAC80211("enter\n");
7070 7070
@@ -7099,7 +7099,7 @@ static void iwl4965_mac_stop(struct ieee80211_hw *hw)
7099static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, 7099static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
7100 struct ieee80211_tx_control *ctl) 7100 struct ieee80211_tx_control *ctl)
7101{ 7101{
7102 struct iwl4965_priv *priv = hw->priv; 7102 struct iwl_priv *priv = hw->priv;
7103 7103
7104 IWL_DEBUG_MAC80211("enter\n"); 7104 IWL_DEBUG_MAC80211("enter\n");
7105 7105
@@ -7121,7 +7121,7 @@ static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
7121static int iwl4965_mac_add_interface(struct ieee80211_hw *hw, 7121static int iwl4965_mac_add_interface(struct ieee80211_hw *hw,
7122 struct ieee80211_if_init_conf *conf) 7122 struct ieee80211_if_init_conf *conf)
7123{ 7123{
7124 struct iwl4965_priv *priv = hw->priv; 7124 struct iwl_priv *priv = hw->priv;
7125 unsigned long flags; 7125 unsigned long flags;
7126 DECLARE_MAC_BUF(mac); 7126 DECLARE_MAC_BUF(mac);
7127 7127
@@ -7162,7 +7162,7 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw,
7162 */ 7162 */
7163static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf) 7163static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
7164{ 7164{
7165 struct iwl4965_priv *priv = hw->priv; 7165 struct iwl_priv *priv = hw->priv;
7166 const struct iwl4965_channel_info *ch_info; 7166 const struct iwl4965_channel_info *ch_info;
7167 unsigned long flags; 7167 unsigned long flags;
7168 int ret = 0; 7168 int ret = 0;
@@ -7257,7 +7257,7 @@ out:
7257 return ret; 7257 return ret;
7258} 7258}
7259 7259
7260static void iwl4965_config_ap(struct iwl4965_priv *priv) 7260static void iwl4965_config_ap(struct iwl_priv *priv)
7261{ 7261{
7262 int rc = 0; 7262 int rc = 0;
7263 7263
@@ -7321,7 +7321,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
7321 struct ieee80211_vif *vif, 7321 struct ieee80211_vif *vif,
7322 struct ieee80211_if_conf *conf) 7322 struct ieee80211_if_conf *conf)
7323{ 7323{
7324 struct iwl4965_priv *priv = hw->priv; 7324 struct iwl_priv *priv = hw->priv;
7325 DECLARE_MAC_BUF(mac); 7325 DECLARE_MAC_BUF(mac);
7326 unsigned long flags; 7326 unsigned long flags;
7327 int rc; 7327 int rc;
@@ -7439,7 +7439,7 @@ static void iwl4965_configure_filter(struct ieee80211_hw *hw,
7439static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, 7439static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw,
7440 struct ieee80211_if_init_conf *conf) 7440 struct ieee80211_if_init_conf *conf)
7441{ 7441{
7442 struct iwl4965_priv *priv = hw->priv; 7442 struct iwl_priv *priv = hw->priv;
7443 7443
7444 IWL_DEBUG_MAC80211("enter\n"); 7444 IWL_DEBUG_MAC80211("enter\n");
7445 7445
@@ -7468,7 +7468,7 @@ static void iwl4965_bss_info_changed(struct ieee80211_hw *hw,
7468 struct ieee80211_bss_conf *bss_conf, 7468 struct ieee80211_bss_conf *bss_conf,
7469 u32 changes) 7469 u32 changes)
7470{ 7470{
7471 struct iwl4965_priv *priv = hw->priv; 7471 struct iwl_priv *priv = hw->priv;
7472 7472
7473 if (changes & BSS_CHANGED_ERP_PREAMBLE) { 7473 if (changes & BSS_CHANGED_ERP_PREAMBLE) {
7474 if (bss_conf->use_short_preamble) 7474 if (bss_conf->use_short_preamble)
@@ -7499,7 +7499,7 @@ static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
7499{ 7499{
7500 int rc = 0; 7500 int rc = 0;
7501 unsigned long flags; 7501 unsigned long flags;
7502 struct iwl4965_priv *priv = hw->priv; 7502 struct iwl_priv *priv = hw->priv;
7503 7503
7504 IWL_DEBUG_MAC80211("enter\n"); 7504 IWL_DEBUG_MAC80211("enter\n");
7505 7505
@@ -7556,7 +7556,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
7556 const u8 *local_addr, const u8 *addr, 7556 const u8 *local_addr, const u8 *addr,
7557 struct ieee80211_key_conf *key) 7557 struct ieee80211_key_conf *key)
7558{ 7558{
7559 struct iwl4965_priv *priv = hw->priv; 7559 struct iwl_priv *priv = hw->priv;
7560 DECLARE_MAC_BUF(mac); 7560 DECLARE_MAC_BUF(mac);
7561 int rc = 0; 7561 int rc = 0;
7562 u8 sta_id; 7562 u8 sta_id;
@@ -7615,7 +7615,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
7615static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, int queue, 7615static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7616 const struct ieee80211_tx_queue_params *params) 7616 const struct ieee80211_tx_queue_params *params)
7617{ 7617{
7618 struct iwl4965_priv *priv = hw->priv; 7618 struct iwl_priv *priv = hw->priv;
7619 unsigned long flags; 7619 unsigned long flags;
7620 int q; 7620 int q;
7621 7621
@@ -7666,7 +7666,7 @@ static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7666static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw, 7666static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw,
7667 struct ieee80211_tx_queue_stats *stats) 7667 struct ieee80211_tx_queue_stats *stats)
7668{ 7668{
7669 struct iwl4965_priv *priv = hw->priv; 7669 struct iwl_priv *priv = hw->priv;
7670 int i, avail; 7670 int i, avail;
7671 struct iwl4965_tx_queue *txq; 7671 struct iwl4965_tx_queue *txq;
7672 struct iwl4965_queue *q; 7672 struct iwl4965_queue *q;
@@ -7717,7 +7717,7 @@ static u64 iwl4965_mac_get_tsf(struct ieee80211_hw *hw)
7717 7717
7718static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw) 7718static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
7719{ 7719{
7720 struct iwl4965_priv *priv = hw->priv; 7720 struct iwl_priv *priv = hw->priv;
7721 unsigned long flags; 7721 unsigned long flags;
7722 7722
7723 mutex_lock(&priv->mutex); 7723 mutex_lock(&priv->mutex);
@@ -7789,7 +7789,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
7789static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, 7789static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
7790 struct ieee80211_tx_control *control) 7790 struct ieee80211_tx_control *control)
7791{ 7791{
7792 struct iwl4965_priv *priv = hw->priv; 7792 struct iwl_priv *priv = hw->priv;
7793 unsigned long flags; 7793 unsigned long flags;
7794 7794
7795 mutex_lock(&priv->mutex); 7795 mutex_lock(&priv->mutex);
@@ -7831,7 +7831,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
7831#ifdef CONFIG_IWL4965_HT 7831#ifdef CONFIG_IWL4965_HT
7832 7832
7833static void iwl4965_ht_info_fill(struct ieee80211_conf *conf, 7833static void iwl4965_ht_info_fill(struct ieee80211_conf *conf,
7834 struct iwl4965_priv *priv) 7834 struct iwl_priv *priv)
7835{ 7835{
7836 struct iwl_ht_info *iwl_conf = &priv->current_ht_config; 7836 struct iwl_ht_info *iwl_conf = &priv->current_ht_config;
7837 struct ieee80211_ht_info *ht_conf = &conf->ht_conf; 7837 struct ieee80211_ht_info *ht_conf = &conf->ht_conf;
@@ -7885,7 +7885,7 @@ static void iwl4965_ht_info_fill(struct ieee80211_conf *conf,
7885static int iwl4965_mac_conf_ht(struct ieee80211_hw *hw, 7885static int iwl4965_mac_conf_ht(struct ieee80211_hw *hw,
7886 struct ieee80211_conf *conf) 7886 struct ieee80211_conf *conf)
7887{ 7887{
7888 struct iwl4965_priv *priv = hw->priv; 7888 struct iwl_priv *priv = hw->priv;
7889 7889
7890 IWL_DEBUG_MAC80211("enter: \n"); 7890 IWL_DEBUG_MAC80211("enter: \n");
7891 7891
@@ -7960,7 +7960,7 @@ static ssize_t show_rf_kill(struct device *d,
7960 * 2 - HW based RF kill active 7960 * 2 - HW based RF kill active
7961 * 3 - Both HW and SW based RF kill active 7961 * 3 - Both HW and SW based RF kill active
7962 */ 7962 */
7963 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 7963 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
7964 int val = (test_bit(STATUS_RF_KILL_SW, &priv->status) ? 0x1 : 0x0) | 7964 int val = (test_bit(STATUS_RF_KILL_SW, &priv->status) ? 0x1 : 0x0) |
7965 (test_bit(STATUS_RF_KILL_HW, &priv->status) ? 0x2 : 0x0); 7965 (test_bit(STATUS_RF_KILL_HW, &priv->status) ? 0x2 : 0x0);
7966 7966
@@ -7971,7 +7971,7 @@ static ssize_t store_rf_kill(struct device *d,
7971 struct device_attribute *attr, 7971 struct device_attribute *attr,
7972 const char *buf, size_t count) 7972 const char *buf, size_t count)
7973{ 7973{
7974 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 7974 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
7975 7975
7976 mutex_lock(&priv->mutex); 7976 mutex_lock(&priv->mutex);
7977 iwl4965_radio_kill_sw(priv, buf[0] == '1'); 7977 iwl4965_radio_kill_sw(priv, buf[0] == '1');
@@ -7985,7 +7985,7 @@ static DEVICE_ATTR(rf_kill, S_IWUSR | S_IRUGO, show_rf_kill, store_rf_kill);
7985static ssize_t show_temperature(struct device *d, 7985static ssize_t show_temperature(struct device *d,
7986 struct device_attribute *attr, char *buf) 7986 struct device_attribute *attr, char *buf)
7987{ 7987{
7988 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 7988 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
7989 7989
7990 if (!iwl4965_is_alive(priv)) 7990 if (!iwl4965_is_alive(priv))
7991 return -EAGAIN; 7991 return -EAGAIN;
@@ -7999,7 +7999,7 @@ static ssize_t show_rs_window(struct device *d,
7999 struct device_attribute *attr, 7999 struct device_attribute *attr,
8000 char *buf) 8000 char *buf)
8001{ 8001{
8002 struct iwl4965_priv *priv = d->driver_data; 8002 struct iwl_priv *priv = d->driver_data;
8003 return iwl4965_fill_rs_info(priv->hw, buf, IWL_AP_ID); 8003 return iwl4965_fill_rs_info(priv->hw, buf, IWL_AP_ID);
8004} 8004}
8005static DEVICE_ATTR(rs_window, S_IRUGO, show_rs_window, NULL); 8005static DEVICE_ATTR(rs_window, S_IRUGO, show_rs_window, NULL);
@@ -8007,7 +8007,7 @@ static DEVICE_ATTR(rs_window, S_IRUGO, show_rs_window, NULL);
8007static ssize_t show_tx_power(struct device *d, 8007static ssize_t show_tx_power(struct device *d,
8008 struct device_attribute *attr, char *buf) 8008 struct device_attribute *attr, char *buf)
8009{ 8009{
8010 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8010 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8011 return sprintf(buf, "%d\n", priv->user_txpower_limit); 8011 return sprintf(buf, "%d\n", priv->user_txpower_limit);
8012} 8012}
8013 8013
@@ -8015,7 +8015,7 @@ static ssize_t store_tx_power(struct device *d,
8015 struct device_attribute *attr, 8015 struct device_attribute *attr,
8016 const char *buf, size_t count) 8016 const char *buf, size_t count)
8017{ 8017{
8018 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8018 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8019 char *p = (char *)buf; 8019 char *p = (char *)buf;
8020 u32 val; 8020 u32 val;
8021 8021
@@ -8034,7 +8034,7 @@ static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
8034static ssize_t show_flags(struct device *d, 8034static ssize_t show_flags(struct device *d,
8035 struct device_attribute *attr, char *buf) 8035 struct device_attribute *attr, char *buf)
8036{ 8036{
8037 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8037 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8038 8038
8039 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags); 8039 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags);
8040} 8040}
@@ -8043,7 +8043,7 @@ static ssize_t store_flags(struct device *d,
8043 struct device_attribute *attr, 8043 struct device_attribute *attr,
8044 const char *buf, size_t count) 8044 const char *buf, size_t count)
8045{ 8045{
8046 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8046 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8047 u32 flags = simple_strtoul(buf, NULL, 0); 8047 u32 flags = simple_strtoul(buf, NULL, 0);
8048 8048
8049 mutex_lock(&priv->mutex); 8049 mutex_lock(&priv->mutex);
@@ -8068,7 +8068,7 @@ static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, show_flags, store_flags);
8068static ssize_t show_filter_flags(struct device *d, 8068static ssize_t show_filter_flags(struct device *d,
8069 struct device_attribute *attr, char *buf) 8069 struct device_attribute *attr, char *buf)
8070{ 8070{
8071 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8071 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8072 8072
8073 return sprintf(buf, "0x%04X\n", 8073 return sprintf(buf, "0x%04X\n",
8074 le32_to_cpu(priv->active_rxon.filter_flags)); 8074 le32_to_cpu(priv->active_rxon.filter_flags));
@@ -8078,7 +8078,7 @@ static ssize_t store_filter_flags(struct device *d,
8078 struct device_attribute *attr, 8078 struct device_attribute *attr,
8079 const char *buf, size_t count) 8079 const char *buf, size_t count)
8080{ 8080{
8081 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8081 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8082 u32 filter_flags = simple_strtoul(buf, NULL, 0); 8082 u32 filter_flags = simple_strtoul(buf, NULL, 0);
8083 8083
8084 mutex_lock(&priv->mutex); 8084 mutex_lock(&priv->mutex);
@@ -8107,7 +8107,7 @@ static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, show_filter_flags,
8107static ssize_t show_measurement(struct device *d, 8107static ssize_t show_measurement(struct device *d,
8108 struct device_attribute *attr, char *buf) 8108 struct device_attribute *attr, char *buf)
8109{ 8109{
8110 struct iwl4965_priv *priv = dev_get_drvdata(d); 8110 struct iwl_priv *priv = dev_get_drvdata(d);
8111 struct iwl4965_spectrum_notification measure_report; 8111 struct iwl4965_spectrum_notification measure_report;
8112 u32 size = sizeof(measure_report), len = 0, ofs = 0; 8112 u32 size = sizeof(measure_report), len = 0, ofs = 0;
8113 u8 *data = (u8 *) & measure_report; 8113 u8 *data = (u8 *) & measure_report;
@@ -8140,7 +8140,7 @@ static ssize_t store_measurement(struct device *d,
8140 struct device_attribute *attr, 8140 struct device_attribute *attr,
8141 const char *buf, size_t count) 8141 const char *buf, size_t count)
8142{ 8142{
8143 struct iwl4965_priv *priv = dev_get_drvdata(d); 8143 struct iwl_priv *priv = dev_get_drvdata(d);
8144 struct ieee80211_measurement_params params = { 8144 struct ieee80211_measurement_params params = {
8145 .channel = le16_to_cpu(priv->active_rxon.channel), 8145 .channel = le16_to_cpu(priv->active_rxon.channel),
8146 .start_time = cpu_to_le64(priv->last_tsf), 8146 .start_time = cpu_to_le64(priv->last_tsf),
@@ -8179,7 +8179,7 @@ static ssize_t store_retry_rate(struct device *d,
8179 struct device_attribute *attr, 8179 struct device_attribute *attr,
8180 const char *buf, size_t count) 8180 const char *buf, size_t count)
8181{ 8181{
8182 struct iwl4965_priv *priv = dev_get_drvdata(d); 8182 struct iwl_priv *priv = dev_get_drvdata(d);
8183 8183
8184 priv->retry_rate = simple_strtoul(buf, NULL, 0); 8184 priv->retry_rate = simple_strtoul(buf, NULL, 0);
8185 if (priv->retry_rate <= 0) 8185 if (priv->retry_rate <= 0)
@@ -8191,7 +8191,7 @@ static ssize_t store_retry_rate(struct device *d,
8191static ssize_t show_retry_rate(struct device *d, 8191static ssize_t show_retry_rate(struct device *d,
8192 struct device_attribute *attr, char *buf) 8192 struct device_attribute *attr, char *buf)
8193{ 8193{
8194 struct iwl4965_priv *priv = dev_get_drvdata(d); 8194 struct iwl_priv *priv = dev_get_drvdata(d);
8195 return sprintf(buf, "%d", priv->retry_rate); 8195 return sprintf(buf, "%d", priv->retry_rate);
8196} 8196}
8197 8197
@@ -8202,7 +8202,7 @@ static ssize_t store_power_level(struct device *d,
8202 struct device_attribute *attr, 8202 struct device_attribute *attr,
8203 const char *buf, size_t count) 8203 const char *buf, size_t count)
8204{ 8204{
8205 struct iwl4965_priv *priv = dev_get_drvdata(d); 8205 struct iwl_priv *priv = dev_get_drvdata(d);
8206 int rc; 8206 int rc;
8207 int mode; 8207 int mode;
8208 8208
@@ -8256,7 +8256,7 @@ static const s32 period_duration[] = {
8256static ssize_t show_power_level(struct device *d, 8256static ssize_t show_power_level(struct device *d,
8257 struct device_attribute *attr, char *buf) 8257 struct device_attribute *attr, char *buf)
8258{ 8258{
8259 struct iwl4965_priv *priv = dev_get_drvdata(d); 8259 struct iwl_priv *priv = dev_get_drvdata(d);
8260 int level = IWL_POWER_LEVEL(priv->power_mode); 8260 int level = IWL_POWER_LEVEL(priv->power_mode);
8261 char *p = buf; 8261 char *p = buf;
8262 8262
@@ -8300,7 +8300,7 @@ static DEVICE_ATTR(channels, S_IRUSR, show_channels, NULL);
8300static ssize_t show_statistics(struct device *d, 8300static ssize_t show_statistics(struct device *d,
8301 struct device_attribute *attr, char *buf) 8301 struct device_attribute *attr, char *buf)
8302{ 8302{
8303 struct iwl4965_priv *priv = dev_get_drvdata(d); 8303 struct iwl_priv *priv = dev_get_drvdata(d);
8304 u32 size = sizeof(struct iwl4965_notif_statistics); 8304 u32 size = sizeof(struct iwl4965_notif_statistics);
8305 u32 len = 0, ofs = 0; 8305 u32 len = 0, ofs = 0;
8306 u8 *data = (u8 *) & priv->statistics; 8306 u8 *data = (u8 *) & priv->statistics;
@@ -8338,7 +8338,7 @@ static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL);
8338static ssize_t show_antenna(struct device *d, 8338static ssize_t show_antenna(struct device *d,
8339 struct device_attribute *attr, char *buf) 8339 struct device_attribute *attr, char *buf)
8340{ 8340{
8341 struct iwl4965_priv *priv = dev_get_drvdata(d); 8341 struct iwl_priv *priv = dev_get_drvdata(d);
8342 8342
8343 if (!iwl4965_is_alive(priv)) 8343 if (!iwl4965_is_alive(priv))
8344 return -EAGAIN; 8344 return -EAGAIN;
@@ -8351,7 +8351,7 @@ static ssize_t store_antenna(struct device *d,
8351 const char *buf, size_t count) 8351 const char *buf, size_t count)
8352{ 8352{
8353 int ant; 8353 int ant;
8354 struct iwl4965_priv *priv = dev_get_drvdata(d); 8354 struct iwl_priv *priv = dev_get_drvdata(d);
8355 8355
8356 if (count == 0) 8356 if (count == 0)
8357 return 0; 8357 return 0;
@@ -8376,7 +8376,7 @@ static DEVICE_ATTR(antenna, S_IWUSR | S_IRUGO, show_antenna, store_antenna);
8376static ssize_t show_status(struct device *d, 8376static ssize_t show_status(struct device *d,
8377 struct device_attribute *attr, char *buf) 8377 struct device_attribute *attr, char *buf)
8378{ 8378{
8379 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8379 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8380 if (!iwl4965_is_alive(priv)) 8380 if (!iwl4965_is_alive(priv))
8381 return -EAGAIN; 8381 return -EAGAIN;
8382 return sprintf(buf, "0x%08x\n", (int)priv->status); 8382 return sprintf(buf, "0x%08x\n", (int)priv->status);
@@ -8391,7 +8391,7 @@ static ssize_t dump_error_log(struct device *d,
8391 char *p = (char *)buf; 8391 char *p = (char *)buf;
8392 8392
8393 if (p[0] == '1') 8393 if (p[0] == '1')
8394 iwl4965_dump_nic_error_log((struct iwl4965_priv *)d->driver_data); 8394 iwl4965_dump_nic_error_log((struct iwl_priv *)d->driver_data);
8395 8395
8396 return strnlen(buf, count); 8396 return strnlen(buf, count);
8397} 8397}
@@ -8405,7 +8405,7 @@ static ssize_t dump_event_log(struct device *d,
8405 char *p = (char *)buf; 8405 char *p = (char *)buf;
8406 8406
8407 if (p[0] == '1') 8407 if (p[0] == '1')
8408 iwl4965_dump_nic_event_log((struct iwl4965_priv *)d->driver_data); 8408 iwl4965_dump_nic_event_log((struct iwl_priv *)d->driver_data);
8409 8409
8410 return strnlen(buf, count); 8410 return strnlen(buf, count);
8411} 8411}
@@ -8418,7 +8418,7 @@ static DEVICE_ATTR(dump_events, S_IWUSR, NULL, dump_event_log);
8418 * 8418 *
8419 *****************************************************************************/ 8419 *****************************************************************************/
8420 8420
8421static void iwl4965_setup_deferred_work(struct iwl4965_priv *priv) 8421static void iwl4965_setup_deferred_work(struct iwl_priv *priv)
8422{ 8422{
8423 priv->workqueue = create_workqueue(DRV_NAME); 8423 priv->workqueue = create_workqueue(DRV_NAME);
8424 8424
@@ -8443,7 +8443,7 @@ static void iwl4965_setup_deferred_work(struct iwl4965_priv *priv)
8443 iwl4965_irq_tasklet, (unsigned long)priv); 8443 iwl4965_irq_tasklet, (unsigned long)priv);
8444} 8444}
8445 8445
8446static void iwl4965_cancel_deferred_work(struct iwl4965_priv *priv) 8446static void iwl4965_cancel_deferred_work(struct iwl_priv *priv)
8447{ 8447{
8448 iwl4965_hw_cancel_deferred_work(priv); 8448 iwl4965_hw_cancel_deferred_work(priv);
8449 8449
@@ -8508,7 +8508,7 @@ static struct ieee80211_ops iwl4965_hw_ops = {
8508static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 8508static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
8509{ 8509{
8510 int err = 0; 8510 int err = 0;
8511 struct iwl4965_priv *priv; 8511 struct iwl_priv *priv;
8512 struct ieee80211_hw *hw; 8512 struct ieee80211_hw *hw;
8513 struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); 8513 struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
8514 int i; 8514 int i;
@@ -8531,7 +8531,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8531 8531
8532 /* mac80211 allocates memory for this device instance, including 8532 /* mac80211 allocates memory for this device instance, including
8533 * space for this driver's private structure */ 8533 * space for this driver's private structure */
8534 hw = ieee80211_alloc_hw(sizeof(struct iwl4965_priv), &iwl4965_hw_ops); 8534 hw = ieee80211_alloc_hw(sizeof(struct iwl_priv), &iwl4965_hw_ops);
8535 if (hw == NULL) { 8535 if (hw == NULL) {
8536 IWL_ERROR("Can not allocate network device\n"); 8536 IWL_ERROR("Can not allocate network device\n");
8537 err = -ENOMEM; 8537 err = -ENOMEM;
@@ -8758,7 +8758,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8758 8758
8759static void iwl4965_pci_remove(struct pci_dev *pdev) 8759static void iwl4965_pci_remove(struct pci_dev *pdev)
8760{ 8760{
8761 struct iwl4965_priv *priv = pci_get_drvdata(pdev); 8761 struct iwl_priv *priv = pci_get_drvdata(pdev);
8762 struct list_head *p, *q; 8762 struct list_head *p, *q;
8763 int i; 8763 int i;
8764 8764
@@ -8822,7 +8822,7 @@ static void iwl4965_pci_remove(struct pci_dev *pdev)
8822 8822
8823static int iwl4965_pci_suspend(struct pci_dev *pdev, pm_message_t state) 8823static int iwl4965_pci_suspend(struct pci_dev *pdev, pm_message_t state)
8824{ 8824{
8825 struct iwl4965_priv *priv = pci_get_drvdata(pdev); 8825 struct iwl_priv *priv = pci_get_drvdata(pdev);
8826 8826
8827 if (priv->is_open) { 8827 if (priv->is_open) {
8828 set_bit(STATUS_IN_SUSPEND, &priv->status); 8828 set_bit(STATUS_IN_SUSPEND, &priv->status);
@@ -8837,7 +8837,7 @@ static int iwl4965_pci_suspend(struct pci_dev *pdev, pm_message_t state)
8837 8837
8838static int iwl4965_pci_resume(struct pci_dev *pdev) 8838static int iwl4965_pci_resume(struct pci_dev *pdev)
8839{ 8839{
8840 struct iwl4965_priv *priv = pci_get_drvdata(pdev); 8840 struct iwl_priv *priv = pci_get_drvdata(pdev);
8841 8841
8842 pci_set_power_state(pdev, PCI_D0); 8842 pci_set_power_state(pdev, PCI_D0);
8843 8843