]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorDavid S. Miller <davem@davemloft.net>
Tue, 19 Aug 2008 04:15:44 +0000 (21:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Aug 2008 04:15:44 +0000 (21:15 -0700)
27 files changed:
Documentation/rfkill.txt
drivers/net/wireless/ath5k/base.c
drivers/net/wireless/ath9k/hw.c
drivers/net/wireless/b43/main.c
drivers/net/wireless/ipw2100.c
drivers/net/wireless/ipw2200.c
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-eeprom.c
drivers/net/wireless/iwlwifi/iwl-hcmd.c
drivers/net/wireless/iwlwifi/iwl-power.c
drivers/net/wireless/iwlwifi/iwl-sta.c
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/p54/p54common.c
drivers/net/wireless/p54/p54common.h
drivers/net/wireless/p54/p54usb.c
drivers/net/wireless/rt2x00/rt2x00queue.h
drivers/net/wireless/rt2x00/rt2x00usb.c
drivers/net/wireless/rtl8187_dev.c
drivers/ssb/main.c
include/net/mac80211.h
net/mac80211/mlme.c
net/rfkill/rfkill.c

index 28b6ec87c64209b10a83dfe1a7bfcebf6f231991..6fcb3060dec507ed653a5cc0ce72eb9773cbad56 100644 (file)
@@ -363,6 +363,11 @@ This rule exists because users of the rfkill subsystem expect to get (and set,
 when possible) the overall transmitter rfkill state, not of a particular rfkill
 line.
 
+5. During suspend, the rfkill class will attempt to soft-block the radio
+through a call to rfkill->toggle_radio, and will try to restore its previous
+state during resume.  After a rfkill class is suspended, it will *not* call
+rfkill->toggle_radio until it is resumed.
+
 Example of a WLAN wireless driver connected to the rfkill subsystem:
 --------------------------------------------------------------------
 
index 2028866f59951068ebb799ee3209ef22d9ff13c6..b20a45aa8680ec1b0fb0501142fedb4ba3c7978c 100644 (file)
@@ -40,7 +40,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/hardirq.h>
@@ -587,7 +586,6 @@ ath5k_pci_suspend(struct pci_dev *pdev, pm_message_t state)
        ath5k_stop_hw(sc);
 
        free_irq(pdev->irq, sc);
-       pci_disable_msi(pdev);
        pci_save_state(pdev);
        pci_disable_device(pdev);
        pci_set_power_state(pdev, PCI_D3hot);
@@ -616,12 +614,10 @@ ath5k_pci_resume(struct pci_dev *pdev)
         */
        pci_write_config_byte(pdev, 0x41, 0);
 
-       pci_enable_msi(pdev);
-
        err = request_irq(pdev->irq, ath5k_intr, IRQF_SHARED, "ath", sc);
        if (err) {
                ATH5K_ERR(sc, "request_irq failed\n");
-               goto err_msi;
+               goto err_no_irq;
        }
 
        err = ath5k_init(sc);
@@ -642,8 +638,7 @@ ath5k_pci_resume(struct pci_dev *pdev)
        return 0;
 err_irq:
        free_irq(pdev->irq, sc);
-err_msi:
-       pci_disable_msi(pdev);
+err_no_irq:
        pci_disable_device(pdev);
        return err;
 }
index bde162f128aba6c70100c1dbd8d1c979061e0411..a17eb130f57431e104a9141596037cfe9ef7e31e 100644 (file)
@@ -5017,7 +5017,11 @@ static void ath9k_hw_spur_mitigate(struct ath_hal *ah,
 
        for (i = 0; i < 123; i++) {
                if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) {
-                       if ((abs(cur_vit_mask - bin)) < 75)
+
+                       /* workaround for gcc bug #37014 */
+                       volatile int tmp = abs(cur_vit_mask - bin);
+
+                       if (tmp < 75)
                                mask_amt = 1;
                        else
                                mask_amt = 0;
index 3bf3a869361f13fec7ff1b4a48bdd5ae9ddc363b..7205a936ec74708085576ef5b538528b0a747d15 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/moduleparam.h>
 #include <linux/if_arp.h>
 #include <linux/etherdevice.h>
-#include <linux/version.h>
 #include <linux/firmware.h>
 #include <linux/wireless.h>
 #include <linux/workqueue.h>
@@ -4615,7 +4614,9 @@ static void b43_sprom_fixup(struct ssb_bus *bus)
        if (bus->bustype == SSB_BUSTYPE_PCI) {
                pdev = bus->host_pci;
                if (IS_PDEV(pdev, BROADCOM, 0x4318, ASUSTEK, 0x100F) ||
+                   IS_PDEV(pdev, BROADCOM, 0x4320,    DELL, 0x0003) ||
                    IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0015) ||
+                   IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0014) ||
                    IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0013))
                        bus->sprom.boardflags_lo &= ~B43_BFL_BTCOEXIST;
        }
