]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
wcn36xx: use !! when assigning int as a boolean
authorBob Copeland <me@bobcopeland.com>
Fri, 9 Jan 2015 19:15:46 +0000 (14:15 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 23 Jan 2015 17:11:56 +0000 (19:11 +0200)
bd->tx_comp is a single bit in a bitfield, so assigning
"info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS" only happens
to work because TX_STATUS is defined to BIT(0); if it were
any other bit this assignment would fail.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wcn36xx/txrx.c

index 32bb26a0db2abf429de627c32aabac9f453b7227..f7018730be0d8baf43ce8cd0f5ccbbecddb6b8d3 100644 (file)
@@ -237,7 +237,7 @@ int wcn36xx_start_tx(struct wcn36xx *wcn,
 
        bd->dpu_rf = WCN36XX_BMU_WQ_TX;
 
-       bd->tx_comp = info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS;
+       bd->tx_comp = !!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS);
        if (bd->tx_comp) {
                wcn36xx_dbg(WCN36XX_DBG_DXE, "TX_ACK status requested\n");
                spin_lock_irqsave(&wcn->dxe_lock, flags);