qcacld-3.0: Add support to handle disconnect ind via CM

Host add support to handle disconnect indication from connection
manager.

Change-Id: I824afebc2ac919e3c85d9abca3cc343160c2a95e
CRs-Fixed: 2842187
Esse commit está contido em:
Abhishek Ambure
2020-12-16 00:25:01 +05:30
commit de snandini
commit 65fc8b763b
3 arquivos alterados com 178 adições e 5 exclusões

Ver arquivo

@@ -49,6 +49,31 @@ struct cm_vdev_join_req {
struct scan_cache_entry *entry;
};
/**
* struct wlan_cm_discon_ind - disconnect ind from VDEV mgr and will be sent to
* SME
* @vdev_id: vdev id
* @source: source of disconnection
* @reason_code: reason of disconnection
* @bssid: BSSID of AP
*/
struct wlan_cm_discon_ind {
uint8_t vdev_id;
enum wlan_cm_source source;
enum wlan_reason_code reason_code;
struct qdf_mac_addr bssid;
};
/**
* struct cm_vdev_discon_ind - disconnect ind from vdev mgr to connection mgr
* @psoc: psoc object
* @disconnect_param: DisConnect indication to be sent to CM
*/
struct cm_vdev_discon_ind {
struct wlan_objmgr_psoc *psoc;
struct wlan_cm_discon_ind disconnect_param;
};
/**
* struct cm_vdev_join_rsp - connect rsp from vdev mgr to connection mgr
* @psoc: psoc object
@@ -184,6 +209,16 @@ QDF_STATUS cm_process_peer_create(struct scheduler_msg *msg);
*/
QDF_STATUS cm_process_disconnect_req(struct scheduler_msg *msg);
/**
* cm_disconnect_indication() - Process vdev discon ind and send to CM
* @msg: scheduler message
*
* Process disconnect indication and send it to CM SM.
*
* Return: QDF_STATUS
*/
QDF_STATUS cm_disconnect_indication(struct scheduler_msg *msg);
/**
* wlan_cm_send_connect_rsp() - Process vdev join rsp and send to CM
* @msg: scheduler message

Ver arquivo

@@ -21,6 +21,7 @@
#include "wlan_cm_vdev_api.h"
#include "wlan_mlme_main.h"
#include "wlan_cm_api.h"
QDF_STATUS
cm_handle_disconnect_req(struct wlan_objmgr_vdev *vdev,
@@ -74,3 +75,33 @@ QDF_STATUS cm_send_vdev_down_req(struct wlan_objmgr_vdev *vdev)
WLAN_VDEV_SM_EV_MLME_DOWN_REQ,
sizeof(*resp), resp);
}
QDF_STATUS cm_disconnect_indication(struct scheduler_msg *msg)
{
struct cm_vdev_discon_ind *ind;
struct wlan_objmgr_vdev *vdev;
QDF_STATUS status;
if (!msg || !msg->bodyptr)
return QDF_STATUS_E_FAILURE;
ind = msg->bodyptr;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(
ind->psoc, ind->disconnect_param.vdev_id,
WLAN_MLME_CM_ID);
if (!vdev) {
mlme_err("vdev_id: %d : vdev not found",
ind->disconnect_param.vdev_id);
qdf_mem_free(ind);
return QDF_STATUS_E_INVAL;
}
status = wlan_cm_disconnect(vdev, ind->disconnect_param.source,
ind->disconnect_param.reason_code,
&ind->disconnect_param.bssid);
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
qdf_mem_free(ind);
return status;
}