diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 07:09:01 -0500 |
---|---|---|
committer | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 07:09:01 -0500 |
commit | a6766ccdaf9cc80d565672516d429a562d1a732d (patch) | |
tree | d9a98acc6eef19ef41a7ef053117ba7df1c53324 /drivers/net/wireless/iwlegacy/3945-mac.c | |
parent | 6bbb1370c3083190cae8487c2c61c0d24f869e68 (diff) |
iwlegacy: s/STATUS_/S_/
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/3945-mac.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945-mac.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c index 17edbdf9dc84..f69211ee5fe7 100644 --- a/drivers/net/wireless/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/iwlegacy/3945-mac.c | |||
@@ -827,17 +827,17 @@ static void il3945_rx_card_state_notif(struct il_priv *il, | |||
827 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); | 827 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); |
828 | 828 | ||
829 | if (flags & HW_CARD_DISABLED) | 829 | if (flags & HW_CARD_DISABLED) |
830 | set_bit(STATUS_RF_KILL_HW, &il->status); | 830 | set_bit(S_RF_KILL_HW, &il->status); |
831 | else | 831 | else |
832 | clear_bit(STATUS_RF_KILL_HW, &il->status); | 832 | clear_bit(S_RF_KILL_HW, &il->status); |
833 | 833 | ||
834 | 834 | ||
835 | il_scan_cancel(il); | 835 | il_scan_cancel(il); |
836 | 836 | ||
837 | if ((test_bit(STATUS_RF_KILL_HW, &status) != | 837 | if ((test_bit(S_RF_KILL_HW, &status) != |
838 | test_bit(STATUS_RF_KILL_HW, &il->status))) | 838 | test_bit(S_RF_KILL_HW, &il->status))) |
839 | wiphy_rfkill_set_hw_state(il->hw->wiphy, | 839 | wiphy_rfkill_set_hw_state(il->hw->wiphy, |
840 | test_bit(STATUS_RF_KILL_HW, &il->status)); | 840 | test_bit(S_RF_KILL_HW, &il->status)); |
841 | else | 841 | else |
842 | wake_up(&il->wait_command_queue); | 842 | wake_up(&il->wait_command_queue); |
843 | } | 843 | } |
@@ -1537,7 +1537,7 @@ static void il3945_irq_tasklet(struct il_priv *il) | |||
1537 | 1537 | ||
1538 | /* Re-enable all interrupts */ | 1538 | /* Re-enable all interrupts */ |
1539 | /* only Re-enable if disabled by irq */ | 1539 | /* only Re-enable if disabled by irq */ |
1540 | if (test_bit(STATUS_INT_ENABLED, &il->status)) | 1540 | if (test_bit(S_INT_ENABLED, &il->status)) |
1541 | il_enable_interrupts(il); | 1541 | il_enable_interrupts(il); |
1542 | 1542 | ||
1543 | #ifdef CONFIG_IWLEGACY_DEBUG | 1543 | #ifdef CONFIG_IWLEGACY_DEBUG |
@@ -2213,7 +2213,7 @@ static void il3945_alive_start(struct il_priv *il) | |||
2213 | D_INFO("RFKILL status: 0x%x\n", rfkill); | 2213 | D_INFO("RFKILL status: 0x%x\n", rfkill); |
2214 | 2214 | ||
2215 | if (rfkill & 0x1) { | 2215 | if (rfkill & 0x1) { |
2216 | clear_bit(STATUS_RF_KILL_HW, &il->status); | 2216 | clear_bit(S_RF_KILL_HW, &il->status); |
2217 | /* if RFKILL is not on, then wait for thermal | 2217 | /* if RFKILL is not on, then wait for thermal |
2218 | * sensor in adapter to kick in */ | 2218 | * sensor in adapter to kick in */ |
2219 | while (il3945_hw_get_temperature(il) == 0) { | 2219 | while (il3945_hw_get_temperature(il) == 0) { |
@@ -2225,10 +2225,10 @@ static void il3945_alive_start(struct il_priv *il) | |||
2225 | D_INFO("Thermal calibration took %dus\n", | 2225 | D_INFO("Thermal calibration took %dus\n", |
2226 | thermal_spin * 10); | 2226 | thermal_spin * 10); |
2227 | } else | 2227 | } else |
2228 | set_bit(STATUS_RF_KILL_HW, &il->status); | 2228 | set_bit(S_RF_KILL_HW, &il->status); |
2229 | 2229 | ||
2230 | /* After the ALIVE response, we can send commands to 3945 uCode */ | 2230 | /* After the ALIVE response, we can send commands to 3945 uCode */ |
2231 | set_bit(STATUS_ALIVE, &il->status); | 2231 | set_bit(S_ALIVE, &il->status); |
2232 | 2232 | ||
2233 | /* Enable watchdog to monitor the driver tx queues */ | 2233 | /* Enable watchdog to monitor the driver tx queues */ |
2234 | il_setup_watchdog(il); | 2234 | il_setup_watchdog(il); |
@@ -2256,7 +2256,7 @@ static void il3945_alive_start(struct il_priv *il) | |||
2256 | /* Configure Bluetooth device coexistence support */ | 2256 | /* Configure Bluetooth device coexistence support */ |
2257 | il_send_bt_config(il); | 2257 | il_send_bt_config(il); |
2258 | 2258 | ||
2259 | set_bit(STATUS_READY, &il->status); | 2259 | set_bit(S_READY, &il->status); |
2260 | 2260 | ||
2261 | /* Configure the adapter for unassociated operation */ | 2261 | /* Configure the adapter for unassociated operation */ |
2262 | il3945_commit_rxon(il, ctx); | 2262 | il3945_commit_rxon(il, ctx); |
@@ -2283,9 +2283,9 @@ static void __il3945_down(struct il_priv *il) | |||
2283 | 2283 | ||
2284 | il_scan_cancel_timeout(il, 200); | 2284 | il_scan_cancel_timeout(il, 200); |
2285 | 2285 | ||
2286 | exit_pending = test_and_set_bit(STATUS_EXIT_PENDING, &il->status); | 2286 | exit_pending = test_and_set_bit(S_EXIT_PENDING, &il->status); |
2287 | 2287 | ||
2288 | /* Stop TX queues watchdog. We need to have STATUS_EXIT_PENDING bit set | 2288 | /* Stop TX queues watchdog. We need to have S_EXIT_PENDING bit set |
2289 | * to prevent rearm timer */ | 2289 | * to prevent rearm timer */ |
2290 | del_timer_sync(&il->watchdog); | 2290 | del_timer_sync(&il->watchdog); |
2291 | 2291 | ||
@@ -2300,7 +2300,7 @@ static void __il3945_down(struct il_priv *il) | |||
2300 | /* Wipe out the EXIT_PENDING status bit if we are not actually | 2300 | /* Wipe out the EXIT_PENDING status bit if we are not actually |
2301 | * exiting the module */ | 2301 | * exiting the module */ |
2302 | if (!exit_pending) | 2302 | if (!exit_pending) |
2303 | clear_bit(STATUS_EXIT_PENDING, &il->status); | 2303 | clear_bit(S_EXIT_PENDING, &il->status); |
2304 | 2304 | ||
2305 | /* stop and reset the on-board processor */ | 2305 | /* stop and reset the on-board processor */ |
2306 | _il_wr(il, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); | 2306 | _il_wr(il, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); |
@@ -2317,25 +2317,25 @@ static void __il3945_down(struct il_priv *il) | |||
2317 | /* If we have not previously called il3945_init() then | 2317 | /* If we have not previously called il3945_init() then |
2318 | * clear all bits but the RF Kill bits and return */ | 2318 | * clear all bits but the RF Kill bits and return */ |
2319 | if (!il_is_init(il)) { | 2319 | if (!il_is_init(il)) { |
2320 | il->status = test_bit(STATUS_RF_KILL_HW, &il->status) << | 2320 | il->status = test_bit(S_RF_KILL_HW, &il->status) << |
2321 | STATUS_RF_KILL_HW | | 2321 | S_RF_KILL_HW | |
2322 | test_bit(STATUS_GEO_CONFIGURED, &il->status) << | 2322 | test_bit(S_GEO_CONFIGURED, &il->status) << |
2323 | STATUS_GEO_CONFIGURED | | 2323 | S_GEO_CONFIGURED | |
2324 | test_bit(STATUS_EXIT_PENDING, &il->status) << | 2324 | test_bit(S_EXIT_PENDING, &il->status) << |
2325 | STATUS_EXIT_PENDING; | 2325 | S_EXIT_PENDING; |
2326 | goto exit; | 2326 | goto exit; |
2327 | } | 2327 | } |
2328 | 2328 | ||
2329 | /* ...otherwise clear out all the status bits but the RF Kill | 2329 | /* ...otherwise clear out all the status bits but the RF Kill |
2330 | * bit and continue taking the NIC down. */ | 2330 | * bit and continue taking the NIC down. */ |
2331 | il->status &= test_bit(STATUS_RF_KILL_HW, &il->status) << | 2331 | il->status &= test_bit(S_RF_KILL_HW, &il->status) << |
2332 | STATUS_RF_KILL_HW | | 2332 | S_RF_KILL_HW | |
2333 | test_bit(STATUS_GEO_CONFIGURED, &il->status) << | 2333 | test_bit(S_GEO_CONFIGURED, &il->status) << |
2334 | STATUS_GEO_CONFIGURED | | 2334 | S_GEO_CONFIGURED | |
2335 | test_bit(STATUS_FW_ERROR, &il->status) << | 2335 | test_bit(S_FW_ERROR, &il->status) << |
2336 | STATUS_FW_ERROR | | 2336 | S_FW_ERROR | |
2337 | test_bit(STATUS_EXIT_PENDING, &il->status) << | 2337 | test_bit(S_EXIT_PENDING, &il->status) << |
2338 | STATUS_EXIT_PENDING; | 2338 | S_EXIT_PENDING; |
2339 | 2339 | ||
2340 | il3945_hw_txq_ctx_stop(il); | 2340 | il3945_hw_txq_ctx_stop(il); |
2341 | il3945_hw_rxq_stop(il); | 2341 | il3945_hw_rxq_stop(il); |
@@ -2400,7 +2400,7 @@ static int __il3945_up(struct il_priv *il) | |||
2400 | if (rc) | 2400 | if (rc) |
2401 | return rc; | 2401 | return rc; |
2402 | 2402 | ||
2403 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) { | 2403 | if (test_bit(S_EXIT_PENDING, &il->status)) { |
2404 | IL_WARN("Exit pending; will not bring the NIC up\n"); | 2404 | IL_WARN("Exit pending; will not bring the NIC up\n"); |
2405 | return -EIO; | 2405 | return -EIO; |
2406 | } | 2406 | } |
@@ -2413,9 +2413,9 @@ static int __il3945_up(struct il_priv *il) | |||
2413 | /* If platform's RF_KILL switch is NOT set to KILL */ | 2413 | /* If platform's RF_KILL switch is NOT set to KILL */ |
2414 | if (_il_rd(il, CSR_GP_CNTRL) & | 2414 | if (_il_rd(il, CSR_GP_CNTRL) & |
2415 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) | 2415 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) |
2416 | clear_bit(STATUS_RF_KILL_HW, &il->status); | 2416 | clear_bit(S_RF_KILL_HW, &il->status); |
2417 | else { | 2417 | else { |
2418 | set_bit(STATUS_RF_KILL_HW, &il->status); | 2418 | set_bit(S_RF_KILL_HW, &il->status); |
2419 | IL_WARN("Radio disabled by HW RF Kill switch\n"); | 2419 | IL_WARN("Radio disabled by HW RF Kill switch\n"); |
2420 | return -ENODEV; | 2420 | return -ENODEV; |
2421 | } | 2421 | } |
@@ -2448,7 +2448,7 @@ static int __il3945_up(struct il_priv *il) | |||
2448 | il->ucode_data.len); | 2448 | il->ucode_data.len); |
2449 | 2449 | ||
2450 | /* We return success when we resume from suspend and rf_kill is on. */ | 2450 | /* We return success when we resume from suspend and rf_kill is on. */ |
2451 | if (test_bit(STATUS_RF_KILL_HW, &il->status)) | 2451 | if (test_bit(S_RF_KILL_HW, &il->status)) |
2452 | return 0; | 2452 | return 0; |
2453 | 2453 | ||
2454 | for (i = 0; i < MAX_HW_RESTARTS; i++) { | 2454 | for (i = 0; i < MAX_HW_RESTARTS; i++) { |
@@ -2472,9 +2472,9 @@ static int __il3945_up(struct il_priv *il) | |||
2472 | return 0; | 2472 | return 0; |
2473 | } | 2473 | } |
2474 | 2474 | ||
2475 | set_bit(STATUS_EXIT_PENDING, &il->status); | 2475 | set_bit(S_EXIT_PENDING, &il->status); |
2476 | __il3945_down(il); | 2476 | __il3945_down(il); |
2477 | clear_bit(STATUS_EXIT_PENDING, &il->status); | 2477 | clear_bit(S_EXIT_PENDING, &il->status); |
2478 | 2478 | ||
2479 | /* tried to restart and config the device for as long as our | 2479 | /* tried to restart and config the device for as long as our |
2480 | * patience could withstand */ | 2480 | * patience could withstand */ |
@@ -2495,7 +2495,7 @@ static void il3945_bg_init_alive_start(struct work_struct *data) | |||
2495 | container_of(data, struct il_priv, init_alive_start.work); | 2495 | container_of(data, struct il_priv, init_alive_start.work); |
2496 | 2496 | ||
2497 | mutex_lock(&il->mutex); | 2497 | mutex_lock(&il->mutex); |
2498 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2498 | if (test_bit(S_EXIT_PENDING, &il->status)) |
2499 | goto out; | 2499 | goto out; |
2500 | 2500 | ||
2501 | il3945_init_alive_start(il); | 2501 | il3945_init_alive_start(il); |
@@ -2509,7 +2509,7 @@ static void il3945_bg_alive_start(struct work_struct *data) | |||
2509 | container_of(data, struct il_priv, alive_start.work); | 2509 | container_of(data, struct il_priv, alive_start.work); |
2510 | 2510 | ||
2511 | mutex_lock(&il->mutex); | 2511 | mutex_lock(&il->mutex); |
2512 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2512 | if (test_bit(S_EXIT_PENDING, &il->status)) |
2513 | goto out; | 2513 | goto out; |
2514 | 2514 | ||
2515 | il3945_alive_start(il); | 2515 | il3945_alive_start(il); |
@@ -2527,15 +2527,15 @@ static void il3945_rfkill_poll(struct work_struct *data) | |||
2527 | { | 2527 | { |
2528 | struct il_priv *il = | 2528 | struct il_priv *il = |
2529 | container_of(data, struct il_priv, _3945.rfkill_poll.work); | 2529 | container_of(data, struct il_priv, _3945.rfkill_poll.work); |
2530 | bool old_rfkill = test_bit(STATUS_RF_KILL_HW, &il->status); | 2530 | bool old_rfkill = test_bit(S_RF_KILL_HW, &il->status); |
2531 | bool new_rfkill = !(_il_rd(il, CSR_GP_CNTRL) | 2531 | bool new_rfkill = !(_il_rd(il, CSR_GP_CNTRL) |
2532 | & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW); | 2532 | & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW); |
2533 | 2533 | ||
2534 | if (new_rfkill != old_rfkill) { | 2534 | if (new_rfkill != old_rfkill) { |
2535 | if (new_rfkill) | 2535 | if (new_rfkill) |
2536 | set_bit(STATUS_RF_KILL_HW, &il->status); | 2536 | set_bit(S_RF_KILL_HW, &il->status); |
2537 | else | 2537 | else |
2538 | clear_bit(STATUS_RF_KILL_HW, &il->status); | 2538 | clear_bit(S_RF_KILL_HW, &il->status); |
2539 | 2539 | ||
2540 | wiphy_rfkill_set_hw_state(il->hw->wiphy, new_rfkill); | 2540 | wiphy_rfkill_set_hw_state(il->hw->wiphy, new_rfkill); |
2541 | 2541 | ||
@@ -2682,10 +2682,10 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
2682 | cmd.data = scan; | 2682 | cmd.data = scan; |
2683 | scan->len = cpu_to_le16(cmd.len); | 2683 | scan->len = cpu_to_le16(cmd.len); |
2684 | 2684 | ||
2685 | set_bit(STATUS_SCAN_HW, &il->status); | 2685 | set_bit(S_SCAN_HW, &il->status); |
2686 | ret = il_send_cmd_sync(il, &cmd); | 2686 | ret = il_send_cmd_sync(il, &cmd); |
2687 | if (ret) | 2687 | if (ret) |
2688 | clear_bit(STATUS_SCAN_HW, &il->status); | 2688 | clear_bit(S_SCAN_HW, &il->status); |
2689 | return ret; | 2689 | return ret; |
2690 | } | 2690 | } |
2691 | 2691 | ||
@@ -2705,10 +2705,10 @@ static void il3945_bg_restart(struct work_struct *data) | |||
2705 | { | 2705 | { |
2706 | struct il_priv *il = container_of(data, struct il_priv, restart); | 2706 | struct il_priv *il = container_of(data, struct il_priv, restart); |
2707 | 2707 | ||
2708 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2708 | if (test_bit(S_EXIT_PENDING, &il->status)) |
2709 | return; | 2709 | return; |
2710 | 2710 | ||
2711 | if (test_and_clear_bit(STATUS_FW_ERROR, &il->status)) { | 2711 | if (test_and_clear_bit(S_FW_ERROR, &il->status)) { |
2712 | mutex_lock(&il->mutex); | 2712 | mutex_lock(&il->mutex); |
2713 | il->ctx.vif = NULL; | 2713 | il->ctx.vif = NULL; |
2714 | il->is_open = 0; | 2714 | il->is_open = 0; |
@@ -2719,7 +2719,7 @@ static void il3945_bg_restart(struct work_struct *data) | |||
2719 | il3945_down(il); | 2719 | il3945_down(il); |
2720 | 2720 | ||
2721 | mutex_lock(&il->mutex); | 2721 | mutex_lock(&il->mutex); |
2722 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) { | 2722 | if (test_bit(S_EXIT_PENDING, &il->status)) { |
2723 | mutex_unlock(&il->mutex); | 2723 | mutex_unlock(&il->mutex); |
2724 | return; | 2724 | return; |
2725 | } | 2725 | } |
@@ -2735,7 +2735,7 @@ static void il3945_bg_rx_replenish(struct work_struct *data) | |||
2735 | container_of(data, struct il_priv, rx_replenish); | 2735 | container_of(data, struct il_priv, rx_replenish); |
2736 | 2736 | ||
2737 | mutex_lock(&il->mutex); | 2737 | mutex_lock(&il->mutex); |
2738 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2738 | if (test_bit(S_EXIT_PENDING, &il->status)) |
2739 | goto out; | 2739 | goto out; |
2740 | 2740 | ||
2741 | il3945_rx_replenish(il); | 2741 | il3945_rx_replenish(il); |
@@ -2755,7 +2755,7 @@ void il3945_post_associate(struct il_priv *il) | |||
2755 | D_ASSOC("Associated as %d to: %pM\n", | 2755 | D_ASSOC("Associated as %d to: %pM\n", |
2756 | ctx->vif->bss_conf.aid, ctx->active.bssid_addr); | 2756 | ctx->vif->bss_conf.aid, ctx->active.bssid_addr); |
2757 | 2757 | ||
2758 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2758 | if (test_bit(S_EXIT_PENDING, &il->status)) |
2759 | return; | 2759 | return; |
2760 | 2760 | ||
2761 | il_scan_cancel_timeout(il, 200); | 2761 | il_scan_cancel_timeout(il, 200); |
@@ -2847,10 +2847,10 @@ static int il3945_mac_start(struct ieee80211_hw *hw) | |||
2847 | /* Wait for START_ALIVE from ucode. Otherwise callbacks from | 2847 | /* Wait for START_ALIVE from ucode. Otherwise callbacks from |
2848 | * mac80211 will not be run successfully. */ | 2848 | * mac80211 will not be run successfully. */ |
2849 | ret = wait_event_timeout(il->wait_command_queue, | 2849 | ret = wait_event_timeout(il->wait_command_queue, |
2850 | test_bit(STATUS_READY, &il->status), | 2850 | test_bit(S_READY, &il->status), |
2851 | UCODE_READY_TIMEOUT); | 2851 | UCODE_READY_TIMEOUT); |
2852 | if (!ret) { | 2852 | if (!ret) { |
2853 | if (!test_bit(STATUS_READY, &il->status)) { | 2853 | if (!test_bit(S_READY, &il->status)) { |
2854 | IL_ERR( | 2854 | IL_ERR( |
2855 | "Wait for START_ALIVE timeout after %dms.\n", | 2855 | "Wait for START_ALIVE timeout after %dms.\n", |
2856 | jiffies_to_msecs(UCODE_READY_TIMEOUT)); | 2856 | jiffies_to_msecs(UCODE_READY_TIMEOUT)); |
@@ -2918,7 +2918,7 @@ void il3945_config_ap(struct il_priv *il) | |||
2918 | struct ieee80211_vif *vif = ctx->vif; | 2918 | struct ieee80211_vif *vif = ctx->vif; |
2919 | int rc = 0; | 2919 | int rc = 0; |
2920 | 2920 | ||
2921 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2921 | if (test_bit(S_EXIT_PENDING, &il->status)) |
2922 | return; | 2922 | return; |
2923 | 2923 | ||
2924 | /* The following should be done only at AP bring up */ | 2924 | /* The following should be done only at AP bring up */ |
@@ -3870,7 +3870,7 @@ static void __devexit il3945_pci_remove(struct pci_dev *pdev) | |||
3870 | 3870 | ||
3871 | il_dbgfs_unregister(il); | 3871 | il_dbgfs_unregister(il); |
3872 | 3872 | ||
3873 | set_bit(STATUS_EXIT_PENDING, &il->status); | 3873 | set_bit(S_EXIT_PENDING, &il->status); |
3874 | 3874 | ||
3875 | il_leds_exit(il); | 3875 | il_leds_exit(il); |
3876 | 3876 | ||