mac80211: update to wireless-testing 2016-06-20
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 308-ath10k-Fix-sending-NULL-Qos-NULL-data-frames-for-QCA.patch
1 From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
2 Date: Thu, 23 Jun 2016 22:10:01 +0530
3 Subject: [PATCH] ath10k: Fix sending NULL/ Qos NULL data frames for
4 QCA99X0 and later
5
6 For chipsets like QCA99X0, IPQ4019 and later we are not getting proper
7 NULL func status (always acked/successs !!) when hostapd does a
8 PROBE_CLIENT via nullfunc frames when the station is powered off
9 abruptly (inactive timer probes client via null func after the inactive
10 time reaches beyond the threshold). Fix this by disabling the workaround
11 (getting the ACK status of NULL func frames by sending via HTT mgmt-tx
12 path) introduced by the change ("ath10k: fix beacon loss handling ")
13 for QCA99X0 and later chipsets. The normal tx path provides the proper
14 ACK status for NULL data frames. As of now disable this workaround for
15 chipsets QCA99X0 and later, once the 10.1 firmware is obselete we can
16 completely get rid of this workaround for all the chipsets
17
18 Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
19 Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
20 ---
21
22 --- a/drivers/net/wireless/ath/ath10k/core.c
23 +++ b/drivers/net/wireless/ath/ath10k/core.c
24 @@ -181,6 +181,7 @@ static const struct ath10k_hw_params ath
25 .board = QCA99X0_HW_2_0_BOARD_DATA_FILE,
26 .board_size = QCA99X0_BOARD_DATA_SZ,
27 .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
28 + .disable_null_func_workaround = true,
29 },
30 },
31 {
32 @@ -204,6 +205,7 @@ static const struct ath10k_hw_params ath
33 .board = QCA9984_HW_1_0_BOARD_DATA_FILE,
34 .board_size = QCA99X0_BOARD_DATA_SZ,
35 .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
36 + .disable_null_func_workaround = true,
37 },
38 },
39 {
40 @@ -262,6 +264,7 @@ static const struct ath10k_hw_params ath
41 .board = QCA4019_HW_1_0_BOARD_DATA_FILE,
42 .board_size = QCA4019_BOARD_DATA_SZ,
43 .board_ext_size = QCA4019_BOARD_EXT_DATA_SZ,
44 + .disable_null_func_workaround = true,
45 },
46 },
47 };
48 --- a/drivers/net/wireless/ath/ath10k/core.h
49 +++ b/drivers/net/wireless/ath/ath10k/core.h
50 @@ -750,6 +750,12 @@ struct ath10k {
51 const char *board;
52 size_t board_size;
53 size_t board_ext_size;
54 + /* Workaround of sending NULL data frames via
55 + * HTT mgmt TX and getting the proper ACK status does
56 + * not works for chipsets QCA99X0 and later, while
57 + * Tx data path reports the ACK status properly.
58 + */
59 + bool disable_null_func_workaround;
60 } fw;
61 } hw_params;
62
63 --- a/drivers/net/wireless/ath/ath10k/mac.c
64 +++ b/drivers/net/wireless/ath/ath10k/mac.c
65 @@ -3253,6 +3253,7 @@ ath10k_mac_tx_h_get_txmode(struct ath10k
66 * mode though because AP don't sleep.
67 */
68 if (ar->htt.target_version_major < 3 &&
69 + !ar->hw_params.fw.disable_null_func_workaround &&
70 (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) &&
71 !test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX,
72 ar->running_fw->fw_file.fw_features))