[PATCH v3 3/3] wcn36xx: use !! when assigning int as a boolean
Eugene Krasnikov
k.eugene.e at gmail.com
Thu Mar 6 06:12:16 EST 2014
Looks good to me, thanx! Will u send a pull request in github?
2014-03-05 18:02 GMT+00:00 Bob Copeland <me at bobcopeland.com>:
> 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 <bob at cozybit.com>
> ---
> txrx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/txrx.c b/txrx.c
> index fed2379..ce87313 100644
> --- a/txrx.c
> +++ b/txrx.c
> @@ -236,7 +236,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);
> --
> 1.7.10.4
>
>
> _______________________________________________
> wcn36xx mailing list
> wcn36xx at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/wcn36xx
--
Best regards,
Eugene
More information about the wcn36xx
mailing list