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
This commit is contained in:

committed by
Rahul Choudhary

parent
5910af22bd
commit
d04b17ae71
@@ -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);
|
||||
|
Reference in New Issue
Block a user