]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.39/patches.fixes/iwlagn-fix-rfkill.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / iwlagn-fix-rfkill.patch
similarity index 83%
rename from src/patches/suse-2.6.27.31/patches.fixes/iwlagn-fix-rfkill.patch
rename to src/patches/suse-2.6.27.39/patches.fixes/iwlagn-fix-rfkill.patch
index f1f2ac8160d3a0b45e830619f8d50a010b426dcc..66c662a24c2afad60bd3ee3f18f208726dbe8885 100644 (file)
@@ -37,16 +37,16 @@ Acked-by: Jiri Benc <jbenc@suse.cz>
 -               */
 -              if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status))
 -                      clear_bit(STATUS_RF_KILL_HW, &priv->status);
-+               * the driver allows loading the ucode even if the radio
-+               * is killed. Hence update the killswitch state here. The
-+               * rfkill handler will care about restarting if needed.
-+               */
-+              if (!test_bit(STATUS_ALIVE, &priv->status)) {
-+                      if (hw_rf_kill)
-+                              set_bit(STATUS_RF_KILL_HW, &priv->status);
-+                      else
-+                              clear_bit(STATUS_RF_KILL_HW, &priv->status);
-+                      queue_work(priv->workqueue, &priv->rf_kill);
++               * the driver allows loading the ucode even if the radio
++               * is killed. Hence update the killswitch state here. The
++               * rfkill handler will care about restarting if needed.
++               */
++              if (!test_bit(STATUS_ALIVE, &priv->status)) {
++                      if (hw_rf_kill)
++                              set_bit(STATUS_RF_KILL_HW, &priv->status);
++                      else
++                              clear_bit(STATUS_RF_KILL_HW, &priv->status);
++                      queue_work(priv->workqueue, &priv->rf_kill);
 +              }
  
                handled |= CSR_INT_BIT_RF_KILL;
@@ -164,14 +164,14 @@ Acked-by: Jiri Benc <jbenc@suse.cz>
        iwl4965_disable_interrupts(priv);
        spin_unlock_irqrestore(&priv->lock, flags);
  
-+      pci_enable_msi(priv->pci_dev);
++      pci_enable_msi(priv->pci_dev);
 +
-+      err = request_irq(priv->pci_dev->irq, iwl4965_isr, IRQF_SHARED,
-+                        DRV_NAME, priv);
-+      if (err) {
-+              IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq);
-+              goto out_disable_msi;
-+      }
++      err = request_irq(priv->pci_dev->irq, iwl4965_isr, IRQF_SHARED,
++                        DRV_NAME, priv);
++      if (err) {
++              IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq);
++              goto out_disable_msi;
++      }
        err = sysfs_create_group(&pdev->dev.kobj, &iwl4965_attribute_group);
        if (err) {
                IWL_ERROR("failed to create sysfs device attributes\n");
@@ -193,14 +193,14 @@ Acked-by: Jiri Benc <jbenc@suse.cz>
 +       * 9. Setup and register mac80211
         **********************************/
  
-+      /* enable interrupts if needed: 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);
-+      }
++      /* enable interrupts if needed: 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);
++      }
 +
-+      iwl4965_enable_interrupts(priv);
++      iwl4965_enable_interrupts(priv);
 +
        err = iwl_setup_mac(priv);
        if (err)
@@ -209,18 +209,18 @@ Acked-by: Jiri Benc <jbenc@suse.cz>
        if (err)
                IWL_ERROR("failed to create debugfs files\n");
  
-+      /* 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)
-+              clear_bit(STATUS_RF_KILL_HW, &priv->status);
-+      else
-+              set_bit(STATUS_RF_KILL_HW, &priv->status);
++      /* 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)
++              clear_bit(STATUS_RF_KILL_HW, &priv->status);
++      else
++              set_bit(STATUS_RF_KILL_HW, &priv->status);
 +
        err = iwl_rfkill_init(priv);
        if (err)
                IWL_ERROR("Unable to initialize RFKILL system. "
                                  "Ignoring error: %d\n", err);
 +      else
-+              iwl_rfkill_set_hw_state(priv);
++              iwl_rfkill_set_hw_state(priv);
 +
        iwl_power_initialize(priv);
        return 0;
@@ -228,8 +228,8 @@ Acked-by: Jiri Benc <jbenc@suse.cz>
   out_remove_sysfs:
        sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group);
 + out_disable_msi:
-+      pci_disable_msi(priv->pci_dev);
-+      pci_disable_device(priv->pci_dev);
++      pci_disable_msi(priv->pci_dev);
++      pci_disable_device(priv->pci_dev);
   out_uninit_drv:
        iwl_uninit_drv(priv);
   out_free_eeprom: