diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-04-03 19:05:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-08 16:44:42 -0400 |
commit | fee1247a30e5b3d48fe985b4a935eb6818f3b464 (patch) | |
tree | 43871f000014c29422c628ed505531670ebe1389 /drivers | |
parent | 12a81f60b98096079d392f8abc284cbd76aa719b (diff) |
iwlwifi: move driver status inliners into iwl-core.h
This patch moves inline functions into iwl-core.h
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 57 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rfkill.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 92 |
8 files changed, 91 insertions, 94 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index e8cff7dbfe87..69e92177ad60 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -39,8 +39,8 @@ | |||
39 | #include <asm/unaligned.h> | 39 | #include <asm/unaligned.h> |
40 | 40 | ||
41 | #include "iwl-eeprom.h" | 41 | #include "iwl-eeprom.h" |
42 | #include "iwl-core.h" | ||
43 | #include "iwl-4965.h" | 42 | #include "iwl-4965.h" |
43 | #include "iwl-core.h" | ||
44 | #include "iwl-io.h" | 44 | #include "iwl-io.h" |
45 | #include "iwl-helpers.h" | 45 | #include "iwl-helpers.h" |
46 | 46 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index baeafd45180b..65e536782706 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -414,26 +414,6 @@ struct iwl4965_rx_queue { | |||
414 | #define MAX_B_CHANNELS 14 | 414 | #define MAX_B_CHANNELS 14 |
415 | #define MIN_B_CHANNELS 1 | 415 | #define MIN_B_CHANNELS 1 |
416 | 416 | ||
417 | #define STATUS_HCMD_ACTIVE 0 /* host command in progress */ | ||
418 | #define STATUS_HCMD_SYNC_ACTIVE 1 /* sync host command in progress */ | ||
419 | #define STATUS_INT_ENABLED 2 | ||
420 | #define STATUS_RF_KILL_HW 3 | ||
421 | #define STATUS_RF_KILL_SW 4 | ||
422 | #define STATUS_INIT 5 | ||
423 | #define STATUS_ALIVE 6 | ||
424 | #define STATUS_READY 7 | ||
425 | #define STATUS_TEMPERATURE 8 | ||
426 | #define STATUS_GEO_CONFIGURED 9 | ||
427 | #define STATUS_EXIT_PENDING 10 | ||
428 | #define STATUS_IN_SUSPEND 11 | ||
429 | #define STATUS_STATISTICS 12 | ||
430 | #define STATUS_SCANNING 13 | ||
431 | #define STATUS_SCAN_ABORTING 14 | ||
432 | #define STATUS_SCAN_HW 15 | ||
433 | #define STATUS_POWER_PMI 16 | ||
434 | #define STATUS_FW_ERROR 17 | ||
435 | #define STATUS_CONF_PENDING 18 | ||
436 | |||
437 | #define MAX_TID_COUNT 9 | 417 | #define MAX_TID_COUNT 9 |
438 | 418 | ||
439 | #define IWL_INVALID_RATE 0xFF | 419 | #define IWL_INVALID_RATE 0xFF |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 49fb52f07354..f12230780555 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -34,10 +34,10 @@ | |||
34 | struct iwl_priv; /* FIXME: remove */ | 34 | struct iwl_priv; /* FIXME: remove */ |
35 | #include "iwl-debug.h" | 35 | #include "iwl-debug.h" |
36 | #include "iwl-eeprom.h" | 36 | #include "iwl-eeprom.h" |
37 | #include "iwl-4965.h" /* FIXME: remove */ | ||
37 | #include "iwl-core.h" | 38 | #include "iwl-core.h" |
38 | #include "iwl-rfkill.h" | 39 | #include "iwl-rfkill.h" |
39 | 40 | ||
40 | #include "iwl-4965.h" /* FIXME: remove */ | ||
41 | 41 | ||
42 | MODULE_DESCRIPTION("iwl core"); | 42 | MODULE_DESCRIPTION("iwl core"); |
43 | MODULE_VERSION(IWLWIFI_VERSION); | 43 | MODULE_VERSION(IWLWIFI_VERSION); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 64f4df53986c..6d82376f43f9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -148,6 +148,63 @@ int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len, | |||
148 | int (*callback)(struct iwl_priv *priv, | 148 | int (*callback)(struct iwl_priv *priv, |
149 | struct iwl_cmd *cmd, | 149 | struct iwl_cmd *cmd, |
150 | struct sk_buff *skb)); | 150 | struct sk_buff *skb)); |
151 | /*************** DRIVER STATUS FUNCTIONS *****/ | ||
152 | |||
153 | #define STATUS_HCMD_ACTIVE 0 /* host command in progress */ | ||
154 | #define STATUS_HCMD_SYNC_ACTIVE 1 /* sync host command in progress */ | ||
155 | #define STATUS_INT_ENABLED 2 | ||
156 | #define STATUS_RF_KILL_HW 3 | ||
157 | #define STATUS_RF_KILL_SW 4 | ||
158 | #define STATUS_INIT 5 | ||
159 | #define STATUS_ALIVE 6 | ||
160 | #define STATUS_READY 7 | ||
161 | #define STATUS_TEMPERATURE 8 | ||
162 | #define STATUS_GEO_CONFIGURED 9 | ||
163 | #define STATUS_EXIT_PENDING 10 | ||
164 | #define STATUS_IN_SUSPEND 11 | ||
165 | #define STATUS_STATISTICS 12 | ||
166 | #define STATUS_SCANNING 13 | ||
167 | #define STATUS_SCAN_ABORTING 14 | ||
168 | #define STATUS_SCAN_HW 15 | ||
169 | #define STATUS_POWER_PMI 16 | ||
170 | #define STATUS_FW_ERROR 17 | ||
171 | #define STATUS_CONF_PENDING 18 | ||
172 | |||
173 | |||
174 | static inline int iwl_is_ready(struct iwl_priv *priv) | ||
175 | { | ||
176 | /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are | ||
177 | * set but EXIT_PENDING is not */ | ||
178 | return test_bit(STATUS_READY, &priv->status) && | ||
179 | test_bit(STATUS_GEO_CONFIGURED, &priv->status) && | ||
180 | !test_bit(STATUS_EXIT_PENDING, &priv->status); | ||
181 | } | ||
182 | |||
183 | static inline int iwl_is_alive(struct iwl_priv *priv) | ||
184 | { | ||
185 | return test_bit(STATUS_ALIVE, &priv->status); | ||
186 | } | ||
187 | |||
188 | static inline int iwl_is_init(struct iwl_priv *priv) | ||
189 | { | ||
190 | return test_bit(STATUS_INIT, &priv->status); | ||
191 | } | ||
192 | |||
193 | static inline int iwl_is_rfkill(struct iwl_priv *priv) | ||
194 | { | ||
195 | return test_bit(STATUS_RF_KILL_HW, &priv->status) || | ||
196 | test_bit(STATUS_RF_KILL_SW, &priv->status); | ||
197 | } | ||
198 | |||
199 | static inline int iwl_is_ready_rf(struct iwl_priv *priv) | ||
200 | { | ||
201 | |||
202 | if (iwl_is_rfkill(priv)) | ||
203 | return 0; | ||
204 | |||
205 | return iwl_is_ready(priv); | ||
206 | } | ||
207 | |||
151 | 208 | ||
152 | enum iwlcore_card_notify { | 209 | enum iwlcore_card_notify { |
153 | IWLCORE_INIT_EVT = 0, | 210 | IWLCORE_INIT_EVT = 0, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 447ff2ca4137..23632e54aab2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | #include "iwl-4965.h" | 37 | #include "iwl-4965.h" |
38 | #include "iwl-debug.h" | 38 | #include "iwl-debug.h" |
39 | #include "iwl-core.h" | ||
39 | #include "iwl-io.h" | 40 | #include "iwl-io.h" |
40 | 41 | ||
41 | 42 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 4fe5ee2ba545..03fdf5b434a1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -40,8 +40,8 @@ | |||
40 | #include <asm/unaligned.h> | 40 | #include <asm/unaligned.h> |
41 | 41 | ||
42 | #include "iwl-4965.h" | 42 | #include "iwl-4965.h" |
43 | #include "iwl-io.h" | ||
44 | #include "iwl-core.h" | 43 | #include "iwl-core.h" |
44 | #include "iwl-io.h" | ||
45 | #include "iwl-helpers.h" | 45 | #include "iwl-helpers.h" |
46 | 46 | ||
47 | #define IWL_1MB_RATE (128 * 1024) | 47 | #define IWL_1MB_RATE (128 * 1024) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rfkill.c b/drivers/net/wireless/iwlwifi/iwl-rfkill.c index 66abf52e8987..308d69b18404 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rfkill.c +++ b/drivers/net/wireless/iwlwifi/iwl-rfkill.c | |||
@@ -33,18 +33,11 @@ | |||
33 | #include <net/mac80211.h> | 33 | #include <net/mac80211.h> |
34 | 34 | ||
35 | #include "iwl-eeprom.h" | 35 | #include "iwl-eeprom.h" |
36 | #include "iwl-core.h" | ||
37 | #include "iwl-4965.h" | 36 | #include "iwl-4965.h" |
37 | #include "iwl-core.h" | ||
38 | #include "iwl-helpers.h" | 38 | #include "iwl-helpers.h" |
39 | 39 | ||
40 | 40 | ||
41 | static inline int iwl_is_rfkill(struct iwl_priv *priv) | ||
42 | { | ||
43 | return test_bit(STATUS_RF_KILL_HW, &priv->status) || | ||
44 | test_bit(STATUS_RF_KILL_SW, &priv->status); | ||
45 | } | ||
46 | |||
47 | |||
48 | /* software rf-kill from user */ | 41 | /* software rf-kill from user */ |
49 | static int iwl_rfkill_soft_rf_kill(void *data, enum rfkill_state state) | 42 | static int iwl_rfkill_soft_rf_kill(void *data, enum rfkill_state state) |
50 | { | 43 | { |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index f995af682233..5dfc414792c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -46,8 +46,8 @@ | |||
46 | #include <asm/div64.h> | 46 | #include <asm/div64.h> |
47 | 47 | ||
48 | #include "iwl-eeprom.h" | 48 | #include "iwl-eeprom.h" |
49 | #include "iwl-core.h" | ||
50 | #include "iwl-4965.h" | 49 | #include "iwl-4965.h" |
50 | #include "iwl-core.h" | ||
51 | #include "iwl-io.h" | 51 | #include "iwl-io.h" |
52 | #include "iwl-helpers.h" | 52 | #include "iwl-helpers.h" |
53 | 53 | ||
@@ -496,41 +496,7 @@ u8 iwl4965_add_station_flags(struct iwl_priv *priv, const u8 *addr, | |||
496 | 496 | ||
497 | } | 497 | } |
498 | 498 | ||
499 | /*************** DRIVER STATUS FUNCTIONS *****/ | ||
500 | |||
501 | static inline int iwl4965_is_ready(struct iwl_priv *priv) | ||
502 | { | ||
503 | /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are | ||
504 | * set but EXIT_PENDING is not */ | ||
505 | return test_bit(STATUS_READY, &priv->status) && | ||
506 | test_bit(STATUS_GEO_CONFIGURED, &priv->status) && | ||
507 | !test_bit(STATUS_EXIT_PENDING, &priv->status); | ||
508 | } | ||
509 | |||
510 | static inline int iwl4965_is_alive(struct iwl_priv *priv) | ||
511 | { | ||
512 | return test_bit(STATUS_ALIVE, &priv->status); | ||
513 | } | ||
514 | 499 | ||
515 | static inline int iwl4965_is_init(struct iwl_priv *priv) | ||
516 | { | ||
517 | return test_bit(STATUS_INIT, &priv->status); | ||
518 | } | ||
519 | |||
520 | static inline int iwl4965_is_rfkill(struct iwl_priv *priv) | ||
521 | { | ||
522 | return test_bit(STATUS_RF_KILL_HW, &priv->status) || | ||
523 | test_bit(STATUS_RF_KILL_SW, &priv->status); | ||
524 | } | ||
525 | |||
526 | static inline int iwl4965_is_ready_rf(struct iwl_priv *priv) | ||
527 | { | ||
528 | |||
529 | if (iwl4965_is_rfkill(priv)) | ||
530 | return 0; | ||
531 | |||
532 | return iwl4965_is_ready(priv); | ||
533 | } | ||
534 | 500 | ||
535 | /*************** HOST COMMAND QUEUE FUNCTIONS *****/ | 501 | /*************** HOST COMMAND QUEUE FUNCTIONS *****/ |
536 | 502 | ||
@@ -562,7 +528,7 @@ int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
562 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && | 528 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && |
563 | !(cmd->meta.flags & CMD_SIZE_HUGE)); | 529 | !(cmd->meta.flags & CMD_SIZE_HUGE)); |
564 | 530 | ||
565 | if (iwl4965_is_rfkill(priv)) { | 531 | if (iwl_is_rfkill(priv)) { |
566 | IWL_DEBUG_INFO("Not sending command - RF KILL"); | 532 | IWL_DEBUG_INFO("Not sending command - RF KILL"); |
567 | return -EIO; | 533 | return -EIO; |
568 | } | 534 | } |
@@ -858,7 +824,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv) | |||
858 | DECLARE_MAC_BUF(mac); | 824 | DECLARE_MAC_BUF(mac); |
859 | int rc = 0; | 825 | int rc = 0; |
860 | 826 | ||
861 | if (!iwl4965_is_alive(priv)) | 827 | if (!iwl_is_alive(priv)) |
862 | return -1; | 828 | return -1; |
863 | 829 | ||
864 | /* always get timestamp with Rx frame */ | 830 | /* always get timestamp with Rx frame */ |
@@ -1973,7 +1939,7 @@ static int iwl4965_scan_initiate(struct iwl_priv *priv) | |||
1973 | return 0; | 1939 | return 0; |
1974 | } | 1940 | } |
1975 | 1941 | ||
1976 | if (!iwl4965_is_ready_rf(priv)) { | 1942 | if (!iwl_is_ready_rf(priv)) { |
1977 | IWL_DEBUG_SCAN("Aborting scan due to not ready.\n"); | 1943 | IWL_DEBUG_SCAN("Aborting scan due to not ready.\n"); |
1978 | return -EIO; | 1944 | return -EIO; |
1979 | } | 1945 | } |
@@ -2127,7 +2093,7 @@ static int iwl4965_set_mode(struct iwl_priv *priv, int mode) | |||
2127 | iwlcore_clear_stations_table(priv); | 2093 | iwlcore_clear_stations_table(priv); |
2128 | 2094 | ||
2129 | /* dont commit rxon if rf-kill is on*/ | 2095 | /* dont commit rxon if rf-kill is on*/ |
2130 | if (!iwl4965_is_ready_rf(priv)) | 2096 | if (!iwl_is_ready_rf(priv)) |
2131 | return -EAGAIN; | 2097 | return -EAGAIN; |
2132 | 2098 | ||
2133 | cancel_delayed_work(&priv->scan_check); | 2099 | cancel_delayed_work(&priv->scan_check); |
@@ -2343,7 +2309,7 @@ static int iwl4965_tx_skb(struct iwl_priv *priv, | |||
2343 | int rc; | 2309 | int rc; |
2344 | 2310 | ||
2345 | spin_lock_irqsave(&priv->lock, flags); | 2311 | spin_lock_irqsave(&priv->lock, flags); |
2346 | if (iwl4965_is_rfkill(priv)) { | 2312 | if (iwl_is_rfkill(priv)) { |
2347 | IWL_DEBUG_DROP("Dropping - RF KILL\n"); | 2313 | IWL_DEBUG_DROP("Dropping - RF KILL\n"); |
2348 | goto drop_unlock; | 2314 | goto drop_unlock; |
2349 | } | 2315 | } |
@@ -5701,7 +5667,7 @@ static void iwl4965_alive_start(struct iwl_priv *priv) | |||
5701 | /* Clear out the uCode error bit if it is set */ | 5667 | /* Clear out the uCode error bit if it is set */ |
5702 | clear_bit(STATUS_FW_ERROR, &priv->status); | 5668 | clear_bit(STATUS_FW_ERROR, &priv->status); |
5703 | 5669 | ||
5704 | if (iwl4965_is_rfkill(priv)) | 5670 | if (iwl_is_rfkill(priv)) |
5705 | return; | 5671 | return; |
5706 | 5672 | ||
5707 | ieee80211_start_queues(priv->hw); | 5673 | ieee80211_start_queues(priv->hw); |
@@ -5794,7 +5760,7 @@ static void __iwl4965_down(struct iwl_priv *priv) | |||
5794 | 5760 | ||
5795 | /* If we have not previously called iwl4965_init() then | 5761 | /* If we have not previously called iwl4965_init() then |
5796 | * clear all bits but the RF Kill and SUSPEND bits and return */ | 5762 | * clear all bits but the RF Kill and SUSPEND bits and return */ |
5797 | if (!iwl4965_is_init(priv)) { | 5763 | if (!iwl_is_init(priv)) { |
5798 | priv->status = test_bit(STATUS_RF_KILL_HW, &priv->status) << | 5764 | priv->status = test_bit(STATUS_RF_KILL_HW, &priv->status) << |
5799 | STATUS_RF_KILL_HW | | 5765 | STATUS_RF_KILL_HW | |
5800 | test_bit(STATUS_RF_KILL_SW, &priv->status) << | 5766 | test_bit(STATUS_RF_KILL_SW, &priv->status) << |
@@ -6004,7 +5970,7 @@ static void iwl4965_bg_rf_kill(struct work_struct *work) | |||
6004 | 5970 | ||
6005 | mutex_lock(&priv->mutex); | 5971 | mutex_lock(&priv->mutex); |
6006 | 5972 | ||
6007 | if (!iwl4965_is_rfkill(priv)) { | 5973 | if (!iwl_is_rfkill(priv)) { |
6008 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_RF_KILL, | 5974 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_RF_KILL, |
6009 | "HW and/or SW RF Kill no longer active, restarting " | 5975 | "HW and/or SW RF Kill no longer active, restarting " |
6010 | "device\n"); | 5976 | "device\n"); |
@@ -6071,7 +6037,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data) | |||
6071 | 6037 | ||
6072 | mutex_lock(&priv->mutex); | 6038 | mutex_lock(&priv->mutex); |
6073 | 6039 | ||
6074 | if (!iwl4965_is_ready(priv)) { | 6040 | if (!iwl_is_ready(priv)) { |
6075 | IWL_WARNING("request scan called when driver not ready.\n"); | 6041 | IWL_WARNING("request scan called when driver not ready.\n"); |
6076 | goto done; | 6042 | goto done; |
6077 | } | 6043 | } |
@@ -6100,7 +6066,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data) | |||
6100 | goto done; | 6066 | goto done; |
6101 | } | 6067 | } |
6102 | 6068 | ||
6103 | if (iwl4965_is_rfkill(priv)) { | 6069 | if (iwl_is_rfkill(priv)) { |
6104 | IWL_DEBUG_HC("Aborting scan due to RF Kill activation\n"); | 6070 | IWL_DEBUG_HC("Aborting scan due to RF Kill activation\n"); |
6105 | goto done; | 6071 | goto done; |
6106 | } | 6072 | } |
@@ -6419,7 +6385,7 @@ static void iwl4965_bg_abort_scan(struct work_struct *work) | |||
6419 | { | 6385 | { |
6420 | struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan); | 6386 | struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan); |
6421 | 6387 | ||
6422 | if (!iwl4965_is_ready(priv)) | 6388 | if (!iwl_is_ready(priv)) |
6423 | return; | 6389 | return; |
6424 | 6390 | ||
6425 | mutex_lock(&priv->mutex); | 6391 | mutex_lock(&priv->mutex); |
@@ -6552,7 +6518,7 @@ static void iwl4965_mac_stop(struct ieee80211_hw *hw) | |||
6552 | 6518 | ||
6553 | priv->is_open = 0; | 6519 | priv->is_open = 0; |
6554 | 6520 | ||
6555 | if (iwl4965_is_ready_rf(priv)) { | 6521 | if (iwl_is_ready_rf(priv)) { |
6556 | /* stop mac, cancel any scan request and clear | 6522 | /* stop mac, cancel any scan request and clear |
6557 | * RXON_FILTER_ASSOC_MSK BIT | 6523 | * RXON_FILTER_ASSOC_MSK BIT |
6558 | */ | 6524 | */ |
@@ -6621,7 +6587,7 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw, | |||
6621 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); | 6587 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); |
6622 | } | 6588 | } |
6623 | 6589 | ||
6624 | if (iwl4965_is_ready(priv)) | 6590 | if (iwl_is_ready(priv)) |
6625 | iwl4965_set_mode(priv, conf->type); | 6591 | iwl4965_set_mode(priv, conf->type); |
6626 | 6592 | ||
6627 | mutex_unlock(&priv->mutex); | 6593 | mutex_unlock(&priv->mutex); |
@@ -6649,7 +6615,7 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co | |||
6649 | 6615 | ||
6650 | priv->add_radiotap = !!(conf->flags & IEEE80211_CONF_RADIOTAP); | 6616 | priv->add_radiotap = !!(conf->flags & IEEE80211_CONF_RADIOTAP); |
6651 | 6617 | ||
6652 | if (!iwl4965_is_ready(priv)) { | 6618 | if (!iwl_is_ready(priv)) { |
6653 | IWL_DEBUG_MAC80211("leave - not ready\n"); | 6619 | IWL_DEBUG_MAC80211("leave - not ready\n"); |
6654 | ret = -EIO; | 6620 | ret = -EIO; |
6655 | goto out; | 6621 | goto out; |
@@ -6713,7 +6679,7 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co | |||
6713 | goto out; | 6679 | goto out; |
6714 | } | 6680 | } |
6715 | 6681 | ||
6716 | if (iwl4965_is_rfkill(priv)) { | 6682 | if (iwl_is_rfkill(priv)) { |
6717 | IWL_DEBUG_MAC80211("leave - RF kill\n"); | 6683 | IWL_DEBUG_MAC80211("leave - RF kill\n"); |
6718 | ret = -EIO; | 6684 | ret = -EIO; |
6719 | goto out; | 6685 | goto out; |
@@ -6820,7 +6786,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
6820 | return 0; | 6786 | return 0; |
6821 | } | 6787 | } |
6822 | 6788 | ||
6823 | if (!iwl4965_is_alive(priv)) | 6789 | if (!iwl_is_alive(priv)) |
6824 | return -EAGAIN; | 6790 | return -EAGAIN; |
6825 | 6791 | ||
6826 | mutex_lock(&priv->mutex); | 6792 | mutex_lock(&priv->mutex); |
@@ -6849,7 +6815,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
6849 | priv->ibss_beacon = conf->beacon; | 6815 | priv->ibss_beacon = conf->beacon; |
6850 | } | 6816 | } |
6851 | 6817 | ||
6852 | if (iwl4965_is_rfkill(priv)) | 6818 | if (iwl_is_rfkill(priv)) |
6853 | goto done; | 6819 | goto done; |
6854 | 6820 | ||
6855 | if (conf->bssid && !is_zero_ether_addr(conf->bssid) && | 6821 | if (conf->bssid && !is_zero_ether_addr(conf->bssid) && |
@@ -6923,7 +6889,7 @@ static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, | |||
6923 | 6889 | ||
6924 | mutex_lock(&priv->mutex); | 6890 | mutex_lock(&priv->mutex); |
6925 | 6891 | ||
6926 | if (iwl4965_is_ready_rf(priv)) { | 6892 | if (iwl_is_ready_rf(priv)) { |
6927 | iwl4965_scan_cancel_timeout(priv, 100); | 6893 | iwl4965_scan_cancel_timeout(priv, 100); |
6928 | cancel_delayed_work(&priv->post_associate); | 6894 | cancel_delayed_work(&priv->post_associate); |
6929 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 6895 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
@@ -7064,7 +7030,7 @@ static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7064 | mutex_lock(&priv->mutex); | 7030 | mutex_lock(&priv->mutex); |
7065 | spin_lock_irqsave(&priv->lock, flags); | 7031 | spin_lock_irqsave(&priv->lock, flags); |
7066 | 7032 | ||
7067 | if (!iwl4965_is_ready_rf(priv)) { | 7033 | if (!iwl_is_ready_rf(priv)) { |
7068 | rc = -EIO; | 7034 | rc = -EIO; |
7069 | IWL_DEBUG_MAC80211("leave - not ready or exit pending\n"); | 7035 | IWL_DEBUG_MAC80211("leave - not ready or exit pending\n"); |
7070 | goto out_unlock; | 7036 | goto out_unlock; |
@@ -7231,7 +7197,7 @@ static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, int queue, | |||
7231 | 7197 | ||
7232 | IWL_DEBUG_MAC80211("enter\n"); | 7198 | IWL_DEBUG_MAC80211("enter\n"); |
7233 | 7199 | ||
7234 | if (!iwl4965_is_ready_rf(priv)) { | 7200 | if (!iwl_is_ready_rf(priv)) { |
7235 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 7201 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); |
7236 | return -EIO; | 7202 | return -EIO; |
7237 | } | 7203 | } |
@@ -7284,7 +7250,7 @@ static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
7284 | 7250 | ||
7285 | IWL_DEBUG_MAC80211("enter\n"); | 7251 | IWL_DEBUG_MAC80211("enter\n"); |
7286 | 7252 | ||
7287 | if (!iwl4965_is_ready_rf(priv)) { | 7253 | if (!iwl_is_ready_rf(priv)) { |
7288 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 7254 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); |
7289 | return -EIO; | 7255 | return -EIO; |
7290 | } | 7256 | } |
@@ -7362,7 +7328,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw) | |||
7362 | 7328 | ||
7363 | spin_unlock_irqrestore(&priv->lock, flags); | 7329 | spin_unlock_irqrestore(&priv->lock, flags); |
7364 | 7330 | ||
7365 | if (!iwl4965_is_ready_rf(priv)) { | 7331 | if (!iwl_is_ready_rf(priv)) { |
7366 | IWL_DEBUG_MAC80211("leave - not ready\n"); | 7332 | IWL_DEBUG_MAC80211("leave - not ready\n"); |
7367 | mutex_unlock(&priv->mutex); | 7333 | mutex_unlock(&priv->mutex); |
7368 | return; | 7334 | return; |
@@ -7403,7 +7369,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk | |||
7403 | mutex_lock(&priv->mutex); | 7369 | mutex_lock(&priv->mutex); |
7404 | IWL_DEBUG_MAC80211("enter\n"); | 7370 | IWL_DEBUG_MAC80211("enter\n"); |
7405 | 7371 | ||
7406 | if (!iwl4965_is_ready_rf(priv)) { | 7372 | if (!iwl_is_ready_rf(priv)) { |
7407 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 7373 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); |
7408 | mutex_unlock(&priv->mutex); | 7374 | mutex_unlock(&priv->mutex); |
7409 | return -EIO; | 7375 | return -EIO; |
@@ -7483,7 +7449,7 @@ static ssize_t show_temperature(struct device *d, | |||
7483 | { | 7449 | { |
7484 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 7450 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7485 | 7451 | ||
7486 | if (!iwl4965_is_alive(priv)) | 7452 | if (!iwl_is_alive(priv)) |
7487 | return -EAGAIN; | 7453 | return -EAGAIN; |
7488 | 7454 | ||
7489 | return sprintf(buf, "%d\n", iwl4965_hw_get_temperature(priv)); | 7455 | return sprintf(buf, "%d\n", iwl4965_hw_get_temperature(priv)); |
@@ -7705,7 +7671,7 @@ static ssize_t store_power_level(struct device *d, | |||
7705 | mode = simple_strtoul(buf, NULL, 0); | 7671 | mode = simple_strtoul(buf, NULL, 0); |
7706 | mutex_lock(&priv->mutex); | 7672 | mutex_lock(&priv->mutex); |
7707 | 7673 | ||
7708 | if (!iwl4965_is_ready(priv)) { | 7674 | if (!iwl_is_ready(priv)) { |
7709 | rc = -EAGAIN; | 7675 | rc = -EAGAIN; |
7710 | goto out; | 7676 | goto out; |
7711 | } | 7677 | } |
@@ -7802,7 +7768,7 @@ static ssize_t show_statistics(struct device *d, | |||
7802 | u8 *data = (u8 *) & priv->statistics; | 7768 | u8 *data = (u8 *) & priv->statistics; |
7803 | int rc = 0; | 7769 | int rc = 0; |
7804 | 7770 | ||
7805 | if (!iwl4965_is_alive(priv)) | 7771 | if (!iwl_is_alive(priv)) |
7806 | return -EAGAIN; | 7772 | return -EAGAIN; |
7807 | 7773 | ||
7808 | mutex_lock(&priv->mutex); | 7774 | mutex_lock(&priv->mutex); |
@@ -7836,7 +7802,7 @@ static ssize_t show_antenna(struct device *d, | |||
7836 | { | 7802 | { |
7837 | struct iwl_priv *priv = dev_get_drvdata(d); | 7803 | struct iwl_priv *priv = dev_get_drvdata(d); |
7838 | 7804 | ||
7839 | if (!iwl4965_is_alive(priv)) | 7805 | if (!iwl_is_alive(priv)) |
7840 | return -EAGAIN; | 7806 | return -EAGAIN; |
7841 | 7807 | ||
7842 | return sprintf(buf, "%d\n", priv->antenna); | 7808 | return sprintf(buf, "%d\n", priv->antenna); |
@@ -7873,7 +7839,7 @@ static ssize_t show_status(struct device *d, | |||
7873 | struct device_attribute *attr, char *buf) | 7839 | struct device_attribute *attr, char *buf) |
7874 | { | 7840 | { |
7875 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 7841 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; |
7876 | if (!iwl4965_is_alive(priv)) | 7842 | if (!iwl_is_alive(priv)) |
7877 | return -EAGAIN; | 7843 | return -EAGAIN; |
7878 | return sprintf(buf, "0x%08x\n", (int)priv->status); | 7844 | return sprintf(buf, "0x%08x\n", (int)priv->status); |
7879 | } | 7845 | } |