Commit 11cabe1c authored by Stephen Rothwell's avatar Stephen Rothwell

Merge commit 'wireless/master'

parents 88f4e8a0 cd559b36
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
menuconfig WLAN menuconfig WLAN
bool "Wireless LAN" bool "Wireless LAN"
depends on !S390 depends on !S390
default y
---help--- ---help---
This section contains all the pre 802.11 and 802.11 wireless This section contains all the pre 802.11 and 802.11 wireless
device drivers. For a complete list of drivers and documentation device drivers. For a complete list of drivers and documentation
......
...@@ -327,7 +327,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) ...@@ -327,7 +327,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
aniState->firstepLevel + 1); aniState->firstepLevel + 1);
return; return;
} else { } else {
if (conf->channel->band == IEEE80211_BAND_2GHZ) { if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
!conf_is_ht(conf)) {
if (!aniState->ofdmWeakSigDetectOff) if (!aniState->ofdmWeakSigDetectOff)
ath9k_hw_ani_control(ah, ath9k_hw_ani_control(ah,
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
...@@ -369,7 +370,8 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah) ...@@ -369,7 +370,8 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)
ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
aniState->firstepLevel + 1); aniState->firstepLevel + 1);
} else { } else {
if (conf->channel->band == IEEE80211_BAND_2GHZ) { if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
!conf_is_ht(conf)) {
if (aniState->firstepLevel > 0) if (aniState->firstepLevel > 0)
ath9k_hw_ani_control(ah, ath9k_hw_ani_control(ah,
ATH9K_ANI_FIRSTEP_LEVEL, 0); ATH9K_ANI_FIRSTEP_LEVEL, 0);
......
...@@ -2289,11 +2289,7 @@ static int b43_upload_microcode(struct b43_wldev *dev) ...@@ -2289,11 +2289,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
err = -ENODEV; err = -ENODEV;
goto error; goto error;
} }
msleep_interruptible(50); msleep(50);
if (signal_pending(current)) {
err = -EINTR;
goto error;
}
} }
b43_read32(dev, B43_MMIO_GEN_IRQ_REASON); /* dummy read */ b43_read32(dev, B43_MMIO_GEN_IRQ_REASON); /* dummy read */
...@@ -4287,6 +4283,8 @@ static int b43_wireless_core_init(struct b43_wldev *dev) ...@@ -4287,6 +4283,8 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
if (!dev->suspend_in_progress) if (!dev->suspend_in_progress)
b43_rng_init(wl); b43_rng_init(wl);
ieee80211_wake_queues(dev->wl->hw);
b43_set_status(dev, B43_STAT_INITIALIZED); b43_set_status(dev, B43_STAT_INITIALIZED);
if (!dev->suspend_in_progress) if (!dev->suspend_in_progress)
......
...@@ -875,15 +875,16 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local, ...@@ -875,15 +875,16 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
switch(type) { switch(type) {
case HOSTAP_INTERFACE_AP: case HOSTAP_INTERFACE_AP:
dev->tx_queue_len = 0; /* use main radio device queue */
dev->netdev_ops = &hostap_mgmt_netdev_ops; dev->netdev_ops = &hostap_mgmt_netdev_ops;
dev->type = ARPHRD_IEEE80211; dev->type = ARPHRD_IEEE80211;
dev->header_ops = &hostap_80211_ops; dev->header_ops = &hostap_80211_ops;
break; break;
case HOSTAP_INTERFACE_MASTER: case HOSTAP_INTERFACE_MASTER:
dev->tx_queue_len = 0; /* use main radio device queue */
dev->netdev_ops = &hostap_master_ops; dev->netdev_ops = &hostap_master_ops;
break; break;
default: default:
dev->tx_queue_len = 0; /* use main radio device queue */
dev->netdev_ops = &hostap_netdev_ops; dev->netdev_ops = &hostap_netdev_ops;
} }
......
...@@ -2346,6 +2346,7 @@ struct iwl_cfg iwl4965_agn_cfg = { ...@@ -2346,6 +2346,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
.mod_params = &iwl4965_mod_params, .mod_params = &iwl4965_mod_params,
.use_isr_legacy = true, .use_isr_legacy = true,
.ht_greenfield_support = false, .ht_greenfield_support = false,
.broken_powersave = true,
}; };
/* Module firmware */ /* Module firmware */
......
...@@ -760,6 +760,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, ...@@ -760,6 +760,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta,
u16 high_low; u16 high_low;
u8 switch_to_legacy = 0; u8 switch_to_legacy = 0;
u8 is_green = lq_sta->is_green; u8 is_green = lq_sta->is_green;
struct iwl_priv *priv = lq_sta->drv;
/* check if we need to switch from HT to legacy rates. /* check if we need to switch from HT to legacy rates.
* assumption is that mandatory rates (1Mbps or 6Mbps) * assumption is that mandatory rates (1Mbps or 6Mbps)
...@@ -773,7 +774,8 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, ...@@ -773,7 +774,8 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta,
tbl->lq_type = LQ_G; tbl->lq_type = LQ_G;
if (num_of_ant(tbl->ant_type) > 1) if (num_of_ant(tbl->ant_type) > 1)
tbl->ant_type = ANT_A;/*FIXME:RS*/ tbl->ant_type =
first_antenna(priv->hw_params.valid_tx_ant);
tbl->is_ht40 = 0; tbl->is_ht40 = 0;
tbl->is_SGI = 0; tbl->is_SGI = 0;
...@@ -883,6 +885,12 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, ...@@ -883,6 +885,12 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
mac_index &= RATE_MCS_CODE_MSK; /* Remove # of streams */ mac_index &= RATE_MCS_CODE_MSK; /* Remove # of streams */
if (mac_index >= (IWL_RATE_9M_INDEX - IWL_FIRST_OFDM_RATE)) if (mac_index >= (IWL_RATE_9M_INDEX - IWL_FIRST_OFDM_RATE))
mac_index++; mac_index++;
/*
* mac80211 HT index is always zero-indexed; we need to move
* HT OFDM rates after CCK rates in 2.4 GHz band
*/
if (priv->band == IEEE80211_BAND_2GHZ)
mac_index += IWL_FIRST_OFDM_RATE;
} }
if ((mac_index < 0) || if ((mac_index < 0) ||
......
...@@ -1585,9 +1585,12 @@ int iwl_setup_mac(struct iwl_priv *priv) ...@@ -1585,9 +1585,12 @@ int iwl_setup_mac(struct iwl_priv *priv)
hw->flags = IEEE80211_HW_SIGNAL_DBM | hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM | IEEE80211_HW_NOISE_DBM |
IEEE80211_HW_AMPDU_AGGREGATION | IEEE80211_HW_AMPDU_AGGREGATION |
IEEE80211_HW_SPECTRUM_MGMT | IEEE80211_HW_SPECTRUM_MGMT;
IEEE80211_HW_SUPPORTS_PS |
IEEE80211_HW_SUPPORTS_DYNAMIC_PS; if (!priv->cfg->broken_powersave)
hw->flags |= IEEE80211_HW_SUPPORTS_PS |
IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
hw->wiphy->interface_modes = hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC); BIT(NL80211_IFTYPE_ADHOC);
......
...@@ -252,6 +252,7 @@ struct iwl_cfg { ...@@ -252,6 +252,7 @@ struct iwl_cfg {
const u16 max_ll_items; const u16 max_ll_items;
const bool shadow_ram_support; const bool shadow_ram_support;
const bool ht_greenfield_support; const bool ht_greenfield_support;
const bool broken_powersave;
}; };
/*************************** /***************************
......
...@@ -292,8 +292,9 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) ...@@ -292,8 +292,9 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
else else
dtimper = 1; dtimper = 1;
/* TT power setting overwrites everything */ if (priv->cfg->broken_powersave)
if (tt->state >= IWL_TI_1) iwl_power_sleep_cam_cmd(priv, &cmd);
else if (tt->state >= IWL_TI_1)
iwl_static_sleep_cmd(priv, &cmd, tt->tt_power_mode, dtimper); iwl_static_sleep_cmd(priv, &cmd, tt->tt_power_mode, dtimper);
else if (!enabled) else if (!enabled)
iwl_power_sleep_cam_cmd(priv, &cmd); iwl_power_sleep_cam_cmd(priv, &cmd);
......
...@@ -239,26 +239,22 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority) ...@@ -239,26 +239,22 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority)
struct iwl_rx_queue *rxq = &priv->rxq; struct iwl_rx_queue *rxq = &priv->rxq;
struct list_head *element; struct list_head *element;
struct iwl_rx_mem_buffer *rxb; struct iwl_rx_mem_buffer *rxb;
struct sk_buff *skb;
unsigned long flags; unsigned long flags;
while (1) { while (1) {
spin_lock_irqsave(&rxq->lock, flags); spin_lock_irqsave(&rxq->lock, flags);
if (list_empty(&rxq->rx_used)) { if (list_empty(&rxq->rx_used)) {
spin_unlock_irqrestore(&rxq->lock, flags); spin_unlock_irqrestore(&rxq->lock, flags);
return; return;
} }
element = rxq->rx_used.next;
rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
list_del(element);
spin_unlock_irqrestore(&rxq->lock, flags); spin_unlock_irqrestore(&rxq->lock, flags);
/* Alloc a new receive buffer */ /* Alloc a new receive buffer */
rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256, skb = alloc_skb(priv->hw_params.rx_buf_size + 256,
priority); priority);
if (!rxb->skb) { if (!skb) {
IWL_CRIT(priv, "Can not allocate SKB buffers\n"); IWL_CRIT(priv, "Can not allocate SKB buffers\n");
/* We don't reschedule replenish work here -- we will /* We don't reschedule replenish work here -- we will
* call the restock method and if it still needs * call the restock method and if it still needs
...@@ -266,6 +262,20 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority) ...@@ -266,6 +262,20 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority)
break; break;
} }
spin_lock_irqsave(&rxq->lock, flags);
if (list_empty(&rxq->rx_used)) {
spin_unlock_irqrestore(&rxq->lock, flags);
dev_kfree_skb_any(skb);
return;
}
element = rxq->rx_used.next;
rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
list_del(element);
spin_unlock_irqrestore(&rxq->lock, flags);
rxb->skb = skb;
/* Get physical address of RB/SKB */ /* Get physical address of RB/SKB */
rxb->real_dma_addr = pci_map_single( rxb->real_dma_addr = pci_map_single(
priv->pci_dev, priv->pci_dev,
......
...@@ -1134,6 +1134,7 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority) ...@@ -1134,6 +1134,7 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority)
struct iwl_rx_queue *rxq = &priv->rxq; struct iwl_rx_queue *rxq = &priv->rxq;
struct list_head *element; struct list_head *element;
struct iwl_rx_mem_buffer *rxb; struct iwl_rx_mem_buffer *rxb;
struct sk_buff *skb;
unsigned long flags; unsigned long flags;
while (1) { while (1) {
...@@ -1143,17 +1144,11 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority) ...@@ -1143,17 +1144,11 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority)
spin_unlock_irqrestore(&rxq->lock, flags); spin_unlock_irqrestore(&rxq->lock, flags);
return; return;
} }
element = rxq->rx_used.next;
rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
list_del(element);
spin_unlock_irqrestore(&rxq->lock, flags); spin_unlock_irqrestore(&rxq->lock, flags);
/* Alloc a new receive buffer */ /* Alloc a new receive buffer */
rxb->skb = skb = alloc_skb(priv->hw_params.rx_buf_size, priority);
alloc_skb(priv->hw_params.rx_buf_size, if (!skb) {
priority);
if (!rxb->skb) {
if (net_ratelimit()) if (net_ratelimit())
IWL_CRIT(priv, ": Can not allocate SKB buffers\n"); IWL_CRIT(priv, ": Can not allocate SKB buffers\n");
/* We don't reschedule replenish work here -- we will /* We don't reschedule replenish work here -- we will
...@@ -1162,6 +1157,19 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority) ...@@ -1162,6 +1157,19 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority)
break; break;
} }
spin_lock_irqsave(&rxq->lock, flags);
if (list_empty(&rxq->rx_used)) {
spin_unlock_irqrestore(&rxq->lock, flags);
dev_kfree_skb_any(skb);
return;
}
element = rxq->rx_used.next;
rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
list_del(element);
spin_unlock_irqrestore(&rxq->lock, flags);
rxb->skb = skb;
/* If radiotap head is required, reserve some headroom here. /* If radiotap head is required, reserve some headroom here.
* The physical head count is a variable rx_stats->phy_count. * The physical head count is a variable rx_stats->phy_count.
* We reserve 4 bytes here. Plus these extra bytes, the * We reserve 4 bytes here. Plus these extra bytes, the
......
...@@ -600,6 +600,7 @@ static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out, ...@@ -600,6 +600,7 @@ static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out,
ssb_printk(KERN_WARNING PFX "Unsupported SPROM" ssb_printk(KERN_WARNING PFX "Unsupported SPROM"
" revision %d detected. Will extract" " revision %d detected. Will extract"
" v1\n", out->revision); " v1\n", out->revision);
out->revision = 1;
sprom_extract_r123(out, in); sprom_extract_r123(out, in);
} }
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "ssb_private.h" #include "ssb_private.h"
/* Define the following to 1 to enable a printk on each coreswitch. */ /* Define the following to 1 to enable a printk on each coreswitch. */
#define SSB_VERBOSE_SDIOCORESWITCH_DEBUG 1 #define SSB_VERBOSE_SDIOCORESWITCH_DEBUG 0
/* Hardware invariants CIS tuples */ /* Hardware invariants CIS tuples */
......
...@@ -662,7 +662,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, ...@@ -662,7 +662,7 @@ int cfg80211_wext_siwscan(struct net_device *dev,
int k; int k;
int wiphy_freq = wiphy->bands[band]->channels[j].center_freq; int wiphy_freq = wiphy->bands[band]->channels[j].center_freq;
for (k = 0; k < wreq->num_channels; k++) { for (k = 0; k < wreq->num_channels; k++) {
int wext_freq = wreq->channel_list[k].m / 100000; int wext_freq = cfg80211_wext_freq(wiphy, &wreq->channel_list[k]);
if (wext_freq == wiphy_freq) if (wext_freq == wiphy_freq)
goto wext_freq_found; goto wext_freq_found;
} }
...@@ -675,6 +675,11 @@ int cfg80211_wext_siwscan(struct net_device *dev, ...@@ -675,6 +675,11 @@ int cfg80211_wext_siwscan(struct net_device *dev,
wext_freq_not_found: ; wext_freq_not_found: ;
} }
} }
/* No channels found? */
if (!i) {
err = -EINVAL;
goto out;
}
/* Set real number of channels specified in creq->channels[] */ /* Set real number of channels specified in creq->channels[] */
creq->n_channels = i; creq->n_channels = i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment