diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 210 |
1 files changed, 106 insertions, 104 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index f4e395fcb807..960b53b20df8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -44,7 +44,7 @@ extern struct pci_device_id iwl4965_hw_card_ids[]; | |||
44 | #include "iwl-4965-hw.h" | 44 | #include "iwl-4965-hw.h" |
45 | #include "iwl-csr.h" | 45 | #include "iwl-csr.h" |
46 | #include "iwl-prph.h" | 46 | #include "iwl-prph.h" |
47 | #include "iwl-4965-debug.h" | 47 | #include "iwl-debug.h" |
48 | 48 | ||
49 | /* Change firmware file name, using "-" and incrementing number, | 49 | /* Change firmware file name, using "-" and incrementing number, |
50 | * *only* when uCode interface or architecture changes so that it | 50 | * *only* when uCode interface or architecture changes so that it |
@@ -66,11 +66,6 @@ extern struct pci_device_id iwl4965_hw_card_ids[]; | |||
66 | * averages within an s8's (used in some apps) range of negative values. */ | 66 | * averages within an s8's (used in some apps) range of negative values. */ |
67 | #define IWL_NOISE_MEAS_NOT_AVAILABLE (-127) | 67 | #define IWL_NOISE_MEAS_NOT_AVAILABLE (-127) |
68 | 68 | ||
69 | /* Module parameters accessible from iwl-*.c */ | ||
70 | extern int iwl4965_param_hwcrypto; | ||
71 | extern int iwl4965_param_queues_num; | ||
72 | extern int iwl4965_param_amsdu_size_8K; | ||
73 | |||
74 | enum iwl4965_antenna { | 69 | enum iwl4965_antenna { |
75 | IWL_ANTENNA_DIVERSITY, | 70 | IWL_ANTENNA_DIVERSITY, |
76 | IWL_ANTENNA_MAIN, | 71 | IWL_ANTENNA_MAIN, |
@@ -142,7 +137,7 @@ struct iwl4965_tx_info { | |||
142 | struct iwl4965_tx_queue { | 137 | struct iwl4965_tx_queue { |
143 | struct iwl4965_queue q; | 138 | struct iwl4965_queue q; |
144 | struct iwl4965_tfd_frame *bd; | 139 | struct iwl4965_tfd_frame *bd; |
145 | struct iwl4965_cmd *cmd; | 140 | struct iwl_cmd *cmd; |
146 | dma_addr_t dma_addr_cmd; | 141 | dma_addr_t dma_addr_cmd; |
147 | struct iwl4965_tx_info *txb; | 142 | struct iwl4965_tx_info *txb; |
148 | int need_update; | 143 | int need_update; |
@@ -199,7 +194,7 @@ enum { | |||
199 | */ | 194 | */ |
200 | #define IWL4965_MAX_RATE (33) | 195 | #define IWL4965_MAX_RATE (33) |
201 | 196 | ||
202 | struct iwl4965_channel_info { | 197 | struct iwl_channel_info { |
203 | struct iwl4965_channel_tgd_info tgd; | 198 | struct iwl4965_channel_tgd_info tgd; |
204 | struct iwl4965_channel_tgh_info tgh; | 199 | struct iwl4965_channel_tgh_info tgh; |
205 | struct iwl4965_eeprom_channel eeprom; /* EEPROM regulatory limit */ | 200 | struct iwl4965_eeprom_channel eeprom; /* EEPROM regulatory limit */ |
@@ -314,15 +309,15 @@ enum { | |||
314 | CMD_WANT_SKB = (1 << 2), | 309 | CMD_WANT_SKB = (1 << 2), |
315 | }; | 310 | }; |
316 | 311 | ||
317 | struct iwl4965_cmd; | 312 | struct iwl_cmd; |
318 | struct iwl4965_priv; | 313 | struct iwl_priv; |
319 | 314 | ||
320 | struct iwl4965_cmd_meta { | 315 | struct iwl_cmd_meta { |
321 | struct iwl4965_cmd_meta *source; | 316 | struct iwl_cmd_meta *source; |
322 | union { | 317 | union { |
323 | struct sk_buff *skb; | 318 | struct sk_buff *skb; |
324 | int (*callback)(struct iwl4965_priv *priv, | 319 | int (*callback)(struct iwl_priv *priv, |
325 | struct iwl4965_cmd *cmd, struct sk_buff *skb); | 320 | struct iwl_cmd *cmd, struct sk_buff *skb); |
326 | } __attribute__ ((packed)) u; | 321 | } __attribute__ ((packed)) u; |
327 | 322 | ||
328 | /* The CMD_SIZE_HUGE flag bit indicates that the command | 323 | /* The CMD_SIZE_HUGE flag bit indicates that the command |
@@ -332,15 +327,15 @@ struct iwl4965_cmd_meta { | |||
332 | } __attribute__ ((packed)); | 327 | } __attribute__ ((packed)); |
333 | 328 | ||
334 | /** | 329 | /** |
335 | * struct iwl4965_cmd | 330 | * struct iwl_cmd |
336 | * | 331 | * |
337 | * For allocation of the command and tx queues, this establishes the overall | 332 | * For allocation of the command and tx queues, this establishes the overall |
338 | * size of the largest command we send to uCode, except for a scan command | 333 | * size of the largest command we send to uCode, except for a scan command |
339 | * (which is relatively huge; space is allocated separately). | 334 | * (which is relatively huge; space is allocated separately). |
340 | */ | 335 | */ |
341 | struct iwl4965_cmd { | 336 | struct iwl_cmd { |
342 | struct iwl4965_cmd_meta meta; /* driver data */ | 337 | struct iwl_cmd_meta meta; /* driver data */ |
343 | struct iwl4965_cmd_header hdr; /* uCode API */ | 338 | struct iwl_cmd_header hdr; /* uCode API */ |
344 | union { | 339 | union { |
345 | struct iwl4965_addsta_cmd addsta; | 340 | struct iwl4965_addsta_cmd addsta; |
346 | struct iwl4965_led_cmd led; | 341 | struct iwl4965_led_cmd led; |
@@ -360,15 +355,15 @@ struct iwl4965_cmd { | |||
360 | } __attribute__ ((packed)) cmd; | 355 | } __attribute__ ((packed)) cmd; |
361 | } __attribute__ ((packed)); | 356 | } __attribute__ ((packed)); |
362 | 357 | ||
363 | struct iwl4965_host_cmd { | 358 | struct iwl_host_cmd { |
364 | u8 id; | 359 | u8 id; |
365 | u16 len; | 360 | u16 len; |
366 | struct iwl4965_cmd_meta meta; | 361 | struct iwl_cmd_meta meta; |
367 | const void *data; | 362 | const void *data; |
368 | }; | 363 | }; |
369 | 364 | ||
370 | #define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl4965_cmd) - \ | 365 | #define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl_cmd) - \ |
371 | sizeof(struct iwl4965_cmd_meta)) | 366 | sizeof(struct iwl_cmd_meta)) |
372 | 367 | ||
373 | /* | 368 | /* |
374 | * RX related structures and functions | 369 | * RX related structures and functions |
@@ -483,6 +478,7 @@ struct iwl4965_tid_data { | |||
483 | struct iwl4965_hw_key { | 478 | struct iwl4965_hw_key { |
484 | enum ieee80211_key_alg alg; | 479 | enum ieee80211_key_alg alg; |
485 | int keylen; | 480 | int keylen; |
481 | struct ieee80211_key_conf *conf; | ||
486 | u8 key[32]; | 482 | u8 key[32]; |
487 | }; | 483 | }; |
488 | 484 | ||
@@ -634,51 +630,50 @@ struct iwl4965_driver_hw_info { | |||
634 | * | 630 | * |
635 | *****************************************************************************/ | 631 | *****************************************************************************/ |
636 | struct iwl4965_addsta_cmd; | 632 | struct iwl4965_addsta_cmd; |
637 | extern int iwl4965_send_add_station(struct iwl4965_priv *priv, | 633 | extern int iwl4965_send_add_station(struct iwl_priv *priv, |
638 | struct iwl4965_addsta_cmd *sta, u8 flags); | 634 | struct iwl4965_addsta_cmd *sta, u8 flags); |
639 | extern u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr, | 635 | extern u8 iwl4965_add_station_flags(struct iwl_priv *priv, const u8 *addr, |
640 | int is_ap, u8 flags, void *ht_data); | 636 | int is_ap, u8 flags, void *ht_data); |
641 | extern int iwl4965_is_network_packet(struct iwl4965_priv *priv, | 637 | extern int iwl4965_is_network_packet(struct iwl_priv *priv, |
642 | struct ieee80211_hdr *header); | 638 | struct ieee80211_hdr *header); |
643 | extern int iwl4965_power_init_handle(struct iwl4965_priv *priv); | 639 | extern int iwl4965_power_init_handle(struct iwl_priv *priv); |
644 | extern void iwl4965_handle_data_packet_monitor(struct iwl4965_priv *priv, | 640 | extern void iwl4965_handle_data_packet_monitor(struct iwl_priv *priv, |
645 | struct iwl4965_rx_mem_buffer *rxb, | 641 | struct iwl4965_rx_mem_buffer *rxb, |
646 | void *data, short len, | 642 | void *data, short len, |
647 | struct ieee80211_rx_status *stats, | 643 | struct ieee80211_rx_status *stats, |
648 | u16 phy_flags); | 644 | u16 phy_flags); |
649 | extern int iwl4965_is_duplicate_packet(struct iwl4965_priv *priv, | 645 | extern int iwl4965_is_duplicate_packet(struct iwl_priv *priv, |
650 | struct ieee80211_hdr *header); | 646 | struct ieee80211_hdr *header); |
651 | extern int iwl4965_rx_queue_alloc(struct iwl4965_priv *priv); | 647 | extern int iwl4965_rx_queue_alloc(struct iwl_priv *priv); |
652 | extern void iwl4965_rx_queue_reset(struct iwl4965_priv *priv, | 648 | extern void iwl4965_rx_queue_reset(struct iwl_priv *priv, |
653 | struct iwl4965_rx_queue *rxq); | 649 | struct iwl4965_rx_queue *rxq); |
654 | extern int iwl4965_calc_db_from_ratio(int sig_ratio); | 650 | extern int iwl4965_calc_db_from_ratio(int sig_ratio); |
655 | extern int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm); | 651 | extern int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm); |
656 | extern int iwl4965_tx_queue_init(struct iwl4965_priv *priv, | 652 | extern int iwl4965_tx_queue_init(struct iwl_priv *priv, |
657 | struct iwl4965_tx_queue *txq, int count, u32 id); | 653 | struct iwl4965_tx_queue *txq, int count, u32 id); |
658 | extern void iwl4965_rx_replenish(void *data); | 654 | extern void iwl4965_rx_replenish(void *data); |
659 | extern void iwl4965_tx_queue_free(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq); | 655 | extern void iwl4965_tx_queue_free(struct iwl_priv *priv, struct iwl4965_tx_queue *txq); |
660 | extern int iwl4965_send_cmd_pdu(struct iwl4965_priv *priv, u8 id, u16 len, | 656 | extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv, |
661 | const void *data); | ||
662 | extern int __must_check iwl4965_send_cmd(struct iwl4965_priv *priv, | ||
663 | struct iwl4965_host_cmd *cmd); | ||
664 | extern unsigned int iwl4965_fill_beacon_frame(struct iwl4965_priv *priv, | ||
665 | struct ieee80211_hdr *hdr, | 657 | struct ieee80211_hdr *hdr, |
666 | const u8 *dest, int left); | 658 | const u8 *dest, int left); |
667 | extern int iwl4965_rx_queue_update_write_ptr(struct iwl4965_priv *priv, | 659 | extern int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv, |
668 | struct iwl4965_rx_queue *q); | 660 | struct iwl4965_rx_queue *q); |
669 | extern int iwl4965_send_statistics_request(struct iwl4965_priv *priv); | 661 | extern int iwl4965_send_statistics_request(struct iwl_priv *priv); |
670 | extern void iwl4965_set_decrypted_flag(struct iwl4965_priv *priv, struct sk_buff *skb, | 662 | extern void iwl4965_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb, |
671 | u32 decrypt_res, | 663 | u32 decrypt_res, |
672 | struct ieee80211_rx_status *stats); | 664 | struct ieee80211_rx_status *stats); |
673 | extern __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr); | 665 | extern __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr); |
666 | int iwl4965_init_geos(struct iwl_priv *priv); | ||
667 | void iwl4965_free_geos(struct iwl_priv *priv); | ||
674 | 668 | ||
675 | extern const u8 iwl4965_broadcast_addr[ETH_ALEN]; | 669 | extern const u8 iwl4965_broadcast_addr[ETH_ALEN]; |
670 | int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd); | ||
676 | 671 | ||
677 | /* | 672 | /* |
678 | * Currently used by iwl-3945-rs... look at restructuring so that it doesn't | 673 | * Currently used by iwl-3945-rs... look at restructuring so that it doesn't |
679 | * call this... todo... fix that. | 674 | * call this... todo... fix that. |
680 | */ | 675 | */ |
681 | extern u8 iwl4965_sync_station(struct iwl4965_priv *priv, int sta_id, | 676 | extern u8 iwl4965_sync_station(struct iwl_priv *priv, int sta_id, |
682 | u16 tx_rate, u8 flags); | 677 | u16 tx_rate, u8 flags); |
683 | 678 | ||
684 | /****************************************************************************** | 679 | /****************************************************************************** |
@@ -697,36 +692,36 @@ extern u8 iwl4965_sync_station(struct iwl4965_priv *priv, int sta_id, | |||
697 | * iwl4965_mac_ <-- mac80211 callback | 692 | * iwl4965_mac_ <-- mac80211 callback |
698 | * | 693 | * |
699 | ****************************************************************************/ | 694 | ****************************************************************************/ |
700 | extern void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv); | 695 | extern void iwl4965_hw_rx_handler_setup(struct iwl_priv *priv); |
701 | extern void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv); | 696 | extern void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv); |
702 | extern void iwl4965_hw_cancel_deferred_work(struct iwl4965_priv *priv); | 697 | extern void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv); |
703 | extern int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv); | 698 | extern int iwl4965_hw_rxq_stop(struct iwl_priv *priv); |
704 | extern int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv); | 699 | extern int iwl4965_hw_set_hw_setting(struct iwl_priv *priv); |
705 | extern int iwl4965_hw_nic_init(struct iwl4965_priv *priv); | 700 | extern int iwl4965_hw_nic_init(struct iwl_priv *priv); |
706 | extern int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv); | 701 | extern int iwl4965_hw_nic_stop_master(struct iwl_priv *priv); |
707 | extern void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv); | 702 | extern void iwl4965_hw_txq_ctx_free(struct iwl_priv *priv); |
708 | extern void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv); | 703 | extern void iwl4965_hw_txq_ctx_stop(struct iwl_priv *priv); |
709 | extern int iwl4965_hw_nic_reset(struct iwl4965_priv *priv); | 704 | extern int iwl4965_hw_nic_reset(struct iwl_priv *priv); |
710 | extern int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *tfd, | 705 | extern int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *tfd, |
711 | dma_addr_t addr, u16 len); | 706 | dma_addr_t addr, u16 len); |
712 | extern int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq); | 707 | extern int iwl4965_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl4965_tx_queue *txq); |
713 | extern int iwl4965_hw_get_temperature(struct iwl4965_priv *priv); | 708 | extern int iwl4965_hw_get_temperature(struct iwl_priv *priv); |
714 | extern int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, | 709 | extern int iwl4965_hw_tx_queue_init(struct iwl_priv *priv, |
715 | struct iwl4965_tx_queue *txq); | 710 | struct iwl4965_tx_queue *txq); |
716 | extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv, | 711 | extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv, |
717 | struct iwl4965_frame *frame, u8 rate); | 712 | struct iwl4965_frame *frame, u8 rate); |
718 | extern int iwl4965_hw_get_rx_read(struct iwl4965_priv *priv); | 713 | extern int iwl4965_hw_get_rx_read(struct iwl_priv *priv); |
719 | extern void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv, | 714 | extern void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv, |
720 | struct iwl4965_cmd *cmd, | 715 | struct iwl_cmd *cmd, |
721 | struct ieee80211_tx_control *ctrl, | 716 | struct ieee80211_tx_control *ctrl, |
722 | struct ieee80211_hdr *hdr, | 717 | struct ieee80211_hdr *hdr, |
723 | int sta_id, int tx_id); | 718 | int sta_id, int tx_id); |
724 | extern int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv); | 719 | extern int iwl4965_hw_reg_send_txpower(struct iwl_priv *priv); |
725 | extern int iwl4965_hw_reg_set_txpower(struct iwl4965_priv *priv, s8 power); | 720 | extern int iwl4965_hw_reg_set_txpower(struct iwl_priv *priv, s8 power); |
726 | extern void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv, | 721 | extern void iwl4965_hw_rx_statistics(struct iwl_priv *priv, |
727 | struct iwl4965_rx_mem_buffer *rxb); | 722 | struct iwl4965_rx_mem_buffer *rxb); |
728 | extern void iwl4965_disable_events(struct iwl4965_priv *priv); | 723 | extern void iwl4965_disable_events(struct iwl_priv *priv); |
729 | extern int iwl4965_get_temperature(const struct iwl4965_priv *priv); | 724 | extern int iwl4965_get_temperature(const struct iwl_priv *priv); |
730 | 725 | ||
731 | /** | 726 | /** |
732 | * iwl4965_hw_find_station - Find station id for a given BSSID | 727 | * iwl4965_hw_find_station - Find station id for a given BSSID |
@@ -736,51 +731,48 @@ extern int iwl4965_get_temperature(const struct iwl4965_priv *priv); | |||
736 | * not yet been merged into a single common layer for managing the | 731 | * not yet been merged into a single common layer for managing the |
737 | * station tables. | 732 | * station tables. |
738 | */ | 733 | */ |
739 | extern u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *bssid); | 734 | extern u8 iwl4965_hw_find_station(struct iwl_priv *priv, const u8 *bssid); |
740 | 735 | ||
741 | extern int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel); | 736 | extern int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel); |
742 | extern int iwl4965_tx_queue_reclaim(struct iwl4965_priv *priv, int txq_id, int index); | 737 | extern int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index); |
743 | extern int iwl4965_queue_space(const struct iwl4965_queue *q); | 738 | extern int iwl4965_queue_space(const struct iwl4965_queue *q); |
744 | struct iwl4965_priv; | 739 | struct iwl_priv; |
745 | 740 | ||
746 | /* | 741 | /* |
747 | * Forward declare iwl-4965.c functions for iwl-base.c | 742 | * Forward declare iwl-4965.c functions for iwl-base.c |
748 | */ | 743 | */ |
749 | extern int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv, | 744 | extern int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv, |
750 | struct iwl4965_tx_queue *txq, | 745 | struct iwl4965_tx_queue *txq, |
751 | u16 byte_cnt); | 746 | u16 byte_cnt); |
752 | extern void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, | 747 | extern void iwl4965_add_station(struct iwl_priv *priv, const u8 *addr, |
753 | int is_ap); | 748 | int is_ap); |
754 | extern void iwl4965_set_rxon_chain(struct iwl4965_priv *priv); | 749 | extern void iwl4965_set_rxon_chain(struct iwl_priv *priv); |
755 | extern int iwl4965_alive_notify(struct iwl4965_priv *priv); | 750 | extern int iwl4965_alive_notify(struct iwl_priv *priv); |
756 | extern void iwl4965_update_rate_scaling(struct iwl4965_priv *priv, u8 mode); | 751 | extern void iwl4965_update_rate_scaling(struct iwl_priv *priv, u8 mode); |
757 | extern void iwl4965_chain_noise_reset(struct iwl4965_priv *priv); | 752 | extern void iwl4965_chain_noise_reset(struct iwl_priv *priv); |
758 | extern void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, | 753 | extern void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags, |
759 | u8 force); | 754 | u8 force); |
760 | extern int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv, | 755 | extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv); |
761 | enum ieee80211_band band, | 756 | extern void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv, |
762 | u16 channel, | ||
763 | const struct iwl4965_eeprom_channel *eeprom_ch, | ||
764 | u8 fat_extension_channel); | ||
765 | extern void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv); | ||
766 | extern void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, | ||
767 | u32 rate_n_flags, | 757 | u32 rate_n_flags, |
768 | struct ieee80211_tx_control *control); | 758 | struct ieee80211_tx_control *control); |
769 | 759 | ||
770 | #ifdef CONFIG_IWL4965_HT | 760 | #ifdef CONFIG_IWL4965_HT |
771 | void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, | 761 | void iwl4965_init_ht_hw_capab(struct iwl_priv *priv, |
762 | struct ieee80211_ht_info *ht_info, | ||
772 | enum ieee80211_band band); | 763 | enum ieee80211_band band); |
773 | void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, | 764 | void iwl4965_set_rxon_ht(struct iwl_priv *priv, |
774 | struct iwl_ht_info *ht_info); | 765 | struct iwl_ht_info *ht_info); |
775 | void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index, | 766 | void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index, |
776 | struct ieee80211_ht_info *sta_ht_inf); | 767 | struct ieee80211_ht_info *sta_ht_inf); |
777 | int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, | 768 | int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, |
778 | enum ieee80211_ampdu_mlme_action action, | 769 | enum ieee80211_ampdu_mlme_action action, |
779 | const u8 *addr, u16 tid, u16 *ssn); | 770 | const u8 *addr, u16 tid, u16 *ssn); |
780 | int iwl4965_check_empty_hw_queue(struct iwl4965_priv *priv, int sta_id, | 771 | int iwl4965_check_empty_hw_queue(struct iwl_priv *priv, int sta_id, |
781 | u8 tid, int txq_id); | 772 | u8 tid, int txq_id); |
782 | #else | 773 | #else |
783 | static inline void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, | 774 | static inline void iwl4965_init_ht_hw_capab(struct iwl_priv *priv, |
775 | struct ieee80211_ht_info *ht_info, | ||
784 | enum ieee80211_band band) {} | 776 | enum ieee80211_band band) {} |
785 | 777 | ||
786 | #endif /*CONFIG_IWL4965_HT */ | 778 | #endif /*CONFIG_IWL4965_HT */ |
@@ -966,7 +958,7 @@ enum { | |||
966 | 958 | ||
967 | #endif | 959 | #endif |
968 | 960 | ||
969 | struct iwl4965_priv { | 961 | struct iwl_priv { |
970 | 962 | ||
971 | /* ieee device used by generic ieee processing code */ | 963 | /* ieee device used by generic ieee processing code */ |
972 | struct ieee80211_hw *hw; | 964 | struct ieee80211_hw *hw; |
@@ -982,7 +974,7 @@ struct iwl4965_priv { | |||
982 | int alloc_rxb_skb; | 974 | int alloc_rxb_skb; |
983 | bool add_radiotap; | 975 | bool add_radiotap; |
984 | 976 | ||
985 | void (*rx_handlers[REPLY_MAX])(struct iwl4965_priv *priv, | 977 | void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv, |
986 | struct iwl4965_rx_mem_buffer *rxb); | 978 | struct iwl4965_rx_mem_buffer *rxb); |
987 | 979 | ||
988 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 980 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; |
@@ -997,7 +989,7 @@ struct iwl4965_priv { | |||
997 | 989 | ||
998 | /* we allocate array of iwl4965_channel_info for NIC's valid channels. | 990 | /* we allocate array of iwl4965_channel_info for NIC's valid channels. |
999 | * Access via channel # using indirect index array */ | 991 | * Access via channel # using indirect index array */ |
1000 | struct iwl4965_channel_info *channel_info; /* channel info array */ | 992 | struct iwl_channel_info *channel_info; /* channel info array */ |
1001 | u8 channel_count; /* # of channels */ | 993 | u8 channel_count; /* # of channels */ |
1002 | 994 | ||
1003 | /* each calibration channel group in the EEPROM has a derived | 995 | /* each calibration channel group in the EEPROM has a derived |
@@ -1107,6 +1099,12 @@ struct iwl4965_priv { | |||
1107 | int last_rx_rssi; /* From Rx packet statisitics */ | 1099 | int last_rx_rssi; /* From Rx packet statisitics */ |
1108 | int last_rx_noise; /* From beacon statistics */ | 1100 | int last_rx_noise; /* From beacon statistics */ |
1109 | 1101 | ||
1102 | /* counts mgmt, ctl, and data packets */ | ||
1103 | struct traffic_stats { | ||
1104 | u32 cnt; | ||
1105 | u64 bytes; | ||
1106 | } tx_stats[3], rx_stats[3]; | ||
1107 | |||
1110 | struct iwl4965_power_mgr power_data; | 1108 | struct iwl4965_power_mgr power_data; |
1111 | 1109 | ||
1112 | struct iwl4965_notif_statistics statistics; | 1110 | struct iwl4965_notif_statistics statistics; |
@@ -1202,11 +1200,15 @@ struct iwl4965_priv { | |||
1202 | u32 pm_state[16]; | 1200 | u32 pm_state[16]; |
1203 | #endif | 1201 | #endif |
1204 | 1202 | ||
1205 | #ifdef CONFIG_IWL4965_DEBUG | 1203 | #ifdef CONFIG_IWLWIFI_DEBUG |
1206 | /* debugging info */ | 1204 | /* debugging info */ |
1207 | u32 framecnt_to_us; | 1205 | u32 framecnt_to_us; |
1208 | atomic_t restrict_refcnt; | 1206 | atomic_t restrict_refcnt; |
1209 | #endif | 1207 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1208 | /* debugfs */ | ||
1209 | struct iwl_debugfs *dbgfs; | ||
1210 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ | ||
1211 | #endif /* CONFIG_IWLWIFI_DEBUG */ | ||
1210 | 1212 | ||
1211 | struct work_struct txpower_work; | 1213 | struct work_struct txpower_work; |
1212 | #ifdef CONFIG_IWL4965_SENSITIVITY | 1214 | #ifdef CONFIG_IWL4965_SENSITIVITY |
@@ -1214,54 +1216,54 @@ struct iwl4965_priv { | |||
1214 | #endif | 1216 | #endif |
1215 | struct work_struct statistics_work; | 1217 | struct work_struct statistics_work; |
1216 | struct timer_list statistics_periodic; | 1218 | struct timer_list statistics_periodic; |
1217 | }; /*iwl4965_priv */ | 1219 | }; /*iwl_priv */ |
1218 | 1220 | ||
1219 | static inline int iwl4965_is_associated(struct iwl4965_priv *priv) | 1221 | static inline int iwl4965_is_associated(struct iwl_priv *priv) |
1220 | { | 1222 | { |
1221 | return (priv->active_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0; | 1223 | return (priv->active_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0; |
1222 | } | 1224 | } |
1223 | 1225 | ||
1224 | static inline int is_channel_valid(const struct iwl4965_channel_info *ch_info) | 1226 | static inline int is_channel_valid(const struct iwl_channel_info *ch_info) |
1225 | { | 1227 | { |
1226 | if (ch_info == NULL) | 1228 | if (ch_info == NULL) |
1227 | return 0; | 1229 | return 0; |
1228 | return (ch_info->flags & EEPROM_CHANNEL_VALID) ? 1 : 0; | 1230 | return (ch_info->flags & EEPROM_CHANNEL_VALID) ? 1 : 0; |
1229 | } | 1231 | } |
1230 | 1232 | ||
1231 | static inline int is_channel_narrow(const struct iwl4965_channel_info *ch_info) | 1233 | static inline int is_channel_narrow(const struct iwl_channel_info *ch_info) |
1232 | { | 1234 | { |
1233 | return (ch_info->flags & EEPROM_CHANNEL_NARROW) ? 1 : 0; | 1235 | return (ch_info->flags & EEPROM_CHANNEL_NARROW) ? 1 : 0; |
1234 | } | 1236 | } |
1235 | 1237 | ||
1236 | static inline int is_channel_radar(const struct iwl4965_channel_info *ch_info) | 1238 | static inline int is_channel_radar(const struct iwl_channel_info *ch_info) |
1237 | { | 1239 | { |
1238 | return (ch_info->flags & EEPROM_CHANNEL_RADAR) ? 1 : 0; | 1240 | return (ch_info->flags & EEPROM_CHANNEL_RADAR) ? 1 : 0; |
1239 | } | 1241 | } |
1240 | 1242 | ||
1241 | static inline u8 is_channel_a_band(const struct iwl4965_channel_info *ch_info) | 1243 | static inline u8 is_channel_a_band(const struct iwl_channel_info *ch_info) |
1242 | { | 1244 | { |
1243 | return ch_info->band == IEEE80211_BAND_5GHZ; | 1245 | return ch_info->band == IEEE80211_BAND_5GHZ; |
1244 | } | 1246 | } |
1245 | 1247 | ||
1246 | static inline u8 is_channel_bg_band(const struct iwl4965_channel_info *ch_info) | 1248 | static inline u8 is_channel_bg_band(const struct iwl_channel_info *ch_info) |
1247 | { | 1249 | { |
1248 | return ch_info->band == IEEE80211_BAND_2GHZ; | 1250 | return ch_info->band == IEEE80211_BAND_2GHZ; |
1249 | } | 1251 | } |
1250 | 1252 | ||
1251 | static inline int is_channel_passive(const struct iwl4965_channel_info *ch) | 1253 | static inline int is_channel_passive(const struct iwl_channel_info *ch) |
1252 | { | 1254 | { |
1253 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; | 1255 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; |
1254 | } | 1256 | } |
1255 | 1257 | ||
1256 | static inline int is_channel_ibss(const struct iwl4965_channel_info *ch) | 1258 | static inline int is_channel_ibss(const struct iwl_channel_info *ch) |
1257 | { | 1259 | { |
1258 | return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0; | 1260 | return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0; |
1259 | } | 1261 | } |
1260 | 1262 | ||
1261 | extern const struct iwl4965_channel_info *iwl4965_get_channel_info( | 1263 | extern const struct iwl_channel_info *iwl_get_channel_info( |
1262 | const struct iwl4965_priv *priv, enum ieee80211_band band, u16 channel); | 1264 | const struct iwl_priv *priv, enum ieee80211_band band, u16 channel); |
1263 | 1265 | ||
1264 | /* Requires full declaration of iwl4965_priv before including */ | 1266 | /* Requires full declaration of iwl_priv before including */ |
1265 | #include "iwl-4965-io.h" | 1267 | #include "iwl-4965-io.h" |
1266 | 1268 | ||
1267 | #endif /* __iwl4965_4965_h__ */ | 1269 | #endif /* __iwl4965_4965_h__ */ |