index c6f886ec08a395893772d50bf6d3e1c241109bb2..19a401c4a0dcd507f23d89db9100bcb2415385d4 100644 (file)
@@ -157,7 +157,6 @@ that only one external action is invoked at a time.
 #include <linux/stringify.h>
 #include <linux/tcp.h>
 #include <linux/types.h>
-#include <linux/version.h>
 #include <linux/time.h>
 #include <linux/firmware.h>
 #include <linux/acpi.h>
index 36e8d2f6e7b4d2b3ba712fb066685d4917446913..dcce3542d5a771d9eb24753d8d464854bb4e6639 100644 (file)
@@ -31,7 +31,6 @@
 ******************************************************************************/
 
 #include "ipw2200.h"
-#include <linux/version.h>
 
 
 #ifndef KBUILD_EXTMOD
index b3931f6135a4002aed0cd3d0f1a9007540a7f696..3f51f36353449bdf0eaa8afa6c2fc1ec2bb39665 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
index 22bb26985c2e6a7ef4545ea6e6206ccdce47f8e7..e2581229d8b2b6e6ac68a58f5ae20d001475b50e 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
@@ -967,7 +966,7 @@ static int iwl4965_interpolate_chan(struct iwl_priv *priv, u32 channel,
 
        s = iwl4965_get_sub_band(priv, channel);
        if (s >= EEPROM_TX_POWER_BANDS) {
-               IWL_ERROR("Tx Power can not find channel %d ", channel);
+               IWL_ERROR("Tx Power can not find channel %d\n", channel);
                return -1;
        }
 
index f3d139b663e651bab5759b7d12b2f2dd8e923a1e..cbc01a00eaf4416e42ea3b2261df33506fe52d14 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
index ed09e48b1b61ade5d9fb4dde1fe9410be2d37c91..061ffba9c884c017c00970bc2a148fd3d6dc0602 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
index 9bd61809129f800bfa7ca5ef3ff35482675e0a65..c72f72579beaeb2f70e2760a695f7b9268a533ab 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <net/mac80211.h>
 
 struct iwl_priv; /* FIXME: remove */
index bce53830b301f8f32749facf5b85c1ad72561666..37155755efc596bb51d3dc395374bf40a533b086 100644 (file)
@@ -63,7 +63,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 
 #include <net/mac80211.h>
@@ -146,7 +145,7 @@ int iwlcore_eeprom_verify_signature(struct iwl_priv *priv)
 {
        u32 gp = iwl_read32(priv, CSR_EEPROM_GP);
        if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {
-               IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp);
+               IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
                return -ENOENT;
        }
        return 0;
@@ -227,7 +226,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
 
        ret = priv->cfg->ops->lib->eeprom_ops.verify_signature(priv);
        if (ret < 0) {
-               IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp);
+               IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
                ret = -ENOENT;
                goto err;
        }
@@ -254,7 +253,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
                }
 
                if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) {
-                       IWL_ERROR("Time out reading EEPROM[%d]", addr);
+                       IWL_ERROR("Time out reading EEPROM[%d]\n", addr);
                        ret = -ETIMEDOUT;
                        goto done;
                }
index 6512834bb9162bf220a105ddfa1654cc540a577d..2eb03eea1908f166c24a86aee7d1d5303e5443bc 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <net/mac80211.h>
 
 #include "iwl-dev.h" /* FIXME: remove */
index 028e3053c0ca423698b2390608521520e0dfc404..a099c9e30e55dcdfe0d933a3e64c4947719bd593 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 
 #include <net/mac80211.h>
index 60a6e010603608eeca8550b5b928f3c3dcaf75e8..6283a3a707f58dad2f5cb17bfcb82ed05a57a148 100644 (file)
@@ -207,7 +207,7 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index,
        case WLAN_HT_CAP_MIMO_PS_DISABLED:
                break;
        default:
