Explorar el Código

Merge 200d4d359bdb70a58d36e834db581a812bddc275 on remote branch

Change-Id: I72903c7426a9db71350e383137d435122f727a3a
Linux Build Service Account hace 8 meses
padre
commit
4c19dbe07a

+ 4 - 4
components/mlme/dispatcher/inc/cfg_mlme_lfr.h

@@ -92,7 +92,7 @@
 # define RoamScan_AwayTime_default 0
 # define RoamRSSI_Trigger_min -100
 # define RoamRSSI_Trigger_max -50
-# define RoamRSSI_Trigger_default -78
+# define RoamRSSI_Trigger_default -76
 # define RoamCU_Trigger_min 0
 # define RoamCU_Trigger_max 100
 # define RoamCU_Trigger_default 70
@@ -1560,9 +1560,9 @@
  * <ini>
  * gNeighborLookupThreshold/RoamRSSI_Trigger - Set neighbor lookup rssi
  * threshold
- * @Min: 50
- * @Max: 100
- * @Default: 78
+ * @Min: -100
+ * @Max: -50
+ * @Default: -76
  *
  * This is used to control the RSSI threshold for neighbor lookup.
  *

+ 2 - 1
components/nan/core/src/nan_main.c

@@ -900,7 +900,6 @@ static QDF_STATUS nan_handle_enable_rsp(struct nan_event_params *nan_event)
 		goto fail;
 	}
 
-	nan_cstats_log_nan_enable_resp_evt(nan_event);
 fail:
 	psoc_nan_obj->nan_social_ch_2g_freq = 0;
 	psoc_nan_obj->nan_social_ch_5g_freq = 0;
@@ -916,6 +915,8 @@ fail:
 	ucfg_tdls_notify_connect_failure(psoc);
 
 done:
+	nan_cstats_log_nan_enable_resp_evt(nan_event);
+
 	nan_conc_callback = psoc_nan_obj->cb_obj.nan_concurrency_update;
 	if (nan_conc_callback)
 		nan_conc_callback();

+ 4 - 1
components/p2p/core/src/wlan_p2p_main.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -555,6 +555,9 @@ static QDF_STATUS p2p_object_init_params(
 			cfg_get(psoc, CFG_ACTION_FRAME_RANDOM_SEQ_NUM_ENABLED);
 	p2p_soc_obj->param.indoor_channel_support =
 			cfg_get(psoc, CFG_P2P_GO_ON_5GHZ_INDOOR_CHANNEL);
+	p2p_soc_obj->param.go_ignore_non_p2p_probe_req =
+			cfg_get(psoc, CFG_GO_IGNORE_NON_P2P_PROBE_REQ);
+
 	return QDF_STATUS_SUCCESS;
 }
 

+ 3 - 1
components/p2p/core/src/wlan_p2p_main.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -213,6 +213,7 @@ void p2p_status_update(struct p2p_soc_priv_obj *p2p_soc_obj,
  * @skip_dfs_channel_p2p_search:    skip DFS Channel in case of P2P Search
  * @is_random_seq_num_enabled:      Flag to generate random sequence numbers
  * @indoor_channel_support:         support to allow GO in indoor channels
+ * @go_ignore_non_p2p_probe_req:    P2P GO ignore non-P2P probe req
  */
 struct p2p_param {
 	uint32_t go_keepalive_period;
@@ -220,6 +221,7 @@ struct p2p_param {
 	bool p2p_device_addr_admin;
 	bool is_random_seq_num_enabled;
 	bool indoor_channel_support;
+	bool go_ignore_non_p2p_probe_req;
 };
 
 /**

+ 26 - 2
components/p2p/dispatcher/inc/cfg_p2p.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -147,11 +147,35 @@
 					0, \
 					"Allow P2P GO on 5 GHz indoor channels")
 
+/*
+ * <ini>
+ * p2p_go_ignore_non_p2p_probe_req - P2P GO ignore non-P2P probe req
+ *
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable P2P GO ignore non-P2P probe req and don't
+ * send probe rsp to non-p2p device like STA.
+ *
+ *
+ * Supported Feature: P2P GO
+ *
+ * Usage: external
+ *
+ * </ini>
+ */
+#define CFG_GO_IGNORE_NON_P2P_PROBE_REQ CFG_INI_BOOL(\
+					"go_ignore_non_p2p_probe_req", \
+					0, \
+					"P2P GO ignore non-P2P probe req")
+
 #define CFG_P2P_ALL \
 	CFG(CFG_ACTION_FRAME_RANDOM_SEQ_NUM_ENABLED) \
 	CFG(CFG_GO_KEEP_ALIVE_PERIOD) \
 	CFG(CFG_GO_LINK_MONITOR_PERIOD) \
 	CFG(CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED) \
-	CFG(CFG_P2P_GO_ON_5GHZ_INDOOR_CHANNEL)
+	CFG(CFG_P2P_GO_ON_5GHZ_INDOOR_CHANNEL) \
+	CFG(CFG_GO_IGNORE_NON_P2P_PROBE_REQ)
 
 #endif

+ 9 - 0
components/p2p/dispatcher/inc/wlan_p2p_cfg_api.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -70,4 +71,12 @@ cfg_p2p_get_device_addr_admin(struct wlan_objmgr_psoc *psoc,
  */
 bool cfg_p2p_is_roam_config_disabled(struct wlan_objmgr_psoc *psoc);
 
+/**
+ * cfg_p2p_is_go_ignore_non_p2p_probe_req() - Is P2P GO ignore non-P2P probe
+ * req enabled
+ * @psoc:        pointer to psoc object
+ *
+ * If P2P GO ignore non-P2P probe req enabled, don't send probe rsp to STA
+ */
+bool cfg_p2p_is_go_ignore_non_p2p_probe_req(struct wlan_objmgr_psoc *psoc);
 #endif /* _WLAN_P2P_CFG_API_H_ */

+ 16 - 0
components/p2p/dispatcher/src/wlan_p2p_cfg.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -97,3 +98,18 @@ bool cfg_p2p_is_roam_config_disabled(struct wlan_objmgr_psoc *psoc)
 
 	return false;
 }
+
+bool
+cfg_p2p_is_go_ignore_non_p2p_probe_req(struct wlan_objmgr_psoc *psoc)
+{
+	struct p2p_soc_priv_obj *p2p_soc_obj;
+
+	p2p_soc_obj = wlan_psoc_get_p2p_object(psoc);
+	if (!p2p_soc_obj) {
+		p2p_err("p2p psoc null");
+		return false;
+	}
+
+	return p2p_soc_obj->param.go_ignore_non_p2p_probe_req;
+}
+

+ 2 - 2
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -1671,13 +1671,13 @@ void pmo_core_psoc_handle_initial_wake_up(void *cb_ctx)
 		return;
 	}
 
