Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NETLABEL]: Fix build failure.
  [IPV6]: Give sit driver an appropriate module alias.
  [IPV6]: Add ndisc_netdev_notifier unregister.
  [NET]: __alloc_pages() failures reported due to fragmentation
  [PKTGEN]: TCI endianness fixes
  [TG3]: Fix 2nd ifup failure on 5752M.
  [NETFILTER] bug: skb->protocol is already net-endian
  [NETFILTER] bug: nfulnl_msg_config_mode ->copy_range is 32bit
  [NETFILTER] bug: NFULA_CFG_QTHRESH uses 32bit
  [IPV6]: Fix ECN bug on big-endian
  [IPX]: Annotate and fix IPX checksum
  [IPX]: Trivial parts of endianness annotations
  • Loading branch information
Linus Torvalds committed Nov 6, 2006
2 parents 59359ff + 38c9437 commit d1ed6a3
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 98 deletions.
8 changes: 4 additions & 4 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@

#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.67"
#define DRV_MODULE_RELDATE "October 18, 2006"
#define DRV_MODULE_VERSION "3.68"
#define DRV_MODULE_RELDATE "November 02, 2006"

#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
Expand Down Expand Up @@ -6014,7 +6014,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
tg3_abort_hw(tp, 1);
}

if ((tp->tg3_flags2 & TG3_FLG2_MII_SERDES) && reset_phy)
if (reset_phy)
tg3_phy_reset(tp);

err = tg3_chip_reset(tp);
Expand Down Expand Up @@ -6574,7 +6574,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
}

err = tg3_setup_phy(tp, reset_phy);
err = tg3_setup_phy(tp, 0);
if (err)
return err;

Expand Down
14 changes: 7 additions & 7 deletions include/linux/ipx.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

