Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: MAINTAINERS drivers/net/wireless/iwlwifi/pcie/trans.c The iwlwifi conflict was resolved by keeping the code added in 'net' that turns off the buggy chip feature. The MAINTAINERS conflict was merely overlapping changes, one change updated all the wireless web site URLs and the other changed some GIT trees to be Johannes's instead of John's. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
43b03f1f6d
12
MAINTAINERS
12
MAINTAINERS
|
@ -1800,6 +1800,9 @@ F: include/linux/cfag12864b.h
|
|||
CFG80211 and NL80211
|
||||
M: Johannes Berg <johannes@sipsolutions.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://wireless.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
|
||||
S: Maintained
|
||||
F: include/linux/nl80211.h
|
||||
F: include/net/cfg80211.h
|
||||
|
@ -4340,7 +4343,8 @@ MAC80211
|
|||
M: Johannes Berg <johannes@sipsolutions.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://wireless.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
|
||||
S: Maintained
|
||||
F: Documentation/networking/mac80211-injection.txt
|
||||
F: include/net/mac80211.h
|
||||
|
@ -4351,7 +4355,8 @@ M: Stefano Brivio <stefano.brivio@polimi.it>
|
|||
M: Mattias Nissler <mattias.nissler@gmx.de>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://wireless.kernel.org/en/developers/Documentation/mac80211/RateControl/PID
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
|
||||
S: Maintained
|
||||
F: net/mac80211/rc80211_pid*
|
||||
|
||||
|
@ -5695,6 +5700,9 @@ F: include/linux/remoteproc.h
|
|||
RFKILL
|
||||
M: Johannes Berg <johannes@sipsolutions.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://wireless.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
|
||||
S: Maintained
|
||||
F: Documentation/rfkill.txt
|
||||
F: net/rfkill/
|
||||
|
|
|
@ -232,17 +232,19 @@ void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc)
|
|||
int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,
|
||||
bool enable)
|
||||
{
|
||||
struct pci_dev *pdev = pc->core->bus->host_pci;
|
||||
struct pci_dev *pdev;
|
||||
u32 coremask, tmp;
|
||||
int err = 0;
|
||||
|
||||
if (core->bus->hosttype != BCMA_HOSTTYPE_PCI) {
|
||||
if (!pc || core->bus->hosttype != BCMA_HOSTTYPE_PCI) {
|
||||
/* This bcma device is not on a PCI host-bus. So the IRQs are
|
||||
* not routed through the PCI core.
|
||||
* So we must not enable routing through the PCI core. */
|
||||
goto out;
|
||||
}
|
||||
|
||||
pdev = pc->core->bus->host_pci;
|
||||
|
||||
err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
|
||||
if (err)
|
||||
goto out;
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
#include <net/route.h>
|
||||
#include <net/net_namespace.h>
|
||||
#include <net/netns/generic.h>
|
||||
#include <net/pkt_sched.h>
|
||||
#include "bonding.h"
|
||||
#include "bond_3ad.h"
|
||||
#include "bond_alb.h"
|
||||
|
@ -381,8 +382,6 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
|
|||
return next;
|
||||
}
|
||||
|
||||
#define bond_queue_mapping(skb) (*(u16 *)((skb)->cb))
|
||||
|
||||
/**
|
||||
* bond_dev_queue_xmit - Prepare skb for xmit.
|
||||
*
|
||||
|
@ -395,7 +394,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
|
|||
{
|
||||
skb->dev = slave_dev;
|
||||
|
||||
skb->queue_mapping = bond_queue_mapping(skb);
|
||||
BUILD_BUG_ON(sizeof(skb->queue_mapping) !=
|
||||
sizeof(qdisc_skb_cb(skb)->bond_queue_mapping));
|
||||
skb->queue_mapping = qdisc_skb_cb(skb)->bond_queue_mapping;
|
||||
|
||||
if (unlikely(netpoll_tx_running(slave_dev)))
|
||||
bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
|
||||
|
@ -4174,7 +4175,7 @@ static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
|
|||
/*
|
||||
* Save the original txq to restore before passing to the driver
|
||||
*/
|
||||
bond_queue_mapping(skb) = skb->queue_mapping;
|
||||
qdisc_skb_cb(skb)->bond_queue_mapping = skb->queue_mapping;
|
||||
|
||||
if (unlikely(txq >= dev->real_num_tx_queues)) {
|
||||
do {
|
||||
|
|
|
@ -1082,8 +1082,12 @@ static ssize_t bonding_store_primary(struct device *d,
|
|||
}
|
||||
}
|
||||
|
||||
pr_info("%s: Unable to set %.*s as primary slave.\n",
|
||||
bond->dev->name, (int)strlen(buf) - 1, buf);
|
||||
strncpy(bond->params.primary, ifname, IFNAMSIZ);
|
||||
bond->params.primary[IFNAMSIZ - 1] = 0;
|
||||
|
||||
pr_info("%s: Recording %s as primary, "
|
||||
"but it has not been enslaved to %s yet.\n",
|
||||
bond->dev->name, ifname, bond->dev->name);
|
||||
out:
|
||||
write_unlock_bh(&bond->curr_slave_lock);
|
||||
read_unlock(&bond->lock);
|
||||
|
|
|
@ -187,8 +187,10 @@ static int __init dummy_init_module(void)
|
|||
rtnl_lock();
|
||||
err = __rtnl_link_register(&dummy_link_ops);
|
||||
|
||||
for (i = 0; i < numdummies && !err; i++)
|
||||
for (i = 0; i < numdummies && !err; i++) {
|
||||
err = dummy_init_one();
|
||||
cond_resched();
|
||||
}
|
||||
if (err < 0)
|
||||
__rtnl_link_unregister(&dummy_link_ops);
|
||||
rtnl_unlock();
|
||||
|
|
|
@ -14275,7 +14275,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
|
|||
}
|
||||
}
|
||||
|
||||
if (tg3_flag(tp, 5755_PLUS))
|
||||
if (tg3_flag(tp, 5755_PLUS) ||
|
||||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
|
||||
tg3_flag_set(tp, SHORT_DMA_BUG);
|
||||
|
||||
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719)
|
||||
|
|
|
@ -736,6 +736,8 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
|
|||
|
||||
copied = make_tx_wrbs(adapter, txq, skb, wrb_cnt, dummy_wrb);
|
||||
if (copied) {
|
||||
int gso_segs = skb_shinfo(skb)->gso_segs;
|
||||
|
||||
/* record the sent skb in the sent_skb table */
|
||||
BUG_ON(txo->sent_skb_list[start]);
|
||||
txo->sent_skb_list[start] = skb;
|
||||
|
@ -753,8 +755,7 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
|
|||
|
||||
be_txq_notify(adapter, txq->id, wrb_cnt);
|
||||
|
||||
be_tx_stats_update(txo, wrb_cnt, copied,
|
||||
skb_shinfo(skb)->gso_segs, stopped);
|
||||
be_tx_stats_update(txo, wrb_cnt, copied, gso_segs, stopped);
|
||||
} else {
|
||||
txq->head = start;
|
||||
dev_kfree_skb_any(skb);
|
||||
|
|
|
@ -4381,10 +4381,12 @@ static int sky2_set_features(struct net_device *dev, netdev_features_t features)
|
|||
struct sky2_port *sky2 = netdev_priv(dev);
|
||||
netdev_features_t changed = dev->features ^ features;
|
||||
|
||||
if (changed & NETIF_F_RXCSUM) {
|
||||
bool on = features & NETIF_F_RXCSUM;
|
||||
sky2_write32(sky2->hw, Q_ADDR(rxqaddr[sky2->port], Q_CSR),
|
||||
on ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM);
|
||||
if ((changed & NETIF_F_RXCSUM) &&
|
||||
!(sky2->hw->flags & SKY2_HW_NEW_LE)) {
|
||||
sky2_write32(sky2->hw,
|
||||
Q_ADDR(rxqaddr[sky2->port], Q_CSR),
|
||||
(features & NETIF_F_RXCSUM)
|
||||
? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM);
|
||||
}
|
||||
|
||||
if (changed & NETIF_F_RXHASH)
|
||||
|
|
|
@ -946,16 +946,16 @@ static void __lpc_handle_xmit(struct net_device *ndev)
|
|||
/* Update stats */
|
||||
ndev->stats.tx_packets++;
|
||||
ndev->stats.tx_bytes += skb->len;
|
||||
|
||||
/* Free buffer */
|
||||
dev_kfree_skb_irq(skb);
|
||||
}
|
||||
dev_kfree_skb_irq(skb);
|
||||
|
||||
txcidx = readl(LPC_ENET_TXCONSUMEINDEX(pldat->net_base));
|
||||
}
|
||||
|
||||
if (netif_queue_stopped(ndev))
|
||||
netif_wake_queue(ndev);
|
||||
if (pldat->num_used_tx_buffs <= ENET_TX_DESC/2) {
|
||||
if (netif_queue_stopped(ndev))
|
||||
netif_wake_queue(ndev);
|
||||
}
|
||||
}
|
||||
|
||||
static int __lpc_handle_recv(struct net_device *ndev, int budget)
|
||||
|
@ -1320,6 +1320,7 @@ static const struct net_device_ops lpc_netdev_ops = {
|
|||
.ndo_set_rx_mode = lpc_eth_set_multicast_list,
|
||||
.ndo_do_ioctl = lpc_eth_ioctl,
|
||||
.ndo_set_mac_address = lpc_set_mac_address,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
};
|
||||
|
||||
static int lpc_eth_drv_probe(struct platform_device *pdev)
|
||||
|
|
|
@ -5889,11 +5889,7 @@ static void rtl_slow_event_work(struct rtl8169_private *tp)
|
|||
if (status & LinkChg)
|
||||
__rtl8169_check_link_status(dev, tp, tp->mmio_addr, true);
|
||||
|
||||
napi_disable(&tp->napi);
|
||||
rtl_irq_disable(tp);
|
||||
|
||||
napi_enable(&tp->napi);
|
||||
napi_schedule(&tp->napi);
|
||||
rtl_irq_enable_all(tp);
|
||||
}
|
||||
|
||||
static void rtl_task(struct work_struct *work)
|
||||
|
|
|
@ -15,6 +15,7 @@ if STMMAC_ETH
|
|||
config STMMAC_PLATFORM
|
||||
bool "STMMAC Platform bus support"
|
||||
depends on STMMAC_ETH
|
||||
default y
|
||||
---help---
|
||||
This selects the platform specific bus support for
|
||||
the stmmac device driver. This is the driver used
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/stmmac.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/pci.h>
|
||||
#include "common.h"
|
||||
#ifdef CONFIG_STMMAC_TIMER
|
||||
#include "stmmac_timer.h"
|
||||
|
@ -95,8 +96,6 @@ extern int stmmac_mdio_register(struct net_device *ndev);
|
|||
extern void stmmac_set_ethtool_ops(struct net_device *netdev);
|
||||
extern const struct stmmac_desc_ops enh_desc_ops;
|
||||
extern const struct stmmac_desc_ops ndesc_ops;
|
||||
extern struct pci_driver stmmac_pci_driver;
|
||||
extern struct platform_driver stmmac_pltfr_driver;
|
||||
int stmmac_freeze(struct net_device *ndev);
|
||||
int stmmac_restore(struct net_device *ndev);
|
||||
int stmmac_resume(struct net_device *ndev);
|
||||
|
@ -110,7 +109,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
|
|||
static inline int stmmac_clk_enable(struct stmmac_priv *priv)
|
||||
{
|
||||
if (!IS_ERR(priv->stmmac_clk))
|
||||
return clk_enable(priv->stmmac_clk);
|
||||
return clk_prepare_enable(priv->stmmac_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -120,7 +119,7 @@ static inline void stmmac_clk_disable(struct stmmac_priv *priv)
|
|||
if (IS_ERR(priv->stmmac_clk))
|
||||
return;
|
||||
|
||||
clk_disable(priv->stmmac_clk);
|
||||
clk_disable_unprepare(priv->stmmac_clk);
|
||||
}
|
||||
static inline int stmmac_clk_get(struct stmmac_priv *priv)
|
||||
{
|
||||
|
@ -144,3 +143,60 @@ static inline int stmmac_clk_get(struct stmmac_priv *priv)
|
|||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_HAVE_CLK */
|
||||
|
||||
|
||||
#ifdef CONFIG_STMMAC_PLATFORM
|
||||
extern struct platform_driver stmmac_pltfr_driver;
|
||||
static inline int stmmac_register_platform(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = platform_driver_register(&stmmac_pltfr_driver);
|
||||
if (err)
|
||||
pr_err("stmmac: failed to register the platform driver\n");
|
||||
|
||||
return err;
|
||||
}
|
||||
static inline void stmmac_unregister_platform(void)
|
||||
{
|
||||
platform_driver_register(&stmmac_pltfr_driver);
|
||||
}
|
||||
#else
|
||||
static inline int stmmac_register_platform(void)
|
||||
{
|
||||
pr_debug("stmmac: do not register the platf driver\n");
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline void stmmac_unregister_platform(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_STMMAC_PLATFORM */
|
||||
|
||||
#ifdef CONFIG_STMMAC_PCI
|
||||
extern struct pci_driver stmmac_pci_driver;
|
||||
static inline int stmmac_register_pci(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = pci_register_driver(&stmmac_pci_driver);
|
||||
if (err)
|
||||
pr_err("stmmac: failed to register the PCI driver\n");
|
||||
|
||||
return err;
|
||||
}
|
||||
static inline void stmmac_unregister_pci(void)
|
||||
{
|
||||
pci_unregister_driver(&stmmac_pci_driver);
|
||||
}
|
||||
#else
|
||||
static inline int stmmac_register_pci(void)
|
||||
{
|
||||
pr_debug("stmmac: do not register the PCI driver\n");
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline void stmmac_unregister_pci(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_STMMAC_PCI */
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/prefetch.h>
|
||||
#include <linux/pci.h>
|
||||
#ifdef CONFIG_STMMAC_DEBUG_FS
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
@ -2093,25 +2092,29 @@ int stmmac_restore(struct net_device *ndev)
|
|||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
/* Driver can be configured w/ and w/ both PCI and Platf drivers
|
||||
* depending on the configuration selected.
|
||||
*/
|
||||
static int __init stmmac_init(void)
|
||||
{
|
||||
int err = 0;
|
||||
int err_plt = 0;
|
||||
int err_pci = 0;
|
||||
|
||||
err = platform_driver_register(&stmmac_pltfr_driver);
|
||||
err_plt = stmmac_register_platform();
|
||||
err_pci = stmmac_register_pci();
|
||||
|
||||
if (!err) {
|
||||
err = pci_register_driver(&stmmac_pci_driver);
|
||||
if (err)
|
||||
platform_driver_unregister(&stmmac_pltfr_driver);
|
||||
if ((err_pci) && (err_plt)) {
|
||||
pr_err("stmmac: driver registration failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit stmmac_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&stmmac_pci_driver);
|
||||
platform_driver_unregister(&stmmac_pltfr_driver);
|
||||
stmmac_unregister_platform();
|
||||
stmmac_unregister_pci();
|
||||
}
|
||||
|
||||
module_init(stmmac_init);
|
||||
|
|
|
@ -3598,7 +3598,6 @@ static int release_tx_packet(struct niu *np, struct tx_ring_info *rp, int idx)
|
|||
static void niu_tx_work(struct niu *np, struct tx_ring_info *rp)
|
||||
{
|
||||
struct netdev_queue *txq;
|
||||
unsigned int tx_bytes;
|
||||
u16 pkt_cnt, tmp;
|
||||
int cons, index;
|
||||
u64 cs;
|
||||
|
@ -3621,18 +3620,12 @@ static void niu_tx_work(struct niu *np, struct tx_ring_info *rp)
|
|||
netif_printk(np, tx_done, KERN_DEBUG, np->dev,
|
||||
"%s() pkt_cnt[%u] cons[%d]\n", __func__, pkt_cnt, cons);
|
||||
|
||||
tx_bytes = 0;
|
||||
tmp = pkt_cnt;
|
||||
while (tmp--) {
|
||||
tx_bytes += rp->tx_buffs[cons].skb->len;
|
||||
while (pkt_cnt--)
|
||||
cons = release_tx_packet(np, rp, cons);
|
||||
}
|
||||
|
||||
rp->cons = cons;
|
||||
smp_mb();
|
||||
|
||||
netdev_tx_completed_queue(txq, pkt_cnt, tx_bytes);
|
||||
|
||||
out:
|
||||
if (unlikely(netif_tx_queue_stopped(txq) &&
|
||||
(niu_tx_avail(rp) > NIU_TX_WAKEUP_THRESH(rp)))) {
|
||||
|
@ -4333,7 +4326,6 @@ static void niu_free_channels(struct niu *np)
|
|||
struct tx_ring_info *rp = &np->tx_rings[i];
|
||||
|
||||
niu_free_tx_ring_info(np, rp);
|
||||
netdev_tx_reset_queue(netdev_get_tx_queue(np->dev, i));
|
||||
}
|
||||
kfree(np->tx_rings);
|
||||
np->tx_rings = NULL;
|
||||
|
@ -6739,8 +6731,6 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
|
|||
prod = NEXT_TX(rp, prod);
|
||||
}
|
||||
|
||||
netdev_tx_sent_queue(txq, skb->len);
|
||||
|
||||
if (prod < rp->prod)
|
||||
rp->wrap_bit ^= TX_RING_KICK_WRAP;
|
||||
rp->prod = prod;
|
||||
|
|
|
@ -7,6 +7,8 @@ config TILE_NET
|
|||
depends on TILE
|
||||
default y
|
||||
select CRC32
|
||||
select TILE_GXIO_MPIPE if TILEGX
|
||||
select HIGH_RES_TIMERS if TILEGX
|
||||
---help---
|
||||
This is a standard Linux network device driver for the
|
||||
on-chip Tilera Gigabit Ethernet and XAUI interfaces.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
obj-$(CONFIG_TILE_NET) += tile_net.o
|
||||
ifdef CONFIG_TILEGX
|
||||
tile_net-objs := tilegx.o mpipe.o iorpc_mpipe.o dma_queue.o
|
||||
tile_net-y := tilegx.o
|
||||
else
|
||||
tile_net-objs := tilepro.o
|
||||
tile_net-y := tilepro.o
|
||||
endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -99,7 +99,7 @@ static int of_mdio_bus_match(struct device *dev, void *mdio_bus_np)
|
|||
}
|
||||
/**
|
||||
* of_mdio_find_bus - Given an mii_bus node, find the mii_bus.
|
||||
* @mdio_np: Pointer to the mii_bus.
|
||||
* @mdio_bus_np: Pointer to the mii_bus.
|
||||
*
|
||||
* Returns a pointer to the mii_bus, or NULL if none found.
|
||||
*
|
||||
|
|
|
@ -42,7 +42,8 @@ module_param(gso, bool, 0444);
|
|||
#define VIRTNET_DRIVER_VERSION "1.0.0"
|
||||
|
||||
struct virtnet_stats {
|
||||
struct u64_stats_sync syncp;
|
||||
struct u64_stats_sync tx_syncp;
|
||||
struct u64_stats_sync rx_syncp;
|
||||
u64 tx_bytes;
|
||||
u64 tx_packets;
|
||||
|
||||
|
@ -300,10 +301,10 @@ static void receive_buf(struct net_device *dev, void *buf, unsigned int len)
|
|||
|
||||
hdr = skb_vnet_hdr(skb);
|
||||
|
||||
u64_stats_update_begin(&stats->syncp);
|
||||
u64_stats_update_begin(&stats->rx_syncp);
|
||||
stats->rx_bytes += skb->len;
|
||||
stats->rx_packets++;
|
||||
u64_stats_update_end(&stats->syncp);
|
||||
u64_stats_update_end(&stats->rx_syncp);
|
||||
|
||||
if (hdr->hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
|
||||
pr_debug("Needs csum!\n");
|
||||
|
@ -565,10 +566,10 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi)
|
|||
while ((skb = virtqueue_get_buf(vi->svq, &len)) != NULL) {
|
||||
pr_debug("Sent skb %p\n", skb);
|
||||
|
||||
u64_stats_update_begin(&stats->syncp);
|
||||
u64_stats_update_begin(&stats->tx_syncp);
|
||||
stats->tx_bytes += skb->len;
|
||||
stats->tx_packets++;
|
||||
u64_stats_update_end(&stats->syncp);
|
||||
u64_stats_update_end(&stats->tx_syncp);
|
||||
|
||||
tot_sgs += skb_vnet_hdr(skb)->num_sg;
|
||||
dev_kfree_skb_any(skb);
|
||||
|
@ -703,12 +704,16 @@ static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev,
|
|||
u64 tpackets, tbytes, rpackets, rbytes;
|
||||
|
||||
do {
|
||||
start = u64_stats_fetch_begin(&stats->syncp);
|
||||
start = u64_stats_fetch_begin(&stats->tx_syncp);
|
||||
tpackets = stats->tx_packets;
|
||||
tbytes = stats->tx_bytes;
|
||||
} while (u64_stats_fetch_retry(&stats->tx_syncp, start));
|
||||
|
||||
do {
|
||||
start = u64_stats_fetch_begin(&stats->rx_syncp);
|
||||
rpackets = stats->rx_packets;
|
||||
rbytes = stats->rx_bytes;
|
||||
} while (u64_stats_fetch_retry(&stats->syncp, start));
|
||||
} while (u64_stats_fetch_retry(&stats->rx_syncp, start));
|
||||
|
||||
tot->rx_packets += rpackets;
|
||||
tot->tx_packets += tpackets;
|
||||
|
|
|
@ -877,6 +877,10 @@ struct b43_wl {
|
|||
* from the mac80211 subsystem. */
|
||||
u16 mac80211_initially_registered_queues;
|
||||
|
||||
/* Set this if we call ieee80211_register_hw() and check if we call
|
||||
* ieee80211_unregister_hw(). */
|
||||
bool hw_registred;
|
||||
|
||||
/* We can only have one operating interface (802.11 core)
|
||||
* at a time. General information about this interface follows.
|
||||
*/
|
||||
|
|
|
@ -2437,6 +2437,7 @@ start_ieee80211:
|
|||
err = ieee80211_register_hw(wl->hw);
|
||||
if (err)
|
||||
goto err_one_core_detach;
|
||||
wl->hw_registred = true;
|
||||
b43_leds_register(wl->current_dev);
|
||||
goto out;
|
||||
|
||||
|
@ -5299,6 +5300,7 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
|
|||
|
||||
hw->queues = modparam_qos ? B43_QOS_QUEUE_NUM : 1;
|
||||
wl->mac80211_initially_registered_queues = hw->queues;
|
||||
wl->hw_registred = false;
|
||||
hw->max_rates = 2;
|
||||
SET_IEEE80211_DEV(hw, dev->dev);
|
||||
if (is_valid_ether_addr(sprom->et1mac))
|
||||
|
@ -5370,12 +5372,15 @@ static void b43_bcma_remove(struct bcma_device *core)
|
|||
* as the ieee80211 unreg will destroy the workqueue. */
|
||||
cancel_work_sync(&wldev->restart_work);
|
||||
|
||||
/* Restore the queues count before unregistering, because firmware detect
|
||||
* might have modified it. Restoring is important, so the networking
|
||||
* stack can properly free resources. */
|
||||
wl->hw->queues = wl->mac80211_initially_registered_queues;
|
||||
b43_leds_stop(wldev);
|
||||
ieee80211_unregister_hw(wl->hw);
|
||||
B43_WARN_ON(!wl);
|
||||
if (wl->current_dev == wldev && wl->hw_registred) {
|
||||
/* Restore the queues count before unregistering, because firmware detect
|
||||
* might have modified it. Restoring is important, so the networking
|
||||
* stack can properly free resources. */
|
||||
wl->hw->queues = wl->mac80211_initially_registered_queues;
|
||||
b43_leds_stop(wldev);
|
||||
ieee80211_unregister_hw(wl->hw);
|
||||
}
|
||||
|
||||
b43_one_core_detach(wldev->dev);
|
||||
|
||||
|
@ -5446,7 +5451,7 @@ static void b43_ssb_remove(struct ssb_device *sdev)
|
|||
cancel_work_sync(&wldev->restart_work);
|
||||
|
||||
B43_WARN_ON(!wl);
|
||||
if (wl->current_dev == wldev) {
|
||||
if (wl->current_dev == wldev && wl->hw_registred) {
|
||||
/* Restore the queues count before unregistering, because firmware detect
|
||||
* might have modified it. Restoring is important, so the networking
|
||||
* stack can properly free resources. */
|
||||
|
|
|
@ -1903,14 +1903,6 @@ static void ipw2100_down(struct ipw2100_priv *priv)
|
|||
netif_stop_queue(priv->net_dev);
|
||||
}
|
||||
|
||||
/* Called by register_netdev() */
|
||||
static int ipw2100_net_init(struct net_device *dev)
|
||||
{
|
||||
struct ipw2100_priv *priv = libipw_priv(dev);
|
||||
|
||||
return ipw2100_up(priv, 1);
|
||||
}
|
||||
|
||||
static int ipw2100_wdev_init(struct net_device *dev)
|
||||
{
|
||||
struct ipw2100_priv *priv = libipw_priv(dev);
|
||||
|
@ -6087,7 +6079,6 @@ static const struct net_device_ops ipw2100_netdev_ops = {
|
|||
.ndo_stop = ipw2100_close,
|
||||
.ndo_start_xmit = libipw_xmit,
|
||||
.ndo_change_mtu = libipw_change_mtu,
|
||||
.ndo_init = ipw2100_net_init,
|
||||
.ndo_tx_timeout = ipw2100_tx_timeout,
|
||||
.ndo_set_mac_address = ipw2100_set_address,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
|
@ -6329,6 +6320,10 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
|
|||
printk(KERN_INFO DRV_NAME
|
||||
": Detected Intel PRO/Wireless 2100 Network Connection\n");
|
||||
|
||||
err = ipw2100_up(priv, 1);
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
err = ipw2100_wdev_init(dev);
|
||||
if (err)
|
||||
goto fail;
|
||||
|
@ -6338,12 +6333,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
|
|||
* network device we would call ipw2100_up. This introduced a race
|
||||
* condition with newer hotplug configurations (network was coming
|
||||
* up and making calls before the device was initialized).
|
||||
*
|
||||
* If we called ipw2100_up before we registered the device, then the
|
||||
* device name wasn't registered. So, we instead use the net_dev->init
|
||||
* member to call a function that then just turns and calls ipw2100_up.
|
||||
* net_dev->init is called after name allocation but before the
|
||||
* notifier chain is called */
|
||||
*/
|
||||
err = register_netdev(dev);
|
||||
if (err) {
|
||||
printk(KERN_WARNING DRV_NAME
|
||||
|
|
|
@ -1251,7 +1251,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
|
|||
key_flags |= STA_KEY_MULTICAST_MSK;
|
||||
|
||||
sta_cmd.key.key_flags = key_flags;
|
||||
sta_cmd.key.key_offset = WEP_INVALID_OFFSET;
|
||||
sta_cmd.key.key_offset = keyconf->hw_key_idx;
|
||||
sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK;
|
||||
sta_cmd.mode = STA_CONTROL_MODIFY_MSK;
|
||||
|
||||
|
|
|
@ -224,6 +224,7 @@
|
|||
#define SCD_TXFACT (SCD_BASE + 0x10)
|
||||
#define SCD_ACTIVE (SCD_BASE + 0x14)
|
||||
#define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8)
|
||||
#define SCD_CHAINEXT_EN (SCD_BASE + 0x244)
|
||||
#define SCD_AGGR_SEL (SCD_BASE + 0x248)
|
||||
#define SCD_INTERRUPT_MASK (SCD_BASE + 0x108)
|
||||
|
||||
|
|
|
@ -35,17 +35,20 @@
|
|||
#define IWL6000_UCODE_API_MAX 6
|
||||
#define IWL6050_UCODE_API_MAX 5
|
||||
#define IWL6000G2_UCODE_API_MAX 6
|
||||
#define IWL6035_UCODE_API_MAX 6
|
||||
|
||||
/* Oldest version we won't warn about */
|
||||
#define IWL6000_UCODE_API_OK 4
|
||||
#define IWL6000G2_UCODE_API_OK 5
|
||||
#define IWL6050_UCODE_API_OK 5
|
||||
#define IWL6000G2B_UCODE_API_OK 6
|
||||
#define IWL6035_UCODE_API_OK 6
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL6000_UCODE_API_MIN 4
|
||||
#define IWL6050_UCODE_API_MIN 4
|
||||
#define IWL6000G2_UCODE_API_MIN 4
|
||||
#define IWL6000G2_UCODE_API_MIN 5
|
||||
#define IWL6035_UCODE_API_MIN 6
|
||||
|
||||
/* EEPROM versions */
|
||||
#define EEPROM_6000_TX_POWER_VERSION (4)
|
||||
|
@ -243,9 +246,25 @@ const struct iwl_cfg iwl6030_2bg_cfg = {
|
|||
IWL_DEVICE_6030,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_6035 \
|
||||
.fw_name_pre = IWL6030_FW_PRE, \
|
||||
.ucode_api_max = IWL6035_UCODE_API_MAX, \
|
||||
.ucode_api_ok = IWL6035_UCODE_API_OK, \
|
||||
.ucode_api_min = IWL6035_UCODE_API_MIN, \
|
||||
.device_family = IWL_DEVICE_FAMILY_6030, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.eeprom_ver = EEPROM_6030_EEPROM_VERSION, \
|
||||
.eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
|
||||
.base_params = &iwl6000_g2_base_params, \
|
||||
.bt_params = &iwl6000_bt_params, \
|
||||
.need_temp_offset_calib = true, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.adv_pm = true
|
||||
|
||||
const struct iwl_cfg iwl6035_2agn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
|
||||
IWL_DEVICE_6030,
|
||||
IWL_DEVICE_6035,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
|
||||
|
|
|
@ -1065,6 +1065,12 @@ static void iwl_tx_start(struct iwl_trans *trans)
|
|||
/* Activate all Tx DMA/FIFO channels */
|
||||
iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7));
|
||||
|
||||
/* The chain extension of the SCD doesn't work well. This feature is
|
||||
* enabled by default by the HW, so we need to disable it manually.
|
||||
*/
|
||||
iwl_write_prph(trans, SCD_CHAINEXT_EN, 0);
|
||||
|
||||
|
||||
/* Enable DMA channel */
|
||||
for (chan = 0; chan < FH_TCSR_CHNL_NUM ; chan++)
|
||||
iwl_write_direct32(trans, FH_TCSR_CHNL_TX_CONFIG_REG(chan),
|
||||
|
|
|
@ -1555,6 +1555,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
|
|||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
mac80211_hwsim_monitor_ack(data2->hw, hdr->addr2);
|
||||
}
|
||||
txi->flags |= IEEE80211_TX_STAT_ACK;
|
||||
}
|
||||
ieee80211_tx_status_irqsafe(data2->hw, skb);
|
||||
return 0;
|
||||
|
|
|
@ -117,7 +117,7 @@ static void rtl8187_led_brightness_set(struct led_classdev *led_dev,
|
|||
radio_on = true;
|
||||
} else if (radio_on) {
|
||||
radio_on = false;
|
||||
cancel_delayed_work_sync(&priv->led_on);
|
||||
cancel_delayed_work(&priv->led_on);
|
||||
ieee80211_queue_delayed_work(hw, &priv->led_off, 0);
|
||||
}
|
||||
} else if (radio_on) {
|
||||
|
|
|
@ -27,7 +27,12 @@ union hmark_ports {
|
|||
__u16 src;
|
||||
__u16 dst;
|
||||
} p16;
|
||||
struct {
|
||||
__be16 src;
|
||||
__be16 dst;
|
||||
} b16;
|
||||
__u32 v32;
|
||||
__be32 b32;
|
||||
};
|
||||
|
||||
struct xt_hmark_info {
|
||||
|
|
|
@ -69,16 +69,16 @@ union tcp_word_hdr {
|
|||
#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3])
|
||||
|
||||
enum {
|
||||
TCP_FLAG_CWR = __cpu_to_be32(0x00800000),
|
||||
TCP_FLAG_ECE = __cpu_to_be32(0x00400000),
|
||||
TCP_FLAG_URG = __cpu_to_be32(0x00200000),
|
||||
TCP_FLAG_ACK = __cpu_to_be32(0x00100000),
|
||||
TCP_FLAG_PSH = __cpu_to_be32(0x00080000),
|
||||
TCP_FLAG_RST = __cpu_to_be32(0x00040000),
|
||||
TCP_FLAG_SYN = __cpu_to_be32(0x00020000),
|
||||
TCP_FLAG_FIN = __cpu_to_be32(0x00010000),
|
||||
TCP_RESERVED_BITS = __cpu_to_be32(0x0F000000),
|
||||
TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000)
|
||||
TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000),
|
||||
TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000),
|
||||
TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000),
|
||||
TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000),
|
||||
TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000),
|
||||
TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000),
|
||||
TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000),
|
||||
TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000),
|
||||
TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000),
|
||||
TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000)
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -164,9 +164,9 @@ static inline struct rtable *ip_route_output(struct net *net, __be32 daddr,
|
|||
{
|
||||
struct flowi4 fl4 = {
|
||||
.flowi4_oif = oif,
|
||||
.flowi4_tos = tos,
|
||||
.daddr = daddr,
|
||||
.saddr = saddr,
|
||||
.flowi4_tos = tos,
|
||||
};
|
||||
return ip_route_output_key(net, &fl4);
|
||||
}
|
||||
|
|
|
@ -220,13 +220,16 @@ struct tcf_proto {
|
|||
|
||||
struct qdisc_skb_cb {
|
||||
unsigned int pkt_len;
|
||||
unsigned char data[24];
|
||||
u16 bond_queue_mapping;
|
||||
u16 _pad;
|
||||
unsigned char data[20];
|
||||
};
|
||||
|
||||
static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
|
||||
{
|
||||
struct qdisc_skb_cb *qcb;
|
||||
BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz);
|
||||
|
||||
BUILD_BUG_ON(sizeof(skb->cb) < offsetof(struct qdisc_skb_cb, data) + sz);
|
||||
BUILD_BUG_ON(sizeof(qcb->data) < sz);
|
||||
}
|
||||
|
||||
|
|
|
@ -1208,9 +1208,7 @@ static int atalk_connect(struct socket *sock, struct sockaddr *uaddr,
|
|||
if (addr->sat_addr.s_node == ATADDR_BCAST &&
|
||||
!sock_flag(sk, SOCK_BROADCAST)) {
|
||||
#if 1
|
||||
printk(KERN_WARNING "%s is broken and did not set "
|
||||
"SO_BROADCAST. It will break when 2.2 is "
|
||||
"released.\n",
|
||||
pr_warn("atalk_connect: %s is broken and did not set SO_BROADCAST.\n",
|
||||
current->comm);
|
||||
#else
|
||||
return -EACCES;
|
||||
|
|
|
@ -616,9 +616,9 @@ static int __sk_prepare_filter(struct sk_filter *fp)
|
|||
/**
|
||||
* sk_unattached_filter_create - create an unattached filter
|
||||
* @fprog: the filter program
|
||||
* @sk: the socket to use
|
||||
* @pfp: the unattached filter that is created
|
||||
*
|
||||
* Create a filter independent ofr any socket. We first run some
|
||||
* Create a filter independent of any socket. We first run some
|
||||
* sanity checks on it to make sure it does not explode on us later.
|
||||
* If an error occurs or there is insufficient memory for the filter
|
||||
* a negative errno code is returned. On success the return is zero.
|
||||
|
|
|
@ -2219,9 +2219,7 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
|
|||
rcu_read_lock_bh();
|
||||
nht = rcu_dereference_bh(tbl->nht);
|
||||
|
||||
for (h = 0; h < (1 << nht->hash_shift); h++) {
|
||||
if (h < s_h)
|
||||
continue;
|
||||
for (h = s_h; h < (1 << nht->hash_shift); h++) {
|
||||
if (h > s_h)
|
||||
s_idx = 0;
|
||||
for (n = rcu_dereference_bh(nht->hash_buckets[h]), idx = 0;
|
||||
|
@ -2260,9 +2258,7 @@ static int pneigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
|
|||
|
||||
read_lock_bh(&tbl->lock);
|
||||
|
||||
for (h = 0; h <= PNEIGH_HASHMASK; h++) {
|
||||
if (h < s_h)
|
||||
continue;
|
||||
for (h = s_h; h <= PNEIGH_HASHMASK; h++) {
|
||||
if (h > s_h)
|
||||
s_idx = 0;
|
||||
for (n = tbl->phash_buckets[h], idx = 0; n; n = n->next) {
|
||||
|
@ -2297,7 +2293,7 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
struct neigh_table *tbl;
|
||||
int t, family, s_t;
|
||||
int proxy = 0;
|
||||
int err = 0;
|
||||
int err;
|
||||
|
||||
read_lock(&neigh_tbl_lock);
|
||||
family = ((struct rtgenmsg *) nlmsg_data(cb->nlh))->rtgen_family;
|
||||
|
@ -2311,7 +2307,7 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
|
||||
s_t = cb->args[0];
|
||||
|
||||
for (tbl = neigh_tables, t = 0; tbl && (err >= 0);
|
||||
for (tbl = neigh_tables, t = 0; tbl;
|
||||
tbl = tbl->next, t++) {
|
||||
if (t < s_t || (family && tbl->family != family))
|
||||
continue;
|
||||
|
@ -2322,6 +2318,8 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
err = pneigh_dump_table(tbl, skb, cb);
|
||||
else
|
||||
err = neigh_dump_table(tbl, skb, cb);
|
||||
if (err < 0)
|
||||
break;
|
||||
}
|
||||
read_unlock(&neigh_tbl_lock);
|
||||
|
||||
|
|
|
@ -3361,7 +3361,7 @@ EXPORT_SYMBOL(kfree_skb_partial);
|
|||
* @to: prior buffer
|
||||
* @from: buffer to add
|
||||
* @fragstolen: pointer to boolean
|
||||
*
|
||||
* @delta_truesize: how much more was allocated than was requested
|
||||
*/
|
||||
bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
|
||||
bool *fragstolen, int *delta_truesize)
|
||||
|
|
|
@ -44,6 +44,7 @@ static int ip_forward_finish(struct sk_buff *skb)
|
|||
struct ip_options *opt = &(IPCB(skb)->opt);
|
||||
|
||||
IP_INC_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTFORWDATAGRAMS);
|
||||
IP_ADD_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTOCTETS, skb->len);
|
||||
|
||||
if (unlikely(opt->optlen))
|
||||
ip_forward_options(skb);
|
||||
|
|
|
@ -1574,6 +1574,7 @@ static inline int ipmr_forward_finish(struct sk_buff *skb)
|
|||
struct ip_options *opt = &(IPCB(skb)->opt);
|
||||
|
||||
IP_INC_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTFORWDATAGRAMS);
|
||||
IP_ADD_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTOCTETS, skb->len);
|
||||
|
||||
if (unlikely(opt->optlen))
|
||||
ip_forward_options(skb);
|
||||
|
|
|
@ -1562,7 +1562,7 @@ static int fib6_age(struct rt6_info *rt, void *arg)
|
|||
neigh_flags = neigh->flags;
|
||||
neigh_release(neigh);
|
||||
}
|
||||
if (neigh_flags & NTF_ROUTER) {
|
||||
if (!(neigh_flags & NTF_ROUTER)) {
|
||||
RT6_TRACE("purging route %p via non-router but gateway\n",
|
||||
rt);
|
||||
return -1;
|
||||
|
|
|
@ -513,6 +513,7 @@ int ip6_forward(struct sk_buff *skb)
|
|||
hdr->hop_limit--;
|
||||
|
||||
IP6_INC_STATS_BH(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS);
|
||||
IP6_ADD_STATS_BH(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTOCTETS, skb->len);
|
||||
return NF_HOOK(NFPROTO_IPV6, NF_INET_FORWARD, skb, skb->dev, dst->dev,
|
||||
ip6_forward_finish);
|
||||
|
||||
|
|
|
@ -1886,6 +1886,8 @@ static inline int ip6mr_forward2_finish(struct sk_buff *skb)
|
|||
{
|
||||
IP6_INC_STATS_BH(dev_net(skb_dst(skb)->dev), ip6_dst_idev(skb_dst(skb)),
|
||||
IPSTATS_MIB_OUTFORWDATAGRAMS);
|
||||
IP6_ADD_STATS_BH(dev_net(skb_dst(skb)->dev), ip6_dst_idev(skb_dst(skb)),
|
||||
IPSTATS_MIB_OUTOCTETS, skb->len);
|
||||
return dst_output(skb);
|
||||
}
|
||||
|
||||
|
|
|
@ -162,6 +162,7 @@ static void l2tp_eth_delete(struct l2tp_session *session)
|
|||
if (dev) {
|
||||
unregister_netdev(dev);
|
||||
spriv->dev = NULL;
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -249,6 +250,7 @@ static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 p
|
|||
if (rc < 0)
|
||||
goto out_del_dev;
|
||||
|
||||
__module_get(THIS_MODULE);
|
||||
/* Must be done after register_netdev() */
|
||||
strlcpy(session->ifname, dev->name, IFNAMSIZ);
|
||||
|
||||
|
|
|
@ -464,10 +464,12 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m
|
|||
sk->sk_bound_dev_if);
|
||||
if (IS_ERR(rt))
|
||||
goto no_route;
|
||||
if (connected)
|
||||
if (connected) {
|
||||
sk_setup_caps(sk, &rt->dst);
|
||||
else
|
||||
dst_release(&rt->dst); /* safe since we hold rcu_read_lock */
|
||||
} else {
|
||||
skb_dst_set(skb, &rt->dst);
|
||||
goto xmit;
|
||||
}
|
||||
}
|
||||
|
||||
/* We dont need to clone dst here, it is guaranteed to not disappear.
|
||||
|
@ -475,6 +477,7 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m
|
|||
*/
|
||||
skb_dst_set_noref(skb, &rt->dst);
|
||||
|
||||
xmit:
|
||||
/* Queue the packet to IP for output */
|
||||
rc = ip_queue_xmit(skb, &inet->cork.fl);
|
||||
rcu_read_unlock();
|
||||
|
|
|
@ -3100,7 +3100,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
|
|||
}
|
||||
|
||||
local->oper_channel = cbss->channel;
|
||||
ieee80211_hw_config(local, 0);
|
||||
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
|
||||
|
||||
if (!have_sta) {
|
||||
u32 rates = 0, basic_rates = 0;
|
||||
|
|
|
@ -270,9 +270,8 @@ static int expect_rtp_rtcp(struct sk_buff *skb, struct nf_conn *ct,
|
|||
return 0;
|
||||
|
||||
/* RTP port is even */
|
||||
port &= htons(~1);
|
||||
rtp_port = port;
|
||||
rtcp_port = htons(ntohs(port) + 1);
|
||||
rtp_port = port & ~htons(1);
|
||||
rtcp_port = port | htons(1);
|
||||
|
||||
/* Create expect for RTP */
|
||||
if ((rtp_exp = nf_ct_expect_alloc(ct)) == NULL)
|
||||
|
|
|
@ -32,13 +32,13 @@ MODULE_ALIAS("ipt_HMARK");
|
|||
MODULE_ALIAS("ip6t_HMARK");
|
||||
|
||||
struct hmark_tuple {
|
||||
u32 src;
|
||||
u32 dst;
|
||||
__be32 src;
|
||||
__be32 dst;
|
||||
union hmark_ports uports;
|
||||
uint8_t proto;
|
||||
u8 proto;
|
||||
};
|
||||
|
||||
static inline u32 hmark_addr6_mask(const __u32 *addr32, const __u32 *mask)
|
||||
static inline __be32 hmark_addr6_mask(const __be32 *addr32, const __be32 *mask)
|
||||
{
|
||||
return (addr32[0] & mask[0]) ^
|
||||
(addr32[1] & mask[1]) ^
|
||||
|
@ -46,8 +46,8 @@ static inline u32 hmark_addr6_mask(const __u32 *addr32, const __u32 *mask)
|
|||
(addr32[3] & mask[3]);
|
||||
}
|
||||
|
||||
static inline u32
|
||||
hmark_addr_mask(int l3num, const __u32 *addr32, const __u32 *mask)
|
||||
static inline __be32
|
||||
hmark_addr_mask(int l3num, const __be32 *addr32, const __be32 *mask)
|
||||
{
|
||||
switch (l3num) {
|
||||
case AF_INET:
|
||||
|
@ -58,6 +58,22 @@ hmark_addr_mask(int l3num, const __u32 *addr32, const __u32 *mask)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void hmark_swap_ports(union hmark_ports *uports,
|
||||
const struct xt_hmark_info *info)
|
||||
{
|
||||
union hmark_ports hp;
|
||||
u16 src, dst;
|
||||
|
||||
hp.b32 = (uports->b32 & info->port_mask.b32) | info->port_set.b32;
|
||||
src = ntohs(hp.b16.src);
|
||||
dst = ntohs(hp.b16.dst);
|
||||
|
||||
if (dst > src)
|
||||
uports->v32 = (dst << 16) | src;
|
||||
else
|
||||
uports->v32 = (src << 16) | dst;
|
||||
}
|
||||
|
||||
static int
|
||||
hmark_ct_set_htuple(const struct sk_buff *skb, struct hmark_tuple *t,
|
||||
const struct xt_hmark_info *info)
|
||||
|
@ -74,22 +90,19 @@ hmark_ct_set_htuple(const struct sk_buff *skb, struct hmark_tuple *t,
|
|||
otuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple;
|
||||
rtuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple;
|
||||
|
||||
t->src = hmark_addr_mask(otuple->src.l3num, otuple->src.u3.all,
|
||||
info->src_mask.all);
|
||||
t->dst = hmark_addr_mask(otuple->src.l3num, rtuple->src.u3.all,
|
||||
info->dst_mask.all);
|
||||
t->src = hmark_addr_mask(otuple->src.l3num, otuple->src.u3.ip6,
|
||||
info->src_mask.ip6);
|
||||
t->dst = hmark_addr_mask(otuple->src.l3num, rtuple->src.u3.ip6,
|
||||
info->dst_mask.ip6);
|
||||
|
||||
if (info->flags & XT_HMARK_FLAG(XT_HMARK_METHOD_L3))
|
||||
return 0;
|
||||
|
||||
t->proto = nf_ct_protonum(ct);
|
||||
if (t->proto != IPPROTO_ICMP) {
|
||||
t->uports.p16.src = otuple->src.u.all;
|
||||
t->uports.p16.dst = rtuple->src.u.all;
|
||||
t->uports.v32 = (t->uports.v32 & info->port_mask.v32) |
|
||||
info->port_set.v32;
|
||||
if (t->uports.p16.dst < t->uports.p16.src)
|
||||
swap(t->uports.p16.dst, t->uports.p16.src);
|
||||
t->uports.b16.src = otuple->src.u.all;
|
||||
t->uports.b16.dst = rtuple->src.u.all;
|
||||
hmark_swap_ports(&t->uports, info);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -98,15 +111,19 @@ hmark_ct_set_htuple(const struct sk_buff *skb, struct hmark_tuple *t,
|
|||
#endif
|
||||
}
|
||||
|
||||
/* This hash function is endian independent, to ensure consistent hashing if
|
||||
* the cluster is composed of big and little endian systems. */
|
||||
static inline u32
|
||||
hmark_hash(struct hmark_tuple *t, const struct xt_hmark_info *info)
|
||||
{
|
||||
u32 hash;
|
||||
u32 src = ntohl(t->src);
|
||||
u32 dst = ntohl(t->dst);
|
||||
|
||||
if (t->dst < t->src)
|
||||
swap(t->src, t->dst);
|
||||
if (dst < src)
|
||||
swap(src, dst);
|
||||
|
||||
hash = jhash_3words(t->src, t->dst, t->uports.v32, info->hashrnd);
|
||||
hash = jhash_3words(src, dst, t->uports.v32, info->hashrnd);
|
||||
hash = hash ^ (t->proto & info->proto_mask);
|
||||
|
||||
return (((u64)hash * info->hmodulus) >> 32) + info->hoffset;
|
||||
|
@ -126,11 +143,7 @@ hmark_set_tuple_ports(const struct sk_buff *skb, unsigned int nhoff,
|
|||
if (skb_copy_bits(skb, nhoff, &t->uports, sizeof(t->uports)) < 0)
|
||||
return;
|
||||
|
||||
t->uports.v32 = (t->uports.v32 & info->port_mask.v32) |
|
||||
info->port_set.v32;
|
||||
|
||||
if (t->uports.p16.dst < t->uports.p16.src)
|
||||
swap(t->uports.p16.dst, t->uports.p16.src);
|
||||
hmark_swap_ports(&t->uports, info);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
|
||||
|
@ -178,8 +191,8 @@ hmark_pkt_set_htuple_ipv6(const struct sk_buff *skb, struct hmark_tuple *t,
|
|||
return -1;
|
||||
}
|
||||
noicmp:
|
||||
t->src = hmark_addr6_mask(ip6->saddr.s6_addr32, info->src_mask.all);
|
||||
t->dst = hmark_addr6_mask(ip6->daddr.s6_addr32, info->dst_mask.all);
|
||||
t->src = hmark_addr6_mask(ip6->saddr.s6_addr32, info->src_mask.ip6);
|
||||
t->dst = hmark_addr6_mask(ip6->daddr.s6_addr32, info->dst_mask.ip6);
|
||||
|
||||
if (info->flags & XT_HMARK_FLAG(XT_HMARK_METHOD_L3))
|
||||
return 0;
|
||||
|
@ -255,11 +268,8 @@ hmark_pkt_set_htuple_ipv4(const struct sk_buff *skb, struct hmark_tuple *t,
|
|||
}
|
||||
}
|
||||
|
||||
t->src = (__force u32) ip->saddr;
|
||||
t->dst = (__force u32) ip->daddr;
|
||||
|
||||
t->src &= info->src_mask.ip;
|
||||
t->dst &= info->dst_mask.ip;
|
||||
t->src = ip->saddr & info->src_mask.ip;
|
||||
t->dst = ip->daddr & info->dst_mask.ip;
|
||||
|
||||
if (info->flags & XT_HMARK_FLAG(XT_HMARK_METHOD_L3))
|
||||
return 0;
|
||||
|
|
|
@ -292,6 +292,9 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *addr,
|
|||
|
||||
pr_debug("%p\n", sk);
|
||||
|
||||
if (llcp_sock == NULL)
|
||||
return -EBADFD;
|
||||
|
||||
addr->sa_family = AF_NFC;
|
||||
*len = sizeof(struct sockaddr_nfc_llcp);
|
||||
|
||||
|
|
Loading…
Reference in New Issue