Skip to content

Commit d26acd9

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: ipsec: Fix deadlock in xfrm_state management. ipv: Re-enable IP when MTU > 68 net/xfrm: Use an IS_ERR test rather than a NULL test ath9: Fix ath_rx_flush_tid() for IRQs disabled kernel warning message. ath9k: Incorrect key used when group and pairwise ciphers are different. rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON mac80211: Fix debugfs union misuse and pointer corruption wireless/libertas/if_cs.c: fix memory leaks orinoco: Multicast to the specified addresses iwlwifi: fix 64bit platform firmware loading iwlwifi: fix apm_stop (wrong bit polarity for FLAG_INIT_DONE) iwlwifi: workaround interrupt handling no some platforms iwlwifi: do not use GFP_DMA in iwl_tx_queue_init net/wireless/Kconfig: clarify the description for CONFIG_WIRELESS_EXT_SYSFS net: Unbreak userspace usage of linux/mroute.h pkt_sched: Fix locking of qdisc_root with qdisc_root_sleeping_lock() ipv6: When we droped a packet, we should return NET_RX_DROP instead of 0
2 parents fbb16e2 + 37b08e3 commit d26acd9

29 files changed

Lines changed: 102 additions & 90 deletions

File tree

‎drivers/net/wireless/ath9k/hw.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7285,15 +7285,15 @@ ath9k_hw_set_keycache_entry(struct ath_hal *ah, u16 entry,
72857285
}
72867286
break;
72877287
case ATH9K_CIPHER_WEP:
7288-
if (k->kv_len < 40 / NBBY) {
7288+
if (k->kv_len < LEN_WEP40) {
72897289
DPRINTF(ah->ah_sc, ATH_DBG_KEYCACHE,
72907290
"%s: WEP key length %u too small\n",
72917291
__func__, k->kv_len);
72927292
return false;
72937293
}
7294-
if (k->kv_len <= 40 / NBBY)
7294+
if (k->kv_len <= LEN_WEP40)
72957295
keyType = AR_KEYTABLE_TYPE_40;
7296-
else if (k->kv_len <= 104 / NBBY)
7296+
else if (k->kv_len <= LEN_WEP104)
72977297
keyType = AR_KEYTABLE_TYPE_104;
72987298
else
72997299
keyType = AR_KEYTABLE_TYPE_128;
@@ -7313,7 +7313,7 @@ ath9k_hw_set_keycache_entry(struct ath_hal *ah, u16 entry,
73137313
key2 = get_unaligned_le32(k->kv_val + 6) ^ xorMask;
73147314
key3 = (get_unaligned_le16(k->kv_val + 10) ^ xorMask) & 0xffff;
73157315
key4 = get_unaligned_le32(k->kv_val + 12) ^ xorMask;
7316-
if (k->kv_len <= 104 / NBBY)
7316+
if (k->kv_len <= LEN_WEP104)
73177317
key4 &= 0xff;
73187318

73197319
if (keyType == AR_KEYTABLE_TYPE_TKIP && ATH9K_IS_MIC_ENABLED(ah)) {

‎drivers/net/wireless/ath9k/main.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ static int ath_key_config(struct ath_softc *sc,
206206
if (!ret)
207207
return -EIO;
208208

209-
sc->sc_keytype = hk.kv_type;
209+
if (mac)
210+
sc->sc_keytype = hk.kv_type;
210211
return 0;
211212
}
212213

@@ -756,7 +757,8 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
756757
key->hw_key_idx = key->keyidx;
757758
/* push IV and Michael MIC generation to stack */
758759
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
759-
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
760+
if (key->alg == ALG_TKIP)
761+
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
760762
}
761763
break;
762764
case DISABLE_KEY:

‎drivers/net/wireless/ath9k/recv.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ static void ath_rx_flush_tid(struct ath_softc *sc,
360360
struct ath_arx_tid *rxtid, int drop)
361361
{
362362
struct ath_rxbuf *rxbuf;
363+
unsigned long flag;
363364

364-
spin_lock_bh(&rxtid->tidlock);
365+
spin_lock_irqsave(&rxtid->tidlock, flag);
365366
while (rxtid->baw_head != rxtid->baw_tail) {
366367
rxbuf = rxtid->rxbuf + rxtid->baw_head;
367368
if (!rxbuf->rx_wbuf) {
@@ -382,7 +383,7 @@ static void ath_rx_flush_tid(struct ath_softc *sc,
382383
INCR(rxtid->baw_head, ATH_TID_MAX_BUFS);
383384
INCR(rxtid->seq_next, IEEE80211_SEQ_MAX);
384385
}
385-
spin_unlock_bh(&rxtid->tidlock);
386+
spin_unlock_irqrestore(&rxtid->tidlock, flag);
386387
}
387388

388389
static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,8 @@ static void iwl4965_apm_stop(struct iwl_priv *priv)
474474
iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
475475

476476
udelay(10);
477-
478-
iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
477+
/* clear "init complete" move adapter D0A* --> D0U state */
478+
iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
479479
spin_unlock_irqrestore(&priv->lock, flags);
480480
}
481481

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ static void iwl5000_apm_stop(struct iwl_priv *priv)
145145

146146
udelay(10);
147147

148-
iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
148+
/* clear "init complete" move adapter D0A* --> D0U state */
149+
iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
149150

150151
spin_unlock_irqrestore(&priv->lock, flags);
151152
}
@@ -577,14 +578,11 @@ static int iwl5000_load_section(struct iwl_priv *priv,
577578
FH_TFDIB_CTRL0_REG(FH_SRVC_CHNL),
578579
phy_addr & FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK);
579580

580-
/* FIME: write the MSB of the phy_addr in CTRL1
581-
* iwl_write_direct32(priv,
582-
IWL_FH_TFDIB_CTRL1_REG(IWL_FH_SRVC_CHNL),
583-
((phy_addr & MSB_MSK)
584-
<< FH_MEM_TFDIB_REG1_ADDR_BITSHIFT) | byte_count);
585-
*/
586581
iwl_write_direct32(priv,
587-
FH_TFDIB_CTRL1_REG(FH_SRVC_CHNL), byte_cnt);
582+
FH_TFDIB_CTRL1_REG(FH_SRVC_CHNL),
583+
(iwl_get_dma_hi_address(phy_addr)
584+
<< FH_MEM_TFDIB_REG1_ADDR_BITSHIFT) | byte_cnt);
585+
588586
iwl_write_direct32(priv,
589587
FH_TCSR_CHNL_TX_BUF_STS_REG(FH_SRVC_CHNL),
590588
1 << FH_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_NUM |

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2602,6 +2602,7 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
26022602
{
26032603
struct iwl_priv *priv = hw->priv;
26042604
int ret;
2605+
u16 pci_cmd;
26052606

26062607
IWL_DEBUG_MAC80211("enter\n");
26072608

@@ -2612,6 +2613,13 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
26122613
pci_restore_state(priv->pci_dev);
26132614
pci_enable_msi(priv->pci_dev);
26142615

2616+
/* enable interrupts if needed: hw bug w/a */
2617+
pci_read_config_word(priv->pci_dev, PCI_COMMAND, &pci_cmd);
2618+
if (pci_cmd & PCI_COMMAND_INTX_DISABLE) {
2619+
pci_cmd &= ~PCI_COMMAND_INTX_DISABLE;
2620+
pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd);
2621+
}
2622+
26152623
ret = request_irq(priv->pci_dev->irq, iwl4965_isr, IRQF_SHARED,
26162624
DRV_NAME, priv);
26172625
if (ret) {

‎drivers/net/wireless/iwlwifi/iwl-fh.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@
287287

288288
#define FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000)
289289

290+
#define FH_MEM_TFDIB_REG1_ADDR_BITSHIFT 28
290291

291292
/**
292293
* Transmit DMA Channel Control/Status Registers (TCSR)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ static int iwl_tx_queue_init(struct iwl_priv *priv,
426426
continue;
427427
}
428428

429-
txq->cmd[i] = kmalloc(len, GFP_KERNEL | GFP_DMA);
429+
txq->cmd[i] = kmalloc(len, GFP_KERNEL);
430430
if (!txq->cmd[i])
431431
return -ENOMEM;
432432
}

‎drivers/net/wireless/libertas/if_cs.c‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static int if_cs_prog_helper(struct if_cs_card *card)
595595
if (ret < 0) {
596596
lbs_pr_err("can't download helper at 0x%x, ret %d\n",
597597
sent, ret);
598-
goto done;
598+
goto err_release;
599599
}
600600

601601
if (count == 0)
@@ -604,9 +604,8 @@ static int if_cs_prog_helper(struct if_cs_card *card)
604604
sent += count;
605605
}
606606

607+
err_release:
607608
release_firmware(fw);
608-
ret = 0;
609-
610609
done:
611610
lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);
612611
return ret;
@@ -676,14 +675,8 @@ static int if_cs_prog_real(struct if_cs_card *card)
676675
}
677676

678677
ret = if_cs_poll_while_fw_download(card, IF_CS_SCRATCH, 0x5a);
679-
if (ret < 0) {
678+
if (ret < 0)
680679
lbs_pr_err("firmware download failed\n");
681-
goto err_release;
682-
}
683-
684-
ret = 0;
685-
goto done;
686-
687680

688681
err_release:
689682
release_firmware(fw);

‎drivers/net/wireless/orinoco.c‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,9 @@ __orinoco_set_multicast_list(struct net_device *dev)
19701970
priv->promiscuous = promisc;
19711971
}
19721972

1973+
/* If we're not in promiscuous mode, then we need to set the
1974+
* group address if either we want to multicast, or if we were
1975+
* multicasting and want to stop */
19731976
if (! promisc && (mc_count || priv->mc_count) ) {
19741977
struct dev_mc_list *p = dev->mc_list;
19751978
struct hermes_multicast mclist;
@@ -1989,9 +1992,10 @@ __orinoco_set_multicast_list(struct net_device *dev)
19891992
printk(KERN_WARNING "%s: Multicast list is "
19901993
"longer than mc_count\n", dev->name);
19911994

1992-
err = hermes_write_ltv(hw, USER_BAP, HERMES_RID_CNFGROUPADDRESSES,
1993-
HERMES_BYTES_TO_RECLEN(priv->mc_count * ETH_ALEN),
1994-
&mclist);
1995+
err = hermes_write_ltv(hw, USER_BAP,
1996+
HERMES_RID_CNFGROUPADDRESSES,
1997+
HERMES_BYTES_TO_RECLEN(mc_count * ETH_ALEN),
1998+
&mclist);
19951999
if (err)
19962000
printk(KERN_ERR "%s: Error %d setting multicast list.\n",
19972001
dev->name, err);

0 commit comments

Comments
 (0)