From: Oleksij Rempel Date: Sun, 27 Nov 2016 06:52:44 +0000 (+0100) Subject: if_ath: use datalen instead of data in ath_stop_tx_dma_tgt X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=e9f0b338a161efc530b9a09427f098c1e26529d1;p=open-ath9k-htc-firmware.git if_ath: use datalen instead of data in ath_stop_tx_dma_tgt one more potential issue wich where we use data pointer instead of datalen. NOTE: Currently this functions seems to be not used. Signed-off-by: Oleksij Rempel --- diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c index b31fbdb..1fb2a7a 100755 --- a/target_firmware/wlan/if_ath.c +++ b/target_firmware/wlan/if_ath.c @@ -1613,11 +1613,14 @@ static void ath_stop_tx_dma_tgt(void *Context, A_UINT16 Command, struct ath_hal *ah = sc->sc_ah; a_uint32_t q; - if (data) - q = *(a_uint32_t *)data; + if (!datalen) + goto done; + + q = *(a_uint32_t *)data; q = adf_os_ntohl(q); ah->ah_stopTxDma(ah, q); +done: wmi_cmd_rsp(sc->tgt_wmi_handle, Command, SeqNo, NULL, 0); }