ath10k: Fix broken NULL func data frame status for 10.4
authorMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Fri, 26 Aug 2016 08:12:20 +0000 (13:42 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 2 Sep 2016 15:58:50 +0000 (18:58 +0300)
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>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/mac.c

index a9b9fb01d9e6c67076d3a9769ff03c6fca1395ef..c9d163e0f3748c3b41272a3f5154f922d3d928df 100644 (file)
@@ -308,6 +308,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,
index e13e0781fcae0a5de366d3a136b56f83448b034d..b367e9cfcfd464fc419fafa8ac9ee8029cb7909d 100644 (file)
@@ -552,6 +552,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,
 };
index de6e65f612f97141a820b2156e2887f5308ee8ec..a110325897a752173b89709eab090465bf8caa89 100644 (file)
@@ -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;