Browse Source

qcacld-3.0: Fix fils connection and add debug

Fix fils connection and add debug.

Change-Id: I388d96290f4450c33270c37054fde8060f599f40
CRs-Fixed: 2864257
gaurank kathpalia 4 years ago
parent
commit
2eb497d7a3

+ 5 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -1268,8 +1268,10 @@ struct hdd_adapter {
 #endif
 
 	struct hdd_mic_work mic_work;
+#ifndef FEATURE_CM_ENABLE
 	bool disconnection_in_progress;
 	qdf_mutex_t disconnection_status_lock;
+#endif
 	unsigned long event_flags;
 
 	/**Device TX/RX statistics*/
@@ -4392,6 +4394,8 @@ static inline void hdd_driver_mem_cleanup(void)
 {
 }
 #endif /* WLAN_FEATURE_MEMDUMP_ENABLE */
+
+#ifndef FEATURE_CM_ENABLE
 /**
  * hdd_set_disconnect_status() - set adapter disconnection status
  * @hdd_adapter: Pointer to hdd adapter
@@ -4400,6 +4404,7 @@ static inline void hdd_driver_mem_cleanup(void)
  * Return: None
  */
 void hdd_set_disconnect_status(struct hdd_adapter *adapter, bool disconnecting);
+#endif
 
 #ifdef FEATURE_MONITOR_MODE_SUPPORT
 /**

+ 16 - 5
core/hdd/src/wlan_hdd_cm_connect.c

@@ -886,6 +886,20 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 	 /* hdd_objmgr_set_peer_mlme_auth_state */
 }
 
+#ifdef WLAN_FEATURE_FILS_SK
+static bool hdd_cm_is_fils_connection(struct wlan_cm_connect_resp *rsp)
+{
+	return rsp->is_fils_connection;
+}
+#else
+static inline
+bool hdd_cm_is_fils_connection(struct wlan_cm_connect_resp *rsp)
+{
+	return false;
+}
+#endif
+
+
 static void
 hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
 					struct wlan_cm_connect_resp *rsp)
@@ -910,11 +924,8 @@ hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
 	if (!wlan_is_wps_connection(hdd_ctx->pdev, adapter->vdev_id) &&
 	    (sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_NONE ||
 	     sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_OPEN_SYSTEM ||
-	      sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_SHARED_KEY ||
-	     sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_FILS_SHA256 ||
-	     sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_FILS_SHA384 ||
-	     sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_FT_FILS_SHA256 ||
-	     sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_FT_FILS_SHA384))
+	     sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_SHARED_KEY ||
+	     hdd_cm_is_fils_connection(rsp)))
 		is_auth_required = false;
 
 	hdd_roam_register_sta(adapter, &rsp->bssid, is_auth_required);

+ 15 - 0
core/hdd/src/wlan_hdd_main.c

