Skip to content

Commit

Permalink
mt76x02: fix endian issue in tx status reporting patch
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Jun 25, 2019
1 parent d86d6ef commit f476a14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mt76x02_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,

/* encode packet rate for no-skb packet id to fix up status reporting */
if (pid == MT_PACKET_ID_NO_SKB)
pid = MT_PACKET_ID_HAS_RATE | (txwi->rate & MT_RXWI_RATE_INDEX);
pid = MT_PACKET_ID_HAS_RATE |
(le16_to_cpu(txwi->rate) & MT_RXWI_RATE_INDEX);

txwi->pktid = pid;

Expand Down
3 changes: 2 additions & 1 deletion mt76x02_usb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,

/* encode packet rate for no-skb packet id to fix up status reporting */
if (pid == MT_PACKET_ID_NO_SKB)
pid = MT_PACKET_ID_HAS_RATE | (txwi->rate & MT_RXWI_RATE_INDEX);
pid = MT_PACKET_ID_HAS_RATE |
(le16_to_cpu(txwi->rate) & MT_RXWI_RATE_INDEX);

txwi->pktid = pid;

Expand Down

0 comments on commit f476a14

Please sign in to comment.