qcacld-3.0: Check peer broadcast TWT capability
Currently, for Broadcast TWT setup command, if peer does not support TWT responder capability and supports broadcast TWT capability then host rejects broadcast twt setup command based on TWT responder capability. Add condition to check the peer broadcast capabilities before sending broadcast TWT setup request to firmware. Change-Id: Iaa8941424d948d501655859564669baff4af9e69 CRs-Fixed: 3092276
Dieser Commit ist enthalten in:

committet von
Madan Koyyalamudi

Ursprung
97cbc4f4ff
Commit
1a6c49978e
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -383,6 +383,16 @@ uint8_t ucfg_mlme_get_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc,
|
||||
return mlme_get_twt_peer_capabilities(psoc, peer_mac);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_twt_peer_bcast_capabilities() - Get peer broadcast capabilities
|
||||
* @psoc: Pointer to global psoc object
|
||||
* @peer_mac: Pointer to peer mac address
|
||||
*
|
||||
* Return: Return True if peer responder capabilities support else False
|
||||
*/
|
||||
bool ucfg_mlme_get_twt_peer_bcast_capabilities(struct wlan_objmgr_psoc *psoc,
|
||||
struct qdf_mac_addr *peer_mac);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_twt_peer_responder_capabilities() - Get peer responder
|
||||
* capabilities
|
||||
@@ -691,6 +701,13 @@ uint8_t ucfg_mlme_get_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
bool ucfg_mlme_get_twt_peer_bcast_capabilities(struct wlan_objmgr_psoc *psoc,
|
||||
struct qdf_mac_addr *peer_mac)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline
|
||||
bool ucfg_mlme_get_twt_peer_responder_capabilities(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -260,6 +260,19 @@ ucfg_mlme_set_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool ucfg_mlme_get_twt_peer_bcast_capabilities(struct wlan_objmgr_psoc *psoc,
|
||||
struct qdf_mac_addr *peer_mac)
|
||||
{
|
||||
uint8_t peer_cap;
|
||||
|
||||
peer_cap = mlme_get_twt_peer_capabilities(psoc, peer_mac);
|
||||
|
||||
if (peer_cap & WLAN_TWT_CAPA_BROADCAST)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ucfg_mlme_get_twt_peer_responder_capabilities(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct qdf_mac_addr *peer_mac)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -1858,17 +1858,23 @@ static int hdd_twt_setup_session(struct hdd_adapter *adapter,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!ucfg_mlme_get_twt_peer_responder_capabilities(
|
||||
ret = hdd_twt_get_add_dialog_values(tb2, ¶ms);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (params.flag_bcast && !ucfg_mlme_get_twt_peer_bcast_capabilities(
|
||||
adapter->hdd_ctx->psoc,
|
||||
&hdd_sta_ctx->conn_info.bssid)) {
|
||||
hdd_err_rl("TWT setup reject: TWT Broadcast not supported");
|
||||
return -EOPNOTSUPP;
|
||||
} else if (!params.flag_bcast &&
|
||||
!ucfg_mlme_get_twt_peer_responder_capabilities(
|
||||
adapter->hdd_ctx->psoc,
|
||||
&hdd_sta_ctx->conn_info.bssid)) {
|
||||
hdd_err_rl("TWT setup reject: TWT responder not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
ret = hdd_twt_get_add_dialog_values(tb2, ¶ms);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ucfg_mlme_get_twt_congestion_timeout(adapter->hdd_ctx->psoc,
|
||||
&congestion_timeout);
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren