]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linvill...
authorJeff Garzik <jeff@garzik.org>
Sun, 23 Dec 2007 04:25:16 +0000 (23:25 -0500)
committerJeff Garzik <jeff@garzik.org>
Sun, 23 Dec 2007 04:25:16 +0000 (23:25 -0500)
1  2 
drivers/net/wireless/Kconfig
drivers/net/wireless/ipw2200.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 5583719a0dcae2cb991e8e10ba16c6e2ce099f7a,7bdf9da599922515f93f754d711451c4c9f5964f..c98fc62a3e615ae54dae8efcdd395dd0d9290a8d
@@@ -264,7 -264,6 +264,7 @@@ config IPW2200_DEBU
  config LIBERTAS
        tristate "Marvell 8xxx Libertas WLAN driver support"
        depends on WLAN_80211
 +      select WIRELESS_EXT
        select IEEE80211
        select FW_LOADER
        ---help---
@@@ -587,15 -586,66 +587,66 @@@ config ADM821
  config P54_COMMON
        tristate "Softmac Prism54 support"
        depends on MAC80211 && WLAN_80211 && FW_LOADER && EXPERIMENTAL
+       ---help---
+         This is common code for isl38xx based cards.
+         This module does nothing by itself - the USB/PCI frontends
+         also need to be enabled in order to support any devices.
+         These devices require softmac firmware which can be found at
+         http://prism54.org/
+         If you choose to build a module, it'll be called p54common.
  
  config P54_USB
        tristate "Prism54 USB support"
        depends on P54_COMMON && USB
        select CRC32
+       ---help---
+         This driver is for USB isl38xx based wireless cards.
+         These are USB based adapters found in devices such as:
+         3COM 3CRWE254G72
+         SMC 2862W-G
+         Accton 802.11g WN4501 USB
+         Siemens Gigaset USB
+         Netgear WG121
+         Netgear WG111
+         Medion 40900, Roper Europe
+         Shuttle PN15, Airvast WM168g, IOGear GWU513
+         Linksys WUSB54G
+         Linksys WUSB54G Portable
+         DLink DWL-G120 Spinnaker
+         DLink DWL-G122
+         Belkin F5D7050 ver 1000
+         Cohiba Proto board
+         SMC 2862W-G version 2
+         U.S. Robotics U5 802.11g Adapter
+         FUJITSU E-5400 USB D1700
+         Sagem XG703A
+         DLink DWL-G120 Cohiba
+         Spinnaker Proto board
+         Linksys WUSB54AG
+         Inventel UR054G
+         Spinnaker DUT
+         These devices require softmac firmware which can be found at
+         http://prism54.org/
+         If you choose to build a module, it'll be called p54usb.
  
  config P54_PCI
        tristate "Prism54 PCI support"
        depends on P54_COMMON && PCI
+       ---help---
+         This driver is for PCI isl38xx based wireless cards.
+         This driver supports most devices that are supported by the
+         fullmac prism54 driver plus many devices which are not
+         supported by the fullmac driver/firmware.
+         This driver requires softmac firmware which can be found at
+         http://prism54.org/
+         If you choose to build a module, it'll be called p54pci.
  
  source "drivers/net/wireless/iwlwifi/Kconfig"
  source "drivers/net/wireless/hostap/Kconfig"
index da51f477e9df32adbd7ef1abcf65cc9c6352e472,38ce8ee8d6f95818354ff63722dab13953e6c7ec..88062c1318a89c0c16ab3e20707fdeb7b4afa72b
@@@ -1233,9 -1233,19 +1233,19 @@@ static ssize_t show_event_log(struct de
  {
        struct ipw_priv *priv = dev_get_drvdata(d);
        u32 log_len = ipw_get_event_log_len(priv);
-       struct ipw_event log[log_len];
+       u32 log_size;
+       struct ipw_event *log;
        u32 len = 0, i;
  
+       /* not using min() because of its strict type checking */
+       log_size = PAGE_SIZE / sizeof(*log) > log_len ?
+                       sizeof(*log) * log_len : PAGE_SIZE;
+       log = kzalloc(log_size, GFP_KERNEL);
+       if (!log) {
+               IPW_ERROR("Unable to allocate memory for log\n");
+               return 0;
+       }
+       log_len = log_size / sizeof(*log);
        ipw_capture_event_log(priv, log_len, log);
  
        len += snprintf(buf + len, PAGE_SIZE - len, "%08X", log_len);
                                "\n%08X%08X%08X",
                                log[i].time, log[i].event, log[i].data);
        len += snprintf(buf + len, PAGE_SIZE - len, "\n");
+       kfree(log);
        return len;
  }
  
