Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242611
b: refs/heads/master
c: 9011cd2
h: refs/heads/master
i:
  242609: 92369d0
  242607: fc788a4
v: v3
  • Loading branch information
Tõnu Samuel authored and John W. Linville committed Mar 21, 2011
1 parent ab8d0af commit d679643
Show file tree
Hide file tree
Showing 25 changed files with 72 additions and 192 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 04024b937a6e9b7d4320b5853557cea3930d528c
refs/heads/master: 9011cd250e26d9159943895adf29453af1b93298
6 changes: 3 additions & 3 deletions trunk/drivers/net/can/c_can/c_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,16 +633,16 @@ static void c_can_start(struct net_device *dev)
{
struct c_can_priv *priv = netdev_priv(dev);

/* enable status change, error and module interrupts */
c_can_enable_all_interrupts(priv, ENABLE_ALL_INTERRUPTS);

/* basic c_can configuration */
c_can_chip_config(dev);

priv->can.state = CAN_STATE_ERROR_ACTIVE;

/* reset tx helper pointers */
priv->tx_next = priv->tx_echo = 0;

/* enable status change, error and module interrupts */
c_can_enable_all_interrupts(priv, ENABLE_ALL_INTERRUPTS);
}

static void c_can_stop(struct net_device *dev)
Expand Down
18 changes: 6 additions & 12 deletions trunk/drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ struct macvlan_port {
struct list_head vlans;
struct rcu_head rcu;
bool passthru;
int count;
};

static void macvlan_port_destroy(struct net_device *dev);

#define macvlan_port_get_rcu(dev) \
((struct macvlan_port *) rcu_dereference(dev->rx_handler_data))
#define macvlan_port_get(dev) ((struct macvlan_port *) dev->rx_handler_data)
Expand Down Expand Up @@ -460,13 +457,8 @@ static int macvlan_init(struct net_device *dev)
static void macvlan_uninit(struct net_device *dev)
{
struct macvlan_dev *vlan = netdev_priv(dev);
struct macvlan_port *port = vlan->port;

free_percpu(vlan->pcpu_stats);

port->count -= 1;
if (!port->count)
macvlan_port_destroy(port->dev);
}

