Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112267
b: refs/heads/master
c: 6861ff3
h: refs/heads/master
i:
  112265: d3f39f8
  112263: ad4605a
v: v3
  • Loading branch information
David S. Miller committed Oct 10, 2008
1 parent 14c1a79 commit fbdf954
Show file tree
Hide file tree
Showing 11 changed files with 120 additions and 161 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: 1765f95d2db0a516b5816e016fdf459c4bb5affb
refs/heads/master: 6861ff35ec5b60fafaf8651754c9a75142bfa9a4
14 changes: 14 additions & 0 deletions trunk/drivers/net/enic/vnic_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
#define VNIC_PADDR_TARGET 0x0000000000000000ULL
#endif

#ifndef readq
static inline u64 readq(void __iomem *reg)
{
return (((u64)readl(reg + 0x4UL) << 32) |
(u64)readl(reg));
}

static inline void writeq(u64 val, void __iomem *reg)
{
writel(val & 0xffffffff, reg);
writel(val >> 32, reg + 0x4UL);
}
#endif

enum vnic_dev_intr_mode {
VNIC_DEV_INTR_MODE_UNKNOWN,
VNIC_DEV_INTR_MODE_INTX,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
#include "myri10ge_mcp.h"
#include "myri10ge_mcp_gen_header.h"

#define MYRI10GE_VERSION_STR "1.4.3-1.358"
#define MYRI10GE_VERSION_STR "1.4.3-1.369"

MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
MODULE_AUTHOR("Maintainer: help@myri.com");
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1863,9 +1863,10 @@ ppp_mp_insert(struct ppp *ppp, struct sk_buff *skb)

/* N.B. we don't need to lock the list lock because we have the
ppp unit receive-side lock. */
for (p = list->next; p != (struct sk_buff *)list; p = p->next)
skb_queue_walk(list, p) {
if (seq_before(seq, p->sequence))
break;
}
__skb_queue_before(list, p, skb);
}

Expand Down
39 changes: 25 additions & 14 deletions trunk/drivers/net/wireless/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -5867,7 +5867,6 @@ bool ath9k_hw_reset(struct ath_hal *ah,
bool bChannelChange,
int *status)
{
#define FAIL(_code) do { ecode = _code; goto bad; } while (0)
u32 saveLedState;
struct ath_hal_5416 *ahp = AH5416(ah);
struct ath9k_channel *curchan = ah->ah_curchan;
Expand All @@ -5889,11 +5888,14 @@ bool ath9k_hw_reset(struct ath_hal *ah,
DPRINTF(ah->ah_sc, ATH_DBG_CHANNEL,
"%s: invalid channel %u/0x%x; no mapping\n",
__func__, chan->channel, chan->channelFlags);
FAIL(-EINVAL);
ecode = -EINVAL;
goto bad;
}

if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
return false;
if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) {
ecode = -EIO;
goto bad;
}

if (curchan)
ath9k_hw_getnf(ah, curchan);
Expand Down Expand Up @@ -5930,7 +5932,8 @@ bool ath9k_hw_reset(struct ath_hal *ah,
if (!ath9k_hw_chip_reset(ah, chan)) {
DPRINTF(ah->ah_sc, ATH_DBG_RESET, "%s: chip reset failed\n",
__func__);
FAIL(-EIO);
ecode = -EINVAL;
goto bad;
}

if (AR_SREV_9280(ah)) {
Expand All @@ -5947,8 +5950,10 @@ bool ath9k_hw_reset(struct ath_hal *ah,
}

ecode = ath9k_hw_process_ini(ah, chan, macmode);
if (ecode != 0)
if (ecode != 0) {
ecode = -EINVAL;
goto bad;
}

if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan))
ath9k_hw_set_delta_slope(ah, chan);
Expand All @@ -5961,7 +5966,8 @@ bool ath9k_hw_reset(struct ath_hal *ah,
if (!ath9k_hw_eeprom_set_board_values(ah, chan)) {
DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
"%s: error setting board options\n", __func__);
FAIL(-EIO);
ecode = -EIO;
goto bad;
}