@@@ -10751,7 -10762,7 +10762,7 @@@ static void ipw_bg_link_down(struct wor
        mutex_unlock(&priv->mutex);
  }
  
 -static int ipw_setup_deferred_work(struct ipw_priv *priv)
 +static int __devinit ipw_setup_deferred_work(struct ipw_priv *priv)
  {
        int ret = 0;
  
@@@ -11600,8 -11611,7 +11611,8 @@@ static void ipw_prom_free(struct ipw_pr
  #endif
  
  
 -static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 +static int __devinit ipw_pci_probe(struct pci_dev *pdev,
 +                                 const struct pci_device_id *ent)
  {
        int err = 0;
        struct net_device *net_dev;
        return err;
  }
  
 -static void ipw_pci_remove(struct pci_dev *pdev)
 +static void __devexit ipw_pci_remove(struct pci_dev *pdev)
  {
        struct ipw_priv *priv = pci_get_drvdata(pdev);
        struct list_head *p, *q;
index 3d1da0759b977b0885220ce3a0404e452252033d,5c67b5b409e0286f321aad6c3707e4e4decb3152..1a6b0e0edf6f026d8f3c98bc1e1cd454936ef4c0
@@@ -4743,10 -4743,8 +4743,10 @@@ static void iwl_irq_tasklet(struct iwl_
                 *   when we loaded driver, and is now set to "enable".
                 * After we're Alive, RF_KILL gets handled by
                 *   iwl_rx_card_state_notif() */
 -              if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status))
 +              if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
 +                      clear_bit(STATUS_RF_KILL_HW, &priv->status);
                        queue_work(priv->workqueue, &priv->restart);
 +              }
  
                handled |= CSR_INT_BIT_RF_KILL;
        }