struct sockaddr_ipx {
sa_family_t sipx_family;
__u16 sipx_port;
__u32 sipx_network;
__be16 sipx_port;
__be32 sipx_network;
unsigned char sipx_node[IPX_NODE_LEN];
__u8 sipx_type;
unsigned char sipx_zero; /* 16 byte fill */
Expand All @@ -23,13 +23,13 @@ struct sockaddr_ipx {
#define IPX_CRTITF 1

struct ipx_route_definition {
__u32 ipx_network;
__u32 ipx_router_network;
__be32 ipx_network;
__be32 ipx_router_network;
unsigned char ipx_router_node[IPX_NODE_LEN];
};

struct ipx_interface_definition {
__u32 ipx_network;
__be32 ipx_network;
unsigned char ipx_device[16];
unsigned char ipx_dlink_type;
#define IPX_FRAME_NONE 0
Expand All @@ -55,8 +55,8 @@ struct ipx_config_data {
*/

struct ipx_route_def {
__u32 ipx_network;
__u32 ipx_router_network;
__be32 ipx_network;
__be32 ipx_router_network;
#define IPX_ROUTE_NO_ROUTER 0
unsigned char ipx_router_node[IPX_NODE_LEN];
unsigned char ipx_device[16];
Expand Down
2 changes: 1 addition & 1 deletion include/net/inet_ecn.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)

#define IP6_ECN_flow_xmit(sk, label) do { \
if (INET_ECN_is_capable(inet_sk(sk)->tos)) \
(label) |= __constant_htons(INET_ECN_ECT_0 << 4); \
(label) |= htonl(INET_ECN_ECT_0 << 20); \
} while (0)

static inline int IP_ECN_set_ce(struct iphdr *iph)
Expand Down
26 changes: 13 additions & 13 deletions include/net/ipx.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include <linux/list.h>

struct ipx_address {
__u32 net;
__be32 net;
__u8 node[IPX_NODE_LEN];
__u16 sock;
__be16 sock;
};

#define ipx_broadcast_node "\377\377\377\377\377\377"
Expand All @@ -26,9 +26,9 @@ struct ipx_address {
#define IPX_MAX_PPROP_HOPS 8

struct ipxhdr {
__u16 ipx_checksum __attribute__ ((packed));
#define IPX_NO_CHECKSUM 0xFFFF
__u16 ipx_pktsize __attribute__ ((packed));
__be16 ipx_checksum __attribute__ ((packed));
#define IPX_NO_CHECKSUM __constant_htons(0xFFFF)
__be16 ipx_pktsize __attribute__ ((packed));
__u8 ipx_tctrl;
__u8 ipx_type;
#define IPX_TYPE_UNKNOWN 0x00
Expand All @@ -48,14 +48,14 @@ static __inline__ struct ipxhdr *ipx_hdr(struct sk_buff *skb)

struct ipx_interface {
/* IPX address */
__u32 if_netnum;
__be32 if_netnum;
unsigned char if_node[IPX_NODE_LEN];
atomic_t refcnt;

/* physical device info */
struct net_device *if_dev;
struct datalink_proto *if_dlink;
unsigned short if_dlink_type;
__be16 if_dlink_type;

/* socket support */
unsigned short if_sknum;
Expand All @@ -71,7 +71,7 @@ struct ipx_interface {
};

struct ipx_route {
__u32 ir_net;
__be32 ir_net;
struct ipx_interface *ir_intrfc;
unsigned char ir_routed;
unsigned char ir_router_node[IPX_NODE_LEN];
Expand All @@ -82,10 +82,10 @@ struct ipx_route {
#ifdef __KERNEL__
struct ipx_cb {
u8 ipx_tctrl;
u32 ipx_dest_net;
u32 ipx_source_net;
__be32 ipx_dest_net;
__be32 ipx_source_net;
struct {
u32 netnum;
__be32 netnum;
int index;
} last_hop;
};
Expand All @@ -97,7 +97,7 @@ struct ipx_sock {
struct sock sk;
struct ipx_address dest_addr;
struct ipx_interface *intrfc;
unsigned short port;
__be16 port;
#ifdef CONFIG_IPX_INTERN
unsigned char node[IPX_NODE_LEN];
#endif
Expand Down Expand Up @@ -132,7 +132,7 @@ extern struct ipx_interface *ipx_primary_net;
extern int ipx_proc_init(void);
extern void ipx_proc_exit(void);

extern const char *ipx_frame_name(unsigned short);
extern const char *ipx_frame_name(__be16);
extern const char *ipx_device_name(struct ipx_interface *intrfc);

static __inline__ void ipxitf_hold(struct ipx_interface *intrfc)
Expand Down
3 changes: 1 addition & 2 deletions net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ config INET
if INET
source "net/ipv4/Kconfig"
source "net/ipv6/Kconfig"
source "net/netlabel/Kconfig"

endif # if INET

Expand Down Expand Up @@ -249,8 +250,6 @@ source "net/ieee80211/Kconfig"
config WIRELESS_EXT
bool

source "net/netlabel/Kconfig"

config FIB_RULES
bool

Expand Down
30 changes: 18 additions & 12 deletions net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2304,6 +2304,12 @@ static void mpls_push(__be32 *mpls, struct pktgen_dev *pkt_dev)
*mpls |= MPLS_STACK_BOTTOM;
}

static inline __be16 build_tci(unsigned int id, unsigned int cfi,
unsigned int prio)
{
return htons(id | (cfi << 12) | (prio << 13));
}

static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
struct pktgen_dev *pkt_dev)
{
Expand Down Expand Up @@ -2353,16 +2359,16 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
if (pkt_dev->vlan_id != 0xffff) {
if(pkt_dev->svlan_id != 0xffff) {
svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16));
*svlan_tci = htons(pkt_dev->svlan_id);
*svlan_tci |= pkt_dev->svlan_p << 5;
*svlan_tci |= pkt_dev->svlan_cfi << 4;
*svlan_tci = build_tci(pkt_dev->svlan_id,
pkt_dev->svlan_cfi,
pkt_dev->svlan_p);
svlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16));
*svlan_encapsulated_proto = __constant_htons(ETH_P_8021Q);
}
vlan_tci = (__be16 *)skb_put(skb, sizeof(__be16));
*vlan_tci = htons(pkt_dev->vlan_id);
*vlan_tci |= pkt_dev->vlan_p << 5;
*vlan_tci |= pkt_dev->vlan_cfi << 4;
*vlan_tci = build_tci(pkt_dev->vlan_id,
pkt_dev->vlan_cfi,
pkt_dev->vlan_p);
vlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16));
*vlan_encapsulated_proto = __constant_htons(ETH_P_IP);
}
Expand Down Expand Up @@ -2689,16 +2695,16 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
if (pkt_dev->vlan_id != 0xffff) {
if(pkt_dev->svlan_id != 0xffff) {
svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16));
*svlan_tci = htons(pkt_dev->svlan_id);
*svlan_tci |= pkt_dev->svlan_p << 5;
*svlan_tci |= pkt_dev->svlan_cfi << 4;
*svlan_tci = build_tci(pkt_dev->svlan_id,
pkt_dev->svlan_cfi,
pkt_dev->svlan_p);
svlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16));
*svlan_encapsulated_proto = __constant_htons(ETH_P_8021Q);
}
vlan_tci = (__be16 *)skb_put(skb, sizeof(__be16));
*vlan_tci = htons(pkt_dev->vlan_id);
*vlan_tci |= pkt_dev->vlan_p << 5;
*vlan_tci |= pkt_dev->vlan_cfi << 4;
*vlan_tci = build_tci(pkt_dev->vlan_id,
pkt_dev->vlan_cfi,
pkt_dev->vlan_p);
vlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16));
*vlan_encapsulated_proto = __constant_htons(ETH_P_IPV6);
}
Expand Down
2 changes: 1 addition & 1 deletion net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ static struct sk_buff *sock_alloc_send_pskb(struct sock *sk,
goto failure;

if (atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) {
skb = alloc_skb(header_len, sk->sk_allocation);
skb = alloc_skb(header_len, gfp_mask);
if (skb) {
int npages;
int i;
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,7 @@ int __init ndisc_init(struct net_proto_family *ops)

void ndisc_cleanup(void)
{
unregister_netdevice_notifier(&ndisc_netdev_notifier);
#ifdef CONFIG_SYSCTL
neigh_sysctl_unregister(&nd_tbl.parms);
#endif
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,3 +854,4 @@ int __init sit_init(void)
module_init(sit_init);
module_exit(sit_cleanup);
MODULE_LICENSE("GPL");
MODULE_ALIAS("sit0");
Loading

0 comments on commit d1ed6a3

Please sign in to comment.