Browse Source

qcacld-3.0: Use Vdev mlme target if for hidden ssid restart

Use Vdev mlme target if for hidden ssid restart.

Change-Id: I915f7911a1f3e01fd6579ed3e33d65bfe8a6c413
CRs-Fixed: 2522556
Abhishek Singh 5 years ago
parent
commit
356781e02f

+ 0 - 3
core/mac/src/include/sir_params.h

@@ -458,9 +458,6 @@ struct sir_cfg_action_frm_tb_ppdu {
 #define SIR_HAL_STATS_EXT_REQUEST           (SIR_HAL_ITC_MSG_TYPES_BEGIN + 194)
 /* (SIR_HAL_ITC_MSG_TYPES_BEGIN + 195) is unused */
 #endif /* WLAN_FEATURE_STATS_EXT */
-
-#define SIR_HAL_HIDE_SSID_VDEV_RESTART      (SIR_HAL_ITC_MSG_TYPES_BEGIN + 196)
-
 /* (SIR_HAL_ITC_MSG_TYPES_BEGIN + 197) is unused */
 
 #ifdef FEATURE_WLAN_EXTSCAN

+ 2 - 1
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -2516,8 +2516,9 @@ void lim_process_mlm_update_hidden_ssid_rsp(struct mac_context *mac_ctx,
 	struct scheduler_msg message = {0};
 	QDF_STATUS status;
 
-	session_entry = pe_find_session_by_sme_session_id(mac_ctx, vdev_id);
+	pe_debug("hidden ssid resp for vdev_id:%d ", vdev_id);
 
+	session_entry = pe_find_session_by_sme_session_id(mac_ctx, vdev_id);
 	if (!session_entry) {
 		pe_err("vdev_id:%d Session Doesn't exist",
 		       vdev_id);

+ 9 - 18
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -55,6 +55,7 @@
 #include "lim_process_fils.h"
 #include "wlan_utility.h"
 #include <wlan_crypto_global_api.h>
+#include "../../core/src/vdev_mgr_ops.h"
 
 /* SME REQ processing function templates */
 static bool __lim_process_sme_sys_ready_ind(struct mac_context *, uint32_t *);
@@ -3607,33 +3608,23 @@ void
 lim_send_vdev_restart(struct mac_context *mac,
 		      struct pe_session *pe_session, uint8_t sessionId)
 {
-	tpHalHiddenSsidVdevRestart pHalHiddenSsidVdevRestart = NULL;
-	struct scheduler_msg msgQ = {0};
-	QDF_STATUS retCode = QDF_STATUS_SUCCESS;
+	struct vdev_mlme_obj *mlme_obj;
 
 	if (!pe_session) {
 		pe_err("Invalid parameters");
 		return;
 	}
 
-	pHalHiddenSsidVdevRestart =
-		qdf_mem_malloc(sizeof(tHalHiddenSsidVdevRestart));
-	if (!pHalHiddenSsidVdevRestart)
+	mlme_obj = wlan_vdev_mlme_get_cmpt_obj(pe_session->vdev);
+	if (!mlme_obj) {
+		pe_err("vdev component object is NULL");
 		return;
+	}
+	pe_debug("pe_session->ssidHidden %d", pe_session->ssidHidden);
 
-	pHalHiddenSsidVdevRestart->ssidHidden = pe_session->ssidHidden;
-	pHalHiddenSsidVdevRestart->sessionId = sessionId;
-	pHalHiddenSsidVdevRestart->pe_session_id = pe_session->peSessionId;
-
-	msgQ.type = WMA_HIDDEN_SSID_VDEV_RESTART;
-	msgQ.bodyptr = pHalHiddenSsidVdevRestart;
-	msgQ.bodyval = 0;
+	mlme_obj->mgmt.ap.hidden_ssid = pe_session->ssidHidden ? true : false;
 
-	retCode = wma_post_ctrl_msg(mac, &msgQ);
-	if (QDF_STATUS_SUCCESS != retCode) {
-		pe_err("wma_post_ctrl_msg() failed");
-		qdf_mem_free(pHalHiddenSsidVdevRestart);
-	}
+	vdev_mgr_start_send(mlme_obj,  true);
 }
 
 /**

+ 0 - 1
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -570,7 +570,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 		CASE_RETURN_STRING(WMA_ROAM_OFFLOAD_SYNCH_IND);
 #endif
-		CASE_RETURN_STRING(WMA_HIDDEN_SSID_VDEV_RESTART);
 		CASE_RETURN_STRING(WMA_UPDATE_RX_NSS);
 #ifdef WLAN_FEATURE_NAN
 		CASE_RETURN_STRING(WMA_NAN_REQUEST);

+ 0 - 22
core/wma/inc/wma.h

@@ -665,26 +665,6 @@ typedef struct {
 } wma_igtk_key_t;
 #endif
 
-/**
- * struct vdev_restart_params_t - vdev restart parameters
- * @vdev_id: vdev id
- * @ssid: ssid
- * @flags: flags
- * @requestor_id: requestor id
- * @chan: channel
- * @hidden_ssid_restart_in_progress: hidden ssid restart flag
- * @ssidHidden: is ssid hidden or not
- */
-typedef struct {
-	A_UINT32 vdev_id;
-	wmi_ssid ssid;
-	A_UINT32 flags;
-	A_UINT32 requestor_id;
-	A_UINT32 disable_hw_ack;
-	wmi_channel chan;
-	uint8_t ssidHidden;
-} vdev_restart_params_t;
-
 struct roam_synch_frame_ind {
 	uint32_t bcn_probe_rsp_len;
 	uint8_t *bcn_probe_rsp;
@@ -703,7 +683,6 @@ struct roam_synch_frame_ind {
  * @bssid: bssid
  * @handle: wma handle
  * @beacon: beacon info
- * @vdev_restart_params: vdev restart parameters
  * @config: per vdev config parameters
  * @scan_info: scan info
  * @type: type
@@ -769,7 +748,6 @@ struct wma_txrx_node {
 	uint8_t bssid[QDF_MAC_ADDR_SIZE];
 	struct cdp_vdev *handle;
 	struct beacon_info *beacon;
-	vdev_restart_params_t vdev_restart_params;
 	vdev_cli_config_t config;
 	uint32_t type;
 	uint32_t sub_type;

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

@@ -937,18 +937,6 @@ struct send_peer_unmap_conf_params {
 	uint16_t *peer_id_list;
 };
 
-/**
- * struct tHalHiddenSsidVdevRestart - hidden ssid vdev restart params
- * @ssidHidden: is hidden ssid or not
- * @sessionId: session id
- */
-typedef struct tHalHiddenSsidVdevRestart {
-	uint8_t ssidHidden;
-	uint8_t sessionId;
-	uint16_t pe_session_id;
-} tHalHiddenSsidVdevRestart, *tpHalHiddenSsidVdevRestart;
-
-
 /**
  * struct tDisableIntraBssFwd - intra bss forward parameters
  * @sessionId: session id

+ 0 - 3
core/wma/inc/wma_internal.h

@@ -811,9 +811,6 @@ void wma_process_update_membership(tp_wma_handle wma_handle,
 void wma_process_update_userpos(tp_wma_handle wma_handle,
 				       tUpdateUserPos *userpos);
 
-void wma_hidden_ssid_vdev_restart(tp_wma_handle wma_handle,
-				  tHalHiddenSsidVdevRestart *pReq);
-
 /*
  * wma_power.c functions declarations
  */

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

@@ -248,8 +248,6 @@
 
 #define WMA_TX_FAIL_MONITOR_IND         SIR_HAL_TX_FAIL_MONITOR_IND
 
-#define WMA_HIDDEN_SSID_VDEV_RESTART    SIR_HAL_HIDE_SSID_VDEV_RESTART
-
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
 #define WMA_GTK_OFFLOAD_REQ             SIR_HAL_GTK_OFFLOAD_REQ
 #define WMA_GTK_OFFLOAD_GETINFO_REQ     SIR_HAL_GTK_OFFLOAD_GETINFO_REQ

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

@@ -1295,16 +1295,18 @@ QDF_STATUS wma_vdev_start_resp_handler(struct vdev_mlme_obj *vdev_mlme,
 
 	iface = &wma->interfaces[rsp->vdev_id];
 
-	if (wma_get_hidden_ssid_restart_in_progress(iface) &&
-	    wma_is_vdev_in_ap_mode(wma, rsp->vdev_id))
-		wma_handle_hidden_ssid_restart(wma, iface);
-
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
 	if (rsp->status == QDF_STATUS_SUCCESS
 		&& mac_ctx->sap.sap_channel_avoidance)
 		wma_find_mcc_ap(wma, rsp->vdev_id, true);
 #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
 
+	if (wma_get_hidden_ssid_restart_in_progress(iface) &&
+	    wma_is_vdev_in_ap_mode(wma, rsp->vdev_id)) {
+		wma_handle_hidden_ssid_restart(wma, iface);
+		return QDF_STATUS_SUCCESS;
+	}
+
 	if (iface->type == WMI_VDEV_TYPE_STA)
 		assoc_type = mlme_get_assoc_type(vdev_mlme->vdev);
 
@@ -2902,10 +2904,6 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
 	struct wma_txrx_node *intr = wma->interfaces;
 	struct mac_context *mac_ctx = NULL;
 	uint32_t temp_ssid_len = 0;
-	uint32_t temp_flags = 0;
-	uint32_t temp_chan_info = 0;
-	uint32_t temp_reg_info_1 = 0;
-	uint32_t temp_reg_info_2 = 0;
 	uint16_t bw_val;
 	struct wma_txrx_node *iface = &wma->interfaces[req->vdev_id];
 	uint32_t chan_mode;
@@ -3031,18 +3029,10 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
 	intr[params.vdev_id].channel = wlan_reg_freq_to_chan(wma->pdev,
 							     req->op_chan_freq);
 
-	temp_chan_info &= 0xffffffc0;
-	temp_chan_info |= params.channel.phy_mode;
-
 	/* Set half or quarter rate WMI flags */
 	params.channel.half_rate = req->is_half_rate;
 	params.channel.quarter_rate = req->is_quarter_rate;
 
-	if (req->is_half_rate)
-		temp_chan_info |=  (1 << WMI_CHAN_FLAG_HALF_RATE);
-	else if (req->is_quarter_rate)
-		temp_chan_info |=  (1 << WMI_CHAN_FLAG_QUARTER_RATE);
-
 	/*
 	 * If the channel has DFS set, flip on radar reporting.
 	 *
@@ -3057,7 +3047,6 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
 	params.cac_duration_ms = req->cac_duration_ms;
 	params.regdomain = req->dfs_regdomain;
 	if ((QDF_GLOBAL_MONITOR_MODE != cds_get_conparam()) && req->is_dfs) {
-		temp_chan_info |=  (1 << WMI_CHAN_FLAG_DFS);
 		params.disable_hw_ack = true;
 
 		/*
@@ -3074,7 +3063,6 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
 	if (req->beacon_tx_rate) {
 		WMA_LOGD("%s: beacon tx rate [%hu * 100 Kbps]",
 				__func__, req->beacon_tx_rate);
-		temp_flags |= WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT;
 		/*
 		 * beacon_tx_rate is in multiples of 100 Kbps.
 		 * Convert the data rate to hw rate code.
@@ -3085,18 +3073,10 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
 
 	/* FIXME: Find out min, max and regulatory power levels */
 	params.channel.maxregpower = req->max_txpow;
-	temp_reg_info_1 &= 0xff00ffff;
-	temp_reg_info_1 |= ((req->max_txpow&0xff) << 16);
-
-	temp_reg_info_2 &= 0xffff00ff;
-	temp_reg_info_2 |= ((req->max_txpow&0xff)<<8);
 
 	/* TODO: Handle regulatory class, max antenna */
-	if (!isRestart) {
+	if (!isRestart)
 		params.pmf_enabled = req->pmf_enabled;
-		if (req->pmf_enabled)
-			temp_flags |= WMI_UNIFIED_VDEV_START_PMF_ENABLED;
-	}
 
 	/* Copy the SSID */
 	if (req->ssid.length) {
@@ -3110,8 +3090,6 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
 	}
 
 	params.hidden_ssid = req->hidden_ssid;
-	if (req->hidden_ssid)
-		temp_flags |= WMI_UNIFIED_VDEV_START_HIDDEN_SSID;
 
 	params.num_noa_descriptors = 0;
 	params.preferred_rx_streams = req->preferred_rx_streams;
@@ -3119,32 +3097,6 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
 
 	wma_copy_vdev_start_he_ops(&params, req);
 
-	/* Store vdev params in SAP mode which can be used in vdev restart */
-	if (intr[req->vdev_id].type == WMI_VDEV_TYPE_AP &&
-	    intr[req->vdev_id].sub_type == 0) {
-		intr[req->vdev_id].vdev_restart_params.vdev_id = req->vdev_id;
-		intr[req->vdev_id].vdev_restart_params.ssid.ssid_len =
-			temp_ssid_len;
-		qdf_mem_copy(intr[req->vdev_id].vdev_restart_params.ssid.ssid,
-			     params.ssid.mac_ssid, temp_ssid_len);
-		intr[req->vdev_id].vdev_restart_params.flags = temp_flags;
-		intr[req->vdev_id].vdev_restart_params.requestor_id = 0;
-		intr[req->vdev_id].vdev_restart_params.disable_hw_ack =
-			params.disable_hw_ack;
-		intr[req->vdev_id].vdev_restart_params.chan.mhz =
-			params.channel.mhz;
-		intr[req->vdev_id].vdev_restart_params.chan.band_center_freq1 =
-			params.channel.cfreq1;
-		intr[req->vdev_id].vdev_restart_params.chan.band_center_freq2 =
-			params.channel.cfreq2;
-		intr[req->vdev_id].vdev_restart_params.chan.info =
-			temp_chan_info;
-		intr[req->vdev_id].vdev_restart_params.chan.reg_info_1 =
-			temp_reg_info_1;
-		intr[req->vdev_id].vdev_restart_params.chan.reg_info_2 =
-			temp_reg_info_2;
-	}
-
 	if (!isRestart) {
 		WMA_LOGD("%s, vdev_id: %d, unpausing tx_ll_queue at VDEV_START",
 			 __func__, params.vdev_id);
@@ -3692,15 +3644,6 @@ void wma_vdev_resp_timer(void *data)
 	} else if (tgt_req->msg_type == WMA_ADD_BSS_REQ) {
 
 		wma_handle_add_bss_req_timeout(wma, tgt_req);
-	} else if (tgt_req->msg_type == WMA_HIDDEN_SSID_VDEV_RESTART) {
-		if (wma_get_hidden_ssid_restart_in_progress(
-		    &wma->interfaces[tgt_req->vdev_id]) &&
-		    wma_is_vdev_in_ap_mode(wma, tgt_req->vdev_id)) {
-
-			WMA_LOGE("Hidden ssid vdev restart Timed Out; vdev_id: %d, type = %d",
-				 tgt_req->vdev_id, tgt_req->type);
-			qdf_mem_free(tgt_req->user_data);
-		}
 	}
 free_tgt_req:
 	qdf_mc_timer_destroy(&tgt_req->event_timeout);

+ 0 - 5
core/wma/src/wma_main.c

@@ -8779,11 +8779,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
 		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* WLAN_FEATURE_STATS_EXT */
-	case WMA_HIDDEN_SSID_VDEV_RESTART:
-		wma_hidden_ssid_vdev_restart(wma_handle,
-				(tHalHiddenSsidVdevRestart *) msg->bodyptr);
-		qdf_mem_free(msg->bodyptr);
-		break;
 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
 	case WMA_WLAN_EXT_WOW:
 		wma_enable_ext_wow(wma_handle,

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

@@ -3602,64 +3602,6 @@ QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value)
 	return ret;
 }
 
-/**
- * wma_hidden_ssid_vdev_restart() - vdev restart for hidden ssid
- * @wma_handle: wma handle
- * @pReq: hidden ssid vdev restart request
- *
- * Return: none
- */
-void wma_hidden_ssid_vdev_restart(tp_wma_handle wma,
-				  tHalHiddenSsidVdevRestart *pReq)
-{
-	struct wma_txrx_node *intr = wma->interfaces;
-	struct hidden_ssid_vdev_restart_params params;
-	QDF_STATUS status;
-	uint8_t vdev_id;
-
-	vdev_id = pReq->sessionId;
-	if ((vdev_id != intr[vdev_id].vdev_restart_params.vdev_id)
-	    || !((intr[vdev_id].type == WMI_VDEV_TYPE_AP)
-		 && (intr[vdev_id].sub_type == 0))) {
-		WMA_LOGE(FL("invalid vdev_id %d"), vdev_id);
-		return;
-	}
-
-	intr[vdev_id].vdev_restart_params.ssidHidden = pReq->ssidHidden;
-	WMA_LOGD(FL("hidden ssid set using IOCTL for vdev %d ssid_hidden %d"),
-		 vdev_id, pReq->ssidHidden);
-
-	params.vdev_id = vdev_id;
-	params.ssid_len = intr[vdev_id].vdev_restart_params.ssid.ssid_len;
-	qdf_mem_copy(params.ssid,
-		     intr[vdev_id].vdev_restart_params.ssid.ssid,
-		     params.ssid_len);
-	params.flags = intr[vdev_id].vdev_restart_params.flags;
-	if (intr[vdev_id].vdev_restart_params.ssidHidden)
-		params.flags |= WMI_UNIFIED_VDEV_START_HIDDEN_SSID;
-	else
-		params.flags &= (0xFFFFFFFE);
-	params.requestor_id = intr[vdev_id].vdev_restart_params.requestor_id;
-	params.disable_hw_ack =
-		intr[vdev_id].vdev_restart_params.disable_hw_ack;
-
-	params.mhz = intr[vdev_id].vdev_restart_params.chan.mhz;
-	params.band_center_freq1 =
-		intr[vdev_id].vdev_restart_params.chan.band_center_freq1;
-	params.band_center_freq2 =
-		intr[vdev_id].vdev_restart_params.chan.band_center_freq2;
-	params.info = intr[vdev_id].vdev_restart_params.chan.info;
-	params.reg_info_1 = intr[vdev_id].vdev_restart_params.chan.reg_info_1;
-	params.reg_info_2 = intr[vdev_id].vdev_restart_params.chan.reg_info_2;
-
-	status = wmi_unified_hidden_ssid_vdev_restart_send(wma->wmi_handle,
-							   &params);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		WMA_LOGE(FL("Failed to send vdev restart command"));
-	}
-}
-
-
 #ifdef WLAN_FEATURE_11W
 
 /**