Merge changes into wlan-cmn.driver.lnx.2.0
diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c
index 4ccc2eb..436b169 100644
--- a/dp/wifi3.0/dp_main.c
+++ b/dp/wifi3.0/dp_main.c
@@ -3579,6 +3579,7 @@
DP_PEER_ITERATE_ASE_LIST(peer, ast_entry, temp_ast_entry)
dp_peer_del_ast(soc, ast_entry);
+ peer->self_ast_entry = NULL;
TAILQ_INIT(&peer->ast_entry_list);
qdf_spin_unlock_bh(&soc->ast_lock);
}
@@ -4239,6 +4240,13 @@
/* remove the reference to the peer from the hash table */
dp_peer_find_hash_remove(soc, peer);
+ qdf_spin_lock_bh(&soc->ast_lock);
+ if (peer->self_ast_entry) {
+ dp_peer_del_ast(soc, peer->self_ast_entry);
+ peer->self_ast_entry = NULL;
+ }
+ qdf_spin_unlock_bh(&soc->ast_lock);
+
TAILQ_FOREACH(tmppeer, &peer->vdev->peer_list, peer_list_elem) {
if (tmppeer == peer) {
found = 1;
diff --git a/hal/wifi3.0/hal_api_mon.h b/hal/wifi3.0/hal_api_mon.h
index a429d92..c309204 100644
--- a/hal/wifi3.0/hal_api_mon.h
+++ b/hal/wifi3.0/hal_api_mon.h
@@ -958,8 +958,13 @@
ppdu_info->rx_status.sgi = he_gi;
value = he_gi << QDF_MON_STATUS_GI_SHIFT;
ppdu_info->rx_status.he_data5 |= value;
- value = he_ltf << QDF_MON_STATUS_HE_LTF_SHIFT;
+ value = he_ltf << QDF_MON_STATUS_HE_LTF_SIZE_SHIFT;
ppdu_info->rx_status.he_data5 |= value;
+
+ value = HAL_RX_GET(he_sig_a_su_info, HE_SIG_A_SU_INFO_0, NSTS);
+ value = (value << QDF_MON_STATUS_HE_LTF_SYM_SHIFT);
+ ppdu_info->rx_status.he_data5 |= value;
+
value = HAL_RX_GET(he_sig_a_su_info, HE_SIG_A_SU_INFO_1,
PACKET_EXTENSION_A_FACTOR);
value = value << QDF_MON_STATUS_PRE_FEC_PAD_SHIFT;
@@ -1078,7 +1083,12 @@
value = he_gi << QDF_MON_STATUS_GI_SHIFT;
ppdu_info->rx_status.he_data5 |= value;
- value = he_ltf << QDF_MON_STATUS_HE_LTF_SHIFT;
+ value = he_ltf << QDF_MON_STATUS_HE_LTF_SIZE_SHIFT;
+ ppdu_info->rx_status.he_data5 |= value;
+
+ value = HAL_RX_GET(he_sig_a_mu_dl_info,
+ HE_SIG_A_MU_DL_INFO_1, NUM_LTF_SYMBOLS);
+ value = (value << QDF_MON_STATUS_HE_LTF_SYM_SHIFT);
ppdu_info->rx_status.he_data5 |= value;
value = HAL_RX_GET(he_sig_a_mu_dl_info, HE_SIG_A_MU_DL_INFO_1,
diff --git a/hif/inc/hif.h b/hif/inc/hif.h
index 49a6718..f27bf3b 100644
--- a/hif/inc/hif.h
+++ b/hif/inc/hif.h
@@ -443,6 +443,7 @@
* DiagRead/DiagWrite
*/
+#ifdef WLAN_FEATURE_BMI
/*
* API to handle HIF-specific BMI message exchanges, this API is synchronous
* and only allowed to be called from a context that can block (sleep)
@@ -453,6 +454,20 @@
uint8_t *pResponseMessage,
uint32_t *pResponseLength, uint32_t TimeoutMS);
void hif_register_bmi_callbacks(struct hif_softc *hif_sc);
+bool hif_needs_bmi(struct hif_opaque_softc *hif_ctx);
+#else /* WLAN_FEATURE_BMI */
+static inline void
+hif_register_bmi_callbacks(struct hif_softc *hif_sc)
+{
+}
+
+static inline bool
+hif_needs_bmi(struct hif_opaque_softc *hif_ctx)
+{
+ return false;
+}
+#endif /* WLAN_FEATURE_BMI */
+
/*
* APIs to handle HIF specific diagnostic read accesses. These APIs are
* synchronous and only allowed to be called from a context that
@@ -848,7 +863,6 @@
void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx);
void hif_get_hw_info(struct hif_opaque_softc *hif_ctx, u32 *version,
u32 *revision, const char **target_name);
-bool hif_needs_bmi(struct hif_opaque_softc *hif_ctx);
enum qdf_bus_type hif_get_bus_type(struct hif_opaque_softc *hif_hdl);
struct hif_target_info *hif_get_target_info_handle(struct hif_opaque_softc *
scn);
diff --git a/hif/src/dispatcher/multibus.c b/hif/src/dispatcher/multibus.c
index bf2b308..f6a5bbc 100644
--- a/hif/src/dispatcher/multibus.c
+++ b/hif/src/dispatcher/multibus.c
@@ -510,9 +510,11 @@
return 0;
}
+#ifdef WLAN_FEATURE_BMI
bool hif_needs_bmi(struct hif_opaque_softc *scn)
{
struct hif_softc *hif_sc = HIF_GET_SOFTC(scn);
return hif_sc->bus_ops.hif_needs_bmi(hif_sc);
}
+#endif /* WLAN_FEATURE_BMI */
diff --git a/hif/src/usb/hif_usb.c b/hif/src/usb/hif_usb.c
index 779667c..53bd46c 100644
--- a/hif/src/usb/hif_usb.c
+++ b/hif/src/usb/hif_usb.c
@@ -665,6 +665,7 @@
return status;
}
+#ifdef WLAN_FEATURE_BMI
/**
* hif_exchange_bmi_msg() - send/recev ctrl message of type BMI_CMD/BMI_RESP
* @scn: pointer to hif_opaque_softc
@@ -694,6 +695,7 @@
USB_CONTROL_REQ_RECV_BMI_RESP,
bmi_response, bmi_response_lengthp);
}
+#endif /* WLAN_FEATURE_BMI */
/**
* hif_diag_read_access() - Read data from target memory or register
diff --git a/qdf/inc/qdf_mem.h b/qdf/inc/qdf_mem.h
index 7273f01..2653491 100644
--- a/qdf/inc/qdf_mem.h
+++ b/qdf/inc/qdf_mem.h
@@ -458,7 +458,7 @@
}
/**
- * qdf_os_mem_dma_get_sgtable() - Returns DMA memory scatter gather table
+ * qdf_mem_dma_get_sgtable() - Returns DMA memory scatter gather table
* @dev: device instace
* @sgt: scatter gather table pointer
* @cpu_addr: HLOS virtual address
@@ -475,6 +475,18 @@
}
/**
+ * qdf_dma_get_sgtable_dma_addr() - Assigns DMA address to scatterlist elements
+ * @sgt: scatter gather table pointer
+ *
+ * @Return: None
+ */
+static inline void
+qdf_dma_get_sgtable_dma_addr(struct sg_table *sgt)
+{
+ __qdf_dma_get_sgtable_dma_addr(sgt);
+}
+
+/**
* qdf_mem_get_dma_addr() - Return dma address based on SMMU translation status.
* @osdev: Parent device instance
* @mem_info: Pointer to allocated memory information
@@ -616,8 +628,7 @@
qdf_mem_get_dma_size(osdev,
&shared_mem->mem_info));
- shared_mem->sgtable.sgl->dma_address =
- qdf_mem_get_dma_pa(osdev, &shared_mem->mem_info);
+ qdf_dma_get_sgtable_dma_addr(&shared_mem->sgtable);
return shared_mem;
}
diff --git a/qdf/inc/qdf_nbuf.h b/qdf/inc/qdf_nbuf.h
index 4c7c7d8..a399b78 100644
--- a/qdf/inc/qdf_nbuf.h
+++ b/qdf/inc/qdf_nbuf.h
@@ -385,7 +385,8 @@
/* HE radiotap data5 */
#define QDF_MON_STATUS_GI_SHIFT 4
-#define QDF_MON_STATUS_HE_LTF_SHIFT 8
+#define QDF_MON_STATUS_HE_LTF_SIZE_SHIFT 6
+#define QDF_MON_STATUS_HE_LTF_SYM_SHIFT 8
#define QDF_MON_STATUS_TXBF_SHIFT 14
#define QDF_MON_STATUS_PE_DISAMBIGUITY_SHIFT 15
#define QDF_MON_STATUS_PRE_FEC_PAD_SHIFT 12
diff --git a/qdf/linux/src/i_qdf_mem.h b/qdf/linux/src/i_qdf_mem.h
index c922fc6..9c4772c 100644
--- a/qdf/linux/src/i_qdf_mem.h
+++ b/qdf/linux/src/i_qdf_mem.h
@@ -267,6 +267,22 @@
}
/**
+ * __qdf_dma_get_sgtable_dma_addr()-Assigns DMA address to scatterlist elements
+ * @sgt: scatter gather table pointer
+ *
+ * @Return: None
+ */
+static inline void
+__qdf_dma_get_sgtable_dma_addr(struct sg_table *sgt)
+{
+ struct scatterlist *sg;
+ int i;
+
+ for_each_sg(sgt->sgl, sg, sgt->nents, i)
+ sg->dma_address = sg_phys(sg);
+}
+
+/**
* __qdf_mem_get_dma_addr() - Return dma addr based on SMMU translation status
* @osdev: parent device instance
* @mem_info: Pointer to allocated memory information
diff --git a/qdf/linux/src/i_qdf_trace.h b/qdf/linux/src/i_qdf_trace.h
index 0c71acf..99ae039 100644
--- a/qdf/linux/src/i_qdf_trace.h
+++ b/qdf/linux/src/i_qdf_trace.h
@@ -235,12 +235,21 @@
*
* Return: None
*/
-#define QDF_DEBUG_PANIC(reason...) __QDF_DEBUG_PANIC("" reason)
+#define QDF_DEBUG_PANIC(reason...) \
+ QDF_DEBUG_PANIC_FL(__func__, __LINE__, "" reason)
-#define __QDF_DEBUG_PANIC(ftm, args...) \
+/**
+ * QDF_DEBUG_PANIC_FL() - In debug builds, panic, otherwise do nothing
+ * @func: origin function name to be logged
+ * @line: origin line number to be logged
+ * @fmt: printf compatible format string to be logged
+ * @args: zero or more printf compatible logging arguments
+ *
+ * Return: None
+ */
+#define QDF_DEBUG_PANIC_FL(func, line, fmt, args...) \
do { \
- pr_err("WLAN Panic @ %s:%d: " ftm "\n", \
- __func__, __LINE__, ##args); \
+ pr_err("WLAN Panic @ %s:%d: " fmt "\n", func, line, ##args); \
__qdf_bug(); \
} while (false)
diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c
index 23eefdb..37a4732 100644
--- a/wmi/src/wmi_unified_tlv.c
+++ b/wmi/src/wmi_unified_tlv.c
@@ -14270,6 +14270,33 @@
return QDF_STATUS_SUCCESS;
}
+static void
+fill_fils_tlv_params(WMI_GTK_OFFLOAD_CMD_fixed_param *cmd,
+ uint8_t vdev_id,
+ struct pmo_gtk_req *params)
+{
+ uint8_t *buf_ptr;
+ wmi_gtk_offload_fils_tlv_param *ext_param;
+
+ buf_ptr = (uint8_t *) cmd + sizeof(*cmd);
+ WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
+ sizeof(*ext_param));
+ buf_ptr += WMI_TLV_HDR_SIZE;
+
+ ext_param = (wmi_gtk_offload_fils_tlv_param *)buf_ptr;
+ WMITLV_SET_HDR(&ext_param->tlv_header,
+ WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_gtk_offload_fils_tlv_param));
+ ext_param->vdev_id = vdev_id;
+ ext_param->flags = cmd->flags;
+ ext_param->kek_len = params->kek_len;
+ qdf_mem_copy(ext_param->KEK, params->kek, params->kek_len);
+ qdf_mem_copy(ext_param->KCK, params->kck,
+ WMI_GTK_OFFLOAD_KCK_BYTES);
+ qdf_mem_copy(ext_param->replay_counter, ¶ms->replay_counter,
+ GTK_REPLAY_COUNTER_BYTES);
+}
/**
* send_gtk_offload_cmd_tlv() - send GTK offload command to fw
@@ -14288,13 +14315,15 @@
int len;
wmi_buf_t buf;
WMI_GTK_OFFLOAD_CMD_fixed_param *cmd;
- wmi_gtk_offload_fils_tlv_param *ext_param;
QDF_STATUS status = QDF_STATUS_SUCCESS;
- uint8_t *buf_ptr;
WMI_LOGD("%s Enter", __func__);
- len = sizeof(*cmd) + WMI_TLV_HDR_SIZE + sizeof(*ext_param);
+ len = sizeof(*cmd);
+
+ if (params->is_fils_connection)
+ len += WMI_TLV_HDR_SIZE +
+ sizeof(wmi_gtk_offload_fils_tlv_param);
/* alloc wmi buffer */
buf = wmi_buf_alloc(wmi_handle, len);
@@ -14305,7 +14334,6 @@
}
cmd = (WMI_GTK_OFFLOAD_CMD_fixed_param *) wmi_buf_data(buf);
- buf_ptr = (uint8_t *)cmd;
WMITLV_SET_HDR(&cmd->tlv_header,
WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param,
WMITLV_GET_STRUCT_TLVLEN
@@ -14325,23 +14353,8 @@
} else {
cmd->flags = gtk_offload_opcode;
}
-
- buf_ptr += sizeof(*cmd);
- WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, sizeof(*ext_param));
- buf_ptr += WMI_TLV_HDR_SIZE;
-
- ext_param = (wmi_gtk_offload_fils_tlv_param *)buf_ptr;
- WMITLV_SET_HDR(&ext_param->tlv_header,
- WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param,
- WMITLV_GET_STRUCT_TLVLEN(
- wmi_gtk_offload_fils_tlv_param));
- ext_param->vdev_id = vdev_id;
- ext_param->flags = cmd->flags;
- ext_param->kek_len = params->kek_len;
- qdf_mem_copy(ext_param->KEK, params->kek, params->kek_len);
- qdf_mem_copy(ext_param->KCK, params->kck, WMI_GTK_OFFLOAD_KCK_BYTES);
- qdf_mem_copy(ext_param->replay_counter, ¶ms->replay_counter,
- GTK_REPLAY_COUNTER_BYTES);
+ if (params->is_fils_connection)
+ fill_fils_tlv_params(cmd, vdev_id, params);
WMI_LOGD("VDEVID: %d, GTK_FLAGS: x%x kek len %d", vdev_id, cmd->flags, params->kek_len);
/* send the wmi command */