aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlegacy/3945-mac.c98
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c10
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c134
-rw-r--r--drivers/net/wireless/iwlegacy/4965.c18
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-core.c40
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-core.h50
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-debugfs.c66
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-hcmd.c14
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-helpers.h4
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-led.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-power.c6
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-rx.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-scan.c42
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-tx.c4
14 files changed, 245 insertions, 245 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
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 17615c33d1aa..8ebd576dfe62 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -1008,7 +1008,7 @@ int il3945_hw_nic_init(struct il_priv *il)
1008 if (rc) 1008 if (rc)
1009 return rc; 1009 return rc;
1010 1010
1011 set_bit(STATUS_INIT, &il->status); 1011 set_bit(S_INIT, &il->status);
1012 1012
1013 return 0; 1013 return 0;
1014} 1014}
@@ -1394,7 +1394,7 @@ static int il3945_send_tx_power(struct il_priv *il)
1394 }; 1394 };
1395 u16 chan; 1395 u16 chan;
1396 1396
1397 if (WARN_ONCE(test_bit(STATUS_SCAN_HW, &il->status), 1397 if (WARN_ONCE(test_bit(S_SCAN_HW, &il->status),
1398 "TX Power requested while scanning!\n")) 1398 "TX Power requested while scanning!\n"))
1399 return -EAGAIN; 1399 return -EAGAIN;
1400 1400
@@ -1571,7 +1571,7 @@ static int il3945_hw_reg_comp_txpower_temp(struct il_priv *il)
1571 int temperature = il->temperature; 1571 int temperature = il->temperature;
1572 1572
1573 if (il->disable_tx_power_cal || 1573 if (il->disable_tx_power_cal ||
1574 test_bit(STATUS_SCANNING, &il->status)) { 1574 test_bit(S_SCANNING, &il->status)) {
1575 /* do not perform tx power calibration */ 1575 /* do not perform tx power calibration */
1576 return 0; 1576 return 0;
1577 } 1577 }
@@ -1726,7 +1726,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
1726 int rc = 0; 1726 int rc = 0;
1727 bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK); 1727 bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK);
1728 1728
1729 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 1729 if (test_bit(S_EXIT_PENDING, &il->status))
1730 return -EINVAL; 1730 return -EINVAL;
1731 1731
1732 if (!il_is_alive(il)) 1732 if (!il_is_alive(il))
@@ -1885,7 +1885,7 @@ static void il3945_bg_reg_txpower_periodic(struct work_struct *work)
1885 struct il_priv *il = container_of(work, struct il_priv, 1885 struct il_priv *il = container_of(work, struct il_priv,
1886 _3945.thermal_periodic.work); 1886 _3945.thermal_periodic.work);
1887 1887
1888 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 1888 if (test_bit(S_EXIT_PENDING, &il->status))
1889 return; 1889 return;
1890 1890
1891 mutex_lock(&il->mutex); 1891 mutex_lock(&il->mutex);
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index ee084a885adc..c4198bd42889 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -90,7 +90,7 @@ void il4965_check_abort_status(struct il_priv *il,
90{ 90{
91 if (frame_count == 1 && status == TX_STATUS_FAIL_RFKILL_FLUSH) { 91 if (frame_count == 1 && status == TX_STATUS_FAIL_RFKILL_FLUSH) {
92 IL_ERR("Tx flush command to flush out all frames\n"); 92 IL_ERR("Tx flush command to flush out all frames\n");
93 if (!test_bit(STATUS_EXIT_PENDING, &il->status)) 93 if (!test_bit(S_EXIT_PENDING, &il->status))
94 queue_work(il->workqueue, &il->tx_flush); 94 queue_work(il->workqueue, &il->tx_flush);
95 } 95 }
96} 96}
@@ -246,7 +246,7 @@ int il4965_hw_nic_init(struct il_priv *il)
246 } else 246 } else
247 il4965_txq_ctx_reset(il); 247 il4965_txq_ctx_reset(il);
248 248
249 set_bit(STATUS_INIT, &il->status); 249 set_bit(S_INIT, &il->status);
250 250
251 return 0; 251 return 0;
252} 252}
@@ -966,7 +966,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
966 scan->tx_cmd.rate_n_flags = il4965_hw_set_rate_n_flags(rate, rate_flags); 966 scan->tx_cmd.rate_n_flags = il4965_hw_set_rate_n_flags(rate, rate_flags);
967 967
968 /* In power save mode use one chain, otherwise use all chains */ 968 /* In power save mode use one chain, otherwise use all chains */
969 if (test_bit(STATUS_POWER_PMI, &il->status)) { 969 if (test_bit(S_POWER_PMI, &il->status)) {
970 /* rx_ant has been set to all valid chains previously */ 970 /* rx_ant has been set to all valid chains previously */
971 active_chains = rx_ant & 971 active_chains = rx_ant &
972 ((u8)(il->chain_noise_data.active_chains)); 972 ((u8)(il->chain_noise_data.active_chains));
@@ -1010,11 +1010,11 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
1010 cmd.data = scan; 1010 cmd.data = scan;
1011 scan->len = cpu_to_le16(cmd.len); 1011 scan->len = cpu_to_le16(cmd.len);
1012 1012
1013 set_bit(STATUS_SCAN_HW, &il->status); 1013 set_bit(S_SCAN_HW, &il->status);
1014 1014
1015 ret = il_send_cmd_sync(il, &cmd); 1015 ret = il_send_cmd_sync(il, &cmd);
1016 if (ret) 1016 if (ret)
1017 clear_bit(STATUS_SCAN_HW, &il->status); 1017 clear_bit(S_SCAN_HW, &il->status);
1018 1018
1019 return ret; 1019 return ret;
1020} 1020}
@@ -1120,7 +1120,7 @@ static u8 il4965_count_chain_bitmap(u32 chain_bitmap)
1120void il4965_set_rxon_chain(struct il_priv *il, struct il_rxon_context *ctx) 1120void il4965_set_rxon_chain(struct il_priv *il, struct il_rxon_context *ctx)
1121{ 1121{
1122 bool is_single = il4965_is_single_rx_stream(il); 1122 bool is_single = il4965_is_single_rx_stream(il);
1123 bool is_cam = !test_bit(STATUS_POWER_PMI, &il->status); 1123 bool is_cam = !test_bit(S_POWER_PMI, &il->status);
1124 u8 idle_rx_cnt, active_rx_cnt, valid_rx_cnt; 1124 u8 idle_rx_cnt, active_rx_cnt, valid_rx_cnt;
1125 u32 active_chains; 1125 u32 active_chains;
1126 u16 rx_chain; 1126 u16 rx_chain;
@@ -1258,7 +1258,7 @@ void il4965_rx_missed_beacon_notif(struct il_priv *il,
1258 le32_to_cpu(missed_beacon->total_missed_becons), 1258 le32_to_cpu(missed_beacon->total_missed_becons),
1259 le32_to_cpu(missed_beacon->num_recvd_beacons), 1259 le32_to_cpu(missed_beacon->num_recvd_beacons),
1260 le32_to_cpu(missed_beacon->num_expected_beacons)); 1260 le32_to_cpu(missed_beacon->num_expected_beacons));
1261 if (!test_bit(STATUS_SCANNING, &il->status)) 1261 if (!test_bit(S_SCANNING, &il->status))
1262 il4965_init_sensitivity(il); 1262 il4965_init_sensitivity(il);
1263 } 1263 }
1264} 1264}
@@ -1378,7 +1378,7 @@ void il4965_rx_stats(struct il_priv *il,
1378 memcpy(&il->_4965.stats, &pkt->u.stats, 1378 memcpy(&il->_4965.stats, &pkt->u.stats,
1379 sizeof(il->_4965.stats)); 1379 sizeof(il->_4965.stats));
1380 1380
1381 set_bit(STATUS_STATISTICS, &il->status); 1381 set_bit(S_STATISTICS, &il->status);
1382 1382
1383 /* Reschedule the stats timer to occur in 1383 /* Reschedule the stats timer to occur in
1384 * REG_RECALIB_PERIOD seconds to ensure we get a 1384 * REG_RECALIB_PERIOD seconds to ensure we get a
@@ -1387,7 +1387,7 @@ void il4965_rx_stats(struct il_priv *il,
1387 mod_timer(&il->stats_periodic, jiffies + 1387 mod_timer(&il->stats_periodic, jiffies +
1388 msecs_to_jiffies(REG_RECALIB_PERIOD * 1000)); 1388 msecs_to_jiffies(REG_RECALIB_PERIOD * 1000));
1389 1389
1390 if (unlikely(!test_bit(STATUS_SCANNING, &il->status)) && 1390 if (unlikely(!test_bit(S_SCANNING, &il->status)) &&
1391 (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) { 1391 (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) {
1392 il4965_rx_calc_noise(il); 1392 il4965_rx_calc_noise(il);
1393 queue_work(il->workqueue, &il->run_time_calib_work); 1393 queue_work(il->workqueue, &il->run_time_calib_work);
@@ -3809,7 +3809,7 @@ static void il4965_bg_stats_periodic(unsigned long data)
3809{ 3809{
3810 struct il_priv *il = (struct il_priv *)data; 3810 struct il_priv *il = (struct il_priv *)data;
3811 3811
3812 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 3812 if (test_bit(S_EXIT_PENDING, &il->status))
3813 return; 3813 return;
3814 3814
3815 /* dont send host command if rf-kill is on */ 3815 /* dont send host command if rf-kill is on */
@@ -3895,17 +3895,17 @@ static void il4965_rx_card_state_notif(struct il_priv *il,
3895 il4965_perform_ct_kill_task(il); 3895 il4965_perform_ct_kill_task(il);
3896 3896
3897 if (flags & HW_CARD_DISABLED) 3897 if (flags & HW_CARD_DISABLED)
3898 set_bit(STATUS_RF_KILL_HW, &il->status); 3898 set_bit(S_RF_KILL_HW, &il->status);
3899 else 3899 else
3900 clear_bit(STATUS_RF_KILL_HW, &il->status); 3900 clear_bit(S_RF_KILL_HW, &il->status);
3901 3901
3902 if (!(flags & RXON_CARD_DISABLED)) 3902 if (!(flags & RXON_CARD_DISABLED))
3903 il_scan_cancel(il); 3903 il_scan_cancel(il);
3904 3904
3905 if ((test_bit(STATUS_RF_KILL_HW, &status) != 3905 if ((test_bit(S_RF_KILL_HW, &status) !=
3906 test_bit(STATUS_RF_KILL_HW, &il->status))) 3906 test_bit(S_RF_KILL_HW, &il->status)))
3907 wiphy_rfkill_set_hw_state(il->hw->wiphy, 3907 wiphy_rfkill_set_hw_state(il->hw->wiphy,
3908 test_bit(STATUS_RF_KILL_HW, &il->status)); 3908 test_bit(S_RF_KILL_HW, &il->status));
3909 else 3909 else
3910 wake_up(&il->wait_command_queue); 3910 wake_up(&il->wait_command_queue);
3911} 3911}
@@ -4199,11 +4199,11 @@ static void il4965_irq_tasklet(struct il_priv *il)
4199 * is killed. Hence update the killswitch state here. The 4199 * is killed. Hence update the killswitch state here. The
4200 * rfkill handler will care about restarting if needed. 4200 * rfkill handler will care about restarting if needed.
4201 */ 4201 */
4202 if (!test_bit(STATUS_ALIVE, &il->status)) { 4202 if (!test_bit(S_ALIVE, &il->status)) {
4203 if (hw_rf_kill) 4203 if (hw_rf_kill)
4204 set_bit(STATUS_RF_KILL_HW, &il->status); 4204 set_bit(S_RF_KILL_HW, &il->status);
4205 else 4205 else
4206 clear_bit(STATUS_RF_KILL_HW, &il->status); 4206 clear_bit(S_RF_KILL_HW, &il->status);
4207 wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rf_kill); 4207 wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rf_kill);
4208 } 4208 }
4209 4209
@@ -4272,7 +4272,7 @@ static void il4965_irq_tasklet(struct il_priv *il)
4272 4272
4273 /* Re-enable all interrupts */ 4273 /* Re-enable all interrupts */
4274 /* only Re-enable if disabled by irq */ 4274 /* only Re-enable if disabled by irq */
4275 if (test_bit(STATUS_INT_ENABLED, &il->status)) 4275 if (test_bit(S_INT_ENABLED, &il->status))
4276 il_enable_interrupts(il); 4276 il_enable_interrupts(il);
4277 /* Re-enable RF_KILL if it occurred */ 4277 /* Re-enable RF_KILL if it occurred */
4278 else if (handled & CSR_INT_BIT_RF_KILL) 4278 else if (handled & CSR_INT_BIT_RF_KILL)
@@ -5079,7 +5079,7 @@ static void il4965_alive_start(struct il_priv *il)
5079 5079
5080 5080
5081 /* After the ALIVE response, we can send host commands to the uCode */ 5081 /* After the ALIVE response, we can send host commands to the uCode */
5082 set_bit(STATUS_ALIVE, &il->status); 5082 set_bit(S_ALIVE, &il->status);
5083 5083
5084 /* Enable watchdog to monitor the driver tx queues */ 5084 /* Enable watchdog to monitor the driver tx queues */
5085 il_setup_watchdog(il); 5085 il_setup_watchdog(il);
@@ -5110,7 +5110,7 @@ static void il4965_alive_start(struct il_priv *il)
5110 5110
5111 il4965_reset_run_time_calib(il); 5111 il4965_reset_run_time_calib(il);
5112 5112
5113 set_bit(STATUS_READY, &il->status); 5113 set_bit(S_READY, &il->status);
5114 5114
5115 /* Configure the adapter for unassociated operation */ 5115 /* Configure the adapter for unassociated operation */
5116 il_commit_rxon(il, ctx); 5116 il_commit_rxon(il, ctx);
@@ -5141,9 +5141,9 @@ static void __il4965_down(struct il_priv *il)
5141 5141
5142 il_scan_cancel_timeout(il, 200); 5142 il_scan_cancel_timeout(il, 200);
5143 5143
5144 exit_pending = test_and_set_bit(STATUS_EXIT_PENDING, &il->status); 5144 exit_pending = test_and_set_bit(S_EXIT_PENDING, &il->status);
5145 5145
5146 /* Stop TX queues watchdog. We need to have STATUS_EXIT_PENDING bit set 5146 /* Stop TX queues watchdog. We need to have S_EXIT_PENDING bit set
5147 * to prevent rearm timer */ 5147 * to prevent rearm timer */
5148 del_timer_sync(&il->watchdog); 5148 del_timer_sync(&il->watchdog);
5149 5149
@@ -5157,7 +5157,7 @@ static void __il4965_down(struct il_priv *il)
5157 /* Wipe out the EXIT_PENDING status bit if we are not actually 5157 /* Wipe out the EXIT_PENDING status bit if we are not actually
5158 * exiting the module */ 5158 * exiting the module */
5159 if (!exit_pending) 5159 if (!exit_pending)
5160 clear_bit(STATUS_EXIT_PENDING, &il->status); 5160 clear_bit(S_EXIT_PENDING, &il->status);
5161 5161
5162 /* stop and reset the on-board processor */ 5162 /* stop and reset the on-board processor */
5163 _il_wr(il, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); 5163 _il_wr(il, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);
@@ -5174,25 +5174,25 @@ static void __il4965_down(struct il_priv *il)
5174 /* If we have not previously called il_init() then 5174 /* If we have not previously called il_init() then
5175 * clear all bits but the RF Kill bit and return */ 5175 * clear all bits but the RF Kill bit and return */
5176 if (!il_is_init(il)) { 5176 if (!il_is_init(il)) {
5177 il->status = test_bit(STATUS_RF_KILL_HW, &il->status) << 5177 il->status = test_bit(S_RF_KILL_HW, &il->status) <<
5178 STATUS_RF_KILL_HW | 5178 S_RF_KILL_HW |
5179 test_bit(STATUS_GEO_CONFIGURED, &il->status) << 5179 test_bit(S_GEO_CONFIGURED, &il->status) <<
5180 STATUS_GEO_CONFIGURED | 5180 S_GEO_CONFIGURED |
5181 test_bit(STATUS_EXIT_PENDING, &il->status) << 5181 test_bit(S_EXIT_PENDING, &il->status) <<
5182 STATUS_EXIT_PENDING; 5182 S_EXIT_PENDING;
5183 goto exit; 5183 goto exit;
5184 } 5184 }
5185 5185
5186 /* ...otherwise clear out all the status bits but the RF Kill 5186 /* ...otherwise clear out all the status bits but the RF Kill
5187 * bit and continue taking the NIC down. */ 5187 * bit and continue taking the NIC down. */
5188 il->status &= test_bit(STATUS_RF_KILL_HW, &il->status) << 5188 il->status &= test_bit(S_RF_KILL_HW, &il->status) <<
5189 STATUS_RF_KILL_HW | 5189 S_RF_KILL_HW |
5190 test_bit(STATUS_GEO_CONFIGURED, &il->status) << 5190 test_bit(S_GEO_CONFIGURED, &il->status) <<
5191 STATUS_GEO_CONFIGURED | 5191 S_GEO_CONFIGURED |
5192 test_bit(STATUS_FW_ERROR, &il->status) << 5192 test_bit(S_FW_ERROR, &il->status) <<
5193 STATUS_FW_ERROR | 5193 S_FW_ERROR |
5194 test_bit(STATUS_EXIT_PENDING, &il->status) << 5194 test_bit(S_EXIT_PENDING, &il->status) <<
5195 STATUS_EXIT_PENDING; 5195 S_EXIT_PENDING;
5196 5196
5197 il4965_txq_ctx_stop(il); 5197 il4965_txq_ctx_stop(il);
5198 il4965_rxq_stop(il); 5198 il4965_rxq_stop(il);
@@ -5283,7 +5283,7 @@ static int __il4965_up(struct il_priv *il)
5283 int i; 5283 int i;
5284 int ret; 5284 int ret;
5285 5285
5286 if (test_bit(STATUS_EXIT_PENDING, &il->status)) { 5286 if (test_bit(S_EXIT_PENDING, &il->status)) {
5287 IL_WARN("Exit pending; will not bring the NIC up\n"); 5287 IL_WARN("Exit pending; will not bring the NIC up\n");
5288 return -EIO; 5288 return -EIO;
5289 } 5289 }
@@ -5309,9 +5309,9 @@ static int __il4965_up(struct il_priv *il)
5309 /* If platform's RF_KILL switch is NOT set to KILL */ 5309 /* If platform's RF_KILL switch is NOT set to KILL */
5310 if (_il_rd(il, 5310 if (_il_rd(il,
5311 CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) 5311 CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
5312 clear_bit(STATUS_RF_KILL_HW, &il->status); 5312 clear_bit(S_RF_KILL_HW, &il->status);
5313 else 5313 else
5314 set_bit(STATUS_RF_KILL_HW, &il->status); 5314 set_bit(S_RF_KILL_HW, &il->status);
5315 5315
5316 if (il_is_rfkill(il)) { 5316 if (il_is_rfkill(il)) {
5317 wiphy_rfkill_set_hw_state(il->hw->wiphy, true); 5317 wiphy_rfkill_set_hw_state(il->hw->wiphy, true);
@@ -5372,9 +5372,9 @@ static int __il4965_up(struct il_priv *il)
5372 return 0; 5372 return 0;
5373 } 5373 }
5374 5374
5375 set_bit(STATUS_EXIT_PENDING, &il->status); 5375 set_bit(S_EXIT_PENDING, &il->status);
5376 __il4965_down(il); 5376 __il4965_down(il);
5377 clear_bit(STATUS_EXIT_PENDING, &il->status); 5377 clear_bit(S_EXIT_PENDING, &il->status);
5378 5378
5379 /* tried to restart and config the device for as long as our 5379 /* tried to restart and config the device for as long as our
5380 * patience could withstand */ 5380 * patience could withstand */
@@ -5395,7 +5395,7 @@ static void il4965_bg_init_alive_start(struct work_struct *data)
5395 container_of(data, struct il_priv, init_alive_start.work); 5395 container_of(data, struct il_priv, init_alive_start.work);
5396 5396
5397 mutex_lock(&il->mutex); 5397 mutex_lock(&il->mutex);
5398 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 5398 if (test_bit(S_EXIT_PENDING, &il->status))
5399 goto out; 5399 goto out;
5400 5400
5401 il->cfg->ops->lib->init_alive_start(il); 5401 il->cfg->ops->lib->init_alive_start(il);
@@ -5409,7 +5409,7 @@ static void il4965_bg_alive_start(struct work_struct *data)
5409 container_of(data, struct il_priv, alive_start.work); 5409 container_of(data, struct il_priv, alive_start.work);
5410 5410
5411 mutex_lock(&il->mutex); 5411 mutex_lock(&il->mutex);
5412 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 5412 if (test_bit(S_EXIT_PENDING, &il->status))
5413 goto out; 5413 goto out;
5414 5414
5415 il4965_alive_start(il); 5415 il4965_alive_start(il);
@@ -5424,8 +5424,8 @@ static void il4965_bg_run_time_calib_work(struct work_struct *work)
5424 5424
5425 mutex_lock(&il->mutex); 5425 mutex_lock(&il->mutex);
5426 5426
5427 if (test_bit(STATUS_EXIT_PENDING, &il->status) || 5427 if (test_bit(S_EXIT_PENDING, &il->status) ||
5428 test_bit(STATUS_SCANNING, &il->status)) { 5428 test_bit(S_SCANNING, &il->status)) {
5429 mutex_unlock(&il->mutex); 5429 mutex_unlock(&il->mutex);
5430 return; 5430 return;
5431 } 5431 }
@@ -5444,10 +5444,10 @@ static void il4965_bg_restart(struct work_struct *data)
5444{ 5444{
5445 struct il_priv *il = container_of(data, struct il_priv, restart); 5445 struct il_priv *il = container_of(data, struct il_priv, restart);
5446 5446
5447 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 5447 if (test_bit(S_EXIT_PENDING, &il->status))
5448 return; 5448 return;
5449 5449
5450 if (test_and_clear_bit(STATUS_FW_ERROR, &il->status)) { 5450 if (test_and_clear_bit(S_FW_ERROR, &il->status)) {
5451 mutex_lock(&il->mutex); 5451 mutex_lock(&il->mutex);
5452 il->ctx.vif = NULL; 5452 il->ctx.vif = NULL;
5453 il->is_open = 0; 5453 il->is_open = 0;
@@ -5461,7 +5461,7 @@ static void il4965_bg_restart(struct work_struct *data)
5461 il4965_down(il); 5461 il4965_down(il);
5462 5462
5463 mutex_lock(&il->mutex); 5463 mutex_lock(&il->mutex);
5464 if (test_bit(STATUS_EXIT_PENDING, &il->status)) { 5464 if (test_bit(S_EXIT_PENDING, &il->status)) {
5465 mutex_unlock(&il->mutex); 5465 mutex_unlock(&il->mutex);
5466 return; 5466 return;
5467 } 5467 }
@@ -5476,7 +5476,7 @@ static void il4965_bg_rx_replenish(struct work_struct *data)
5476 struct il_priv *il = 5476 struct il_priv *il =
5477 container_of(data, struct il_priv, rx_replenish); 5477 container_of(data, struct il_priv, rx_replenish);
5478 5478
5479 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 5479 if (test_bit(S_EXIT_PENDING, &il->status))
5480 return; 5480 return;
5481 5481
5482 mutex_lock(&il->mutex); 5482 mutex_lock(&il->mutex);
@@ -5582,10 +5582,10 @@ int il4965_mac_start(struct ieee80211_hw *hw)
5582 /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from 5582 /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from
5583 * mac80211 will not be run successfully. */ 5583 * mac80211 will not be run successfully. */
5584 ret = wait_event_timeout(il->wait_command_queue, 5584 ret = wait_event_timeout(il->wait_command_queue,
5585 test_bit(STATUS_READY, &il->status), 5585 test_bit(S_READY, &il->status),
5586 UCODE_READY_TIMEOUT); 5586 UCODE_READY_TIMEOUT);
5587 if (!ret) { 5587 if (!ret) {
5588 if (!test_bit(STATUS_READY, &il->status)) { 5588 if (!test_bit(S_READY, &il->status)) {
5589 IL_ERR("START_ALIVE timeout after %dms.\n", 5589 IL_ERR("START_ALIVE timeout after %dms.\n",
5590 jiffies_to_msecs(UCODE_READY_TIMEOUT)); 5590 jiffies_to_msecs(UCODE_READY_TIMEOUT));
5591 return -ETIMEDOUT; 5591 return -ETIMEDOUT;
@@ -5751,7 +5751,7 @@ int il4965_mac_ampdu_action(struct ieee80211_hw *hw,
5751 case IEEE80211_AMPDU_RX_STOP: 5751 case IEEE80211_AMPDU_RX_STOP:
5752 D_HT("stop Rx\n"); 5752 D_HT("stop Rx\n");
5753 ret = il4965_sta_rx_agg_stop(il, sta, tid); 5753 ret = il4965_sta_rx_agg_stop(il, sta, tid);
5754 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 5754 if (test_bit(S_EXIT_PENDING, &il->status))
5755 ret = 0; 5755 ret = 0;
5756 break; 5756 break;
5757 case IEEE80211_AMPDU_TX_START: 5757 case IEEE80211_AMPDU_TX_START:
@@ -5761,7 +5761,7 @@ int il4965_mac_ampdu_action(struct ieee80211_hw *hw,
5761 case IEEE80211_AMPDU_TX_STOP: 5761 case IEEE80211_AMPDU_TX_STOP:
5762 D_HT("stop Tx\n"); 5762 D_HT("stop Tx\n");
5763 ret = il4965_tx_agg_stop(il, vif, sta, tid); 5763 ret = il4965_tx_agg_stop(il, vif, sta, tid);
5764 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 5764 if (test_bit(S_EXIT_PENDING, &il->status))
5765 ret = 0; 5765 ret = 0;
5766 break; 5766 break;
5767 case IEEE80211_AMPDU_TX_OPERATIONAL: 5767 case IEEE80211_AMPDU_TX_OPERATIONAL:
@@ -5833,9 +5833,9 @@ void il4965_mac_channel_switch(struct ieee80211_hw *hw,
5833 if (il_is_rfkill(il)) 5833 if (il_is_rfkill(il))
5834 goto out; 5834 goto out;
5835 5835
5836 if (test_bit(STATUS_EXIT_PENDING, &il->status) || 5836 if (test_bit(S_EXIT_PENDING, &il->status) ||
5837 test_bit(STATUS_SCANNING, &il->status) || 5837 test_bit(S_SCANNING, &il->status) ||
5838 test_bit(STATUS_CHANNEL_SWITCH_PENDING, &il->status)) 5838 test_bit(S_CHANNEL_SWITCH_PENDING, &il->status))
5839 goto out; 5839 goto out;
5840 5840
5841 if (!il_is_associated_ctx(ctx)) 5841 if (!il_is_associated_ctx(ctx))
@@ -5891,10 +5891,10 @@ void il4965_mac_channel_switch(struct ieee80211_hw *hw,
5891 * at this point, staging_rxon has the 5891 * at this point, staging_rxon has the
5892 * configuration for channel switch 5892 * configuration for channel switch
5893 */ 5893 */
5894 set_bit(STATUS_CHANNEL_SWITCH_PENDING, &il->status); 5894 set_bit(S_CHANNEL_SWITCH_PENDING, &il->status);
5895 il->switch_channel = cpu_to_le16(ch); 5895 il->switch_channel = cpu_to_le16(ch);
5896 if (il->cfg->ops->lib->set_channel_switch(il, ch_switch)) { 5896 if (il->cfg->ops->lib->set_channel_switch(il, ch_switch)) {
5897 clear_bit(STATUS_CHANNEL_SWITCH_PENDING, &il->status); 5897 clear_bit(S_CHANNEL_SWITCH_PENDING, &il->status);
5898 il->switch_channel = 0; 5898 il->switch_channel = 0;
5899 ieee80211_chswitch_done(ctx->vif, false); 5899 ieee80211_chswitch_done(ctx->vif, false);
5900 } 5900 }
@@ -5968,8 +5968,8 @@ static void il4965_bg_txpower_work(struct work_struct *work)
5968 * then just return; the stats notification will 5968 * then just return; the stats notification will
5969 * kick off another scheduled work to compensate for 5969 * kick off another scheduled work to compensate for
5970 * any temperature delta we missed here. */ 5970 * any temperature delta we missed here. */
5971 if (test_bit(STATUS_EXIT_PENDING, &il->status) || 5971 if (test_bit(S_EXIT_PENDING, &il->status) ||
5972 test_bit(STATUS_SCANNING, &il->status)) 5972 test_bit(S_SCANNING, &il->status))
5973 goto out; 5973 goto out;
5974 5974
5975 /* Regardless of if we are associated, we must reconfigure the 5975 /* Regardless of if we are associated, we must reconfigure the
@@ -6376,12 +6376,12 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
6376 /* If platform's RF_KILL switch is NOT set to KILL */ 6376 /* If platform's RF_KILL switch is NOT set to KILL */
6377 if (_il_rd(il, CSR_GP_CNTRL) & 6377 if (_il_rd(il, CSR_GP_CNTRL) &
6378 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) 6378 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
6379 clear_bit(STATUS_RF_KILL_HW, &il->status); 6379 clear_bit(S_RF_KILL_HW, &il->status);
6380 else 6380 else
6381 set_bit(STATUS_RF_KILL_HW, &il->status); 6381 set_bit(S_RF_KILL_HW, &il->status);
6382 6382
6383 wiphy_rfkill_set_hw_state(il->hw->wiphy, 6383 wiphy_rfkill_set_hw_state(il->hw->wiphy,
6384 test_bit(STATUS_RF_KILL_HW, &il->status)); 6384 test_bit(S_RF_KILL_HW, &il->status));
6385 6385
6386 il_power_initialize(il); 6386 il_power_initialize(il);
6387 6387
@@ -6433,9 +6433,9 @@ static void __devexit il4965_pci_remove(struct pci_dev *pdev)
6433 6433
6434 /* ieee80211_unregister_hw call wil cause il_mac_stop to 6434 /* ieee80211_unregister_hw call wil cause il_mac_stop to
6435 * to be called and il4965_down since we are removing the device 6435 * to be called and il4965_down since we are removing the device
6436 * we need to set STATUS_EXIT_PENDING bit. 6436 * we need to set S_EXIT_PENDING bit.
6437 */ 6437 */
6438 set_bit(STATUS_EXIT_PENDING, &il->status); 6438 set_bit(S_EXIT_PENDING, &il->status);
6439 6439
6440 il_leds_exit(il); 6440 il_leds_exit(il);
6441 6441
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c
index 8199e635d537..1efe824963a8 100644
--- a/drivers/net/wireless/iwlegacy/4965.c
+++ b/drivers/net/wireless/iwlegacy/4965.c
@@ -1349,7 +1349,7 @@ static int il4965_send_tx_power(struct il_priv *il)
1349 u8 ctrl_chan_high = 0; 1349 u8 ctrl_chan_high = 0;
1350 struct il_rxon_context *ctx = &il->ctx; 1350 struct il_rxon_context *ctx = &il->ctx;
1351 1351
1352 if (WARN_ONCE(test_bit(STATUS_SCAN_HW, &il->status), 1352 if (WARN_ONCE(test_bit(S_SCAN_HW, &il->status),
1353 "TX Power requested while scanning!\n")) 1353 "TX Power requested while scanning!\n"))
1354 return -EAGAIN; 1354 return -EAGAIN;
1355 1355
@@ -1441,7 +1441,7 @@ static int il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
1441 * receive commit_rxon request 1441 * receive commit_rxon request
1442 * abort any previous channel switch if still in process 1442 * abort any previous channel switch if still in process
1443 */ 1443 */
1444 if (test_bit(STATUS_CHANNEL_SWITCH_PENDING, &il->status) && 1444 if (test_bit(S_CHANNEL_SWITCH_PENDING, &il->status) &&
1445 il->switch_channel != ctx->staging.channel) { 1445 il->switch_channel != ctx->staging.channel) {
1446 D_11H("abort channel switch on %d\n", 1446 D_11H("abort channel switch on %d\n",
1447 le16_to_cpu(il->switch_channel)); 1447 le16_to_cpu(il->switch_channel));
@@ -1673,7 +1673,7 @@ static int il4965_hw_get_temperature(struct il_priv *il)
1673 s32 R1, R2, R3; 1673 s32 R1, R2, R3;
1674 u32 R4; 1674 u32 R4;
1675 1675
1676 if (test_bit(STATUS_TEMPERATURE, &il->status) && 1676 if (test_bit(S_TEMPERATURE, &il->status) &&
1677 (il->_4965.stats.flag & 1677 (il->_4965.stats.flag &
1678 STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { 1678 STATISTICS_REPLY_FLG_HT40_MODE_MSK)) {
1679 D_TEMP("Running HT40 temperature calibration\n"); 1679 D_TEMP("Running HT40 temperature calibration\n");
@@ -1696,7 +1696,7 @@ static int il4965_hw_get_temperature(struct il_priv *il)
1696 * with an updated temperature, use R4 provided to us in the 1696 * with an updated temperature, use R4 provided to us in the
1697 * "initialize" ALIVE response. 1697 * "initialize" ALIVE response.
1698 */ 1698 */
1699 if (!test_bit(STATUS_TEMPERATURE, &il->status)) 1699 if (!test_bit(S_TEMPERATURE, &il->status))
1700 vt = sign_extend32(R4, 23); 1700 vt = sign_extend32(R4, 23);
1701 else 1701 else
1702 vt = sign_extend32(le32_to_cpu(il->_4965.stats. 1702 vt = sign_extend32(le32_to_cpu(il->_4965.stats.
@@ -1737,7 +1737,7 @@ static int il4965_is_temp_calib_needed(struct il_priv *il)
1737{ 1737{
1738 int temp_diff; 1738 int temp_diff;
1739 1739
1740 if (!test_bit(STATUS_STATISTICS, &il->status)) { 1740 if (!test_bit(S_STATISTICS, &il->status)) {
1741 D_TEMP("Temperature not updated -- no stats.\n"); 1741 D_TEMP("Temperature not updated -- no stats.\n");
1742 return 0; 1742 return 0;
1743 } 1743 }
@@ -1784,10 +1784,10 @@ static void il4965_temperature_calib(struct il_priv *il)
1784 } 1784 }
1785 1785
1786 il->temperature = temp; 1786 il->temperature = temp;
1787 set_bit(STATUS_TEMPERATURE, &il->status); 1787 set_bit(S_TEMPERATURE, &il->status);
1788 1788
1789 if (!il->disable_tx_power_cal && 1789 if (!il->disable_tx_power_cal &&
1790 unlikely(!test_bit(STATUS_SCANNING, &il->status)) && 1790 unlikely(!test_bit(S_SCANNING, &il->status)) &&
1791 il4965_is_temp_calib_needed(il)) 1791 il4965_is_temp_calib_needed(il))
1792 queue_work(il->workqueue, &il->txpower_work); 1792 queue_work(il->workqueue, &il->txpower_work);
1793} 1793}
@@ -2179,7 +2179,7 @@ static void il4965_post_associate(struct il_priv *il)
2179 if (!vif || !il->is_open) 2179 if (!vif || !il->is_open)
2180 return; 2180 return;
2181 2181
2182 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 2182 if (test_bit(S_EXIT_PENDING, &il->status))
2183 return; 2183 return;
2184 2184
2185 il_scan_cancel_timeout(il, 200); 2185 il_scan_cancel_timeout(il, 200);
@@ -2254,7 +2254,7 @@ static void il4965_config_ap(struct il_priv *il)
2254 2254
2255 lockdep_assert_held(&il->mutex); 2255 lockdep_assert_held(&il->mutex);
2256 2256
2257 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 2257 if (test_bit(S_EXIT_PENDING, &il->status))
2258 return; 2258 return;
2259 2259
2260 /* The following should be done only at AP bring up */ 2260 /* The following should be done only at AP bring up */
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c
index bd222f50d26c..ba7ee4b4528f 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -165,7 +165,7 @@ int il_init_geos(struct il_priv *il)
165 if (il->bands[IEEE80211_BAND_2GHZ].n_bitrates || 165 if (il->bands[IEEE80211_BAND_2GHZ].n_bitrates ||
166 il->bands[IEEE80211_BAND_5GHZ].n_bitrates) { 166 il->bands[IEEE80211_BAND_5GHZ].n_bitrates) {
167 D_INFO("Geography modes already initialized.\n"); 167 D_INFO("Geography modes already initialized.\n");
168 set_bit(STATUS_GEO_CONFIGURED, &il->status); 168 set_bit(S_GEO_CONFIGURED, &il->status);
169 return 0; 169 return 0;
170 } 170 }
171 171
@@ -264,7 +264,7 @@ int il_init_geos(struct il_priv *il)
264 il->bands[IEEE80211_BAND_2GHZ].n_channels, 264 il->bands[IEEE80211_BAND_2GHZ].n_channels,
265 il->bands[IEEE80211_BAND_5GHZ].n_channels); 265 il->bands[IEEE80211_BAND_5GHZ].n_channels);
266 266
267 set_bit(STATUS_GEO_CONFIGURED, &il->status); 267 set_bit(S_GEO_CONFIGURED, &il->status);
268 268
269 return 0; 269 return 0;
270} 270}
@@ -277,7 +277,7 @@ void il_free_geos(struct il_priv *il)
277{ 277{
278 kfree(il->ieee_channels); 278 kfree(il->ieee_channels);
279 kfree(il->ieee_rates); 279 kfree(il->ieee_rates);
280 clear_bit(STATUS_GEO_CONFIGURED, &il->status); 280 clear_bit(S_GEO_CONFIGURED, &il->status);
281} 281}
282EXPORT_SYMBOL(il_free_geos); 282EXPORT_SYMBOL(il_free_geos);
283 283
@@ -839,10 +839,10 @@ void il_chswitch_done(struct il_priv *il, bool is_success)
839{ 839{
840 struct il_rxon_context *ctx = &il->ctx; 840 struct il_rxon_context *ctx = &il->ctx;
841 841
842 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 842 if (test_bit(S_EXIT_PENDING, &il->status))
843 return; 843 return;
844 844
845 if (test_and_clear_bit(STATUS_CHANNEL_SWITCH_PENDING, &il->status)) 845 if (test_and_clear_bit(S_CHANNEL_SWITCH_PENDING, &il->status))
846 ieee80211_chswitch_done(ctx->vif, is_success); 846 ieee80211_chswitch_done(ctx->vif, is_success);
847} 847}
848EXPORT_SYMBOL(il_chswitch_done); 848EXPORT_SYMBOL(il_chswitch_done);
@@ -855,7 +855,7 @@ void il_rx_csa(struct il_priv *il, struct il_rx_buf *rxb)
855 struct il_rxon_context *ctx = &il->ctx; 855 struct il_rxon_context *ctx = &il->ctx;
856 struct il_rxon_cmd *rxon = (void *)&ctx->active; 856 struct il_rxon_cmd *rxon = (void *)&ctx->active;
857 857
858 if (!test_bit(STATUS_CHANNEL_SWITCH_PENDING, &il->status)) 858 if (!test_bit(S_CHANNEL_SWITCH_PENDING, &il->status))
859 return; 859 return;
860 860
861 if (!le32_to_cpu(csa->status) && csa->channel == il->switch_channel) { 861 if (!le32_to_cpu(csa->status) && csa->channel == il->switch_channel) {
@@ -903,10 +903,10 @@ EXPORT_SYMBOL(il_print_rx_config_cmd);
903void il_irq_handle_error(struct il_priv *il) 903void il_irq_handle_error(struct il_priv *il)
904{ 904{
905 /* Set the FW error flag -- cleared on il_down */ 905 /* Set the FW error flag -- cleared on il_down */
906 set_bit(STATUS_FW_ERROR, &il->status); 906 set_bit(S_FW_ERROR, &il->status);
907 907
908 /* Cancel currently queued command. */ 908 /* Cancel currently queued command. */
909 clear_bit(STATUS_HCMD_ACTIVE, &il->status); 909 clear_bit(S_HCMD_ACTIVE, &il->status);
910 910
911 IL_ERR("Loaded firmware version: %s\n", 911 IL_ERR("Loaded firmware version: %s\n",
912 il->hw->wiphy->fw_version); 912 il->hw->wiphy->fw_version);
@@ -924,9 +924,9 @@ void il_irq_handle_error(struct il_priv *il)
924 924
925 /* Keep the restart process from trying to send host 925 /* Keep the restart process from trying to send host
926 * commands by clearing the INIT status bit */ 926 * commands by clearing the INIT status bit */
927 clear_bit(STATUS_READY, &il->status); 927 clear_bit(S_READY, &il->status);
928 928
929 if (!test_bit(STATUS_EXIT_PENDING, &il->status)) { 929 if (!test_bit(S_EXIT_PENDING, &il->status)) {
930 IL_DBG(IL_DL_FW_ERRORS, 930 IL_DBG(IL_DL_FW_ERRORS,
931 "Restarting adapter due to uCode error.\n"); 931 "Restarting adapter due to uCode error.\n");
932 932
@@ -1127,7 +1127,7 @@ int il_set_tx_power(struct il_priv *il, s8 tx_power, bool force)
1127 il->tx_power_next = tx_power; 1127 il->tx_power_next = tx_power;
1128 1128
1129 /* do not set tx power when scanning or channel changing */ 1129 /* do not set tx power when scanning or channel changing */
1130 defer = test_bit(STATUS_SCANNING, &il->status) || 1130 defer = test_bit(S_SCANNING, &il->status) ||
1131 memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging)); 1131 memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging));
1132 if (defer && !force) { 1132 if (defer && !force) {
1133 D_INFO("Deferring tx power set\n"); 1133 D_INFO("Deferring tx power set\n");
@@ -1678,7 +1678,7 @@ int il_force_reset(struct il_priv *il, bool external)
1678{ 1678{
1679 struct il_force_reset *force_reset; 1679 struct il_force_reset *force_reset;
1680 1680
1681 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 1681 if (test_bit(S_EXIT_PENDING, &il->status))
1682 return -EINVAL; 1682 return -EINVAL;
1683 1683
1684 force_reset = &il->force_reset; 1684 force_reset = &il->force_reset;
@@ -1713,13 +1713,13 @@ int il_force_reset(struct il_priv *il, bool external)
1713 IL_ERR("On demand firmware reload\n"); 1713 IL_ERR("On demand firmware reload\n");
1714 1714
1715 /* Set the FW error flag -- cleared on il_down */ 1715 /* Set the FW error flag -- cleared on il_down */
1716 set_bit(STATUS_FW_ERROR, &il->status); 1716 set_bit(S_FW_ERROR, &il->status);
1717 wake_up(&il->wait_command_queue); 1717 wake_up(&il->wait_command_queue);
1718 /* 1718 /*
1719 * Keep the restart process from trying to send host 1719 * Keep the restart process from trying to send host
1720 * commands by clearing the INIT status bit 1720 * commands by clearing the INIT status bit
1721 */ 1721 */
1722 clear_bit(STATUS_READY, &il->status); 1722 clear_bit(S_READY, &il->status);
1723 queue_work(il->workqueue, &il->restart); 1723 queue_work(il->workqueue, &il->restart);
1724 1724
1725 return 0; 1725 return 0;
@@ -1826,7 +1826,7 @@ void il_bg_watchdog(unsigned long data)
1826 int cnt; 1826 int cnt;
1827 unsigned long timeout; 1827 unsigned long timeout;
1828 1828
1829 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 1829 if (test_bit(S_EXIT_PENDING, &il->status))
1830 return; 1830 return;
1831 1831
1832 timeout = il->cfg->base_params->wd_timeout; 1832 timeout = il->cfg->base_params->wd_timeout;
@@ -1960,9 +1960,9 @@ int il_pci_resume(struct device *device)
1960 hw_rfkill = true; 1960 hw_rfkill = true;
1961 1961
1962 if (hw_rfkill) 1962 if (hw_rfkill)
1963 set_bit(STATUS_RF_KILL_HW, &il->status); 1963 set_bit(S_RF_KILL_HW, &il->status);
1964 else 1964 else
1965 clear_bit(STATUS_RF_KILL_HW, &il->status); 1965 clear_bit(S_RF_KILL_HW, &il->status);
1966 1966
1967 wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rfkill); 1967 wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rfkill);
1968 1968
@@ -1985,7 +1985,7 @@ EXPORT_SYMBOL(il_pm_ops);
1985static void 1985static void
1986il_update_qos(struct il_priv *il, struct il_rxon_context *ctx) 1986il_update_qos(struct il_priv *il, struct il_rxon_context *ctx)
1987{ 1987{
1988 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 1988 if (test_bit(S_EXIT_PENDING, &il->status))
1989 return; 1989 return;
1990 1990
1991 if (!ctx->is_active) 1991 if (!ctx->is_active)
@@ -2034,7 +2034,7 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
2034 D_MAC80211("enter to channel %d changed 0x%X\n", 2034 D_MAC80211("enter to channel %d changed 0x%X\n",
2035 channel->hw_value, changed); 2035 channel->hw_value, changed);
2036 2036
2037 if (unlikely(test_bit(STATUS_SCANNING, &il->status))) { 2037 if (unlikely(test_bit(S_SCANNING, &il->status))) {
2038 scan_active = 1; 2038 scan_active = 1;
2039 D_MAC80211("scan active\n"); 2039 D_MAC80211("scan active\n");
2040 } 2040 }
@@ -2566,7 +2566,7 @@ unplugged:
2566none: 2566none:
2567 /* re-enable interrupts here since we don't have anything to service. */ 2567 /* re-enable interrupts here since we don't have anything to service. */
2568 /* only Re-enable if disabled by irq */ 2568 /* only Re-enable if disabled by irq */
2569 if (test_bit(STATUS_INT_ENABLED, &il->status)) 2569 if (test_bit(S_INT_ENABLED, &il->status))
2570 il_enable_interrupts(il); 2570 il_enable_interrupts(il);
2571 spin_unlock_irqrestore(&il->lock, flags); 2571 spin_unlock_irqrestore(&il->lock, flags);
2572 return IRQ_NONE; 2572 return IRQ_NONE;
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.h b/drivers/net/wireless/iwlegacy/iwl-core.h
index 833376171207..5b2883f645ab 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.h
+++ b/drivers/net/wireless/iwlegacy/iwl-core.h
@@ -533,47 +533,47 @@ void il_free_geos(struct il_priv *il);
533 533
534/*************** DRIVER STATUS FUNCTIONS *****/ 534/*************** DRIVER STATUS FUNCTIONS *****/
535 535
536#define STATUS_HCMD_ACTIVE 0 /* host command in progress */ 536#define S_HCMD_ACTIVE 0 /* host command in progress */
537/* 1 is unused (used to be STATUS_HCMD_SYNC_ACTIVE) */ 537/* 1 is unused (used to be S_HCMD_SYNC_ACTIVE) */
538#define STATUS_INT_ENABLED 2 538#define S_INT_ENABLED 2
539#define STATUS_RF_KILL_HW 3 539#define S_RF_KILL_HW 3
540#define STATUS_CT_KILL 4 540#define S_CT_KILL 4
541#define STATUS_INIT 5 541#define S_INIT 5
542#define STATUS_ALIVE 6 542#define S_ALIVE 6
543#define STATUS_READY 7 543#define S_READY 7
544#define STATUS_TEMPERATURE 8 544#define S_TEMPERATURE 8
545#define STATUS_GEO_CONFIGURED 9 545#define S_GEO_CONFIGURED 9
546#define STATUS_EXIT_PENDING 10 546#define S_EXIT_PENDING 10
547#define STATUS_STATISTICS 12 547#define S_STATISTICS 12
548#define STATUS_SCANNING 13 548#define S_SCANNING 13
549#define STATUS_SCAN_ABORTING 14 549#define S_SCAN_ABORTING 14
550#define STATUS_SCAN_HW 15 550#define S_SCAN_HW 15
551#define STATUS_POWER_PMI 16 551#define S_POWER_PMI 16
552#define STATUS_FW_ERROR 17 552#define S_FW_ERROR 17
553#define STATUS_CHANNEL_SWITCH_PENDING 18 553#define S_CHANNEL_SWITCH_PENDING 18
554 554
555static inline int il_is_ready(struct il_priv *il) 555static inline int il_is_ready(struct il_priv *il)
556{ 556{
557 /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are 557 /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are
558 * set but EXIT_PENDING is not */ 558 * set but EXIT_PENDING is not */
559 return test_bit(STATUS_READY, &il->status) && 559 return test_bit(S_READY, &il->status) &&
560 test_bit(STATUS_GEO_CONFIGURED, &il->status) && 560 test_bit(S_GEO_CONFIGURED, &il->status) &&
561 !test_bit(STATUS_EXIT_PENDING, &il->status); 561 !test_bit(S_EXIT_PENDING, &il->status);
562} 562}
563 563
564static inline int il_is_alive(struct il_priv *il) 564static inline int il_is_alive(struct il_priv *il)
565{ 565{
566 return test_bit(STATUS_ALIVE, &il->status); 566 return test_bit(S_ALIVE, &il->status);
567} 567}
568 568
569static inline int il_is_init(struct il_priv *il) 569static inline int il_is_init(struct il_priv *il)
570{ 570{
571 return test_bit(STATUS_INIT, &il->status); 571 return test_bit(S_INIT, &il->status);
572} 572}
573 573
574static inline int il_is_rfkill_hw(struct il_priv *il) 574static inline int il_is_rfkill_hw(struct il_priv *il)
575{ 575{
576 return test_bit(STATUS_RF_KILL_HW, &il->status); 576 return test_bit(S_RF_KILL_HW, &il->status);
577} 577}
578 578
579static inline int il_is_rfkill(struct il_priv *il) 579static inline int il_is_rfkill(struct il_priv *il)
@@ -583,7 +583,7 @@ static inline int il_is_rfkill(struct il_priv *il)
583 583
584static inline int il_is_ctkill(struct il_priv *il) 584static inline int il_is_ctkill(struct il_priv *il)
585{ 585{
586 return test_bit(STATUS_CT_KILL, &il->status); 586 return test_bit(S_CT_KILL, &il->status);
587} 587}
588 588
589static inline int il_is_ready_rf(struct il_priv *il) 589static inline int il_is_ready_rf(struct il_priv *il)
diff --git a/drivers/net/wireless/iwlegacy/iwl-debugfs.c b/drivers/net/wireless/iwlegacy/iwl-debugfs.c
index 8448db7d8f39..114922bc83d2 100644
--- a/drivers/net/wireless/iwlegacy/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlegacy/iwl-debugfs.c
@@ -402,7 +402,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf,
402 char *buf; 402 char *buf;
403 ssize_t ret; 403 ssize_t ret;
404 404
405 if (!test_bit(STATUS_GEO_CONFIGURED, &il->status)) 405 if (!test_bit(S_GEO_CONFIGURED, &il->status))
406 return -EAGAIN; 406 return -EAGAIN;
407 407
408 buf = kzalloc(bufsz, GFP_KERNEL); 408 buf = kzalloc(bufsz, GFP_KERNEL);
@@ -471,38 +471,38 @@ static ssize_t il_dbgfs_status_read(struct file *file,
471 int pos = 0; 471 int pos = 0;
472 const size_t bufsz = sizeof(buf); 472 const size_t bufsz = sizeof(buf);
473 473
474 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_HCMD_ACTIVE:\t %d\n", 474 pos += scnprintf(buf + pos, bufsz - pos, "S_HCMD_ACTIVE:\t %d\n",
475 test_bit(STATUS_HCMD_ACTIVE, &il->status)); 475 test_bit(S_HCMD_ACTIVE, &il->status));
476 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_INT_ENABLED:\t %d\n", 476 pos += scnprintf(buf + pos, bufsz - pos, "S_INT_ENABLED:\t %d\n",
477 test_bit(STATUS_INT_ENABLED, &il->status)); 477 test_bit(S_INT_ENABLED, &il->status));
478 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_RF_KILL_HW:\t %d\n", 478 pos += scnprintf(buf + pos, bufsz - pos, "S_RF_KILL_HW:\t %d\n",
479 test_bit(STATUS_RF_KILL_HW, &il->status)); 479 test_bit(S_RF_KILL_HW, &il->status));
480 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_CT_KILL:\t\t %d\n", 480 pos += scnprintf(buf + pos, bufsz - pos, "S_CT_KILL:\t\t %d\n",
481 test_bit(STATUS_CT_KILL, &il->status)); 481 test_bit(S_CT_KILL, &il->status));
482 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_INIT:\t\t %d\n", 482 pos += scnprintf(buf + pos, bufsz - pos, "S_INIT:\t\t %d\n",
483 test_bit(STATUS_INIT, &il->status)); 483 test_bit(S_INIT, &il->status));
484 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_ALIVE:\t\t %d\n", 484 pos += scnprintf(buf + pos, bufsz - pos, "S_ALIVE:\t\t %d\n",
485 test_bit(STATUS_ALIVE, &il->status)); 485 test_bit(S_ALIVE, &il->status));
486 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_READY:\t\t %d\n", 486 pos += scnprintf(buf + pos, bufsz - pos, "S_READY:\t\t %d\n",
487 test_bit(STATUS_READY, &il->status)); 487 test_bit(S_READY, &il->status));
488 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_TEMPERATURE:\t %d\n", 488 pos += scnprintf(buf + pos, bufsz - pos, "S_TEMPERATURE:\t %d\n",
489 test_bit(STATUS_TEMPERATURE, &il->status)); 489 test_bit(S_TEMPERATURE, &il->status));
490 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_GEO_CONFIGURED:\t %d\n", 490 pos += scnprintf(buf + pos, bufsz - pos, "S_GEO_CONFIGURED:\t %d\n",
491 test_bit(STATUS_GEO_CONFIGURED, &il->status)); 491 test_bit(S_GEO_CONFIGURED, &il->status));
492 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_EXIT_PENDING:\t %d\n", 492 pos += scnprintf(buf + pos, bufsz - pos, "S_EXIT_PENDING:\t %d\n",
493 test_bit(STATUS_EXIT_PENDING, &il->status)); 493 test_bit(S_EXIT_PENDING, &il->status));
494 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_STATISTICS:\t %d\n", 494 pos += scnprintf(buf + pos, bufsz - pos, "S_STATISTICS:\t %d\n",
495 test_bit(STATUS_STATISTICS, &il->status)); 495 test_bit(S_STATISTICS, &il->status));
496 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_SCANNING:\t %d\n", 496 pos += scnprintf(buf + pos, bufsz - pos, "S_SCANNING:\t %d\n",
497 test_bit(STATUS_SCANNING, &il->status)); 497 test_bit(S_SCANNING, &il->status));
498 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_SCAN_ABORTING:\t %d\n", 498 pos += scnprintf(buf + pos, bufsz - pos, "S_SCAN_ABORTING:\t %d\n",
499 test_bit(STATUS_SCAN_ABORTING, &il->status)); 499 test_bit(S_SCAN_ABORTING, &il->status));
500 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_SCAN_HW:\t\t %d\n", 500 pos += scnprintf(buf + pos, bufsz - pos, "S_SCAN_HW:\t\t %d\n",
501 test_bit(STATUS_SCAN_HW, &il->status)); 501 test_bit(S_SCAN_HW, &il->status));
502 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_POWER_PMI:\t %d\n", 502 pos += scnprintf(buf + pos, bufsz - pos, "S_POWER_PMI:\t %d\n",
503 test_bit(STATUS_POWER_PMI, &il->status)); 503 test_bit(S_POWER_PMI, &il->status));
504 pos += scnprintf(buf + pos, bufsz - pos, "STATUS_FW_ERROR:\t %d\n", 504 pos += scnprintf(buf + pos, bufsz - pos, "S_FW_ERROR:\t %d\n",
505 test_bit(STATUS_FW_ERROR, &il->status)); 505 test_bit(S_FW_ERROR, &il->status));
506 return simple_read_from_buffer(user_buf, count, ppos, buf, pos); 506 return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
507} 507}
508 508
diff --git a/drivers/net/wireless/iwlegacy/iwl-hcmd.c b/drivers/net/wireless/iwlegacy/iwl-hcmd.c
index 0b11f2f549ca..4762a0e8c88f 100644
--- a/drivers/net/wireless/iwlegacy/iwl-hcmd.c
+++ b/drivers/net/wireless/iwlegacy/iwl-hcmd.c
@@ -128,7 +128,7 @@ il_send_cmd_async(struct il_priv *il, struct il_host_cmd *cmd)
128 if (!cmd->callback) 128 if (!cmd->callback)
129 cmd->callback = il_generic_cmd_callback; 129 cmd->callback = il_generic_cmd_callback;
130 130
131 if (test_bit(STATUS_EXIT_PENDING, &il->status)) 131 if (test_bit(S_EXIT_PENDING, &il->status))
132 return -EBUSY; 132 return -EBUSY;
133 133
134 ret = il_enqueue_hcmd(il, cmd); 134 ret = il_enqueue_hcmd(il, cmd);
@@ -155,7 +155,7 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
155 D_INFO("Attempting to send sync command %s\n", 155 D_INFO("Attempting to send sync command %s\n",
156 il_get_cmd_string(cmd->id)); 156 il_get_cmd_string(cmd->id));
157 157
158 set_bit(STATUS_HCMD_ACTIVE, &il->status); 158 set_bit(S_HCMD_ACTIVE, &il->status);
159 D_INFO("Setting HCMD_ACTIVE for command %s\n", 159 D_INFO("Setting HCMD_ACTIVE for command %s\n",
160 il_get_cmd_string(cmd->id)); 160 il_get_cmd_string(cmd->id));
161 161
@@ -168,16 +168,16 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
168 } 168 }
169 169
170 ret = wait_event_timeout(il->wait_command_queue, 170 ret = wait_event_timeout(il->wait_command_queue,
171 !test_bit(STATUS_HCMD_ACTIVE, &il->status), 171 !test_bit(S_HCMD_ACTIVE, &il->status),
172 HOST_COMPLETE_TIMEOUT); 172 HOST_COMPLETE_TIMEOUT);
173 if (!ret) { 173 if (!ret) {
174 if (test_bit(STATUS_HCMD_ACTIVE, &il->status)) { 174 if (test_bit(S_HCMD_ACTIVE, &il->status)) {
175 IL_ERR( 175 IL_ERR(
176 "Error sending %s: time out after %dms.\n", 176 "Error sending %s: time out after %dms.\n",
177 il_get_cmd_string(cmd->id), 177 il_get_cmd_string(cmd->id),
178 jiffies_to_msecs(HOST_COMPLETE_TIMEOUT)); 178 jiffies_to_msecs(HOST_COMPLETE_TIMEOUT));
179 179
180 clear_bit(STATUS_HCMD_ACTIVE, &il->status); 180 clear_bit(S_HCMD_ACTIVE, &il->status);
181 D_INFO( 181 D_INFO(
182 "Clearing HCMD_ACTIVE for command %s\n", 182 "Clearing HCMD_ACTIVE for command %s\n",
183 il_get_cmd_string(cmd->id)); 183 il_get_cmd_string(cmd->id));
@@ -186,13 +186,13 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
186 } 186 }
187 } 187 }
188 188
189 if (test_bit(STATUS_RF_KILL_HW, &il->status)) { 189 if (test_bit(S_RF_KILL_HW, &il->status)) {
190 IL_ERR("Command %s aborted: RF KILL Switch\n", 190 IL_ERR("Command %s aborted: RF KILL Switch\n",
191 il_get_cmd_string(cmd->id)); 191 il_get_cmd_string(cmd->id));
192 ret = -ECANCELED; 192 ret = -ECANCELED;
193 goto fail; 193 goto fail;
194 } 194 }
195 if (test_bit(STATUS_FW_ERROR, &il->status)) { 195 if (test_bit(S_FW_ERROR, &il->status)) {
196 IL_ERR("Command %s failed: FW Error\n", 196 IL_ERR("Command %s failed: FW Error\n",
197 il_get_cmd_string(cmd->id)); 197 il_get_cmd_string(cmd->id));
198 ret = -EIO; 198 ret = -EIO;
diff --git a/drivers/net/wireless/iwlegacy/iwl-helpers.h b/drivers/net/wireless/iwlegacy/iwl-helpers.h
index 5fcb23e8f5a6..0e64003274f4 100644
--- a/drivers/net/wireless/iwlegacy/iwl-helpers.h
+++ b/drivers/net/wireless/iwlegacy/iwl-helpers.h
@@ -146,7 +146,7 @@ static inline void il_stop_queue(struct il_priv *il,
146 146
147static inline void il_disable_interrupts(struct il_priv *il) 147static inline void il_disable_interrupts(struct il_priv *il)
148{ 148{
149 clear_bit(STATUS_INT_ENABLED, &il->status); 149 clear_bit(S_INT_ENABLED, &il->status);
150 150
151 /* disable interrupts from uCode/NIC to host */ 151 /* disable interrupts from uCode/NIC to host */
152 _il_wr(il, CSR_INT_MASK, 0x00000000); 152 _il_wr(il, CSR_INT_MASK, 0x00000000);
@@ -167,7 +167,7 @@ static inline void il_enable_rfkill_int(struct il_priv *il)
167static inline void il_enable_interrupts(struct il_priv *il) 167static inline void il_enable_interrupts(struct il_priv *il)
168{ 168{
169 D_ISR("Enabling interrupts\n"); 169 D_ISR("Enabling interrupts\n");
170 set_bit(STATUS_INT_ENABLED, &il->status); 170 set_bit(S_INT_ENABLED, &il->status);
171 _il_wr(il, CSR_INT_MASK, il->inta_mask); 171 _il_wr(il, CSR_INT_MASK, il->inta_mask);
172} 172}
173 173
diff --git a/drivers/net/wireless/iwlegacy/iwl-led.c b/drivers/net/wireless/iwlegacy/iwl-led.c
index 3652cdc1770e..a840c2e54764 100644
--- a/drivers/net/wireless/iwlegacy/iwl-led.c
+++ b/drivers/net/wireless/iwlegacy/iwl-led.c
@@ -107,7 +107,7 @@ static int il_led_cmd(struct il_priv *il,
107 }; 107 };
108 int ret; 108 int ret;
109 109
110 if (!test_bit(STATUS_READY, &il->status)) 110 if (!test_bit(S_READY, &il->status))
111 return -EBUSY; 111 return -EBUSY;
112 112
113 if (il->blink_on == on && il->blink_off == off) 113 if (il->blink_on == on && il->blink_off == off)
diff --git a/drivers/net/wireless/iwlegacy/iwl-power.c b/drivers/net/wireless/iwlegacy/iwl-power.c
index 051623ab1147..c66a0f77dc32 100644
--- a/drivers/net/wireless/iwlegacy/iwl-power.c
+++ b/drivers/net/wireless/iwlegacy/iwl-power.c
@@ -113,18 +113,18 @@ il_power_set_mode(struct il_priv *il, struct il_powertable_cmd *cmd,
113 113
114 /* scan complete use sleep_power_next, need to be updated */ 114 /* scan complete use sleep_power_next, need to be updated */
115 memcpy(&il->power_data.sleep_cmd_next, cmd, sizeof(*cmd)); 115 memcpy(&il->power_data.sleep_cmd_next, cmd, sizeof(*cmd));
116 if (test_bit(STATUS_SCANNING, &il->status) && !force) { 116 if (test_bit(S_SCANNING, &il->status) && !force) {
117 D_INFO("Defer power set mode while scanning\n"); 117 D_INFO("Defer power set mode while scanning\n");
118 return 0; 118 return 0;
119 } 119 }
120 120
121 if (cmd->flags & IL_POWER_DRIVER_ALLOW_SLEEP_MSK) 121 if (cmd->flags & IL_POWER_DRIVER_ALLOW_SLEEP_MSK)
122 set_bit(STATUS_POWER_PMI, &il->status); 122 set_bit(S_POWER_PMI, &il->status);
123 123
124 ret = il_set_power(il, cmd); 124 ret = il_set_power(il, cmd);
125 if (!ret) { 125 if (!ret) {
126 if (!(cmd->flags & IL_POWER_DRIVER_ALLOW_SLEEP_MSK)) 126 if (!(cmd->flags & IL_POWER_DRIVER_ALLOW_SLEEP_MSK))
127 clear_bit(STATUS_POWER_PMI, &il->status); 127 clear_bit(S_POWER_PMI, &il->status);
128 128
129 if (il->cfg->ops->lib->update_chain_flags && update_chains) 129 if (il->cfg->ops->lib->update_chain_flags && update_chains)
130 il->cfg->ops->lib->update_chain_flags(il); 130 il->cfg->ops->lib->update_chain_flags(il);
diff --git a/drivers/net/wireless/iwlegacy/iwl-rx.c b/drivers/net/wireless/iwlegacy/iwl-rx.c
index 58d19c155a3d..76f2361031bb 100644
--- a/drivers/net/wireless/iwlegacy/iwl-rx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-rx.c
@@ -137,7 +137,7 @@ il_rx_queue_update_write_ptr(struct il_priv *il,
137 goto exit_unlock; 137 goto exit_unlock;
138 138
139 /* If power-saving is in use, make sure device is awake */ 139 /* If power-saving is in use, make sure device is awake */
140 if (test_bit(STATUS_POWER_PMI, &il->status)) { 140 if (test_bit(S_POWER_PMI, &il->status)) {
141 reg = _il_rd(il, CSR_UCODE_DRV_GP1); 141 reg = _il_rd(il, CSR_UCODE_DRV_GP1);
142 142
143 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { 143 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c
index 18226d1988a7..6d20f2b64c3e 100644
--- a/drivers/net/wireless/iwlegacy/iwl-scan.c
+++ b/drivers/net/wireless/iwlegacy/iwl-scan.c
@@ -66,11 +66,11 @@ static int il_send_scan_abort(struct il_priv *il)
66 /* Exit instantly with error when device is not ready 66 /* Exit instantly with error when device is not ready
67 * to receive scan abort command or it does not perform 67 * to receive scan abort command or it does not perform
68 * hardware scan currently */ 68 * hardware scan currently */
69 if (!test_bit(STATUS_READY, &il->status) || 69 if (!test_bit(S_READY, &il->status) ||
70 !test_bit(STATUS_GEO_CONFIGURED, &il->status) || 70 !test_bit(S_GEO_CONFIGURED, &il->status) ||
71 !test_bit(STATUS_SCAN_HW, &il->status) || 71 !test_bit(S_SCAN_HW, &il->status) ||
72 test_bit(STATUS_FW_ERROR, &il->status) || 72 test_bit(S_FW_ERROR, &il->status) ||
73 test_bit(STATUS_EXIT_PENDING, &il->status)) 73 test_bit(S_EXIT_PENDING, &il->status))
74 return -EIO; 74 return -EIO;
75 75
76 ret = il_send_cmd_sync(il, &cmd); 76 ret = il_send_cmd_sync(il, &cmd);
@@ -109,15 +109,15 @@ void il_force_scan_end(struct il_priv *il)
109{ 109{
110 lockdep_assert_held(&il->mutex); 110 lockdep_assert_held(&il->mutex);
111 111
112 if (!test_bit(STATUS_SCANNING, &il->status)) { 112 if (!test_bit(S_SCANNING, &il->status)) {
113 D_SCAN("Forcing scan end while not scanning\n"); 113 D_SCAN("Forcing scan end while not scanning\n");
114 return; 114 return;
115 } 115 }
116 116
117 D_SCAN("Forcing scan end\n"); 117 D_SCAN("Forcing scan end\n");
118 clear_bit(STATUS_SCANNING, &il->status); 118 clear_bit(S_SCANNING, &il->status);
119 clear_bit(STATUS_SCAN_HW, &il->status); 119 clear_bit(S_SCAN_HW, &il->status);
120 clear_bit(STATUS_SCAN_ABORTING, &il->status); 120 clear_bit(S_SCAN_ABORTING, &il->status);
121 il_complete_scan(il, true); 121 il_complete_scan(il, true);
122} 122}
123 123
@@ -127,12 +127,12 @@ static void il_do_scan_abort(struct il_priv *il)
127 127
128 lockdep_assert_held(&il->mutex); 128 lockdep_assert_held(&il->mutex);
129 129
130 if (!test_bit(STATUS_SCANNING, &il->status)) { 130 if (!test_bit(S_SCANNING, &il->status)) {
131 D_SCAN("Not performing scan to abort\n"); 131 D_SCAN("Not performing scan to abort\n");
132 return; 132 return;
133 } 133 }
134 134
135 if (test_and_set_bit(STATUS_SCAN_ABORTING, &il->status)) { 135 if (test_and_set_bit(S_SCAN_ABORTING, &il->status)) {
136 D_SCAN("Scan abort in progress\n"); 136 D_SCAN("Scan abort in progress\n");
137 return; 137 return;
138 } 138 }
@@ -172,12 +172,12 @@ int il_scan_cancel_timeout(struct il_priv *il, unsigned long ms)
172 il_do_scan_abort(il); 172 il_do_scan_abort(il);
173 173
174 while (time_before_eq(jiffies, timeout)) { 174 while (time_before_eq(jiffies, timeout)) {
175 if (!test_bit(STATUS_SCAN_HW, &il->status)) 175 if (!test_bit(S_SCAN_HW, &il->status))
176 break; 176 break;
177 msleep(20); 177 msleep(20);
178 } 178 }
179 179
180 return test_bit(STATUS_SCAN_HW, &il->status); 180 return test_bit(S_SCAN_HW, &il->status);
181} 181}
182EXPORT_SYMBOL(il_scan_cancel_timeout); 182EXPORT_SYMBOL(il_scan_cancel_timeout);
183 183
@@ -251,7 +251,7 @@ static void il_rx_scan_complete_notif(struct il_priv *il,
251 scan_notif->tsf_high, scan_notif->status); 251 scan_notif->tsf_high, scan_notif->status);
252 252
253 /* The HW is no longer scanning */ 253 /* The HW is no longer scanning */
254 clear_bit(STATUS_SCAN_HW, &il->status); 254 clear_bit(S_SCAN_HW, &il->status);
255 255
256 D_SCAN("Scan on %sGHz took %dms\n", 256 D_SCAN("Scan on %sGHz took %dms\n",
257 (il->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", 257 (il->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2",
@@ -341,25 +341,25 @@ static int il_scan_initiate(struct il_priv *il,
341 return -EIO; 341 return -EIO;
342 } 342 }
343 343
344 if (test_bit(STATUS_SCAN_HW, &il->status)) { 344 if (test_bit(S_SCAN_HW, &il->status)) {
345 D_SCAN( 345 D_SCAN(
346 "Multiple concurrent scan requests in parallel.\n"); 346 "Multiple concurrent scan requests in parallel.\n");
347 return -EBUSY; 347 return -EBUSY;
348 } 348 }
349 349
350 if (test_bit(STATUS_SCAN_ABORTING, &il->status)) { 350 if (test_bit(S_SCAN_ABORTING, &il->status)) {
351 D_SCAN("Scan request while abort pending.\n"); 351 D_SCAN("Scan request while abort pending.\n");
352 return -EBUSY; 352 return -EBUSY;
353 } 353 }
354 354
355 D_SCAN("Starting scan...\n"); 355 D_SCAN("Starting scan...\n");
356 356
357 set_bit(STATUS_SCANNING, &il->status); 357 set_bit(S_SCANNING, &il->status);
358 il->scan_start = jiffies; 358 il->scan_start = jiffies;
359 359
360 ret = il->cfg->ops->utils->request_scan(il, vif); 360 ret = il->cfg->ops->utils->request_scan(il, vif);
361 if (ret) { 361 if (ret) {
362 clear_bit(STATUS_SCANNING, &il->status); 362 clear_bit(S_SCANNING, &il->status);
363 return ret; 363 return ret;
364 } 364 }
365 365
@@ -383,7 +383,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw,
383 383
384 mutex_lock(&il->mutex); 384 mutex_lock(&il->mutex);
385 385
386 if (test_bit(STATUS_SCANNING, &il->status)) { 386 if (test_bit(S_SCANNING, &il->status)) {
387 D_SCAN("Scan already in progress.\n"); 387 D_SCAN("Scan already in progress.\n");
388 ret = -EAGAIN; 388 ret = -EAGAIN;
389 goto out_unlock; 389 goto out_unlock;
@@ -494,11 +494,11 @@ static void il_bg_scan_completed(struct work_struct *work)
494 494
495 mutex_lock(&il->mutex); 495 mutex_lock(&il->mutex);
496 496
497 aborted = test_and_clear_bit(STATUS_SCAN_ABORTING, &il->status); 497 aborted = test_and_clear_bit(S_SCAN_ABORTING, &il->status);
498 if (aborted) 498 if (aborted)
499 D_SCAN("Aborted scan completed.\n"); 499 D_SCAN("Aborted scan completed.\n");
500 500
501 if (!test_and_clear_bit(STATUS_SCANNING, &il->status)) { 501 if (!test_and_clear_bit(S_SCANNING, &il->status)) {
502 D_SCAN("Scan already completed.\n"); 502 D_SCAN("Scan already completed.\n");
503 goto out_settings; 503 goto out_settings;
504 } 504 }
diff --git a/drivers/net/wireless/iwlegacy/iwl-tx.c b/drivers/net/wireless/iwlegacy/iwl-tx.c
index e46e58829216..3f97d09fa00a 100644
--- a/drivers/net/wireless/iwlegacy/iwl-tx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-tx.c
@@ -51,7 +51,7 @@ il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq)
51 return; 51 return;
52 52
53 /* if we're trying to save power */ 53 /* if we're trying to save power */
54 if (test_bit(STATUS_POWER_PMI, &il->status)) { 54 if (test_bit(S_POWER_PMI, &il->status)) {
55 /* wake up nic if it's powered down ... 55 /* wake up nic if it's powered down ...
56 * uCode will wake up, and interrupt us again, so next 56 * uCode will wake up, and interrupt us again, so next
57 * time we'll skip this part. */ 57 * time we'll skip this part. */
@@ -641,7 +641,7 @@ il_tx_cmd_complete(struct il_priv *il, struct il_rx_buf *rxb)
641 il_hcmd_queue_reclaim(il, txq_id, idx, cmd_idx); 641 il_hcmd_queue_reclaim(il, txq_id, idx, cmd_idx);
642 642
643 if (!(meta->flags & CMD_ASYNC)) { 643 if (!(meta->flags & CMD_ASYNC)) {
644 clear_bit(STATUS_HCMD_ACTIVE, &il->status); 644 clear_bit(S_HCMD_ACTIVE, &il->status);
645 D_INFO("Clearing HCMD_ACTIVE for command %s\n", 645 D_INFO("Clearing HCMD_ACTIVE for command %s\n",
646 il_get_cmd_string(cmd->hdr.cmd)); 646 il_get_cmd_string(cmd->hdr.cmd));
647 wake_up(&il->wait_command_queue); 647 wake_up(&il->wait_command_queue);