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
  • Loading branch information
Linus Torvalds committed Jan 10, 2006
2 parents c544bdb + 8a4c8a9 commit 58dc125
Show file tree
Hide file tree
Showing 50 changed files with 190 additions and 425 deletions.
12 changes: 7 additions & 5 deletions drivers/atm/zatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,13 @@ printk("NONONONOO!!!!\n");
u32 *put;
int i;

dsc = (u32 *) kmalloc(uPD98401_TXPD_SIZE*2+
uPD98401_TXBD_SIZE*ATM_SKB(skb)->iovcnt,GFP_ATOMIC);
dsc = kmalloc(uPD98401_TXPD_SIZE * 2 +
uPD98401_TXBD_SIZE * ATM_SKB(skb)->iovcnt, GFP_ATOMIC);
if (!dsc) {
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb_irq(skb);
if (vcc->pop)
vcc->pop(vcc, skb);
else
dev_kfree_skb_irq(skb);
return -EAGAIN;
}
/* @@@ should check alignment */
Expand All @@ -683,7 +685,7 @@ printk("NONONONOO!!!!\n");
(ATM_SKB(skb)->atm_options & ATM_ATMOPT_CLP ?
uPD98401_CLPM_1 : uPD98401_CLPM_0));
dsc[1] = 0;
dsc[2] = ATM_SKB(skb)->iovcnt*uPD98401_TXBD_SIZE;
dsc[2] = ATM_SKB(skb)->iovcnt * uPD98401_TXBD_SIZE;
dsc[3] = virt_to_bus(put);
for (i = 0; i < ATM_SKB(skb)->iovcnt; i++) {
*put++ = ((struct iovec *) skb->data)[i].iov_len;
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/irda/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

menu "Infrared-port device drivers"
depends on IRDA!=n

Expand Down Expand Up @@ -156,7 +155,7 @@ comment "Old Serial dongle support"

config DONGLE_OLD
bool "Old Serial dongle support"
depends on (IRTTY_OLD || IRPORT_SIR) && BROKEN_ON_SMP
depends on IRPORT_SIR && BROKEN_ON_SMP
help
Say Y here if you have an infrared device that connects to your
computer's serial port. These devices are called dongles. Then say Y
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/irda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ obj-$(CONFIG_ACT200L_DONGLE) += act200l-sir.o
obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o

# The SIR helper module
sir-dev-objs := sir_core.o sir_dev.o sir_dongle.o sir_kthread.o
sir-dev-objs := sir_dev.o sir_dongle.o sir_kthread.o
2 changes: 0 additions & 2 deletions drivers/net/irda/sir-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ extern int sirdev_put_dongle(struct sir_dev *self);

extern void sirdev_enable_rx(struct sir_dev *dev);
extern int sirdev_schedule_request(struct sir_dev *dev, int state, unsigned param);
extern int __init irda_thread_create(void);
extern void __exit irda_thread_join(void);

/* inline helpers */

Expand Down
56 changes: 0 additions & 56 deletions drivers/net/irda/sir_core.c

This file was deleted.

10 changes: 9 additions & 1 deletion drivers/net/irda/sir_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ int sirdev_set_dongle(struct sir_dev *dev, IRDA_DONGLE type)
up(&dev->fsm.sem);
return err;
}
EXPORT_SYMBOL(sirdev_set_dongle);

/* used by dongle drivers for dongle programming */

Expand Down Expand Up @@ -94,6 +95,7 @@ int sirdev_raw_write(struct sir_dev *dev, const char *buf, int len)
spin_unlock_irqrestore(&dev->tx_lock, flags);
return ret;
}
EXPORT_SYMBOL(sirdev_raw_write);

/* seems some dongle drivers may need this */

Expand All @@ -116,6 +118,7 @@ int sirdev_raw_read(struct sir_dev *dev, char *buf, int len)

return count;
}
EXPORT_SYMBOL(sirdev_raw_read);

int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
{
Expand All @@ -124,7 +127,8 @@ int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
ret = dev->drv->set_dtr_rts(dev, dtr, rts);
return ret;
}

EXPORT_SYMBOL(sirdev_set_dtr_rts);

/**********************************************************************/

/* called from client driver - likely with bh-context - to indicate
Expand Down Expand Up @@ -227,6 +231,7 @@ void sirdev_write_complete(struct sir_dev *dev)
done:
spin_unlock_irqrestore(&dev->tx_lock, flags);
}
EXPORT_SYMBOL(sirdev_write_complete);

/* called from client driver - likely with bh-context - to give us
* some more received bytes. We put them into the rx-buffer,
Expand Down Expand Up @@ -279,6 +284,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count)

return 0;
}
EXPORT_SYMBOL(sirdev_receive);

/**********************************************************************/

Expand Down Expand Up @@ -641,6 +647,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
out:
return NULL;
}
EXPORT_SYMBOL(sirdev_get_instance);

int sirdev_put_instance(struct sir_dev *dev)
{
Expand Down Expand Up @@ -673,4 +680,5 @@ int sirdev_put_instance(struct sir_dev *dev)

return 0;
}
EXPORT_SYMBOL(sirdev_put_instance);

