Procházet zdrojové kódy

qcacmn: Handle down event in disconnection progress state

For STA mode with STA CAC enable in  auth/assoc state of assoc sm,
a northbound disconnect request would have to wait until CAC and
assoc is completed and connect request is removed from serialization
queue. During which OSIF timeout is seen as CAC can exceed the
serialization timeout of 60s.

Add change to handle EV_DOWN in disconnection progress state which
brings down the connection immediately on receiving a disconnect
request.

Change-Id: I301e49164c69df99e4617dd6fbc012e449963521
CRs-Fixed: 2882876
Santosh Anbu před 4 roky
rodič
revize
6f28758c51

+ 5 - 0
umac/mlme/include/wlan_vdev_mlme.h

@@ -439,6 +439,7 @@ enum vdev_start_resp_type {
  *                                      request command
  * @mlme_vdev_start_continue:           callback to initiate operations on
  *                                      LMAC/FW start response
+ * @mlme_vdev_sta_conn_start:           callback to initiate STA connection
  * @mlme_vdev_up_send:                  callback to initiate actions of VDEV
  *                                      MLME up operation
  * @mlme_vdev_notify_up_complete:       callback to notify VDEV MLME on moving
@@ -463,6 +464,7 @@ enum vdev_start_resp_type {
  *                                      vdev mlme peer delete all response
  * @mlme_vdev_dfs_cac_wait_notify:      callback to notify about CAC state
  * @mlme_vdev_csa_complete:             callback to indicate CSA complete
+ * @mlme_vdev_sta_disconn_start:        callback to initiate STA disconnection
  */
 struct vdev_mlme_ops {
 	QDF_STATUS (*mlme_vdev_validate_basic_params)(
@@ -538,6 +540,9 @@ struct vdev_mlme_ops {
 				struct vdev_mlme_obj *vdev_mlme);
 	QDF_STATUS (*mlme_vdev_csa_complete)(
 				struct vdev_mlme_obj *vdev_mlme);
+	QDF_STATUS (*mlme_vdev_sta_disconn_start)(
+				struct vdev_mlme_obj *vdev_mlme,
+				uint16_t event_data_len, void *event_data);
 
 };
 

+ 5 - 0
umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c

@@ -1073,6 +1073,11 @@ static bool mlme_vdev_subst_start_disconn_progress_event(void *ctx,
 		status = true;
 		break;
 
+	case WLAN_VDEV_SM_EV_DOWN:
+		mlme_vdev_sta_disconn_start(vdev_mlme, event_data_len,
+					    event_data);
+		status = true;
+		break;
 	default:
 		status = false;
 		break;

+ 24 - 0
umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h

@@ -290,6 +290,30 @@ static inline QDF_STATUS mlme_vdev_sta_conn_start(
 	return ret;
 }
 
+/**
+ * mlme_vdev_sta_disconn_start - Invoke Station VDEV disconnection
+ * @vdev_mlme_obj:  VDEV MLME comp object
+ * @event_data_len: data size
+ * @event_data: event data
+ *
+ * API invokes connection SM to start station disconnection
+ *
+ * Return: SUCCESS on successful invocation of disconnection sm
+ *         FAILURE, if it fails due to any
+ */
+static inline QDF_STATUS mlme_vdev_sta_disconn_start(
+				struct vdev_mlme_obj *vdev_mlme,
+				uint16_t event_data_len, void *event_data)
+{
+	QDF_STATUS ret = QDF_STATUS_SUCCESS;
+
+	if ((vdev_mlme->ops) && vdev_mlme->ops->mlme_vdev_sta_disconn_start)
+		ret = vdev_mlme->ops->mlme_vdev_sta_disconn_start(
+					vdev_mlme, event_data_len, event_data);
+
+	return ret;
+}
+
 /**
  * mlme_vdev_up_send - VDEV up operation
  * @vdev_mlme_obj:  VDEV MLME comp object