qcacld-3.0: Return status for GET_ML_LINK_STATE
This change is to return failure for get_ml_link_state in case of link_state_info_event_status not equal to zero. Change-Id: I9f896b5ea82a397409263811204ce7bbadbd165f CRs-Fixed: 3622712
This commit is contained in:

committed by
Rahul Choudhary

parent
6b9996a66c
commit
96b4d53d4b
@@ -764,6 +764,23 @@ hdd_ml_generate_link_state_resp_nlmsg(struct sk_buff *skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *link_state_status_id_to_str(uint32_t status)
|
||||
{
|
||||
switch (status) {
|
||||
case WLAN_LINK_INFO_EVENT_SUCCESS:
|
||||
return "LINK_INFO_EVENT_SUCCESS";
|
||||
case WLAN_LINK_INFO_EVENT_REJECT_FAILURE:
|
||||
return "LINK_INFO_EVENT_REJECT_FAILURE";
|
||||
case WLAN_LINK_INFO_EVENT_REJECT_VDEV_NOT_UP:
|
||||
return "LINK_INFO_EVENT_REJECT_VDEV_NOT_UP";
|
||||
case WLAN_LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS:
|
||||
return "LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS";
|
||||
case WLAN_LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION:
|
||||
return "LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION";
|
||||
}
|
||||
return "Undefined link state status ID";
|
||||
}
|
||||
|
||||
static QDF_STATUS wlan_hdd_link_state_request(struct wiphy *wiphy,
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
@@ -822,6 +839,12 @@ static QDF_STATUS wlan_hdd_link_state_request(struct wiphy *wiphy,
|
||||
link_state_event->num_mlo_vdev_link_info,
|
||||
QDF_MAC_ADDR_REF(link_state_event->mldaddr.bytes));
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(link_state_event->status)) {
|
||||
hdd_debug("ml_link_state_status failed %s",
|
||||
link_state_status_id_to_str(link_state_event->status));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
for (num_info = 0; num_info < link_state_event->num_mlo_vdev_link_info;
|
||||
num_info++) {
|
||||
hdd_debug("ml_link_state_resp: chan_freq %d vdev_id %d link_id %d link_status %d",
|
||||
|
Reference in New Issue
Block a user