2 changes: 2 additions & 0 deletions drivers/net/irda/sir_dongle.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ int irda_register_dongle(struct dongle_driver *new)
up(&dongle_list_lock);
return 0;
}
EXPORT_SYMBOL(irda_register_dongle);

int irda_unregister_dongle(struct dongle_driver *drv)
{
Expand All @@ -58,6 +59,7 @@ int irda_unregister_dongle(struct dongle_driver *drv)
up(&dongle_list_lock);
return 0;
}
EXPORT_SYMBOL(irda_unregister_dongle);

int sirdev_get_dongle(struct sir_dev *dev, IRDA_DONGLE type)
{
Expand Down
11 changes: 9 additions & 2 deletions drivers/net/irda/sir_kthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
return 0;
}

int __init irda_thread_create(void)
static int __init irda_thread_create(void)
{
struct completion startup;
int pid;
Expand All @@ -488,7 +488,7 @@ int __init irda_thread_create(void)
return 0;
}

void __exit irda_thread_join(void)
static void __exit irda_thread_join(void)
{
if (irda_rq_queue.thread) {
flush_irda_queue();
Expand All @@ -499,3 +499,10 @@ void __exit irda_thread_join(void)
}
}

module_init(irda_thread_create);
module_exit(irda_thread_join);

MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>");
MODULE_DESCRIPTION("IrDA SIR core");
MODULE_LICENSE("GPL");

7 changes: 0 additions & 7 deletions include/linux/netfilter_ipv4/ip_nat_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ struct ip_nat_protocol
enum ip_nat_manip_type maniptype,
const struct ip_conntrack *conntrack);

unsigned int (*print)(char *buffer,
const struct ip_conntrack_tuple *match,
const struct ip_conntrack_tuple *mask);

unsigned int (*print_range)(char *buffer,
const struct ip_nat_range *range);

int (*range_to_nfattr)(struct sk_buff *skb,
const struct ip_nat_range *range);

Expand Down
5 changes: 5 additions & 0 deletions include/linux/netfilter_ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ enum nf_ip6_hook_priorities {
NF_IP6_PRI_LAST = INT_MAX,
};

#ifdef CONFIG_NETFILTER
extern int ipv6_netfilter_init(void);
extern void ipv6_netfilter_fini(void);
#else /* CONFIG_NETFILTER */
static inline int ipv6_netfilter_init(void) { return 0; }
static inline void ipv6_netfilter_fini(void) { return; }
#endif /* CONFIG_NETFILTER */

#endif /*__LINUX_IP6_NETFILTER_H*/
4 changes: 2 additions & 2 deletions include/net/inet_connection_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ struct inet_connection_sock {
struct timer_list icsk_delack_timer;
__u32 icsk_rto;
__u32 icsk_pmtu_cookie;
struct tcp_congestion_ops *icsk_ca_ops;
struct inet_connection_sock_af_ops *icsk_af_ops;
const struct tcp_congestion_ops *icsk_ca_ops;
const struct inet_connection_sock_af_ops *icsk_af_ops;
unsigned int (*icsk_sync_mss)(struct sock *sk, u32 pmtu);
__u8 icsk_ca_state;
__u8 icsk_retransmits;
Expand Down
2 changes: 1 addition & 1 deletion net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
* This allows the VLAN to have a different MAC than the underlying
* device, and still route correctly.
*/
if (memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN) == 0) {
if (!compare_ether_addr(eth_hdr(skb)->h_dest, skb->dev->dev_addr)) {
/* It is for our (changed) MAC-address! */
skb->pkt_type = PACKET_HOST;
}
Expand Down
4 changes: 2 additions & 2 deletions net/atm/br2684.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ static inline __be16 br_type_trans(struct sk_buff *skb, struct net_device *dev)
eth = eth_hdr(skb);

if (is_multicast_ether_addr(eth->h_dest)) {
if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0)
if (!compare_ether_addr(eth->h_dest, dev->broadcast))
skb->pkt_type = PACKET_BROADCAST;
else
skb->pkt_type = PACKET_MULTICAST;
}

else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN))
else if (compare_ether_addr(eth->h_dest, dev->dev_addr))
skb->pkt_type = PACKET_OTHERHOST;

