Skip to content

Commit 60c2ce2

Browse files
committed
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2 parents 0e90ed0 + 690b0ca commit 60c2ce2

11 files changed

Lines changed: 46 additions & 35 deletions

File tree

‎drivers/net/wireless/ath/ath5k/eeprom.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -691,14 +691,12 @@ ath5k_eeprom_free_pcal_info(struct ath5k_hw *ah, int mode)
691691
if (!chinfo[pier].pd_curves)
692692
continue;
693693

694-
for (pdg = 0; pdg < ee->ee_pd_gains[mode]; pdg++) {
694+
for (pdg = 0; pdg < AR5K_EEPROM_N_PD_CURVES; pdg++) {
695695
struct ath5k_pdgain_info *pd =
696696
&chinfo[pier].pd_curves[pdg];
697697

698-
if (pd != NULL) {
699-
kfree(pd->pd_step);
700-
kfree(pd->pd_pwr);
701-
}
698+
kfree(pd->pd_step);
699+
kfree(pd->pd_pwr);
702700
}
703701

704702
kfree(chinfo[pier].pd_curves);

‎drivers/net/wireless/ath/ath9k/pci.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@ static int ath_pci_suspend(struct device *device)
278278

279279
ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
280280

281+
/* The device has to be moved to FULLSLEEP forcibly.
282+
* Otherwise the chip never moved to full sleep,
283+
* when no interface is up.
284+
*/
285+
ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP);
286+
281287
return 0;
282288
}
283289

‎drivers/net/wireless/iwlwifi/iwl-1000.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <net/mac80211.h>
3737
#include <linux/etherdevice.h>
3838
#include <asm/unaligned.h>
39+
#include <linux/stringify.h>
3940

4041
#include "iwl-eeprom.h"
4142
#include "iwl-dev.h"
@@ -55,10 +56,10 @@
5556
#define IWL100_UCODE_API_MIN 5
5657

5758
#define IWL1000_FW_PRE "iwlwifi-1000-"
58-
#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE #api ".ucode"
59+
#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
5960

6061
#define IWL100_FW_PRE "iwlwifi-100-"
61-
#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE #api ".ucode"
62+
#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
6263

6364

6465
/*

‎drivers/net/wireless/iwlwifi/iwl-2000.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <net/mac80211.h>
3737
#include <linux/etherdevice.h>
3838
#include <asm/unaligned.h>
39+
#include <linux/stringify.h>
3940

4041
#include "iwl-eeprom.h"
4142
#include "iwl-dev.h"
@@ -58,13 +59,13 @@
5859
#define IWL105_UCODE_API_MIN 5
5960

6061
#define IWL2030_FW_PRE "iwlwifi-2030-"
61-
#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE #api ".ucode"
62+
#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE __stringify(api) ".ucode"
6263

6364
#define IWL2000_FW_PRE "iwlwifi-2000-"
64-
#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE #api ".ucode"
65+
#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE __stringify(api) ".ucode"
6566

6667
#define IWL105_FW_PRE "iwlwifi-105-"
67-
#define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE #api ".ucode"
68+
#define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api) ".ucode"
6869

6970
static void iwl2000_set_ct_threshold(struct iwl_priv *priv)
7071
{

‎drivers/net/wireless/iwlwifi/iwl-5000.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <net/mac80211.h>
3838
#include <linux/etherdevice.h>
3939
#include <asm/unaligned.h>
40+
#include <linux/stringify.h>
4041

4142
#include "iwl-eeprom.h"
4243
#include "iwl-dev.h"
@@ -57,10 +58,10 @@
5758
#define IWL5150_UCODE_API_MIN 1
5859

5960
#define IWL5000_FW_PRE "iwlwifi-5000-"
60-
#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE #api ".ucode"
61+
#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
6162

6263
#define IWL5150_FW_PRE "iwlwifi-5150-"
63-
#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE #api ".ucode"
64+
#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
6465

6566
/* NIC configuration for 5000 series */
6667
static void iwl5000_nic_config(struct iwl_priv *priv)

‎drivers/net/wireless/iwlwifi/iwl-6000.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <net/mac80211.h>
3737
#include <linux/etherdevice.h>
3838
#include <asm/unaligned.h>
39+
#include <linux/stringify.h>
3940

4041
#include "iwl-eeprom.h"
4142
#include "iwl-dev.h"
@@ -58,16 +59,16 @@
5859
#define IWL6000G2_UCODE_API_MIN 4
5960

6061
#define IWL6000_FW_PRE "iwlwifi-6000-"
61-
#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
62+
#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
6263

6364
#define IWL6050_FW_PRE "iwlwifi-6050-"
64-
#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
65+
#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
6566

6667
#define IWL6005_FW_PRE "iwlwifi-6000g2a-"
67-
#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE #api ".ucode"
68+
#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
6869

6970
#define IWL6030_FW_PRE "iwlwifi-6000g2b-"
70-
#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE #api ".ucode"
71+
#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
7172

7273
static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
7374
{

‎drivers/net/wireless/iwlwifi/iwl-core.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1763,6 +1763,7 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
17631763
struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif);
17641764
struct iwl_rxon_context *bss_ctx = &priv->contexts[IWL_RXON_CTX_BSS];
17651765
struct iwl_rxon_context *tmp;
1766+
enum nl80211_iftype newviftype = newtype;
17661767
u32 interface_modes;
17671768
int err;
17681769

