Procházet zdrojové kódy

qcacmn: Remove SW WAR in rawmode for qca8074v2 target

Remove SW WAR in rawmode for qca8074v2 target. Added flag in
vdev structure which will be filled during vdev attach time.
Based on the flag war is applied.

Change-Id: Id91d6359b0a575b1f2b1222e56ac93a0e08a3c73
CRs-Fixed: 2296584
Venkateswara Swamy Bandaru před 6 roky
rodič
revize
6ca4112f46
5 změnil soubory, kde provedl 43 přidání a 1 odebrání
  1. 7 0
      dp/wifi3.0/dp_main.c
  2. 2 1
      dp/wifi3.0/dp_tx.c
  3. 3 0
      dp/wifi3.0/dp_types.h
  4. 11 0
      wlan_cfg/wlan_cfg.c
  5. 20 0
      wlan_cfg/wlan_cfg.h

+ 7 - 0
dp/wifi3.0/dp_main.c

@@ -3600,6 +3600,7 @@ static struct cdp_vdev *dp_vdev_attach_wifi3(struct cdp_pdev *txrx_pdev,
 	vdev->rx_decap_type = wlan_cfg_pkt_type(soc->wlan_cfg_ctx);
 	vdev->dscp_tid_map_id = 0;
 	vdev->mcast_enhancement_en = 0;
+	vdev->raw_mode_war = wlan_cfg_get_raw_mode_war(soc->wlan_cfg_ctx);
 
 	/* TODO: Initialize default HTT meta data that will be used in
 	 * TCL descriptors for packets transmitted from this VDEV
@@ -8113,11 +8114,17 @@ void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
 #endif
 		wlan_cfg_set_reo_dst_ring_size(soc->wlan_cfg_ctx,
 					       REO_DST_RING_SIZE_QCA6290);
+		wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, true);
 		break;
 	case TARGET_TYPE_QCA8074:
+		wlan_cfg_set_reo_dst_ring_size(soc->wlan_cfg_ctx,
+					       REO_DST_RING_SIZE_QCA8074);
+		wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, true);
+		break;
 	case TARGET_TYPE_QCA8074V2:
 		wlan_cfg_set_reo_dst_ring_size(soc->wlan_cfg_ctx,
 					       REO_DST_RING_SIZE_QCA8074);
+		wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, false);
 		break;
 	default:
 		qdf_print("%s: Unknown tgt type %d\n", __func__, target_type);

+ 2 - 1
dp/wifi3.0/dp_tx.c

@@ -814,7 +814,8 @@ static qdf_nbuf_t dp_tx_prepare_raw(struct dp_vdev *vdev, qdf_nbuf_t nbuf,
 	DP_STATS_INC_PKT(vdev, tx_i.raw.raw_pkt, 1, qdf_nbuf_len(nbuf));
 
 	/* SWAR for HW: Enable WEP bit in the AMSDU frames for RAW mode */
-	if (qos_wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS)
+	if (vdev->raw_mode_war &&
+	    (qos_wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS))
 		qos_wh->i_fc[1] |= IEEE80211_FC1_WEP;
 
 	for (curr_nbuf = nbuf, i = 0; curr_nbuf;

+ 3 - 0
dp/wifi3.0/dp_types.h

@@ -1389,6 +1389,9 @@ struct dp_vdev {
 	uint32_t ap_bridge_enabled;
 
 	enum cdp_sec_type  sec_type;
+
+	/* SWAR for HW: Enable WEP bit in the AMSDU frames for RAW mode */
+	bool raw_mode_war;
 };
 
 

+ 11 - 0
wlan_cfg/wlan_cfg.c

@@ -551,6 +551,17 @@ void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
 	cfg->reo_dst_ring_size = reo_dst_ring_size;
 }
 
+void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
+			       bool raw_mode_war)
+{
+	cfg->raw_mode_war = raw_mode_war;
+}
+
+bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg)
+{
+	return cfg->raw_mode_war;
+}
+
 int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
 {
 	return cfg->num_tx_desc;

+ 20 - 0
wlan_cfg/wlan_cfg.h

@@ -127,6 +127,7 @@ struct wlan_cfg_dp_pdev_ctxt;
  * @reo_status_ring - reo status ting size
  * @rxdma_refill_ring - rxdma refill ring size
  * @rxdma_err_dst_ring - rxdma error detination ring size
+ * @raw_mode_war - enable/disable raw mode war
  */
 struct wlan_cfg_dp_soc_ctxt {
 	int num_int_ctxts;
@@ -187,6 +188,7 @@ struct wlan_cfg_dp_soc_ctxt {
 
 	int rxdma_refill_ring;
 	int rxdma_err_dst_ring;
+	bool raw_mode_war;
 };
 
 /**
@@ -528,6 +530,24 @@ int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
 void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
 				    int reo_dst_ring_size);
 
+/*
+ * wlan_cfg_set_raw_mode_war() - Set raw mode war configuration
+ *
+ * @wlan_cfg_ctx - Configuration Handle
+ * @raw_mode_war - raw mode war configuration
+ */
+void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
+			       bool raw_mode_war);
+
+/*
+ * wlan_cfg_get_raw_mode_war() - Get raw mode war configuration
+ *
+ * @wlan_cfg_ctx - Configuration Handle
+ *
+ * Return: reo_dst_ring_size
+ */
+bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg);
+
 /*
  * wlan_cfg_set_num_tx_ext_desc_pool() -  Set the number of Tx MSDU ext Descriptor
  *					pools