diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-03-13 20:09:12 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-03-13 20:09:12 +0000 |
commit | 00a4ff1bd81d8f3774792539cb50712231d72bfe (patch) | |
tree | f22e2a9c145d2b8d84a5e21cce25c7e0564636ad /drivers/dahdi/dahdi_dynamic_ethmf.c | |
parent | 950b583f48e117ca3508ef973ad754e6e4b14808 (diff) |
Remove support for kernels < 2.6.18
This patch removes support for kernel versions < 2.6.18, as those are
not actively supported in any major Linux distribution (except RHEL4,
which is in the "extended" support level of the product life cycle).
This removes much of the more #ifdef-rich parts of the code.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Acked-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10472 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi_dynamic_ethmf.c')
-rw-r--r-- | drivers/dahdi/dahdi_dynamic_ethmf.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/dahdi/dahdi_dynamic_ethmf.c b/drivers/dahdi/dahdi_dynamic_ethmf.c index 53845c9..dd1214d 100644 --- a/drivers/dahdi/dahdi_dynamic_ethmf.c +++ b/drivers/dahdi/dahdi_dynamic_ethmf.c @@ -224,13 +224,8 @@ static inline int ethmf_trx_spans_ready(unsigned int addr_hash, struct ztdeth *( /** * Ethernet receiving side processing function. */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) static int ztdethmf_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) -#else -static int ztdethmf_rcv(struct sk_buff *skb, struct net_device *dev, - struct packet_type *pt) -#endif { int num_spans = 0, span_index = 0; unsigned char *data; @@ -267,13 +262,8 @@ static int ztdethmf_rcv(struct sk_buff *skb, struct net_device *dev, rcu_read_lock(); do { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9) find_ethmf(eth_hdr(skb)->h_source, htons(span_index), &z, &span); -#else - find_ethmf(skb->mac.ethernet->h_source, - htons(span_index), &z, &span); -#endif if (unlikely(!z || !span)) { /* The recv'd span does not belong to us */ /* ethmf_errors_inc(); */ @@ -396,10 +386,6 @@ static void ztdethmf_transmit(struct dahdi_dynamic *dyn, u8 *msg, size_t msglen) struct net_device *dev; unsigned char addr[ETH_ALEN]; int spans_ready = 0, index = 0; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) - static DEFINE_SPINLOCK(lock); - unsigned long flags; -#endif if (atomic_read(&shutdown)) return; @@ -411,24 +397,12 @@ static void ztdethmf_transmit(struct dahdi_dynamic *dyn, u8 *msg, size_t msglen) return; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) - if (!atomic_read(&z->ready)) { - spin_lock_irqsave(&lock, flags); - atomic_inc(&z->ready); - if (1 == atomic_read(&z->ready)) { - memcpy(z->msgbuf, msg, msglen); - z->msgbuf_len = msglen; - } - spin_unlock_irqrestore(&lock, flags); - } -#else if (!atomic_read(&z->ready)) { if (atomic_inc_return(&z->ready) == 1) { memcpy(z->msgbuf, msg, msglen); z->msgbuf_len = msglen; } } -#endif spans_ready = ethmf_trx_spans_ready(z->addr_hash, &ready_spans); if (spans_ready) { |