diff mbox

[v5] ath10k: Fix broken NULL func data frame status for 10.4

Message ID 1472199140-8404-1-git-send-email-mohammed@qca.qualcomm.com (mailing list archive)
State Accepted
Commit 2cdce425aa3301648e3a68a361f7f48b681fc5a6
Delegated to: Kalle Valo
Headers show

Commit Message

Mohammed Shafi Shajakhan Aug. 26, 2016, 8:12 a.m. UTC
From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>

Older firmware with HTT delivers incorrect tx status for null func
frames to driver, but this fixed in 10.2 and 10.4 firmware versions.
Also this workaround results in reporting of incorrect null func status
for 10.4. Fix this is by introducing a firmware feature flag for 10.4
so that this workaround is skipped and proper tx status for null func
frames are reported

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
---
[v5 based on the review comments from Michal]

 drivers/net/wireless/ath/ath10k/core.c |    1 +
 drivers/net/wireless/ath/ath10k/core.h |    7 +++++++
 drivers/net/wireless/ath/ath10k/mac.c  |    2 ++
 3 files changed, 10 insertions(+)

Comments

Kalle Valo Sept. 2, 2016, 4 p.m. UTC | #1
Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> wrote:
> From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
> 
> Older firmware with HTT delivers incorrect tx status for null func
> frames to driver, but this fixed in 10.2 and 10.4 firmware versions.
> Also this workaround results in reporting of incorrect null func status
> for 10.4. Fix this is by introducing a firmware feature flag for 10.4
> so that this workaround is skipped and proper tx status for null func
> frames are reported
> 
> Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>

Thanks, 1 patch applied to ath-next branch of ath.git:

2cdce425aa33 ath10k: Fix broken NULL func data frame status for 10.4
Mohammed Shafi Shajakhan Sept. 6, 2016, 8:37 a.m. UTC | #2
Hi Kalle,

please revert this patch, Raj suggested this patch introduced a regression in sending NULL func frames :(

We will fix the wrong tx status report for NULL func frames appropriately
(if needed in ath10k firmware)
Sorry for the regression, kindly revert it until a proper fix is figured out.

regards,
shafi
Kalle Valo Sept. 8, 2016, 5:09 a.m. UTC | #3
"Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
writes:
> please revert this patch, Raj suggested this patch introduced a
> regression in sending NULL func frames :(
>
> We will fix the wrong tx status report for NULL func frames
> appropriately (if needed in ath10k firmware) Sorry for the regression,
> kindly revert it until a proper fix is figured out.

Like we discussed privately, it is better that you send the revert (or a
fix if you find one) yourself. Then we have a proper commit log etc.
Mohammed Shafi Shajakhan Sept. 8, 2016, 6:30 a.m. UTC | #4
On Thu, Sep 08, 2016 at 05:09:03AM +0000, Valo, Kalle wrote:
> "Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
> writes:
> > please revert this patch, Raj suggested this patch introduced a
> > regression in sending NULL func frames :(
> >
> > We will fix the wrong tx status report for NULL func frames
> > appropriately (if needed in ath10k firmware) Sorry for the regression,
> > kindly revert it until a proper fix is figured out.
> 
> Like we discussed privately, it is better that you send the revert (or a
> fix if you find one) yourself. Then we have a proper commit log etc.
>
[shafi] thanks Kalle, agreed the revert is under hold (to fix this properly
and not make use of this workaround)
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index e889829..798b3f8 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -304,6 +304,7 @@  static const char *const ath10k_core_fw_feature_str[] = {
 	[ATH10K_FW_FEATURE_MFP_SUPPORT] = "mfp",
 	[ATH10K_FW_FEATURE_PEER_FLOW_CONTROL] = "peer-flow-ctrl",
 	[ATH10K_FW_FEATURE_BTCOEX_PARAM] = "btcoex-param",
+	[ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR] = "skip-null-func-war",
 };
 
 static unsigned int ath10k_core_get_fw_feature_str(char *buf,
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 30ae5bf..54e40f3 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -551,6 +551,13 @@  enum ath10k_fw_features {
 	 */
 	ATH10K_FW_FEATURE_BTCOEX_PARAM = 14,
 
+	/* Older firmware with HTT delivers incorrect tx status for null func
+	 * frames to driver, but this fixed in 10.2 and 10.4 firmware versions.
+	 * Also this workaround results in reporting of incorrect null func
+	 * status for 10.4. This flag is used to skip the workaround.
+	 */
+	ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR = 15,
+
 	/* keep last */
 	ATH10K_FW_FEATURE_COUNT,
 };
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index fb8e38d..7508ef8 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3255,6 +3255,8 @@  ath10k_mac_tx_h_get_txmode(struct ath10k *ar,
 	if (ar->htt.target_version_major < 3 &&
 	    (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) &&
 	    !test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX,
+		      ar->running_fw->fw_file.fw_features) &&
+	    !test_bit(ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR,
 		      ar->running_fw->fw_file.fw_features))
 		return ATH10K_HW_TXRX_MGMT;