Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107760
b: refs/heads/master
c: c1842d6
h: refs/heads/master
v: v3
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Aug 4, 2008
1 parent a4d4160 commit ade97d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: caab8f1a5d0da583b6ffe41afea2774c676444ca
refs/heads/master: c1842d6150c4efe1d01e7a8cf86c63aec6223486
18 changes: 8 additions & 10 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2232,17 +2232,16 @@ static int __iwl4965_up(struct iwl_priv *priv)
}

/* If platform's RF_KILL switch is NOT set to KILL */
if (iwl_read32(priv, CSR_GP_CNTRL) &
CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
if (iwl_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
clear_bit(STATUS_RF_KILL_HW, &priv->status);
else
set_bit(STATUS_RF_KILL_HW, &priv->status);

if (!test_bit(STATUS_IN_SUSPEND, &priv->status) &&
iwl_is_rfkill(priv)) {
if (iwl_is_rfkill(priv)) {
iwl4965_enable_interrupts(priv);
IWL_WARNING("Radio disabled by %s RF Kill switch\n",
test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW");
return -ENODEV;
return 0;
}

iwl_write32(priv, CSR_INT, 0xFFFFFFFF);
Expand Down Expand Up @@ -2278,11 +2277,6 @@ static int __iwl4965_up(struct iwl_priv *priv)
memcpy(priv->ucode_data_backup.v_addr, priv->ucode_data.v_addr,
priv->ucode_data.len);

/* We return success when we resume from suspend and rf_kill is on. */
if (test_bit(STATUS_RF_KILL_HW, &priv->status) ||
test_bit(STATUS_RF_KILL_SW, &priv->status))
return 0;

for (i = 0; i < MAX_HW_RESTARTS; i++) {

iwl_clear_stations_table(priv);
Expand Down Expand Up @@ -2651,6 +2645,9 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
if (ret)
goto out_release_irq;

if (iwl_is_rfkill(priv))
goto out;

IWL_DEBUG_INFO("Start UP work done.\n");

if (test_bit(STATUS_IN_SUSPEND, &priv->status))
Expand All @@ -2670,6 +2667,7 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
}
}

out:
priv->is_open = 1;
IWL_DEBUG_MAC80211("leave\n");
return 0;
Expand Down

0 comments on commit ade97d9

Please sign in to comment.