Эх сурвалжийг харах

qcacmn: extract max number of NAN pairing sessions

Currently, there is no provision to identify that the driver supports
NAN pairing protocol. So, new kernel and new firmware will start
exchanging PASN frames without realization that old driver is loaded
and thus, frames will be drops in driver.

So, to fix this issue, firmware introduces new parameter in nan
capabilities to indicate host about pairing capability. Host driver
extracts the TLV to get nan capabilities and cache the max num of
pairing session.

Change-Id: I4153c7ec4d425294b0799122bf61e735184f0960
CRs-Fixed: 3492518
Rahul Gusain 2 жил өмнө
parent
commit
ce53e06591

+ 2 - 0
target_if/init_deinit/inc/service_ready_param.h

@@ -455,6 +455,7 @@ struct wlan_psoc_host_service_ext_param {
  * @num_dbr_ring_caps: Number of direct buf rx ring capabilities
  * @chwidth_num_peer_caps: Peer limit for peer_chan_width_switch WMI cmd
  * @max_ndp_sessions: Max number of ndp session fw supports
+ * @max_nan_pairing_sessions: max number of PASN pairing session allowed on NAN
  * @preamble_puncture_bw_cap: Preamble Puncturing Tx support
  * @num_scan_radio_caps: Number of scan radio capabilities
  * @max_users_dl_ofdma: Max number of users per-PPDU for Downlink OFDMA
@@ -484,6 +485,7 @@ struct wlan_psoc_host_service_ext2_param {
 	uint32_t num_dbr_ring_caps;
 	uint32_t chwidth_num_peer_caps;
 	uint32_t max_ndp_sessions;
+	uint32_t max_nan_pairing_sessions;
 	uint32_t preamble_puncture_bw_cap;
 	uint8_t num_scan_radio_caps;
 	uint16_t max_users_dl_ofdma;

+ 6 - 2
wmi/src/wmi_unified_tlv.c

@@ -14322,11 +14322,15 @@ extract_service_ready_ext2_tlv(wmi_unified_t wmi_handle, uint8_t *event,
 	param->num_msdu_idx_qtype_map =
 				param_buf->num_htt_msdu_idx_to_qtype_map;
 
-	if (param_buf->nan_cap)
+	if (param_buf->nan_cap) {
 		param->max_ndp_sessions =
 			param_buf->nan_cap->max_ndp_sessions;
-	else
+		param->max_nan_pairing_sessions =
+			param_buf->nan_cap->max_pairing_sessions;
+	} else {
 		param->max_ndp_sessions = 0;
+		param->max_nan_pairing_sessions = 0;
+	}
 
 	param->preamble_puncture_bw_cap = ev->preamble_puncture_bw;
 	param->num_scan_radio_caps = param_buf->num_wmi_scan_radio_caps;