ath9k_hw_decrease_chain_power(ah, chan);
Expand Down Expand Up @@ -5989,11 +5995,15 @@ bool ath9k_hw_reset(struct ath_hal *ah,
REG_WRITE(ah, AR_RSSI_THR, INIT_RSSI_THR);

if (AR_SREV_9280_10_OR_LATER(ah)) {
if (!(ath9k_hw_ar9280_set_channel(ah, chan)))
FAIL(-EIO);
if (!(ath9k_hw_ar9280_set_channel(ah, chan))) {
ecode = -EIO;
goto bad;
}
} else {
if (!(ath9k_hw_set_channel(ah, chan)))
FAIL(-EIO);
if (!(ath9k_hw_set_channel(ah, chan))) {
ecode = -EIO;
goto bad;
}
}

for (i = 0; i < AR_NUM_DCU; i++)
Expand Down Expand Up @@ -6027,8 +6037,10 @@ bool ath9k_hw_reset(struct ath_hal *ah,

ath9k_hw_init_bb(ah, chan);

if (!ath9k_hw_init_cal(ah, chan))
FAIL(-ENODEV);
if (!ath9k_hw_init_cal(ah, chan)){
ecode = -EIO;;
goto bad;
}

rx_chainmask = ahp->ah_rxchainmask;
if ((rx_chainmask == 0x5) || (rx_chainmask == 0x3)) {
Expand Down Expand Up @@ -6064,7 +6076,6 @@ bool ath9k_hw_reset(struct ath_hal *ah,
if (status)
*status = ecode;
return false;
#undef FAIL
}

bool ath9k_hw_phy_disable(struct ath_hal *ah)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/net/netfilter/nf_conntrack_ecache.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ static inline void nf_ct_event_cache_flush(struct net *net) {}
static inline int nf_conntrack_ecache_init(struct net *net)
{
return 0;
}

static inline void nf_conntrack_ecache_fini(struct net *net)
{
Expand Down
20 changes: 10 additions & 10 deletions trunk/net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,10 +1368,10 @@ static void ipgre_netlink_parms(struct nlattr *data[],
parms->o_key = nla_get_be32(data[IFLA_GRE_OKEY]);

if (data[IFLA_GRE_LOCAL])
memcpy(&parms->iph.saddr, nla_data(data[IFLA_GRE_LOCAL]), 4);
parms->iph.saddr = nla_get_be32(data[IFLA_GRE_LOCAL]);

if (data[IFLA_GRE_REMOTE])
memcpy(&parms->iph.daddr, nla_data(data[IFLA_GRE_REMOTE]), 4);
parms->iph.daddr = nla_get_be32(data[IFLA_GRE_REMOTE]);

if (data[IFLA_GRE_TTL])
parms->iph.ttl = nla_get_u8(data[IFLA_GRE_TTL]);
Expand Down Expand Up @@ -1539,10 +1539,10 @@ static int ipgre_fill_info(struct sk_buff *skb, const struct net_device *dev)
NLA_PUT_U32(skb, IFLA_GRE_LINK, p->link);
NLA_PUT_BE16(skb, IFLA_GRE_IFLAGS, p->i_flags);
NLA_PUT_BE16(skb, IFLA_GRE_OFLAGS, p->o_flags);
NLA_PUT_BE32(skb, IFLA_GRE_IFLAGS, p->i_flags);
NLA_PUT_BE32(skb, IFLA_GRE_OFLAGS, p->o_flags);
NLA_PUT(skb, IFLA_GRE_LOCAL, 4, &p->iph.saddr);
NLA_PUT(skb, IFLA_GRE_REMOTE, 4, &p->iph.daddr);
NLA_PUT_BE32(skb, IFLA_GRE_IKEY, p->i_key);
NLA_PUT_BE32(skb, IFLA_GRE_OKEY, p->o_key);
NLA_PUT_BE32(skb, IFLA_GRE_LOCAL, p->iph.saddr);
NLA_PUT_BE32(skb, IFLA_GRE_REMOTE, p->iph.daddr);
NLA_PUT_U8(skb, IFLA_GRE_TTL, p->iph.ttl);
NLA_PUT_U8(skb, IFLA_GRE_TOS, p->iph.tos);
NLA_PUT_U8(skb, IFLA_GRE_PMTUDISC, !!(p->iph.frag_off & htons(IP_DF)));
Expand All @@ -1559,8 +1559,8 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
[IFLA_GRE_OFLAGS] = { .type = NLA_U16 },
[IFLA_GRE_IKEY] = { .type = NLA_U32 },
[IFLA_GRE_OKEY] = { .type = NLA_U32 },
[IFLA_GRE_LOCAL] = { .len = 4 },
[IFLA_GRE_REMOTE] = { .len = 4 },
[IFLA_GRE_LOCAL] = { .len = FIELD_SIZEOF(struct iphdr, saddr) },
[IFLA_GRE_REMOTE] = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
[IFLA_GRE_TTL] = { .type = NLA_U8 },
[IFLA_GRE_TOS] = { .type = NLA_U8 },
[IFLA_GRE_PMTUDISC] = { .type = NLA_U8 },
Expand Down Expand Up @@ -1643,5 +1643,5 @@ static void __exit ipgre_fini(void)
module_init(ipgre_init);
module_exit(ipgre_fini);
MODULE_LICENSE("GPL");
MODULE_ALIAS("rtnl-link-gre");
MODULE_ALIAS("rtnl-link-gretap");
MODULE_ALIAS_RTNL_LINK("gre");
MODULE_ALIAS_RTNL_LINK("gretap");
4 changes: 2 additions & 2 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
rep.th.doff = arg.iov[0].iov_len / 4;

tcp_v4_md5_hash_hdr((__u8 *) &rep.opt[1],
key, ip_hdr(skb)->daddr,
ip_hdr(skb)->saddr, &rep.th);
key, ip_hdr(skb)->saddr,
ip_hdr(skb)->daddr, &rep.th);
}
#endif
arg.csum = csum_tcpudp_nofold(ip_hdr(skb)->daddr,
Expand Down
43 changes: 19 additions & 24 deletions trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,23 @@ EXPORT_SYMBOL(sysctl_udp_wmem_min);
atomic_t udp_memory_allocated;
EXPORT_SYMBOL(udp_memory_allocated);

static inline int __udp_lib_lport_inuse(struct net *net, __u16 num,
const struct hlist_head udptable[])
static int udp_lib_lport_inuse(struct net *net, __u16 num,
const struct hlist_head udptable[],
struct sock *sk,
int (*saddr_comp)(const struct sock *sk1,
const struct sock *sk2))
{
struct sock *sk;
struct sock *sk2;
struct hlist_node *node;

sk_for_each(sk, node, &udptable[udp_hashfn(net, num)])
if (net_eq(sock_net(sk), net) && sk->sk_hash == num)
sk_for_each(sk2, node, &udptable[udp_hashfn(net, num)])
if (net_eq(sock_net(sk2), net) &&
sk2 != sk &&
sk2->sk_hash == num &&
(!sk2->sk_reuse || !sk->sk_reuse) &&
(!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if
|| sk2->sk_bound_dev_if == sk->sk_bound_dev_if) &&
(*saddr_comp)(sk, sk2))
return 1;
return 0;
}
Expand All @@ -146,9 +155,6 @@ int udp_lib_get_port(struct sock *sk, unsigned short snum,
const struct sock *sk2 ) )
{
struct hlist_head *udptable = sk->sk_prot->h.udp_hash;
struct hlist_node *node;
struct hlist_head *head;
struct sock *sk2;
int error = 1;
struct net *net = sock_net(sk);

Expand All @@ -165,32 +171,21 @@ int udp_lib_get_port(struct sock *sk, unsigned short snum,
rand = net_random();
snum = first = rand % remaining + low;
rand |= 1;
while (__udp_lib_lport_inuse(net, snum, udptable)) {
while (udp_lib_lport_inuse(net, snum, udptable, sk,
saddr_comp)) {
do {
snum = snum + rand;
} while (snum < low || snum > high);
if (snum == first)
goto fail;
}
} else {
head = &udptable[udp_hashfn(net, snum)];

sk_for_each(sk2, node, head)
if (sk2->sk_hash == snum &&
sk2 != sk &&
net_eq(sock_net(sk2), net) &&
(!sk2->sk_reuse || !sk->sk_reuse) &&
(!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if
|| sk2->sk_bound_dev_if == sk->sk_bound_dev_if) &&
(*saddr_comp)(sk, sk2) )
goto fail;
}
} else if (udp_lib_lport_inuse(net, snum, udptable, sk, saddr_comp))
goto fail;

inet_sk(sk)->num = snum;
sk->sk_hash = snum;
if (sk_unhashed(sk)) {
head = &udptable[udp_hashfn(net, snum)];
sk_add_node(sk, head);
sk_add_node(sk, &udptable[udp_hashfn(net, snum)]);
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
}
error = 0;
Expand Down
Loading

0 comments on commit fbdf954

Please sign in to comment.