-               IWL_WARNING("Invalid MIMO PS mode %d", mimo_ps_mode);
+               IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode);
                break;
        }
 
@@ -969,7 +969,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
                return priv->hw_params.bcast_sta_id;
 
        default:
-               IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode);
+               IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode);
                return priv->hw_params.bcast_sta_id;
        }
 }
index 4108c7c8f00f5331dcaa35679eee8d95e822a7ec..d82823b5c8abce08948fad392cd9e8c3368aabf5 100644 (file)
@@ -493,7 +493,7 @@ int iwl_txq_ctx_reset(struct iwl_priv *priv)
        /* Alloc keep-warm buffer */
        ret = iwl_kw_alloc(priv);
        if (ret) {
-               IWL_ERROR("Keep Warm allocation failed");
+               IWL_ERROR("Keep Warm allocation failed\n");
                goto error_kw;
        }
        spin_lock_irqsave(&priv->lock, flags);
@@ -1463,7 +1463,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
        u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn);
 
        if (scd_flow >= priv->hw_params.max_txq_num) {
-               IWL_ERROR("BUG_ON scd_flow is bigger than number of queues");
+               IWL_ERROR("BUG_ON scd_flow is bigger than number of queues\n");
                return;
        }
 
index 444847ab1b5a7ab0a86ecd8e1bd0fd31108e5736..b775d5bab66835c40ac87812305bf405951489f6 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
@@ -1558,7 +1557,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv)
        BUILD_BUG_ON(sizeof(priv->eeprom) != IWL_EEPROM_IMAGE_SIZE);
 
        if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {
-               IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp);
+               IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
                return -ENOENT;
        }
 
@@ -1583,7 +1582,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv)
                }
 
                if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) {
-                       IWL_ERROR("Time out reading EEPROM[%d]", addr);
+                       IWL_ERROR("Time out reading EEPROM[%d]\n", addr);
                        return -ETIMEDOUT;
                }
                e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16));
@@ -2507,7 +2506,7 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h
                return priv->hw_setting.bcast_sta_id;
 
        default:
-               IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode);
+               IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode);
                return priv->hw_setting.bcast_sta_id;
        }
 }
index 83cd85e1f8475e90e4d9a7e46ef11333af55c7ef..29be3dc8ee093fa4cd7dbcf89c4dcc11184058df 100644 (file)
@@ -413,12 +413,12 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
                        last_addr = range->end_addr;
                        __skb_unlink(entry, &priv->tx_queue);
                        memset(&info->status, 0, sizeof(info->status));
-                       priv->tx_stats[skb_get_queue_mapping(skb)].len--;
                        entry_hdr = (struct p54_control_hdr *) entry->data;
                        entry_data = (struct p54_tx_control_allocdata *) entry_hdr->data;
                        if ((entry_hdr->magic1 & cpu_to_le16(0x4000)) != 0)
                                pad = entry_data->align[0];
 
+                       priv->tx_stats[entry_data->hw_queue - 4].len--;
                        if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
                                if (!(payload->status & 0x01))
                                        info->flags |= IEEE80211_TX_STAT_ACK;
@@ -557,6 +557,7 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
        struct p54_tx_control_allocdata *txhdr;
        size_t padding, len;
        u8 rate;
+       u8 cts_rate = 0x20;
 
        current_queue = &priv->tx_stats[skb_get_queue_mapping(skb)];
        if (unlikely(current_queue->len > current_queue->limit))
@@ -581,28 +582,28 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
        hdr->type = (info->flags & IEEE80211_TX_CTL_NO_ACK) ? 0 : cpu_to_le16(1);
        hdr->retry1 = hdr->retry2 = info->control.retry_limit;
 
-       memset(txhdr->wep_key, 0x0, 16);
-       txhdr->padding = 0;
-       txhdr->padding2 = 0;
-
        /* TODO: add support for alternate retry TX rates */
        rate = ieee80211_get_tx_rate(dev, info)->hw_value;
