@@ -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:
@@ -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:
@@ -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)
@@ -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);
@@ -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_ */