diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 10d7b9b7f064..f735117d8fc2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1234,6 +1234,9 @@ static void iwl_irq_tasklet_legacy(struct iwl_priv *priv) | |||
1234 | /* only Re-enable if diabled by irq */ | 1234 | /* only Re-enable if diabled by irq */ |
1235 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) | 1235 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) |
1236 | iwl_enable_interrupts(priv); | 1236 | iwl_enable_interrupts(priv); |
1237 | /* Re-enable RF_KILL if it occurred */ | ||
1238 | else if (handled & CSR_INT_BIT_RF_KILL) | ||
1239 | iwl_enable_rfkill_int(priv); | ||
1237 | 1240 | ||
1238 | #ifdef CONFIG_IWLWIFI_DEBUG | 1241 | #ifdef CONFIG_IWLWIFI_DEBUG |
1239 | if (iwl_get_debug_level(priv) & (IWL_DL_ISR)) { | 1242 | if (iwl_get_debug_level(priv) & (IWL_DL_ISR)) { |
@@ -1449,6 +1452,9 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1449 | /* only Re-enable if diabled by irq */ | 1452 | /* only Re-enable if diabled by irq */ |
1450 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) | 1453 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) |
1451 | iwl_enable_interrupts(priv); | 1454 | iwl_enable_interrupts(priv); |
1455 | /* Re-enable RF_KILL if it occurred */ | ||
1456 | else if (handled & CSR_INT_BIT_RF_KILL) | ||
1457 | iwl_enable_rfkill_int(priv); | ||
1452 | } | 1458 | } |
1453 | 1459 | ||
1454 | /* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */ | 1460 | /* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */ |
@@ -3260,9 +3266,10 @@ static void iwl_mac_stop(struct ieee80211_hw *hw) | |||
3260 | 3266 | ||
3261 | flush_workqueue(priv->workqueue); | 3267 | flush_workqueue(priv->workqueue); |
3262 | 3268 | ||
3263 | /* enable interrupts again in order to receive rfkill changes */ | 3269 | /* User space software may expect getting rfkill changes |
3270 | * even if interface is down */ | ||
3264 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); | 3271 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
3265 | iwl_enable_interrupts(priv); | 3272 | iwl_enable_rfkill_int(priv); |
3266 | 3273 | ||
3267 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 3274 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
3268 | } | 3275 | } |
@@ -4103,14 +4110,14 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
4103 | * 8. Enable interrupts and read RFKILL state | 4110 | * 8. Enable interrupts and read RFKILL state |
4104 | *********************************************/ | 4111 | *********************************************/ |
4105 | 4112 | ||
4106 | /* enable interrupts if needed: hw bug w/a */ | 4113 | /* enable rfkill interrupt: hw bug w/a */ |
4107 | pci_read_config_word(priv->pci_dev, PCI_COMMAND, &pci_cmd); | 4114 | pci_read_config_word(priv->pci_dev, PCI_COMMAND, &pci_cmd); |
4108 | if (pci_cmd & PCI_COMMAND_INTX_DISABLE) { | 4115 | if (pci_cmd & PCI_COMMAND_INTX_DISABLE) { |
4109 | pci_cmd &= ~PCI_COMMAND_INTX_DISABLE; | 4116 | pci_cmd &= ~PCI_COMMAND_INTX_DISABLE; |
4110 | pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd); | 4117 | pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd); |
4111 | } | 4118 | } |
4112 | 4119 | ||
4113 | iwl_enable_interrupts(priv); | 4120 | iwl_enable_rfkill_int(priv); |
4114 | 4121 | ||
4115 | /* If platform's RF_KILL switch is NOT set to KILL */ | 4122 | /* If platform's RF_KILL switch is NOT set to KILL */ |
4116 | if (iwl_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) | 4123 | if (iwl_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) |