-       if (info->flags & IEEE80211_TX_CTL_SHORT_PREAMBLE)
+       if (info->flags & IEEE80211_TX_CTL_SHORT_PREAMBLE) {
                rate |= 0x10;
-       if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS)
+               cts_rate |= 0x10;
+       }
+       if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) {
                rate |= 0x40;
-       else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)
+               cts_rate |= ieee80211_get_rts_cts_rate(dev, info)->hw_value;
+       } else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) {
                rate |= 0x20;
+               cts_rate |= ieee80211_get_rts_cts_rate(dev, info)->hw_value;
+       }
        memset(txhdr->rateset, rate, 8);
-       txhdr->wep_key_present = 0;
-       txhdr->wep_key_len = 0;
-       txhdr->frame_type = cpu_to_le32(skb_get_queue_mapping(skb) + 4);
-       txhdr->magic4 = 0;
-       txhdr->antenna = (info->antenna_sel_tx == 0) ?
+       txhdr->key_type = 0;
+       txhdr->key_len = 0;
+       txhdr->hw_queue = skb_get_queue_mapping(skb) + 4;
+       txhdr->tx_antenna = (info->antenna_sel_tx == 0) ?
                2 : info->antenna_sel_tx - 1;
        txhdr->output_power = 0x7f; // HW Maximum
-       txhdr->magic5 = (info->flags & IEEE80211_TX_CTL_NO_ACK) ?
-               0 : ((rate > 0x3) ? cpu_to_le32(0x33) : cpu_to_le32(0x23));
+       txhdr->cts_rate = (info->flags & IEEE80211_TX_CTL_NO_ACK) ?
+                         0 : cts_rate;
        if (padding)
                txhdr->align[0] = padding;
 
@@ -836,10 +837,21 @@ static int p54_start(struct ieee80211_hw *dev)
        struct p54_common *priv = dev->priv;
        int err;
 
+       if (!priv->cached_vdcf) {
+               priv->cached_vdcf = kzalloc(sizeof(struct p54_tx_control_vdcf)+
+                       priv->tx_hdr_len + sizeof(struct p54_control_hdr),
+                       GFP_KERNEL);
+
+               if (!priv->cached_vdcf)
+                       return -ENOMEM;
+       }
+
        err = priv->open(dev);
        if (!err)
                priv->mode = IEEE80211_IF_TYPE_MNTR;
 
+       p54_init_vdcf(dev);
+
        return err;
 }
 
@@ -1019,15 +1031,6 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
        dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 +
                                 sizeof(struct p54_tx_control_allocdata);
 
-        priv->cached_vdcf = kzalloc(sizeof(struct p54_tx_control_vdcf) +
-              priv->tx_hdr_len + sizeof(struct p54_control_hdr), GFP_KERNEL);
-
-       if (!priv->cached_vdcf) {
-               ieee80211_free_hw(dev);
-               return NULL;
-       }
-
-       p54_init_vdcf(dev);
        mutex_init(&priv->conf_mutex);
 
        return dev;
index 2245fcce92dc917e4707bf37cef9f086c1ca2b7c..8db6c0e8e540a3dda566be866621a7b94d46d3d8 100644 (file)
@@ -183,16 +183,16 @@ struct p54_frame_sent_hdr {
 
 struct p54_tx_control_allocdata {
        u8 rateset[8];
-       u16 padding;
-       u8 wep_key_present;
-       u8 wep_key_len;
-       u8 wep_key[16];
-       __le32 frame_type;
-       u32 padding2;
-       __le16 magic4;
-       u8 antenna;
+       u8 unalloc0[2];
+       u8 key_type;
+       u8 key_len;
+       u8 key[16];
+       u8 hw_queue;
+       u8 unalloc1[9];
+       u8 tx_antenna;
        u8 output_power;
-       __le32 magic5;
+       u8 cts_rate;
+       u8 unalloc2[3];
        u8 align[0];
 } __attribute__ ((packed));
 
index 815c095ef7971361e59d3a95648aee811dea6d09..cbaca23a945353a30734a3ec5aa19e095a209a38 100644 (file)
@@ -109,7 +109,17 @@ static void p54u_rx_cb(struct urb *urb)
                urb->context = skb;
                skb_queue_tail(&priv->rx_queue, skb);
        } else {
+               if (!priv->hw_type)
+                       skb_push(skb, sizeof(struct net2280_tx_hdr));
+
+               skb_reset_tail_pointer(skb);
                skb_trim(skb, 0);
+               if (urb->transfer_buffer != skb_tail_pointer(skb)) {
+                       /* this should not happen */
+                       WARN_ON(1);
+                       urb->transfer_buffer = skb_tail_pointer(skb);
+               }
+
                skb_queue_tail(&priv->rx_queue, skb);
        }
 
