소스 검색

qcacld-3.0: Send freq in mgmt frame req for LFR2

currently freq is sent as 0 in send auth mgmt frame
request to firmware(WMI_MGMT_TX_SEND_CMDID). In SAP 2G
+ STA doing LFR2 DBS roam from 5G to 2G scenario, the
preauth request get sent in 5g band rather than 2G.
So LFR2 preauth send request should have the exact
frequency parameter. only then FW can send the auth req
in appropriate frequency.

Change-Id: I17f47ee559768fee1fd5055d953791117e7b04c5
Rajasekaran Kalidoss 6 년 전
부모
커밋
7152a355fa
2개의 변경된 파일14개의 추가작업 그리고 3개의 파일을 삭제
  1. 9 2
      core/mac/src/pe/lim/lim_send_management_frames.c
  2. 5 1
      core/wma/src/wma_data.c

+ 9 - 2
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * any purpose with or without fee is hereby granted, provided that the
@@ -2231,6 +2231,7 @@ lim_send_auth_mgmt_frame(struct mac_context *mac_ctx,
 	uint16_t ft_ies_length = 0;
 	uint16_t ft_ies_length = 0;
 	bool challenge_req = false;
 	bool challenge_req = false;
 	enum rateid min_rid = RATEID_DEFAULT;
 	enum rateid min_rid = RATEID_DEFAULT;
+	uint16_t ch_freq_tx_frame = 0;
 
 
 	if (NULL == session) {
 	if (NULL == session) {
 		pe_err("Error: psession Entry is NULL");
 		pe_err("Error: psession Entry is NULL");
@@ -2510,12 +2511,18 @@ alloc_packet:
 	min_rid = lim_get_min_session_txrate(session);
 	min_rid = lim_get_min_session_txrate(session);
 	lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr,
 	lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr,
 				      session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
 				      session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
+
+	if (session->ftPEContext.pFTPreAuthReq != NULL)
+		ch_freq_tx_frame = cds_chan_to_freq(
+			session->ftPEContext.pFTPreAuthReq->preAuthchannelNum);
+
 	qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet,
 	qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet,
 				 (uint16_t)frame_len,
 				 (uint16_t)frame_len,
 				 TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
 				 TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
 				 7, lim_tx_complete, frame,
 				 7, lim_tx_complete, frame,
 				 lim_auth_tx_complete_cnf,
 				 lim_auth_tx_complete_cnf,
-				 tx_flag, sme_sessionid, false, 0, min_rid);
+				 tx_flag, sme_sessionid, false,
+				 ch_freq_tx_frame, min_rid);
 	MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
 	MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
 		session->peSessionId, qdf_status));
 		session->peSessionId, qdf_status));
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {

+ 5 - 1
core/wma/src/wma_data.c

@@ -2728,11 +2728,15 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
 			__func__, chanfreq, vdev_id);
 			__func__, chanfreq, vdev_id);
 		if (wma_is_vdev_in_ap_mode(wma_handle, vdev_id) && !chanfreq)
 		if (wma_is_vdev_in_ap_mode(wma_handle, vdev_id) && !chanfreq)
 			WMA_LOGE("%s: AP oper chan is zero", __func__);
 			WMA_LOGE("%s: AP oper chan is zero", __func__);
-	} else if (pFc->subType == SIR_MAC_MGMT_ACTION) {
+	} else if (pFc->subType == SIR_MAC_MGMT_ACTION ||
+			pFc->subType == SIR_MAC_MGMT_AUTH) {
 		chanfreq = channel_freq;
 		chanfreq = channel_freq;
 	} else {
 	} else {
 		chanfreq = 0;
 		chanfreq = 0;
 	}
 	}
+
+	WMA_LOGD("%s: chan freq %d vdev:%d subType:%d",
+		 __func__, chanfreq, vdev_id, pFc->subType);
 	if (mac->mlme_cfg->gen.debug_packet_log & 0x1) {
 	if (mac->mlme_cfg->gen.debug_packet_log & 0x1) {
 		if ((pFc->type == SIR_MAC_MGMT_FRAME) &&
 		if ((pFc->type == SIR_MAC_MGMT_FRAME) &&
 		    (pFc->subType != SIR_MAC_MGMT_PROBE_REQ) &&
 		    (pFc->subType != SIR_MAC_MGMT_PROBE_REQ) &&