Kaynağa Gözat

qcacmn: Enable client isolation

[PATCH 0/1][CR:2093711]

The client isolation feature parameters were
pass and stored but were not used for enabling/disabling.
Added the changes to enable disable the feature.

iwpriv ath0 ap_bridge 1
iwpriv ath0 get_ap_bridge

By default feature is enabled so the STA-STA packet does not
go through the bridge interface and incase the feature is disabled
packets are given to the kernel stack.

Change-Id: I76e8683a0a7e8791cf8cf743e39b7201fee39d30
URAJ SASAN 7 yıl önce
ebeveyn
işleme
81d9571879

+ 2 - 0
dp/inc/cdp_txrx_cmn_struct.h

@@ -516,6 +516,7 @@ struct cdp_soc_t {
  * @CDP_ENABLE_WDS: wds sta
  * @CDP_ENABLE_PROXYSTA: proxy sta
  * @CDP_UPDATE_TDLS_FLAGS: tdls link flags
+ * @CDP_ENABLE_AP_BRIDGE: set ap_bridging enable/disable
  */
 enum cdp_vdev_param_type {
 	CDP_ENABLE_NAWDS,
@@ -524,6 +525,7 @@ enum cdp_vdev_param_type {
 	CDP_ENABLE_PROXYSTA,
 	CDP_UPDATE_TDLS_FLAGS,
 	CDP_CFG_WDS_AGING_TIMER,
+	CDP_ENABLE_AP_BRIDGE,
 };
 
 #define TXRX_FW_STATS_TXSTATS                     1

+ 6 - 1
dp/wifi3.0/dp_main.c

@@ -4548,7 +4548,6 @@ static void dp_set_vdev_param(struct cdp_vdev *vdev_handle,
 		enum cdp_vdev_param_type param, uint32_t val)
 {
 	struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle;
-
 	switch (param) {
 	case CDP_ENABLE_WDS:
 		vdev->wds_enabled = val;
@@ -4573,6 +4572,12 @@ static void dp_set_vdev_param(struct cdp_vdev *vdev_handle,
 
 		vdev->wds_aging_timer_val = val;
 		break;
+	case CDP_ENABLE_AP_BRIDGE:
+		if (wlan_op_mode_sta != vdev->opmode)
+			vdev->ap_bridge_enabled = val;
+		else
+			vdev->ap_bridge_enabled = false;
+		break;
 	default:
 		break;
 	}

+ 16 - 2
dp/wifi3.0/dp_rx.c

@@ -42,6 +42,20 @@ static inline void dp_rx_desc_prep(struct dp_rx_desc *rx_desc, qdf_nbuf_t nbuf)
 }
 #endif
 
+#ifdef CONFIG_WIN
+static inline bool dp_rx_check_ap_bridge(struct dp_vdev *vdev)
+{
+	return vdev->ap_bridge_enabled;
+}
+#else
+static inline bool dp_rx_check_ap_bridge(struct dp_vdev *vdev)
+{
+	if (vdev->opmode != wlan_op_mode_sta)
+		return true;
+	else
+		return false;
+}
+#endif
 /*
  * dp_rx_buffers_replenish() - replenish rxdma ring with rx nbufs
  *			       called during dp rx initialization
@@ -1313,8 +1327,8 @@ done:
 						nbuf);
 
 			/* Intrabss-fwd */
-			if ((vdev->opmode != wlan_op_mode_sta) &&
-					!vdev->nawds_enabled)
+			if (dp_rx_check_ap_bridge(vdev) &&
+				!vdev->nawds_enabled)
 				if (dp_rx_intrabss_fwd(soc,
 							peer,
 							rx_tlv_hdr,

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

@@ -1164,6 +1164,9 @@ struct dp_vdev {
 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
 	struct dp_tx_desc_pool_s *pool;
 #endif
+	/* AP BRIDGE enabled */
+	uint32_t ap_bridge_enabled;
+
 };