Skip to content

Commit

Permalink
mt76x02: fix hdr pointer in write txwi for USB
Browse files Browse the repository at this point in the history
Since we add txwi at the begining of skb->data, it no longer point
to ieee80211_hdr. This breaks settings TS bit for probe response and
beacons.

Acked-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Stanislaw Gruszka authored and nbd168 committed Mar 4, 2019
1 parent 0b927b2 commit e72376d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mt76x02_usb_core.c
Expand Up @@ -85,8 +85,9 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,

mt76x02_insert_hdr_pad(skb);

txwi = skb_push(skb, sizeof(struct mt76x02_txwi));
txwi = (struct mt76x02_txwi *)(skb->data - sizeof(struct mt76x02_txwi));
mt76x02_mac_write_txwi(dev, txwi, skb, wcid, sta, len);
skb_push(skb, sizeof(struct mt76x02_txwi));

pid = mt76_tx_status_skb_add(mdev, wcid, skb);
txwi->pktid = pid;
Expand Down

0 comments on commit e72376d

Please sign in to comment.