projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d11327a
)
isdn: hisax: Use l2headersize() instead of dup (and buggy) func.
author
David S. Miller
<
[email protected]
>
Tue, 15 Feb 2011 20:18:09 +0000
(12:18 -0800)
committer
David S. Miller
<
[email protected]
>
Tue, 15 Feb 2011 20:18:09 +0000
(12:18 -0800)
There was a bug in my commit
c978e7bb77dfd2cd3d1f547fa4e395cfe47f02b2
("hisax: Fix unchecked alloc_skb() return.")
One of the l2->flag checks is wrong.
Even worse it turns out I'm duplicating an existing function,
so use that instead.
Reported-by: Milton Miller <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/isdn/hisax/isdnl2.c
patch
|
blob
|
history
diff --git
a/drivers/isdn/hisax/isdnl2.c
b/drivers/isdn/hisax/isdnl2.c
index 98ac835281febe53a9af4599fdd778a7e52c516b..cfff0c41d2986da7c3baf404b5e3a63b922127b1 100644
(file)
--- a/
drivers/isdn/hisax/isdnl2.c
+++ b/
drivers/isdn/hisax/isdnl2.c
@@
-1243,13
+1243,6
@@
l2_st7_tout_203(struct FsmInst *fi, int event, void *arg)
st->l2.rc = 0;
}
-static int l2_hdr_space_needed(struct Layer2 *l2)
-{
- int len = test_bit(FLG_LAPD, &l2->flag) ? 2 : 1;
-
- return len + (test_bit(FLG_LAPD, &l2->flag) ? 2 : 1);
-}
-
static void
l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
{
@@
-1268,7
+1261,7
@@
l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
if (!skb)
return;
- hdr_space_needed = l2
_hdr_space_needed(l2
);
+ hdr_space_needed = l2
headersize(l2, 0
);
if (hdr_space_needed > skb_headroom(skb)) {
struct sk_buff *orig_skb = skb;