mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: testmode: remove undefined behaviour in mt76_testmode_alloc_skb
Get rid of an undefined behaviour in mt76_testmode_alloc_skb routine
allocating skb frames
Fixes: 2601dda8faa76 ("mt76: testmode: add support to send larger packet")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
bdcc57a116
commit
a976345260
+1
-5
@@ -159,12 +159,8 @@ int mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len)
|
||||
head->len += frag->len;
|
||||
head->data_len += frag->len;
|
||||
|
||||
if (*frag_tail) {
|
||||
(*frag_tail)->next = frag;
|
||||
frag_tail = &frag;
|
||||
} else {
|
||||
*frag_tail = frag;
|
||||
}
|
||||
frag_tail = &(*frag_tail)->next;
|
||||
}
|
||||
|
||||
mt76_testmode_free_skb(phy);
|
||||
|
||||
Reference in New Issue
Block a user