Browse Source

qcacld-3.0: Check if operating frequency is zero

Operating frequency may not have been filled up yet, from connectiion
profile. Check for the same.

Change-Id: I5f3c28fb855920c6038ce0714e9e0b3c4c21e7ef
CRs-Fixed: 2731261
Amar Singhal 4 years ago
parent
commit
abc1e6922d
1 changed files with 5 additions and 2 deletions
  1. 5 2
      core/sme/src/csr/csr_api_roam.c

+ 5 - 2
core/sme/src/csr/csr_api_roam.c

@@ -3350,8 +3350,11 @@ csr_connect_info(struct mac_context *mac_ctx,
 		diag_dot11_mode_from_csr_type(conn_profile->dot11Mode);
 	conn_stats.bss_type =
 	     diag_persona_from_csr_type(session->pCurRoamProfile->csrPersona);
-	conn_stats.operating_channel = wlan_reg_freq_to_chan(mac_ctx->pdev,
-							conn_profile->op_freq);
+	if (conn_profile->op_freq)
+		conn_stats.operating_channel =
+			wlan_reg_freq_to_chan(mac_ctx->pdev,
+					      conn_profile->op_freq);
+
 	conn_stats.qos_capability = conn_profile->qosConnection;
 	conn_stats.auth_type =
 	     diag_auth_type_from_csr_type(conn_profile->AuthType);