From f786a6d4af92204351a31117c8eeae1a4518b7c6 Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Fri, 9 Jan 2015 14:15:46 -0500 Subject: [PATCH] wcn36xx: use !! when assigning int as a boolean 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 Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/wcn36xx/txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c index 32bb26a0db2a..f7018730be0d 100644 --- a/drivers/net/wireless/ath/wcn36xx/txrx.c +++ b/drivers/net/wireless/ath/wcn36xx/txrx.c @@ -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); -- 2.20.1