diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-02-25 19:10:02 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-02-25 19:10:02 +0000 |
commit | 9e42acddf0f25ca9c17bf370bb008be0799fc44f (patch) | |
tree | a8b8b40eb01eee47fe29583af71edd2ebe73ceac /drivers/dahdi/dahdi_dynamic_eth.c | |
parent | feef9550b093994d23a6e3eecd96db1708be408d (diff) |
dahdi_dynamic: Add TDMoE Multi-Frame support.
Add TDMoE Multi-Frame support as described in the article at the following URL:
http://www.thrallingpenguin.com/articles/tdmoe-mf.htm
TDMoE-MF is known to be implemented in hardware solutions from Redfone
Communications.
This patch additionally implements RCU within dahdi_dynamic to decrease lock
contention, latency, and context switching. Because of the use of RCU locking,
all prior known issues with loading and unloading of the modules are resolved,
providing the spans are shutdown with "dahdi_cfg -s".
It also contains an attempt, which works, at fixing a kernel change with
skb_linearize(). The use of kernel version number does not work with SuSE SLES
10, as it appears they have backported the 2.6.18 change in to their 2.6.16
version.
This merges in the work Jbenden did at:
http://svn.digium.com/svn/dahdi/team/jbenden/tdmoe-mf@8102
(issue #13483)
Patch by: JBenden
Reported by: JBenden
Tested by: JBenden
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8103 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi_dynamic_eth.c')
-rw-r--r-- | drivers/dahdi/dahdi_dynamic_eth.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dahdi/dahdi_dynamic_eth.c b/drivers/dahdi/dahdi_dynamic_eth.c index ff26420..449a971 100644 --- a/drivers/dahdi/dahdi_dynamic_eth.c +++ b/drivers/dahdi/dahdi_dynamic_eth.c @@ -98,10 +98,12 @@ static int ztdeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet #endif if (span) { skb_pull(skb, sizeof(struct ztdeth_header)); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) - skb_linearize(skb); +#ifdef NEW_SKB_LINEARIZE + if (skb_is_nonlinear(skb)) + skb_linearize(skb); #else - skb_linearize(skb, GFP_KERNEL); + if (skb_is_nonlinear(skb)) + skb_linearize(skb, GFP_KERNEL); #endif dahdi_dynamic_receive(span, (unsigned char *)skb->data, skb->len); } |