qcacld-3.0: NDP wakelock in failure cases

Currently, wma_add_sta status is not considered while voting for
link up in case of NDI. But if wma_add_sta fails to add a peer,
this link vote leads to stale link vote up.
To fix this, consider the return status of wma_add_sta for
link vote up.

Change-Id: I71581f1caccf784567c7ba6f263b5d1658067aa9
CRs-Fixed: 3569182
Cette révision appartient à :
Rahul Gusain
2023-07-24 00:22:52 +05:30
révisé par Rahul Choudhary
Parent c3ce65c825
révision b55bf34e18
3 fichiers modifiés avec 8 ajouts et 7 suppressions

Voir le fichier

@@ -5612,7 +5612,7 @@ void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
wma_add_sta_req_ap_mode(wma, add_sta); wma_add_sta_req_ap_mode(wma, add_sta);
break; break;
case BSS_OPERATIONAL_MODE_NDI: case BSS_OPERATIONAL_MODE_NDI:
wma_add_sta_ndi_mode(wma, add_sta); status = wma_add_sta_ndi_mode(wma, add_sta);
break; break;
} }

Voir le fichier

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -35,7 +35,7 @@
#include "cdp_txrx_misc.h" #include "cdp_txrx_misc.h"
#include <cdp_txrx_handle.h> #include <cdp_txrx_handle.h>
void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta) QDF_STATUS wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
{ {
enum ol_txrx_peer_state state = OL_TXRX_PEER_STATE_CONN; enum ol_txrx_peer_state state = OL_TXRX_PEER_STATE_CONN;
uint8_t pdev_id = WMI_PDEV_ID_SOC; uint8_t pdev_id = WMI_PDEV_ID_SOC;
@@ -96,12 +96,13 @@ void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
add_sta->nss = iface->nss; add_sta->nss = iface->nss;
add_sta->status = QDF_STATUS_SUCCESS; add_sta->status = QDF_STATUS_SUCCESS;
send_rsp: send_rsp:
status = add_sta->status;
wma_debug("Sending add sta rsp to umac (mac:"QDF_MAC_ADDR_FMT", status:%d)", wma_debug("Sending add sta rsp to umac (mac:"QDF_MAC_ADDR_FMT", status:%d)",
QDF_MAC_ADDR_REF(add_sta->staMac), add_sta->status); QDF_MAC_ADDR_REF(add_sta->staMac), add_sta->status);
wma_send_msg_high_priority(wma, WMA_ADD_STA_RSP, (void *)add_sta, 0); wma_send_msg_high_priority(wma, WMA_ADD_STA_RSP, (void *)add_sta, 0);
return; return status;
} }
QDF_STATUS wma_delete_sta_req_ndi_mode(tp_wma_handle wma, QDF_STATUS wma_delete_sta_req_ndi_mode(tp_wma_handle wma,

Voir le fichier

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -53,9 +53,9 @@ static inline uint32_t wma_ndp_get_eventid_from_tlvtag(uint32_t tag)
* @add_sta: Parameters of ADD_STA command * @add_sta: Parameters of ADD_STA command
* *
* Sends CREATE_PEER command to firmware * Sends CREATE_PEER command to firmware
* Return: none * Return: QDF status
*/ */
void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta); QDF_STATUS wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta);
/** /**
* wma_update_hdd_cfg_ndp() - Update target device NAN datapath capability * wma_update_hdd_cfg_ndp() - Update target device NAN datapath capability