diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-10-29 17:05:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:17:37 -0500 |
commit | 5b9f8cd3eea04770ff186b853bbde1741f321866 (patch) | |
tree | 4ffb22090268cc58d78029a93e9add3baa3d5a99 /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | 60294de3af99586bb4a205274d02a7c8b910c0c3 (diff) |
iwlwifi: rename generic iwlagn functions that had a HW specific name
This patch renames functions that are generic in iwl-agn and had a iwl4965
prefix.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-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-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 402 |
1 files changed, 201 insertions, 201 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index ae30d495876b..f3e4cf5a82e0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -96,7 +96,7 @@ MODULE_ALIAS("iwl4965"); | |||
96 | 96 | ||
97 | 97 | ||
98 | 98 | ||
99 | static void iwl4965_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt) | 99 | static void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt) |
100 | { | 100 | { |
101 | struct iwl_rxon_cmd *rxon = &priv->staging_rxon; | 101 | struct iwl_rxon_cmd *rxon = &priv->staging_rxon; |
102 | 102 | ||
@@ -108,13 +108,13 @@ static void iwl4965_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt) | |||
108 | } | 108 | } |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * iwl4965_check_rxon_cmd - validate RXON structure is valid | 111 | * iwl_check_rxon_cmd - validate RXON structure is valid |
112 | * | 112 | * |
113 | * NOTE: This is really only useful during development and can eventually | 113 | * NOTE: This is really only useful during development and can eventually |
114 | * be #ifdef'd out once the driver is stable and folks aren't actively | 114 | * be #ifdef'd out once the driver is stable and folks aren't actively |
115 | * making changes | 115 | * making changes |
116 | */ | 116 | */ |
117 | static int iwl4965_check_rxon_cmd(struct iwl_rxon_cmd *rxon) | 117 | static int iwl_check_rxon_cmd(struct iwl_rxon_cmd *rxon) |
118 | { | 118 | { |
119 | int error = 0; | 119 | int error = 0; |
120 | int counter = 1; | 120 | int counter = 1; |
@@ -174,7 +174,7 @@ static int iwl4965_check_rxon_cmd(struct iwl_rxon_cmd *rxon) | |||
174 | le16_to_cpu(rxon->channel)); | 174 | le16_to_cpu(rxon->channel)); |
175 | 175 | ||
176 | if (error) { | 176 | if (error) { |
177 | IWL_ERROR("Not a valid iwl4965_rxon_assoc_cmd field values\n"); | 177 | IWL_ERROR("Not a valid iwl_rxon_assoc_cmd field values\n"); |
178 | return -1; | 178 | return -1; |
179 | } | 179 | } |
180 | return 0; | 180 | return 0; |
@@ -228,14 +228,14 @@ static int iwl_full_rxon_required(struct iwl_priv *priv) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | /** | 230 | /** |
231 | * iwl4965_commit_rxon - commit staging_rxon to hardware | 231 | * iwl_commit_rxon - commit staging_rxon to hardware |
232 | * | 232 | * |
233 | * The RXON command in staging_rxon is committed to the hardware and | 233 | * The RXON command in staging_rxon is committed to the hardware and |
234 | * the active_rxon structure is updated with the new data. This | 234 | * the active_rxon structure is updated with the new data. This |
235 | * function correctly transitions out of the RXON_ASSOC_MSK state if | 235 | * function correctly transitions out of the RXON_ASSOC_MSK state if |
236 | * a HW tune is required based on the RXON structure changes. | 236 | * a HW tune is required based on the RXON structure changes. |
237 | */ | 237 | */ |
238 | static int iwl4965_commit_rxon(struct iwl_priv *priv) | 238 | static int iwl_commit_rxon(struct iwl_priv *priv) |
239 | { | 239 | { |
240 | /* cast away the const for active_rxon in this function */ | 240 | /* cast away the const for active_rxon in this function */ |
241 | struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; | 241 | struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; |
@@ -252,14 +252,14 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv) | |||
252 | * 5000, but will not damage 4965 */ | 252 | * 5000, but will not damage 4965 */ |
253 | priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN; | 253 | priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN; |
254 | 254 | ||
255 | ret = iwl4965_check_rxon_cmd(&priv->staging_rxon); | 255 | ret = iwl_check_rxon_cmd(&priv->staging_rxon); |
256 | if (ret) { | 256 | if (ret) { |
257 | IWL_ERROR("Invalid RXON configuration. Not committing.\n"); | 257 | IWL_ERROR("Invalid RXON configuration. Not committing.\n"); |
258 | return -EINVAL; | 258 | return -EINVAL; |
259 | } | 259 | } |
260 | 260 | ||
261 | /* If we don't need to send a full RXON, we can use | 261 | /* If we don't need to send a full RXON, we can use |
262 | * iwl4965_rxon_assoc_cmd which is used to reconfigure filter | 262 | * iwl_rxon_assoc_cmd which is used to reconfigure filter |
263 | * and other flags for the current radio configuration. */ | 263 | * and other flags for the current radio configuration. */ |
264 | if (!iwl_full_rxon_required(priv)) { | 264 | if (!iwl_full_rxon_required(priv)) { |
265 | ret = iwl_send_rxon_assoc(priv); | 265 | ret = iwl_send_rxon_assoc(priv); |
@@ -304,7 +304,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv) | |||
304 | le16_to_cpu(priv->staging_rxon.channel), | 304 | le16_to_cpu(priv->staging_rxon.channel), |
305 | priv->staging_rxon.bssid_addr); | 305 | priv->staging_rxon.bssid_addr); |
306 | 306 | ||
307 | iwl4965_set_rxon_hwcrypto(priv, !priv->hw_params.sw_crypto); | 307 | iwl_set_rxon_hwcrypto(priv, !priv->hw_params.sw_crypto); |
308 | 308 | ||
309 | /* Apply the new configuration | 309 | /* Apply the new configuration |
310 | * RXON unassoc clears the station table in uCode, send it before | 310 | * RXON unassoc clears the station table in uCode, send it before |
@@ -374,14 +374,14 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv) | |||
374 | return 0; | 374 | return 0; |
375 | } | 375 | } |
376 | 376 | ||
377 | void iwl4965_update_chain_flags(struct iwl_priv *priv) | 377 | void iwl_update_chain_flags(struct iwl_priv *priv) |
378 | { | 378 | { |
379 | 379 | ||
380 | iwl_set_rxon_chain(priv); | 380 | iwl_set_rxon_chain(priv); |
381 | iwl4965_commit_rxon(priv); | 381 | iwl_commit_rxon(priv); |
382 | } | 382 | } |
383 | 383 | ||
384 | static int iwl4965_send_bt_config(struct iwl_priv *priv) | 384 | static int iwl_send_bt_config(struct iwl_priv *priv) |
385 | { | 385 | { |
386 | struct iwl4965_bt_cmd bt_cmd = { | 386 | struct iwl4965_bt_cmd bt_cmd = { |
387 | .flags = 3, | 387 | .flags = 3, |
@@ -459,7 +459,7 @@ static unsigned int iwl_fill_beacon_frame(struct iwl_priv *priv, | |||
459 | return priv->ibss_beacon->len; | 459 | return priv->ibss_beacon->len; |
460 | } | 460 | } |
461 | 461 | ||
462 | static u8 iwl4965_rate_get_lowest_plcp(struct iwl_priv *priv) | 462 | static u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv) |
463 | { | 463 | { |
464 | int i; | 464 | int i; |
465 | int rate_mask; | 465 | int rate_mask; |
@@ -484,7 +484,7 @@ static u8 iwl4965_rate_get_lowest_plcp(struct iwl_priv *priv) | |||
484 | return IWL_RATE_6M_PLCP; | 484 | return IWL_RATE_6M_PLCP; |
485 | } | 485 | } |
486 | 486 | ||
487 | static unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv, | 487 | static unsigned int iwl_hw_get_beacon_cmd(struct iwl_priv *priv, |
488 | struct iwl_frame *frame, u8 rate) | 488 | struct iwl_frame *frame, u8 rate) |
489 | { | 489 | { |
490 | struct iwl_tx_beacon_cmd *tx_beacon_cmd; | 490 | struct iwl_tx_beacon_cmd *tx_beacon_cmd; |
@@ -516,7 +516,7 @@ static unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv, | |||
516 | 516 | ||
517 | return sizeof(*tx_beacon_cmd) + frame_size; | 517 | return sizeof(*tx_beacon_cmd) + frame_size; |
518 | } | 518 | } |
519 | static int iwl4965_send_beacon_cmd(struct iwl_priv *priv) | 519 | static int iwl_send_beacon_cmd(struct iwl_priv *priv) |
520 | { | 520 | { |
521 | struct iwl_frame *frame; | 521 | struct iwl_frame *frame; |
522 | unsigned int frame_size; | 522 | unsigned int frame_size; |
@@ -531,9 +531,9 @@ static int iwl4965_send_beacon_cmd(struct iwl_priv *priv) | |||
531 | return -ENOMEM; | 531 | return -ENOMEM; |
532 | } | 532 | } |
533 | 533 | ||
534 | rate = iwl4965_rate_get_lowest_plcp(priv); | 534 | rate = iwl_rate_get_lowest_plcp(priv); |
535 | 535 | ||
536 | frame_size = iwl4965_hw_get_beacon_cmd(priv, frame, rate); | 536 | frame_size = iwl_hw_get_beacon_cmd(priv, frame, rate); |
537 | 537 | ||
538 | rc = iwl_send_cmd_pdu(priv, REPLY_TX_BEACON, frame_size, | 538 | rc = iwl_send_cmd_pdu(priv, REPLY_TX_BEACON, frame_size, |
539 | &frame->u.cmd[0]); | 539 | &frame->u.cmd[0]); |
@@ -549,7 +549,7 @@ static int iwl4965_send_beacon_cmd(struct iwl_priv *priv) | |||
549 | * | 549 | * |
550 | ******************************************************************************/ | 550 | ******************************************************************************/ |
551 | 551 | ||
552 | static void iwl4965_ht_conf(struct iwl_priv *priv, | 552 | static void iwl_ht_conf(struct iwl_priv *priv, |
553 | struct ieee80211_bss_conf *bss_conf) | 553 | struct ieee80211_bss_conf *bss_conf) |
554 | { | 554 | { |
555 | struct ieee80211_sta_ht_cap *ht_conf; | 555 | struct ieee80211_sta_ht_cap *ht_conf; |
@@ -708,7 +708,7 @@ static void iwl_set_flags_for_band(struct iwl_priv *priv, | |||
708 | | RXON_FLG_CCK_MSK); | 708 | | RXON_FLG_CCK_MSK); |
709 | priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK; | 709 | priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK; |
710 | } else { | 710 | } else { |
711 | /* Copied from iwl4965_post_associate() */ | 711 | /* Copied from iwl_post_associate() */ |
712 | if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) | 712 | if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) |
713 | priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK; | 713 | priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK; |
714 | else | 714 | else |
@@ -726,7 +726,7 @@ static void iwl_set_flags_for_band(struct iwl_priv *priv, | |||
726 | /* | 726 | /* |
727 | * initialize rxon structure with default values from eeprom | 727 | * initialize rxon structure with default values from eeprom |
728 | */ | 728 | */ |
729 | static void iwl4965_connection_init_rx_config(struct iwl_priv *priv, int mode) | 729 | static void iwl_connection_init_rx_config(struct iwl_priv *priv, int mode) |
730 | { | 730 | { |
731 | const struct iwl_channel_info *ch_info; | 731 | const struct iwl_channel_info *ch_info; |
732 | 732 | ||
@@ -801,9 +801,9 @@ static void iwl4965_connection_init_rx_config(struct iwl_priv *priv, int mode) | |||
801 | iwl_set_rxon_chain(priv); | 801 | iwl_set_rxon_chain(priv); |
802 | } | 802 | } |
803 | 803 | ||
804 | static int iwl4965_set_mode(struct iwl_priv *priv, int mode) | 804 | static int iwl_set_mode(struct iwl_priv *priv, int mode) |
805 | { | 805 | { |
806 | iwl4965_connection_init_rx_config(priv, mode); | 806 | iwl_connection_init_rx_config(priv, mode); |
807 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); | 807 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); |
808 | 808 | ||
809 | iwl_clear_stations_table(priv); | 809 | iwl_clear_stations_table(priv); |
@@ -819,12 +819,12 @@ static int iwl4965_set_mode(struct iwl_priv *priv, int mode) | |||
819 | return -EAGAIN; | 819 | return -EAGAIN; |
820 | } | 820 | } |
821 | 821 | ||
822 | iwl4965_commit_rxon(priv); | 822 | iwl_commit_rxon(priv); |
823 | 823 | ||
824 | return 0; | 824 | return 0; |
825 | } | 825 | } |
826 | 826 | ||
827 | static void iwl4965_set_rate(struct iwl_priv *priv) | 827 | static void iwl_set_rate(struct iwl_priv *priv) |
828 | { | 828 | { |
829 | const struct ieee80211_supported_band *hw = NULL; | 829 | const struct ieee80211_supported_band *hw = NULL; |
830 | struct ieee80211_rate *rate; | 830 | struct ieee80211_rate *rate; |
@@ -886,7 +886,7 @@ static void iwl4965_set_rate(struct iwl_priv *priv) | |||
886 | * the lower 3 bytes is the time in usec within one beacon interval | 886 | * the lower 3 bytes is the time in usec within one beacon interval |
887 | */ | 887 | */ |
888 | 888 | ||
889 | static u32 iwl4965_usecs_to_beacons(u32 usec, u32 beacon_interval) | 889 | static u32 iwl_usecs_to_beacons(u32 usec, u32 beacon_interval) |
890 | { | 890 | { |
891 | u32 quot; | 891 | u32 quot; |
892 | u32 rem; | 892 | u32 rem; |
@@ -905,7 +905,7 @@ static u32 iwl4965_usecs_to_beacons(u32 usec, u32 beacon_interval) | |||
905 | * the same as HW timer counter counting down | 905 | * the same as HW timer counter counting down |
906 | */ | 906 | */ |
907 | 907 | ||
908 | static __le32 iwl4965_add_beacon_time(u32 base, u32 addon, u32 beacon_interval) | 908 | static __le32 iwl_add_beacon_time(u32 base, u32 addon, u32 beacon_interval) |
909 | { | 909 | { |
910 | u32 base_low = base & BEACON_TIME_MASK_LOW; | 910 | u32 base_low = base & BEACON_TIME_MASK_LOW; |
911 | u32 addon_low = addon & BEACON_TIME_MASK_LOW; | 911 | u32 addon_low = addon & BEACON_TIME_MASK_LOW; |
@@ -924,7 +924,7 @@ static __le32 iwl4965_add_beacon_time(u32 base, u32 addon, u32 beacon_interval) | |||
924 | return cpu_to_le32(res); | 924 | return cpu_to_le32(res); |
925 | } | 925 | } |
926 | 926 | ||
927 | static int iwl4965_get_measurement(struct iwl_priv *priv, | 927 | static int iwl_get_measurement(struct iwl_priv *priv, |
928 | struct ieee80211_measurement_params *params, | 928 | struct ieee80211_measurement_params *params, |
929 | u8 type) | 929 | u8 type) |
930 | { | 930 | { |
@@ -942,7 +942,7 @@ static int iwl4965_get_measurement(struct iwl_priv *priv, | |||
942 | 942 | ||
943 | if (iwl_is_associated(priv)) | 943 | if (iwl_is_associated(priv)) |
944 | add_time = | 944 | add_time = |
945 | iwl4965_usecs_to_beacons( | 945 | iwl_usecs_to_beacons( |
946 | le64_to_cpu(params->start_time) - priv->last_tsf, | 946 | le64_to_cpu(params->start_time) - priv->last_tsf, |
947 | le16_to_cpu(priv->rxon_timing.beacon_interval)); | 947 | le16_to_cpu(priv->rxon_timing.beacon_interval)); |
948 | 948 | ||
@@ -957,7 +957,7 @@ static int iwl4965_get_measurement(struct iwl_priv *priv, | |||
957 | 957 | ||
958 | if (iwl_is_associated(priv)) | 958 | if (iwl_is_associated(priv)) |
959 | spectrum.start_time = | 959 | spectrum.start_time = |
960 | iwl4965_add_beacon_time(priv->last_beacon_time, | 960 | iwl_add_beacon_time(priv->last_beacon_time, |
961 | add_time, | 961 | add_time, |
962 | le16_to_cpu(priv->rxon_timing.beacon_interval)); | 962 | le16_to_cpu(priv->rxon_timing.beacon_interval)); |
963 | else | 963 | else |
@@ -1045,7 +1045,7 @@ static void iwl_rx_reply_alive(struct iwl_priv *priv, | |||
1045 | IWL_WARNING("uCode did not respond OK.\n"); | 1045 | IWL_WARNING("uCode did not respond OK.\n"); |
1046 | } | 1046 | } |
1047 | 1047 | ||
1048 | static void iwl4965_rx_reply_error(struct iwl_priv *priv, | 1048 | static void iwl_rx_reply_error(struct iwl_priv *priv, |
1049 | struct iwl_rx_mem_buffer *rxb) | 1049 | struct iwl_rx_mem_buffer *rxb) |
1050 | { | 1050 | { |
1051 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | 1051 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; |
@@ -1061,7 +1061,7 @@ static void iwl4965_rx_reply_error(struct iwl_priv *priv, | |||
1061 | 1061 | ||
1062 | #define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x | 1062 | #define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x |
1063 | 1063 | ||
1064 | static void iwl4965_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | 1064 | static void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) |
1065 | { | 1065 | { |
1066 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | 1066 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; |
1067 | struct iwl_rxon_cmd *rxon = (void *)&priv->active_rxon; | 1067 | struct iwl_rxon_cmd *rxon = (void *)&priv->active_rxon; |
@@ -1072,7 +1072,7 @@ static void iwl4965_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | |||
1072 | priv->staging_rxon.channel = csa->channel; | 1072 | priv->staging_rxon.channel = csa->channel; |
1073 | } | 1073 | } |
1074 | 1074 | ||
1075 | static void iwl4965_rx_spectrum_measure_notif(struct iwl_priv *priv, | 1075 | static void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv, |
1076 | struct iwl_rx_mem_buffer *rxb) | 1076 | struct iwl_rx_mem_buffer *rxb) |
1077 | { | 1077 | { |
1078 | #ifdef CONFIG_IWLAGN_SPECTRUM_MEASUREMENT | 1078 | #ifdef CONFIG_IWLAGN_SPECTRUM_MEASUREMENT |
@@ -1090,7 +1090,7 @@ static void iwl4965_rx_spectrum_measure_notif(struct iwl_priv *priv, | |||
1090 | #endif | 1090 | #endif |
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | static void iwl4965_rx_pm_sleep_notif(struct iwl_priv *priv, | 1093 | static void iwl_rx_pm_sleep_notif(struct iwl_priv *priv, |
1094 | struct iwl_rx_mem_buffer *rxb) | 1094 | struct iwl_rx_mem_buffer *rxb) |
1095 | { | 1095 | { |
1096 | #ifdef CONFIG_IWLWIFI_DEBUG | 1096 | #ifdef CONFIG_IWLWIFI_DEBUG |
@@ -1101,7 +1101,7 @@ static void iwl4965_rx_pm_sleep_notif(struct iwl_priv *priv, | |||
1101 | #endif | 1101 | #endif |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | static void iwl4965_rx_pm_debug_statistics_notif(struct iwl_priv *priv, | 1104 | static void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv, |
1105 | struct iwl_rx_mem_buffer *rxb) | 1105 | struct iwl_rx_mem_buffer *rxb) |
1106 | { | 1106 | { |
1107 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | 1107 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; |
@@ -1111,7 +1111,7 @@ static void iwl4965_rx_pm_debug_statistics_notif(struct iwl_priv *priv, | |||
1111 | iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len)); | 1111 | iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len)); |
1112 | } | 1112 | } |
1113 | 1113 | ||
1114 | static void iwl4965_bg_beacon_update(struct work_struct *work) | 1114 | static void iwl_bg_beacon_update(struct work_struct *work) |
1115 | { | 1115 | { |
1116 | struct iwl_priv *priv = | 1116 | struct iwl_priv *priv = |
1117 | container_of(work, struct iwl_priv, beacon_update); | 1117 | container_of(work, struct iwl_priv, beacon_update); |
@@ -1133,11 +1133,11 @@ static void iwl4965_bg_beacon_update(struct work_struct *work) | |||
1133 | priv->ibss_beacon = beacon; | 1133 | priv->ibss_beacon = beacon; |
1134 | mutex_unlock(&priv->mutex); | 1134 | mutex_unlock(&priv->mutex); |
1135 | 1135 | ||
1136 | iwl4965_send_beacon_cmd(priv); | 1136 | iwl_send_beacon_cmd(priv); |
1137 | } | 1137 | } |
1138 | 1138 | ||
1139 | /** | 1139 | /** |
1140 | * iwl4965_bg_statistics_periodic - Timer callback to queue statistics | 1140 | * iwl_bg_statistics_periodic - Timer callback to queue statistics |
1141 | * | 1141 | * |
1142 | * This callback is provided in order to send a statistics request. | 1142 | * This callback is provided in order to send a statistics request. |
1143 | * | 1143 | * |
@@ -1146,7 +1146,7 @@ static void iwl4965_bg_beacon_update(struct work_struct *work) | |||
1146 | * was received. We need to ensure we receive the statistics in order | 1146 | * was received. We need to ensure we receive the statistics in order |
1147 | * to update the temperature used for calibrating the TXPOWER. | 1147 | * to update the temperature used for calibrating the TXPOWER. |
1148 | */ | 1148 | */ |
1149 | static void iwl4965_bg_statistics_periodic(unsigned long data) | 1149 | static void iwl_bg_statistics_periodic(unsigned long data) |
1150 | { | 1150 | { |
1151 | struct iwl_priv *priv = (struct iwl_priv *)data; | 1151 | struct iwl_priv *priv = (struct iwl_priv *)data; |
1152 | 1152 | ||
@@ -1156,7 +1156,7 @@ static void iwl4965_bg_statistics_periodic(unsigned long data) | |||
1156 | iwl_send_statistics_request(priv, CMD_ASYNC); | 1156 | iwl_send_statistics_request(priv, CMD_ASYNC); |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | static void iwl4965_rx_beacon_notif(struct iwl_priv *priv, | 1159 | static void iwl_rx_beacon_notif(struct iwl_priv *priv, |
1160 | struct iwl_rx_mem_buffer *rxb) | 1160 | struct iwl_rx_mem_buffer *rxb) |
1161 | { | 1161 | { |
1162 | #ifdef CONFIG_IWLWIFI_DEBUG | 1162 | #ifdef CONFIG_IWLWIFI_DEBUG |
@@ -1180,7 +1180,7 @@ static void iwl4965_rx_beacon_notif(struct iwl_priv *priv, | |||
1180 | 1180 | ||
1181 | /* Handle notification from uCode that card's power state is changing | 1181 | /* Handle notification from uCode that card's power state is changing |
1182 | * due to software, hardware, or critical temperature RFKILL */ | 1182 | * due to software, hardware, or critical temperature RFKILL */ |
1183 | static void iwl4965_rx_card_state_notif(struct iwl_priv *priv, | 1183 | static void iwl_rx_card_state_notif(struct iwl_priv *priv, |
1184 | struct iwl_rx_mem_buffer *rxb) | 1184 | struct iwl_rx_mem_buffer *rxb) |
1185 | { | 1185 | { |
1186 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | 1186 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; |
@@ -1249,7 +1249,7 @@ static void iwl4965_rx_card_state_notif(struct iwl_priv *priv, | |||
1249 | wake_up_interruptible(&priv->wait_command_queue); | 1249 | wake_up_interruptible(&priv->wait_command_queue); |
1250 | } | 1250 | } |
1251 | 1251 | ||
1252 | int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src) | 1252 | int iwl_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src) |
1253 | { | 1253 | { |
1254 | int ret; | 1254 | int ret; |
1255 | unsigned long flags; | 1255 | unsigned long flags; |
@@ -1281,7 +1281,7 @@ err: | |||
1281 | } | 1281 | } |
1282 | 1282 | ||
1283 | /** | 1283 | /** |
1284 | * iwl4965_setup_rx_handlers - Initialize Rx handler callbacks | 1284 | * iwl_setup_rx_handlers - Initialize Rx handler callbacks |
1285 | * | 1285 | * |
1286 | * Setup the RX handlers for each of the reply types sent from the uCode | 1286 | * Setup the RX handlers for each of the reply types sent from the uCode |
1287 | * to the host. | 1287 | * to the host. |
@@ -1292,14 +1292,14 @@ err: | |||
1292 | static void iwl_setup_rx_handlers(struct iwl_priv *priv) | 1292 | static void iwl_setup_rx_handlers(struct iwl_priv *priv) |
1293 | { | 1293 | { |
1294 | priv->rx_handlers[REPLY_ALIVE] = iwl_rx_reply_alive; | 1294 | priv->rx_handlers[REPLY_ALIVE] = iwl_rx_reply_alive; |
1295 | priv->rx_handlers[REPLY_ERROR] = iwl4965_rx_reply_error; | 1295 | priv->rx_handlers[REPLY_ERROR] = iwl_rx_reply_error; |
1296 | priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl4965_rx_csa; | 1296 | priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa; |
1297 | priv->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] = | 1297 | priv->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] = |
1298 | iwl4965_rx_spectrum_measure_notif; | 1298 | iwl_rx_spectrum_measure_notif; |
1299 | priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl4965_rx_pm_sleep_notif; | 1299 | priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl_rx_pm_sleep_notif; |
1300 | priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = | 1300 | priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = |
1301 | iwl4965_rx_pm_debug_statistics_notif; | 1301 | iwl_rx_pm_debug_statistics_notif; |
1302 | priv->rx_handlers[BEACON_NOTIFICATION] = iwl4965_rx_beacon_notif; | 1302 | priv->rx_handlers[BEACON_NOTIFICATION] = iwl_rx_beacon_notif; |
1303 | 1303 | ||
1304 | /* | 1304 | /* |
1305 | * The same handler is used for both the REPLY to a discrete | 1305 | * The same handler is used for both the REPLY to a discrete |
@@ -1312,7 +1312,7 @@ static void iwl_setup_rx_handlers(struct iwl_priv *priv) | |||
1312 | iwl_setup_rx_scan_handlers(priv); | 1312 | iwl_setup_rx_scan_handlers(priv); |
1313 | 1313 | ||
1314 | /* status change handler */ | 1314 | /* status change handler */ |
1315 | priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl4965_rx_card_state_notif; | 1315 | priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl_rx_card_state_notif; |
1316 | 1316 | ||
1317 | priv->rx_handlers[MISSED_BEACONS_NOTIFICATION] = | 1317 | priv->rx_handlers[MISSED_BEACONS_NOTIFICATION] = |
1318 | iwl_rx_missed_beacon_notif; | 1318 | iwl_rx_missed_beacon_notif; |
@@ -1396,7 +1396,7 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1396 | 1396 | ||
1397 | /* Based on type of command response or notification, | 1397 | /* Based on type of command response or notification, |
1398 | * handle those that need handling via function in | 1398 | * handle those that need handling via function in |
1399 | * rx_handlers table. See iwl4965_setup_rx_handlers() */ | 1399 | * rx_handlers table. See iwl_setup_rx_handlers() */ |
1400 | if (priv->rx_handlers[pkt->hdr.cmd]) { | 1400 | if (priv->rx_handlers[pkt->hdr.cmd]) { |
1401 | IWL_DEBUG(IWL_DL_RX, "r = %d, i = %d, %s, 0x%02x\n", r, | 1401 | IWL_DEBUG(IWL_DL_RX, "r = %d, i = %d, %s, 0x%02x\n", r, |
1402 | i, get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); | 1402 | i, get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); |
@@ -1453,7 +1453,7 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | #ifdef CONFIG_IWLWIFI_DEBUG | 1455 | #ifdef CONFIG_IWLWIFI_DEBUG |
1456 | static void iwl4965_print_rx_config_cmd(struct iwl_priv *priv) | 1456 | static void iwl_print_rx_config_cmd(struct iwl_priv *priv) |
1457 | { | 1457 | { |
1458 | struct iwl_rxon_cmd *rxon = &priv->staging_rxon; | 1458 | struct iwl_rxon_cmd *rxon = &priv->staging_rxon; |
1459 | 1459 | ||
@@ -1473,7 +1473,7 @@ static void iwl4965_print_rx_config_cmd(struct iwl_priv *priv) | |||
1473 | } | 1473 | } |
1474 | #endif | 1474 | #endif |
1475 | 1475 | ||
1476 | static void iwl4965_enable_interrupts(struct iwl_priv *priv) | 1476 | static void iwl_enable_interrupts(struct iwl_priv *priv) |
1477 | { | 1477 | { |
1478 | IWL_DEBUG_ISR("Enabling interrupts\n"); | 1478 | IWL_DEBUG_ISR("Enabling interrupts\n"); |
1479 | set_bit(STATUS_INT_ENABLED, &priv->status); | 1479 | set_bit(STATUS_INT_ENABLED, &priv->status); |
@@ -1488,7 +1488,7 @@ static inline void iwl_synchronize_irq(struct iwl_priv *priv) | |||
1488 | tasklet_kill(&priv->irq_tasklet); | 1488 | tasklet_kill(&priv->irq_tasklet); |
1489 | } | 1489 | } |
1490 | 1490 | ||
1491 | static inline void iwl4965_disable_interrupts(struct iwl_priv *priv) | 1491 | static inline void iwl_disable_interrupts(struct iwl_priv *priv) |
1492 | { | 1492 | { |
1493 | clear_bit(STATUS_INT_ENABLED, &priv->status); | 1493 | clear_bit(STATUS_INT_ENABLED, &priv->status); |
1494 | 1494 | ||
@@ -1504,11 +1504,11 @@ static inline void iwl4965_disable_interrupts(struct iwl_priv *priv) | |||
1504 | 1504 | ||
1505 | 1505 | ||
1506 | /** | 1506 | /** |
1507 | * iwl4965_irq_handle_error - called for HW or SW error interrupt from card | 1507 | * iwl_irq_handle_error - called for HW or SW error interrupt from card |
1508 | */ | 1508 | */ |
1509 | static void iwl4965_irq_handle_error(struct iwl_priv *priv) | 1509 | static void iwl_irq_handle_error(struct iwl_priv *priv) |
1510 | { | 1510 | { |
1511 | /* Set the FW error flag -- cleared on iwl4965_down */ | 1511 | /* Set the FW error flag -- cleared on iwl_down */ |
1512 | set_bit(STATUS_FW_ERROR, &priv->status); | 1512 | set_bit(STATUS_FW_ERROR, &priv->status); |
1513 | 1513 | ||
1514 | /* Cancel currently queued command. */ | 1514 | /* Cancel currently queued command. */ |
@@ -1518,7 +1518,7 @@ static void iwl4965_irq_handle_error(struct iwl_priv *priv) | |||
1518 | if (priv->debug_level & IWL_DL_FW_ERRORS) { | 1518 | if (priv->debug_level & IWL_DL_FW_ERRORS) { |
1519 | iwl_dump_nic_error_log(priv); | 1519 | iwl_dump_nic_error_log(priv); |
1520 | iwl_dump_nic_event_log(priv); | 1520 | iwl_dump_nic_event_log(priv); |
1521 | iwl4965_print_rx_config_cmd(priv); | 1521 | iwl_print_rx_config_cmd(priv); |
1522 | } | 1522 | } |
1523 | #endif | 1523 | #endif |
1524 | 1524 | ||
@@ -1542,14 +1542,14 @@ static void iwl4965_irq_handle_error(struct iwl_priv *priv) | |||
1542 | } | 1542 | } |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | static void iwl4965_error_recovery(struct iwl_priv *priv) | 1545 | static void iwl_error_recovery(struct iwl_priv *priv) |
1546 | { | 1546 | { |
1547 | unsigned long flags; | 1547 | unsigned long flags; |
1548 | 1548 | ||
1549 | memcpy(&priv->staging_rxon, &priv->recovery_rxon, | 1549 | memcpy(&priv->staging_rxon, &priv->recovery_rxon, |
1550 | sizeof(priv->staging_rxon)); | 1550 | sizeof(priv->staging_rxon)); |
1551 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 1551 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
1552 | iwl4965_commit_rxon(priv); | 1552 | iwl_commit_rxon(priv); |
1553 | 1553 | ||
1554 | iwl_rxon_add_station(priv, priv->bssid, 1); | 1554 | iwl_rxon_add_station(priv, priv->bssid, 1); |
1555 | 1555 | ||
@@ -1559,7 +1559,7 @@ static void iwl4965_error_recovery(struct iwl_priv *priv) | |||
1559 | spin_unlock_irqrestore(&priv->lock, flags); | 1559 | spin_unlock_irqrestore(&priv->lock, flags); |
1560 | } | 1560 | } |
1561 | 1561 | ||
1562 | static void iwl4965_irq_tasklet(struct iwl_priv *priv) | 1562 | static void iwl_irq_tasklet(struct iwl_priv *priv) |
1563 | { | 1563 | { |
1564 | u32 inta, handled = 0; | 1564 | u32 inta, handled = 0; |
1565 | u32 inta_fh; | 1565 | u32 inta_fh; |
@@ -1605,9 +1605,9 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv) | |||
1605 | IWL_ERROR("Microcode HW error detected. Restarting.\n"); | 1605 | IWL_ERROR("Microcode HW error detected. Restarting.\n"); |
1606 | 1606 | ||
1607 | /* Tell the device to stop sending interrupts */ | 1607 | /* Tell the device to stop sending interrupts */ |
1608 | iwl4965_disable_interrupts(priv); | 1608 | iwl_disable_interrupts(priv); |
1609 | 1609 | ||
1610 | iwl4965_irq_handle_error(priv); | 1610 | iwl_irq_handle_error(priv); |
1611 | 1611 | ||
1612 | handled |= CSR_INT_BIT_HW_ERR; | 1612 | handled |= CSR_INT_BIT_HW_ERR; |
1613 | 1613 | ||
@@ -1661,7 +1661,7 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv) | |||
1661 | if (inta & CSR_INT_BIT_SW_ERR) { | 1661 | if (inta & CSR_INT_BIT_SW_ERR) { |
1662 | IWL_ERROR("Microcode SW error detected. Restarting 0x%X.\n", | 1662 | IWL_ERROR("Microcode SW error detected. Restarting 0x%X.\n", |
1663 | inta); | 1663 | inta); |
1664 | iwl4965_irq_handle_error(priv); | 1664 | iwl_irq_handle_error(priv); |
1665 | handled |= CSR_INT_BIT_SW_ERR; | 1665 | handled |= CSR_INT_BIT_SW_ERR; |
1666 | } | 1666 | } |
1667 | 1667 | ||
@@ -1707,7 +1707,7 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv) | |||
1707 | /* Re-enable all interrupts */ | 1707 | /* Re-enable all interrupts */ |
1708 | /* only Re-enable if diabled by irq */ | 1708 | /* only Re-enable if diabled by irq */ |
1709 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) | 1709 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) |
1710 | iwl4965_enable_interrupts(priv); | 1710 | iwl_enable_interrupts(priv); |
1711 | 1711 | ||
1712 | #ifdef CONFIG_IWLWIFI_DEBUG | 1712 | #ifdef CONFIG_IWLWIFI_DEBUG |
1713 | if (priv->debug_level & (IWL_DL_ISR)) { | 1713 | if (priv->debug_level & (IWL_DL_ISR)) { |
@@ -1721,7 +1721,7 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv) | |||
1721 | spin_unlock_irqrestore(&priv->lock, flags); | 1721 | spin_unlock_irqrestore(&priv->lock, flags); |
1722 | } | 1722 | } |
1723 | 1723 | ||
1724 | static irqreturn_t iwl4965_isr(int irq, void *data) | 1724 | static irqreturn_t iwl_isr(int irq, void *data) |
1725 | { | 1725 | { |
1726 | struct iwl_priv *priv = data; | 1726 | struct iwl_priv *priv = data; |
1727 | u32 inta, inta_mask; | 1727 | u32 inta, inta_mask; |
@@ -1762,7 +1762,7 @@ static irqreturn_t iwl4965_isr(int irq, void *data) | |||
1762 | 1762 | ||
1763 | inta &= ~CSR_INT_BIT_SCD; | 1763 | inta &= ~CSR_INT_BIT_SCD; |
1764 | 1764 | ||
1765 | /* iwl4965_irq_tasklet() will service interrupts and re-enable them */ | 1765 | /* iwl_irq_tasklet() will service interrupts and re-enable them */ |
1766 | if (likely(inta || inta_fh)) | 1766 | if (likely(inta || inta_fh)) |
1767 | tasklet_schedule(&priv->irq_tasklet); | 1767 | tasklet_schedule(&priv->irq_tasklet); |
1768 | 1768 | ||
@@ -1774,7 +1774,7 @@ static irqreturn_t iwl4965_isr(int irq, void *data) | |||
1774 | /* re-enable interrupts here since we don't have anything to service. */ | 1774 | /* re-enable interrupts here since we don't have anything to service. */ |
1775 | /* only Re-enable if diabled by irq */ | 1775 | /* only Re-enable if diabled by irq */ |
1776 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) | 1776 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) |
1777 | iwl4965_enable_interrupts(priv); | 1777 | iwl_enable_interrupts(priv); |
1778 | spin_unlock(&priv->lock); | 1778 | spin_unlock(&priv->lock); |
1779 | return IRQ_NONE; | 1779 | return IRQ_NONE; |
1780 | } | 1780 | } |
@@ -1785,7 +1785,7 @@ static irqreturn_t iwl4965_isr(int irq, void *data) | |||
1785 | * | 1785 | * |
1786 | ******************************************************************************/ | 1786 | ******************************************************************************/ |
1787 | 1787 | ||
1788 | static void iwl4965_dealloc_ucode_pci(struct iwl_priv *priv) | 1788 | static void iwl_dealloc_ucode_pci(struct iwl_priv *priv) |
1789 | { | 1789 | { |
1790 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code); | 1790 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code); |
1791 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data); | 1791 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data); |
@@ -1795,7 +1795,7 @@ static void iwl4965_dealloc_ucode_pci(struct iwl_priv *priv) | |||
1795 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_boot); | 1795 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_boot); |
1796 | } | 1796 | } |
1797 | 1797 | ||
1798 | static void iwl4965_nic_start(struct iwl_priv *priv) | 1798 | static void iwl_nic_start(struct iwl_priv *priv) |
1799 | { | 1799 | { |
1800 | /* Remove all resets to allow NIC to operate */ | 1800 | /* Remove all resets to allow NIC to operate */ |
1801 | iwl_write32(priv, CSR_RESET, 0); | 1801 | iwl_write32(priv, CSR_RESET, 0); |
@@ -1803,11 +1803,11 @@ static void iwl4965_nic_start(struct iwl_priv *priv) | |||
1803 | 1803 | ||
1804 | 1804 | ||
1805 | /** | 1805 | /** |
1806 | * iwl4965_read_ucode - Read uCode images from disk file. | 1806 | * iwl_read_ucode - Read uCode images from disk file. |
1807 | * | 1807 | * |
1808 | * Copy into buffers for card to fetch via bus-mastering | 1808 | * Copy into buffers for card to fetch via bus-mastering |
1809 | */ | 1809 | */ |
1810 | static int iwl4965_read_ucode(struct iwl_priv *priv) | 1810 | static int iwl_read_ucode(struct iwl_priv *priv) |
1811 | { | 1811 | { |
1812 | struct iwl_ucode *ucode; | 1812 | struct iwl_ucode *ucode; |
1813 | int ret; | 1813 | int ret; |
@@ -1951,7 +1951,7 @@ static int iwl4965_read_ucode(struct iwl_priv *priv) | |||
1951 | priv->ucode_code.v_addr, (u32)priv->ucode_code.p_addr); | 1951 | priv->ucode_code.v_addr, (u32)priv->ucode_code.p_addr); |
1952 | 1952 | ||
1953 | /* Runtime data (2nd block) | 1953 | /* Runtime data (2nd block) |
1954 | * NOTE: Copy into backup buffer will be done in iwl4965_up() */ | 1954 | * NOTE: Copy into backup buffer will be done in iwl_up() */ |
1955 | src = &ucode->data[inst_size]; | 1955 | src = &ucode->data[inst_size]; |
1956 | len = priv->ucode_data.len; | 1956 | len = priv->ucode_data.len; |
1957 | IWL_DEBUG_INFO("Copying (but not loading) uCode data len %Zd\n", len); | 1957 | IWL_DEBUG_INFO("Copying (but not loading) uCode data len %Zd\n", len); |
@@ -1989,7 +1989,7 @@ static int iwl4965_read_ucode(struct iwl_priv *priv) | |||
1989 | err_pci_alloc: | 1989 | err_pci_alloc: |
1990 | IWL_ERROR("failed to allocate pci memory\n"); | 1990 | IWL_ERROR("failed to allocate pci memory\n"); |
1991 | ret = -ENOMEM; | 1991 | ret = -ENOMEM; |
1992 | iwl4965_dealloc_ucode_pci(priv); | 1992 | iwl_dealloc_ucode_pci(priv); |
1993 | 1993 | ||
1994 | err_release: | 1994 | err_release: |
1995 | release_firmware(ucode_raw); | 1995 | release_firmware(ucode_raw); |
@@ -2034,7 +2034,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2034 | goto restart; | 2034 | goto restart; |
2035 | } | 2035 | } |
2036 | 2036 | ||
2037 | /* After the ALIVE response, we can send host commands to 4965 uCode */ | 2037 | /* After the ALIVE response, we can send host commands to the uCode */ |
2038 | set_bit(STATUS_ALIVE, &priv->status); | 2038 | set_bit(STATUS_ALIVE, &priv->status); |
2039 | 2039 | ||
2040 | if (iwl_is_rfkill(priv)) | 2040 | if (iwl_is_rfkill(priv)) |
@@ -2054,17 +2054,17 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2054 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 2054 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
2055 | } else { | 2055 | } else { |
2056 | /* Initialize our rx_config data */ | 2056 | /* Initialize our rx_config data */ |
2057 | iwl4965_connection_init_rx_config(priv, priv->iw_mode); | 2057 | iwl_connection_init_rx_config(priv, priv->iw_mode); |
2058 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); | 2058 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); |
2059 | } | 2059 | } |
2060 | 2060 | ||
2061 | /* Configure Bluetooth device coexistence support */ | 2061 | /* Configure Bluetooth device coexistence support */ |
2062 | iwl4965_send_bt_config(priv); | 2062 | iwl_send_bt_config(priv); |
2063 | 2063 | ||
2064 | iwl_reset_run_time_calib(priv); | 2064 | iwl_reset_run_time_calib(priv); |
2065 | 2065 | ||
2066 | /* Configure the adapter for unassociated operation */ | 2066 | /* Configure the adapter for unassociated operation */ |
2067 | iwl4965_commit_rxon(priv); | 2067 | iwl_commit_rxon(priv); |
2068 | 2068 | ||
2069 | /* At this point, the NIC is initialized and operational */ | 2069 | /* At this point, the NIC is initialized and operational */ |
2070 | iwl_rf_kill_ct_config(priv); | 2070 | iwl_rf_kill_ct_config(priv); |
@@ -2076,12 +2076,12 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2076 | wake_up_interruptible(&priv->wait_command_queue); | 2076 | wake_up_interruptible(&priv->wait_command_queue); |
2077 | 2077 | ||
2078 | if (priv->error_recovering) | 2078 | if (priv->error_recovering) |
2079 | iwl4965_error_recovery(priv); | 2079 | iwl_error_recovery(priv); |
2080 | 2080 | ||
2081 | iwl_power_update_mode(priv, 1); | 2081 | iwl_power_update_mode(priv, 1); |
2082 | 2082 | ||
2083 | if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) | 2083 | if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) |
2084 | iwl4965_set_mode(priv, priv->iw_mode); | 2084 | iwl_set_mode(priv, priv->iw_mode); |
2085 | 2085 | ||
2086 | return; | 2086 | return; |
2087 | 2087 | ||
@@ -2091,7 +2091,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2091 | 2091 | ||
2092 | static void iwl_cancel_deferred_work(struct iwl_priv *priv); | 2092 | static void iwl_cancel_deferred_work(struct iwl_priv *priv); |
2093 | 2093 | ||
2094 | static void __iwl4965_down(struct iwl_priv *priv) | 2094 | static void __iwl_down(struct iwl_priv *priv) |
2095 | { | 2095 | { |
2096 | unsigned long flags; | 2096 | unsigned long flags; |
2097 | int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); | 2097 | int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); |
@@ -2118,14 +2118,14 @@ static void __iwl4965_down(struct iwl_priv *priv) | |||
2118 | 2118 | ||
2119 | /* tell the device to stop sending interrupts */ | 2119 | /* tell the device to stop sending interrupts */ |
2120 | spin_lock_irqsave(&priv->lock, flags); | 2120 | spin_lock_irqsave(&priv->lock, flags); |
2121 | iwl4965_disable_interrupts(priv); | 2121 | iwl_disable_interrupts(priv); |
2122 | spin_unlock_irqrestore(&priv->lock, flags); | 2122 | spin_unlock_irqrestore(&priv->lock, flags); |
2123 | iwl_synchronize_irq(priv); | 2123 | iwl_synchronize_irq(priv); |
2124 | 2124 | ||
2125 | if (priv->mac80211_registered) | 2125 | if (priv->mac80211_registered) |
2126 | ieee80211_stop_queues(priv->hw); | 2126 | ieee80211_stop_queues(priv->hw); |
2127 | 2127 | ||
2128 | /* If we have not previously called iwl4965_init() then | 2128 | /* If we have not previously called iwl_init() then |
2129 | * clear all bits but the RF Kill and SUSPEND bits and return */ | 2129 | * clear all bits but the RF Kill and SUSPEND bits and return */ |
2130 | if (!iwl_is_init(priv)) { | 2130 | if (!iwl_is_init(priv)) { |
2131 | priv->status = test_bit(STATUS_RF_KILL_HW, &priv->status) << | 2131 | priv->status = test_bit(STATUS_RF_KILL_HW, &priv->status) << |
@@ -2192,10 +2192,10 @@ static void __iwl4965_down(struct iwl_priv *priv) | |||
2192 | iwl_clear_free_frames(priv); | 2192 | iwl_clear_free_frames(priv); |
2193 | } | 2193 | } |
2194 | 2194 | ||
2195 | static void iwl4965_down(struct iwl_priv *priv) | 2195 | static void iwl_down(struct iwl_priv *priv) |
2196 | { | 2196 | { |
2197 | mutex_lock(&priv->mutex); | 2197 | mutex_lock(&priv->mutex); |
2198 | __iwl4965_down(priv); | 2198 | __iwl_down(priv); |
2199 | mutex_unlock(&priv->mutex); | 2199 | mutex_unlock(&priv->mutex); |
2200 | 2200 | ||
2201 | iwl_cancel_deferred_work(priv); | 2201 | iwl_cancel_deferred_work(priv); |
@@ -2203,7 +2203,7 @@ static void iwl4965_down(struct iwl_priv *priv) | |||
2203 | 2203 | ||
2204 | #define MAX_HW_RESTARTS 5 | 2204 | #define MAX_HW_RESTARTS 5 |
2205 | 2205 | ||
2206 | static int __iwl4965_up(struct iwl_priv *priv) | 2206 | static int __iwl_up(struct iwl_priv *priv) |
2207 | { | 2207 | { |
2208 | int i; | 2208 | int i; |
2209 | int ret; | 2209 | int ret; |
@@ -2225,7 +2225,7 @@ static int __iwl4965_up(struct iwl_priv *priv) | |||
2225 | set_bit(STATUS_RF_KILL_HW, &priv->status); | 2225 | set_bit(STATUS_RF_KILL_HW, &priv->status); |
2226 | 2226 | ||
2227 | if (iwl_is_rfkill(priv)) { | 2227 | if (iwl_is_rfkill(priv)) { |
2228 | iwl4965_enable_interrupts(priv); | 2228 | iwl_enable_interrupts(priv); |
2229 | IWL_WARNING("Radio disabled by %s RF Kill switch\n", | 2229 | IWL_WARNING("Radio disabled by %s RF Kill switch\n", |
2230 | test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW"); | 2230 | test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW"); |
2231 | return 0; | 2231 | return 0; |
@@ -2252,7 +2252,7 @@ static int __iwl4965_up(struct iwl_priv *priv) | |||
2252 | 2252 | ||
2253 | /* clear (again), then enable host interrupts */ | 2253 | /* clear (again), then enable host interrupts */ |
2254 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); | 2254 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
2255 | iwl4965_enable_interrupts(priv); | 2255 | iwl_enable_interrupts(priv); |
2256 | 2256 | ||
2257 | /* really make sure rfkill handshake bits are cleared */ | 2257 | /* really make sure rfkill handshake bits are cleared */ |
2258 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 2258 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
@@ -2282,7 +2282,7 @@ static int __iwl4965_up(struct iwl_priv *priv) | |||
2282 | clear_bit(STATUS_FW_ERROR, &priv->status); | 2282 | clear_bit(STATUS_FW_ERROR, &priv->status); |
2283 | 2283 | ||
2284 | /* start card; "initialize" will load runtime ucode */ | 2284 | /* start card; "initialize" will load runtime ucode */ |
2285 | iwl4965_nic_start(priv); | 2285 | iwl_nic_start(priv); |
2286 | 2286 | ||
2287 | IWL_DEBUG_INFO(DRV_NAME " is coming up\n"); | 2287 | IWL_DEBUG_INFO(DRV_NAME " is coming up\n"); |
2288 | 2288 | ||
@@ -2290,7 +2290,7 @@ static int __iwl4965_up(struct iwl_priv *priv) | |||
2290 | } | 2290 | } |
2291 | 2291 | ||
2292 | set_bit(STATUS_EXIT_PENDING, &priv->status); | 2292 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
2293 | __iwl4965_down(priv); | 2293 | __iwl_down(priv); |
2294 | clear_bit(STATUS_EXIT_PENDING, &priv->status); | 2294 | clear_bit(STATUS_EXIT_PENDING, &priv->status); |
2295 | 2295 | ||
2296 | /* tried to restart and config the device for as long as our | 2296 | /* tried to restart and config the device for as long as our |
@@ -2333,7 +2333,7 @@ static void iwl_bg_alive_start(struct work_struct *data) | |||
2333 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | 2333 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); |
2334 | } | 2334 | } |
2335 | 2335 | ||
2336 | static void iwl4965_bg_rf_kill(struct work_struct *work) | 2336 | static void iwl_bg_rf_kill(struct work_struct *work) |
2337 | { | 2337 | { |
2338 | struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill); | 2338 | struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill); |
2339 | 2339 | ||
@@ -2367,7 +2367,7 @@ static void iwl4965_bg_rf_kill(struct work_struct *work) | |||
2367 | iwl_rfkill_set_hw_state(priv); | 2367 | iwl_rfkill_set_hw_state(priv); |
2368 | } | 2368 | } |
2369 | 2369 | ||
2370 | static void iwl4965_bg_set_monitor(struct work_struct *work) | 2370 | static void iwl_bg_set_monitor(struct work_struct *work) |
2371 | { | 2371 | { |
2372 | struct iwl_priv *priv = container_of(work, | 2372 | struct iwl_priv *priv = container_of(work, |
2373 | struct iwl_priv, set_monitor); | 2373 | struct iwl_priv, set_monitor); |
@@ -2377,12 +2377,12 @@ static void iwl4965_bg_set_monitor(struct work_struct *work) | |||
2377 | 2377 | ||
2378 | mutex_lock(&priv->mutex); | 2378 | mutex_lock(&priv->mutex); |
2379 | 2379 | ||
2380 | ret = iwl4965_set_mode(priv, NL80211_IFTYPE_MONITOR); | 2380 | ret = iwl_set_mode(priv, NL80211_IFTYPE_MONITOR); |
2381 | if (ret) { | 2381 | if (ret) { |
2382 | if (ret == -EAGAIN) | 2382 | if (ret == -EAGAIN) |
2383 | IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n"); | 2383 | IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n"); |
2384 | else | 2384 | else |
2385 | IWL_ERROR("iwl4965_set_mode() failed ret = %d\n", ret); | 2385 | IWL_ERROR("iwl_set_mode() failed ret = %d\n", ret); |
2386 | } | 2386 | } |
2387 | 2387 | ||
2388 | mutex_unlock(&priv->mutex); | 2388 | mutex_unlock(&priv->mutex); |
@@ -2412,7 +2412,7 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
2412 | return; | 2412 | return; |
2413 | } | 2413 | } |
2414 | 2414 | ||
2415 | static void iwl4965_bg_up(struct work_struct *data) | 2415 | static void iwl_bg_up(struct work_struct *data) |
2416 | { | 2416 | { |
2417 | struct iwl_priv *priv = container_of(data, struct iwl_priv, up); | 2417 | struct iwl_priv *priv = container_of(data, struct iwl_priv, up); |
2418 | 2418 | ||
@@ -2420,23 +2420,23 @@ static void iwl4965_bg_up(struct work_struct *data) | |||
2420 | return; | 2420 | return; |
2421 | 2421 | ||
2422 | mutex_lock(&priv->mutex); | 2422 | mutex_lock(&priv->mutex); |
2423 | __iwl4965_up(priv); | 2423 | __iwl_up(priv); |
2424 | mutex_unlock(&priv->mutex); | 2424 | mutex_unlock(&priv->mutex); |
2425 | iwl_rfkill_set_hw_state(priv); | 2425 | iwl_rfkill_set_hw_state(priv); |
2426 | } | 2426 | } |
2427 | 2427 | ||
2428 | static void iwl4965_bg_restart(struct work_struct *data) | 2428 | static void iwl_bg_restart(struct work_struct *data) |
2429 | { | 2429 | { |
2430 | struct iwl_priv *priv = container_of(data, struct iwl_priv, restart); | 2430 | struct iwl_priv *priv = container_of(data, struct iwl_priv, restart); |
2431 | 2431 | ||
2432 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 2432 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
2433 | return; | 2433 | return; |
2434 | 2434 | ||
2435 | iwl4965_down(priv); | 2435 | iwl_down(priv); |
2436 | queue_work(priv->workqueue, &priv->up); | 2436 | queue_work(priv->workqueue, &priv->up); |
2437 | } | 2437 | } |
2438 | 2438 | ||
2439 | static void iwl4965_bg_rx_replenish(struct work_struct *data) | 2439 | static void iwl_bg_rx_replenish(struct work_struct *data) |
2440 | { | 2440 | { |
2441 | struct iwl_priv *priv = | 2441 | struct iwl_priv *priv = |
2442 | container_of(data, struct iwl_priv, rx_replenish); | 2442 | container_of(data, struct iwl_priv, rx_replenish); |
@@ -2451,7 +2451,7 @@ static void iwl4965_bg_rx_replenish(struct work_struct *data) | |||
2451 | 2451 | ||
2452 | #define IWL_DELAY_NEXT_SCAN (HZ*2) | 2452 | #define IWL_DELAY_NEXT_SCAN (HZ*2) |
2453 | 2453 | ||
2454 | static void iwl4965_post_associate(struct iwl_priv *priv) | 2454 | static void iwl_post_associate(struct iwl_priv *priv) |
2455 | { | 2455 | { |
2456 | struct ieee80211_conf *conf = NULL; | 2456 | struct ieee80211_conf *conf = NULL; |
2457 | int ret = 0; | 2457 | int ret = 0; |
@@ -2479,7 +2479,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv) | |||
2479 | conf = ieee80211_get_hw_conf(priv->hw); | 2479 | conf = ieee80211_get_hw_conf(priv->hw); |
2480 | 2480 | ||
2481 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 2481 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
2482 | iwl4965_commit_rxon(priv); | 2482 | iwl_commit_rxon(priv); |
2483 | 2483 | ||
2484 | iwl_setup_rxon_timing(priv); | 2484 | iwl_setup_rxon_timing(priv); |
2485 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON_TIMING, | 2485 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON_TIMING, |
@@ -2514,7 +2514,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv) | |||
2514 | 2514 | ||
2515 | } | 2515 | } |
2516 | 2516 | ||
2517 | iwl4965_commit_rxon(priv); | 2517 | iwl_commit_rxon(priv); |
2518 | 2518 | ||
2519 | switch (priv->iw_mode) { | 2519 | switch (priv->iw_mode) { |
2520 | case NL80211_IFTYPE_STATION: | 2520 | case NL80211_IFTYPE_STATION: |
@@ -2526,7 +2526,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv) | |||
2526 | priv->assoc_id = 1; | 2526 | priv->assoc_id = 1; |
2527 | 2527 | ||
2528 | iwl_rxon_add_station(priv, priv->bssid, 0); | 2528 | iwl_rxon_add_station(priv, priv->bssid, 0); |
2529 | iwl4965_send_beacon_cmd(priv); | 2529 | iwl_send_beacon_cmd(priv); |
2530 | 2530 | ||
2531 | break; | 2531 | break; |
2532 | 2532 | ||
@@ -2563,7 +2563,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv) | |||
2563 | 2563 | ||
2564 | #define UCODE_READY_TIMEOUT (4 * HZ) | 2564 | #define UCODE_READY_TIMEOUT (4 * HZ) |
2565 | 2565 | ||
2566 | static int iwl4965_mac_start(struct ieee80211_hw *hw) | 2566 | static int iwl_mac_start(struct ieee80211_hw *hw) |
2567 | { | 2567 | { |
2568 | struct iwl_priv *priv = hw->priv; | 2568 | struct iwl_priv *priv = hw->priv; |
2569 | int ret; | 2569 | int ret; |
@@ -2585,7 +2585,7 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw) | |||
2585 | pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd); | 2585 | pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd); |
2586 | } | 2586 | } |
2587 | 2587 | ||
2588 | ret = request_irq(priv->pci_dev->irq, iwl4965_isr, IRQF_SHARED, | 2588 | ret = request_irq(priv->pci_dev->irq, iwl_isr, IRQF_SHARED, |
2589 | DRV_NAME, priv); | 2589 | DRV_NAME, priv); |
2590 | if (ret) { | 2590 | if (ret) { |
2591 | IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq); | 2591 | IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq); |
@@ -2600,7 +2600,7 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw) | |||
2600 | * ucode filename and max sizes are card-specific. */ | 2600 | * ucode filename and max sizes are card-specific. */ |
2601 | 2601 | ||
2602 | if (!priv->ucode_code.len) { | 2602 | if (!priv->ucode_code.len) { |
2603 | ret = iwl4965_read_ucode(priv); | 2603 | ret = iwl_read_ucode(priv); |
2604 | if (ret) { | 2604 | if (ret) { |
2605 | IWL_ERROR("Could not read microcode: %d\n", ret); | 2605 | IWL_ERROR("Could not read microcode: %d\n", ret); |
2606 | mutex_unlock(&priv->mutex); | 2606 | mutex_unlock(&priv->mutex); |
@@ -2608,7 +2608,7 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw) | |||
2608 | } | 2608 | } |
2609 | } | 2609 | } |
2610 | 2610 | ||
2611 | ret = __iwl4965_up(priv); | 2611 | ret = __iwl_up(priv); |
2612 | 2612 | ||
2613 | mutex_unlock(&priv->mutex); | 2613 | mutex_unlock(&priv->mutex); |
2614 | 2614 | ||
@@ -2654,7 +2654,7 @@ out_disable_msi: | |||
2654 | return ret; | 2654 | return ret; |
2655 | } | 2655 | } |
2656 | 2656 | ||
2657 | static void iwl4965_mac_stop(struct ieee80211_hw *hw) | 2657 | static void iwl_mac_stop(struct ieee80211_hw *hw) |
2658 | { | 2658 | { |
2659 | struct iwl_priv *priv = hw->priv; | 2659 | struct iwl_priv *priv = hw->priv; |
2660 | 2660 | ||
@@ -2676,7 +2676,7 @@ static void iwl4965_mac_stop(struct ieee80211_hw *hw) | |||
2676 | mutex_unlock(&priv->mutex); | 2676 | mutex_unlock(&priv->mutex); |
2677 | } | 2677 | } |
2678 | 2678 | ||
2679 | iwl4965_down(priv); | 2679 | iwl_down(priv); |
2680 | 2680 | ||
2681 | flush_workqueue(priv->workqueue); | 2681 | flush_workqueue(priv->workqueue); |
2682 | free_irq(priv->pci_dev->irq, priv); | 2682 | free_irq(priv->pci_dev->irq, priv); |
@@ -2687,7 +2687,7 @@ static void iwl4965_mac_stop(struct ieee80211_hw *hw) | |||
2687 | IWL_DEBUG_MAC80211("leave\n"); | 2687 | IWL_DEBUG_MAC80211("leave\n"); |
2688 | } | 2688 | } |
2689 | 2689 | ||
2690 | static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 2690 | static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) |
2691 | { | 2691 | { |
2692 | struct iwl_priv *priv = hw->priv; | 2692 | struct iwl_priv *priv = hw->priv; |
2693 | 2693 | ||
@@ -2703,7 +2703,7 @@ static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2703 | return 0; | 2703 | return 0; |
2704 | } | 2704 | } |
2705 | 2705 | ||
2706 | static int iwl4965_mac_add_interface(struct ieee80211_hw *hw, | 2706 | static int iwl_mac_add_interface(struct ieee80211_hw *hw, |
2707 | struct ieee80211_if_init_conf *conf) | 2707 | struct ieee80211_if_init_conf *conf) |
2708 | { | 2708 | { |
2709 | struct iwl_priv *priv = hw->priv; | 2709 | struct iwl_priv *priv = hw->priv; |
@@ -2729,7 +2729,7 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw, | |||
2729 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); | 2729 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); |
2730 | } | 2730 | } |
2731 | 2731 | ||
2732 | if (iwl4965_set_mode(priv, conf->type) == -EAGAIN) | 2732 | if (iwl_set_mode(priv, conf->type) == -EAGAIN) |
2733 | /* we are not ready, will run again when ready */ | 2733 | /* we are not ready, will run again when ready */ |
2734 | set_bit(STATUS_MODE_PENDING, &priv->status); | 2734 | set_bit(STATUS_MODE_PENDING, &priv->status); |
2735 | 2735 | ||
@@ -2740,13 +2740,13 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw, | |||
2740 | } | 2740 | } |
2741 | 2741 | ||
2742 | /** | 2742 | /** |
2743 | * iwl4965_mac_config - mac80211 config callback | 2743 | * iwl_mac_config - mac80211 config callback |
2744 | * | 2744 | * |
2745 | * We ignore conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME since it seems to | 2745 | * We ignore conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME since it seems to |
2746 | * be set inappropriately and the driver currently sets the hardware up to | 2746 | * be set inappropriately and the driver currently sets the hardware up to |
2747 | * use it whenever needed. | 2747 | * use it whenever needed. |
2748 | */ | 2748 | */ |
2749 | static int iwl4965_mac_config(struct ieee80211_hw *hw, u32 changed) | 2749 | static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) |
2750 | { | 2750 | { |
2751 | struct iwl_priv *priv = hw->priv; | 2751 | struct iwl_priv *priv = hw->priv; |
2752 | const struct iwl_channel_info *ch_info; | 2752 | const struct iwl_channel_info *ch_info; |
@@ -2817,13 +2817,13 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2817 | /* The list of supported rates and rate mask can be different | 2817 | /* The list of supported rates and rate mask can be different |
2818 | * for each band; since the band may have changed, reset | 2818 | * for each band; since the band may have changed, reset |
2819 | * the rate mask to what mac80211 lists */ | 2819 | * the rate mask to what mac80211 lists */ |
2820 | iwl4965_set_rate(priv); | 2820 | iwl_set_rate(priv); |
2821 | 2821 | ||
2822 | spin_unlock_irqrestore(&priv->lock, flags); | 2822 | spin_unlock_irqrestore(&priv->lock, flags); |
2823 | 2823 | ||
2824 | #ifdef IEEE80211_CONF_CHANNEL_SWITCH | 2824 | #ifdef IEEE80211_CONF_CHANNEL_SWITCH |
2825 | if (conf->flags & IEEE80211_CONF_CHANNEL_SWITCH) { | 2825 | if (conf->flags & IEEE80211_CONF_CHANNEL_SWITCH) { |
2826 | iwl4965_hw_channel_switch(priv, conf->channel); | 2826 | iwl_hw_channel_switch(priv, conf->channel); |
2827 | goto out; | 2827 | goto out; |
2828 | } | 2828 | } |
2829 | #endif | 2829 | #endif |
@@ -2851,11 +2851,11 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2851 | 2851 | ||
2852 | iwl_set_tx_power(priv, conf->power_level, false); | 2852 | iwl_set_tx_power(priv, conf->power_level, false); |
2853 | 2853 | ||
2854 | iwl4965_set_rate(priv); | 2854 | iwl_set_rate(priv); |
2855 | 2855 | ||
2856 | if (memcmp(&priv->active_rxon, | 2856 | if (memcmp(&priv->active_rxon, |
2857 | &priv->staging_rxon, sizeof(priv->staging_rxon))) | 2857 | &priv->staging_rxon, sizeof(priv->staging_rxon))) |
2858 | iwl4965_commit_rxon(priv); | 2858 | iwl_commit_rxon(priv); |
2859 | else | 2859 | else |
2860 | IWL_DEBUG_INFO("No re-sending same RXON configuration.\n"); | 2860 | IWL_DEBUG_INFO("No re-sending same RXON configuration.\n"); |
2861 | 2861 | ||
@@ -2866,7 +2866,7 @@ out: | |||
2866 | return ret; | 2866 | return ret; |
2867 | } | 2867 | } |
2868 | 2868 | ||
2869 | static void iwl4965_config_ap(struct iwl_priv *priv) | 2869 | static void iwl_config_ap(struct iwl_priv *priv) |
2870 | { | 2870 | { |
2871 | int ret = 0; | 2871 | int ret = 0; |
2872 | unsigned long flags; | 2872 | unsigned long flags; |
@@ -2879,7 +2879,7 @@ static void iwl4965_config_ap(struct iwl_priv *priv) | |||
2879 | 2879 | ||
2880 | /* RXON - unassoc (to set timing command) */ | 2880 | /* RXON - unassoc (to set timing command) */ |
2881 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 2881 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
2882 | iwl4965_commit_rxon(priv); | 2882 | iwl_commit_rxon(priv); |
2883 | 2883 | ||
2884 | /* RXON Timing */ | 2884 | /* RXON Timing */ |
2885 | iwl_setup_rxon_timing(priv); | 2885 | iwl_setup_rxon_timing(priv); |
@@ -2915,13 +2915,13 @@ static void iwl4965_config_ap(struct iwl_priv *priv) | |||
2915 | } | 2915 | } |
2916 | /* restore RXON assoc */ | 2916 | /* restore RXON assoc */ |
2917 | priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; | 2917 | priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; |
2918 | iwl4965_commit_rxon(priv); | 2918 | iwl_commit_rxon(priv); |
2919 | spin_lock_irqsave(&priv->lock, flags); | 2919 | spin_lock_irqsave(&priv->lock, flags); |
2920 | iwl_activate_qos(priv, 1); | 2920 | iwl_activate_qos(priv, 1); |
2921 | spin_unlock_irqrestore(&priv->lock, flags); | 2921 | spin_unlock_irqrestore(&priv->lock, flags); |
2922 | iwl_rxon_add_station(priv, iwl_bcast_addr, 0); | 2922 | iwl_rxon_add_station(priv, iwl_bcast_addr, 0); |
2923 | } | 2923 | } |
2924 | iwl4965_send_beacon_cmd(priv); | 2924 | iwl_send_beacon_cmd(priv); |
2925 | 2925 | ||
2926 | /* FIXME - we need to add code here to detect a totally new | 2926 | /* FIXME - we need to add code here to detect a totally new |
2927 | * configuration, reset the AP, unassoc, rxon timing, assoc, | 2927 | * configuration, reset the AP, unassoc, rxon timing, assoc, |
@@ -2929,9 +2929,9 @@ static void iwl4965_config_ap(struct iwl_priv *priv) | |||
2929 | } | 2929 | } |
2930 | 2930 | ||
2931 | /* temporary */ | 2931 | /* temporary */ |
2932 | static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb); | 2932 | static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb); |
2933 | 2933 | ||
2934 | static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | 2934 | static int iwl_mac_config_interface(struct ieee80211_hw *hw, |
2935 | struct ieee80211_vif *vif, | 2935 | struct ieee80211_vif *vif, |
2936 | struct ieee80211_if_conf *conf) | 2936 | struct ieee80211_if_conf *conf) |
2937 | { | 2937 | { |
@@ -2951,7 +2951,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
2951 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); | 2951 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); |
2952 | if (!beacon) | 2952 | if (!beacon) |
2953 | return -ENOMEM; | 2953 | return -ENOMEM; |
2954 | rc = iwl4965_mac_beacon_update(hw, beacon); | 2954 | rc = iwl_mac_beacon_update(hw, beacon); |
2955 | if (rc) | 2955 | if (rc) |
2956 | return rc; | 2956 | return rc; |
2957 | } | 2957 | } |
@@ -3007,9 +3007,9 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
3007 | memcpy(priv->bssid, conf->bssid, ETH_ALEN); | 3007 | memcpy(priv->bssid, conf->bssid, ETH_ALEN); |
3008 | 3008 | ||
3009 | if (priv->iw_mode == NL80211_IFTYPE_AP) | 3009 | if (priv->iw_mode == NL80211_IFTYPE_AP) |
3010 | iwl4965_config_ap(priv); | 3010 | iwl_config_ap(priv); |
3011 | else { | 3011 | else { |
3012 | rc = iwl4965_commit_rxon(priv); | 3012 | rc = iwl_commit_rxon(priv); |
3013 | if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc) | 3013 | if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc) |
3014 | iwl_rxon_add_station( | 3014 | iwl_rxon_add_station( |
3015 | priv, priv->active_rxon.bssid_addr, 1); | 3015 | priv, priv->active_rxon.bssid_addr, 1); |
@@ -3018,7 +3018,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
3018 | } else { | 3018 | } else { |
3019 | iwl_scan_cancel_timeout(priv, 100); | 3019 | iwl_scan_cancel_timeout(priv, 100); |
3020 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 3020 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
3021 | iwl4965_commit_rxon(priv); | 3021 | iwl_commit_rxon(priv); |
3022 | } | 3022 | } |
3023 | 3023 | ||
3024 | done: | 3024 | done: |
@@ -3028,7 +3028,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
3028 | return 0; | 3028 | return 0; |
3029 | } | 3029 | } |
3030 | 3030 | ||
3031 | static void iwl4965_configure_filter(struct ieee80211_hw *hw, | 3031 | static void iwl_configure_filter(struct ieee80211_hw *hw, |
3032 | unsigned int changed_flags, | 3032 | unsigned int changed_flags, |
3033 | unsigned int *total_flags, | 3033 | unsigned int *total_flags, |
3034 | int mc_count, struct dev_addr_list *mc_list) | 3034 | int mc_count, struct dev_addr_list *mc_list) |
@@ -3047,7 +3047,7 @@ static void iwl4965_configure_filter(struct ieee80211_hw *hw, | |||
3047 | FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL; | 3047 | FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL; |
3048 | } | 3048 | } |
3049 | 3049 | ||
3050 | static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, | 3050 | static void iwl_mac_remove_interface(struct ieee80211_hw *hw, |
3051 | struct ieee80211_if_init_conf *conf) | 3051 | struct ieee80211_if_init_conf *conf) |
3052 | { | 3052 | { |
3053 | struct iwl_priv *priv = hw->priv; | 3053 | struct iwl_priv *priv = hw->priv; |
@@ -3059,7 +3059,7 @@ static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, | |||
3059 | if (iwl_is_ready_rf(priv)) { | 3059 | if (iwl_is_ready_rf(priv)) { |
3060 | iwl_scan_cancel_timeout(priv, 100); | 3060 | iwl_scan_cancel_timeout(priv, 100); |
3061 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 3061 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
3062 | iwl4965_commit_rxon(priv); | 3062 | iwl_commit_rxon(priv); |
3063 | } | 3063 | } |
3064 | if (priv->vif == conf->vif) { | 3064 | if (priv->vif == conf->vif) { |
3065 | priv->vif = NULL; | 3065 | priv->vif = NULL; |
@@ -3072,7 +3072,7 @@ static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, | |||
3072 | } | 3072 | } |
3073 | 3073 | ||
3074 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) | 3074 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) |
3075 | static void iwl4965_bss_info_changed(struct ieee80211_hw *hw, | 3075 | static void iwl_bss_info_changed(struct ieee80211_hw *hw, |
3076 | struct ieee80211_vif *vif, | 3076 | struct ieee80211_vif *vif, |
3077 | struct ieee80211_bss_conf *bss_conf, | 3077 | struct ieee80211_bss_conf *bss_conf, |
3078 | u32 changes) | 3078 | u32 changes) |
@@ -3099,7 +3099,7 @@ static void iwl4965_bss_info_changed(struct ieee80211_hw *hw, | |||
3099 | } | 3099 | } |
3100 | 3100 | ||
3101 | if (changes & BSS_CHANGED_HT) { | 3101 | if (changes & BSS_CHANGED_HT) { |
3102 | iwl4965_ht_conf(priv, bss_conf); | 3102 | iwl_ht_conf(priv, bss_conf); |
3103 | iwl_set_rxon_chain(priv); | 3103 | iwl_set_rxon_chain(priv); |
3104 | } | 3104 | } |
3105 | 3105 | ||
@@ -3122,7 +3122,7 @@ static void iwl4965_bss_info_changed(struct ieee80211_hw *hw, | |||
3122 | priv->next_scan_jiffies = jiffies + | 3122 | priv->next_scan_jiffies = jiffies + |
3123 | IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; | 3123 | IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; |
3124 | mutex_lock(&priv->mutex); | 3124 | mutex_lock(&priv->mutex); |
3125 | iwl4965_post_associate(priv); | 3125 | iwl_post_associate(priv); |
3126 | mutex_unlock(&priv->mutex); | 3126 | mutex_unlock(&priv->mutex); |
3127 | } else { | 3127 | } else { |
3128 | priv->assoc_id = 0; | 3128 | priv->assoc_id = 0; |
@@ -3198,7 +3198,7 @@ out_unlock: | |||
3198 | return ret; | 3198 | return ret; |
3199 | } | 3199 | } |
3200 | 3200 | ||
3201 | static void iwl4965_mac_update_tkip_key(struct ieee80211_hw *hw, | 3201 | static void iwl_mac_update_tkip_key(struct ieee80211_hw *hw, |
3202 | struct ieee80211_key_conf *keyconf, const u8 *addr, | 3202 | struct ieee80211_key_conf *keyconf, const u8 *addr, |
3203 | u32 iv32, u16 *phase1key) | 3203 | u32 iv32, u16 *phase1key) |
3204 | { | 3204 | { |
@@ -3249,7 +3249,7 @@ static void iwl4965_mac_update_tkip_key(struct ieee80211_hw *hw, | |||
3249 | IWL_DEBUG_MAC80211("leave\n"); | 3249 | IWL_DEBUG_MAC80211("leave\n"); |
3250 | } | 3250 | } |
3251 | 3251 | ||
3252 | static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | 3252 | static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, |
3253 | const u8 *local_addr, const u8 *addr, | 3253 | const u8 *local_addr, const u8 *addr, |
3254 | struct ieee80211_key_conf *key) | 3254 | struct ieee80211_key_conf *key) |
3255 | { | 3255 | { |
@@ -3320,7 +3320,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3320 | return ret; | 3320 | return ret; |
3321 | } | 3321 | } |
3322 | 3322 | ||
3323 | static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | 3323 | static int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, |
3324 | const struct ieee80211_tx_queue_params *params) | 3324 | const struct ieee80211_tx_queue_params *params) |
3325 | { | 3325 | { |
3326 | struct iwl_priv *priv = hw->priv; | 3326 | struct iwl_priv *priv = hw->priv; |
@@ -3368,7 +3368,7 @@ static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
3368 | return 0; | 3368 | return 0; |
3369 | } | 3369 | } |
3370 | 3370 | ||
3371 | static int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, | 3371 | static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, |
3372 | enum ieee80211_ampdu_mlme_action action, | 3372 | enum ieee80211_ampdu_mlme_action action, |
3373 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) | 3373 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) |
3374 | { | 3374 | { |
@@ -3400,7 +3400,7 @@ static int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3400 | } | 3400 | } |
3401 | return 0; | 3401 | return 0; |
3402 | } | 3402 | } |
3403 | static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw, | 3403 | static int iwl_mac_get_tx_stats(struct ieee80211_hw *hw, |
3404 | struct ieee80211_tx_queue_stats *stats) | 3404 | struct ieee80211_tx_queue_stats *stats) |
3405 | { | 3405 | { |
3406 | struct iwl_priv *priv = hw->priv; | 3406 | struct iwl_priv *priv = hw->priv; |
@@ -3435,7 +3435,7 @@ static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
3435 | return 0; | 3435 | return 0; |
3436 | } | 3436 | } |
3437 | 3437 | ||
3438 | static int iwl4965_mac_get_stats(struct ieee80211_hw *hw, | 3438 | static int iwl_mac_get_stats(struct ieee80211_hw *hw, |
3439 | struct ieee80211_low_level_stats *stats) | 3439 | struct ieee80211_low_level_stats *stats) |
3440 | { | 3440 | { |
3441 | struct iwl_priv *priv = hw->priv; | 3441 | struct iwl_priv *priv = hw->priv; |
@@ -3447,7 +3447,7 @@ static int iwl4965_mac_get_stats(struct ieee80211_hw *hw, | |||
3447 | return 0; | 3447 | return 0; |
3448 | } | 3448 | } |
3449 | 3449 | ||
3450 | static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw) | 3450 | static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) |
3451 | { | 3451 | { |
3452 | struct iwl_priv *priv = hw->priv; | 3452 | struct iwl_priv *priv = hw->priv; |
3453 | unsigned long flags; | 3453 | unsigned long flags; |
@@ -3491,7 +3491,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw) | |||
3491 | if (priv->iw_mode != NL80211_IFTYPE_AP) { | 3491 | if (priv->iw_mode != NL80211_IFTYPE_AP) { |
3492 | iwl_scan_cancel_timeout(priv, 100); | 3492 | iwl_scan_cancel_timeout(priv, 100); |
3493 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 3493 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
3494 | iwl4965_commit_rxon(priv); | 3494 | iwl_commit_rxon(priv); |
3495 | } | 3495 | } |
3496 | 3496 | ||
3497 | iwl_power_update_mode(priv, 0); | 3497 | iwl_power_update_mode(priv, 0); |
@@ -3514,14 +3514,14 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw) | |||
3514 | return; | 3514 | return; |
3515 | } | 3515 | } |
3516 | 3516 | ||
3517 | iwl4965_set_rate(priv); | 3517 | iwl_set_rate(priv); |
3518 | 3518 | ||
3519 | mutex_unlock(&priv->mutex); | 3519 | mutex_unlock(&priv->mutex); |
3520 | 3520 | ||
3521 | IWL_DEBUG_MAC80211("leave\n"); | 3521 | IWL_DEBUG_MAC80211("leave\n"); |
3522 | } | 3522 | } |
3523 | 3523 | ||
3524 | static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | 3524 | static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
3525 | { | 3525 | { |
3526 | struct iwl_priv *priv = hw->priv; | 3526 | struct iwl_priv *priv = hw->priv; |
3527 | unsigned long flags; | 3527 | unsigned long flags; |
@@ -3558,7 +3558,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk | |||
3558 | 3558 | ||
3559 | iwl_reset_qos(priv); | 3559 | iwl_reset_qos(priv); |
3560 | 3560 | ||
3561 | iwl4965_post_associate(priv); | 3561 | iwl_post_associate(priv); |
3562 | 3562 | ||
3563 | mutex_unlock(&priv->mutex); | 3563 | mutex_unlock(&priv->mutex); |
3564 | 3564 | ||
@@ -3712,7 +3712,7 @@ static ssize_t store_flags(struct device *d, | |||
3712 | else { | 3712 | else { |
3713 | IWL_DEBUG_INFO("Commit rxon.flags = 0x%04X\n", flags); | 3713 | IWL_DEBUG_INFO("Commit rxon.flags = 0x%04X\n", flags); |
3714 | priv->staging_rxon.flags = cpu_to_le32(flags); | 3714 | priv->staging_rxon.flags = cpu_to_le32(flags); |
3715 | iwl4965_commit_rxon(priv); | 3715 | iwl_commit_rxon(priv); |
3716 | } | 3716 | } |
3717 | } | 3717 | } |
3718 | mutex_unlock(&priv->mutex); | 3718 | mutex_unlock(&priv->mutex); |
@@ -3753,7 +3753,7 @@ static ssize_t store_filter_flags(struct device *d, | |||
3753 | "0x%04X\n", filter_flags); | 3753 | "0x%04X\n", filter_flags); |
3754 | priv->staging_rxon.filter_flags = | 3754 | priv->staging_rxon.filter_flags = |
3755 | cpu_to_le32(filter_flags); | 3755 | cpu_to_le32(filter_flags); |
3756 | iwl4965_commit_rxon(priv); | 3756 | iwl_commit_rxon(priv); |
3757 | } | 3757 | } |
3758 | } | 3758 | } |
3759 | mutex_unlock(&priv->mutex); | 3759 | mutex_unlock(&priv->mutex); |
@@ -3828,7 +3828,7 @@ static ssize_t store_measurement(struct device *d, | |||
3828 | 3828 | ||
3829 | IWL_DEBUG_INFO("Invoking measurement of type %d on " | 3829 | IWL_DEBUG_INFO("Invoking measurement of type %d on " |
3830 | "channel %d (for '%s')\n", type, params.channel, buf); | 3830 | "channel %d (for '%s')\n", type, params.channel, buf); |
3831 | iwl4965_get_measurement(priv, ¶ms, type); | 3831 | iwl_get_measurement(priv, ¶ms, type); |
3832 | 3832 | ||
3833 | return count; | 3833 | return count; |
3834 | } | 3834 | } |
@@ -4048,12 +4048,12 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
4048 | 4048 | ||
4049 | init_waitqueue_head(&priv->wait_command_queue); | 4049 | init_waitqueue_head(&priv->wait_command_queue); |
4050 | 4050 | ||
4051 | INIT_WORK(&priv->up, iwl4965_bg_up); | 4051 | INIT_WORK(&priv->up, iwl_bg_up); |
4052 | INIT_WORK(&priv->restart, iwl4965_bg_restart); | 4052 | INIT_WORK(&priv->restart, iwl_bg_restart); |
4053 | INIT_WORK(&priv->rx_replenish, iwl4965_bg_rx_replenish); | 4053 | INIT_WORK(&priv->rx_replenish, iwl_bg_rx_replenish); |
4054 | INIT_WORK(&priv->rf_kill, iwl4965_bg_rf_kill); | 4054 | INIT_WORK(&priv->rf_kill, iwl_bg_rf_kill); |
4055 | INIT_WORK(&priv->beacon_update, iwl4965_bg_beacon_update); | 4055 | INIT_WORK(&priv->beacon_update, iwl_bg_beacon_update); |
4056 | INIT_WORK(&priv->set_monitor, iwl4965_bg_set_monitor); | 4056 | INIT_WORK(&priv->set_monitor, iwl_bg_set_monitor); |
4057 | INIT_WORK(&priv->run_time_calib_work, iwl_bg_run_time_calib_work); | 4057 | INIT_WORK(&priv->run_time_calib_work, iwl_bg_run_time_calib_work); |
4058 | INIT_DELAYED_WORK(&priv->init_alive_start, iwl_bg_init_alive_start); | 4058 | INIT_DELAYED_WORK(&priv->init_alive_start, iwl_bg_init_alive_start); |
4059 | INIT_DELAYED_WORK(&priv->alive_start, iwl_bg_alive_start); | 4059 | INIT_DELAYED_WORK(&priv->alive_start, iwl_bg_alive_start); |
@@ -4066,10 +4066,10 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
4066 | 4066 | ||
4067 | init_timer(&priv->statistics_periodic); | 4067 | init_timer(&priv->statistics_periodic); |
4068 | priv->statistics_periodic.data = (unsigned long)priv; | 4068 | priv->statistics_periodic.data = (unsigned long)priv; |
4069 | priv->statistics_periodic.function = iwl4965_bg_statistics_periodic; | 4069 | priv->statistics_periodic.function = iwl_bg_statistics_periodic; |
4070 | 4070 | ||
4071 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | 4071 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) |
4072 | iwl4965_irq_tasklet, (unsigned long)priv); | 4072 | iwl_irq_tasklet, (unsigned long)priv); |
4073 | } | 4073 | } |
4074 | 4074 | ||
4075 | static void iwl_cancel_deferred_work(struct iwl_priv *priv) | 4075 | static void iwl_cancel_deferred_work(struct iwl_priv *priv) |
@@ -4085,7 +4085,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv) | |||
4085 | del_timer_sync(&priv->statistics_periodic); | 4085 | del_timer_sync(&priv->statistics_periodic); |
4086 | } | 4086 | } |
4087 | 4087 | ||
4088 | static struct attribute *iwl4965_sysfs_entries[] = { | 4088 | static struct attribute *iwl_sysfs_entries[] = { |
4089 | &dev_attr_channels.attr, | 4089 | &dev_attr_channels.attr, |
4090 | &dev_attr_flags.attr, | 4090 | &dev_attr_flags.attr, |
4091 | &dev_attr_filter_flags.attr, | 4091 | &dev_attr_filter_flags.attr, |
@@ -4106,32 +4106,32 @@ static struct attribute *iwl4965_sysfs_entries[] = { | |||
4106 | NULL | 4106 | NULL |
4107 | }; | 4107 | }; |
4108 | 4108 | ||
4109 | static struct attribute_group iwl4965_attribute_group = { | 4109 | static struct attribute_group iwl_attribute_group = { |
4110 | .name = NULL, /* put in device directory */ | 4110 | .name = NULL, /* put in device directory */ |
4111 | .attrs = iwl4965_sysfs_entries, | 4111 | .attrs = iwl_sysfs_entries, |
4112 | }; | 4112 | }; |
4113 | 4113 | ||
4114 | static struct ieee80211_ops iwl4965_hw_ops = { | 4114 | static struct ieee80211_ops iwl_hw_ops = { |
4115 | .tx = iwl4965_mac_tx, | 4115 | .tx = iwl_mac_tx, |
4116 | .start = iwl4965_mac_start, | 4116 | .start = iwl_mac_start, |
4117 | .stop = iwl4965_mac_stop, | 4117 | .stop = iwl_mac_stop, |
4118 | .add_interface = iwl4965_mac_add_interface, | 4118 | .add_interface = iwl_mac_add_interface, |
4119 | .remove_interface = iwl4965_mac_remove_interface, | 4119 | .remove_interface = iwl_mac_remove_interface, |
4120 | .config = iwl4965_mac_config, | 4120 | .config = iwl_mac_config, |
4121 | .config_interface = iwl4965_mac_config_interface, | 4121 | .config_interface = iwl_mac_config_interface, |
4122 | .configure_filter = iwl4965_configure_filter, | 4122 | .configure_filter = iwl_configure_filter, |
4123 | .set_key = iwl4965_mac_set_key, | 4123 | .set_key = iwl_mac_set_key, |
4124 | .update_tkip_key = iwl4965_mac_update_tkip_key, | 4124 | .update_tkip_key = iwl_mac_update_tkip_key, |
4125 | .get_stats = iwl4965_mac_get_stats, | 4125 | .get_stats = iwl_mac_get_stats, |
4126 | .get_tx_stats = iwl4965_mac_get_tx_stats, | 4126 | .get_tx_stats = iwl_mac_get_tx_stats, |
4127 | .conf_tx = iwl4965_mac_conf_tx, | 4127 | .conf_tx = iwl_mac_conf_tx, |
4128 | .reset_tsf = iwl4965_mac_reset_tsf, | 4128 | .reset_tsf = iwl_mac_reset_tsf, |
4129 | .bss_info_changed = iwl4965_bss_info_changed, | 4129 | .bss_info_changed = iwl_bss_info_changed, |
4130 | .ampdu_action = iwl4965_mac_ampdu_action, | 4130 | .ampdu_action = iwl_mac_ampdu_action, |
4131 | .hw_scan = iwl_mac_hw_scan | 4131 | .hw_scan = iwl_mac_hw_scan |
4132 | }; | 4132 | }; |
4133 | 4133 | ||
4134 | static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 4134 | static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
4135 | { | 4135 | { |
4136 | int err = 0; | 4136 | int err = 0; |
4137 | struct iwl_priv *priv; | 4137 | struct iwl_priv *priv; |
@@ -4149,10 +4149,10 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
4149 | if (cfg->mod_params->debug & IWL_DL_INFO) | 4149 | if (cfg->mod_params->debug & IWL_DL_INFO) |
4150 | dev_printk(KERN_DEBUG, &(pdev->dev), | 4150 | dev_printk(KERN_DEBUG, &(pdev->dev), |
4151 | "Disabling hw_scan\n"); | 4151 | "Disabling hw_scan\n"); |
4152 | iwl4965_hw_ops.hw_scan = NULL; | 4152 | iwl_hw_ops.hw_scan = NULL; |
4153 | } | 4153 | } |
4154 | 4154 | ||
4155 | hw = iwl_alloc_all(cfg, &iwl4965_hw_ops); | 4155 | hw = iwl_alloc_all(cfg, &iwl_hw_ops); |
4156 | if (!hw) { | 4156 | if (!hw) { |
4157 | err = -ENOMEM; | 4157 | err = -ENOMEM; |
4158 | goto out; | 4158 | goto out; |
@@ -4280,10 +4280,10 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
4280 | * 8. Setup services | 4280 | * 8. Setup services |
4281 | ********************/ | 4281 | ********************/ |
4282 | spin_lock_irqsave(&priv->lock, flags); | 4282 | spin_lock_irqsave(&priv->lock, flags); |
4283 | iwl4965_disable_interrupts(priv); | 4283 | iwl_disable_interrupts(priv); |
4284 | spin_unlock_irqrestore(&priv->lock, flags); | 4284 | spin_unlock_irqrestore(&priv->lock, flags); |
4285 | 4285 | ||
4286 | err = sysfs_create_group(&pdev->dev.kobj, &iwl4965_attribute_group); | 4286 | err = sysfs_create_group(&pdev->dev.kobj, &iwl_attribute_group); |
4287 | if (err) { | 4287 | if (err) { |
4288 | IWL_ERROR("failed to create sysfs device attributes\n"); | 4288 | IWL_ERROR("failed to create sysfs device attributes\n"); |
4289 | goto out_uninit_drv; | 4289 | goto out_uninit_drv; |
@@ -4319,7 +4319,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
4319 | return 0; | 4319 | return 0; |
4320 | 4320 | ||
4321 | out_remove_sysfs: | 4321 | out_remove_sysfs: |
4322 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); | 4322 | sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); |
4323 | out_uninit_drv: | 4323 | out_uninit_drv: |
4324 | iwl_uninit_drv(priv); | 4324 | iwl_uninit_drv(priv); |
4325 | out_free_eeprom: | 4325 | out_free_eeprom: |
@@ -4337,7 +4337,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
4337 | return err; | 4337 | return err; |
4338 | } | 4338 | } |
4339 | 4339 | ||
4340 | static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | 4340 | static void __devexit iwl_pci_remove(struct pci_dev *pdev) |
4341 | { | 4341 | { |
4342 | struct iwl_priv *priv = pci_get_drvdata(pdev); | 4342 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
4343 | unsigned long flags; | 4343 | unsigned long flags; |
@@ -4348,10 +4348,10 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
4348 | IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); | 4348 | IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); |
4349 | 4349 | ||
4350 | iwl_dbgfs_unregister(priv); | 4350 | iwl_dbgfs_unregister(priv); |
4351 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); | 4351 | sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); |
4352 | 4352 | ||
4353 | /* ieee80211_unregister_hw call wil cause iwl4965_mac_stop to | 4353 | /* ieee80211_unregister_hw call wil cause iwl_mac_stop to |
4354 | * to be called and iwl4965_down since we are removing the device | 4354 | * to be called and iwl_down since we are removing the device |
4355 | * we need to set STATUS_EXIT_PENDING bit. | 4355 | * we need to set STATUS_EXIT_PENDING bit. |
4356 | */ | 4356 | */ |
4357 | set_bit(STATUS_EXIT_PENDING, &priv->status); | 4357 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
@@ -4359,20 +4359,20 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
4359 | ieee80211_unregister_hw(priv->hw); | 4359 | ieee80211_unregister_hw(priv->hw); |
4360 | priv->mac80211_registered = 0; | 4360 | priv->mac80211_registered = 0; |
4361 | } else { | 4361 | } else { |
4362 | iwl4965_down(priv); | 4362 | iwl_down(priv); |
4363 | } | 4363 | } |
4364 | 4364 | ||
4365 | /* make sure we flush any pending irq or | 4365 | /* make sure we flush any pending irq or |
4366 | * tasklet for the driver | 4366 | * tasklet for the driver |
4367 | */ | 4367 | */ |
4368 | spin_lock_irqsave(&priv->lock, flags); | 4368 | spin_lock_irqsave(&priv->lock, flags); |
4369 | iwl4965_disable_interrupts(priv); | 4369 | iwl_disable_interrupts(priv); |
4370 | spin_unlock_irqrestore(&priv->lock, flags); | 4370 | spin_unlock_irqrestore(&priv->lock, flags); |
4371 | 4371 | ||
4372 | iwl_synchronize_irq(priv); | 4372 | iwl_synchronize_irq(priv); |
4373 | 4373 | ||
4374 | iwl_rfkill_unregister(priv); | 4374 | iwl_rfkill_unregister(priv); |
4375 | iwl4965_dealloc_ucode_pci(priv); | 4375 | iwl_dealloc_ucode_pci(priv); |
4376 | 4376 | ||
4377 | if (priv->rxq.bd) | 4377 | if (priv->rxq.bd) |
4378 | iwl_rx_queue_free(priv, &priv->rxq); | 4378 | iwl_rx_queue_free(priv, &priv->rxq); |
@@ -4385,7 +4385,7 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
4385 | /*netif_stop_queue(dev); */ | 4385 | /*netif_stop_queue(dev); */ |
4386 | flush_workqueue(priv->workqueue); | 4386 | flush_workqueue(priv->workqueue); |
4387 | 4387 | ||
4388 | /* ieee80211_unregister_hw calls iwl4965_mac_stop, which flushes | 4388 | /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes |
4389 | * priv->workqueue... so we can't take down the workqueue | 4389 | * priv->workqueue... so we can't take down the workqueue |
4390 | * until now... */ | 4390 | * until now... */ |
4391 | destroy_workqueue(priv->workqueue); | 4391 | destroy_workqueue(priv->workqueue); |
@@ -4406,13 +4406,13 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
4406 | 4406 | ||
4407 | #ifdef CONFIG_PM | 4407 | #ifdef CONFIG_PM |
4408 | 4408 | ||
4409 | static int iwl4965_pci_suspend(struct pci_dev *pdev, pm_message_t state) | 4409 | static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) |
4410 | { | 4410 | { |
4411 | struct iwl_priv *priv = pci_get_drvdata(pdev); | 4411 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
4412 | 4412 | ||
4413 | if (priv->is_open) { | 4413 | if (priv->is_open) { |
4414 | set_bit(STATUS_IN_SUSPEND, &priv->status); | 4414 | set_bit(STATUS_IN_SUSPEND, &priv->status); |
4415 | iwl4965_mac_stop(priv->hw); | 4415 | iwl_mac_stop(priv->hw); |
4416 | priv->is_open = 1; | 4416 | priv->is_open = 1; |
4417 | } | 4417 | } |
4418 | 4418 | ||
@@ -4421,14 +4421,14 @@ static int iwl4965_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
4421 | return 0; | 4421 | return 0; |
4422 | } | 4422 | } |
4423 | 4423 | ||
4424 | static int iwl4965_pci_resume(struct pci_dev *pdev) | 4424 | static int iwl_pci_resume(struct pci_dev *pdev) |
4425 | { | 4425 | { |
4426 | struct iwl_priv *priv = pci_get_drvdata(pdev); | 4426 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
4427 | 4427 | ||
4428 | pci_set_power_state(pdev, PCI_D0); | 4428 | pci_set_power_state(pdev, PCI_D0); |
4429 | 4429 | ||
4430 | if (priv->is_open) | 4430 | if (priv->is_open) |
4431 | iwl4965_mac_start(priv->hw); | 4431 | iwl_mac_start(priv->hw); |
4432 | 4432 | ||
4433 | clear_bit(STATUS_IN_SUSPEND, &priv->status); | 4433 | clear_bit(STATUS_IN_SUSPEND, &priv->status); |
4434 | return 0; | 4434 | return 0; |
@@ -4471,15 +4471,15 @@ MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); | |||
4471 | static struct pci_driver iwl_driver = { | 4471 | static struct pci_driver iwl_driver = { |
4472 | .name = DRV_NAME, | 4472 | .name = DRV_NAME, |
4473 | .id_table = iwl_hw_card_ids, | 4473 | .id_table = iwl_hw_card_ids, |
4474 | .probe = iwl4965_pci_probe, | 4474 | .probe = iwl_pci_probe, |
4475 | .remove = __devexit_p(iwl4965_pci_remove), | 4475 | .remove = __devexit_p(iwl_pci_remove), |
4476 | #ifdef CONFIG_PM | 4476 | #ifdef CONFIG_PM |
4477 | .suspend = iwl4965_pci_suspend, | 4477 | .suspend = iwl_pci_suspend, |
4478 | .resume = iwl4965_pci_resume, | 4478 | .resume = iwl_pci_resume, |
4479 | #endif | 4479 | #endif |
4480 | }; | 4480 | }; |
4481 | 4481 | ||
4482 | static int __init iwl4965_init(void) | 4482 | static int __init iwl_init(void) |
4483 | { | 4483 | { |
4484 | 4484 | ||
4485 | int ret; | 4485 | int ret; |
@@ -4505,11 +4505,11 @@ error_register: | |||
4505 | return ret; | 4505 | return ret; |
4506 | } | 4506 | } |
4507 | 4507 | ||
4508 | static void __exit iwl4965_exit(void) | 4508 | static void __exit iwl_exit(void) |
4509 | { | 4509 | { |
4510 | pci_unregister_driver(&iwl_driver); | 4510 | pci_unregister_driver(&iwl_driver); |
4511 | iwlagn_rate_control_unregister(); | 4511 | iwlagn_rate_control_unregister(); |
4512 | } | 4512 | } |
4513 | 4513 | ||
4514 | module_exit(iwl4965_exit); | 4514 | module_exit(iwl_exit); |
4515 | module_init(iwl4965_init); | 4515 | module_init(iwl_init); |