forked from luck/tmp_suning_uos_patched
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
This commit is contained in:
commit
8e0f36ec37
|
@ -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:
|
||||
--------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
******************************************************************************/
|
||||
|
||||
#include "ipw2200.h"
|
||||
#include <linux/version.h>
|
||||
|
||||
|
||||
#ifndef KBUILD_EXTMOD
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <net/mac80211.h>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user