@@ -5288,7 +5288,10 @@ hdd_alloc_station_adapter(struct hdd_context *hdd_ctx, tSirMacAddr mac_addr,
 
 	adapter->offloads_configured = false;
 	adapter->is_link_up_service_needed = false;
+	/* This is temp ifdef will be removed in near future */
+#ifndef FEATURE_CM_ENABLE
 	adapter->disconnection_in_progress = false;
+#endif
 	adapter->send_mode_change = true;
 
 	/* Cache station count initialize to zero */
@@ -6028,7 +6031,10 @@ static void hdd_cleanup_adapter(struct hdd_context *hdd_ctx,
 
 	hdd_nud_deinit_tracking(adapter);
 	hdd_mic_deinit_work(adapter);
+	/* This is temp ifdef will be removed in near future */
+#ifndef FEATURE_CM_ENABLE
 	qdf_mutex_destroy(&adapter->disconnection_status_lock);
+#endif
 	hdd_periodic_sta_stats_mutex_destroy(adapter);
 	hdd_apf_context_destroy(adapter);
 	qdf_spinlock_destroy(&adapter->vdev_lock);
@@ -6703,7 +6709,10 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
 		hdd_nud_init_tracking(adapter);
 		hdd_mic_init_work(adapter);
 
+		/* This is temp ifdef will be removed in near future */
+#ifndef FEATURE_CM_ENABLE
 		qdf_mutex_create(&adapter->disconnection_status_lock);
+#endif
 		hdd_periodic_sta_stats_mutex_create(adapter);
 
 		break;
@@ -7663,10 +7672,13 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
 			clear_bit(WMM_INIT_DONE, &adapter->event_flags);
 		}
 
+		/* This is temp ifdef will be removed in near future */
+#ifndef FEATURE_CM_ENABLE
 		if (adapter->device_mode != QDF_SAP_MODE &&
 		    adapter->device_mode != QDF_P2P_GO_MODE &&
 		    adapter->device_mode != QDF_FTM_MODE)
 			hdd_set_disconnect_status(adapter, false);
+#endif
 		hdd_debug("Flush any mgmt references held by peer");
 		hdd_stop_adapter(hdd_ctx, adapter);
 		hdd_adapter_dev_put_debug(adapter,
@@ -9011,12 +9023,15 @@ static QDF_STATUS hdd_abort_sched_scan_all_adapters(struct hdd_context *hdd_ctx)
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifndef FEATURE_CM_ENABLE
 void hdd_set_disconnect_status(struct hdd_adapter *adapter, bool status)
 {
 	qdf_mutex_acquire(&adapter->disconnection_status_lock);
 	adapter->disconnection_in_progress = status;
 	qdf_mutex_release(&adapter->disconnection_status_lock);
 }
+#endif
+
 
 /**
  * hdd_unregister_notifiers - Unregister netdev notifiers.

+ 3 - 1
core/hdd/src/wlan_hdd_nud_tracking.c

@@ -235,6 +235,8 @@ hdd_handle_nud_fail_sta(struct hdd_context *hdd_ctx,
 	struct reject_ap_info ap_info;
 	struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 
+	/* This is temp ifdef will be removed in near future */
+#ifndef FEATURE_CM_ENABLE
 	qdf_mutex_acquire(&adapter->disconnection_status_lock);
 	if (adapter->disconnection_in_progress) {
 		qdf_mutex_release(&adapter->disconnection_status_lock);
@@ -242,7 +244,7 @@ hdd_handle_nud_fail_sta(struct hdd_context *hdd_ctx,
 		return;
 	}
 	qdf_mutex_release(&adapter->disconnection_status_lock);
-
+#endif
 	if (hdd_is_roaming_in_progress(hdd_ctx)) {
 		hdd_debug("Roaming already in progress, cannot trigger roam.");
 		return;

+ 3 - 2
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -3306,7 +3306,7 @@ lim_cm_handle_join_req(struct cm_vdev_join_req *req)
 	if (QDF_IS_STATUS_ERROR(status))
 		goto fail;
 
-	pe_debug("Freq %d width %d freq0 %d freq1 %d, Smps %d: mode %d action %d, nss 1x1 %d vdev_nss %d nss %d cbMode %d dot11mode %d subfer %d subfee %d csn %d is_cisco %d WPS %d OSEN %d",
+	pe_debug("Freq %d width %d freq0 %d freq1 %d, Smps %d: mode %d action %d, nss 1x1 %d vdev_nss %d nss %d cbMode %d dot11mode %d subfer %d subfee %d csn %d is_cisco %d WPS %d OSEN %d fils %d",
 		 pe_session->curr_op_freq, pe_session->ch_width,
 		 pe_session->ch_center_freq_seg0,
 		 pe_session->ch_center_freq_seg1,
@@ -3320,7 +3320,8 @@ lim_cm_handle_join_req(struct cm_vdev_join_req *req)
 		 pe_session->vht_config.csnof_beamformer_antSup,
 		 pe_session->isCiscoVendorAP,
 		 pe_session->wps_registration,
-		 pe_session->isOSENConnection);
+		 pe_session->isOSENConnection,
+		 lim_is_fils_connection(pe_session));
 
 	status = lim_send_connect_req_to_mlm(pe_session);
 	if (QDF_IS_STATUS_ERROR(status)) {

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

@@ -179,6 +179,7 @@ static void lim_set_fils_connection(struct wlan_cm_connect_resp *connect_rsp,
 {
 	if (lim_is_fils_connection(session_entry))
 		connect_rsp->is_fils_connection = true;
+	pe_debug("is_fils_connection %d", connect_rsp->is_fils_connection);
 }
 #else
 static inline