Преглед на файлове

qcacld-3.0: Post Probe request frames to SCAN queue instead of PE queue

Currently in pe_handle_mgmt_frame, all management frames are posted
into the PE message queue. The beacon and probe response frames are
filtered before posting into the PE message queue, however the PE
message queue can still be flooded with probe request frames.

Post probe request frames via SCAN queue with the appropriate
callback function.

Change-Id: Ie29ad9602d3389af467b8f893624b86265a44421
CRs-Fixed: 2238190
Vignesh Viswanathan преди 7 години
родител
ревизия
18eb2b2aff
променени са 1 файла, в които са добавени 32 реда и са изтрити 0 реда
  1. 32 0
      core/mac/src/pe/lim/lim_api.c

+ 32 - 0
core/mac/src/pe/lim/lim_api.c

@@ -1374,6 +1374,26 @@ static bool pe_filter_bcn_probe_frame(tpAniSirGlobal mac_ctx,
 	return false;
 }
 
+static QDF_STATUS pe_handle_probe_req_frames(tpAniSirGlobal mac_ctx,
+					cds_pkt_t *pkt)
+{
+	QDF_STATUS status;
+	struct scheduler_msg msg = {0};
+
+	/* Forward to MAC via mesg = SIR_BB_XPORT_MGMT_MSG */
+	msg.type = SIR_BB_XPORT_MGMT_MSG;
+	msg.bodyptr = pkt;
+	msg.bodyval = 0;
+	msg.callback = pe_mc_process_handler;
+
+	status = scheduler_post_msg(QDF_MODULE_ID_SCAN, &msg);
+
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		pe_err_rl("Failed to post probe req frame to Scan Queue");
+
+	return status;
+}
+
 /* --------------------------------------------------------------------------- */
 /**
  * pe_handle_mgmt_frame() - Process the Management frames from TXRX
@@ -1449,6 +1469,18 @@ static QDF_STATUS pe_handle_mgmt_frame(struct wlan_objmgr_psoc *psoc,
 		return QDF_STATUS_SUCCESS;
 	}
 
+	/*
+	 * Post Probe Req frames to Scan queue and return
+	 */
+	if (mHdr->fc.subType == SIR_MAC_MGMT_PROBE_REQ) {
+		qdf_status = pe_handle_probe_req_frames(pMac, pVosPkt);
+		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+			cds_pkt_return_packet(pVosPkt);
+			pVosPkt = NULL;
+		}
+		return qdf_status;
+	}
+
 	if (QDF_STATUS_SUCCESS !=
 	    pe_drop_pending_rx_mgmt_frames(pMac, mHdr, pVosPkt))
 		return QDF_STATUS_E_FAILURE;