diff --git a/[refs] b/[refs]
index f3ab8fd15cc3..14afa9556f84 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: 3806b4f3b6115ce324b7125844f9e6acc80d34ec
+refs/heads/master: f31e8d4982653b39fe312f9938be0f49dd9ab5fa
diff --git a/trunk/Documentation/DocBook/80211.tmpl b/trunk/Documentation/DocBook/80211.tmpl
index 8906648f962b..03641a08e275 100644
--- a/trunk/Documentation/DocBook/80211.tmpl
+++ b/trunk/Documentation/DocBook/80211.tmpl
@@ -268,6 +268,10 @@
!Finclude/net/mac80211.h ieee80211_ops
!Finclude/net/mac80211.h ieee80211_alloc_hw
!Finclude/net/mac80211.h ieee80211_register_hw
+!Finclude/net/mac80211.h ieee80211_get_tx_led_name
+!Finclude/net/mac80211.h ieee80211_get_rx_led_name
+!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
+!Finclude/net/mac80211.h ieee80211_get_radio_led_name
!Finclude/net/mac80211.h ieee80211_unregister_hw
!Finclude/net/mac80211.h ieee80211_free_hw
@@ -378,23 +382,6 @@
-
- LED support
-
- Mac80211 supports various ways of blinking LEDs. Wherever possible,
- device LEDs should be exposed as LED class devices and hooked up to
- the appropriate trigger, which will then be triggered appropriately
- by mac80211.
-
-!Finclude/net/mac80211.h ieee80211_get_tx_led_name
-!Finclude/net/mac80211.h ieee80211_get_rx_led_name
-!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
-!Finclude/net/mac80211.h ieee80211_get_radio_led_name
-!Finclude/net/mac80211.h ieee80211_tpt_blink
-!Finclude/net/mac80211.h ieee80211_tpt_led_trigger_flags
-!Finclude/net/mac80211.h ieee80211_create_tpt_led_trigger
-
-
Hardware crypto acceleration
!Pinclude/net/mac80211.h Hardware crypto acceleration
diff --git a/trunk/drivers/net/Kconfig b/trunk/drivers/net/Kconfig
index ff652c77a0a5..5780dad6a3cb 100644
--- a/trunk/drivers/net/Kconfig
+++ b/trunk/drivers/net/Kconfig
@@ -1950,6 +1950,14 @@ config FEC
Say Y here if you want to use the built-in 10/100 Fast ethernet
controller on some Motorola ColdFire and Freescale i.MX processors.
+config FEC2
+ bool "Second FEC ethernet controller"
+ depends on FEC
+ help
+ Say Y here if you want to use the second built-in 10/100 Fast
+ ethernet controller on some Motorola ColdFire and Freescale
+ i.MX processors.
+
config FEC_MPC52xx
tristate "MPC52xx FEC driver"
depends on PPC_MPC52xx && PPC_BESTCOMM
diff --git a/trunk/drivers/net/bfin_mac.c b/trunk/drivers/net/bfin_mac.c
index fe75e7a9742e..ce1e5e9d06f6 100644
--- a/trunk/drivers/net/bfin_mac.c
+++ b/trunk/drivers/net/bfin_mac.c
@@ -8,11 +8,6 @@
* Licensed under the GPL-2 or later.
*/
-#define DRV_VERSION "1.1"
-#define DRV_DESC "Blackfin on-chip Ethernet MAC driver"
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
#include
#include
#include
@@ -46,7 +41,12 @@
#include "bfin_mac.h"
-MODULE_AUTHOR("Bryan Wu, Luke Yang");
+#define DRV_NAME "bfin_mac"
+#define DRV_VERSION "1.1"
+#define DRV_AUTHOR "Bryan Wu, Luke Yang"
+#define DRV_DESC "Blackfin on-chip Ethernet MAC driver"
+
+MODULE_AUTHOR(DRV_AUTHOR);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION(DRV_DESC);
MODULE_ALIAS("platform:bfin_mac");
@@ -189,7 +189,8 @@ static int desc_list_init(void)
/* allocate a new skb for next time receive */
new_skb = dev_alloc_skb(PKT_BUF_SZ + NET_IP_ALIGN);
if (!new_skb) {
- pr_notice("init: low on mem - packet dropped\n");
+ printk(KERN_NOTICE DRV_NAME
+ ": init: low on mem - packet dropped\n");
goto init_error;
}
skb_reserve(new_skb, NET_IP_ALIGN);
@@ -239,7 +240,7 @@ static int desc_list_init(void)
init_error:
desc_list_free();
- pr_err("kmalloc failed\n");
+ printk(KERN_ERR DRV_NAME ": kmalloc failed\n");
return -ENOMEM;
}
@@ -258,7 +259,8 @@ static int bfin_mdio_poll(void)
while ((bfin_read_EMAC_STAADD()) & STABUSY) {
udelay(1);
if (timeout_cnt-- < 0) {
- pr_err("wait MDC/MDIO transaction to complete timeout\n");
+ printk(KERN_ERR DRV_NAME
+ ": wait MDC/MDIO transaction to complete timeout\n");
return -ETIMEDOUT;
}
}
@@ -348,9 +350,9 @@ static void bfin_mac_adjust_link(struct net_device *dev)
opmode &= ~RMII_10;
break;
default:
- netdev_warn(dev,
- "Ack! Speed (%d) is not 10/100!\n",
- phydev->speed);
+ printk(KERN_WARNING
+ "%s: Ack! Speed (%d) is not 10/100!\n",
+ DRV_NAME, phydev->speed);
break;
}
bfin_write_EMAC_OPMODE(opmode);
@@ -415,13 +417,14 @@ static int mii_probe(struct net_device *dev, int phy_mode)
/* now we are supposed to have a proper phydev, to attach to... */
if (!phydev) {
- netdev_err(dev, "no phy device found\n");
+ printk(KERN_INFO "%s: Don't found any phy device at all\n",
+ dev->name);
return -ENODEV;
}
if (phy_mode != PHY_INTERFACE_MODE_RMII &&
phy_mode != PHY_INTERFACE_MODE_MII) {
- netdev_err(dev, "invalid phy interface mode\n");
+ printk(KERN_INFO "%s: Invalid phy interface mode\n", dev->name);
return -EINVAL;
}
@@ -429,7 +432,7 @@ static int mii_probe(struct net_device *dev, int phy_mode)
0, phy_mode);
if (IS_ERR(phydev)) {
- netdev_err(dev, "could not attach PHY\n");
+ printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
return PTR_ERR(phydev);
}
@@ -450,10 +453,11 @@ static int mii_probe(struct net_device *dev, int phy_mode)
lp->old_duplex = -1;
lp->phydev = phydev;
- pr_info("attached PHY driver [%s] "
- "(mii_bus:phy_addr=%s, irq=%d, mdc_clk=%dHz(mdc_div=%d)@sclk=%dMHz)\n",
- phydev->drv->name, dev_name(&phydev->dev), phydev->irq,
- MDC_CLK, mdc_div, sclk/1000000);
+ printk(KERN_INFO "%s: attached PHY driver [%s] "
+ "(mii_bus:phy_addr=%s, irq=%d, mdc_clk=%dHz(mdc_div=%d)"
+ "@sclk=%dMHz)\n",
+ DRV_NAME, phydev->drv->name, dev_name(&phydev->dev), phydev->irq,
+ MDC_CLK, mdc_div, sclk/1000000);
return 0;
}
@@ -498,7 +502,7 @@ bfin_mac_ethtool_setsettings(struct net_device *dev, struct ethtool_cmd *cmd)
static void bfin_mac_ethtool_getdrvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
- strcpy(info->driver, KBUILD_MODNAME);
+ strcpy(info->driver, DRV_NAME);
strcpy(info->version, DRV_VERSION);
strcpy(info->fw_version, "N/A");
strcpy(info->bus_info, dev_name(&dev->dev));
@@ -558,7 +562,7 @@ static const struct ethtool_ops bfin_mac_ethtool_ops = {
};
/**************************************************************************/
-static void setup_system_regs(struct net_device *dev)
+void setup_system_regs(struct net_device *dev)
{
struct bfin_mac_local *lp = netdev_priv(dev);
int i;
@@ -588,10 +592,6 @@ static void setup_system_regs(struct net_device *dev)
bfin_write_EMAC_MMC_CTL(RSTC | CROLL);
- /* Set vlan regs to let 1522 bytes long packets pass through */
- bfin_write_EMAC_VLAN1(lp->vlan1_mask);
- bfin_write_EMAC_VLAN2(lp->vlan2_mask);
-
/* Initialize the TX DMA channel registers */
bfin_write_DMA2_X_COUNT(0);
bfin_write_DMA2_X_MODIFY(4);
@@ -827,7 +827,8 @@ static void bfin_tx_hwtstamp(struct net_device *netdev, struct sk_buff *skb)
while ((!(bfin_read_EMAC_PTP_ISTAT() & TXTL)) && (--timeout_cnt))
udelay(1);
if (timeout_cnt == 0)
- netdev_err(netdev, "timestamp the TX packet failed\n");
+ printk(KERN_ERR DRV_NAME
+ ": fails to timestamp the TX packet\n");
else {
struct skb_shared_hwtstamps shhwtstamps;
u64 ns;
@@ -1082,7 +1083,8 @@ static void bfin_mac_rx(struct net_device *dev)
* we which case we simply drop the packet
*/
if (current_rx_ptr->status.status_word & RX_ERROR_MASK) {
- netdev_notice(dev, "rx: receive error - packet dropped\n");
+ printk(KERN_NOTICE DRV_NAME
+ ": rx: receive error - packet dropped\n");
dev->stats.rx_dropped++;
goto out;
}
@@ -1092,7 +1094,8 @@ static void bfin_mac_rx(struct net_device *dev)
new_skb = dev_alloc_skb(PKT_BUF_SZ + NET_IP_ALIGN);
if (!new_skb) {
- netdev_notice(dev, "rx: low on mem - packet dropped\n");
+ printk(KERN_NOTICE DRV_NAME
+ ": rx: low on mem - packet dropped\n");
dev->stats.rx_dropped++;
goto out;
}
@@ -1210,7 +1213,7 @@ static int bfin_mac_enable(struct phy_device *phydev)
int ret;
u32 opmode;
- pr_debug("%s\n", __func__);
+ pr_debug("%s: %s\n", DRV_NAME, __func__);
/* Set RX DMA */
bfin_write_DMA1_NEXT_DESC_PTR(&(rx_list_head->desc_a));
@@ -1293,7 +1296,7 @@ static void bfin_mac_multicast_hash(struct net_device *dev)
addrs = ha->addr;
/* skip non-multicast addresses */
- if (!is_multicast_ether_addr(addrs))
+ if (!(*addrs & 1))
continue;
crc = ether_crc(ETH_ALEN, addrs);
@@ -1320,7 +1323,7 @@ static void bfin_mac_set_multicast_list(struct net_device *dev)
u32 sysctl;
if (dev->flags & IFF_PROMISC) {
- netdev_info(dev, "set promisc mode\n");
+ printk(KERN_INFO "%s: set to promisc mode\n", dev->name);
sysctl = bfin_read_EMAC_OPMODE();
sysctl |= PR;
bfin_write_EMAC_OPMODE(sysctl);
@@ -1390,7 +1393,7 @@ static int bfin_mac_open(struct net_device *dev)
* address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
*/
if (!is_valid_ether_addr(dev->dev_addr)) {
- netdev_warn(dev, "no valid ethernet hw addr\n");
+ printk(KERN_WARNING DRV_NAME ": no valid ethernet hw addr\n");
return -EINVAL;
}
@@ -1524,9 +1527,6 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
goto out_err_mii_probe;
}
- lp->vlan1_mask = ETH_P_8021Q | mii_bus_data->vlan1_mask;
- lp->vlan2_mask = ETH_P_8021Q | mii_bus_data->vlan2_mask;
-
/* Fill in the fields of the device structure with ethernet values. */
ether_setup(ndev);
@@ -1558,7 +1558,7 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
bfin_mac_hwtstamp_init(ndev);
/* now, print out the card info, in a short format.. */
- netdev_info(ndev, "%s, Version %s\n", DRV_DESC, DRV_VERSION);
+ dev_info(&pdev->dev, "%s, Version %s\n", DRV_DESC, DRV_VERSION);
return 0;
@@ -1650,7 +1650,7 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev)
* so set the GPIO pins to Ethernet mode
*/
pin_req = mii_bus_pd->mac_peripherals;
- rc = peripheral_request_list(pin_req, KBUILD_MODNAME);
+ rc = peripheral_request_list(pin_req, DRV_NAME);
if (rc) {
dev_err(&pdev->dev, "Requesting peripherals failed!\n");
return rc;
@@ -1739,7 +1739,7 @@ static struct platform_driver bfin_mac_driver = {
.resume = bfin_mac_resume,
.suspend = bfin_mac_suspend,
.driver = {
- .name = KBUILD_MODNAME,
+ .name = DRV_NAME,
.owner = THIS_MODULE,
},
};
diff --git a/trunk/drivers/net/bfin_mac.h b/trunk/drivers/net/bfin_mac.h
index f8559ac9a403..aed68bed2365 100644
--- a/trunk/drivers/net/bfin_mac.h
+++ b/trunk/drivers/net/bfin_mac.h
@@ -17,14 +17,7 @@
#include
#include
-/*
- * Disable hardware checksum for bug #5600 if writeback cache is
- * enabled. Otherwize, corrupted RX packet will be sent up stack
- * without error mark.
- */
-#ifndef CONFIG_BFIN_EXTMEM_WRITEBACK
#define BFIN_MAC_CSUM_OFFLOAD
-#endif
#define TX_RECLAIM_JIFFIES (HZ / 5)
@@ -75,6 +68,7 @@ struct bfin_mac_local {
*/
struct net_device_stats stats;
+ unsigned char Mac[6]; /* MAC address of the board */
spinlock_t lock;
int wol; /* Wake On Lan */
@@ -82,9 +76,6 @@ struct bfin_mac_local {
struct timer_list tx_reclaim_timer;
struct net_device *ndev;
- /* Data for EMAC_VLAN1 regs */
- u16 vlan1_mask, vlan2_mask;
-
/* MII and PHY stuffs */
int old_link; /* used by bf537_adjust_link */
int old_speed;
diff --git a/trunk/drivers/net/bna/bnad_ethtool.c b/trunk/drivers/net/bna/bnad_ethtool.c
index 142d6047da27..99be5ae91991 100644
--- a/trunk/drivers/net/bna/bnad_ethtool.c
+++ b/trunk/drivers/net/bna/bnad_ethtool.c
@@ -275,6 +275,7 @@ bnad_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
ioc_attr = kzalloc(sizeof(*ioc_attr), GFP_KERNEL);
if (ioc_attr) {
+ memset(ioc_attr, 0, sizeof(*ioc_attr));
spin_lock_irqsave(&bnad->bna_lock, flags);
bfa_nw_ioc_get_attr(&bnad->bna.device.ioc, ioc_attr);
spin_unlock_irqrestore(&bnad->bna_lock, flags);
diff --git a/trunk/drivers/net/cxgb4vf/cxgb4vf_main.c b/trunk/drivers/net/cxgb4vf/cxgb4vf_main.c
index 56166ae2059f..3c403f895750 100644
--- a/trunk/drivers/net/cxgb4vf/cxgb4vf_main.c
+++ b/trunk/drivers/net/cxgb4vf/cxgb4vf_main.c
@@ -749,19 +749,13 @@ static int cxgb4vf_open(struct net_device *dev)
netif_set_real_num_tx_queues(dev, pi->nqsets);
err = netif_set_real_num_rx_queues(dev, pi->nqsets);
if (err)
- goto err_unwind;
+ return err;
+ set_bit(pi->port_id, &adapter->open_device_map);
err = link_start(dev);
if (err)
- goto err_unwind;
-
+ return err;
netif_tx_start_all_queues(dev);
- set_bit(pi->port_id, &adapter->open_device_map);
return 0;
-
-err_unwind:
- if (adapter->open_device_map == 0)
- adapter_down(adapter);
- return err;
}
/*
@@ -770,12 +764,13 @@ static int cxgb4vf_open(struct net_device *dev)
*/
static int cxgb4vf_stop(struct net_device *dev)
{
+ int ret;
struct port_info *pi = netdev_priv(dev);
struct adapter *adapter = pi->adapter;
netif_tx_stop_all_queues(dev);
netif_carrier_off(dev);
- t4vf_enable_vi(adapter, pi->viid, false, false);
+ ret = t4vf_enable_vi(adapter, pi->viid, false, false);
pi->link_cfg.link_ok = 0;
clear_bit(pi->port_id, &adapter->open_device_map);
diff --git a/trunk/drivers/net/cxgb4vf/t4vf_hw.c b/trunk/drivers/net/cxgb4vf/t4vf_hw.c
index 0f51c80475ce..e4bec78c8e3f 100644
--- a/trunk/drivers/net/cxgb4vf/t4vf_hw.c
+++ b/trunk/drivers/net/cxgb4vf/t4vf_hw.c
@@ -147,20 +147,9 @@ int t4vf_wr_mbox_core(struct adapter *adapter, const void *cmd, int size,
/*
* Write the command array into the Mailbox Data register array and
* transfer ownership of the mailbox to the firmware.
- *
- * For the VFs, the Mailbox Data "registers" are actually backed by
- * T4's "MA" interface rather than PL Registers (as is the case for
- * the PFs). Because these are in different coherency domains, the
- * write to the VF's PL-register-backed Mailbox Control can race in
- * front of the writes to the MA-backed VF Mailbox Data "registers".
- * So we need to do a read-back on at least one byte of the VF Mailbox
- * Data registers before doing the write to the VF Mailbox Control
- * register.
*/
for (i = 0, p = cmd; i < size; i += 8)
t4_write_reg64(adapter, mbox_data + i, be64_to_cpu(*p++));
- t4_read_reg(adapter, mbox_data); /* flush write */
-
t4_write_reg(adapter, mbox_ctl,
MBMSGVALID | MBOWNER(MBOX_OWNER_FW));
t4_read_reg(adapter, mbox_ctl); /* flush write */
diff --git a/trunk/drivers/net/ehea/ehea.h b/trunk/drivers/net/ehea/ehea.h
index 6c7257bd73fc..a724a2d14506 100644
--- a/trunk/drivers/net/ehea/ehea.h
+++ b/trunk/drivers/net/ehea/ehea.h
@@ -40,7 +40,7 @@
#include
#define DRV_NAME "ehea"
-#define DRV_VERSION "EHEA_0107"
+#define DRV_VERSION "EHEA_0106"
/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
diff --git a/trunk/drivers/net/ehea/ehea_main.c b/trunk/drivers/net/ehea/ehea_main.c
index f75d3144b8a5..1032b5bbe238 100644
--- a/trunk/drivers/net/ehea/ehea_main.c
+++ b/trunk/drivers/net/ehea/ehea_main.c
@@ -437,7 +437,7 @@ static void ehea_init_fill_rq1(struct ehea_port_res *pr, int nr_rq1a)
}
}
/* Ring doorbell */
- ehea_update_rq1a(pr->qp, i - 1);
+ ehea_update_rq1a(pr->qp, i);
}
static int ehea_refill_rq_def(struct ehea_port_res *pr,
@@ -1329,7 +1329,9 @@ static int ehea_fill_port_res(struct ehea_port_res *pr)
int ret;
struct ehea_qp_init_attr *init_attr = &pr->qp->init_attr;
- ehea_init_fill_rq1(pr, pr->rq1_skba.len);
+ ehea_init_fill_rq1(pr, init_attr->act_nr_rwqes_rq1
+ - init_attr->act_nr_rwqes_rq2
+ - init_attr->act_nr_rwqes_rq3 - 1);
ret = ehea_refill_rq2(pr, init_attr->act_nr_rwqes_rq2 - 1);
diff --git a/trunk/drivers/net/mlx4/en_netdev.c b/trunk/drivers/net/mlx4/en_netdev.c
index 897f576b8b17..6d6806b361e3 100644
--- a/trunk/drivers/net/mlx4/en_netdev.c
+++ b/trunk/drivers/net/mlx4/en_netdev.c
@@ -972,8 +972,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
int i;
int err;
- dev = alloc_etherdev_mqs(sizeof(struct mlx4_en_priv),
- prof->tx_ring_num, prof->rx_ring_num);
+ dev = alloc_etherdev_mq(sizeof(struct mlx4_en_priv), prof->tx_ring_num);
if (dev == NULL) {
mlx4_err(mdev, "Net device allocation failed\n");
return -ENOMEM;
diff --git a/trunk/drivers/net/pcmcia/pcnet_cs.c b/trunk/drivers/net/pcmcia/pcnet_cs.c
index e953793a33ff..2c158910f7ea 100644
--- a/trunk/drivers/net/pcmcia/pcnet_cs.c
+++ b/trunk/drivers/net/pcmcia/pcnet_cs.c
@@ -1536,7 +1536,6 @@ static struct pcmcia_device_id pcnet_ids[] = {
PCMCIA_DEVICE_PROD_ID12("CONTEC", "C-NET(PC)C-10L", 0x21cab552, 0xf6f90722),
PCMCIA_DEVICE_PROD_ID12("corega", "FEther PCC-TXF", 0x0a21501a, 0xa51564a2),
PCMCIA_DEVICE_PROD_ID12("corega", "Ether CF-TD", 0x0a21501a, 0x6589340a),
- PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega Ether CF-TD LAN Card", 0x5261440f, 0x8797663b),
PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-T", 0x5261440f, 0xfa9d85bd),
PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-TD", 0x5261440f, 0xc49bd73d),
PCMCIA_DEVICE_PROD_ID12("Corega K.K.", "corega EtherII PCC-TD", 0xd4fdcbd8, 0xc49bd73d),
diff --git a/trunk/drivers/net/ppp_async.c b/trunk/drivers/net/ppp_async.c
index a1b82c9c67d2..78d70a6481bf 100644
--- a/trunk/drivers/net/ppp_async.c
+++ b/trunk/drivers/net/ppp_async.c
@@ -32,7 +32,6 @@
#include
#include
#include
-#include
#include
#include
@@ -543,7 +542,7 @@ ppp_async_encode(struct asyncppp *ap)
data = ap->tpkt->data;
count = ap->tpkt->len;
fcs = ap->tfcs;
- proto = get_unaligned_be16(data);
+ proto = (data[0] << 8) + data[1];
/*
* LCP packets with code values between 1 (configure-reqest)
@@ -964,7 +963,7 @@ static void async_lcp_peek(struct asyncppp *ap, unsigned char *data,
code = data[0];
if (code != CONFACK && code != CONFREQ)
return;
- dlen = get_unaligned_be16(data + 2);
+ dlen = (data[2] << 8) + data[3];
if (len < dlen)
return; /* packet got truncated or length is bogus */
@@ -998,14 +997,15 @@ static void async_lcp_peek(struct asyncppp *ap, unsigned char *data,
while (dlen >= 2 && dlen >= data[1] && data[1] >= 2) {
switch (data[0]) {
case LCP_MRU:
- val = get_unaligned_be16(data + 2);
+ val = (data[2] << 8) + data[3];
if (inbound)
ap->mru = val;
else
ap->chan.mtu = val;
break;
case LCP_ASYNCMAP:
- val = get_unaligned_be32(data + 2);
+ val = (data[2] << 24) + (data[3] << 16)
+ + (data[4] << 8) + data[5];
if (inbound)
ap->raccm = val;
else
diff --git a/trunk/drivers/net/ppp_deflate.c b/trunk/drivers/net/ppp_deflate.c
index 43583309a65d..695bc83e0cfd 100644
--- a/trunk/drivers/net/ppp_deflate.c
+++ b/trunk/drivers/net/ppp_deflate.c
@@ -41,7 +41,6 @@
#include
#include
-#include
/*
* State for a Deflate (de)compressor.
@@ -233,9 +232,11 @@ static int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf,
*/
wptr[0] = PPP_ADDRESS(rptr);
wptr[1] = PPP_CONTROL(rptr);
- put_unaligned_be16(PPP_COMP, wptr + 2);
+ wptr[2] = PPP_COMP >> 8;
+ wptr[3] = PPP_COMP;
wptr += PPP_HDRLEN;
- put_unaligned_be16(state->seqno, wptr);
+ wptr[0] = state->seqno >> 8;
+ wptr[1] = state->seqno;
wptr += DEFLATE_OVHD;
olen = PPP_HDRLEN + DEFLATE_OVHD;
state->strm.next_out = wptr;
@@ -450,7 +451,7 @@ static int z_decompress(void *arg, unsigned char *ibuf, int isize,
}
/* Check the sequence number. */
- seq = get_unaligned_be16(ibuf + PPP_HDRLEN);
+ seq = (ibuf[PPP_HDRLEN] << 8) + ibuf[PPP_HDRLEN+1];
if (seq != (state->seqno & 0xffff)) {
if (state->debug)
printk(KERN_DEBUG "z_decompress%d: bad seq # %d, expected %d\n",
diff --git a/trunk/drivers/net/ppp_generic.c b/trunk/drivers/net/ppp_generic.c
index c7a6c4466978..6456484c0299 100644
--- a/trunk/drivers/net/ppp_generic.c
+++ b/trunk/drivers/net/ppp_generic.c
@@ -46,7 +46,6 @@
#include
#include
#include
-#include
#include
#include
@@ -211,7 +210,7 @@ struct ppp_net {
};
/* Get the PPP protocol number from a skb */
-#define PPP_PROTO(skb) get_unaligned_be16((skb)->data)
+#define PPP_PROTO(skb) (((skb)->data[0] << 8) + (skb)->data[1])
/* We limit the length of ppp->file.rq to this (arbitrary) value */
#define PPP_MAX_RQLEN 32
@@ -965,7 +964,8 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
pp = skb_push(skb, 2);
proto = npindex_to_proto[npi];
- put_unaligned_be16(proto, pp);
+ pp[0] = proto >> 8;
+ pp[1] = proto;
netif_stop_queue(dev);
skb_queue_tail(&ppp->file.xq, skb);
@@ -1473,7 +1473,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
q = skb_put(frag, flen + hdrlen);
/* make the MP header */
- put_unaligned_be16(PPP_MP, q);
+ q[0] = PPP_MP >> 8;
+ q[1] = PPP_MP;
if (ppp->flags & SC_MP_XSHORTSEQ) {
q[2] = bits + ((ppp->nxseq >> 8) & 0xf);
q[3] = ppp->nxseq;
diff --git a/trunk/drivers/net/ppp_mppe.c b/trunk/drivers/net/ppp_mppe.c
index 9a1849a83e2a..6d1a1b80cc3e 100644
--- a/trunk/drivers/net/ppp_mppe.c
+++ b/trunk/drivers/net/ppp_mppe.c
@@ -55,7 +55,6 @@
#include
#include
#include
-#include
#include "ppp_mppe.h"
@@ -396,14 +395,16 @@ mppe_compress(void *arg, unsigned char *ibuf, unsigned char *obuf,
*/
obuf[0] = PPP_ADDRESS(ibuf);
obuf[1] = PPP_CONTROL(ibuf);
- put_unaligned_be16(PPP_COMP, obuf + 2);
+ obuf[2] = PPP_COMP >> 8; /* isize + MPPE_OVHD + 1 */
+ obuf[3] = PPP_COMP; /* isize + MPPE_OVHD + 2 */
obuf += PPP_HDRLEN;
state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE;
if (state->debug >= 7)
printk(KERN_DEBUG "mppe_compress[%d]: ccount %d\n", state->unit,
state->ccount);
- put_unaligned_be16(state->ccount, obuf);
+ obuf[0] = state->ccount >> 8;
+ obuf[1] = state->ccount & 0xff;
if (!state->stateful || /* stateless mode */
((state->ccount & 0xff) == 0xff) || /* "flag" packet */
diff --git a/trunk/drivers/net/ppp_synctty.c b/trunk/drivers/net/ppp_synctty.c
index 4e6b72f57de8..4c95ec3fb8d4 100644
--- a/trunk/drivers/net/ppp_synctty.c
+++ b/trunk/drivers/net/ppp_synctty.c
@@ -45,7 +45,6 @@
#include
#include
#include
-#include
#include
#define PPP_VERSION "2.4.2"
@@ -564,7 +563,7 @@ ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb)
int islcp;
data = skb->data;
- proto = get_unaligned_be16(data);
+ proto = (data[0] << 8) + data[1];
/* LCP packets with codes between 1 (configure-request)
* and 7 (code-reject) must be sent as though no options
diff --git a/trunk/drivers/net/qlcnic/qlcnic.h b/trunk/drivers/net/qlcnic/qlcnic.h
index 44e316fd67b8..9c2a02d204dc 100644
--- a/trunk/drivers/net/qlcnic/qlcnic.h
+++ b/trunk/drivers/net/qlcnic/qlcnic.h
@@ -34,8 +34,8 @@
#define _QLCNIC_LINUX_MAJOR 5
#define _QLCNIC_LINUX_MINOR 0
-#define _QLCNIC_LINUX_SUBVERSION 15
-#define QLCNIC_LINUX_VERSIONID "5.0.15"
+#define _QLCNIC_LINUX_SUBVERSION 14
+#define QLCNIC_LINUX_VERSIONID "5.0.14"
#define QLCNIC_DRV_IDC_VER 0x01
#define QLCNIC_DRIVER_VERSION ((_QLCNIC_LINUX_MAJOR << 16) |\
(_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
@@ -289,26 +289,6 @@ struct uni_data_desc{
u32 reserved[5];
};
-/* Flash Defines and Structures */
-#define QLCNIC_FLT_LOCATION 0x3F1000
-#define QLCNIC_FW_IMAGE_REGION 0x74
-struct qlcnic_flt_header {
- u16 version;
- u16 len;
- u16 checksum;
- u16 reserved;
-};
-
-struct qlcnic_flt_entry {
- u8 region;
- u8 reserved0;
- u8 attrib;
- u8 reserved1;
- u32 size;
- u32 start_addr;
- u32 end_add;
-};
-
/* Magic number to let user know flash is programmed */
#define QLCNIC_BDINFO_MAGIC 0x12345678
diff --git a/trunk/drivers/net/qlcnic/qlcnic_ethtool.c b/trunk/drivers/net/qlcnic/qlcnic_ethtool.c
index 4c14510e2a87..1e7af709d395 100644
--- a/trunk/drivers/net/qlcnic/qlcnic_ethtool.c
+++ b/trunk/drivers/net/qlcnic/qlcnic_ethtool.c
@@ -672,7 +672,7 @@ qlcnic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
if (data[1])
eth_test->flags |= ETH_TEST_FL_FAILED;
- if (eth_test->flags & ETH_TEST_FL_OFFLINE) {
+ if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
data[2] = qlcnic_irq_test(dev);
if (data[2])
eth_test->flags |= ETH_TEST_FL_FAILED;
diff --git a/trunk/drivers/net/qlcnic/qlcnic_init.c b/trunk/drivers/net/qlcnic/qlcnic_init.c
index a7f1d5b7e811..9b9c7c39d3ee 100644
--- a/trunk/drivers/net/qlcnic/qlcnic_init.c
+++ b/trunk/drivers/net/qlcnic/qlcnic_init.c
@@ -627,73 +627,12 @@ qlcnic_setup_idc_param(struct qlcnic_adapter *adapter) {
return 0;
}
-static int qlcnic_get_flt_entry(struct qlcnic_adapter *adapter, u8 region,
- struct qlcnic_flt_entry *region_entry)
-{
- struct qlcnic_flt_header flt_hdr;
- struct qlcnic_flt_entry *flt_entry;
- int i = 0, ret;
- u32 entry_size;
-
- memset(region_entry, 0, sizeof(struct qlcnic_flt_entry));
- ret = qlcnic_rom_fast_read_words(adapter, QLCNIC_FLT_LOCATION,
- (u8 *)&flt_hdr,
- sizeof(struct qlcnic_flt_header));
- if (ret) {
- dev_warn(&adapter->pdev->dev,
- "error reading flash layout header\n");
- return -EIO;
- }
-
- entry_size = flt_hdr.len - sizeof(struct qlcnic_flt_header);
- flt_entry = (struct qlcnic_flt_entry *)vzalloc(entry_size);
- if (flt_entry == NULL) {
- dev_warn(&adapter->pdev->dev, "error allocating memory\n");
- return -EIO;
- }
-
- ret = qlcnic_rom_fast_read_words(adapter, QLCNIC_FLT_LOCATION +
- sizeof(struct qlcnic_flt_header),
- (u8 *)flt_entry, entry_size);
- if (ret) {
- dev_warn(&adapter->pdev->dev,
- "error reading flash layout entries\n");
- goto err_out;
- }
-
- while (i < (entry_size/sizeof(struct qlcnic_flt_entry))) {
- if (flt_entry[i].region == region)
- break;
- i++;
- }
- if (i >= (entry_size/sizeof(struct qlcnic_flt_entry))) {
- dev_warn(&adapter->pdev->dev,
- "region=%x not found in %d regions\n", region, i);
- ret = -EIO;
- goto err_out;
- }
- memcpy(region_entry, &flt_entry[i], sizeof(struct qlcnic_flt_entry));
-
-err_out:
- vfree(flt_entry);
- return ret;
-}
-
int
qlcnic_check_flash_fw_ver(struct qlcnic_adapter *adapter)
{
- struct qlcnic_flt_entry fw_entry;
u32 ver = -1, min_ver;
- int ret;
- ret = qlcnic_get_flt_entry(adapter, QLCNIC_FW_IMAGE_REGION, &fw_entry);
- if (!ret)
- /* 0-4:-signature, 4-8:-fw version */
- qlcnic_rom_fast_read(adapter, fw_entry.start_addr + 4,
- (int *)&ver);
- else
- qlcnic_rom_fast_read(adapter, QLCNIC_FW_VERSION_OFFSET,
- (int *)&ver);
+ qlcnic_rom_fast_read(adapter, QLCNIC_FW_VERSION_OFFSET, (int *)&ver);
ver = QLCNIC_DECODE_VERSION(ver);
min_ver = QLCNIC_MIN_FW_VERSION;
diff --git a/trunk/drivers/net/qlcnic/qlcnic_main.c b/trunk/drivers/net/qlcnic/qlcnic_main.c
index 37c04b4fade3..11e3a46c0911 100644
--- a/trunk/drivers/net/qlcnic/qlcnic_main.c
+++ b/trunk/drivers/net/qlcnic/qlcnic_main.c
@@ -31,15 +31,15 @@ static const char qlcnic_driver_string[] = "QLogic 1/10 GbE "
static struct workqueue_struct *qlcnic_wq;
static int qlcnic_mac_learn;
-module_param(qlcnic_mac_learn, int, 0444);
+module_param(qlcnic_mac_learn, int, 0644);
MODULE_PARM_DESC(qlcnic_mac_learn, "Mac Filter (0=disabled, 1=enabled)");
static int use_msi = 1;
-module_param(use_msi, int, 0444);
+module_param(use_msi, int, 0644);
MODULE_PARM_DESC(use_msi, "MSI interrupt (0=disabled, 1=enabled");
static int use_msi_x = 1;
-module_param(use_msi_x, int, 0444);
+module_param(use_msi_x, int, 0644);
MODULE_PARM_DESC(use_msi_x, "MSI-X interrupt (0=disabled, 1=enabled");
static int auto_fw_reset = AUTO_FW_RESET_ENABLED;
@@ -47,11 +47,11 @@ module_param(auto_fw_reset, int, 0644);
MODULE_PARM_DESC(auto_fw_reset, "Auto firmware reset (0=disabled, 1=enabled");
static int load_fw_file;
-module_param(load_fw_file, int, 0444);
+module_param(load_fw_file, int, 0644);
MODULE_PARM_DESC(load_fw_file, "Load firmware from (0=flash, 1=file");
static int qlcnic_config_npars;
-module_param(qlcnic_config_npars, int, 0444);
+module_param(qlcnic_config_npars, int, 0644);
MODULE_PARM_DESC(qlcnic_config_npars, "Configure NPARs (0=disabled, 1=enabled");
static int __devinit qlcnic_probe(struct pci_dev *pdev,
diff --git a/trunk/drivers/net/r8169.c b/trunk/drivers/net/r8169.c
index bb8645ab247c..dd758cdb55c4 100644
--- a/trunk/drivers/net/r8169.c
+++ b/trunk/drivers/net/r8169.c
@@ -1632,134 +1632,36 @@ rtl_phy_write_fw(struct rtl8169_private *tp, const struct firmware *fw)
{
__le32 *phytable = (__le32 *)fw->data;
struct net_device *dev = tp->dev;
- size_t index, fw_size = fw->size / sizeof(*phytable);
- u32 predata, count;
+ size_t i;
if (fw->size % sizeof(*phytable)) {
netif_err(tp, probe, dev, "odd sized firmware %zd\n", fw->size);
return;
}
- for (index = 0; index < fw_size; index++) {
- u32 action = le32_to_cpu(phytable[index]);
- u32 regno = (action & 0x0fff0000) >> 16;
+ for (i = 0; i < fw->size / sizeof(*phytable); i++) {
+ u32 action = le32_to_cpu(phytable[i]);
- switch(action & 0xf0000000) {
- case PHY_READ:
- case PHY_DATA_OR:
- case PHY_DATA_AND:
- case PHY_READ_EFUSE:
- case PHY_CLEAR_READCOUNT:
- case PHY_WRITE:
- case PHY_WRITE_PREVIOUS:
- case PHY_DELAY_MS:
- break;
-
- case PHY_BJMPN:
- if (regno > index) {
- netif_err(tp, probe, tp->dev,
- "Out of range of firmware\n");
- return;
- }
- break;
- case PHY_READCOUNT_EQ_SKIP:
- if (index + 2 >= fw_size) {
- netif_err(tp, probe, tp->dev,
- "Out of range of firmware\n");
- return;
- }
- break;
- case PHY_COMP_EQ_SKIPN:
- case PHY_COMP_NEQ_SKIPN:
- case PHY_SKIPN:
- if (index + 1 + regno >= fw_size) {
- netif_err(tp, probe, tp->dev,
- "Out of range of firmware\n");
- return;
- }
+ if (!action)
break;
- case PHY_READ_MAC_BYTE:
- case PHY_WRITE_MAC_BYTE:
- case PHY_WRITE_ERI_WORD:
- default:
- netif_err(tp, probe, tp->dev,
- "Invalid action 0x%08x\n", action);
+ if ((action & 0xf0000000) != PHY_WRITE) {
+ netif_err(tp, probe, dev,
+ "unknown action 0x%08x\n", action);
return;
}
}
- predata = 0;
- count = 0;
-
- for (index = 0; index < fw_size; ) {
- u32 action = le32_to_cpu(phytable[index]);
+ while (i-- != 0) {
+ u32 action = le32_to_cpu(*phytable);
u32 data = action & 0x0000ffff;
- u32 regno = (action & 0x0fff0000) >> 16;
-
- if (!action)
- break;
+ u32 reg = (action & 0x0fff0000) >> 16;
switch(action & 0xf0000000) {
- case PHY_READ:
- predata = rtl_readphy(tp, regno);
- count++;
- index++;
- break;
- case PHY_DATA_OR:
- predata |= data;
- index++;
- break;
- case PHY_DATA_AND:
- predata &= data;
- index++;
- break;
- case PHY_BJMPN:
- index -= regno;
- break;
- case PHY_READ_EFUSE:
- predata = rtl8168d_efuse_read(tp->mmio_addr, regno);
- index++;
- break;
- case PHY_CLEAR_READCOUNT:
- count = 0;
- index++;
- break;
case PHY_WRITE:
- rtl_writephy(tp, regno, data);
- index++;
- break;
- case PHY_READCOUNT_EQ_SKIP:
- if (count == data)
- index += 2;
- else
- index += 1;
- break;
- case PHY_COMP_EQ_SKIPN:
- if (predata == data)
- index += regno;
- index++;
- break;
- case PHY_COMP_NEQ_SKIPN:
- if (predata != data)
- index += regno;
- index++;
- break;
- case PHY_WRITE_PREVIOUS:
- rtl_writephy(tp, regno, predata);
- index++;
+ rtl_writephy(tp, reg, data);
+ phytable++;
break;
- case PHY_SKIPN:
- index += regno + 1;
- break;
- case PHY_DELAY_MS:
- mdelay(data);
- index++;
- break;
-
- case PHY_READ_MAC_BYTE:
- case PHY_WRITE_MAC_BYTE:
- case PHY_WRITE_ERI_WORD:
default:
BUG();
}
diff --git a/trunk/drivers/net/ucc_geth.c b/trunk/drivers/net/ucc_geth.c
index dc6cb974f25d..acbdab3d66ca 100644
--- a/trunk/drivers/net/ucc_geth.c
+++ b/trunk/drivers/net/ucc_geth.c
@@ -2031,7 +2031,7 @@ static void ucc_geth_set_multi(struct net_device *dev)
netdev_for_each_mc_addr(ha, dev) {
/* Only support group multicast for now.
*/
- if (!is_multicast_ether_addr(ha->addr))
+ if (!(ha->addr[0] & 1))
continue;
/* Ask CPM to run CRC and set bit in
diff --git a/trunk/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/trunk/drivers/net/wireless/ath/ath9k/ar9002_calib.c
index ea2e7d714bda..01880aa13e36 100644
--- a/trunk/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+++ b/trunk/drivers/net/wireless/ath/ath9k/ar9002_calib.c
@@ -954,9 +954,6 @@ static void ar9002_hw_init_cal_settings(struct ath_hw *ah)
&adc_dc_cal_multi_sample;
}
ah->supp_cals = ADC_GAIN_CAL | ADC_DC_CAL | IQ_MISMATCH_CAL;
-
- if (AR_SREV_9287(ah))
- ah->supp_cals &= ~ADC_GAIN_CAL;
}
}
diff --git a/trunk/drivers/net/wireless/ath/ath9k/eeprom_def.c b/trunk/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 749a93608664..088f141f2006 100644
--- a/trunk/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/trunk/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -226,10 +226,6 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
eep->baseEepHeader.pwdclkind == 0)
ah->need_an_top2_fixup = 1;
- if ((common->bus_ops->ath_bus_type == ATH_USB) &&
- (AR_SREV_9280(ah)))
- eep->modalHeader[0].xpaBiasLvl = 0;
-
return 0;
}
diff --git a/trunk/drivers/net/wireless/ath/ath9k/htc.h b/trunk/drivers/net/wireless/ath/ath9k/htc.h
index 1ce506f23110..a099b3e87ed3 100644
--- a/trunk/drivers/net/wireless/ath/ath9k/htc.h
+++ b/trunk/drivers/net/wireless/ath/ath9k/htc.h
@@ -433,7 +433,6 @@ void ath9k_htc_txep(void *priv, struct sk_buff *skb, enum htc_endpoint_id ep_id,
void ath9k_htc_beaconep(void *drv_priv, struct sk_buff *skb,
enum htc_endpoint_id ep_id, bool txok);
-int ath9k_htc_update_cap_target(struct ath9k_htc_priv *priv);
void ath9k_htc_station_work(struct work_struct *work);
void ath9k_htc_aggr_work(struct work_struct *work);
void ath9k_ani_work(struct work_struct *work);;
diff --git a/trunk/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/trunk/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index f4d576bc3ccd..845b4c938d16 100644
--- a/trunk/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/trunk/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -301,16 +301,6 @@ static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv)
priv->nstations++;
- /*
- * Set chainmask etc. on the target.
- */
- ret = ath9k_htc_update_cap_target(priv);
- if (ret)
- ath_dbg(common, ATH_DBG_CONFIG,
- "Failed to update capability in target\n");
-
- priv->ah->is_monitoring = true;
-
return 0;
err_vif:
@@ -338,7 +328,6 @@ static int ath9k_htc_remove_monitor_interface(struct ath9k_htc_priv *priv)
}
priv->nstations--;
- priv->ah->is_monitoring = false;
return 0;
}
@@ -430,7 +419,7 @@ static int ath9k_htc_remove_station(struct ath9k_htc_priv *priv,
return 0;
}
-int ath9k_htc_update_cap_target(struct ath9k_htc_priv *priv)
+static int ath9k_htc_update_cap_target(struct ath9k_htc_priv *priv)
{
struct ath9k_htc_cap_target tcap;
int ret;
@@ -1197,20 +1186,6 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed)
}
}
- /*
- * Monitor interface should be added before
- * IEEE80211_CONF_CHANGE_CHANNEL is handled.
- */
- if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
- if (conf->flags & IEEE80211_CONF_MONITOR) {
- if (ath9k_htc_add_monitor_interface(priv))
- ath_err(common, "Failed to set monitor mode\n");
- else
- ath_dbg(common, ATH_DBG_CONFIG,
- "HW opmode set to Monitor mode\n");
- }
- }
-
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
struct ieee80211_channel *curchan = hw->conf.channel;
int pos = curchan->hw_value;
@@ -1246,6 +1221,16 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed)
ath_update_txpow(priv);
}
+ if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
+ if (conf->flags & IEEE80211_CONF_MONITOR) {
+ if (ath9k_htc_add_monitor_interface(priv))
+ ath_err(common, "Failed to set monitor mode\n");
+ else
+ ath_dbg(common, ATH_DBG_CONFIG,
+ "HW opmode set to Monitor mode\n");
+ }
+ }
+
if (changed & IEEE80211_CONF_CHANGE_IDLE) {
mutex_lock(&priv->htc_pm_lock);
if (!priv->ps_idle) {
diff --git a/trunk/drivers/net/wireless/ath/ath9k/hw.c b/trunk/drivers/net/wireless/ath/ath9k/hw.c
index 1afb8bb85756..fde978665e07 100644
--- a/trunk/drivers/net/wireless/ath/ath9k/hw.c
+++ b/trunk/drivers/net/wireless/ath/ath9k/hw.c
@@ -436,10 +436,9 @@ static int ath9k_hw_init_macaddr(struct ath_hw *ah)
static int ath9k_hw_post_init(struct ath_hw *ah)
{
- struct ath_common *common = ath9k_hw_common(ah);
int ecode;
- if (common->bus_ops->ath_bus_type != ATH_USB) {
+ if (!AR_SREV_9271(ah)) {
if (!ath9k_hw_chip_test(ah))
return -ENODEV;
}
@@ -1214,7 +1213,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
ah->txchainmask = common->tx_chainmask;
ah->rxchainmask = common->rx_chainmask;
- if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) {
+ if (!ah->chip_fullsleep) {
ath9k_hw_abortpcurecv(ah);
if (!ath9k_hw_stopdmarecv(ah)) {
ath_dbg(common, ATH_DBG_XMIT,
diff --git a/trunk/drivers/net/wireless/hostap/hostap_cs.c b/trunk/drivers/net/wireless/hostap/hostap_cs.c
index 2176edede39b..bd8a4134edeb 100644
--- a/trunk/drivers/net/wireless/hostap/hostap_cs.c
+++ b/trunk/drivers/net/wireless/hostap/hostap_cs.c
@@ -518,21 +518,22 @@ static int prism2_config(struct pcmcia_device *link)
hw_priv->link = link;
/*
- * We enable IRQ here, but IRQ handler will not proceed
- * until dev->base_addr is set below. This protect us from
- * receive interrupts when driver is not initialized.
+ * Make sure the IRQ handler cannot proceed until at least
+ * dev->base_addr is initialized.
*/
+ spin_lock_irqsave(&local->irq_init_lock, flags);
+
ret = pcmcia_request_irq(link, prism2_interrupt);
if (ret)
- goto failed;
+ goto failed_unlock;
ret = pcmcia_enable_device(link);
if (ret)
- goto failed;
+ goto failed_unlock;
- spin_lock_irqsave(&local->irq_init_lock, flags);
dev->irq = link->irq;
dev->base_addr = link->resource[0]->start;
+
spin_unlock_irqrestore(&local->irq_init_lock, flags);
local->shutdown = 0;
@@ -545,6 +546,8 @@ static int prism2_config(struct pcmcia_device *link)
return ret;
+ failed_unlock:
+ spin_unlock_irqrestore(&local->irq_init_lock, flags);
failed:
kfree(hw_priv);
prism2_release((u_long)link);
diff --git a/trunk/drivers/net/wireless/ipw2x00/ipw2200.c b/trunk/drivers/net/wireless/ipw2x00/ipw2200.c
index ae438ed80c2f..8d6ed5f6f46f 100644
--- a/trunk/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/trunk/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -1973,13 +1973,6 @@ static void ipw_irq_tasklet(struct ipw_priv *priv)
inta = ipw_read32(priv, IPW_INTA_RW);
inta_mask = ipw_read32(priv, IPW_INTA_MASK_R);
-
- if (inta == 0xFFFFFFFF) {
- /* Hardware disappeared */
- IPW_WARNING("TASKLET INTA == 0xFFFFFFFF\n");
- /* Only handle the cached INTA values */
- inta = 0;
- }
inta &= (IPW_INTA_MASK_ALL & inta_mask);
/* Add any cached INTA values that need to be handled */
diff --git a/trunk/drivers/net/wireless/p54/txrx.c b/trunk/drivers/net/wireless/p54/txrx.c
index f618b9623e5a..76b2318a7dc7 100644
--- a/trunk/drivers/net/wireless/p54/txrx.c
+++ b/trunk/drivers/net/wireless/p54/txrx.c
@@ -618,7 +618,7 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
else
*burst_possible = false;
- if (!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))
+ if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
*flags |= P54_HDR_FLAG_DATA_OUT_SEQNR;
if (info->flags & IEEE80211_TX_CTL_PSPOLL_RESPONSE)
diff --git a/trunk/drivers/ssb/scan.c b/trunk/drivers/ssb/scan.c
index 29884c00c4d5..5a0985d4ce15 100644
--- a/trunk/drivers/ssb/scan.c
+++ b/trunk/drivers/ssb/scan.c
@@ -420,16 +420,6 @@ int ssb_bus_scan(struct ssb_bus *bus,
bus->pcicore.dev = dev;
#endif /* CONFIG_SSB_DRIVER_PCICORE */
break;
- case SSB_DEV_ETHERNET:
- if (bus->bustype == SSB_BUSTYPE_PCI) {
- if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM &&
- (bus->host_pci->device & 0xFF00) == 0x4300) {
- /* This is a dangling ethernet core on a
- * wireless device. Ignore it. */
- continue;
- }
- }
- break;
default:
break;
}
diff --git a/trunk/include/linux/bfin_mac.h b/trunk/include/linux/bfin_mac.h
index a69554ef8476..904dec7d03a1 100644
--- a/trunk/include/linux/bfin_mac.h
+++ b/trunk/include/linux/bfin_mac.h
@@ -24,7 +24,6 @@ struct bfin_mii_bus_platform_data {
const unsigned short *mac_peripherals;
int phy_mode;
unsigned int phy_mask;
- unsigned short vlan1_mask, vlan2_mask;
};
#endif
diff --git a/trunk/include/linux/etherdevice.h b/trunk/include/linux/etherdevice.h
index bec8b82889bf..f16a01081e15 100644
--- a/trunk/include/linux/etherdevice.h
+++ b/trunk/include/linux/etherdevice.h
@@ -48,10 +48,8 @@ extern int eth_validate_addr(struct net_device *dev);
-extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
- unsigned int rxqs);
+extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count);
#define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1)
-#define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count)
/**
* is_zero_ether_addr - Determine if give Ethernet address is all zeros.
diff --git a/trunk/include/linux/netdevice.h b/trunk/include/linux/netdevice.h
index be4957cf6511..de2bfe6da359 100644
--- a/trunk/include/linux/netdevice.h
+++ b/trunk/include/linux/netdevice.h
@@ -2191,15 +2191,11 @@ static inline void netif_addr_unlock_bh(struct net_device *dev)
extern void ether_setup(struct net_device *dev);
/* Support for loadable net-drivers */
-extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
+extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
void (*setup)(struct net_device *),
- unsigned int txqs, unsigned int rxqs);
+ unsigned int queue_count);
#define alloc_netdev(sizeof_priv, name, setup) \
- alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1)
-
-#define alloc_netdev_mq(sizeof_priv, name, setup, count) \
- alloc_netdev_mqs(sizeof_priv, name, setup, count, count)
-
+ alloc_netdev_mq(sizeof_priv, name, setup, 1)
extern int register_netdev(struct net_device *dev);
extern void unregister_netdev(struct net_device *dev);
diff --git a/trunk/include/linux/nl80211.h b/trunk/include/linux/nl80211.h
index 821ffb954f14..2b89b712565b 100644
--- a/trunk/include/linux/nl80211.h
+++ b/trunk/include/linux/nl80211.h
@@ -148,10 +148,6 @@
* @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to
* destination %NL80211_ATTR_MAC on the interface identified by
* %NL80211_ATTR_IFINDEX.
- * @NL80211_CMD_NEW_MPATH: Create a new mesh path for the destination given by
- * %NL80211_ATTR_MAC via %NL80211_ATTR_MPATH_NEXT_HOP.
- * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by
- * %NL80211_ATTR_MAC.
* @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the
* the interface identified by %NL80211_ATTR_IFINDEX.
* @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC
@@ -616,7 +612,7 @@ enum nl80211_commands {
* consisting of a nested array.
*
* @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes).
- * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link.
+ * @NL80211_ATTR_PLINK_ACTION: action to perform on the mesh peer link.
* @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path.
* @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path
* info given for %NL80211_CMD_GET_MPATH, nested attribute described at
@@ -883,9 +879,7 @@ enum nl80211_commands {
* See &enum nl80211_key_default_types.
*
* @NL80211_ATTR_MESH_SETUP: Optional mesh setup parameters. These cannot be
- * changed once the mesh is active.
- * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute
- * containing attributes from &enum nl80211_meshconf_params.
+ * changed once the mesh is active.
*
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -1231,6 +1225,8 @@ enum nl80211_rate_info {
* @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs)
* @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station)
* @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
+ * @__NL80211_STA_INFO_AFTER_LAST: internal
+ * @NL80211_STA_INFO_MAX: highest possible station info attribute
* @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
* @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
* containing info as possible, see &enum nl80211_sta_info_txrate.
@@ -1240,11 +1236,6 @@ enum nl80211_rate_info {
* @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station)
* @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station)
* @NL80211_STA_INFO_SIGNAL_AVG: signal strength average (u8, dBm)
- * @NL80211_STA_INFO_LLID: the station's mesh LLID
- * @NL80211_STA_INFO_PLID: the station's mesh PLID
- * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station
- * @__NL80211_STA_INFO_AFTER_LAST: internal
- * @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
enum nl80211_sta_info {
__NL80211_STA_INFO_INVALID,
@@ -1635,7 +1626,7 @@ enum nl80211_mntr_flags {
* @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
* that it takes for an HWMP information element to propagate across the mesh
*
- * @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not
+ * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not
*
* @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a
* source mesh point for path selection elements.
@@ -1687,7 +1678,6 @@ enum nl80211_meshconf_params {
* element that vendors will use to identify the path selection methods and
* metrics in use.
*
- * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
* @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
*/
enum nl80211_mesh_setup_params {
diff --git a/trunk/include/net/ah.h b/trunk/include/net/ah.h
index be7798dea6f4..f0129f79a31a 100644
--- a/trunk/include/net/ah.h
+++ b/trunk/include/net/ah.h
@@ -4,7 +4,7 @@
#include
/* This is the maximum truncated ICV length that we know of. */
-#define MAX_AH_AUTH_LEN 16
+#define MAX_AH_AUTH_LEN 12
struct crypto_ahash;
diff --git a/trunk/include/net/arp.h b/trunk/include/net/arp.h
index 91f0568a04ef..f4cf6ce66586 100644
--- a/trunk/include/net/arp.h
+++ b/trunk/include/net/arp.h
@@ -25,6 +25,5 @@ extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
const unsigned char *src_hw,
const unsigned char *target_hw);
extern void arp_xmit(struct sk_buff *skb);
-int arp_invalidate(struct net_device *dev, __be32 ip);
#endif /* _ARP_H */
diff --git a/trunk/include/net/cfg80211.h b/trunk/include/net/cfg80211.h
index 1322695beb52..bcc9f448ec4e 100644
--- a/trunk/include/net/cfg80211.h
+++ b/trunk/include/net/cfg80211.h
@@ -1103,8 +1103,6 @@ struct cfg80211_pmksa {
* @change_mpath: change a given mesh path
* @get_mpath: get a mesh path for the given parameters
* @dump_mpath: dump mesh path callback -- resume dump at index @idx
- * @join_mesh: join the mesh network with the specified parameters
- * @leave_mesh: leave the current mesh network
*
* @get_mesh_config: Get the current mesh configuration
*
diff --git a/trunk/include/net/mac80211.h b/trunk/include/net/mac80211.h
index 62c0ce2d1dc8..5b3fd5add7a4 100644
--- a/trunk/include/net/mac80211.h
+++ b/trunk/include/net/mac80211.h
@@ -337,10 +337,6 @@ struct ieee80211_bss_conf {
* @IEEE80211_TX_CTL_LDPC: tells the driver to use LDPC for this frame
* @IEEE80211_TX_CTL_STBC: Enables Space-Time Block Coding (STBC) for this
* frame and selects the maximum number of streams that it can use.
- * @IEEE80211_TX_CTL_TX_OFFCHAN: Marks this packet to be transmitted on
- * the off-channel channel when a remain-on-channel offload is done
- * in hardware -- normal packets still flow and are expected to be
- * handled properly by the device.
*
* Note: If you have to add new flags to the enumeration, then don't
* forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
@@ -1757,16 +1753,6 @@ enum ieee80211_ampdu_mlme_action {
* (also see nl80211.h @NL80211_ATTR_WIPHY_ANTENNA_TX).
*
* @get_antenna: Get current antenna configuration from device (tx_ant, rx_ant).
- *
- * @remain_on_channel: Starts an off-channel period on the given channel, must
- * call back to ieee80211_ready_on_channel() when on that channel. Note
- * that normal channel traffic is not stopped as this is intended for hw
- * offload. Frames to transmit on the off-channel channel are transmitted
- * normally except for the %IEEE80211_TX_CTL_TX_OFFCHAN flag. When the
- * duration (which will always be non-zero) expires, the driver must call
- * ieee80211_remain_on_channel_expired(). This callback may sleep.
- * @cancel_remain_on_channel: Requests that an ongoing off-channel period is
- * aborted before it expires. This callback may sleep.
*/
struct ieee80211_ops {
int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
diff --git a/trunk/include/net/phonet/phonet.h b/trunk/include/net/phonet/phonet.h
index 5395e09187df..d5df797f9540 100644
--- a/trunk/include/net/phonet/phonet.h
+++ b/trunk/include/net/phonet/phonet.h
@@ -107,8 +107,8 @@ struct phonet_protocol {
int sock_type;
};
-int phonet_proto_register(unsigned int protocol, struct phonet_protocol *pp);
-void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp);
+int phonet_proto_register(int protocol, struct phonet_protocol *pp);
+void phonet_proto_unregister(int protocol, struct phonet_protocol *pp);
int phonet_sysctl_init(void);
void phonet_sysctl_exit(void);
diff --git a/trunk/include/net/red.h b/trunk/include/net/red.h
index 3319f16b3beb..995108e54d9f 100644
--- a/trunk/include/net/red.h
+++ b/trunk/include/net/red.h
@@ -97,6 +97,7 @@ struct red_stats {
u32 forced_mark; /* Forced marks, qavg > max_thresh */
u32 pdrop; /* Drops due to queue limits */
u32 other; /* Drops due to drop() calls */
+ u32 backlog;
};
struct red_parms {
diff --git a/trunk/include/net/sch_generic.h b/trunk/include/net/sch_generic.h
index e9eee99d8b1f..0af57ebae762 100644
--- a/trunk/include/net/sch_generic.h
+++ b/trunk/include/net/sch_generic.h
@@ -207,7 +207,7 @@ static inline int qdisc_qlen(struct Qdisc *q)
return q->q.qlen;
}
-static inline struct qdisc_skb_cb *qdisc_skb_cb(const struct sk_buff *skb)
+static inline struct qdisc_skb_cb *qdisc_skb_cb(struct sk_buff *skb)
{
return (struct qdisc_skb_cb *)skb->cb;
}
@@ -394,7 +394,7 @@ static inline bool qdisc_tx_is_noop(const struct net_device *dev)
return true;
}
-static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb)
+static inline unsigned int qdisc_pkt_len(struct sk_buff *skb)
{
return qdisc_skb_cb(skb)->pkt_len;
}
@@ -426,18 +426,10 @@ static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch)
return qdisc_enqueue(skb, sch) & NET_XMIT_MASK;
}
-
-static inline void bstats_update(struct gnet_stats_basic_packed *bstats,
- const struct sk_buff *skb)
-{
- bstats->bytes += qdisc_pkt_len(skb);
- bstats->packets += skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1;
-}
-
-static inline void qdisc_bstats_update(struct Qdisc *sch,
- const struct sk_buff *skb)
+static inline void __qdisc_update_bstats(struct Qdisc *sch, unsigned int len)
{
- bstats_update(&sch->bstats, skb);
+ sch->bstats.bytes += len;
+ sch->bstats.packets++;
}
static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch,
@@ -445,7 +437,7 @@ static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch,
{
__skb_queue_tail(list, skb);
sch->qstats.backlog += qdisc_pkt_len(skb);
- qdisc_bstats_update(sch, skb);
+ __qdisc_update_bstats(sch, qdisc_pkt_len(skb));
return NET_XMIT_SUCCESS;
}
diff --git a/trunk/net/ax25/af_ax25.c b/trunk/net/ax25/af_ax25.c
index 6da5daeebab7..bb86d2932394 100644
--- a/trunk/net/ax25/af_ax25.c
+++ b/trunk/net/ax25/af_ax25.c
@@ -1392,7 +1392,7 @@ static int ax25_getname(struct socket *sock, struct sockaddr *uaddr,
ax25_cb *ax25;
int err = 0;
- memset(fsa, 0, sizeof(*fsa));
+ memset(fsa, 0, sizeof(fsa));
lock_sock(sk);
ax25 = ax25_sk(sk);
diff --git a/trunk/net/caif/caif_socket.c b/trunk/net/caif/caif_socket.c
index 8184c031d028..1bf0cf503796 100644
--- a/trunk/net/caif/caif_socket.c
+++ b/trunk/net/caif/caif_socket.c
@@ -740,12 +740,12 @@ static int setsockopt(struct socket *sock,
if (cf_sk->sk.sk_protocol != CAIFPROTO_UTIL)
return -ENOPROTOOPT;
lock_sock(&(cf_sk->sk));
+ cf_sk->conn_req.param.size = ol;
if (ol > sizeof(cf_sk->conn_req.param.data) ||
copy_from_user(&cf_sk->conn_req.param.data, ov, ol)) {
release_sock(&cf_sk->sk);
return -EINVAL;
}
- cf_sk->conn_req.param.size = ol;
release_sock(&cf_sk->sk);
return 0;
diff --git a/trunk/net/caif/chnl_net.c b/trunk/net/caif/chnl_net.c
index fa9dab372b68..84a422c98941 100644
--- a/trunk/net/caif/chnl_net.c
+++ b/trunk/net/caif/chnl_net.c
@@ -76,8 +76,6 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
struct chnl_net *priv = container_of(layr, struct chnl_net, chnl);
int pktlen;
int err = 0;
- const u8 *ip_version;
- u8 buf;
priv = container_of(layr, struct chnl_net, chnl);
@@ -92,21 +90,7 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
* send the packet to the net stack.
*/
skb->dev = priv->netdev;
-
- /* check the version of IP */
- ip_version = skb_header_pointer(skb, 0, 1, &buf);
- if (!ip_version)
- return -EINVAL;
- switch (*ip_version >> 4) {
- case 4:
- skb->protocol = htons(ETH_P_IP);
- break;
- case 6:
- skb->protocol = htons(ETH_P_IPV6);
- break;
- default:
- return -EINVAL;
- }
+ skb->protocol = htons(ETH_P_IP);
/* If we change the header in loop mode, the checksum is corrupted. */
if (priv->conn_req.protocol == CAIFPROTO_DATAGRAM_LOOP)
diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c
index a3ef808b5e36..3fe443be4b15 100644
--- a/trunk/net/core/dev.c
+++ b/trunk/net/core/dev.c
@@ -2297,10 +2297,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
*/
if (!(dev->priv_flags & IFF_XMIT_DST_RELEASE))
skb_dst_force(skb);
-
- qdisc_skb_cb(skb)->pkt_len = skb->len;
- qdisc_bstats_update(q, skb);
-
+ __qdisc_update_bstats(q, skb->len);
if (sch_direct_xmit(skb, q, dev, txq, root_lock)) {
if (unlikely(contended)) {
spin_unlock(&q->busylock);
@@ -5620,20 +5617,18 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev)
}
/**
- * alloc_netdev_mqs - allocate network device
+ * alloc_netdev_mq - allocate network device
* @sizeof_priv: size of private data to allocate space for
* @name: device name format string
* @setup: callback to initialize device
- * @txqs: the number of TX subqueues to allocate
- * @rxqs: the number of RX subqueues to allocate
+ * @queue_count: the number of subqueues to allocate
*
* Allocates a struct net_device with private data area for driver use
* and performs basic initialization. Also allocates subquue structs
- * for each queue on the device.
+ * for each queue on the device at the end of the netdevice.
*/
-struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
- void (*setup)(struct net_device *),
- unsigned int txqs, unsigned int rxqs)
+struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
+ void (*setup)(struct net_device *), unsigned int queue_count)
{
struct net_device *dev;
size_t alloc_size;
@@ -5641,20 +5636,12 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
BUG_ON(strlen(name) >= sizeof(dev->name));
- if (txqs < 1) {
+ if (queue_count < 1) {
pr_err("alloc_netdev: Unable to allocate device "
"with zero queues.\n");
return NULL;
}
-#ifdef CONFIG_RPS
- if (rxqs < 1) {
- pr_err("alloc_netdev: Unable to allocate device "
- "with zero RX queues.\n");
- return NULL;
- }
-#endif
-
alloc_size = sizeof(struct net_device);
if (sizeof_priv) {
/* ensure 32-byte alignment of private area */
@@ -5685,14 +5672,14 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
dev_net_set(dev, &init_net);
- dev->num_tx_queues = txqs;
- dev->real_num_tx_queues = txqs;
+ dev->num_tx_queues = queue_count;
+ dev->real_num_tx_queues = queue_count;
if (netif_alloc_netdev_queues(dev))
goto free_pcpu;
#ifdef CONFIG_RPS
- dev->num_rx_queues = rxqs;
- dev->real_num_rx_queues = rxqs;
+ dev->num_rx_queues = queue_count;
+ dev->real_num_rx_queues = queue_count;
if (netif_alloc_rx_queues(dev))
goto free_pcpu;
#endif
@@ -5720,7 +5707,7 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
kfree(p);
return NULL;
}
-EXPORT_SYMBOL(alloc_netdev_mqs);
+EXPORT_SYMBOL(alloc_netdev_mq);
/**
* free_netdev - free network device
diff --git a/trunk/net/ethernet/eth.c b/trunk/net/ethernet/eth.c
index 44d2b42fda56..f00ef2f1d814 100644
--- a/trunk/net/ethernet/eth.c
+++ b/trunk/net/ethernet/eth.c
@@ -347,11 +347,10 @@ void ether_setup(struct net_device *dev)
EXPORT_SYMBOL(ether_setup);
/**
- * alloc_etherdev_mqs - Allocates and sets up an Ethernet device
+ * alloc_etherdev_mq - Allocates and sets up an Ethernet device
* @sizeof_priv: Size of additional driver-private structure to be allocated
* for this Ethernet device
- * @txqs: The number of TX queues this device has.
- * @rxqs: The number of RX queues this device has.
+ * @queue_count: The number of queues this device has.
*
* Fill in the fields of the device structure with Ethernet-generic
* values. Basically does everything except registering the device.
@@ -361,12 +360,11 @@ EXPORT_SYMBOL(ether_setup);
* this private data area.
*/
-struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
- unsigned int rxqs)
+struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count)
{
- return alloc_netdev_mqs(sizeof_priv, "eth%d", ether_setup, txqs, rxqs);
+ return alloc_netdev_mq(sizeof_priv, "eth%d", ether_setup, queue_count);
}
-EXPORT_SYMBOL(alloc_etherdev_mqs);
+EXPORT_SYMBOL(alloc_etherdev_mq);
static size_t _format_mac_addr(char *buf, int buflen,
const unsigned char *addr, int len)
diff --git a/trunk/net/ipv4/ah4.c b/trunk/net/ipv4/ah4.c
index 86961bec70ab..880a5ec6dce0 100644
--- a/trunk/net/ipv4/ah4.c
+++ b/trunk/net/ipv4/ah4.c
@@ -314,15 +314,14 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
skb->ip_summed = CHECKSUM_NONE;
+ ah = (struct ip_auth_hdr *)skb->data;
+ iph = ip_hdr(skb);
+ ihl = ip_hdrlen(skb);
if ((err = skb_cow_data(skb, 0, &trailer)) < 0)
goto out;
nfrags = err;
- ah = (struct ip_auth_hdr *)skb->data;
- iph = ip_hdr(skb);
- ihl = ip_hdrlen(skb);
-
work_iph = ah_alloc_tmp(ahash, nfrags, ihl + ahp->icv_trunc_len);
if (!work_iph)
goto out;
diff --git a/trunk/net/ipv4/arp.c b/trunk/net/ipv4/arp.c
index 04c8b69fd426..a2fc7b961dbc 100644
--- a/trunk/net/ipv4/arp.c
+++ b/trunk/net/ipv4/arp.c
@@ -1143,23 +1143,6 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev)
return err;
}
-int arp_invalidate(struct net_device *dev, __be32 ip)
-{
- struct neighbour *neigh = neigh_lookup(&arp_tbl, &ip, dev);
- int err = -ENXIO;
-
- if (neigh) {
- if (neigh->nud_state & ~NUD_NOARP)
- err = neigh_update(neigh, NULL, NUD_FAILED,
- NEIGH_UPDATE_F_OVERRIDE|
- NEIGH_UPDATE_F_ADMIN);
- neigh_release(neigh);
- }
-
- return err;
-}
-EXPORT_SYMBOL(arp_invalidate);
-
static int arp_req_delete_public(struct net *net, struct arpreq *r,
struct net_device *dev)
{
@@ -1180,6 +1163,7 @@ static int arp_req_delete(struct net *net, struct arpreq *r,
{
int err;
__be32 ip;
+ struct neighbour *neigh;
if (r->arp_flags & ATF_PUBL)
return arp_req_delete_public(net, r, dev);
@@ -1197,7 +1181,16 @@ static int arp_req_delete(struct net *net, struct arpreq *r,
if (!dev)
return -EINVAL;
}
- return arp_invalidate(dev, ip);
+ err = -ENXIO;
+ neigh = neigh_lookup(&arp_tbl, &ip, dev);
+ if (neigh) {
+ if (neigh->nud_state & ~NUD_NOARP)
+ err = neigh_update(neigh, NULL, NUD_FAILED,
+ NEIGH_UPDATE_F_OVERRIDE|
+ NEIGH_UPDATE_F_ADMIN);
+ neigh_release(neigh);
+ }
+ return err;
}
/*
diff --git a/trunk/net/ipv4/inet_connection_sock.c b/trunk/net/ipv4/inet_connection_sock.c
index 97e5fb765265..25e318153f14 100644
--- a/trunk/net/ipv4/inet_connection_sock.c
+++ b/trunk/net/ipv4/inet_connection_sock.c
@@ -73,7 +73,7 @@ int inet_csk_bind_conflict(const struct sock *sk,
!sk2->sk_bound_dev_if ||
sk->sk_bound_dev_if == sk2->sk_bound_dev_if)) {
if (!reuse || !sk2->sk_reuse ||
- ((1 << sk2->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))) {
+ sk2->sk_state == TCP_LISTEN) {
const __be32 sk2_rcv_saddr = sk_rcv_saddr(sk2);
if (!sk2_rcv_saddr || !sk_rcv_saddr(sk) ||
sk2_rcv_saddr == sk_rcv_saddr(sk))
@@ -122,8 +122,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
(tb->num_owners < smallest_size || smallest_size == -1)) {
smallest_size = tb->num_owners;
smallest_rover = rover;
- if (atomic_read(&hashinfo->bsockets) > (high - low) + 1 &&
- !inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb)) {
+ if (atomic_read(&hashinfo->bsockets) > (high - low) + 1) {
spin_unlock(&head->lock);
snum = smallest_rover;
goto have_snum;
diff --git a/trunk/net/ipv6/ah6.c b/trunk/net/ipv6/ah6.c
index 1aba54ae53c4..ee82d4ef26ce 100644
--- a/trunk/net/ipv6/ah6.c
+++ b/trunk/net/ipv6/ah6.c
@@ -538,16 +538,14 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
if (!pskb_may_pull(skb, ah_hlen))
goto out;
+ ip6h = ipv6_hdr(skb);
+
+ skb_push(skb, hdr_len);
if ((err = skb_cow_data(skb, 0, &trailer)) < 0)
goto out;
nfrags = err;
- ah = (struct ip_auth_hdr *)skb->data;
- ip6h = ipv6_hdr(skb);
-
- skb_push(skb, hdr_len);
-
work_iph = ah_alloc_tmp(ahash, nfrags, hdr_len + ahp->icv_trunc_len);
if (!work_iph)
goto out;
diff --git a/trunk/net/ipv6/inet6_connection_sock.c b/trunk/net/ipv6/inet6_connection_sock.c
index d144e629d2b4..e46305d1815a 100644
--- a/trunk/net/ipv6/inet6_connection_sock.c
+++ b/trunk/net/ipv6/inet6_connection_sock.c
@@ -44,7 +44,7 @@ int inet6_csk_bind_conflict(const struct sock *sk,
!sk2->sk_bound_dev_if ||
sk->sk_bound_dev_if == sk2->sk_bound_dev_if) &&
(!sk->sk_reuse || !sk2->sk_reuse ||
- ((1 << sk2->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))) &&
+ sk2->sk_state == TCP_LISTEN) &&
ipv6_rcv_saddr_equal(sk, sk2))
break;
}
diff --git a/trunk/net/ipv6/ip6_output.c b/trunk/net/ipv6/ip6_output.c
index 5f8d242be3f3..94b5bf132b2e 100644
--- a/trunk/net/ipv6/ip6_output.c
+++ b/trunk/net/ipv6/ip6_output.c
@@ -401,9 +401,6 @@ int ip6_forward(struct sk_buff *skb)
goto drop;
}
- if (skb->pkt_type != PACKET_HOST)
- goto drop;
-
skb_forward_csum(skb);
/*
diff --git a/trunk/net/netfilter/nf_conntrack_netlink.c b/trunk/net/netfilter/nf_conntrack_netlink.c
index 5cb8d3027b18..2b7eef37875c 100644
--- a/trunk/net/netfilter/nf_conntrack_netlink.c
+++ b/trunk/net/netfilter/nf_conntrack_netlink.c
@@ -972,7 +972,8 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
free:
kfree_skb(skb2);
out:
- return err;
+ /* this avoids a loop in nfnetlink. */
+ return err == -EAGAIN ? -ENOBUFS : err;
}
#ifdef CONFIG_NF_NAT_NEEDED
diff --git a/trunk/net/phonet/af_phonet.c b/trunk/net/phonet/af_phonet.c
index 1072b2c19d31..fd95beb72f5d 100644
--- a/trunk/net/phonet/af_phonet.c
+++ b/trunk/net/phonet/af_phonet.c
@@ -37,7 +37,7 @@
/* Transport protocol registration */
static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-static struct phonet_protocol *phonet_proto_get(unsigned int protocol)
+static struct phonet_protocol *phonet_proto_get(int protocol)
{
struct phonet_protocol *pp;
@@ -458,7 +458,7 @@ static struct packet_type phonet_packet_type __read_mostly = {
static DEFINE_MUTEX(proto_tab_lock);
-int __init_or_module phonet_proto_register(unsigned int protocol,
+int __init_or_module phonet_proto_register(int protocol,
struct phonet_protocol *pp)
{
int err = 0;
@@ -481,7 +481,7 @@ int __init_or_module phonet_proto_register(unsigned int protocol,
}
EXPORT_SYMBOL(phonet_proto_register);
-void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp)
+void phonet_proto_unregister(int protocol, struct phonet_protocol *pp)
{
mutex_lock(&proto_tab_lock);
BUG_ON(proto_tab[protocol] != pp);
diff --git a/trunk/net/sched/act_csum.c b/trunk/net/sched/act_csum.c
index 83ddfc07e45d..67dc7ce9b63a 100644
--- a/trunk/net/sched/act_csum.c
+++ b/trunk/net/sched/act_csum.c
@@ -508,7 +508,8 @@ static int tcf_csum(struct sk_buff *skb,
spin_lock(&p->tcf_lock);
p->tcf_tm.lastuse = jiffies;
- bstats_update(&p->tcf_bstats, skb);
+ p->tcf_bstats.bytes += qdisc_pkt_len(skb);
+ p->tcf_bstats.packets++;
action = p->tcf_action;
update_flags = p->update_flags;
spin_unlock(&p->tcf_lock);
diff --git a/trunk/net/sched/act_ipt.c b/trunk/net/sched/act_ipt.c
index c2a7c20e81c1..8daef9632255 100644
--- a/trunk/net/sched/act_ipt.c
+++ b/trunk/net/sched/act_ipt.c
@@ -209,7 +209,8 @@ static int tcf_ipt(struct sk_buff *skb, struct tc_action *a,
spin_lock(&ipt->tcf_lock);
ipt->tcf_tm.lastuse = jiffies;
- bstats_update(&ipt->tcf_bstats, skb);
+ ipt->tcf_bstats.bytes += qdisc_pkt_len(skb);
+ ipt->tcf_bstats.packets++;
/* yes, we have to worry about both in and out dev
worry later - danger - this API seems to have changed
diff --git a/trunk/net/sched/act_mirred.c b/trunk/net/sched/act_mirred.c
index d765067e99db..0c311be92827 100644
--- a/trunk/net/sched/act_mirred.c
+++ b/trunk/net/sched/act_mirred.c
@@ -165,7 +165,8 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a,
spin_lock(&m->tcf_lock);
m->tcf_tm.lastuse = jiffies;
- bstats_update(&m->tcf_bstats, skb);
+ m->tcf_bstats.bytes += qdisc_pkt_len(skb);
+ m->tcf_bstats.packets++;
dev = m->tcfm_dev;
if (!dev) {
diff --git a/trunk/net/sched/act_nat.c b/trunk/net/sched/act_nat.c
index 178a4bd7b7cb..186eb837e600 100644
--- a/trunk/net/sched/act_nat.c
+++ b/trunk/net/sched/act_nat.c
@@ -125,7 +125,8 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
egress = p->flags & TCA_NAT_FLAG_EGRESS;
action = p->tcf_action;
- bstats_update(&p->tcf_bstats, skb);
+ p->tcf_bstats.bytes += qdisc_pkt_len(skb);
+ p->tcf_bstats.packets++;
spin_unlock(&p->tcf_lock);
diff --git a/trunk/net/sched/act_pedit.c b/trunk/net/sched/act_pedit.c
index 445bef716f77..a0593c9640db 100644
--- a/trunk/net/sched/act_pedit.c
+++ b/trunk/net/sched/act_pedit.c
@@ -187,7 +187,8 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
bad:
p->tcf_qstats.overlimits++;
done:
- bstats_update(&p->tcf_bstats, skb);
+ p->tcf_bstats.bytes += qdisc_pkt_len(skb);
+ p->tcf_bstats.packets++;
spin_unlock(&p->tcf_lock);
return p->tcf_action;
}
diff --git a/trunk/net/sched/act_police.c b/trunk/net/sched/act_police.c
index e2f08b1e2e58..7ebf7439b478 100644
--- a/trunk/net/sched/act_police.c
+++ b/trunk/net/sched/act_police.c
@@ -298,7 +298,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
spin_lock(&police->tcf_lock);
- bstats_update(&police->tcf_bstats, skb);
+ police->tcf_bstats.bytes += qdisc_pkt_len(skb);
+ police->tcf_bstats.packets++;
if (police->tcfp_ewma_rate &&
police->tcf_rate_est.bps >= police->tcfp_ewma_rate) {
diff --git a/trunk/net/sched/act_simple.c b/trunk/net/sched/act_simple.c
index 7287cff7af3e..97e84f3ee775 100644
--- a/trunk/net/sched/act_simple.c
+++ b/trunk/net/sched/act_simple.c
@@ -42,7 +42,8 @@ static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result
spin_lock(&d->tcf_lock);
d->tcf_tm.lastuse = jiffies;
- bstats_update(&d->tcf_bstats, skb);
+ d->tcf_bstats.bytes += qdisc_pkt_len(skb);
+ d->tcf_bstats.packets++;
/* print policy string followed by _ then packet count
* Example if this was the 3rd packet and the string was "hello"
diff --git a/trunk/net/sched/act_skbedit.c b/trunk/net/sched/act_skbedit.c
index 836f5fee9e58..66cbf4eb8855 100644
--- a/trunk/net/sched/act_skbedit.c
+++ b/trunk/net/sched/act_skbedit.c
@@ -46,7 +46,8 @@ static int tcf_skbedit(struct sk_buff *skb, struct tc_action *a,
spin_lock(&d->tcf_lock);
d->tcf_tm.lastuse = jiffies;
- bstats_update(&d->tcf_bstats, skb);
+ d->tcf_bstats.bytes += qdisc_pkt_len(skb);
+ d->tcf_bstats.packets++;
if (d->flags & SKBEDIT_F_PRIORITY)
skb->priority = d->priority;
diff --git a/trunk/net/sched/sch_atm.c b/trunk/net/sched/sch_atm.c
index 943d733409d0..282540778aa8 100644
--- a/trunk/net/sched/sch_atm.c
+++ b/trunk/net/sched/sch_atm.c
@@ -422,8 +422,10 @@ drop: __maybe_unused
}
return ret;
}
- qdisc_bstats_update(sch, skb);
- bstats_update(&flow->bstats, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
+ flow->bstats.bytes += qdisc_pkt_len(skb);
+ flow->bstats.packets++;
/*
* Okay, this may seem weird. We pretend we've dropped the packet if
* it goes via ATM. The reason for this is that the outer qdisc
diff --git a/trunk/net/sched/sch_cbq.c b/trunk/net/sched/sch_cbq.c
index c80d1c210c5d..eb7631590865 100644
--- a/trunk/net/sched/sch_cbq.c
+++ b/trunk/net/sched/sch_cbq.c
@@ -390,7 +390,8 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
ret = qdisc_enqueue(skb, cl->q);
if (ret == NET_XMIT_SUCCESS) {
sch->q.qlen++;
- qdisc_bstats_update(sch, skb);
+ sch->bstats.packets++;
+ sch->bstats.bytes += qdisc_pkt_len(skb);
cbq_mark_toplevel(q, cl);
if (!cl->next_alive)
cbq_activate_class(cl);
@@ -649,7 +650,8 @@ static int cbq_reshape_fail(struct sk_buff *skb, struct Qdisc *child)
ret = qdisc_enqueue(skb, cl->q);
if (ret == NET_XMIT_SUCCESS) {
sch->q.qlen++;
- qdisc_bstats_update(sch, skb);
+ sch->bstats.packets++;
+ sch->bstats.bytes += qdisc_pkt_len(skb);
if (!cl->next_alive)
cbq_activate_class(cl);
return 0;
diff --git a/trunk/net/sched/sch_drr.c b/trunk/net/sched/sch_drr.c
index de55e642eafc..aa8b5313f8cf 100644
--- a/trunk/net/sched/sch_drr.c
+++ b/trunk/net/sched/sch_drr.c
@@ -351,6 +351,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch)
{
struct drr_sched *q = qdisc_priv(sch);
struct drr_class *cl;
+ unsigned int len;
int err;
cl = drr_classify(skb, sch, &err);
@@ -361,6 +362,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch)
return err;
}
+ len = qdisc_pkt_len(skb);
err = qdisc_enqueue(skb, cl->qdisc);
if (unlikely(err != NET_XMIT_SUCCESS)) {
if (net_xmit_drop_count(err)) {
@@ -375,8 +377,10 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch)
cl->deficit = cl->quantum;
}
- bstats_update(&cl->bstats, skb);
- qdisc_bstats_update(sch, skb);
+ cl->bstats.packets++;
+ cl->bstats.bytes += len;
+ sch->bstats.packets++;
+ sch->bstats.bytes += len;
sch->q.qlen++;
return err;
diff --git a/trunk/net/sched/sch_dsmark.c b/trunk/net/sched/sch_dsmark.c
index 60f4bdd4408e..1d295d62bb5c 100644
--- a/trunk/net/sched/sch_dsmark.c
+++ b/trunk/net/sched/sch_dsmark.c
@@ -260,7 +260,8 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch)
return err;
}
- qdisc_bstats_update(sch, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
sch->q.qlen++;
return NET_XMIT_SUCCESS;
diff --git a/trunk/net/sched/sch_hfsc.c b/trunk/net/sched/sch_hfsc.c
index 2e45791d4f6c..069c62b7bb36 100644
--- a/trunk/net/sched/sch_hfsc.c
+++ b/trunk/net/sched/sch_hfsc.c
@@ -1599,8 +1599,10 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (cl->qdisc->q.qlen == 1)
set_active(cl, qdisc_pkt_len(skb));
- bstats_update(&cl->bstats, skb);
- qdisc_bstats_update(sch, skb);
+ cl->bstats.packets++;
+ cl->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
+ sch->bstats.bytes += qdisc_pkt_len(skb);
sch->q.qlen++;
return NET_XMIT_SUCCESS;
diff --git a/trunk/net/sched/sch_htb.c b/trunk/net/sched/sch_htb.c
index 984c1b0c6836..01b519d6c52d 100644
--- a/trunk/net/sched/sch_htb.c
+++ b/trunk/net/sched/sch_htb.c
@@ -569,12 +569,15 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
}
return ret;
} else {
- bstats_update(&cl->bstats, skb);
+ cl->bstats.packets +=
+ skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
+ cl->bstats.bytes += qdisc_pkt_len(skb);
htb_activate(q, cl);
}
sch->q.qlen++;
- qdisc_bstats_update(sch, skb);
+ sch->bstats.packets += skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
+ sch->bstats.bytes += qdisc_pkt_len(skb);
return NET_XMIT_SUCCESS;
}
@@ -645,10 +648,12 @@ static void htb_charge_class(struct htb_sched *q, struct htb_class *cl,
htb_add_to_wait_tree(q, cl, diff);
}
- /* update basic stats except for leaves which are already updated */
- if (cl->level)
- bstats_update(&cl->bstats, skb);
-
+ /* update byte stats except for leaves which are already updated */
+ if (cl->level) {
+ cl->bstats.bytes += bytes;
+ cl->bstats.packets += skb_is_gso(skb)?
+ skb_shinfo(skb)->gso_segs:1;
+ }
cl = cl->parent;
}
}
diff --git a/trunk/net/sched/sch_ingress.c b/trunk/net/sched/sch_ingress.c
index bce1665239b8..f10e34a68445 100644
--- a/trunk/net/sched/sch_ingress.c
+++ b/trunk/net/sched/sch_ingress.c
@@ -63,7 +63,8 @@ static int ingress_enqueue(struct sk_buff *skb, struct Qdisc *sch)
result = tc_classify(skb, p->filter_list, &res);
- qdisc_bstats_update(sch, skb);
+ sch->bstats.packets++;
+ sch->bstats.bytes += qdisc_pkt_len(skb);
switch (result) {
case TC_ACT_SHOT:
result = TC_ACT_SHOT;
diff --git a/trunk/net/sched/sch_multiq.c b/trunk/net/sched/sch_multiq.c
index 21f13da24763..32690deab5d0 100644
--- a/trunk/net/sched/sch_multiq.c
+++ b/trunk/net/sched/sch_multiq.c
@@ -83,7 +83,8 @@ multiq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
ret = qdisc_enqueue(skb, qdisc);
if (ret == NET_XMIT_SUCCESS) {
- qdisc_bstats_update(sch, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
sch->q.qlen++;
return NET_XMIT_SUCCESS;
}
diff --git a/trunk/net/sched/sch_netem.c b/trunk/net/sched/sch_netem.c
index 1c4bce863479..e5593c083a78 100644
--- a/trunk/net/sched/sch_netem.c
+++ b/trunk/net/sched/sch_netem.c
@@ -240,7 +240,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (likely(ret == NET_XMIT_SUCCESS)) {
sch->q.qlen++;
- qdisc_bstats_update(sch, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
} else if (net_xmit_drop_count(ret)) {
sch->qstats.drops++;
}
@@ -476,7 +477,8 @@ static int tfifo_enqueue(struct sk_buff *nskb, struct Qdisc *sch)
__skb_queue_after(list, skb, nskb);
sch->qstats.backlog += qdisc_pkt_len(nskb);
- qdisc_bstats_update(sch, nskb);
+ sch->bstats.bytes += qdisc_pkt_len(nskb);
+ sch->bstats.packets++;
return NET_XMIT_SUCCESS;
}
diff --git a/trunk/net/sched/sch_prio.c b/trunk/net/sched/sch_prio.c
index 966158d49dd1..b1c95bce33ce 100644
--- a/trunk/net/sched/sch_prio.c
+++ b/trunk/net/sched/sch_prio.c
@@ -84,7 +84,8 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch)
ret = qdisc_enqueue(skb, qdisc);
if (ret == NET_XMIT_SUCCESS) {
- qdisc_bstats_update(sch, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
sch->q.qlen++;
return NET_XMIT_SUCCESS;
}
diff --git a/trunk/net/sched/sch_red.c b/trunk/net/sched/sch_red.c
index a6009c5a2c97..a67ba3c5a0cc 100644
--- a/trunk/net/sched/sch_red.c
+++ b/trunk/net/sched/sch_red.c
@@ -94,7 +94,8 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc* sch)
ret = qdisc_enqueue(skb, child);
if (likely(ret == NET_XMIT_SUCCESS)) {
- qdisc_bstats_update(sch, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
sch->q.qlen++;
} else if (net_xmit_drop_count(ret)) {
q->stats.pdrop++;
diff --git a/trunk/net/sched/sch_sfq.c b/trunk/net/sched/sch_sfq.c
index 239ec53a634d..d54ac94066c2 100644
--- a/trunk/net/sched/sch_sfq.c
+++ b/trunk/net/sched/sch_sfq.c
@@ -403,7 +403,8 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
slot->allot = q->scaled_quantum;
}
if (++sch->q.qlen <= q->limit) {
- qdisc_bstats_update(sch, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
return NET_XMIT_SUCCESS;
}
diff --git a/trunk/net/sched/sch_tbf.c b/trunk/net/sched/sch_tbf.c
index 77565e721811..641a30d64635 100644
--- a/trunk/net/sched/sch_tbf.c
+++ b/trunk/net/sched/sch_tbf.c
@@ -134,7 +134,8 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
}
sch->q.qlen++;
- qdisc_bstats_update(sch, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
return NET_XMIT_SUCCESS;
}
diff --git a/trunk/net/sched/sch_teql.c b/trunk/net/sched/sch_teql.c
index af9360d1f6eb..106479a7c94a 100644
--- a/trunk/net/sched/sch_teql.c
+++ b/trunk/net/sched/sch_teql.c
@@ -83,7 +83,8 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc* sch)
if (q->q.qlen < dev->tx_queue_len) {
__skb_queue_tail(&q->q, skb);
- qdisc_bstats_update(sch, skb);
+ sch->bstats.bytes += qdisc_pkt_len(skb);
+ sch->bstats.packets++;
return NET_XMIT_SUCCESS;
}
diff --git a/trunk/net/xfrm/xfrm_user.c b/trunk/net/xfrm/xfrm_user.c
index d5e1e0b08890..6a8da81ff66f 100644
--- a/trunk/net/xfrm/xfrm_user.c
+++ b/trunk/net/xfrm/xfrm_user.c
@@ -26,7 +26,6 @@
#include
#include
#include
-#include
#include
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
#include
@@ -303,8 +302,7 @@ static int attach_auth_trunc(struct xfrm_algo_auth **algpp, u8 *props,
algo = xfrm_aalg_get_byname(ualg->alg_name, 1);
if (!algo)
return -ENOSYS;
- if ((ualg->alg_trunc_len / 8) > MAX_AH_AUTH_LEN ||
- ualg->alg_trunc_len > algo->uinfo.auth.icv_fullbits)
+ if (ualg->alg_trunc_len > algo->uinfo.auth.icv_fullbits)
return -EINVAL;
*props = algo->desc.sadb_alg_id;