Bläddra i källkod

qcacmn: discard rx mgmt frame if decrypt error

If RX mgmt frame is received with error decryption,
discard it in WMI layer earlier to prevent further
processing and introducing unexpected behavior, do this
for MCL only.

Change-Id: I3d0f0ca72ae497012f93f39739b727692098ba2d
CRs-Fixed: 2296371
Jinwei Chen 6 år sedan
förälder
incheckning
2e590ab62b
1 ändrade filer med 13 tillägg och 0 borttagningar
  1. 13 0
      wmi/src/wmi_unified_tlv.c

+ 13 - 0
wmi/src/wmi_unified_tlv.c

@@ -17891,6 +17891,13 @@ static QDF_STATUS extract_ext_tbttoffset_update_params_tlv(void *wmi_hdl,
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef CONFIG_MCL
+#define IS_WMI_RX_MGMT_FRAME_STATUS_INVALID(_status) \
+			((_status) & WMI_RXERR_DECRYPT)
+#else
+#define IS_WMI_RX_MGMT_FRAME_STATUS_INVALID(_status) false
+#endif
+
 /**
  * extract_mgmt_rx_params_tlv() - extract management rx params from event
  * @wmi_handle: wmi handle
@@ -17920,6 +17927,12 @@ static QDF_STATUS extract_mgmt_rx_params_tlv(wmi_unified_t wmi_handle,
 		return QDF_STATUS_E_INVAL;
 	}
 
+	if (IS_WMI_RX_MGMT_FRAME_STATUS_INVALID(ev_hdr->status)) {
+		WMI_LOGE("%s: RX mgmt frame decrypt error, discard it",
+			 __func__);
+		return QDF_STATUS_E_INVAL;
+	}
+
 	hdr->pdev_id = wmi_handle->ops->convert_pdev_id_target_to_host(
 							ev_hdr->pdev_id);