ath10k: fix teardown ordering

This should fix memory corruption if HIF is tried
to be restarted.

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

It was possible to have a deadlock due to inverted
locking of local->iflist_mtx and
ath10k->conf_mutex.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: setup rts/frag thresholds upon vdev creation

mac80211 configures rts/frag thresholds per-hw not
per-vif. ath10k FW expects those values to be set
per-vdev (i.e. per-vif).

ath10k should now respect rts/frag thresholds set
before a given interface was brought up.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: do not setup rts/frag thresholds for suspended interfaces

mac80211 calls for rts/frag threshold hooks before
any interface is brought back up again when
resuming.

We would set vdev parameters before given vdev is
created lading to a FW crash.

rts/frag thresholds will be re-set accordingly in
add_interface() hook anyway.

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

It serves no purpose.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: fix typo in define name

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: silent warning in IBSS mode

There is no TIM IE generated in IBSS beacons by
mac80211.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: lower print level for a message

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: provide errno if bmi read/write fails

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: change function to take struct ath10k as arg

This aligns it to the argument list of other
similar functions.

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

The `set_callbacks` is a more appopriate name for
the function. Let's leave `init` for something
else.

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