@@ -1818,7 +1819,7 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
18181819

18191820
/* success */
18201821
iwl_teardown_interface(priv, vif, true);
1821-
vif->type = newtype;
1822+
vif->type = newviftype;
18221823
vif->p2p = newp2p;
18231824
err = iwl_setup_interface(priv, ctx);
18241825
WARN_ON(err);

‎drivers/net/wireless/iwlwifi/iwl-tx.c‎

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static inline u8 iwl_tfd_get_num_tbs(struct iwl_tfd *tfd)
126126
}
127127

128128
static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta,
129-
struct iwl_tfd *tfd)
129+
struct iwl_tfd *tfd, int dma_dir)
130130
{
131131
struct pci_dev *dev = priv->pci_dev;
132132
int i;
@@ -151,7 +151,7 @@ static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta,
151151
/* Unmap chunks, if any. */
152152
for (i = 1; i < num_tbs; i++)
153153
pci_unmap_single(dev, iwl_tfd_tb_get_addr(tfd, i),
154-
iwl_tfd_tb_get_len(tfd, i), PCI_DMA_TODEVICE);
154+
iwl_tfd_tb_get_len(tfd, i), dma_dir);
155155
}
156156

157157
/**
@@ -167,7 +167,8 @@ void iwlagn_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
167167
struct iwl_tfd *tfd_tmp = txq->tfds;
168168
int index = txq->q.read_ptr;
169169

170-
iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index]);
170+
iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index],
171+
PCI_DMA_TODEVICE);
171172

172173
/* free SKB */
173174
if (txq->txb) {
@@ -310,9 +311,7 @@ void iwl_cmd_queue_unmap(struct iwl_priv *priv)
310311
i = get_cmd_index(q, q->read_ptr);
311312

312313
if (txq->meta[i].flags & CMD_MAPPED) {
313-
pci_unmap_single(priv->pci_dev,
314-
dma_unmap_addr(&txq->meta[i], mapping),
315-
dma_unmap_len(&txq->meta[i], len),
314+
iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i],
316315
PCI_DMA_BIDIRECTIONAL);
317316
txq->meta[i].flags = 0;
318317
}
@@ -535,12 +534,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
535534
void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq,
536535
int slots_num, u32 txq_id)
537536
{
538-
int actual_slots = slots_num;
539-
540-
if (txq_id == priv->cmd_queue)
541-
actual_slots++;
542-
543-
memset(txq->meta, 0, sizeof(struct iwl_cmd_meta) * actual_slots);
537+
memset(txq->meta, 0, sizeof(struct iwl_cmd_meta) * slots_num);
544538

545539
txq->need_update = 0;
546540

@@ -700,10 +694,11 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
700694
if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY))
701695
continue;
702696
phys_addr = pci_map_single(priv->pci_dev, (void *)cmd->data[i],
703-
cmd->len[i], PCI_DMA_TODEVICE);
697+
cmd->len[i], PCI_DMA_BIDIRECTIONAL);
704698
if (pci_dma_mapping_error(priv->pci_dev, phys_addr)) {
705699
iwlagn_unmap_tfd(priv, out_meta,
706-
&txq->tfds[q->write_ptr]);
700+
&txq->tfds[q->write_ptr],
701+
PCI_DMA_BIDIRECTIONAL);
707702
idx = -ENOMEM;
708703
goto out;
709704
}
@@ -807,7 +802,7 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
807802
cmd = txq->cmd[cmd_index];
808803
meta = &txq->meta[cmd_index];
809804

810-
iwlagn_unmap_tfd(priv, meta, &txq->tfds[index]);
805+
iwlagn_unmap_tfd(priv, meta, &txq->tfds[index], PCI_DMA_BIDIRECTIONAL);
811806

812807
/* Input error checking is done when commands are added to queue. */
813808
if (meta->flags & CMD_WANT_SKB) {

‎include/net/cfg80211.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2688,7 +2688,7 @@ void cfg80211_send_unprot_disassoc(struct net_device *dev, const u8 *buf,
26882688
* @dev: network device
26892689
* @addr: The source MAC address of the frame
26902690
* @key_type: The key type that the received frame used
2691-
* @key_id: Key identifier (0..3)
2691+
* @key_id: Key identifier (0..3). Can be -1 if missing.
26922692
* @tsc: The TSC value of the frame that generated the MIC failure (6 octets)
26932693
* @gfp: allocation flags
26942694
*

‎net/mac80211/wpa.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,13 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
154154
return RX_CONTINUE;
155155

156156
mic_fail:
157-
mac80211_ev_michael_mic_failure(rx->sdata, rx->key->conf.keyidx,
157+
/*
158+
* In some cases the key can be unset - e.g. a multicast packet, in
159+
* a driver that supports HW encryption. Send up the key idx only if
160+
* the key is set.
161+
*/
162+
mac80211_ev_michael_mic_failure(rx->sdata,
163+
rx->key ? rx->key->conf.keyidx : -1,
158164
(void *) skb->data, NULL, GFP_ATOMIC);
159165
return RX_DROP_UNUSABLE;
160166
}

0 commit comments

Comments
 (0)