Browse Source

qcacld-3.0: Move back set vdev crypto pararams to wlansap_start_bss

When SSR sap restart, vdev objmgr object will recreate new, if put set
vdev crypto pararams in wlan_hdd_cfg80211_start_bss(), it will not be
invoked by SSR sap restart procedure, so there is no crypto pararams in
vdev and lead to association failure when compare crypto pararams.

Move back set vdev crypto pararams to wlansap_start_bss so sap start
and restart will both invoke it.

Change-Id: I56656ffacbe153fbe73fb6e474048e055cb6a153
CRs-Fixed: 2584138
Will Huang 5 years ago
parent
commit
3c0285f029
2 changed files with 7 additions and 30 deletions
  1. 0 30
      core/hdd/src/wlan_hdd_hostapd.c
  2. 7 0
      core/sap/src/sap_module.c

+ 0 - 30
core/hdd/src/wlan_hdd_hostapd.c

@@ -4798,30 +4798,6 @@ static void wlan_hdd_dhcp_offload_enable(struct hdd_context *hdd_ctx,
 }
 #endif /* DHCP_SERVER_OFFLOAD */
 
-#ifdef WLAN_CONV_CRYPTO_SUPPORTED
-/**
- * hdd_set_vdev_crypto_prarams_from_ie - Sets vdev crypto params from IE info
- * @vdev: vdev pointer
- * @ie_ptr: pointer to IE
- * @ie_len: IE length
- *
- * Return: QDF_STATUS_SUCCESS or error code
- */
-static QDF_STATUS
-hdd_set_vdev_crypto_prarams_from_ie(struct wlan_objmgr_vdev *vdev,
-				    uint8_t *ie_ptr, uint16_t ie_len)
-{
-	return wlan_set_vdev_crypto_prarams_from_ie(vdev, ie_ptr, ie_len);
-}
-#else
-static QDF_STATUS
-hdd_set_vdev_crypto_prarams_from_ie(struct wlan_objmgr_vdev *vdev,
-				    uint8_t *ie_ptr, uint16_t ie_len)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
-
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
 static void wlan_hdd_set_sap_mcc_chnl_avoid(struct hdd_context *hdd_ctx)
 {
@@ -5251,12 +5227,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		ret = -EINVAL;
 		goto error;
 	}
-	status = hdd_set_vdev_crypto_prarams_from_ie(adapter->vdev,
-						     config->RSNWPAReqIE,
-						     config->RSNWPAReqIELength
-						     );
-	if (QDF_IS_STATUS_ERROR(status))
-		hdd_err("Failed to set crypto params from IE");
 
 	config->SSIDinfo.ssidHidden = false;
 

+ 7 - 0
core/sap/src/sap_module.c

@@ -720,6 +720,13 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
 
 	sap_ctx->fsm_state = SAP_INIT;
 
+	qdf_status = wlan_set_vdev_crypto_prarams_from_ie(
+			sap_ctx->vdev,
+			config->RSNWPAReqIE,
+			config->RSNWPAReqIELength);
+	if (QDF_IS_STATUS_ERROR(qdf_status))
+		sap_err("Failed to set crypto params from IE");
+
 	/* Channel selection is auto or configured */
 	sap_ctx->chan_freq = config->chan_freq;
 	sap_ctx->dfs_mode = config->acs_dfs_mode;