if (ntohs(eth->h_proto) >= 1536)
Expand Down
6 changes: 3 additions & 3 deletions net/atm/lec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ static int lane2_associate_req (struct net_device *dev, u8 *lan_dst,
struct sk_buff *skb;
struct lec_priv *priv = (struct lec_priv*)dev->priv;

if ( memcmp(lan_dst, dev->dev_addr, ETH_ALEN) != 0 )
if (compare_ether_addr(lan_dst, dev->dev_addr))
return (0); /* not our mac address */

kfree(priv->tlvs); /* NULL if there was no previous association */
Expand Down Expand Up @@ -1798,7 +1798,7 @@ lec_arp_find(struct lec_priv *priv,

to_return = priv->lec_arp_tables[place];
while(to_return) {
if (memcmp(mac_addr, to_return->mac_addr, ETH_ALEN) == 0) {
if (!compare_ether_addr(mac_addr, to_return->mac_addr)) {
return to_return;
}
to_return = to_return->next;
Expand Down Expand Up @@ -2002,7 +2002,7 @@ lec_arp_resolve(struct lec_priv *priv, unsigned char *mac_to_find,
return priv->mcast_vcc;
break;
case 2: /* LANE2 wants arp for multicast addresses */
if ( memcmp(mac_to_find, bus_mac, ETH_ALEN) == 0)
if (!compare_ether_addr(mac_to_find, bus_mac))
return priv->mcast_vcc;
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion net/atm/mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ static int mpc_send_packet(struct sk_buff *skb, struct net_device *dev)
goto non_ip; /* Multi-Protocol Over ATM :-) */

while (i < mpc->number_of_mps_macs) {
if (memcmp(eth->h_dest, (mpc->mps_macs + i*ETH_ALEN), ETH_ALEN) == 0)
if (!compare_ether_addr(eth->h_dest, (mpc->mps_macs + i*ETH_ALEN)))
if ( send_via_shortcut(skb, mpc) == 0 ) /* try shortcut */
return 0; /* success! */
i++;
Expand Down
6 changes: 3 additions & 3 deletions net/bluetooth/bnep/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static struct bnep_session *__bnep_get_session(u8 *dst)

list_for_each(p, &bnep_session_list) {
s = list_entry(p, struct bnep_session, list);
if (!memcmp(dst, s->eh.h_source, ETH_ALEN))
if (!compare_ether_addr(dst, s->eh.h_source))
return s;
}
return NULL;
Expand Down Expand Up @@ -420,10 +420,10 @@ static inline int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb)
iv[il++] = (struct kvec) { &type, 1 };
len++;

if (!memcmp(eh->h_dest, s->eh.h_source, ETH_ALEN))
if (!compare_ether_addr(eh->h_dest, s->eh.h_source))
type |= 0x01;

if (!memcmp(eh->h_source, s->eh.h_dest, ETH_ALEN))
if (!compare_ether_addr(eh->h_source, s->eh.h_dest))
type |= 0x02;

if (type)
Expand Down
2 changes: 1 addition & 1 deletion net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ int hci_get_conn_list(void __user *arg)

size = sizeof(req) + req.conn_num * sizeof(*ci);

if (!(cl = (void *) kmalloc(size, GFP_KERNEL)))
if (!(cl = kmalloc(size, GFP_KERNEL)))
return -ENOMEM;

if (!(hdev = hci_dev_get(req.dev_id))) {
Expand Down
3 changes: 3 additions & 0 deletions net/bridge/netfilter/ebt_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_bridge/ebt_ip.h>
#include <linux/ip.h>
#include <net/ip.h>
#include <linux/in.h>
#include <linux/module.h>

Expand Down Expand Up @@ -51,6 +52,8 @@ static int ebt_filter_ip(const struct sk_buff *skb, const struct net_device *in,
if (!(info->bitmask & EBT_IP_DPORT) &&
!(info->bitmask & EBT_IP_SPORT))
return EBT_MATCH;
if (ntohs(ih->frag_off) & IP_OFFSET)
return EBT_NOMATCH;
pptr = skb_header_pointer(skb, ih->ihl*4,
sizeof(_ports), &_ports);
if (pptr == NULL)
Expand Down
4 changes: 2 additions & 2 deletions net/bridge/netfilter/ebt_stp.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ static int ebt_stp_check(const char *tablename, unsigned int hookmask,
if (datalen != len)
return -EINVAL;
/* Make sure the match only receives stp frames */
if (memcmp(e->destmac, bridge_ula, ETH_ALEN) ||
memcmp(e->destmsk, msk, ETH_ALEN) || !(e->bitmask & EBT_DESTMAC))
if (compare_ether_addr(e->destmac, bridge_ula) ||
compare_ether_addr(e->destmsk, msk) || !(e->bitmask & EBT_DESTMAC))
return -EINVAL;

return 0;
Expand Down
2 changes: 1 addition & 1 deletion net/core/dv.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void divert_frame(struct sk_buff *skb)
unsigned char *skb_data_end = skb->data + skb->len;

/* Packet is already aimed at us, return */
if (!memcmp(eth, skb->dev->dev_addr, ETH_ALEN))
if (!compare_ether_addr(eth, skb->dev->dev_addr))
return;

/* proto is not IP, do nothing */
Expand Down
2 changes: 1 addition & 1 deletion net/core/wireless.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ void wireless_spy_update(struct net_device * dev,

/* Update all records that match */
for(i = 0; i < spydata->spy_number; i++)
if(!memcmp(address, spydata->spy_address[i], ETH_ALEN)) {
if(!compare_ether_addr(address, spydata->spy_address[i])) {
memcpy(&(spydata->spy_stat[i]), wstats,
sizeof(struct iw_quality));
match = i;
Expand Down
Loading

0 comments on commit 58dc125

Please sign in to comment.