index a4a8c57004db179d2df8777c45e421786f68a6af..ff78e52ce43c2340ba910741c2ece4be764a05e0 100644 (file)
@@ -173,10 +173,10 @@ struct rxdone_entry_desc {
  *     frame transmission failed due to excessive retries.
  */
 enum txdone_entry_desc_flags {
-       TXDONE_UNKNOWN = 1 << 0,
-       TXDONE_SUCCESS = 1 << 1,
-       TXDONE_FAILURE = 1 << 2,
-       TXDONE_EXCESSIVE_RETRY = 1 << 3,
+       TXDONE_UNKNOWN,
+       TXDONE_SUCCESS,
+       TXDONE_FAILURE,
+       TXDONE_EXCESSIVE_RETRY,
 };
 
 /**
index 8d76bb2e031289b027ec810a9bbbc6b75754dfbd..2050227ea5304acb1daa8ba8f601a17b14eb5c25 100644 (file)
@@ -181,6 +181,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
         * (Only indirectly by looking at the failed TX counters
         * in the register).
         */
+       txdesc.flags = 0;
        if (!urb->status)
                __set_bit(TXDONE_UNKNOWN, &txdesc.flags);
        else
index 57376fb993edecbd984876f2a24cfa22f863fafc..ca5deb6244e63c881ba3e48bdee13da2ca2f0716 100644 (file)
@@ -40,6 +40,7 @@ static struct usb_device_id rtl8187_table[] __devinitdata = {
        /* Netgear */
        {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187},
        {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187},
+       {USB_DEVICE(0x0846, 0x4260), .driver_info = DEVICE_RTL8187B},
        /* HP */
        {USB_DEVICE(0x03f0, 0xca02), .driver_info = DEVICE_RTL8187},
        /* Sitecom */
index d831a2beff393079d9a20686494bf022be1f7651..87ab2443e66d405ec72d45a2da2f120d59e48f0c 100644 (file)
@@ -1165,15 +1165,19 @@ EXPORT_SYMBOL(ssb_dma_translation);
 
 int ssb_dma_set_mask(struct ssb_device *dev, u64 mask)
 {
+#ifdef CONFIG_SSB_PCIHOST
        int err;
+#endif
 
        switch (dev->bus->bustype) {
        case SSB_BUSTYPE_PCI:
+#ifdef CONFIG_SSB_PCIHOST
                err = pci_set_dma_mask(dev->bus->host_pci, mask);
                if (err)
                        return err;
                err = pci_set_consistent_dma_mask(dev->bus->host_pci, mask);
                return err;
+#endif
        case SSB_BUSTYPE_SSB:
                return dma_set_mask(dev->dev, mask);
        default:
@@ -1188,6 +1192,7 @@ void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size,
 {
        switch (dev->bus->bustype) {
        case SSB_BUSTYPE_PCI:
+#ifdef CONFIG_SSB_PCIHOST
                if (gfp_flags & GFP_DMA) {
                        /* Workaround: The PCI API does not support passing
                         * a GFP flag. */
@@ -1195,6 +1200,7 @@ void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size,
                                                  size, dma_handle, gfp_flags);
                }
                return pci_alloc_consistent(dev->bus->host_pci, size, dma_handle);
+#endif
        case SSB_BUSTYPE_SSB:
                return dma_alloc_coherent(dev->dev, size, dma_handle, gfp_flags);
        default:
@@ -1210,6 +1216,7 @@ void ssb_dma_free_consistent(struct ssb_device *dev, size_t size,
 {
        switch (dev->bus->bustype) {
        case SSB_BUSTYPE_PCI:
+#ifdef CONFIG_SSB_PCIHOST
                if (gfp_flags & GFP_DMA) {
                        /* Workaround: The PCI API does not support passing
                         * a GFP flag. */
@@ -1220,6 +1227,7 @@ void ssb_dma_free_consistent(struct ssb_device *dev, size_t size,
                pci_free_consistent(dev->bus->host_pci, size,
                                    vaddr, dma_handle);
                return;
+#endif
        case SSB_BUSTYPE_SSB:
                dma_free_coherent(dev->dev, size, vaddr, dma_handle);
                return;
index b397e4d984c7a0a870f6969741a01b3daba2fea0..ff137fd7714f2909aca78a352990366cb02005b9 100644 (file)
@@ -708,10 +708,7 @@ enum ieee80211_tkip_key_type {
  *     rely on the host system for such buffering. This option is used
  *     to configure the IEEE 802.11 upper layer to buffer broadcast and
  *     multicast frames when there are power saving stations so that
- *     the driver can fetch them with ieee80211_get_buffered_bc(). Note
- *     that not setting this flag works properly only when the
- *     %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is also not set because
- *     otherwise the stack will not know when the DTIM beacon was sent.
+ *     the driver can fetch them with ieee80211_get_buffered_bc().
  *
  * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE:
  *     Hardware is not capable of short slot operation on the 2.4 GHz band.
@@ -1099,10 +1096,8 @@ enum ieee80211_ampdu_mlme_action {
  *     See the section "Frame filtering" for more information.
  *     This callback must be implemented and atomic.
  *
- * @set_tim: Set TIM bit. If the hardware/firmware takes care of beacon
- *     generation (that is, %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is set)
- *     mac80211 calls this function when a TIM bit must be set or cleared
- *     for a given AID. Must be atomic.
+ * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit
+ *     must be set or cleared for a given AID. Must be atomic.
  *
  * @set_key: See the section "Hardware crypto acceleration"
  *     This callback can sleep, and is only called between add_interface
index e1d11c9b6729e0145866ab9df120ada75601fda1..1e97fb9fb34bde3f88988e42cd546b43d95a5b6e 100644 (file)
@@ -2103,6 +2103,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
                        rcu_read_unlock();
                        return;
                }
+               /* update new sta with its last rx activity */
+               sta->last_rx = jiffies;
        }
 
        /*
index d2d45655cd1a69582a8fdc2948c69c652ed0fd19..35a9994e23397e70b7f099b1bd573ed28c361512 100644 (file)
@@ -150,6 +150,8 @@ static void update_rfkill_state(struct rfkill *rfkill)
  * calls and handling all the red tape such as issuing notifications
  * if the call is successful.
  *
+ * Suspended devices are not touched at all, and -EAGAIN is returned.
+ *
  * Note that the @force parameter cannot override a (possibly cached)
  * state of RFKILL_STATE_HARD_BLOCKED.  Any device making use of
  * RFKILL_STATE_HARD_BLOCKED implements either get_state() or
@@ -168,6 +170,9 @@ static int rfkill_toggle_radio(struct rfkill *rfkill,
        int retval = 0;
        enum rfkill_state oldstate, newstate;
 
+       if (unlikely(rfkill->dev.power.power_state.event & PM_EVENT_SLEEP))
+               return -EBUSY;
+
        oldstate = rfkill->state;
 
        if (rfkill->get_state && !force &&
@@ -214,7 +219,7 @@ static int rfkill_toggle_radio(struct rfkill *rfkill,
  *
  * This function toggles the state of all switches of given type,
  * unless a specific switch is claimed by userspace (in which case,
- * that switch is left alone).
+ * that switch is left alone) or suspended.
  */
 void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state)
 {
@@ -239,8 +244,8 @@ EXPORT_SYMBOL(rfkill_switch_all);
 /**
  * rfkill_epo - emergency power off all transmitters
  *
- * This kicks all rfkill devices to RFKILL_STATE_SOFT_BLOCKED, ignoring
- * everything in its path but rfkill_mutex and rfkill->mutex.
+ * This kicks all non-suspended rfkill devices to RFKILL_STATE_SOFT_BLOCKED,
+ * ignoring everything in its path but rfkill_mutex and rfkill->mutex.
  */
 void rfkill_epo(void)
 {
@@ -458,13 +463,14 @@ static int rfkill_resume(struct device *dev)
        if (dev->power.power_state.event != PM_EVENT_ON) {
                mutex_lock(&rfkill->mutex);
 
+               dev->power.power_state.event = PM_EVENT_ON;
+
                /* restore radio state AND notify everybody */
                rfkill_toggle_radio(rfkill, rfkill->state, 1);
 
                mutex_unlock(&rfkill->mutex);
        }
 
-       dev->power.power_state = PMSG_ON;
        return 0;
 }
 #else