qcacmn: FW Link switch request event handler and cnf resp

Once the FW sends the link switch request to host handle
the request from scheduler thread and send confirmation
back on completion of link switch process with status of
link switch (success/failure).

Add new serialization command type for link switch.

Introduce flags to get the current state of link switch
request, set the state to idle when no link switch in
progress or once the current link switch is completed.
Access to state is protected with MLO dev context lock.
Implement various helper API to:
    a) Transition link switch to next state.
    b) Get current state of link switch.
    c) To check whether any link switch is in progress.
    c) To check whether link switch is happening
       on assoc VDEV or not.

Introduce a new VDEV flag to suggest the VDEV is in
link switch process and also implement helper APIs to
set/get/clear this VDEV flag.
   a) The flag is set at start of link switch, once
      the FW request params are validated and before
      proceeding for link switch disconnect on VDEV.
   b) Clear the flag once the Link switch confirmation
      is sent to FW.

Validate the link switch request params:
     a) IEEE link ID's received.
     b) Check if new connection is part of MLO connection.
     c) Check if VDEV is MLO STA VDEV or not.
     d) Is VDEV in connected state or not, that means
        VDEV is not in transitioning state due to disconnect.
     e) Check if any link switch in progress on this MLD
     f) Current link ID of VDEV equals the FW params.

If validation is successful, serialize the link switch
command and in the serialization activation start the
actual link switch process.

Change-Id: Ie582650541054c8cf39aaa8316e86a7a40256a15
CRs-Fixed: 3556422
这个提交包含在:
Vinod Kumar Pirla
2023-07-06 03:33:50 -07:00
提交者 Rahul Choudhary
父节点 10448e6108
当前提交 af6cf93a07
修改 13 个文件,包含 970 行新增16 行删除

查看文件

@@ -204,6 +204,47 @@ QDF_STATUS wmi_extract_mlo_link_state_info_event(
void *evt_buf,
struct ml_link_state_info_event *params);
#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
/**
* wmi_send_mlo_link_switch_req_cnf_cmd() - Send WMI command to FW on
* status of Link switch request received.
* @wmi: wmi handle
* @params: Params to send to FW.
*
* Return: QDF_STATUS.
*/
QDF_STATUS
wmi_send_mlo_link_switch_req_cnf_cmd(wmi_unified_t wmi,
struct wlan_mlo_link_switch_cnf *params);
/**
* wmi_extract_mlo_link_switch_request_evt() - Extract fixed params TLV
* from the MLO link switch request WMI event.
* @wmi: wmi handle
* @buf: pointer to event buffer
* @req: MLO link switch request event params.
*
* Return: QDF_STATUS
*/
QDF_STATUS
wmi_extract_mlo_link_switch_request_evt(struct wmi_unified *wmi, void *buf,
struct wlan_mlo_link_switch_req *req);
#else
static inline QDF_STATUS
wmi_send_mlo_link_switch_req_cnf_cmd(wmi_unified_t wmi,
struct wlan_mlo_link_switch_cnf *params)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
wmi_extract_mlo_link_switch_request_evt(struct wmi_unified *wmi, void *buf,
struct wlan_mlo_link_switch_req *req)
{
return QDF_STATUS_SUCCESS;
}
#endif
/**
* wmi_extract_mlo_link_disable_request_evt() - Extract fixed parameters TLV
* from the MLO link disable request WMI event