qcacld-3.0: Iterate all links in hdd_is_any_interface_open()

Check the sme opened status of all links in adapter
to identify any open interface.

Change-Id: Ic49f375ff4eefae2a0da460aacd57bc8782ba06c
CRs-Fixed: 3524033
Šī revīzija ir iekļauta:
Vinod Kumar Pirla
2023-03-01 20:35:14 -08:00
revīziju iesūtīja Rahul Choudhary
vecāks 5910af22bd
revīzija d04b17ae71

Parādīt failu

@@ -9408,6 +9408,17 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
return QDF_STATUS_SUCCESS;
}
static bool hdd_is_any_link_opened(struct hdd_adapter *adapter)
{
struct wlan_hdd_link_info *link_info;
hdd_adapter_for_each_active_link_info(adapter, link_info) {
if (test_bit(SME_SESSION_OPENED, &link_info->link_flags))
return true;
}
return false;
}
bool hdd_is_any_interface_open(struct hdd_context *hdd_ctx)
{
struct hdd_adapter *adapter, *next_adapter = NULL;
@@ -9421,8 +9432,7 @@ bool hdd_is_any_interface_open(struct hdd_context *hdd_ctx)
hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter,
dbgid) {
if (test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags) ||
test_bit(SME_SESSION_OPENED,
&adapter->deflink->link_flags)) {
hdd_is_any_link_opened(adapter)) {
hdd_adapter_dev_put_debug(adapter, dbgid);
if (next_adapter)
hdd_adapter_dev_put_debug(next_adapter, dbgid);