@@@ -6173,7 -6171,6 +6173,7 @@@ static void iwl_alive_start(struct iwl_
                mutex_lock(&priv->mutex);
  
                if (rc) {
 +                      iwl_rate_control_unregister(priv->hw);
                        IWL_ERROR("Failed to register network "
                                  "device (error %d)\n", rc);
                        return;
@@@ -6246,8 -6243,6 +6246,6 @@@ static void __iwl_down(struct iwl_priv 
        /* Unblock any waiting calls */
        wake_up_interruptible_all(&priv->wait_command_queue);
  
-       iwl_cancel_deferred_work(priv);
        /* Wipe out the EXIT_PENDING status bit if we are not actually
         * exiting the module */
        if (!exit_pending)
@@@ -6322,6 -6317,8 +6320,8 @@@ static void iwl_down(struct iwl_priv *p
        mutex_lock(&priv->mutex);
        __iwl_down(priv);
        mutex_unlock(&priv->mutex);
+       iwl_cancel_deferred_work(priv);
  }
  
  #define MAX_HW_RESTARTS 5
@@@ -8580,10 -8577,9 +8580,9 @@@ static void iwl_pci_remove(struct pci_d
  
        IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n");
  
-       mutex_lock(&priv->mutex);
        set_bit(STATUS_EXIT_PENDING, &priv->status);
-       __iwl_down(priv);
-       mutex_unlock(&priv->mutex);
+       iwl_down(priv);
  
        /* Free MAC hash list for ADHOC */
        for (i = 0; i < IWL_IBSS_MAC_HASH_SIZE; i++) {
@@@ -8642,12 -8638,10 +8641,10 @@@ static int iwl_pci_suspend(struct pci_d
  {
        struct iwl_priv *priv = pci_get_drvdata(pdev);
  
-       mutex_lock(&priv->mutex);
        set_bit(STATUS_IN_SUSPEND, &priv->status);
  
        /* Take down the device; powers it off, etc. */
-       __iwl_down(priv);
+       iwl_down(priv);
  
        if (priv->mac80211_registered)
                ieee80211_stop_queues(priv->hw);
        pci_disable_device(pdev);
        pci_set_power_state(pdev, PCI_D3hot);
  
-       mutex_unlock(&priv->mutex);
        return 0;
  }
  
@@@ -8715,8 -8707,6 +8710,6 @@@ static int iwl_pci_resume(struct pci_de
  
        printk(KERN_INFO "Coming out of suspend...\n");
  
-       mutex_lock(&priv->mutex);
        pci_set_power_state(pdev, PCI_D0);
        err = pci_enable_device(pdev);
        pci_restore_state(pdev);
        pci_write_config_byte(pdev, 0x41, 0x00);
  
        iwl_resume(priv);
-       mutex_unlock(&priv->mutex);
  
        return 0;
  }
index b54fe5e6d5293c3debcf0cde2309a10f316ad6a0,ed148ea3dec3202440535fd6d21a2887be42e909..6cd57c220631919fd33ced7cdc01a94b84502c0b
@@@ -5059,10 -5059,8 +5059,10 @@@ static void iwl_irq_tasklet(struct iwl_
                 *   when we loaded driver, and is now set to "enable".
                 * After we're Alive, RF_KILL gets handled by
                 *   iwl_rx_card_state_notif() */
 -              if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status))
 +              if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
 +                      clear_bit(STATUS_RF_KILL_HW, &priv->status);
                        queue_work(priv->workqueue, &priv->restart);
 +              }
  
                handled |= CSR_INT_BIT_RF_KILL;
        }
@@@ -6529,7 -6527,6 +6529,7 @@@ static void iwl_alive_start(struct iwl_
                mutex_lock(&priv->mutex);
  
                if (rc) {
 +                      iwl_rate_control_unregister(priv->hw);
                        IWL_ERROR("Failed to register network "
                                  "device (error %d)\n", rc);
                        return;
@@@ -6601,8 -6598,6 +6601,6 @@@ static void __iwl_down(struct iwl_priv 
        /* Unblock any waiting calls */
        wake_up_interruptible_all(&priv->wait_command_queue);
  
-       iwl_cancel_deferred_work(priv);
        /* Wipe out the EXIT_PENDING status bit if we are not actually
         * exiting the module */
        if (!exit_pending)
@@@ -6677,6 -6672,8 +6675,8 @@@ static void iwl_down(struct iwl_priv *p
        mutex_lock(&priv->mutex);
        __iwl_down(priv);
        mutex_unlock(&priv->mutex);
+       iwl_cancel_deferred_work(priv);
  }
  
  #define MAX_HW_RESTARTS 5
@@@ -9174,10 -9171,9 +9174,9 @@@ static void iwl_pci_remove(struct pci_d
  
        IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n");
  
-       mutex_lock(&priv->mutex);
        set_bit(STATUS_EXIT_PENDING, &priv->status);
-       __iwl_down(priv);
-       mutex_unlock(&priv->mutex);
+       iwl_down(priv);
  
        /* Free MAC hash list for ADHOC */
        for (i = 0; i < IWL_IBSS_MAC_HASH_SIZE; i++) {
@@@ -9236,12 -9232,10 +9235,10 @@@ static int iwl_pci_suspend(struct pci_d
  {
        struct iwl_priv *priv = pci_get_drvdata(pdev);
  
-       mutex_lock(&priv->mutex);
        set_bit(STATUS_IN_SUSPEND, &priv->status);
  
        /* Take down the device; powers it off, etc. */
-       __iwl_down(priv);
+       iwl_down(priv);
  
        if (priv->mac80211_registered)
                ieee80211_stop_queues(priv->hw);
        pci_disable_device(pdev);
        pci_set_power_state(pdev, PCI_D3hot);
  
-       mutex_unlock(&priv->mutex);
        return 0;
  }
  
@@@ -9309,8 -9301,6 +9304,6 @@@ static int iwl_pci_resume(struct pci_de
  
        printk(KERN_INFO "Coming out of suspend...\n");
  
-       mutex_lock(&priv->mutex);
        pci_set_power_state(pdev, PCI_D0);
        err = pci_enable_device(pdev);
        pci_restore_state(pdev);
        pci_write_config_byte(pdev, 0x41, 0x00);
  
        iwl_resume(priv);
-       mutex_unlock(&priv->mutex);
  
        return 0;
  }