Pārlūkot izejas kodu

qcacld-3.0: Disable/enable intra-bss forwarding

Add logic to disable/enable sap forwarding.
Set "ap_isolate=1" in hostapd config file to disable.
Set "ap_isolate=0" to eanble it.
It's enabled by default if didn't set any value.

Change-Id: I979dca55688ed52a7115d9027c8dd81262ff6dfa
CRs-Fixed: 3082193
Lihua Liu 3 gadi atpakaļ
vecāks
revīzija
3a24ed64d9
2 mainītis faili ar 15 papildinājumiem un 4 dzēšanām
  1. 9 0
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 6 4
      core/hdd/src/wlan_hdd_power.c

+ 9 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -100,6 +100,7 @@
 
 #include <cdp_txrx_cmn.h>
 #include <cdp_txrx_misc.h>
+#include <cdp_txrx_ctrl.h>
 #include <qca_vendor.h>
 #include "wlan_pmo_ucfg_api.h"
 #include "os_if_wifi_pos.h"
@@ -18539,6 +18540,8 @@ static int __wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy,
 	int ret = 0;
 	QDF_STATUS qdf_ret_status;
 	mac_handle_t mac_handle;
+	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
+	cdp_config_param_type vdev_param;
 
 	hdd_enter();
 
@@ -18588,6 +18591,12 @@ static int __wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy,
 					 adapter->vdev_id,
 					 adapter->session.ap.
 					 disable_intrabss_fwd);
+
+		vdev_param.cdp_vdev_param_ap_brdg_en =
+			!adapter->session.ap.disable_intrabss_fwd;
+		cdp_txrx_set_vdev_param(soc, adapter->vdev_id,
+					CDP_ENABLE_AP_BRIDGE,
+					vdev_param);
 	}
 
 	hdd_exit();

+ 6 - 4
core/hdd/src/wlan_hdd_power.c

@@ -1684,8 +1684,9 @@ hdd_suspend_wlan(void)
 		if (adapter->device_mode == QDF_STA_MODE)
 			status = hdd_enable_default_pkt_filters(adapter);
 
-		if (adapter->device_mode == QDF_SAP_MODE ||
-		    adapter->device_mode == QDF_P2P_GO_MODE)
+		if (adapter->session.ap.disable_intrabss_fwd &&
+		    (adapter->device_mode == QDF_SAP_MODE ||
+		     adapter->device_mode == QDF_P2P_GO_MODE))
 			cdp_txrx_set_vdev_param(soc, adapter->vdev_id,
 						CDP_ENABLE_AP_BRIDGE, val);
 
@@ -1759,8 +1760,9 @@ static int hdd_resume_wlan(void)
 		if (adapter->device_mode == QDF_STA_MODE)
 			status = hdd_disable_default_pkt_filters(adapter);
 
-		if (adapter->device_mode == QDF_SAP_MODE ||
-		    adapter->device_mode == QDF_P2P_GO_MODE) {
+		if (adapter->session.ap.disable_intrabss_fwd &&
+		    (adapter->device_mode == QDF_SAP_MODE ||
+		     adapter->device_mode == QDF_P2P_GO_MODE)) {
 			val.cdp_vdev_param_ap_brdg_en = true;
 			cdp_txrx_set_vdev_param(soc, adapter->vdev_id,
 						CDP_ENABLE_AP_BRIDGE, val);