Skip to contentSkip to conversation

ath9k htc bug?

DISCUSSION Johannes Berg 2 participants 2 messages Feb 15, 2011

lore
Share & tools
lore
#0 lore raw

This code in ath9k_ht_tx looks buggy:

        if (padsize && skb->len > padpos) {
                if (skb_headroom(skb) < padsize)
                        return -1;
                skb_push(skb, padsize);
                memmove(skb->data, skb->data + padsize, padpos);
        }

-1 isn't a valid netdev tx status code -- I think this should just be "goto fail_tx;" instead?

johannes

#1 lore raw
Quoted 11 lines · Johannes Berg

This code in ath9k_ht_tx looks buggy:

        if (padsize && skb->len > padpos) {
                if (skb_headroom(skb) < padsize)
                        return -1;
                skb_push(skb, padsize);
                memmove(skb->data, skb->data + padsize, padpos);
        }

-1 isn't a valid netdev tx status code -- I think this should just be "goto fail_tx;" instead?

Yep, I have a fix lined up in my pending queue doing exactly that. :)

Sujith