Browse Source

qcacld-3.0: Fix VDEV SM for NAN data path interface

NAN data path interface (NDI) VDEV uses AP MLME callbacks for
VDEV state machine but some state actions are no op for NDI mode.
Update lim module to transition from NDI from VDEV START state to
VDEV up state and bypass beacon update and VDEV up WMI for NDI mode.

CRs-fixed: 2330270
Change-Id: I648811b41020a4e09aa6c7c436ec2c9693c51d97
Manikandan Mohan 6 years ago
parent
commit
4cc1c5a4d0

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

@@ -213,13 +213,13 @@ void lim_process_mlm_start_cnf(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
 		(((tLimMlmStartCnf *) pMsgBuf)->resultCode ==
 						eSIR_SME_SUCCESS)) {
 		channelId = psessionEntry->pLimStartBssReq->channelId;
+		lim_ndi_mlme_vdev_up_transition(psessionEntry);
 
 		/* We should start beacon transmission only if the channel
 		 * on which we are operating is non-DFS until the channel
 		 * availability check is done. The PE will receive an explicit
 		 * request from upper layers to start the beacon transmission
 		 */
-
 		if (!(LIM_IS_IBSS_ROLE(psessionEntry) ||
 			(LIM_IS_AP_ROLE(psessionEntry))))
 				return;

+ 19 - 0
core/mac/src/pe/lim/lim_utils.c

@@ -8442,6 +8442,16 @@ void lim_send_beacon(tpAniSirGlobal mac_ctx, tpPESession session)
 					      sizeof(*session), session);
 }
 
+void lim_ndi_mlme_vdev_up_transition(tpPESession session)
+{
+	if (!LIM_IS_NDI_ROLE(session))
+		return;
+
+	wlan_vdev_mlme_sm_deliver_evt(session->vdev,
+				      WLAN_VDEV_SM_EV_START_SUCCESS,
+				      sizeof(*session), session);
+}
+
 QDF_STATUS lim_ap_mlme_vdev_start_send(struct vdev_mlme_obj *vdev_mlme,
 				       uint16_t data_len, void *data)
 {
@@ -8509,6 +8519,8 @@ QDF_STATUS lim_ap_mlme_vdev_update_beacon(struct vdev_mlme_obj *vdev_mlme,
 		return QDF_STATUS_E_INVAL;
 	}
 	session = (tpPESession)data;
+	if (LIM_IS_NDI_ROLE(session))
+		return QDF_STATUS_SUCCESS;
 
 	if (op == BEACON_INIT)
 		lim_send_beacon_ind(session->mac_ctx, session);
@@ -8529,6 +8541,9 @@ QDF_STATUS lim_ap_mlme_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
 		pe_err("session is NULL");
 		return QDF_STATUS_E_INVAL;
 	}
+	if (LIM_IS_NDI_ROLE(session))
+		return QDF_STATUS_SUCCESS;
+
 
 	msg.type = SIR_HAL_SEND_AP_VDEV_UP;
 	msg.bodyval = session->smeSessionId;
@@ -8656,4 +8671,8 @@ void lim_send_beacon(tpAniSirGlobal mac_ctx, tpPESession session)
 {
 	lim_send_beacon_ind(mac_ctx, session);
 }
+
+void lim_ndi_mlme_vdev_up_transition(tpPESession session)
+{
+}
 #endif

+ 8 - 0
core/mac/src/pe/lim/lim_utils.h

@@ -1514,6 +1514,14 @@ void lim_rx_invalid_peer_process(tpAniSirGlobal mac_ctx,
  */
 void lim_send_beacon(tpAniSirGlobal mac_ctx, tpPESession session);
 
+/**
+ * lim_ndi_mlme_vdev_up_transition() - Send event to transistion NDI VDEV to UP
+ * @session: session pointer
+ *
+ * Return: None
+ */
+void lim_ndi_mlme_vdev_up_transition(tpPESession session);
+
 #ifdef CONFIG_VDEV_SM
 /**
  * lim_sta_mlme_vdev_stop_send() - send VDEV stop