ath10k: fix peerid configuration in htt tx desc for htt version < 3.4
commitd39de9919a0cded8ddb1655441cf403ad5690d6d
authorVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Thu, 5 Nov 2015 06:04:00 +0000 (5 11:34 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 12 Nov 2015 19:19:16 +0000 (12 21:19 +0200)
tree358192e4c4495763cba0b1bfbbe5045ed9724739
parent8921f5f7781db8bc5f21451eb6816c2cc293c613
ath10k: fix peerid configuration in htt tx desc for htt version < 3.4

Of a word in struct htt_data_tx_desc htt version >= 3.4 firmware uses
LSB 16-bit for frequency configuration which is used for offchannel tx
and MSB 16-bit is for peerid. But other firmwares using version 2.X
(10.1, 10.2.2, 10.2.4 and 10.4) are using 32-bit for peerid in htt tx
desc. So far no issue is found with the existing code setting peerid and
freq for HTT version 2.X, this could be mainly because of 0 as frequecy
(home channel) is being always passed with those firmwares. There may be
issues when non-zero freq is passed with firmware using < 3.4 htt version.
To be safe use target_version_major and target_version_minor along with
htt-op-version before configuring peer id and freq in htt tx desc. This
patch extends ath10k_mac_tx_frm_has_freq() to check for htt_op_version_tlv
and uses the helper while setting peerid in htt_tx_desc.

Fixes: 8d6d36243610 ("ath10k: fix offchan reliability")
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/htt.h
drivers/net/wireless/ath/ath10k/htt_tx.c
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/mac.h