aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-03-12 19:58:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:47 -0400
commitc79dd5b5bc5a65822cdc9d571032c469ad7577d5 (patch)
tree9056b3470264641eb6d4f25fedef5cde5f1c069d /drivers/net/wireless/iwlwifi/iwl-4965.c
parent0a6857e70d577237bb1cd1c991e68e7d3b6f7c90 (diff)
iwlwifi: rename struct iwl4965_priv to struct iwl_priv
This patch renames iwl4965_priv to iwl_priv. iwl_priv will be shared by more hw. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c178
1 files changed, 89 insertions, 89 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 2896af28981a..7b0ad728f927 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -43,7 +43,7 @@
43#include "iwl-4965.h" 43#include "iwl-4965.h"
44#include "iwl-helpers.h" 44#include "iwl-helpers.h"
45 45
46static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv); 46static void iwl4965_hw_card_show_info(struct iwl_priv *priv);
47 47
48#define IWL_DECLARE_RATE_INFO(r, s, ip, in, rp, rn, pp, np) \ 48#define IWL_DECLARE_RATE_INFO(r, s, ip, in, rp, rn, pp, np) \
49 [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \ 49 [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \
@@ -111,7 +111,7 @@ static int is_fat_channel(__le32 rxon_flags)
111 (rxon_flags & RXON_FLG_CHANNEL_MODE_MIXED_MSK); 111 (rxon_flags & RXON_FLG_CHANNEL_MODE_MIXED_MSK);
112} 112}
113 113
114static u8 is_single_stream(struct iwl4965_priv *priv) 114static u8 is_single_stream(struct iwl_priv *priv)
115{ 115{
116#ifdef CONFIG_IWL4965_HT 116#ifdef CONFIG_IWL4965_HT
117 if (!priv->current_ht_config.is_ht || 117 if (!priv->current_ht_config.is_ht ||
@@ -155,7 +155,7 @@ int iwl4965_hwrate_to_plcp_idx(u32 rate_n_flags)
155/** 155/**
156 * translate ucode response to mac80211 tx status control values 156 * translate ucode response to mac80211 tx status control values
157 */ 157 */
158void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, u32 rate_n_flags, 158void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
159 struct ieee80211_tx_control *control) 159 struct ieee80211_tx_control *control)
160{ 160{
161 int rate_index; 161 int rate_index;
@@ -188,7 +188,7 @@ void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, u32 rate_n_flags,
188 * MIMO (dual stream) requires at least 2, but works better with 3. 188 * MIMO (dual stream) requires at least 2, but works better with 3.
189 * This does not determine *which* chains to use, just how many. 189 * This does not determine *which* chains to use, just how many.
190 */ 190 */
191static int iwl4965_get_rx_chain_counter(struct iwl4965_priv *priv, 191static int iwl4965_get_rx_chain_counter(struct iwl_priv *priv,
192 u8 *idle_state, u8 *rx_state) 192 u8 *idle_state, u8 *rx_state)
193{ 193{
194 u8 is_single = is_single_stream(priv); 194 u8 is_single = is_single_stream(priv);
@@ -217,7 +217,7 @@ static int iwl4965_get_rx_chain_counter(struct iwl4965_priv *priv,
217 return 0; 217 return 0;
218} 218}
219 219
220int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv) 220int iwl4965_hw_rxq_stop(struct iwl_priv *priv)
221{ 221{
222 int rc; 222 int rc;
223 unsigned long flags; 223 unsigned long flags;
@@ -242,7 +242,7 @@ int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv)
242 return 0; 242 return 0;
243} 243}
244 244
245u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *addr) 245u8 iwl4965_hw_find_station(struct iwl_priv *priv, const u8 *addr)
246{ 246{
247 int i; 247 int i;
248 int start = 0; 248 int start = 0;
@@ -274,7 +274,7 @@ u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *addr)
274 return ret; 274 return ret;
275} 275}
276 276
277static int iwl4965_nic_set_pwr_src(struct iwl4965_priv *priv, int pwr_max) 277static int iwl4965_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max)
278{ 278{
279 int ret; 279 int ret;
280 unsigned long flags; 280 unsigned long flags;
@@ -307,7 +307,7 @@ static int iwl4965_nic_set_pwr_src(struct iwl4965_priv *priv, int pwr_max)
307 return ret; 307 return ret;
308} 308}
309 309
310static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *rxq) 310static int iwl4965_rx_init(struct iwl_priv *priv, struct iwl4965_rx_queue *rxq)
311{ 311{
312 int rc; 312 int rc;
313 unsigned long flags; 313 unsigned long flags;
@@ -360,7 +360,7 @@ static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *r
360} 360}
361 361
362/* Tell 4965 where to find the "keep warm" buffer */ 362/* Tell 4965 where to find the "keep warm" buffer */
363static int iwl4965_kw_init(struct iwl4965_priv *priv) 363static int iwl4965_kw_init(struct iwl_priv *priv)
364{ 364{
365 unsigned long flags; 365 unsigned long flags;
366 int rc; 366 int rc;
@@ -378,7 +378,7 @@ out:
378 return rc; 378 return rc;
379} 379}
380 380
381static int iwl4965_kw_alloc(struct iwl4965_priv *priv) 381static int iwl4965_kw_alloc(struct iwl_priv *priv)
382{ 382{
383 struct pci_dev *dev = priv->pci_dev; 383 struct pci_dev *dev = priv->pci_dev;
384 struct iwl4965_kw *kw = &priv->kw; 384 struct iwl4965_kw *kw = &priv->kw;
@@ -399,7 +399,7 @@ static int iwl4965_kw_alloc(struct iwl4965_priv *priv)
399 * 399 *
400 * Does not set up a command, or touch hardware. 400 * Does not set up a command, or touch hardware.
401 */ 401 */
402int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv, 402int iwl4965_set_fat_chan_info(struct iwl_priv *priv,
403 enum ieee80211_band band, u16 channel, 403 enum ieee80211_band band, u16 channel,
404 const struct iwl4965_eeprom_channel *eeprom_ch, 404 const struct iwl4965_eeprom_channel *eeprom_ch,
405 u8 fat_extension_channel) 405 u8 fat_extension_channel)
@@ -443,7 +443,7 @@ int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv,
443/** 443/**
444 * iwl4965_kw_free - Free the "keep warm" buffer 444 * iwl4965_kw_free - Free the "keep warm" buffer
445 */ 445 */
446static void iwl4965_kw_free(struct iwl4965_priv *priv) 446static void iwl4965_kw_free(struct iwl_priv *priv)
447{ 447{
448 struct pci_dev *dev = priv->pci_dev; 448 struct pci_dev *dev = priv->pci_dev;
449 struct iwl4965_kw *kw = &priv->kw; 449 struct iwl4965_kw *kw = &priv->kw;
@@ -461,7 +461,7 @@ static void iwl4965_kw_free(struct iwl4965_priv *priv)
461 * @param priv 461 * @param priv
462 * @return error code 462 * @return error code
463 */ 463 */
464static int iwl4965_txq_ctx_reset(struct iwl4965_priv *priv) 464static int iwl4965_txq_ctx_reset(struct iwl_priv *priv)
465{ 465{
466 int rc = 0; 466 int rc = 0;
467 int txq_id, slots_num; 467 int txq_id, slots_num;
@@ -523,7 +523,7 @@ static int iwl4965_txq_ctx_reset(struct iwl4965_priv *priv)
523 return rc; 523 return rc;
524} 524}
525 525
526int iwl4965_hw_nic_init(struct iwl4965_priv *priv) 526int iwl4965_hw_nic_init(struct iwl_priv *priv)
527{ 527{
528 int rc; 528 int rc;
529 unsigned long flags; 529 unsigned long flags;
@@ -668,7 +668,7 @@ int iwl4965_hw_nic_init(struct iwl4965_priv *priv)
668 return 0; 668 return 0;
669} 669}
670 670
671int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv) 671int iwl4965_hw_nic_stop_master(struct iwl_priv *priv)
672{ 672{
673 int rc = 0; 673 int rc = 0;
674 u32 reg_val; 674 u32 reg_val;
@@ -704,7 +704,7 @@ int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv)
704/** 704/**
705 * iwl4965_hw_txq_ctx_stop - Stop all Tx DMA channels, free Tx queue memory 705 * iwl4965_hw_txq_ctx_stop - Stop all Tx DMA channels, free Tx queue memory
706 */ 706 */
707void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv) 707void iwl4965_hw_txq_ctx_stop(struct iwl_priv *priv)
708{ 708{
709 709
710 int txq_id; 710 int txq_id;
@@ -732,7 +732,7 @@ void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv)
732 iwl4965_hw_txq_ctx_free(priv); 732 iwl4965_hw_txq_ctx_free(priv);
733} 733}
734 734
735int iwl4965_hw_nic_reset(struct iwl4965_priv *priv) 735int iwl4965_hw_nic_reset(struct iwl_priv *priv)
736{ 736{
737 int rc = 0; 737 int rc = 0;
738 unsigned long flags; 738 unsigned long flags;
@@ -793,7 +793,7 @@ int iwl4965_hw_nic_reset(struct iwl4965_priv *priv)
793 */ 793 */
794static void iwl4965_bg_statistics_periodic(unsigned long data) 794static void iwl4965_bg_statistics_periodic(unsigned long data)
795{ 795{
796 struct iwl4965_priv *priv = (struct iwl4965_priv *)data; 796 struct iwl_priv *priv = (struct iwl_priv *)data;
797 797
798 queue_work(priv->workqueue, &priv->statistics_work); 798 queue_work(priv->workqueue, &priv->statistics_work);
799} 799}
@@ -805,7 +805,7 @@ static void iwl4965_bg_statistics_periodic(unsigned long data)
805 */ 805 */
806static void iwl4965_bg_statistics_work(struct work_struct *work) 806static void iwl4965_bg_statistics_work(struct work_struct *work)
807{ 807{
808 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, 808 struct iwl_priv *priv = container_of(work, struct iwl_priv,
809 statistics_work); 809 statistics_work);
810 810
811 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 811 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
@@ -819,7 +819,7 @@ static void iwl4965_bg_statistics_work(struct work_struct *work)
819#define CT_LIMIT_CONST 259 819#define CT_LIMIT_CONST 259
820#define TM_CT_KILL_THRESHOLD 110 820#define TM_CT_KILL_THRESHOLD 110
821 821
822void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv) 822void iwl4965_rf_kill_ct_config(struct iwl_priv *priv)
823{ 823{
824 struct iwl4965_ct_kill_config cmd; 824 struct iwl4965_ct_kill_config cmd;
825 u32 R1, R2, R3; 825 u32 R1, R2, R3;
@@ -865,7 +865,7 @@ void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv)
865 * enough to receive all of our own network traffic, but not so 865 * enough to receive all of our own network traffic, but not so
866 * high that our DSP gets too busy trying to lock onto non-network 866 * high that our DSP gets too busy trying to lock onto non-network
867 * activity/noise. */ 867 * activity/noise. */
868static int iwl4965_sens_energy_cck(struct iwl4965_priv *priv, 868static int iwl4965_sens_energy_cck(struct iwl_priv *priv,
869 u32 norm_fa, 869 u32 norm_fa,
870 u32 rx_enable_time, 870 u32 rx_enable_time,
871 struct statistics_general_data *rx_info) 871 struct statistics_general_data *rx_info)
@@ -1056,7 +1056,7 @@ static int iwl4965_sens_energy_cck(struct iwl4965_priv *priv,
1056} 1056}
1057 1057
1058 1058
1059static int iwl4965_sens_auto_corr_ofdm(struct iwl4965_priv *priv, 1059static int iwl4965_sens_auto_corr_ofdm(struct iwl_priv *priv,
1060 u32 norm_fa, 1060 u32 norm_fa,
1061 u32 rx_enable_time) 1061 u32 rx_enable_time)
1062{ 1062{
@@ -1121,7 +1121,7 @@ static int iwl4965_sens_auto_corr_ofdm(struct iwl4965_priv *priv,
1121 return 0; 1121 return 0;
1122} 1122}
1123 1123
1124static int iwl4965_sensitivity_callback(struct iwl4965_priv *priv, 1124static int iwl4965_sensitivity_callback(struct iwl_priv *priv,
1125 struct iwl4965_cmd *cmd, struct sk_buff *skb) 1125 struct iwl4965_cmd *cmd, struct sk_buff *skb)
1126{ 1126{
1127 /* We didn't cache the SKB; let the caller free it */ 1127 /* We didn't cache the SKB; let the caller free it */
@@ -1129,7 +1129,7 @@ static int iwl4965_sensitivity_callback(struct iwl4965_priv *priv,
1129} 1129}
1130 1130
1131/* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */ 1131/* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */
1132static int iwl4965_sensitivity_write(struct iwl4965_priv *priv, u8 flags) 1132static int iwl4965_sensitivity_write(struct iwl_priv *priv, u8 flags)
1133{ 1133{
1134 int rc = 0; 1134 int rc = 0;
1135 struct iwl4965_sensitivity_cmd cmd ; 1135 struct iwl4965_sensitivity_cmd cmd ;
@@ -1206,7 +1206,7 @@ static int iwl4965_sensitivity_write(struct iwl4965_priv *priv, u8 flags)
1206 return 0; 1206 return 0;
1207} 1207}
1208 1208
1209void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, u8 force) 1209void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags, u8 force)
1210{ 1210{
1211 int rc = 0; 1211 int rc = 0;
1212 int i; 1212 int i;
@@ -1264,7 +1264,7 @@ void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, u8 force)
1264/* Reset differential Rx gains in NIC to prepare for chain noise calibration. 1264/* Reset differential Rx gains in NIC to prepare for chain noise calibration.
1265 * Called after every association, but this runs only once! 1265 * Called after every association, but this runs only once!
1266 * ... once chain noise is calibrated the first time, it's good forever. */ 1266 * ... once chain noise is calibrated the first time, it's good forever. */
1267void iwl4965_chain_noise_reset(struct iwl4965_priv *priv) 1267void iwl4965_chain_noise_reset(struct iwl_priv *priv)
1268{ 1268{
1269 struct iwl4965_chain_noise_data *data = NULL; 1269 struct iwl4965_chain_noise_data *data = NULL;
1270 int rc = 0; 1270 int rc = 0;
@@ -1293,7 +1293,7 @@ void iwl4965_chain_noise_reset(struct iwl4965_priv *priv)
1293 * 1) Which antennas are connected. 1293 * 1) Which antennas are connected.
1294 * 2) Differential rx gain settings to balance the 3 receivers. 1294 * 2) Differential rx gain settings to balance the 3 receivers.
1295 */ 1295 */
1296static void iwl4965_noise_calibration(struct iwl4965_priv *priv, 1296static void iwl4965_noise_calibration(struct iwl_priv *priv,
1297 struct iwl4965_notif_statistics *stat_resp) 1297 struct iwl4965_notif_statistics *stat_resp)
1298{ 1298{
1299 struct iwl4965_chain_noise_data *data = NULL; 1299 struct iwl4965_chain_noise_data *data = NULL;
@@ -1526,7 +1526,7 @@ static void iwl4965_noise_calibration(struct iwl4965_priv *priv,
1526 return; 1526 return;
1527} 1527}
1528 1528
1529static void iwl4965_sensitivity_calibration(struct iwl4965_priv *priv, 1529static void iwl4965_sensitivity_calibration(struct iwl_priv *priv,
1530 struct iwl4965_notif_statistics *resp) 1530 struct iwl4965_notif_statistics *resp)
1531{ 1531{
1532 int rc = 0; 1532 int rc = 0;
@@ -1633,7 +1633,7 @@ static void iwl4965_sensitivity_calibration(struct iwl4965_priv *priv,
1633 1633
1634static void iwl4965_bg_sensitivity_work(struct work_struct *work) 1634static void iwl4965_bg_sensitivity_work(struct work_struct *work)
1635{ 1635{
1636 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, 1636 struct iwl_priv *priv = container_of(work, struct iwl_priv,
1637 sensitivity_work); 1637 sensitivity_work);
1638 1638
1639 mutex_lock(&priv->mutex); 1639 mutex_lock(&priv->mutex);
@@ -1663,7 +1663,7 @@ static void iwl4965_bg_sensitivity_work(struct work_struct *work)
1663 1663
1664static void iwl4965_bg_txpower_work(struct work_struct *work) 1664static void iwl4965_bg_txpower_work(struct work_struct *work)
1665{ 1665{
1666 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, 1666 struct iwl_priv *priv = container_of(work, struct iwl_priv,
1667 txpower_work); 1667 txpower_work);
1668 1668
1669 /* If a scan happened to start before we got here 1669 /* If a scan happened to start before we got here
@@ -1691,7 +1691,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
1691/* 1691/*
1692 * Acquire priv->lock before calling this function ! 1692 * Acquire priv->lock before calling this function !
1693 */ 1693 */
1694static void iwl4965_set_wr_ptrs(struct iwl4965_priv *priv, int txq_id, u32 index) 1694static void iwl4965_set_wr_ptrs(struct iwl_priv *priv, int txq_id, u32 index)
1695{ 1695{
1696 iwl4965_write_direct32(priv, HBUS_TARG_WRPTR, 1696 iwl4965_write_direct32(priv, HBUS_TARG_WRPTR,
1697 (index & 0xff) | (txq_id << 8)); 1697 (index & 0xff) | (txq_id << 8));
@@ -1705,7 +1705,7 @@ static void iwl4965_set_wr_ptrs(struct iwl4965_priv *priv, int txq_id, u32 index
1705 * 1705 *
1706 * NOTE: Acquire priv->lock before calling this function ! 1706 * NOTE: Acquire priv->lock before calling this function !
1707 */ 1707 */
1708static void iwl4965_tx_queue_set_status(struct iwl4965_priv *priv, 1708static void iwl4965_tx_queue_set_status(struct iwl_priv *priv,
1709 struct iwl4965_tx_queue *txq, 1709 struct iwl4965_tx_queue *txq,
1710 int tx_fifo_id, int scd_retry) 1710 int tx_fifo_id, int scd_retry)
1711{ 1711{
@@ -1739,17 +1739,17 @@ static const u16 default_queue_to_tx_fifo[] = {
1739 IWL_TX_FIFO_HCCA_2 1739 IWL_TX_FIFO_HCCA_2
1740}; 1740};
1741 1741
1742static inline void iwl4965_txq_ctx_activate(struct iwl4965_priv *priv, int txq_id) 1742static inline void iwl4965_txq_ctx_activate(struct iwl_priv *priv, int txq_id)
1743{ 1743{
1744 set_bit(txq_id, &priv->txq_ctx_active_msk); 1744 set_bit(txq_id, &priv->txq_ctx_active_msk);
1745} 1745}
1746 1746
1747static inline void iwl4965_txq_ctx_deactivate(struct iwl4965_priv *priv, int txq_id) 1747static inline void iwl4965_txq_ctx_deactivate(struct iwl_priv *priv, int txq_id)
1748{ 1748{
1749 clear_bit(txq_id, &priv->txq_ctx_active_msk); 1749 clear_bit(txq_id, &priv->txq_ctx_active_msk);
1750} 1750}
1751 1751
1752int iwl4965_alive_notify(struct iwl4965_priv *priv) 1752int iwl4965_alive_notify(struct iwl_priv *priv)
1753{ 1753{
1754 u32 a; 1754 u32 a;
1755 int i = 0; 1755 int i = 0;
@@ -1841,7 +1841,7 @@ int iwl4965_alive_notify(struct iwl4965_priv *priv)
1841 * 1841 *
1842 * Called when initializing driver 1842 * Called when initializing driver
1843 */ 1843 */
1844int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv) 1844int iwl4965_hw_set_hw_setting(struct iwl_priv *priv)
1845{ 1845{
1846 /* Allocate area for Tx byte count tables and Rx queue status */ 1846 /* Allocate area for Tx byte count tables and Rx queue status */
1847 priv->hw_setting.shared_virt = 1847 priv->hw_setting.shared_virt =
@@ -1876,7 +1876,7 @@ int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv)
1876 * 1876 *
1877 * Destroy all TX DMA queues and structures 1877 * Destroy all TX DMA queues and structures
1878 */ 1878 */
1879void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv) 1879void iwl4965_hw_txq_ctx_free(struct iwl_priv *priv)
1880{ 1880{
1881 int txq_id; 1881 int txq_id;
1882 1882
@@ -1894,7 +1894,7 @@ void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv)
1894 * Does NOT advance any TFD circular buffer read/write indexes 1894 * Does NOT advance any TFD circular buffer read/write indexes
1895 * Does NOT free the TFD itself (which is within circular buffer) 1895 * Does NOT free the TFD itself (which is within circular buffer)
1896 */ 1896 */
1897int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq) 1897int iwl4965_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl4965_tx_queue *txq)
1898{ 1898{
1899 struct iwl4965_tfd_frame *bd_tmp = (struct iwl4965_tfd_frame *)&txq->bd[0]; 1899 struct iwl4965_tfd_frame *bd_tmp = (struct iwl4965_tfd_frame *)&txq->bd[0];
1900 struct iwl4965_tfd_frame *bd = &bd_tmp[txq->q.read_ptr]; 1900 struct iwl4965_tfd_frame *bd = &bd_tmp[txq->q.read_ptr];
@@ -1947,7 +1947,7 @@ int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *
1947 return 0; 1947 return 0;
1948} 1948}
1949 1949
1950int iwl4965_hw_reg_set_txpower(struct iwl4965_priv *priv, s8 power) 1950int iwl4965_hw_reg_set_txpower(struct iwl_priv *priv, s8 power)
1951{ 1951{
1952 IWL_ERROR("TODO: Implement iwl4965_hw_reg_set_txpower!\n"); 1952 IWL_ERROR("TODO: Implement iwl4965_hw_reg_set_txpower!\n");
1953 return -EINVAL; 1953 return -EINVAL;
@@ -2003,7 +2003,7 @@ static s32 iwl4965_get_voltage_compensation(s32 eeprom_voltage,
2003} 2003}
2004 2004
2005static const struct iwl4965_channel_info * 2005static const struct iwl4965_channel_info *
2006iwl4965_get_channel_txpower_info(struct iwl4965_priv *priv, 2006iwl4965_get_channel_txpower_info(struct iwl_priv *priv,
2007 enum ieee80211_band band, u16 channel) 2007 enum ieee80211_band band, u16 channel)
2008{ 2008{
2009 const struct iwl4965_channel_info *ch_info; 2009 const struct iwl4965_channel_info *ch_info;
@@ -2042,7 +2042,7 @@ static s32 iwl4965_get_tx_atten_grp(u16 channel)
2042 return -1; 2042 return -1;
2043} 2043}
2044 2044
2045static u32 iwl4965_get_sub_band(const struct iwl4965_priv *priv, u32 channel) 2045static u32 iwl4965_get_sub_band(const struct iwl_priv *priv, u32 channel)
2046{ 2046{
2047 s32 b = -1; 2047 s32 b = -1;
2048 2048
@@ -2078,7 +2078,7 @@ static s32 iwl4965_interpolate_value(s32 x, s32 x1, s32 y1, s32 x2, s32 y2)
2078 * differences in channel frequencies, which is proportional to differences 2078 * differences in channel frequencies, which is proportional to differences
2079 * in channel number. 2079 * in channel number.
2080 */ 2080 */
2081static int iwl4965_interpolate_chan(struct iwl4965_priv *priv, u32 channel, 2081static int iwl4965_interpolate_chan(struct iwl_priv *priv, u32 channel,
2082 struct iwl4965_eeprom_calib_ch_info *chan_info) 2082 struct iwl4965_eeprom_calib_ch_info *chan_info)
2083{ 2083{
2084 s32 s = -1; 2084 s32 s = -1;
@@ -2411,7 +2411,7 @@ static const struct gain_entry gain_table[2][108] = {
2411 } 2411 }
2412}; 2412};
2413 2413
2414static int iwl4965_fill_txpower_tbl(struct iwl4965_priv *priv, u8 band, u16 channel, 2414static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
2415 u8 is_fat, u8 ctrl_chan_high, 2415 u8 is_fat, u8 ctrl_chan_high,
2416 struct iwl4965_tx_power_db *tx_power_tbl) 2416 struct iwl4965_tx_power_db *tx_power_tbl)
2417{ 2417{
@@ -2668,7 +2668,7 @@ static int iwl4965_fill_txpower_tbl(struct iwl4965_priv *priv, u8 band, u16 chan
2668 * Uses the active RXON for channel, band, and characteristics (fat, high) 2668 * Uses the active RXON for channel, band, and characteristics (fat, high)
2669 * The power limit is taken from priv->user_txpower_limit. 2669 * The power limit is taken from priv->user_txpower_limit.
2670 */ 2670 */
2671int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv) 2671int iwl4965_hw_reg_send_txpower(struct iwl_priv *priv)
2672{ 2672{
2673 struct iwl4965_txpowertable_cmd cmd = { 0 }; 2673 struct iwl4965_txpowertable_cmd cmd = { 0 };
2674 int rc = 0; 2674 int rc = 0;
@@ -2705,7 +2705,7 @@ int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv)
2705 return rc; 2705 return rc;
2706} 2706}
2707 2707
2708int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel) 2708int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel)
2709{ 2709{
2710 int rc; 2710 int rc;
2711 u8 band = 0; 2711 u8 band = 0;
@@ -2749,7 +2749,7 @@ int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel)
2749#define RTS_HCCA_RETRY_LIMIT 3 2749#define RTS_HCCA_RETRY_LIMIT 3
2750#define RTS_DFAULT_RETRY_LIMIT 60 2750#define RTS_DFAULT_RETRY_LIMIT 60
2751 2751
2752void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv, 2752void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv,
2753 struct iwl4965_cmd *cmd, 2753 struct iwl4965_cmd *cmd,
2754 struct ieee80211_tx_control *ctrl, 2754 struct ieee80211_tx_control *ctrl,
2755 struct ieee80211_hdr *hdr, int sta_id, 2755 struct ieee80211_hdr *hdr, int sta_id,
@@ -2816,19 +2816,19 @@ void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv,
2816 tx->rate_n_flags = iwl4965_hw_set_rate_n_flags(rate_plcp, rate_flags); 2816 tx->rate_n_flags = iwl4965_hw_set_rate_n_flags(rate_plcp, rate_flags);
2817} 2817}
2818 2818
2819int iwl4965_hw_get_rx_read(struct iwl4965_priv *priv) 2819int iwl4965_hw_get_rx_read(struct iwl_priv *priv)
2820{ 2820{
2821 struct iwl4965_shared *shared_data = priv->hw_setting.shared_virt; 2821 struct iwl4965_shared *shared_data = priv->hw_setting.shared_virt;
2822 2822
2823 return IWL_GET_BITS(*shared_data, rb_closed_stts_rb_num); 2823 return IWL_GET_BITS(*shared_data, rb_closed_stts_rb_num);
2824} 2824}
2825 2825
2826int iwl4965_hw_get_temperature(struct iwl4965_priv *priv) 2826int iwl4965_hw_get_temperature(struct iwl_priv *priv)
2827{ 2827{
2828 return priv->temperature; 2828 return priv->temperature;
2829} 2829}
2830 2830
2831unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv, 2831unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
2832 struct iwl4965_frame *frame, u8 rate) 2832 struct iwl4965_frame *frame, u8 rate)
2833{ 2833{
2834 struct iwl4965_tx_beacon_cmd *tx_beacon_cmd; 2834 struct iwl4965_tx_beacon_cmd *tx_beacon_cmd;
@@ -2867,7 +2867,7 @@ unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv,
2867 * 4965 supports up to 16 Tx queues in DRAM, mapped to up to 8 Tx DMA 2867 * 4965 supports up to 16 Tx queues in DRAM, mapped to up to 8 Tx DMA
2868 * channels supported in hardware. 2868 * channels supported in hardware.
2869 */ 2869 */
2870int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq) 2870int iwl4965_hw_tx_queue_init(struct iwl_priv *priv, struct iwl4965_tx_queue *txq)
2871{ 2871{
2872 int rc; 2872 int rc;
2873 unsigned long flags; 2873 unsigned long flags;
@@ -2895,7 +2895,7 @@ int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, struct iwl4965_tx_queue
2895 return 0; 2895 return 0;
2896} 2896}
2897 2897
2898int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *ptr, 2898int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,
2899 dma_addr_t addr, u16 len) 2899 dma_addr_t addr, u16 len)
2900{ 2900{
2901 int index, is_odd; 2901 int index, is_odd;
@@ -2929,7 +2929,7 @@ int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *ptr,
2929 return 0; 2929 return 0;
2930} 2930}
2931 2931
2932static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv) 2932static void iwl4965_hw_card_show_info(struct iwl_priv *priv)
2933{ 2933{
2934 u16 hw_version = priv->eeprom.board_revision_4965; 2934 u16 hw_version = priv->eeprom.board_revision_4965;
2935 2935
@@ -2947,7 +2947,7 @@ static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv)
2947/** 2947/**
2948 * iwl4965_tx_queue_update_wr_ptr - Set up entry in Tx byte-count array 2948 * iwl4965_tx_queue_update_wr_ptr - Set up entry in Tx byte-count array
2949 */ 2949 */
2950int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv, 2950int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv,
2951 struct iwl4965_tx_queue *txq, u16 byte_cnt) 2951 struct iwl4965_tx_queue *txq, u16 byte_cnt)
2952{ 2952{
2953 int len; 2953 int len;
@@ -2978,7 +2978,7 @@ int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv,
2978 * Selects how many and which Rx receivers/antennas/chains to use. 2978 * Selects how many and which Rx receivers/antennas/chains to use.
2979 * This should not be used for scan command ... it puts data in wrong place. 2979 * This should not be used for scan command ... it puts data in wrong place.
2980 */ 2980 */
2981void iwl4965_set_rxon_chain(struct iwl4965_priv *priv) 2981void iwl4965_set_rxon_chain(struct iwl_priv *priv)
2982{ 2982{
2983 u8 is_single = is_single_stream(priv); 2983 u8 is_single = is_single_stream(priv);
2984 u8 idle_state, rx_state; 2984 u8 idle_state, rx_state;
@@ -3031,7 +3031,7 @@ static s32 sign_extend(u32 oper, int index)
3031 * 3031 *
3032 * A return of <0 indicates bogus data in the statistics 3032 * A return of <0 indicates bogus data in the statistics
3033 */ 3033 */
3034int iwl4965_get_temperature(const struct iwl4965_priv *priv) 3034int iwl4965_get_temperature(const struct iwl_priv *priv)
3035{ 3035{
3036 s32 temperature; 3036 s32 temperature;
3037 s32 vt; 3037 s32 vt;
@@ -3099,7 +3099,7 @@ int iwl4965_get_temperature(const struct iwl4965_priv *priv)
3099 * Assumes caller will replace priv->last_temperature once calibration 3099 * Assumes caller will replace priv->last_temperature once calibration
3100 * executed. 3100 * executed.
3101 */ 3101 */
3102static int iwl4965_is_temp_calib_needed(struct iwl4965_priv *priv) 3102static int iwl4965_is_temp_calib_needed(struct iwl_priv *priv)
3103{ 3103{
3104 int temp_diff; 3104 int temp_diff;
3105 3105
@@ -3132,7 +3132,7 @@ static int iwl4965_is_temp_calib_needed(struct iwl4965_priv *priv)
3132/* Calculate noise level, based on measurements during network silence just 3132/* Calculate noise level, based on measurements during network silence just
3133 * before arriving beacon. This measurement can be done only if we know 3133 * before arriving beacon. This measurement can be done only if we know
3134 * exactly when to expect beacons, therefore only when we're associated. */ 3134 * exactly when to expect beacons, therefore only when we're associated. */
3135static void iwl4965_rx_calc_noise(struct iwl4965_priv *priv) 3135static void iwl4965_rx_calc_noise(struct iwl_priv *priv)
3136{ 3136{
3137 struct statistics_rx_non_phy *rx_info 3137 struct statistics_rx_non_phy *rx_info
3138 = &(priv->statistics.rx.general); 3138 = &(priv->statistics.rx.general);
@@ -3169,7 +3169,7 @@ static void iwl4965_rx_calc_noise(struct iwl4965_priv *priv)
3169 priv->last_rx_noise); 3169 priv->last_rx_noise);
3170} 3170}
3171 3171
3172void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv, struct iwl4965_rx_mem_buffer *rxb) 3172void iwl4965_hw_rx_statistics(struct iwl_priv *priv, struct iwl4965_rx_mem_buffer *rxb)
3173{ 3173{
3174 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3174 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
3175 int change; 3175 int change;
@@ -3233,7 +3233,7 @@ void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv, struct iwl4965_rx_mem_b
3233 queue_work(priv->workqueue, &priv->txpower_work); 3233 queue_work(priv->workqueue, &priv->txpower_work);
3234} 3234}
3235 3235
3236static void iwl4965_add_radiotap(struct iwl4965_priv *priv, 3236static void iwl4965_add_radiotap(struct iwl_priv *priv,
3237 struct sk_buff *skb, 3237 struct sk_buff *skb,
3238 struct iwl4965_rx_phy_res *rx_start, 3238 struct iwl4965_rx_phy_res *rx_start,
3239 struct ieee80211_rx_status *stats, 3239 struct ieee80211_rx_status *stats,
@@ -3337,7 +3337,7 @@ static void iwl4965_add_radiotap(struct iwl4965_priv *priv,
3337 stats->flag |= RX_FLAG_RADIOTAP; 3337 stats->flag |= RX_FLAG_RADIOTAP;
3338} 3338}
3339 3339
3340static void iwl4965_handle_data_packet(struct iwl4965_priv *priv, int is_data, 3340static void iwl4965_handle_data_packet(struct iwl_priv *priv, int is_data,
3341 int include_phy, 3341 int include_phy,
3342 struct iwl4965_rx_mem_buffer *rxb, 3342 struct iwl4965_rx_mem_buffer *rxb,
3343 struct ieee80211_rx_status *stats) 3343 struct ieee80211_rx_status *stats)
@@ -3552,7 +3552,7 @@ void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
3552} 3552}
3553#endif /* CONFIG_IWL4965_HT */ 3553#endif /* CONFIG_IWL4965_HT */
3554 3554
3555static void iwl4965_sta_modify_ps_wake(struct iwl4965_priv *priv, int sta_id) 3555static void iwl4965_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id)
3556{ 3556{
3557 unsigned long flags; 3557 unsigned long flags;
3558 3558
@@ -3566,7 +3566,7 @@ static void iwl4965_sta_modify_ps_wake(struct iwl4965_priv *priv, int sta_id)
3566 iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC); 3566 iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
3567} 3567}
3568 3568
3569static void iwl4965_update_ps_mode(struct iwl4965_priv *priv, u16 ps_bit, u8 *addr) 3569static void iwl4965_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr)
3570{ 3570{
3571 /* FIXME: need locking over ps_status ??? */ 3571 /* FIXME: need locking over ps_status ??? */
3572 u8 sta_id = iwl4965_hw_find_station(priv, addr); 3572 u8 sta_id = iwl4965_hw_find_station(priv, addr);
@@ -3595,7 +3595,7 @@ static void iwl4965_update_ps_mode(struct iwl4965_priv *priv, u16 ps_bit, u8 *ad
3595 * TODO: This was originally written for 3945, need to audit for 3595 * TODO: This was originally written for 3945, need to audit for
3596 * proper operation with 4965. 3596 * proper operation with 4965.
3597 */ 3597 */
3598static void iwl4965_dbg_report_frame(struct iwl4965_priv *priv, 3598static void iwl4965_dbg_report_frame(struct iwl_priv *priv,
3599 struct iwl4965_rx_packet *pkt, 3599 struct iwl4965_rx_packet *pkt,
3600 struct ieee80211_hdr *header, int group100) 3600 struct ieee80211_hdr *header, int group100)
3601{ 3601{
@@ -3729,7 +3729,7 @@ static void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
3729 iwl_print_hex_dump(IWL_DL_RX, data, length); 3729 iwl_print_hex_dump(IWL_DL_RX, data, length);
3730} 3730}
3731#else 3731#else
3732static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv, 3732static inline void iwl4965_dbg_report_frame(struct iwl_priv *priv,
3733 struct iwl4965_rx_packet *pkt, 3733 struct iwl4965_rx_packet *pkt,
3734 struct ieee80211_hdr *header, 3734 struct ieee80211_hdr *header,
3735 int group100) 3735 int group100)
@@ -3742,7 +3742,7 @@ static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
3742 3742
3743/* Called for REPLY_4965_RX (legacy ABG frames), or 3743/* Called for REPLY_4965_RX (legacy ABG frames), or
3744 * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */ 3744 * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */
3745static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv, 3745static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3746 struct iwl4965_rx_mem_buffer *rxb) 3746 struct iwl4965_rx_mem_buffer *rxb)
3747{ 3747{
3748 struct ieee80211_hdr *header; 3748 struct ieee80211_hdr *header;
@@ -4004,7 +4004,7 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
4004 4004
4005/* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD). 4005/* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD).
4006 * This will be used later in iwl4965_rx_reply_rx() for REPLY_RX_MPDU_CMD. */ 4006 * This will be used later in iwl4965_rx_reply_rx() for REPLY_RX_MPDU_CMD. */
4007static void iwl4965_rx_reply_rx_phy(struct iwl4965_priv *priv, 4007static void iwl4965_rx_reply_rx_phy(struct iwl_priv *priv,
4008 struct iwl4965_rx_mem_buffer *rxb) 4008 struct iwl4965_rx_mem_buffer *rxb)
4009{ 4009{
4010 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 4010 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -4013,7 +4013,7 @@ static void iwl4965_rx_reply_rx_phy(struct iwl4965_priv *priv,
4013 sizeof(struct iwl4965_rx_phy_res)); 4013 sizeof(struct iwl4965_rx_phy_res));
4014} 4014}
4015 4015
4016static void iwl4965_rx_missed_beacon_notif(struct iwl4965_priv *priv, 4016static void iwl4965_rx_missed_beacon_notif(struct iwl_priv *priv,
4017 struct iwl4965_rx_mem_buffer *rxb) 4017 struct iwl4965_rx_mem_buffer *rxb)
4018 4018
4019{ 4019{
@@ -4040,7 +4040,7 @@ static void iwl4965_rx_missed_beacon_notif(struct iwl4965_priv *priv,
4040/** 4040/**
4041 * iwl4965_sta_modify_enable_tid_tx - Enable Tx for this TID in station table 4041 * iwl4965_sta_modify_enable_tid_tx - Enable Tx for this TID in station table
4042 */ 4042 */
4043static void iwl4965_sta_modify_enable_tid_tx(struct iwl4965_priv *priv, 4043static void iwl4965_sta_modify_enable_tid_tx(struct iwl_priv *priv,
4044 int sta_id, int tid) 4044 int sta_id, int tid)
4045{ 4045{
4046 unsigned long flags; 4046 unsigned long flags;
@@ -4061,7 +4061,7 @@ static void iwl4965_sta_modify_enable_tid_tx(struct iwl4965_priv *priv,
4061 * Go through block-ack's bitmap of ACK'd frames, update driver's record of 4061 * Go through block-ack's bitmap of ACK'd frames, update driver's record of
4062 * ACK vs. not. This gets sent to mac80211, then to rate scaling algo. 4062 * ACK vs. not. This gets sent to mac80211, then to rate scaling algo.
4063 */ 4063 */
4064static int iwl4965_tx_status_reply_compressed_ba(struct iwl4965_priv *priv, 4064static int iwl4965_tx_status_reply_compressed_ba(struct iwl_priv *priv,
4065 struct iwl4965_ht_agg *agg, 4065 struct iwl4965_ht_agg *agg,
4066 struct iwl4965_compressed_ba_resp* 4066 struct iwl4965_compressed_ba_resp*
4067 ba_resp) 4067 ba_resp)
@@ -4126,7 +4126,7 @@ static int iwl4965_tx_status_reply_compressed_ba(struct iwl4965_priv *priv,
4126/** 4126/**
4127 * iwl4965_tx_queue_stop_scheduler - Stop queue, but keep configuration 4127 * iwl4965_tx_queue_stop_scheduler - Stop queue, but keep configuration
4128 */ 4128 */
4129static void iwl4965_tx_queue_stop_scheduler(struct iwl4965_priv *priv, 4129static void iwl4965_tx_queue_stop_scheduler(struct iwl_priv *priv,
4130 u16 txq_id) 4130 u16 txq_id)
4131{ 4131{
4132 /* Simply stop the queue, but don't change any configuration; 4132 /* Simply stop the queue, but don't change any configuration;
@@ -4141,7 +4141,7 @@ static void iwl4965_tx_queue_stop_scheduler(struct iwl4965_priv *priv,
4141 * txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID 4141 * txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID
4142 * priv->lock must be held by the caller 4142 * priv->lock must be held by the caller
4143 */ 4143 */
4144static int iwl4965_tx_queue_agg_disable(struct iwl4965_priv *priv, u16 txq_id, 4144static int iwl4965_tx_queue_agg_disable(struct iwl_priv *priv, u16 txq_id,
4145 u16 ssn_idx, u8 tx_fifo) 4145 u16 ssn_idx, u8 tx_fifo)
4146{ 4146{
4147 int ret = 0; 4147 int ret = 0;
@@ -4174,7 +4174,7 @@ static int iwl4965_tx_queue_agg_disable(struct iwl4965_priv *priv, u16 txq_id,
4174 return 0; 4174 return 0;
4175} 4175}
4176 4176
4177int iwl4965_check_empty_hw_queue(struct iwl4965_priv *priv, int sta_id, 4177int iwl4965_check_empty_hw_queue(struct iwl_priv *priv, int sta_id,
4178 u8 tid, int txq_id) 4178 u8 tid, int txq_id)
4179{ 4179{
4180 struct iwl4965_queue *q = &priv->txq[txq_id].q; 4180 struct iwl4965_queue *q = &priv->txq[txq_id].q;
@@ -4224,7 +4224,7 @@ static inline int iwl4965_queue_dec_wrap(int index, int n_bd)
4224 * Handles block-acknowledge notification from device, which reports success 4224 * Handles block-acknowledge notification from device, which reports success
4225 * of frames sent via aggregation. 4225 * of frames sent via aggregation.
4226 */ 4226 */
4227static void iwl4965_rx_reply_compressed_ba(struct iwl4965_priv *priv, 4227static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
4228 struct iwl4965_rx_mem_buffer *rxb) 4228 struct iwl4965_rx_mem_buffer *rxb)
4229{ 4229{
4230 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 4230 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -4292,7 +4292,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl4965_priv *priv,
4292/** 4292/**
4293 * iwl4965_tx_queue_set_q2ratid - Map unique receiver/tid combination to a queue 4293 * iwl4965_tx_queue_set_q2ratid - Map unique receiver/tid combination to a queue
4294 */ 4294 */
4295static int iwl4965_tx_queue_set_q2ratid(struct iwl4965_priv *priv, u16 ra_tid, 4295static int iwl4965_tx_queue_set_q2ratid(struct iwl_priv *priv, u16 ra_tid,
4296 u16 txq_id) 4296 u16 txq_id)
4297{ 4297{
4298 u32 tbl_dw_addr; 4298 u32 tbl_dw_addr;
@@ -4323,7 +4323,7 @@ static int iwl4965_tx_queue_set_q2ratid(struct iwl4965_priv *priv, u16 ra_tid,
4323 * NOTE: txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID, 4323 * NOTE: txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID,
4324 * i.e. it must be one of the higher queues used for aggregation 4324 * i.e. it must be one of the higher queues used for aggregation
4325 */ 4325 */
4326static int iwl4965_tx_queue_agg_enable(struct iwl4965_priv *priv, int txq_id, 4326static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id,
4327 int tx_fifo, int sta_id, int tid, 4327 int tx_fifo, int sta_id, int tid,
4328 u16 ssn_idx) 4328 u16 ssn_idx)
4329{ 4329{
@@ -4400,7 +4400,7 @@ static int iwl4965_tx_queue_agg_enable(struct iwl4965_priv *priv, int txq_id,
4400 * calling this function (which runs REPLY_TX_LINK_QUALITY_CMD, 4400 * calling this function (which runs REPLY_TX_LINK_QUALITY_CMD,
4401 * which requires station table entry to exist). 4401 * which requires station table entry to exist).
4402 */ 4402 */
4403void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap) 4403void iwl4965_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
4404{ 4404{
4405 int i, r; 4405 int i, r;
4406 struct iwl4965_link_quality_cmd link_cmd = { 4406 struct iwl4965_link_quality_cmd link_cmd = {
@@ -4445,7 +4445,7 @@ void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap)
4445 4445
4446#ifdef CONFIG_IWL4965_HT 4446#ifdef CONFIG_IWL4965_HT
4447 4447
4448static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv, 4448static u8 iwl4965_is_channel_extension(struct iwl_priv *priv,
4449 enum ieee80211_band band, 4449 enum ieee80211_band band,
4450 u16 channel, u8 extension_chan_offset) 4450 u16 channel, u8 extension_chan_offset)
4451{ 4451{
@@ -4465,7 +4465,7 @@ static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv,
4465 return 0; 4465 return 0;
4466} 4466}
4467 4467
4468static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv, 4468static u8 iwl4965_is_fat_tx_allowed(struct iwl_priv *priv,
4469 struct ieee80211_ht_info *sta_ht_inf) 4469 struct ieee80211_ht_info *sta_ht_inf)
4470{ 4470{
4471 struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config; 4471 struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config;
@@ -4486,7 +4486,7 @@ static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv,
4486 iwl_ht_conf->extension_chan_offset)); 4486 iwl_ht_conf->extension_chan_offset));
4487} 4487}
4488 4488
4489void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, struct iwl_ht_info *ht_info) 4489void iwl4965_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
4490{ 4490{
4491 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon; 4491 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon;
4492 u32 val; 4492 u32 val;
@@ -4540,7 +4540,7 @@ void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, struct iwl_ht_info *ht_info)
4540 return; 4540 return;
4541} 4541}
4542 4542
4543void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index, 4543void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index,
4544 struct ieee80211_ht_info *sta_ht_inf) 4544 struct ieee80211_ht_info *sta_ht_inf)
4545{ 4545{
4546 __le32 sta_flags; 4546 __le32 sta_flags;
@@ -4585,7 +4585,7 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
4585 return; 4585 return;
4586} 4586}
4587 4587
4588static void iwl4965_sta_modify_add_ba_tid(struct iwl4965_priv *priv, 4588static void iwl4965_sta_modify_add_ba_tid(struct iwl_priv *priv,
4589 int sta_id, int tid, u16 ssn) 4589 int sta_id, int tid, u16 ssn)
4590{ 4590{
4591 unsigned long flags; 4591 unsigned long flags;
@@ -4601,7 +4601,7 @@ static void iwl4965_sta_modify_add_ba_tid(struct iwl4965_priv *priv,
4601 iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC); 4601 iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
4602} 4602}
4603 4603
4604static void iwl4965_sta_modify_del_ba_tid(struct iwl4965_priv *priv, 4604static void iwl4965_sta_modify_del_ba_tid(struct iwl_priv *priv,
4605 int sta_id, int tid) 4605 int sta_id, int tid)
4606{ 4606{
4607 unsigned long flags; 4607 unsigned long flags;
@@ -4622,7 +4622,7 @@ static void iwl4965_sta_modify_del_ba_tid(struct iwl4965_priv *priv,
4622 * Should never return anything < 7, because they should already 4622 * Should never return anything < 7, because they should already
4623 * be in use as EDCA AC (0-3), Command (4), HCCA (5, 6). 4623 * be in use as EDCA AC (0-3), Command (4), HCCA (5, 6).
4624 */ 4624 */
4625static int iwl4965_txq_ctx_activate_free(struct iwl4965_priv *priv) 4625static int iwl4965_txq_ctx_activate_free(struct iwl_priv *priv)
4626{ 4626{
4627 int txq_id; 4627 int txq_id;
4628 4628
@@ -4635,7 +4635,7 @@ static int iwl4965_txq_ctx_activate_free(struct iwl4965_priv *priv)
4635static int iwl4965_mac_ht_tx_agg_start(struct ieee80211_hw *hw, const u8 *da, 4635static int iwl4965_mac_ht_tx_agg_start(struct ieee80211_hw *hw, const u8 *da,
4636 u16 tid, u16 *start_seq_num) 4636 u16 tid, u16 *start_seq_num)
4637{ 4637{
4638 struct iwl4965_priv *priv = hw->priv; 4638 struct iwl_priv *priv = hw->priv;
4639 int sta_id; 4639 int sta_id;
4640 int tx_fifo; 4640 int tx_fifo;
4641 int txq_id; 4641 int txq_id;
@@ -4695,7 +4695,7 @@ static int iwl4965_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, const u8 *da,
4695 u16 tid) 4695 u16 tid)
4696{ 4696{
4697 4697
4698 struct iwl4965_priv *priv = hw->priv; 4698 struct iwl_priv *priv = hw->priv;
4699 int tx_fifo_id, txq_id, sta_id, ssn = -1; 4699 int tx_fifo_id, txq_id, sta_id, ssn = -1;
4700 struct iwl4965_tid_data *tid_data; 4700 struct iwl4965_tid_data *tid_data;
4701 int ret, write_ptr, read_ptr; 4701 int ret, write_ptr, read_ptr;
@@ -4756,7 +4756,7 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
4756 enum ieee80211_ampdu_mlme_action action, 4756 enum ieee80211_ampdu_mlme_action action,
4757 const u8 *addr, u16 tid, u16 *ssn) 4757 const u8 *addr, u16 tid, u16 *ssn)
4758{ 4758{
4759 struct iwl4965_priv *priv = hw->priv; 4759 struct iwl_priv *priv = hw->priv;
4760 int sta_id; 4760 int sta_id;
4761 DECLARE_MAC_BUF(mac); 4761 DECLARE_MAC_BUF(mac);
4762 4762
@@ -4789,7 +4789,7 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
4789#endif /* CONFIG_IWL4965_HT */ 4789#endif /* CONFIG_IWL4965_HT */
4790 4790
4791/* Set up 4965-specific Rx frame reply handlers */ 4791/* Set up 4965-specific Rx frame reply handlers */
4792void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv) 4792void iwl4965_hw_rx_handler_setup(struct iwl_priv *priv)
4793{ 4793{
4794 /* Legacy Rx frames */ 4794 /* Legacy Rx frames */
4795 priv->rx_handlers[REPLY_4965_RX] = iwl4965_rx_reply_rx; 4795 priv->rx_handlers[REPLY_4965_RX] = iwl4965_rx_reply_rx;
@@ -4806,7 +4806,7 @@ void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv)
4806#endif /* CONFIG_IWL4965_HT */ 4806#endif /* CONFIG_IWL4965_HT */
4807} 4807}
4808 4808
4809void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv) 4809void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv)
4810{ 4810{
4811 INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); 4811 INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work);
4812 INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work); 4812 INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work);
@@ -4818,7 +4818,7 @@ void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv)
4818 priv->statistics_periodic.function = iwl4965_bg_statistics_periodic; 4818 priv->statistics_periodic.function = iwl4965_bg_statistics_periodic;
4819} 4819}
4820 4820
4821void iwl4965_hw_cancel_deferred_work(struct iwl4965_priv *priv) 4821void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv)
4822{ 4822{
4823 del_timer_sync(&priv->statistics_periodic); 4823 del_timer_sync(&priv->statistics_periodic);
4824 4824