static struct rtnl_link_stats64 *macvlan_dev_get_stats64(struct net_device *dev,
Expand Down Expand Up @@ -699,13 +691,12 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
vlan->mode = nla_get_u32(data[IFLA_MACVLAN_MODE]);

if (vlan->mode == MACVLAN_MODE_PASSTHRU) {
if (port->count)
if (!list_empty(&port->vlans))
return -EINVAL;
port->passthru = true;
memcpy(dev->dev_addr, lowerdev->dev_addr, ETH_ALEN);
}

port->count += 1;
err = register_netdevice(dev);
if (err < 0)
goto destroy_port;
Expand All @@ -716,8 +707,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
return 0;

destroy_port:
port->count -= 1;
if (!port->count)
if (list_empty(&port->vlans))
macvlan_port_destroy(lowerdev);

return err;
Expand All @@ -735,9 +725,13 @@ static int macvlan_newlink(struct net *src_net, struct net_device *dev,
void macvlan_dellink(struct net_device *dev, struct list_head *head)
{
struct macvlan_dev *vlan = netdev_priv(dev);
struct macvlan_port *port = vlan->port;

list_del(&vlan->list);
unregister_netdevice_queue(dev, head);

if (list_empty(&port->vlans))
macvlan_port_destroy(port->dev);
}
EXPORT_SYMBOL_GPL(macvlan_dellink);

Expand Down
17 changes: 7 additions & 10 deletions trunk/drivers/net/usb/smsc95xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@

struct smsc95xx_priv {
u32 mac_cr;
u32 hash_hi;
u32 hash_lo;
spinlock_t mac_cr_lock;
bool use_tx_csum;
bool use_rx_csum;
Expand Down Expand Up @@ -372,11 +370,10 @@ static void smsc95xx_set_multicast(struct net_device *netdev)
{
struct usbnet *dev = netdev_priv(netdev);
struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
u32 hash_hi = 0;
u32 hash_lo = 0;
unsigned long flags;

pdata->hash_hi = 0;
pdata->hash_lo = 0;

spin_lock_irqsave(&pdata->mac_cr_lock, flags);

if (dev->net->flags & IFF_PROMISC) {
Expand All @@ -397,13 +394,13 @@ static void smsc95xx_set_multicast(struct net_device *netdev)
u32 bitnum = smsc95xx_hash(ha->addr);
u32 mask = 0x01 << (bitnum & 0x1F);
if (bitnum & 0x20)
pdata->hash_hi |= mask;
hash_hi |= mask;
else
pdata->hash_lo |= mask;
hash_lo |= mask;
}

netif_dbg(dev, drv, dev->net, "HASHH=0x%08X, HASHL=0x%08X\n",
pdata->hash_hi, pdata->hash_lo);
hash_hi, hash_lo);
} else {
netif_dbg(dev, drv, dev->net, "receive own packets only\n");
pdata->mac_cr &=
Expand All @@ -413,8 +410,8 @@ static void smsc95xx_set_multicast(struct net_device *netdev)
spin_unlock_irqrestore(&pdata->mac_cr_lock, flags);

/* Initiate async writes, as we can't wait for completion here */
smsc95xx_write_reg_async(dev, HASHH, &pdata->hash_hi);
smsc95xx_write_reg_async(dev, HASHL, &pdata->hash_lo);
smsc95xx_write_reg_async(dev, HASHH, &hash_hi);
smsc95xx_write_reg_async(dev, HASHL, &hash_lo);
smsc95xx_write_reg_async(dev, MAC_CR, &pdata->mac_cr);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb->ip_summed == CHECKSUM_NONE)
skb->ip_summed = rcv_priv->ip_summed;

length = skb->len;
length = skb->len + ETH_HLEN;
if (dev_forward_skb(rcv, skb) != NET_RX_SUCCESS)
goto rx_drop;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/zd1211rw/zd_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ static struct usb_device_id usb_ids[] = {
{ USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x157e, 0x3204), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x157e, 0x3207), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x1740, 0x2000), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
/* ZD1211B */
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,6 @@ enum ethtool_sfeatures_retval_bits {

#include <linux/rculist.h>

/* needed by dev_disable_lro() */
extern int __ethtool_set_flags(struct net_device *dev, u32 flags);

struct ethtool_rx_ntuple_flow_spec_container {
struct ethtool_rx_ntuple_flow_spec fs;
struct list_head list;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/net/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,8 @@ struct netns_ipvs {
struct list_head rs_table[IP_VS_RTAB_SIZE];
/* ip_vs_app */
struct list_head app_list;
struct mutex app_mutex;
struct lock_class_key app_key; /* mutex debuging */

/* ip_vs_proto */
#define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */
Expand Down
1 change: 0 additions & 1 deletion trunk/include/net/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb);

struct in_ifaddr;
extern void fib_add_ifaddr(struct in_ifaddr *);
extern void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *);

static inline void ip_rt_put(struct rtable * rt)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/net/snmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct linux_xfrm_mib {
#define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \
do { \
__typeof__(*mib[0]) *ptr = \
__this_cpu_ptr((mib)[0]); \
__this_cpu_ptr((mib)[!in_softirq()]); \
ptr->mibs[basefield##PKTS]++; \
ptr->mibs[basefield##OCTETS] += addend;\
} while (0)
Expand Down Expand Up @@ -202,7 +202,7 @@ struct linux_xfrm_mib {
#define SNMP_UPD_PO_STATS64_BH(mib, basefield, addend) \
do { \
__typeof__(*mib[0]) *ptr; \
ptr = __this_cpu_ptr((mib)[0]); \
ptr = __this_cpu_ptr((mib)[!in_softirq()]); \
u64_stats_update_begin(&ptr->syncp); \
ptr->mibs[basefield##PKTS]++; \
ptr->mibs[basefield##OCTETS] += addend; \
Expand Down
1 change: 0 additions & 1 deletion trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,6 @@ extern void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si);
extern u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq);
extern int xfrm_init_replay(struct xfrm_state *x);
extern int xfrm_state_mtu(struct xfrm_state *x, int mtu);
extern int __xfrm_init_state(struct xfrm_state *x, bool init_replay);
extern int xfrm_init_state(struct xfrm_state *x);
extern int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb);
extern int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi,
Expand Down
3 changes: 0 additions & 3 deletions trunk/net/appletalk/ddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,16 +1051,13 @@ static int atalk_release(struct socket *sock)
{
struct sock *sk = sock->sk;

sock_hold(sk);
lock_sock(sk);
if (sk) {
sock_orphan(sk);
sock->sk = NULL;
atalk_destroy_socket(sk);
}
release_sock(sk);
sock_put(sk);

return 0;
}

Expand Down
19 changes: 8 additions & 11 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1353,17 +1353,14 @@ EXPORT_SYMBOL(dev_close);
*/
void dev_disable_lro(struct net_device *dev)
{
u32 flags;

if (dev->ethtool_ops && dev->ethtool_ops->get_flags)
flags = dev->ethtool_ops->get_flags(dev);
else
flags = ethtool_op_get_flags(dev);

if (!(flags & ETH_FLAG_LRO))
return;

__ethtool_set_flags(dev, flags & ~ETH_FLAG_LRO);
if (dev->ethtool_ops && dev->ethtool_ops->get_flags &&
dev->ethtool_ops->set_flags) {
u32 flags = dev->ethtool_ops->get_flags(dev);
if (flags & ETH_FLAG_LRO) {
flags &= ~ETH_FLAG_LRO;
dev->ethtool_ops->set_flags(dev, flags);
}
}
WARN_ON(dev->features & NETIF_F_LRO);
}
EXPORT_SYMBOL(dev_disable_lro);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/core/drop_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static int __init init_net_drop_monitor(void)
struct per_cpu_dm_data *data;
int cpu, rc;

printk(KERN_INFO "Initializing network drop monitor service\n");
printk(KERN_INFO "Initalizing network drop monitor service\n");

if (sizeof(void *) > 8) {
printk(KERN_ERR "Unable to store program counters on this arch, Drop monitor failed\n");
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static int ethtool_set_one_feature(struct net_device *dev,
}
}

int __ethtool_set_flags(struct net_device *dev, u32 data)
static int __ethtool_set_flags(struct net_device *dev, u32 data)
{
u32 changed;

Expand Down
14 changes: 1 addition & 13 deletions trunk/net/ipv4/devinet.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,17 +345,6 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
}
}

/* On promotion all secondaries from subnet are changing
* the primary IP, we must remove all their routes silently
* and later to add them back with new prefsrc. Do this
* while all addresses are on the device list.
*/
for (ifa = promote; ifa; ifa = ifa->ifa_next) {
if (ifa1->ifa_mask == ifa->ifa_mask &&
inet_ifa_match(ifa1->ifa_address, ifa))
fib_del_ifaddr(ifa, ifa1);
}

/* 2. Unlink it */

*ifap = ifa1->ifa_next;
Expand All @@ -375,7 +364,6 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
blocking_notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa1);

if (promote) {
struct in_ifaddr *next_sec = promote->ifa_next;

if (prev_prom) {
prev_prom->ifa_next = promote->ifa_next;
Expand All @@ -387,7 +375,7 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
rtmsg_ifa(RTM_NEWADDR, promote, nlh, pid);
blocking_notifier_call_chain(&inetaddr_chain,
NETDEV_UP, promote);
for (ifa = next_sec; ifa; ifa = ifa->ifa_next) {
for (ifa = promote->ifa_next; ifa; ifa = ifa->ifa_next) {
if (ifa1->ifa_mask != ifa->ifa_mask ||
!inet_ifa_match(ifa1->ifa_address, ifa))
continue;
Expand Down
Loading

0 comments on commit d679643

Please sign in to comment.