ath10k: split UART prints setup

UART prints shouldn't be part of firmware
downloading routine.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: cleanup firmware downloading routines

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: fix (void *) casts in wmi submodule

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: zero htt_rx_info struct in frag rx handler

The struct was filled with garbage and ended up
having fcs_err set to true. This caused mac to
drop fragmented frames.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: do not pop more than one frame in frag rx handler

This led us to popping frames too early, before FW
actually filled in frames. This was not an issue
earlier. Perhaps the MSDU FW descriptor is now
different.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: add safety check after popping a frame in frag rx

If HTT RX went haywire we dereferenced buggy
pointers that led to system crash.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: move ath10k_htt_rx_free_msdu_chain()

This makes it possible to call the function more
different places now.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: drop all msdus in case of htt rx failure

It's a lot safer to simply drop everything. It's
broken anyway so why bother.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: fix tkip fragment rx

TKIP fragmented frames contains different data at
the tail depending on the more flags.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: strip protected flag

We already do decryption and all crypto
verification in HW. mac80211 tries to verify CCMP
for fragmented rx and fails without this patch.

This fixes fragmented rx on CCMP networks.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: use ALIGN() kernel macros

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: use void pointer instead of char pointer

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>