mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
This commit is contained in:
+7
-5
@@ -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 */
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
menu "Infrared-port device drivers"
|
||||
depends on IRDA!=n
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/*********************************************************************
|
||||
*
|
||||
* sir_core.c: module core for irda-sir abstraction layer
|
||||
*
|
||||
* Copyright (c) 2002 Martin Diehl
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <net/irda/irda.h>
|
||||
|
||||
#include "sir-dev.h"
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>");
|
||||
MODULE_DESCRIPTION("IrDA SIR core");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
EXPORT_SYMBOL(irda_register_dongle);
|
||||
EXPORT_SYMBOL(irda_unregister_dongle);
|
||||
|
||||
EXPORT_SYMBOL(sirdev_get_instance);
|
||||
EXPORT_SYMBOL(sirdev_put_instance);
|
||||
|
||||
EXPORT_SYMBOL(sirdev_set_dongle);
|
||||
EXPORT_SYMBOL(sirdev_write_complete);
|
||||
EXPORT_SYMBOL(sirdev_receive);
|
||||
|
||||
EXPORT_SYMBOL(sirdev_raw_write);
|
||||
EXPORT_SYMBOL(sirdev_raw_read);
|
||||
EXPORT_SYMBOL(sirdev_set_dtr_rts);
|
||||
|
||||
static int __init sir_core_init(void)
|
||||
{
|
||||
return irda_thread_create();
|
||||
}
|
||||
|
||||
static void __exit sir_core_exit(void)
|
||||
{
|
||||
irda_thread_join();
|
||||
}
|
||||
|
||||
module_init(sir_core_init);
|
||||
module_exit(sir_core_exit);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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
|
||||
@@ -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,
|
||||
@@ -279,6 +284,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_receive);
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
@@ -641,6 +647,7 @@ out_freenetdev:
|
||||
out:
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_get_instance);
|
||||
|
||||
int sirdev_put_instance(struct sir_dev *dev)
|
||||
{
|
||||
@@ -673,4 +680,5 @@ int sirdev_put_instance(struct sir_dev *dev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(sirdev_put_instance);
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
@@ -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();
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+3
-3
@@ -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 */
|
||||
@@ -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;
|
||||
@@ -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:
|
||||
|
||||
+1
-1
@@ -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++;
|
||||
|
||||
@@ -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;
|
||||
@@ -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)
|
||||
|
||||
@@ -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))) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -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 */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user