Skip to content

Commit 6d90e8f

Browse files
committed
isdn: hisax: Use l2headersize() instead of dup (and buggy) func.
There was a bug in my commit c978e7b ("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 <miltonm@bga.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d11327a commit 6d90e8f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/isdn/hisax/isdnl2.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,13 +1243,6 @@ l2_st7_tout_203(struct FsmInst *fi, int event, void *arg)
12431243
st->l2.rc = 0;
12441244
}
12451245

1246-
static int l2_hdr_space_needed(struct Layer2 *l2)
1247-
{
1248-
int len = test_bit(FLG_LAPD, &l2->flag) ? 2 : 1;
1249-
1250-
return len + (test_bit(FLG_LAPD, &l2->flag) ? 2 : 1);
1251-
}
1252-
12531246
static void
12541247
l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
12551248
{
@@ -1268,7 +1261,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
12681261
if (!skb)
12691262
return;
12701263

1271-
hdr_space_needed = l2_hdr_space_needed(l2);
1264+
hdr_space_needed = l2headersize(l2, 0);
12721265
if (hdr_space_needed > skb_headroom(skb)) {
12731266
struct sk_buff *orig_skb = skb;
12741267

0 commit comments

Comments
 (0)