-	hif_ctx = pmo_core_psoc_get_hif_handle(psoc);
+	psoc_ctx = pmo_psoc_get_priv(psoc);
+	hif_ctx = psoc_ctx->hif_hdl;
 	if (!hif_ctx)
 		pmo_err("hif ctx is null, request resume not called");
 	else if(hif_pm_get_wake_irq_type(hif_ctx) == HIF_PM_CE_WAKE)
 		hif_rtpm_check_and_request_resume(true);
 
-	psoc_ctx = pmo_psoc_get_priv(psoc);
 	pmo_core_update_wow_initial_wake_up(psoc_ctx, 1);
 }
 

+ 1 - 2
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -78,8 +78,7 @@ cm_is_peer_preset_on_other_sta(struct wlan_objmgr_psoc *psoc,
 	sync_ind = (struct roam_offload_synch_ind *)event;
 
 	if (wma_objmgr_peer_exist(wma, sync_ind->bssid.bytes, &peer_vdev_id)) {
-		if ((!wlan_vdev_mlme_is_mlo_vdev(vdev) &&
-		     vdev_id != peer_vdev_id) ||
+		if (vdev_id != peer_vdev_id &&
 		    !mlo_check_is_given_vdevs_on_same_mld(psoc, vdev_id,
 							  peer_vdev_id)) {
 			wma_debug("Peer " QDF_MAC_ADDR_FMT

+ 67 - 4
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -3758,9 +3758,63 @@ mlme_cm_alloc_roam_stats_info(struct vdev_mlme_obj *vdev_mlme)
 	qdf_mutex_create(&vdev_mlme->ext_vdev_ptr->roam_rd_wr_lock);
 }
 
+#ifdef WLAN_CHIPSET_STATS
+static void
+cm_cp_stats_cstats_log_deauth_evt(struct wlan_objmgr_vdev *vdev,
+				  enum cstats_dir dir, uint16_t reason_code)
+{
+	struct cstats_deauth_mgmt_frm stat = {0};
+
+	stat.cmn.hdr.evt_id = WLAN_CHIPSET_STATS_MGMT_DEAUTH_EVENT_ID;
+	stat.cmn.hdr.length = sizeof(struct cstats_deauth_mgmt_frm) -
+			      sizeof(struct cstats_hdr);
+	stat.cmn.opmode = wlan_vdev_mlme_get_opmode(vdev);
+	stat.cmn.vdev_id = wlan_vdev_get_id(vdev);
+	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
+
+	stat.reason = reason_code;
+	stat.direction = dir;
+
+	wlan_cstats_host_stats(sizeof(struct cstats_deauth_mgmt_frm), &stat);
+}
+
+static void
+cm_cp_stats_cstats_log_disassoc_evt(struct wlan_objmgr_vdev *vdev,
+				    enum cstats_dir dir, uint16_t reason_code)
+{
+	struct cstats_disassoc_mgmt_frm stat = {0};
+
+	stat.cmn.hdr.evt_id = WLAN_CHIPSET_STATS_MGMT_DISASSOC_EVENT_ID;
+	stat.cmn.hdr.length = sizeof(struct cstats_disassoc_mgmt_frm) -
+			      sizeof(struct cstats_hdr);
+	stat.cmn.opmode = wlan_vdev_mlme_get_opmode(vdev);
+	stat.cmn.vdev_id = wlan_vdev_get_id(vdev);
+	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
+
+	stat.reason = reason_code;
+	stat.direction = dir;
+
+	wlan_cstats_host_stats(sizeof(struct cstats_disassoc_mgmt_frm), &stat);
+}
+#else
+static void
+cm_cp_stats_cstats_log_deauth_evt(struct wlan_objmgr_vdev *vdev,
+				  enum cstats_dir dir, uint16_t reason_code)
+{
+}
+
+static void
+cm_cp_stats_cstats_log_disassoc_evt(struct wlan_objmgr_vdev *vdev,
+				    enum cstats_dir dir, uint16_t reason_code)
+{
+}
+#endif /* WLAN_CHIPSET_STATS */
+
 /**
  * wlan_cm_update_roam_trigger_info() - API to update roam trigger info
- * @mlme_priv:    Pointer to vdev mlme legacy priv struct
+ * @vdev:    Pointer to vdev object
  * @data:  Data from target_if wmi event
  *
  * Get roam trigger info from target_if wmi event and save in vdev mlme ring
@@ -3770,12 +3824,13 @@ mlme_cm_alloc_roam_stats_info(struct vdev_mlme_obj *vdev_mlme)
  * Return: void
  */
 static void
-wlan_cm_update_roam_trigger_info(struct mlme_legacy_priv *mlme_priv,
+wlan_cm_update_roam_trigger_info(struct wlan_objmgr_vdev *vdev,
 				 struct wmi_roam_trigger_info *data)
 {
 	uint32_t trigger_reason;
 	uint32_t index;
 	struct enhance_roam_info *info;
+	struct mlme_legacy_priv *mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
 
 	index = mlme_priv->roam_write_index;
 	info = &mlme_priv->roam_info[index];
@@ -3909,6 +3964,15 @@ wlan_cm_update_roam_trigger_info(struct mlme_legacy_priv *mlme_priv,
 		mlme_debug("roam disconnection: type:%u reason:%u",
 			   data->deauth_trig_data.type,
 			   data->deauth_trig_data.reason);
+		if (data->deauth_trig_data.type == 1) {
+			cm_cp_stats_cstats_log_deauth_evt(
+						vdev, CSTATS_DIR_RX,
+						data->deauth_trig_data.reason);
+		} else if (data->deauth_trig_data.type == 2) {
+			cm_cp_stats_cstats_log_disassoc_evt(
+						vdev, CSTATS_DIR_RX,
+						data->deauth_trig_data.reason);
+		}
 		break;
 	case ROAM_TRIGGER_REASON_STA_KICKOUT:
 		info->trigger.condition.roam_tx_failures.kickout_threshold =
@@ -4261,7 +4325,7 @@ wlan_cm_update_roam_stats_info(struct wlan_objmgr_psoc *psoc,
 
 	if (stats_info->trigger[index].present) {
 		wlan_cm_clear_current_roam_stats_info(mlme_priv);
-		wlan_cm_update_roam_trigger_info(mlme_priv,
+		wlan_cm_update_roam_trigger_info(vdev,
 						 &stats_info->trigger[index]);
 		if (stats_info->scan[index].present)
 			wlan_cm_update_roam_scan_info(vdev,
@@ -4479,7 +4543,6 @@ static void cm_cp_stats_cstats_roam_result(struct wlan_objmgr_vdev *vdev,
 
 	wlan_cstats_host_stats(sizeof(struct cstats_sta_roam_result), &stat);
 }
-
 #else
 static inline void
 cm_cp_stats_cstats_roam_scan_start(struct wlan_objmgr_vdev *vdev,

+ 101 - 23
core/hdd/src/wlan_hdd_cfg80211.c

@@ -11769,7 +11769,7 @@ hdd_set_coex_traffic_shaping_mode(struct wlan_hdd_link_info *link_info,
 	return ret;
 }
 
-#define STA_KEEPALIVE_INTERVAL_MAX 60
+#define STA_KEEPALIVE_INTERVAL_MAX 255
 #define STA_KEEPALIVE_INTERVAL_MIN 5
 
 int hdd_vdev_send_sta_keep_alive_interval(
@@ -29003,6 +29003,24 @@ wlan_hdd_cfg80211_get_channel_sap(struct wiphy *wiphy,
 	return 0;
 }
 
+static qdf_freq_t hdd_get_sec_2ghz_freq(qdf_freq_t freq,
+					enum phy_ch_width ch_width,
+					qdf_freq_t freq_seg_1)
+{
+	/*
+	 * In case of 2.4 GHz + 40 MHz, use the secondary channel
+	 * to determine the exact ccfs1
+	 */
+	if (wlan_reg_is_24ghz_ch_freq(freq) && ch_width == CH_WIDTH_40MHZ) {
+		if (freq < freq_seg_1)
+			return freq + HT40_SEC_OFFSET;
+		else
+			return freq - HT40_SEC_OFFSET;
+	}
+
+	return 0;
+}
+
 static int wlan_hdd_cfg80211_get_vdev_chan_info(struct hdd_context *hdd_ctx,
 						struct wlan_objmgr_vdev *vdev,
 						int link_id,
@@ -29014,6 +29032,7 @@ static int wlan_hdd_cfg80211_get_vdev_chan_info(struct hdd_context *hdd_ctx,
 	enum wlan_phymode peer_phymode;
 	uint8_t vdev_id;
 	struct wlan_channel *des_chan;
+	qdf_freq_t sec_2g_freq = 0;
 
 	vdev_id = wlan_vdev_get_id(vdev);
 	link_info = hdd_get_link_info_by_vdev(hdd_ctx, vdev_id);
@@ -29037,19 +29056,66 @@ static int wlan_hdd_cfg80211_get_vdev_chan_info(struct hdd_context *hdd_ctx,
 	chan_info->ch_width =
 			wlan_mlme_get_ch_width_from_phymode(peer_phymode);
 	ch_params.ch_width = chan_info->ch_width;
+
+	sec_2g_freq = hdd_get_sec_2ghz_freq(chan_info->ch_freq,
+					    chan_info->ch_width,
+					    chan_info->ch_cfreq1);
+
 	wlan_reg_set_channel_params_for_pwrmode(hdd_ctx->pdev,
-						chan_info->ch_freq, 0,
+						chan_info->ch_freq, sec_2g_freq,
 						&ch_params,
 						REG_CURRENT_PWR_MODE);
+
+	if (chan_info->ch_cfreq1 != ch_params.mhz_freq_seg0 ||
+	    chan_info->ch_cfreq2 != ch_params.mhz_freq_seg1)
+		hdd_debug("Old ccfs1 %d ccfs2 %d - New ccfs1 %d ccfs2 %d",
+			  chan_info->ch_cfreq1, chan_info->ch_cfreq2,
+			  ch_params.mhz_freq_seg0, ch_params.mhz_freq_seg1);
+
 	chan_info->ch_cfreq1 = ch_params.mhz_freq_seg0;
 	chan_info->ch_cfreq2 = ch_params.mhz_freq_seg1;
 
-	hdd_debug("vdev: %d, freq: %d, freq1: %d, freq2: %d, ch_width: %d",
+	hdd_debug("vdev: %d, freq: %d, freq1: %d, freq2: %d, ch_width: %d, max_ch_width:%d",
 		  vdev_id, chan_info->ch_freq, chan_info->ch_cfreq1,
-		  chan_info->ch_cfreq2, chan_info->ch_width);
+		  chan_info->ch_cfreq2, chan_info->ch_width,
+		  ch_params.ch_width);
+
 	return 0;
 }
 
+#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
+static int
+wlan_hdd_get_standby_link_chan_info(struct hdd_adapter *adapter, int link_id,
+				    struct wlan_channel *chan_info)
+{
+	struct wlan_objmgr_vdev *vdev;
+	int ret;
+
+	vdev = hdd_objmgr_get_vdev_by_user(adapter->deflink, WLAN_OSIF_ID);
+	if (!vdev)
+		return -EINVAL;
+
+	if (!wlan_vdev_mlme_is_mlo_vdev(vdev)) {
+		hdd_debug("not a mlo vdev");
+		hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
+		return -EINVAL;
+	}
+
+	ret = mlo_mgr_get_per_link_chan_info(vdev, link_id, chan_info);
+
+	hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
+
+	return ret;
+}
+#else
+static inline int
+wlan_hdd_get_standby_link_chan_info(struct hdd_adapter *adapter, int link_id,
+				    struct wlan_channel *chan_info)
+{
+	return -EINVAL;
+}
+#endif
+
 static int
 wlan_hdd_cfg80211_get_channel_sta(struct wiphy *wiphy,
 				  struct cfg80211_chan_def *chandef,
@@ -29057,11 +29123,12 @@ wlan_hdd_cfg80211_get_channel_sta(struct wiphy *wiphy,
 				  struct hdd_adapter *adapter, int link_id)
 {
 	struct hdd_station_ctx *sta_ctx = NULL;
-	struct wlan_objmgr_vdev *vdev;
+	struct wlan_objmgr_vdev *link_vdev;
 	bool is_legacy_phymode = false;
 	struct wlan_channel chan_info;
 	int ret = 0;
 	struct ch_params ch_params = {0};
+	qdf_freq_t sec_2g_freq = 0;
 
 	if (!hdd_cm_is_vdev_associated(adapter->deflink)) {
 		hdd_debug("vdev not associated");
@@ -29072,31 +29139,44 @@ wlan_hdd_cfg80211_get_channel_sta(struct wiphy *wiphy,
 	if (sta_ctx->conn_info.dot11mode < eCSR_CFG_DOT11_MODE_11N)
 		is_legacy_phymode = true;
 
-	vdev = hdd_objmgr_get_vdev_by_user(adapter->deflink, WLAN_OSIF_ID);
-	if (!vdev) {
-		hdd_debug("vdev null");
-		return -EINVAL;
-	}
-
-	if (wlan_vdev_mlme_is_mlo_vdev(vdev)) {
-		ret = mlo_mgr_get_per_link_chan_info(vdev, link_id, &chan_info);
-		if (ret != 0)
-			goto release;
+	link_vdev = wlan_key_get_link_vdev(adapter, WLAN_OSIF_ID, link_id);
+	if (!link_vdev) {
+		/* request is for standby link */
+		ret =  wlan_hdd_get_standby_link_chan_info(adapter, link_id,
+							   &chan_info);
+		if (ret)
+			return ret;
 
 		ch_params.ch_width = chan_info.ch_width;
 		ch_params.center_freq_seg1 = chan_info.ch_cfreq2;
+		sec_2g_freq = hdd_get_sec_2ghz_freq(chan_info.ch_freq,
+						    chan_info.ch_width,
+						    chan_info.ch_cfreq1);
+
 		wlan_reg_set_channel_params_for_pwrmode(hdd_ctx->pdev,
-							chan_info.ch_freq, 0,
+							chan_info.ch_freq,
+							sec_2g_freq,
 							&ch_params,
 							REG_CURRENT_PWR_MODE);
 		chan_info.ch_cfreq1 = ch_params.mhz_freq_seg0;
 		chan_info.ch_cfreq2 = ch_params.mhz_freq_seg1;
+		hdd_debug("max allowed ch_width:%d, ap ch_width: %d",
+			  ch_params.ch_width, chan_info.ch_width);
+		/*
+		 * To take care scenarios when AP channel width and max
+		 * supported ch_width for connection in STA may different.
+		 * For example, a case where AP advertise beacon/probe response
+		 * in 320 MHz and STA (configured with country code = KR)
+		 * supports max ch_width 160 MHz.
+		 */
+		if (ch_params.ch_width < chan_info.ch_width)
+			chan_info.ch_width = ch_params.ch_width;
 	} else {
-		ret = wlan_hdd_cfg80211_get_vdev_chan_info(hdd_ctx, vdev,
-							   link_id,
-							   &chan_info);
-		if (ret != 0)
-			goto release;
+		ret = wlan_hdd_cfg80211_get_vdev_chan_info(hdd_ctx, link_vdev,
+							   link_id, &chan_info);
+		wlan_key_put_link_vdev(link_vdev, WLAN_OSIF_ID);
+		if (ret)
+			return ret;
 	}
 
 	chandef->chan = ieee80211_get_channel(wiphy, chan_info.ch_freq);
@@ -29112,8 +29192,6 @@ wlan_hdd_cfg80211_get_channel_sta(struct wiphy *wiphy,
 		  chan_info.ch_freq, chandef->width, chandef->center_freq1,
 		  chandef->center_freq2);
 
-release:
-	hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
 	return ret;
 }
 

+ 3 - 3
core/hdd/src/wlan_hdd_mlo.c

@@ -456,7 +456,7 @@ int hdd_update_vdev_mac_address(struct hdd_adapter *adapter,
 				struct qdf_mac_addr mac_addr)
 {
 	int idx, i, ret = 0;
-	bool eht_capab, update_self_peer;
+	bool update_self_peer;
 	QDF_STATUS status;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	struct wlan_hdd_link_info *link_info;
@@ -467,8 +467,8 @@ int hdd_update_vdev_mac_address(struct hdd_adapter *adapter,
 	 * For SAP mode, hdd_hostapd_set_mac_address() is the entry point for
 	 * MAC address update.
 	 */
-	ucfg_psoc_mlme_get_11be_capab(hdd_ctx->psoc, &eht_capab);
-	if (!(eht_capab && hdd_adapter_is_ml_adapter(adapter))) {
+
+	if (!hdd_adapter_is_ml_adapter(adapter)) {
 		struct qdf_mac_addr mld_addr = QDF_MAC_ADDR_ZERO_INIT;
 
 		ret = hdd_dynamic_mac_address_set(adapter->deflink, mac_addr,

+ 3 - 3
core/mac/inc/qwlan_version.h

@@ -32,9 +32,9 @@
 #define QWLAN_VERSION_MAJOR            5
 #define QWLAN_VERSION_MINOR            2
 #define QWLAN_VERSION_PATCH            1
-#define QWLAN_VERSION_EXTRA            "X"
-#define QWLAN_VERSION_BUILD            90
+#define QWLAN_VERSION_EXTRA            "G"
+#define QWLAN_VERSION_BUILD            91
 
-#define QWLAN_VERSIONSTR               "5.2.1.90X"
+#define QWLAN_VERSIONSTR               "5.2.1.91G"
 
 #endif /* QWLAN_VERSION_H */

+ 6 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -10362,6 +10362,12 @@ skip_vht:
 	if (QDF_IS_STATUS_ERROR(status))
 		pe_err("cannot start ap_ecsa_timer");
 
+	lim_cp_stats_cstats_log_csa_evt(
+			session_entry, CSTATS_DIR_TX,
+			session_entry->gLimChannelSwitch.sw_target_freq,
+			session_entry->gLimChannelSwitch.ch_width,
+			session_entry->gLimChannelSwitch.switchMode);
+
 	pe_debug("IE count:%d chan:%d freq %d width:%d wrapper:%d ch_offset:%d",
 		 session_entry->gLimChannelSwitch.switchCount,
 		 session_entry->gLimChannelSwitch.primaryChannel,

+ 6 - 0
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -2311,6 +2311,12 @@ void lim_handle_sta_csa_param(struct mac_context *mac_ctx,
 			session_entry->htSupportedChannelWidthSet = true;
 		}
 	}
+
+	lim_cp_stats_cstats_log_csa_evt(session_entry, CSTATS_DIR_RX,
+					lim_ch_switch->sw_target_freq,
+					lim_ch_switch->ch_width,
+					lim_ch_switch->switchMode);
+
 	pe_debug("new ch %d: freq %d width: %d freq0 %d freq1 %d ht width %d, current freq %d: bw %d",
 		 lim_ch_switch->primaryChannel, lim_ch_switch->sw_target_freq,
 		 lim_ch_switch->ch_width, lim_ch_switch->ch_center_freq_seg0,

+ 31 - 0
core/mac/src/pe/lim/lim_utils.c

@@ -12023,6 +12023,7 @@ void lim_cp_stats_cstats_log_disc_req_evt(tDot11fTDLSDisReq *frm,
 	stat.cmn.opmode = pe_session->opmode;
 	stat.cmn.vdev_id = pe_session->vdev_id;
 	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
 	stat.act_category = frm->Category.category;
 	stat.act = frm->Action.action;
 	stat.dt = frm->DialogToken.token;
@@ -12047,6 +12048,7 @@ void lim_cp_stats_cstats_log_disc_resp_evt(tDot11fTDLSDisRsp *frm,
 	stat.cmn.opmode = pe_session->opmode;
 	stat.cmn.vdev_id = pe_session->vdev_id;
 	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
 
 	stat.act_category = frm->Category.category;
 	stat.act = frm->Action.action;
@@ -12080,6 +12082,7 @@ void lim_cp_stats_cstats_log_setup_req_evt(tDot11fTDLSSetupReq *frm,
 	stat.cmn.opmode = pe_session->opmode;
 	stat.cmn.vdev_id = pe_session->vdev_id;
 	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
 
 	stat.act_category = frm->Category.category;
 	stat.act = frm->Action.action;
@@ -12114,6 +12117,7 @@ lim_cp_stats_cstats_log_setup_resp_evt(tDot11fTDLSSetupRsp *frm,
 	stat.cmn.opmode = pe_session->opmode;
 	stat.cmn.vdev_id = pe_session->vdev_id;
 	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
 
 	stat.act_category = frm->Category.category;
 	stat.act = frm->Action.action;
@@ -12151,6 +12155,7 @@ lim_cp_stats_cstats_log_setup_confirm_evt(tDot11fTDLSSetupCnf *frm,
 	stat.cmn.opmode = pe_session->opmode;
 	stat.cmn.vdev_id = pe_session->vdev_id;
 	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
 
 	stat.act_category = frm->Category.category;
 	stat.act = frm->Action.action;
@@ -12187,6 +12192,7 @@ lim_cp_stats_cstats_log_tear_down_evt(tDot11fTDLSTeardown *frm,
 	stat.cmn.opmode = pe_session->opmode;
 	stat.cmn.vdev_id = pe_session->vdev_id;
 	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
 
 	stat.act_category = frm->Category.category;
 	stat.act = frm->Action.action;
@@ -12200,4 +12206,29 @@ lim_cp_stats_cstats_log_tear_down_evt(tDot11fTDLSTeardown *frm,
 
 	wlan_cstats_host_stats(sizeof(struct cstats_tdls_tear_down), &stat);
 }
+
+void lim_cp_stats_cstats_log_csa_evt(struct pe_session *pe_session,
+				     enum cstats_dir dir, uint16_t target_freq,
+				     uint8_t target_ch_width,
+				     uint8_t switch_mode)
+{
+	struct cstats_csa_evt stat = {0};
+
+	stat.cmn.hdr.evt_id = WLAN_CHIPSET_STATS_CSA_EVENT_ID;
+	stat.cmn.hdr.length = sizeof(struct cstats_csa_evt) -
+			      sizeof(struct cstats_hdr);
+	stat.cmn.opmode = pe_session->opmode;
+	stat.cmn.vdev_id = pe_session->vdev_id;
+	stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	stat.cmn.time_tick = qdf_get_log_timestamp();
+
+	stat.direction = dir;
+	stat.target_freq = target_freq;
+	stat.target_ch_width = target_ch_width;
+	stat.current_freq = pe_session->curr_op_freq;
+	stat.current_ch_width = pe_session->ch_width;
+	stat.switch_mode = switch_mode;
+
+	wlan_cstats_host_stats(sizeof(struct cstats_csa_evt), &stat);
+}
 #endif /* WLAN_CHIPSET_STATS */

+ 23 - 0
core/mac/src/pe/lim/lim_utils.h

@@ -3559,6 +3559,22 @@ void lim_cp_stats_cstats_log_setup_confirm_evt(tDot11fTDLSSetupCnf *frm,
  */
 void lim_cp_stats_cstats_log_tear_down_evt(tDot11fTDLSTeardown *frm,
 					   struct pe_session *pe_session);
+
+/**
+ * lim_cp_stats_cstats_log_csa_evt() : chipset stats for CSA event
+ *
+ * @pe_session: pointer to session object
+ * @dir: Direction of the event i.e TX/RX
+ * @target_freq: Target freq
+ * @target_ch_width: Target channel width
+ * @switch_mode: Switch mode
+ *
+ * Return: void
+ */
+void lim_cp_stats_cstats_log_csa_evt(struct pe_session *pe_session,
+				     enum cstats_dir dir, uint16_t target_freq,
+				     uint8_t target_ch_width,
+				     uint8_t switch_mode);
 #else
 static inline void
 lim_cp_stats_cstats_log_assoc_resp_evt(struct pe_session *session_entry,
@@ -3634,5 +3650,12 @@ lim_cp_stats_cstats_log_tear_down_evt(tDot11fTDLSTeardown *frm,
 				      struct pe_session *pe_session)
 {
 }
+
+static inline void
+lim_cp_stats_cstats_log_csa_evt(struct pe_session *pe_session,
+				enum cstats_dir dir, uint16_t target_freq,
+				uint8_t target_ch_width, uint8_t switch_mode)
+{
+}
 #endif /* WLAN_CHIPSET_STATS */
 #endif /* __LIM_UTILS_H */

+ 8 - 1
core/mac/src/pe/sch/sch_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -51,6 +51,7 @@
 #include <target_if_vdev_mgr_tx_ops.h>
 #include <wlan_cmn_ieee80211.h>
 #include <wlan_mgmt_txrx_utils_api.h>
+#include <wlan_p2p_cfg_api.h>
 
 /* Fils Discovery Frame */
 /**
@@ -858,6 +859,12 @@ uint32_t lim_send_probe_rsp_template_to_hal(struct mac_context *mac,
 		pprobeRespParams->probeRespTemplateLen = nBytes;
 		qdf_mem_copy(pprobeRespParams->ucProxyProbeReqValidIEBmap,
 			     IeBitmap, (sizeof(uint32_t) * 8));
+		if (pe_session->opmode == QDF_P2P_GO_MODE &&
+		    cfg_p2p_is_go_ignore_non_p2p_probe_req(mac->psoc)) {
+			pe_debug("GO ignore non-P2P probe req");
+			pprobeRespParams->go_ignore_non_p2p_probe_req = true;
+		}
+
 		msgQ.type = WMA_SEND_PROBE_RSP_TMPL;
 		msgQ.reserved = 0;
 		msgQ.bodyptr = pprobeRespParams;

+ 2 - 1
core/pld/src/pld_pcie.h

@@ -631,7 +631,8 @@ pld_pcie_qmi_send(struct device *dev, int type, void *cmd,
 	return cnss_qmi_send(dev, type, cmd, cmd_len, cb_ctx, cb);
 }
 
-#ifdef WLAN_CHIPSET_STATS
+#if defined(WLAN_CHIPSET_STATS) && \
+	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
 static inline int
 pld_pcie_register_qmi_ind(struct device *dev, void *cb_ctx,
 			  int (*cb)(void *ctx, uint16_t type,

+ 2 - 4
core/sme/src/common/sme_api.c

@@ -16809,7 +16809,6 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_vdev *vdev,
 	struct wlan_objmgr_peer *peer;
 	struct vdev_mlme_obj *vdev_mlme;
 	struct wlan_objmgr_psoc *psoc;
-	bool eht_enab = false;
 
 	psoc = wlan_vdev_get_psoc(vdev);
 
@@ -16818,9 +16817,8 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_vdev *vdev,
 	if (req_status)
 		goto p2p_self_peer_create;
 
-	ucfg_psoc_mlme_get_11be_capab(psoc, &eht_enab);
 	if (vdev_opmode == QDF_STA_MODE && update_sta_self_peer) {
-		if (eht_enab && update_mld_addr) {
+		if (update_mld_addr) {
 			old_macaddr = wlan_vdev_mlme_get_mldaddr(vdev);
 			new_macaddr = mld_addr.bytes;
 		} else {
@@ -16849,7 +16847,7 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_vdev *vdev,
 	}
 
 	/* Update VDEV MAC address */
-	if (eht_enab && update_mld_addr) {
+	if (update_mld_addr) {
 		if (update_sta_self_peer || vdev_opmode == QDF_SAP_MODE) {
 			qdf_ret_status = wlan_mlo_mgr_update_mld_addr(
 					    (struct qdf_mac_addr *)

+ 2 - 0
core/wma/inc/wma_if.h

@@ -528,12 +528,14 @@ typedef struct {
  * @probeRespTemplate: probe response template
  * @probeRespTemplateLen: probe response template length
  * @ucProxyProbeReqValidIEBmap: valid IE bitmap
+ * @go_ignore_non_p2p_probe_req: go ignore non-p2p probe req
  */
 typedef struct sSendProbeRespParams {
 	tSirMacAddr bssId;
 	uint8_t probeRespTemplate[SIR_MAX_PROBE_RESP_SIZE];
 	uint32_t probeRespTemplateLen;
 	uint32_t ucProxyProbeReqValidIEBmap[8];
+	bool go_ignore_non_p2p_probe_req;
 } tSendProbeRespParams, *tpSendProbeRespParams;
 
 /**

+ 6 - 7
core/wma/src/wma_dev_if.c

@@ -1726,8 +1726,7 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 {
 #define PEER_ALL_TID_BITMASK 0xffffffff
 	uint32_t peer_tid_bitmap = PEER_ALL_TID_BITMASK;
-	uint8_t *peer_addr = mac_addr;
-	uint8_t peer_mac[QDF_MAC_ADDR_SIZE] = {0};
+	uint8_t peer_addr[QDF_MAC_ADDR_SIZE] = {0};
 	struct peer_flush_params param = {0};
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
@@ -1744,6 +1743,8 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 		return QDF_STATUS_E_INVAL;
 	}
 
+	qdf_mem_copy(peer_addr, mac_addr, QDF_MAC_ADDR_SIZE);
+
 	iface = &wma->interfaces[vdev_id];
 	if (!iface->peer_count) {
 		wma_err("Can't remove peer with peer_addr "QDF_MAC_ADDR_FMT" vdevid %d peer_count %d",
@@ -1791,7 +1792,7 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 	param.vdev_id = vdev_id;
 	if (!wmi_service_enabled(wma->wmi_handle,
 				 wmi_service_peer_delete_no_peer_flush_tids_cmd))
-		wmi_unified_peer_flush_tids_send(wma->wmi_handle, mac_addr,
+		wmi_unified_peer_flush_tids_send(wma->wmi_handle, peer_addr,
 						 &param);
 
 	/* peer->ref_cnt is not visible in WMA */
@@ -1815,8 +1816,6 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 peer_detach:
 	wma_debug("vdevid %d is detaching with peer_addr "QDF_MAC_ADDR_FMT" peer_count %d",
 		vdev_id, QDF_MAC_ADDR_REF(peer_addr), iface->peer_count);
-	/* Copy peer mac to find and delete objmgr peer */
-	qdf_mem_copy(peer_mac, peer_addr, QDF_MAC_ADDR_SIZE);
 	if (no_fw_peer_delete &&
 	    is_cdp_peer_detach_force_delete_supported(soc)) {
 		if (!peer_unmap_conf_support_enabled) {
@@ -1842,8 +1841,8 @@ peer_detach:
 	}
 
 	wlan_objmgr_peer_release_ref(peer, WLAN_LEGACY_WMA_ID);
-	wlan_release_peer_key_wakelock(wma->pdev, peer_mac);
-	wma_remove_objmgr_peer(wma, iface->vdev, peer_mac);
+	wlan_release_peer_key_wakelock(wma->pdev, peer_addr);
+	wma_remove_objmgr_peer(wma, iface->vdev, peer_addr);
 
 	iface->peer_count--;
 #undef PEER_ALL_TID_BITMASK

+ 2 - 0
core/wma/src/wma_mgmt.c

@@ -2111,6 +2111,8 @@ static int wmi_unified_probe_rsp_tmpl_send(tp_wma_handle wma,
 
 	params.prb_rsp_template_len = probe_rsp_info->probeRespTemplateLen;
 	params.prb_rsp_template_frm = probe_rsp_info->probeRespTemplate;
+	params.go_ignore_non_p2p_probe_req =
+		probe_rsp_info->go_ignore_non_p2p_probe_req;
 
 	return wmi_unified_probe_rsp_tmpl_send_cmd(wma->wmi_handle, vdev_id,
 						   &params);

+ 4 - 2
os_if/nan/src/os_if_nan.c

@@ -2868,10 +2868,12 @@ static int os_if_process_nan_enable_req(struct wlan_objmgr_pdev *pdev,
 		   nan_req->social_chan_2g_freq, nan_req->social_chan_5g_freq);
 	status = ucfg_nan_discovery_req(nan_req, NAN_ENABLE_REQ);
 
-	if (QDF_IS_STATUS_SUCCESS(status))
+	if (QDF_IS_STATUS_SUCCESS(status)) {
 		osif_debug("Successfully sent NAN Enable request");
-	else
+		os_if_cstats_log_nan_disc_enable_req_evt(vdev_id, nan_req);
+	} else {
 		osif_err("Unable to send NAN Enable request");
+	}
 
 	qdf_mem_free(nan_req);
 	return qdf_status_to_os_return(status);