Skip to content

Commit

Permalink
mt76x2: remove warnings in mt76x2_mac_write_txwi()
Browse files Browse the repository at this point in the history
Fix following sparse warnings in mt76x2_mac_write_txwi:
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: warning:
  incorrect type in assignment (different base types)
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: expected
  restricted __le32 [usertype] iv
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: got unsigned
  int [unsigned] [usertype] <noident>
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: warning:
  incorrect type in assignment (different base types)
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: expected
  restricted __le32 [usertype] eiv
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: got unsigned
  int [unsigned] [usertype] <noident>

Fixes: 2340523 ("mt76: fix transmission of encrypted management frames")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Lorenzo Bianconi authored and Kalle Valo committed Feb 28, 2018
1 parent 882164a commit 09e93f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi,
ccmp_pn[5] = pn >> 24;
ccmp_pn[6] = pn >> 32;
ccmp_pn[7] = pn >> 40;
txwi->iv = *((u32 *) &ccmp_pn[0]);
txwi->eiv = *((u32 *) &ccmp_pn[1]);
txwi->iv = *((__le32 *)&ccmp_pn[0]);
txwi->eiv = *((__le32 *)&ccmp_pn[1]);
}

spin_lock_bh(&dev->mt76.lock);
Expand Down

0 comments on commit 09e93f2

Please sign in to comment.