From e9f0b338a161efc530b9a09427f098c1e26529d1 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Sun, 27 Nov 2016 07:52:44 +0100 Subject: [PATCH] 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 --- target_firmware/wlan/if_ath.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } -- 2.25.1