aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2008-12-18 21:37:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:13 -0500
commit4a8a43222db6f04c88def2160a95f978f704b515 (patch)
treec5b5666c735e4f78045688ece7f5879f9529b032 /drivers/net/wireless/iwlwifi/iwl-3945.c
parentf2c7e52100545e54af064fe0345d141fdcf2d243 (diff)
iwl3945: replaces iwl3945_priv with iwl_priv
The patch replaces iwl3945_priv to iwl_priv. It adds 3945 specific data members to iwl_priv. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index f480c437cd66..50e729ed0181 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -93,7 +93,7 @@ const struct iwl3945_rate_info iwl3945_rates[IWL_RATE_COUNT_3945] = {
93 * Use for only special debugging. This function is just a placeholder as-is, 93 * Use for only special debugging. This function is just a placeholder as-is,
94 * you'll need to provide the special bits! ... 94 * you'll need to provide the special bits! ...
95 * ... and set IWL_EVT_DISABLE to 1. */ 95 * ... and set IWL_EVT_DISABLE to 1. */
96void iwl3945_disable_events(struct iwl3945_priv *priv) 96void iwl3945_disable_events(struct iwl_priv *priv)
97{ 97{
98 int ret; 98 int ret;
99 int i; 99 int i;
@@ -206,7 +206,7 @@ static int iwl3945_hwrate_to_plcp_idx(u8 plcp)
206 * IWL_ANTENNA_MAIN - Force MAIN antenna 206 * IWL_ANTENNA_MAIN - Force MAIN antenna
207 * IWL_ANTENNA_AUX - Force AUX antenna 207 * IWL_ANTENNA_AUX - Force AUX antenna
208 */ 208 */
209__le32 iwl3945_get_antenna_flags(const struct iwl3945_priv *priv) 209__le32 iwl3945_get_antenna_flags(const struct iwl_priv *priv)
210{ 210{
211 switch (priv->antenna) { 211 switch (priv->antenna) {
212 case IWL_ANTENNA_DIVERSITY: 212 case IWL_ANTENNA_DIVERSITY:
@@ -268,7 +268,7 @@ static inline const char *iwl3945_get_tx_fail_reason(u32 status)
268 * for A and B mode we need to overright prev 268 * for A and B mode we need to overright prev
269 * value 269 * value
270 */ 270 */
271int iwl3945_rs_next_rate(struct iwl3945_priv *priv, int rate) 271int iwl3945_rs_next_rate(struct iwl_priv *priv, int rate)
272{ 272{
273 int next_rate = iwl3945_get_prev_ieee_rate(rate); 273 int next_rate = iwl3945_get_prev_ieee_rate(rate);
274 274
@@ -302,7 +302,7 @@ int iwl3945_rs_next_rate(struct iwl3945_priv *priv, int rate)
302 * need to be reclaimed. As result, some free space forms. If there is 302 * need to be reclaimed. As result, some free space forms. If there is
303 * enough free space (> low mark), wake the stack that feeds us. 303 * enough free space (> low mark), wake the stack that feeds us.
304 */ 304 */
305static void iwl3945_tx_queue_reclaim(struct iwl3945_priv *priv, 305static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv,
306 int txq_id, int index) 306 int txq_id, int index)
307{ 307{
308 struct iwl3945_tx_queue *txq = &priv->txq39[txq_id]; 308 struct iwl3945_tx_queue *txq = &priv->txq39[txq_id];
@@ -329,7 +329,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl3945_priv *priv,
329/** 329/**
330 * iwl3945_rx_reply_tx - Handle Tx response 330 * iwl3945_rx_reply_tx - Handle Tx response
331 */ 331 */
332static void iwl3945_rx_reply_tx(struct iwl3945_priv *priv, 332static void iwl3945_rx_reply_tx(struct iwl_priv *priv,
333 struct iwl_rx_mem_buffer *rxb) 333 struct iwl_rx_mem_buffer *rxb)
334{ 334{
335 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 335 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
@@ -389,7 +389,7 @@ static void iwl3945_rx_reply_tx(struct iwl3945_priv *priv,
389 * 389 *
390 *****************************************************************************/ 390 *****************************************************************************/
391 391
392void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl_rx_mem_buffer *rxb) 392void iwl3945_hw_rx_statistics(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
393{ 393{
394 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 394 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
395 IWL_DEBUG_RX("Statistics notification received (%d vs %d).\n", 395 IWL_DEBUG_RX("Statistics notification received (%d vs %d).\n",
@@ -417,7 +417,7 @@ void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl_rx_mem_buffe
417 * including selective frame dumps. 417 * including selective frame dumps.
418 * group100 parameter selects whether to show 1 out of 100 good frames. 418 * group100 parameter selects whether to show 1 out of 100 good frames.
419 */ 419 */
420static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv, 420static void iwl3945_dbg_report_frame(struct iwl_priv *priv,
421 struct iwl_rx_packet *pkt, 421 struct iwl_rx_packet *pkt,
422 struct ieee80211_hdr *header, int group100) 422 struct ieee80211_hdr *header, int group100)
423{ 423{
@@ -545,7 +545,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,
545 iwl_print_hex_dump(priv, IWL_DL_RX, data, length); 545 iwl_print_hex_dump(priv, IWL_DL_RX, data, length);
546} 546}
547#else 547#else
548static inline void iwl3945_dbg_report_frame(struct iwl3945_priv *priv, 548static inline void iwl3945_dbg_report_frame(struct iwl_priv *priv,
549 struct iwl_rx_packet *pkt, 549 struct iwl_rx_packet *pkt,
550 struct ieee80211_hdr *header, int group100) 550 struct ieee80211_hdr *header, int group100)
551{ 551{
@@ -553,7 +553,7 @@ static inline void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,
553#endif 553#endif
554 554
555/* This is necessary only for a number of statistics, see the caller. */ 555/* This is necessary only for a number of statistics, see the caller. */
556static int iwl3945_is_network_packet(struct iwl3945_priv *priv, 556static int iwl3945_is_network_packet(struct iwl_priv *priv,
557 struct ieee80211_hdr *header) 557 struct ieee80211_hdr *header)
558{ 558{
559 /* Filter incoming packets to determine if they are targeted toward 559 /* Filter incoming packets to determine if they are targeted toward
@@ -570,7 +570,7 @@ static int iwl3945_is_network_packet(struct iwl3945_priv *priv,
570 } 570 }
571} 571}
572 572
573static void iwl3945_pass_packet_to_mac80211(struct iwl3945_priv *priv, 573static void iwl3945_pass_packet_to_mac80211(struct iwl_priv *priv,
574 struct iwl_rx_mem_buffer *rxb, 574 struct iwl_rx_mem_buffer *rxb,
575 struct ieee80211_rx_status *stats) 575 struct ieee80211_rx_status *stats)
576{ 576{
@@ -613,7 +613,7 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl3945_priv *priv,
613 613
614#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) 614#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6)
615 615
616static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, 616static void iwl3945_rx_reply_rx(struct iwl_priv *priv,
617 struct iwl_rx_mem_buffer *rxb) 617 struct iwl_rx_mem_buffer *rxb)
618{ 618{
619 struct ieee80211_hdr *header; 619 struct ieee80211_hdr *header;
@@ -723,7 +723,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv,
723 iwl3945_pass_packet_to_mac80211(priv, rxb, &rx_status); 723 iwl3945_pass_packet_to_mac80211(priv, rxb, &rx_status);
724} 724}
725 725
726int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl3945_priv *priv, void *ptr, 726int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,
727 dma_addr_t addr, u16 len) 727 dma_addr_t addr, u16 len)
728{ 728{
729 int count; 729 int count;
@@ -755,7 +755,7 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl3945_priv *priv, void *ptr,
755 * 755 *
756 * Does NOT advance any indexes 756 * Does NOT advance any indexes
757 */ 757 */
758int iwl3945_hw_txq_free_tfd(struct iwl3945_priv *priv, struct iwl3945_tx_queue *txq) 758int iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl3945_tx_queue *txq)
759{ 759{
760 struct iwl3945_tfd_frame *bd_tmp = (struct iwl3945_tfd_frame *)&txq->bd[0]; 760 struct iwl3945_tfd_frame *bd_tmp = (struct iwl3945_tfd_frame *)&txq->bd[0];
761 struct iwl3945_tfd_frame *bd = &bd_tmp[txq->q.read_ptr]; 761 struct iwl3945_tfd_frame *bd = &bd_tmp[txq->q.read_ptr];
@@ -793,7 +793,7 @@ int iwl3945_hw_txq_free_tfd(struct iwl3945_priv *priv, struct iwl3945_tx_queue *
793 return 0; 793 return 0;
794} 794}
795 795
796u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr) 796u8 iwl3945_hw_find_station(struct iwl_priv *priv, const u8 *addr)
797{ 797{
798 int i, start = IWL_AP_ID; 798 int i, start = IWL_AP_ID;
799 int ret = IWL_INVALID_STATION; 799 int ret = IWL_INVALID_STATION;
@@ -826,7 +826,7 @@ u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr)
826 * iwl3945_hw_build_tx_cmd_rate - Add rate portion to TX_CMD: 826 * iwl3945_hw_build_tx_cmd_rate - Add rate portion to TX_CMD:
827 * 827 *
828*/ 828*/
829void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv, 829void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
830 struct iwl3945_cmd *cmd, 830 struct iwl3945_cmd *cmd,
831 struct ieee80211_tx_info *info, 831 struct ieee80211_tx_info *info,
832 struct ieee80211_hdr *hdr, int sta_id, int tx_id) 832 struct ieee80211_hdr *hdr, int sta_id, int tx_id)
@@ -896,7 +896,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv,
896 cmd->cmd.tx.supp_rates[1], cmd->cmd.tx.supp_rates[0]); 896 cmd->cmd.tx.supp_rates[1], cmd->cmd.tx.supp_rates[0]);
897} 897}
898 898
899u8 iwl3945_sync_sta(struct iwl3945_priv *priv, int sta_id, u16 tx_rate, u8 flags) 899u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate, u8 flags)
900{ 900{
901 unsigned long flags_spin; 901 unsigned long flags_spin;
902 struct iwl3945_station_entry *station; 902 struct iwl3945_station_entry *station;
@@ -919,7 +919,7 @@ u8 iwl3945_sync_sta(struct iwl3945_priv *priv, int sta_id, u16 tx_rate, u8 flags
919 return sta_id; 919 return sta_id;
920} 920}
921 921
922static int iwl3945_nic_set_pwr_src(struct iwl3945_priv *priv, int pwr_max) 922static int iwl3945_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max)
923{ 923{
924 int rc; 924 int rc;
925 unsigned long flags; 925 unsigned long flags;
@@ -961,7 +961,7 @@ static int iwl3945_nic_set_pwr_src(struct iwl3945_priv *priv, int pwr_max)
961 return rc; 961 return rc;
962} 962}
963 963
964static int iwl3945_rx_init(struct iwl3945_priv *priv, struct iwl_rx_queue *rxq) 964static int iwl3945_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
965{ 965{
966 int rc; 966 int rc;
967 unsigned long flags; 967 unsigned long flags;
@@ -997,7 +997,7 @@ static int iwl3945_rx_init(struct iwl3945_priv *priv, struct iwl_rx_queue *rxq)
997 return 0; 997 return 0;
998} 998}
999 999
1000static int iwl3945_tx_reset(struct iwl3945_priv *priv) 1000static int iwl3945_tx_reset(struct iwl_priv *priv)
1001{ 1001{
1002 int rc; 1002 int rc;
1003 unsigned long flags; 1003 unsigned long flags;
@@ -1046,7 +1046,7 @@ static int iwl3945_tx_reset(struct iwl3945_priv *priv)
1046 * 1046 *
1047 * Destroys all DMA structures and initialize them again 1047 * Destroys all DMA structures and initialize them again
1048 */ 1048 */
1049static int iwl3945_txq_ctx_reset(struct iwl3945_priv *priv) 1049static int iwl3945_txq_ctx_reset(struct iwl_priv *priv)
1050{ 1050{
1051 int rc; 1051 int rc;
1052 int txq_id, slots_num; 1052 int txq_id, slots_num;
@@ -1077,7 +1077,7 @@ static int iwl3945_txq_ctx_reset(struct iwl3945_priv *priv)
1077 return rc; 1077 return rc;
1078} 1078}
1079 1079
1080int iwl3945_hw_nic_init(struct iwl3945_priv *priv) 1080int iwl3945_hw_nic_init(struct iwl_priv *priv)
1081{ 1081{
1082 u8 rev_id; 1082 u8 rev_id;
1083 int rc; 1083 int rc;
@@ -1218,7 +1218,7 @@ int iwl3945_hw_nic_init(struct iwl3945_priv *priv)
1218 * 1218 *
1219 * Destroy all TX DMA queues and structures 1219 * Destroy all TX DMA queues and structures
1220 */ 1220 */
1221void iwl3945_hw_txq_ctx_free(struct iwl3945_priv *priv) 1221void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv)
1222{ 1222{
1223 int txq_id; 1223 int txq_id;
1224 1224
@@ -1227,7 +1227,7 @@ void iwl3945_hw_txq_ctx_free(struct iwl3945_priv *priv)
1227 iwl3945_tx_queue_free(priv, &priv->txq39[txq_id]); 1227 iwl3945_tx_queue_free(priv, &priv->txq39[txq_id]);
1228} 1228}
1229 1229
1230void iwl3945_hw_txq_ctx_stop(struct iwl3945_priv *priv) 1230void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv)
1231{ 1231{
1232 int txq_id; 1232 int txq_id;
1233 unsigned long flags; 1233 unsigned long flags;
@@ -1256,7 +1256,7 @@ void iwl3945_hw_txq_ctx_stop(struct iwl3945_priv *priv)
1256 iwl3945_hw_txq_ctx_free(priv); 1256 iwl3945_hw_txq_ctx_free(priv);
1257} 1257}
1258 1258
1259int iwl3945_hw_nic_stop_master(struct iwl3945_priv *priv) 1259int iwl3945_hw_nic_stop_master(struct iwl_priv *priv)
1260{ 1260{
1261 int rc = 0; 1261 int rc = 0;
1262 u32 reg_val; 1262 u32 reg_val;
@@ -1288,7 +1288,7 @@ int iwl3945_hw_nic_stop_master(struct iwl3945_priv *priv)
1288 return rc; 1288 return rc;
1289} 1289}
1290 1290
1291int iwl3945_hw_nic_reset(struct iwl3945_priv *priv) 1291int iwl3945_hw_nic_reset(struct iwl_priv *priv)
1292{ 1292{
1293 int rc; 1293 int rc;
1294 unsigned long flags; 1294 unsigned long flags;
@@ -1356,7 +1356,7 @@ static inline int iwl3945_hw_reg_temp_out_of_range(int temperature)
1356 return ((temperature < -260) || (temperature > 25)) ? 1 : 0; 1356 return ((temperature < -260) || (temperature > 25)) ? 1 : 0;
1357} 1357}
1358 1358
1359int iwl3945_hw_get_temperature(struct iwl3945_priv *priv) 1359int iwl3945_hw_get_temperature(struct iwl_priv *priv)
1360{ 1360{
1361 return iwl3945_read32(priv, CSR_UCODE_DRV_GP2); 1361 return iwl3945_read32(priv, CSR_UCODE_DRV_GP2);
1362} 1362}
@@ -1365,7 +1365,7 @@ int iwl3945_hw_get_temperature(struct iwl3945_priv *priv)
1365 * iwl3945_hw_reg_txpower_get_temperature 1365 * iwl3945_hw_reg_txpower_get_temperature
1366 * get the current temperature by reading from NIC 1366 * get the current temperature by reading from NIC
1367*/ 1367*/
1368static int iwl3945_hw_reg_txpower_get_temperature(struct iwl3945_priv *priv) 1368static int iwl3945_hw_reg_txpower_get_temperature(struct iwl_priv *priv)
1369{ 1369{
1370 int temperature; 1370 int temperature;
1371 1371
@@ -1401,7 +1401,7 @@ static int iwl3945_hw_reg_txpower_get_temperature(struct iwl3945_priv *priv)
1401 * records new temperature in tx_mgr->temperature. 1401 * records new temperature in tx_mgr->temperature.
1402 * replaces tx_mgr->last_temperature *only* if calib needed 1402 * replaces tx_mgr->last_temperature *only* if calib needed
1403 * (assumes caller will actually do the calibration!). */ 1403 * (assumes caller will actually do the calibration!). */
1404static int is_temp_calib_needed(struct iwl3945_priv *priv) 1404static int is_temp_calib_needed(struct iwl_priv *priv)
1405{ 1405{
1406 int temp_diff; 1406 int temp_diff;
1407 1407
@@ -1616,7 +1616,7 @@ static inline u8 iwl3945_hw_reg_fix_power_index(int index)
1616 * Set (in our channel info database) the direct scan Tx power for 1 Mbit (CCK) 1616 * Set (in our channel info database) the direct scan Tx power for 1 Mbit (CCK)
1617 * or 6 Mbit (OFDM) rates. 1617 * or 6 Mbit (OFDM) rates.
1618 */ 1618 */
1619static void iwl3945_hw_reg_set_scan_power(struct iwl3945_priv *priv, u32 scan_tbl_index, 1619static void iwl3945_hw_reg_set_scan_power(struct iwl_priv *priv, u32 scan_tbl_index,
1620 s32 rate_index, const s8 *clip_pwrs, 1620 s32 rate_index, const s8 *clip_pwrs,
1621 struct iwl_channel_info *ch_info, 1621 struct iwl_channel_info *ch_info,
1622 int band_index) 1622 int band_index)
@@ -1672,7 +1672,7 @@ static void iwl3945_hw_reg_set_scan_power(struct iwl3945_priv *priv, u32 scan_tb
1672 * Configures power settings for all rates for the current channel, 1672 * Configures power settings for all rates for the current channel,
1673 * using values from channel info struct, and send to NIC 1673 * using values from channel info struct, and send to NIC
1674 */ 1674 */
1675int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv) 1675int iwl3945_hw_reg_send_txpower(struct iwl_priv *priv)
1676{ 1676{
1677 int rate_idx, i; 1677 int rate_idx, i;
1678 const struct iwl_channel_info *ch_info = NULL; 1678 const struct iwl_channel_info *ch_info = NULL;
@@ -1747,7 +1747,7 @@ int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv)
1747 * properly fill out the scan powers, and actual h/w gain settings, 1747 * properly fill out the scan powers, and actual h/w gain settings,
1748 * and send changes to NIC 1748 * and send changes to NIC
1749 */ 1749 */
1750static int iwl3945_hw_reg_set_new_power(struct iwl3945_priv *priv, 1750static int iwl3945_hw_reg_set_new_power(struct iwl_priv *priv,
1751 struct iwl_channel_info *ch_info) 1751 struct iwl_channel_info *ch_info)
1752{ 1752{
1753 struct iwl3945_channel_power_info *power_info; 1753 struct iwl3945_channel_power_info *power_info;
@@ -1838,7 +1838,7 @@ static int iwl3945_hw_reg_get_ch_txpower_limit(struct iwl_channel_info *ch_info)
1838 * 1838 *
1839 * If RxOn is "associated", this sends the new Txpower to NIC! 1839 * If RxOn is "associated", this sends the new Txpower to NIC!
1840 */ 1840 */
1841static int iwl3945_hw_reg_comp_txpower_temp(struct iwl3945_priv *priv) 1841static int iwl3945_hw_reg_comp_txpower_temp(struct iwl_priv *priv)
1842{ 1842{
1843 struct iwl_channel_info *ch_info = NULL; 1843 struct iwl_channel_info *ch_info = NULL;
1844 int delta_index; 1844 int delta_index;
@@ -1899,7 +1899,7 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl3945_priv *priv)
1899 return iwl3945_hw_reg_send_txpower(priv); 1899 return iwl3945_hw_reg_send_txpower(priv);
1900} 1900}
1901 1901
1902int iwl3945_hw_reg_set_txpower(struct iwl3945_priv *priv, s8 power) 1902int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power)
1903{ 1903{
1904 struct iwl_channel_info *ch_info; 1904 struct iwl_channel_info *ch_info;
1905 s8 max_power; 1905 s8 max_power;
@@ -1942,7 +1942,7 @@ int iwl3945_hw_reg_set_txpower(struct iwl3945_priv *priv, s8 power)
1942} 1942}
1943 1943
1944/* will add 3945 channel switch cmd handling later */ 1944/* will add 3945 channel switch cmd handling later */
1945int iwl3945_hw_channel_switch(struct iwl3945_priv *priv, u16 channel) 1945int iwl3945_hw_channel_switch(struct iwl_priv *priv, u16 channel)
1946{ 1946{
1947 return 0; 1947 return 0;
1948} 1948}
@@ -1957,7 +1957,7 @@ int iwl3945_hw_channel_switch(struct iwl3945_priv *priv, u16 channel)
1957 * -- send new set of gain settings to NIC 1957 * -- send new set of gain settings to NIC
1958 * NOTE: This should continue working, even when we're not associated, 1958 * NOTE: This should continue working, even when we're not associated,
1959 * so we can keep our internal table of scan powers current. */ 1959 * so we can keep our internal table of scan powers current. */
1960void iwl3945_reg_txpower_periodic(struct iwl3945_priv *priv) 1960void iwl3945_reg_txpower_periodic(struct iwl_priv *priv)
1961{ 1961{
1962 /* This will kick in the "brute force" 1962 /* This will kick in the "brute force"
1963 * iwl3945_hw_reg_comp_txpower_temp() below */ 1963 * iwl3945_hw_reg_comp_txpower_temp() below */
@@ -1976,7 +1976,7 @@ void iwl3945_reg_txpower_periodic(struct iwl3945_priv *priv)
1976 1976
1977static void iwl3945_bg_reg_txpower_periodic(struct work_struct *work) 1977static void iwl3945_bg_reg_txpower_periodic(struct work_struct *work)
1978{ 1978{
1979 struct iwl3945_priv *priv = container_of(work, struct iwl3945_priv, 1979 struct iwl_priv *priv = container_of(work, struct iwl_priv,
1980 thermal_periodic.work); 1980 thermal_periodic.work);
1981 1981
1982 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 1982 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
@@ -1998,7 +1998,7 @@ static void iwl3945_bg_reg_txpower_periodic(struct work_struct *work)
1998 * on A-band, EEPROM's "group frequency" entries represent the top 1998 * on A-band, EEPROM's "group frequency" entries represent the top
1999 * channel in each group 1-4. Group 5 All B/G channels are in group 0. 1999 * channel in each group 1-4. Group 5 All B/G channels are in group 0.
2000 */ 2000 */
2001static u16 iwl3945_hw_reg_get_ch_grp_index(struct iwl3945_priv *priv, 2001static u16 iwl3945_hw_reg_get_ch_grp_index(struct iwl_priv *priv,
2002 const struct iwl_channel_info *ch_info) 2002 const struct iwl_channel_info *ch_info)
2003{ 2003{
2004 struct iwl3945_eeprom_txpower_group *ch_grp = &priv->eeprom39.groups[0]; 2004 struct iwl3945_eeprom_txpower_group *ch_grp = &priv->eeprom39.groups[0];
@@ -2032,7 +2032,7 @@ static u16 iwl3945_hw_reg_get_ch_grp_index(struct iwl3945_priv *priv,
2032 * Interpolate to get nominal (i.e. at factory calibration temperature) index 2032 * Interpolate to get nominal (i.e. at factory calibration temperature) index
2033 * into radio/DSP gain settings table for requested power. 2033 * into radio/DSP gain settings table for requested power.
2034 */ 2034 */
2035static int iwl3945_hw_reg_get_matched_power_index(struct iwl3945_priv *priv, 2035static int iwl3945_hw_reg_get_matched_power_index(struct iwl_priv *priv,
2036 s8 requested_power, 2036 s8 requested_power,
2037 s32 setting_index, s32 *new_index) 2037 s32 setting_index, s32 *new_index)
2038{ 2038{
@@ -2080,7 +2080,7 @@ static int iwl3945_hw_reg_get_matched_power_index(struct iwl3945_priv *priv,
2080 return 0; 2080 return 0;
2081} 2081}
2082 2082
2083static void iwl3945_hw_reg_init_channel_groups(struct iwl3945_priv *priv) 2083static void iwl3945_hw_reg_init_channel_groups(struct iwl_priv *priv)
2084{ 2084{
2085 u32 i; 2085 u32 i;
2086 s32 rate_index; 2086 s32 rate_index;
@@ -2160,7 +2160,7 @@ static void iwl3945_hw_reg_init_channel_groups(struct iwl3945_priv *priv)
2160 * 2160 *
2161 * This does *not* write values to NIC, just sets up our internal table. 2161 * This does *not* write values to NIC, just sets up our internal table.
2162 */ 2162 */
2163int iwl3945_txpower_set_from_eeprom(struct iwl3945_priv *priv) 2163int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv)
2164{ 2164{
2165 struct iwl_channel_info *ch_info = NULL; 2165 struct iwl_channel_info *ch_info = NULL;
2166 struct iwl3945_channel_power_info *pwr_info; 2166 struct iwl3945_channel_power_info *pwr_info;
@@ -2284,7 +2284,7 @@ int iwl3945_txpower_set_from_eeprom(struct iwl3945_priv *priv)
2284 return 0; 2284 return 0;
2285} 2285}
2286 2286
2287int iwl3945_hw_rxq_stop(struct iwl3945_priv *priv) 2287int iwl3945_hw_rxq_stop(struct iwl_priv *priv)
2288{ 2288{
2289 int rc; 2289 int rc;
2290 unsigned long flags; 2290 unsigned long flags;
@@ -2308,7 +2308,7 @@ int iwl3945_hw_rxq_stop(struct iwl3945_priv *priv)
2308 return 0; 2308 return 0;
2309} 2309}
2310 2310
2311int iwl3945_hw_tx_queue_init(struct iwl3945_priv *priv, struct iwl3945_tx_queue *txq) 2311int iwl3945_hw_tx_queue_init(struct iwl_priv *priv, struct iwl3945_tx_queue *txq)
2312{ 2312{
2313 int rc; 2313 int rc;
2314 unsigned long flags; 2314 unsigned long flags;
@@ -2342,7 +2342,7 @@ int iwl3945_hw_tx_queue_init(struct iwl3945_priv *priv, struct iwl3945_tx_queue
2342 return 0; 2342 return 0;
2343} 2343}
2344 2344
2345int iwl3945_hw_get_rx_read(struct iwl3945_priv *priv) 2345int iwl3945_hw_get_rx_read(struct iwl_priv *priv)
2346{ 2346{
2347 struct iwl3945_shared *shared_data = priv->shared_virt; 2347 struct iwl3945_shared *shared_data = priv->shared_virt;
2348 2348
@@ -2352,7 +2352,7 @@ int iwl3945_hw_get_rx_read(struct iwl3945_priv *priv)
2352/** 2352/**
2353 * iwl3945_init_hw_rate_table - Initialize the hardware rate fallback table 2353 * iwl3945_init_hw_rate_table - Initialize the hardware rate fallback table
2354 */ 2354 */
2355int iwl3945_init_hw_rate_table(struct iwl3945_priv *priv) 2355int iwl3945_init_hw_rate_table(struct iwl_priv *priv)
2356{ 2356{
2357 int rc, i, index, prev_index; 2357 int rc, i, index, prev_index;
2358 struct iwl3945_rate_scaling_cmd rate_cmd = { 2358 struct iwl3945_rate_scaling_cmd rate_cmd = {
@@ -2429,7 +2429,7 @@ int iwl3945_init_hw_rate_table(struct iwl3945_priv *priv)
2429} 2429}
2430 2430
2431/* Called when initializing driver */ 2431/* Called when initializing driver */
2432int iwl3945_hw_set_hw_params(struct iwl3945_priv *priv) 2432int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
2433{ 2433{
2434 memset((void *)&priv->hw_params, 0, 2434 memset((void *)&priv->hw_params, 0,
2435 sizeof(struct iwl_hw_params)); 2435 sizeof(struct iwl_hw_params));
@@ -2456,7 +2456,7 @@ int iwl3945_hw_set_hw_params(struct iwl3945_priv *priv)
2456 return 0; 2456 return 0;
2457} 2457}
2458 2458
2459unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv, 2459unsigned int iwl3945_hw_get_beacon_cmd(struct iwl_priv *priv,
2460 struct iwl3945_frame *frame, u8 rate) 2460 struct iwl3945_frame *frame, u8 rate)
2461{ 2461{
2462 struct iwl3945_tx_beacon_cmd *tx_beacon_cmd; 2462 struct iwl3945_tx_beacon_cmd *tx_beacon_cmd;
@@ -2489,19 +2489,19 @@ unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv,
2489 return sizeof(struct iwl3945_tx_beacon_cmd) + frame_size; 2489 return sizeof(struct iwl3945_tx_beacon_cmd) + frame_size;
2490} 2490}
2491 2491
2492void iwl3945_hw_rx_handler_setup(struct iwl3945_priv *priv) 2492void iwl3945_hw_rx_handler_setup(struct iwl_priv *priv)
2493{ 2493{
2494 priv->rx_handlers[REPLY_TX] = iwl3945_rx_reply_tx; 2494 priv->rx_handlers[REPLY_TX] = iwl3945_rx_reply_tx;
2495 priv->rx_handlers[REPLY_3945_RX] = iwl3945_rx_reply_rx; 2495 priv->rx_handlers[REPLY_3945_RX] = iwl3945_rx_reply_rx;
2496} 2496}
2497 2497
2498void iwl3945_hw_setup_deferred_work(struct iwl3945_priv *priv) 2498void iwl3945_hw_setup_deferred_work(struct iwl_priv *priv)
2499{ 2499{
2500 INIT_DELAYED_WORK(&priv->thermal_periodic, 2500 INIT_DELAYED_WORK(&priv->thermal_periodic,
2501 iwl3945_bg_reg_txpower_periodic); 2501 iwl3945_bg_reg_txpower_periodic);
2502} 2502}
2503 2503
2504void iwl3945_hw_cancel_deferred_work(struct iwl3945_priv *priv) 2504void iwl3945_hw_cancel_deferred_work(struct iwl_priv *priv)
2505{ 2505{
2506 cancel_delayed_work(&priv->thermal_periodic); 2506 cancel_delayed_work(&priv->thermal_periodic);
2507} 2507}