Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247272
b: refs/heads/master
c: a078a1f
h: refs/heads/master
v: v3
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Apr 29, 2011
1 parent f754cb6 commit 4ea416f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 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: ab42b4041707f075533845ecb320c7a1c5621f1b
refs/heads/master: a078a1fde11b350161e7db2c44353dfae7749212
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/iwlegacy/iwl-helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ static inline void iwl_legacy_disable_interrupts(struct iwl_priv *priv)
IWL_DEBUG_ISR(priv, "Disabled interrupts\n");
}

static inline void iwl_legacy_enable_rfkill_int(struct iwl_priv *priv)
{
IWL_DEBUG_ISR(priv, "Enabling rfkill interrupt\n");
iwl_write32(priv, CSR_INT_MASK, CSR_INT_BIT_RF_KILL);
}

static inline void iwl_legacy_enable_interrupts(struct iwl_priv *priv)
{
IWL_DEBUG_ISR(priv, "Enabling interrupts\n");
Expand Down
12 changes: 8 additions & 4 deletions trunk/drivers/net/wireless/iwlegacy/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,9 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
/* only Re-enable if diabled by irq */
if (test_bit(STATUS_INT_ENABLED, &priv->status))
iwl_legacy_enable_interrupts(priv);
/* Re-enable RF_KILL if it occurred */
else if (handled & CSR_INT_BIT_RF_KILL)
iwl_legacy_enable_rfkill_int(priv);

#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG
if (iwl_legacy_get_debug_level(priv) & (IWL_DL_ISR)) {
Expand Down Expand Up @@ -2624,9 +2627,10 @@ void iwl4965_mac_stop(struct ieee80211_hw *hw)

flush_workqueue(priv->workqueue);

/* enable interrupts again in order to receive rfkill changes */
/* User space software may expect getting rfkill changes
* even if interface is down */
iwl_write32(priv, CSR_INT, 0xFFFFFFFF);
iwl_legacy_enable_interrupts(priv);
iwl_legacy_enable_rfkill_int(priv);

IWL_DEBUG_MAC80211(priv, "leave\n");
}
Expand Down Expand Up @@ -3406,14 +3410,14 @@ iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* 8. Enable interrupts and read RFKILL state
*********************************************/

/* enable interrupts if needed: hw bug w/a */
/* enable rfkill interrupt: hw bug w/a */
pci_read_config_word(priv->pci_dev, PCI_COMMAND, &pci_cmd);
if (pci_cmd & PCI_COMMAND_INTX_DISABLE) {
pci_cmd &= ~PCI_COMMAND_INTX_DISABLE;
pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd);
}

iwl_legacy_enable_interrupts(priv);
iwl_legacy_enable_rfkill_int(priv);

/* If platform's RF_KILL switch is NOT set to KILL */
if (iwl_read32(priv, CSR_GP_CNTRL) &
Expand Down

0 comments on commit 4ea416f

Please sign in to comment.