summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAnilkumar Kolli <akolli@codeaurora.org>2019-11-27 18:29:53 +0200
committerKalle Valo <kvalo@codeaurora.org>2019-11-29 09:35:15 +0200
commit0f37fbf43c3fc39a6c49c5a27846df937d217356 (patch)
tree028892cf0fe2113e8ac885568e021f477ede74a7 /drivers/net
parent5b90fc760db5a969ed26d70f8e62c91915f012bd (diff)
ath11k: update tcl cmd descriptor parameters for STA mode
It is observed that ath11k STA mode UL throughput is low. This is due to packets delivered to FW from TCL instead of TQM. TCL AST search fail causes packet delivered to FW, fix this by properly configuring the TCL address search type and ast_hash. STA UL throughput is improved 10times with 11AC AP. Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath11k/dp.c9
-rw-r--r--drivers/net/wireless/ath/ath11k/dp_rx.c2
-rw-r--r--drivers/net/wireless/ath/ath11k/hal_desc.h5
-rw-r--r--drivers/net/wireless/ath/ath11k/hal_tx.c6
-rw-r--r--drivers/net/wireless/ath/ath11k/hal_tx.h4
5 files changed, 12 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index aa2b28189cda..ff510e821a29 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -758,13 +758,12 @@ int ath11k_dp_htt_connect(struct ath11k_dp *dp)
static void ath11k_dp_update_vdev_search(struct ath11k_vif *arvif)
{
- /* Enable AddrY (SA based search) for STA mode. All other modes it
- * is going to be AddrX (DA based search). For STA mode, set search
- * type based on AST value.
- */
+ /* For STA mode, enable address search index,
+ * tcl uses ast_hash value in the descriptor.
+ */
switch (arvif->vdev_type) {
case WMI_VDEV_TYPE_STA:
- arvif->hal_addr_search_flags = HAL_TX_ADDRY_EN;
+ arvif->hal_addr_search_flags = HAL_TX_ADDRX_EN;
arvif->search_type = HAL_TX_ADDR_SEARCH_INDEX;
break;
case WMI_VDEV_TYPE_AP:
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 7aade0314e61..396658be6f26 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -1312,7 +1312,7 @@ void ath11k_dp_htt_htc_t2h_msg_handler(struct ath11k_base *ab,
ath11k_dp_get_mac_addr(resp->peer_map_ev.mac_addr_l32,
peer_mac_h16, mac_addr);
ast_hash = FIELD_GET(HTT_T2H_PEER_MAP_INFO2_AST_HASH_VAL,
- resp->peer_map_ev.info1);
+ resp->peer_map_ev.info2);
ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, ast_hash);
break;
case HTT_T2H_MSG_TYPE_PEER_UNMAP:
diff --git a/drivers/net/wireless/ath/ath11k/hal_desc.h b/drivers/net/wireless/ath/ath11k/hal_desc.h
index 35e191b77271..5e200380cca4 100644
--- a/drivers/net/wireless/ath/ath11k/hal_desc.h
+++ b/drivers/net/wireless/ath/ath11k/hal_desc.h
@@ -934,9 +934,8 @@ struct hal_reo_flush_cache {
#define HAL_TCL_DATA_CMD_INFO0_ENCRYPT_TYPE GENMASK(7, 4)
#define HAL_TCL_DATA_CMD_INFO0_SRC_BUF_SWAP BIT(8)
#define HAL_TCL_DATA_CMD_INFO0_LNK_META_SWAP BIT(9)
-#define HAL_TCL_DATA_CMD_INFO0_SEARCH_TYPE BIT(12)
-#define HAL_TCL_DATA_CMD_INFO0_ADDRX_EN BIT(14)
-#define HAL_TCL_DATA_CMD_INFO0_ADDRY_EN BIT(15)
+#define HAL_TCL_DATA_CMD_INFO0_SEARCH_TYPE GENMASK(13, 12)
+#define HAL_TCL_DATA_CMD_INFO0_ADDR_EN GENMASK(15, 14)
#define HAL_TCL_DATA_CMD_INFO0_CMD_NUM GENMASK(31, 16)
#define HAL_TCL_DATA_CMD_INFO1_DATA_LEN GENMASK(15, 0)
diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.c b/drivers/net/wireless/ath/ath11k/hal_tx.c
index bb27591023fe..cbe549798762 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.c
@@ -52,9 +52,9 @@ void ath11k_hal_tx_cmd_desc_setup(struct ath11k_base *ab, void *cmd,
FIELD_PREP(HAL_TCL_DATA_CMD_INFO0_ENCAP_TYPE, ti->encap_type) |
FIELD_PREP(HAL_TCL_DATA_CMD_INFO0_ENCRYPT_TYPE,
ti->encrypt_type) |
- FIELD_PREP(HAL_TCL_DATA_CMD_INFO0_ADDRX_EN,
- ti->addr_search_flags) |
- FIELD_PREP(HAL_TCL_DATA_CMD_INFO0_ADDRY_EN,
+ FIELD_PREP(HAL_TCL_DATA_CMD_INFO0_SEARCH_TYPE,
+ ti->search_type) |
+ FIELD_PREP(HAL_TCL_DATA_CMD_INFO0_ADDR_EN,
ti->addr_search_flags) |
FIELD_PREP(HAL_TCL_DATA_CMD_INFO0_CMD_NUM,
ti->meta_data_flags);
diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.h b/drivers/net/wireless/ath/ath11k/hal_tx.h
index f955070bcf1e..5217eaf9da50 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.h
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.h
@@ -11,8 +11,8 @@
#define HAL_TX_ADDRX_EN 1
#define HAL_TX_ADDRY_EN 2
-#define HAL_TX_ADDR_SEARCH_INDEX 0
-#define HAL_TX_ADDR_SEARCH_DEFAULT 1
+#define HAL_TX_ADDR_SEARCH_DEFAULT 0
+#define HAL_TX_ADDR_SEARCH_INDEX 1
struct hal_tx_info {
u16 meta_data_flags; /* %HAL_TCL_DATA_CMD_INFO0_META_ */