qcacld-3.0: Handle disable EHT flag in connect request
If user sets flag ASSOC_REQ_DISABLE_EHT in connect request, driver will send action oui "ffffff 00 01" to host mlme and also firmware for action id ACTION_OUI_11BE_OUI_ALLOW, so that all the AP will be not matched with this OUI and 802.11be mode will not be allowed, possibly downgrade to 11ax will happen. If user doesn't set ASSOC_REQ_DISABLE_EHT, driver/firmware will recover to default oui setting. Change-Id: I9eab732f1bd29018d44b215c1d6c9bfac9dafe95 CRs-Fixed: 3314489
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f0287ac02a
commit
77d14af550
@@ -105,6 +105,37 @@ bool wlan_action_oui_search(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
bool wlan_action_oui_is_empty(struct wlan_objmgr_psoc *psoc,
|
||||
enum action_oui_id action_id);
|
||||
|
||||
/**
|
||||
* wlan_action_oui_cleanup() - Remove all of existing oui entry.
|
||||
* @psoc: objmgr psoc object
|
||||
* @action_id: type of action to be removed
|
||||
*
|
||||
* This is a wrapper function which invokes internal function to remove
|
||||
* all of existing oui entry.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS If remove is successful.
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_action_oui_cleanup(struct action_oui_psoc_priv *psoc_priv,
|
||||
enum action_oui_id action_id);
|
||||
|
||||
/**
|
||||
* action_oui_psoc_disable() - Notify action OUI psoc enable
|
||||
* @psoc: objmgr psoc object
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void action_oui_psoc_enable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* action_oui_psoc_disable() - Notify action OUI psoc disable
|
||||
* @psoc: objmgr psoc object
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void action_oui_psoc_disable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#else
|
||||
static inline
|
||||
bool wlan_action_oui_search(struct wlan_objmgr_psoc *psoc,
|
||||
@@ -120,5 +151,23 @@ bool wlan_action_oui_is_empty(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
wlan_action_oui_cleanup(struct action_oui_psoc_priv *psoc_priv,
|
||||
enum action_oui_id action_id)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
void action_oui_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void action_oui_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* end of _WLAN_ACTION_OUI_MAIN_H_ */
|
||||
|
@@ -149,19 +149,8 @@ action_oui_psoc_create_notification(struct wlan_objmgr_psoc *psoc, void *arg)
|
||||
target_if_action_oui_register_tx_ops(&psoc_priv->tx_ops);
|
||||
psoc_priv->psoc = psoc;
|
||||
|
||||
status = action_oui_allocate(psoc_priv);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
action_oui_err("Failed to alloc action_oui");
|
||||
goto detach_psoc_priv;
|
||||
}
|
||||
|
||||
action_oui_debug("psoc priv attached");
|
||||
goto exit;
|
||||
|
||||
detach_psoc_priv:
|
||||
wlan_objmgr_psoc_component_obj_detach(psoc,
|
||||
WLAN_UMAC_COMP_ACTION_OUI,
|
||||
(void *)psoc_priv);
|
||||
free_psoc_priv:
|
||||
qdf_mem_free(psoc_priv);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
@@ -190,7 +179,6 @@ action_oui_psoc_destroy_notification(struct wlan_objmgr_psoc *psoc, void *arg)
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
action_oui_err("Failed to detach priv with psoc");
|
||||
|
||||
action_oui_destroy(psoc_priv);
|
||||
qdf_mem_free(psoc_priv);
|
||||
|
||||
exit:
|
||||
@@ -198,6 +186,45 @@ exit:
|
||||
return status;
|
||||
}
|
||||
|
||||
void action_oui_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct action_oui_psoc_priv *psoc_priv;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
ACTION_OUI_ENTER();
|
||||
|
||||
psoc_priv = action_oui_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
action_oui_err("psoc priv is NULL");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
status = action_oui_allocate(psoc_priv);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
action_oui_err("Failed to alloc action_oui");
|
||||
goto exit;
|
||||
}
|
||||
exit:
|
||||
ACTION_OUI_EXIT();
|
||||
}
|
||||
|
||||
void action_oui_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct action_oui_psoc_priv *psoc_priv;
|
||||
|
||||
ACTION_OUI_ENTER();
|
||||
|
||||
psoc_priv = action_oui_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
action_oui_err("psoc priv is NULL");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
action_oui_destroy(psoc_priv);
|
||||
exit:
|
||||
ACTION_OUI_EXIT();
|
||||
}
|
||||
|
||||
bool wlan_action_oui_search(struct wlan_objmgr_psoc *psoc,
|
||||
struct action_oui_search_attr *attr,
|
||||
enum action_oui_id action_id)
|
||||
@@ -224,10 +251,51 @@ bool wlan_action_oui_search(struct wlan_objmgr_psoc *psoc,
|
||||
found = action_oui_search(psoc_priv, attr, action_id);
|
||||
|
||||
exit:
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_action_oui_cleanup(struct action_oui_psoc_priv *psoc_priv,
|
||||
enum action_oui_id action_id)
|
||||
{
|
||||
struct action_oui_priv *oui_priv;
|
||||
struct action_oui_extension_priv *ext_priv;
|
||||
qdf_list_t *ext_list;
|
||||
QDF_STATUS status;
|
||||
qdf_list_node_t *node = NULL;
|
||||
|
||||
if (action_id >= ACTION_OUI_MAXIMUM_ID)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
oui_priv = psoc_priv->oui_priv[action_id];
|
||||
if (!oui_priv)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
ext_list = &oui_priv->extension_list;
|
||||
qdf_mutex_acquire(&oui_priv->extension_lock);
|
||||
while (!qdf_list_empty(ext_list)) {
|
||||
status = qdf_list_remove_front(ext_list, &node);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
action_oui_err("Invalid delete in action: %u",
|
||||
oui_priv->id);
|
||||
break;
|
||||
}
|
||||
ext_priv = qdf_container_of(
|
||||
node,
|
||||
struct action_oui_extension_priv,
|
||||
item);
|
||||
qdf_mem_free(ext_priv);
|
||||
ext_priv = NULL;
|
||||
if (psoc_priv->total_extensions)
|
||||
psoc_priv->total_extensions--;
|
||||
else
|
||||
action_oui_err("unexpected total_extensions 0");
|
||||
}
|
||||
qdf_mutex_release(&oui_priv->extension_lock);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool wlan_action_oui_is_empty(struct wlan_objmgr_psoc *psoc,
|
||||
enum action_oui_id action_id)
|
||||
{
|
||||
|
@@ -689,10 +689,6 @@ QDF_STATUS action_oui_send(struct action_oui_psoc_priv *psoc_priv,
|
||||
|
||||
extension_list = &oui_priv->extension_list;
|
||||
qdf_mutex_acquire(&oui_priv->extension_lock);
|
||||
if (qdf_list_empty(extension_list)) {
|
||||
qdf_mutex_release(&oui_priv->extension_lock);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
no_oui_extensions = qdf_list_size(extension_list);
|
||||
len = sizeof(*req) + no_oui_extensions * sizeof(*extension);
|
||||
|
@@ -80,6 +80,9 @@
|
||||
#define ACTION_CAPABILITY_5G_BAND_MASK 0x80
|
||||
#define ACTION_CAPABILITY_5G_BAND_OFFSET 7
|
||||
|
||||
/* Invalid OUI ID action */
|
||||
#define ACTION_OUI_INVALID "ffffff 00 01"
|
||||
|
||||
/**
|
||||
* enum action_oui_id - to identify type of action oui
|
||||
* @ACTION_OUI_CONNECT_1X1: for 1x1 connection only
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 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
|
||||
@@ -52,6 +53,22 @@ QDF_STATUS ucfg_action_oui_init(void);
|
||||
*/
|
||||
void ucfg_action_oui_deinit(void);
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_psoc_enable() - Notify action oui psoc enable
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_action_oui_psoc_enable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_psoc_disable() - Notify action oui psoc disable
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_action_oui_psoc_disable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_parse() - Parse input string and extract extensions.
|
||||
* @psoc: objmgr psoc object
|
||||
@@ -108,6 +125,33 @@ bool ucfg_action_oui_search(struct wlan_objmgr_psoc *psoc,
|
||||
struct action_oui_search_attr *attr,
|
||||
enum action_oui_id action_id);
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_cleanup() - Remove all in existing oui entry.
|
||||
* @psoc: objmgr psoc object
|
||||
* @action_id: type of action to be removed
|
||||
*
|
||||
* This is a wrapper function which invokes internal function to remove
|
||||
* all the existing oui entry.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS If remove is successful.
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_action_oui_cleanup(struct wlan_objmgr_psoc *psoc,
|
||||
enum action_oui_id action_id);
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_send_by_id() - Send action oui for action id
|
||||
* @psoc: objmgr psoc object
|
||||
* @id: type of action to be sent
|
||||
*
|
||||
* This is a wrapper function which invokes internal function to send
|
||||
* action oui entry to firmware.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS If sending is successful.
|
||||
*/
|
||||
|
||||
QDF_STATUS ucfg_action_oui_send_by_id(struct wlan_objmgr_psoc *psoc,
|
||||
enum action_oui_id id);
|
||||
#else
|
||||
|
||||
/**
|
||||
@@ -138,6 +182,28 @@ void ucfg_action_oui_deinit(void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_psoc_enable() - Notify action oui psoc enable
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline
|
||||
void ucfg_action_oui_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_psoc_disable() - Notify action oui psoc disable
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline
|
||||
void ucfg_action_oui_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_parse() - Parse input string of action_id specified.
|
||||
* @psoc: objmgr psoc object
|
||||
@@ -205,6 +271,40 @@ bool ucfg_action_oui_search(struct wlan_objmgr_psoc *psoc,
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_cleanup() - Remove all of existing oui entry
|
||||
* @psoc: objmgr psoc object
|
||||
* @action_id: type of action to be removed
|
||||
*
|
||||
* This is a wrapper function which invokes internal function to remove
|
||||
* all the existing oui entry.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS If remove is successful.
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS
|
||||
ucfg_action_oui_cleanup(struct wlan_objmgr_psoc *psoc,
|
||||
enum action_oui_id action_id)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_action_oui_send_by_id() - Send action oui for action id
|
||||
* @psoc: objmgr psoc object
|
||||
* @id: type of action to be sent
|
||||
*
|
||||
* This is a wrapper function which invokes internal function to send
|
||||
* action oui entry to firmware.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS If sending is successful.
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_action_oui_send_by_id(struct wlan_objmgr_psoc *psoc,
|
||||
enum action_oui_id id)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_ACTION_OUI */
|
||||
|
||||
#endif /* _WLAN_ACTION_OUI_UCFG_API_H_ */
|
||||
|
@@ -80,6 +80,16 @@ void ucfg_action_oui_deinit(void)
|
||||
ACTION_OUI_EXIT();
|
||||
}
|
||||
|
||||
void ucfg_action_oui_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
action_oui_psoc_enable(psoc);
|
||||
}
|
||||
|
||||
void ucfg_action_oui_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
action_oui_psoc_disable(psoc);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_action_oui_parse(struct wlan_objmgr_psoc *psoc,
|
||||
const uint8_t *in_str,
|
||||
@@ -134,6 +144,37 @@ exit:
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_action_oui_cleanup(struct wlan_objmgr_psoc *psoc,
|
||||
enum action_oui_id action_id)
|
||||
{
|
||||
struct action_oui_psoc_priv *psoc_priv;
|
||||
QDF_STATUS status = QDF_STATUS_E_INVAL;
|
||||
|
||||
ACTION_OUI_ENTER();
|
||||
|
||||
if (action_id >= ACTION_OUI_MAXIMUM_ID) {
|
||||
action_oui_err("Invalid action_oui id: %u", action_id);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!psoc) {
|
||||
action_oui_err("psoc is NULL");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psoc_priv = action_oui_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
action_oui_err("psoc priv is NULL");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
status = wlan_action_oui_cleanup(psoc_priv, action_id);
|
||||
exit:
|
||||
ACTION_OUI_EXIT();
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_action_oui_send(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct action_oui_psoc_priv *psoc_priv;
|
||||
@@ -160,6 +201,39 @@ QDF_STATUS ucfg_action_oui_send(struct wlan_objmgr_psoc *psoc)
|
||||
}
|
||||
|
||||
exit:
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_action_oui_send_by_id(struct wlan_objmgr_psoc *psoc,
|
||||
enum action_oui_id id)
|
||||
{
|
||||
struct action_oui_psoc_priv *psoc_priv;
|
||||
QDF_STATUS status = QDF_STATUS_E_INVAL;
|
||||
|
||||
ACTION_OUI_ENTER();
|
||||
|
||||
if (!psoc) {
|
||||
action_oui_err("psoc is NULL");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psoc_priv = action_oui_psoc_get_priv(psoc);
|
||||
if (!psoc_priv) {
|
||||
action_oui_err("psoc priv is NULL");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (id >= ACTION_OUI_HOST_ONLY) {
|
||||
action_oui_err("id %d not for firmware", id);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
status = action_oui_send(psoc_priv, id);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
action_oui_debug("Failed to send: %u", id);
|
||||
exit:
|
||||
ACTION_OUI_EXIT();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@@ -1052,6 +1052,24 @@ QDF_STATUS mlme_update_tgt_eht_caps_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
enum phy_ch_width wlan_mlme_convert_eht_op_bw_to_phy_ch_width(
|
||||
uint8_t channel_width);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_usr_disable_sta_eht() - Get user disable sta eht flag
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: true if user has disabled eht in connect request
|
||||
*/
|
||||
bool wlan_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* wlan_mlme_set_usr_disable_sta_eht() - Set user disable sta eht flag
|
||||
* @psoc: psoc object
|
||||
* @disable: eht disable flag
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void wlan_mlme_set_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc,
|
||||
bool disable);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -1672,6 +1672,7 @@ enum station_prefer_bw {
|
||||
* @mlo_support_link_num: max number of links that sta mlo supports
|
||||
* @mlo_support_link_band: band bitmap that sta mlo supports
|
||||
* @mlo_max_simultaneous_links number of simultaneous links
|
||||
* @usr_disable_eht user disable the eht for STA
|
||||
*/
|
||||
struct wlan_mlme_sta_cfg {
|
||||
uint32_t sta_keep_alive_period;
|
||||
@@ -1704,6 +1705,9 @@ struct wlan_mlme_sta_cfg {
|
||||
uint8_t mlo_support_link_band;
|
||||
uint8_t mlo_max_simultaneous_links;
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
bool usr_disable_eht;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -3557,6 +3557,44 @@ ucfg_mlme_update_tgt_eht_cap(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return mlme_update_tgt_eht_caps_in_cfg(psoc, cfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_usr_disable_sta_eht() - Get user disable sta eht flag
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: true if user has disabled eht in connect request
|
||||
*/
|
||||
static inline
|
||||
bool ucfg_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return wlan_mlme_get_usr_disable_sta_eht(psoc);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_usr_disable_sta_eht() - Set user disable sta eht flag
|
||||
* @psoc: psoc object
|
||||
* @disable: eht disable flag
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline
|
||||
void ucfg_mlme_set_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc,
|
||||
bool disable)
|
||||
{
|
||||
wlan_mlme_set_usr_disable_sta_eht(psoc, disable);
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
bool ucfg_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline
|
||||
void ucfg_mlme_set_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc,
|
||||
bool disable)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -1128,6 +1128,30 @@ enum phy_ch_width wlan_mlme_convert_eht_op_bw_to_phy_ch_width(
|
||||
|
||||
return phy_bw;
|
||||
}
|
||||
|
||||
bool wlan_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
|
||||
if (!mlme_obj)
|
||||
return true;
|
||||
|
||||
return mlme_obj->cfg.sta.usr_disable_eht;
|
||||
}
|
||||
|
||||
void wlan_mlme_set_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc,
|
||||
bool disable)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
|
||||
if (!mlme_obj)
|
||||
return;
|
||||
|
||||
mlme_debug("set usr_disable_eht from %d to %d",
|
||||
mlme_obj->cfg.sta.usr_disable_eht, disable);
|
||||
mlme_obj->cfg.sta.usr_disable_eht = disable;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
|
@@ -55,6 +55,7 @@
|
||||
#include "wlan_osif_request_manager.h"
|
||||
#include <wlan_dp_ucfg_api.h>
|
||||
#include "wlan_psoc_mlme_ucfg_api.h"
|
||||
#include "wlan_action_oui_ucfg_api.h"
|
||||
|
||||
bool hdd_cm_is_vdev_associated(struct hdd_adapter *adapter)
|
||||
{
|
||||
@@ -343,6 +344,99 @@ static void hdd_update_scan_ie_for_connect(struct hdd_adapter *adapter,
|
||||
}
|
||||
}
|
||||
|
||||
#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)) || \
|
||||
defined(CFG80211_11BE_BASIC)) && \
|
||||
defined(WLAN_FEATURE_11BE)
|
||||
/**
|
||||
* hdd_update_action_oui_for_connect() - Update Action OUI for 802.11be AP
|
||||
* @hdd_ctx: hdd context
|
||||
* @req: connect request parameter
|
||||
*
|
||||
* If user sets flag ASSOC_REQ_DISABLE_EHT in connect request, driver
|
||||
* will send action oui "ffffff 00 01" to host mlme and also firmware
|
||||
* for action id ACTION_OUI_11BE_OUI_ALLOW, so that all the AP will
|
||||
* be not matched with this OUI and 802.11be mode will not be allowed,
|
||||
* possibly downgrade to 11ax will happen.
|
||||
* If user doesn't set ASSOC_REQ_DISABLE_EHT, driver/firmware will
|
||||
* recover to default INI setting.
|
||||
*
|
||||
* Returns: void
|
||||
*/
|
||||
static void
|
||||
hdd_update_action_oui_for_connect(struct hdd_context *hdd_ctx,
|
||||
struct cfg80211_connect_params *req)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint8_t *str;
|
||||
bool usr_disable_eht;
|
||||
|
||||
if (!hdd_ctx->config->action_oui_enable)
|
||||
return;
|
||||
|
||||
usr_disable_eht = ucfg_mlme_get_usr_disable_sta_eht(hdd_ctx->psoc);
|
||||
if (req->flags & ASSOC_REQ_DISABLE_EHT) {
|
||||
if (usr_disable_eht) {
|
||||
hdd_debug("user eht is disabled already");
|
||||
return;
|
||||
}
|
||||
status = ucfg_action_oui_cleanup(
|
||||
hdd_ctx->psoc, ACTION_OUI_11BE_OUI_ALLOW);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("Failed to cleanup oui id %d",
|
||||
ACTION_OUI_11BE_OUI_ALLOW);
|
||||
return;
|
||||
}
|
||||
status = ucfg_action_oui_parse(hdd_ctx->psoc,
|
||||
ACTION_OUI_INVALID,
|
||||
ACTION_OUI_11BE_OUI_ALLOW);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("Failed to parse action_oui str for id %d",
|
||||
ACTION_OUI_11BE_OUI_ALLOW);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!usr_disable_eht) {
|
||||
hdd_debug("user eht is enabled already");
|
||||
return;
|
||||
}
|
||||
status = ucfg_action_oui_cleanup(hdd_ctx->psoc,
|
||||
ACTION_OUI_11BE_OUI_ALLOW);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("Failed to cleanup oui id %d",
|
||||
ACTION_OUI_11BE_OUI_ALLOW);
|
||||
return;
|
||||
}
|
||||
str =
|
||||
hdd_ctx->config->action_oui_str[ACTION_OUI_11BE_OUI_ALLOW];
|
||||
if (!qdf_str_len(str))
|
||||
goto send_oui;
|
||||
|
||||
status = ucfg_action_oui_parse(hdd_ctx->psoc,
|
||||
str, ACTION_OUI_11BE_OUI_ALLOW);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("Failed to parse action_oui str for id %d",
|
||||
ACTION_OUI_11BE_OUI_ALLOW);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
send_oui:
|
||||
status = ucfg_action_oui_send_by_id(hdd_ctx->psoc,
|
||||
ACTION_OUI_11BE_OUI_ALLOW);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("Failed to send oui id %d", ACTION_OUI_11BE_OUI_ALLOW);
|
||||
return;
|
||||
}
|
||||
ucfg_mlme_set_usr_disable_sta_eht(hdd_ctx->psoc, !usr_disable_eht);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
hdd_update_action_oui_for_connect(struct hdd_context *hdd_ctx,
|
||||
struct cfg80211_connect_params *req)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_get_dot11mode_filter() - Get dot11 mode filter
|
||||
* @hdd_ctx: HDD context
|
||||
@@ -624,6 +718,7 @@ int wlan_hdd_cm_connect(struct wiphy *wiphy,
|
||||
params.dot11mode_filter = hdd_get_dot11mode_filter(hdd_ctx);
|
||||
|
||||
hdd_update_scan_ie_for_connect(adapter, ¶ms);
|
||||
hdd_update_action_oui_for_connect(hdd_ctx, req);
|
||||
|
||||
wlan_hdd_connectivity_event_connecting(hdd_ctx, req, adapter->vdev_id);
|
||||
status = osif_cm_connect(ndev, vdev, req, ¶ms);
|
||||
|
@@ -14560,6 +14560,7 @@ static void hdd_action_oui_send(struct hdd_context *hdd_ctx)
|
||||
status = ucfg_action_oui_send(hdd_ctx->psoc);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("Failed to send one or all action_ouis");
|
||||
ucfg_mlme_set_usr_disable_sta_eht(hdd_ctx->psoc, false);
|
||||
}
|
||||
|
||||
static void hdd_hastings_bt_war_initialize(struct hdd_context *hdd_ctx)
|
||||
@@ -14598,7 +14599,6 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
|
||||
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
|
||||
hdd_action_oui_send(hdd_ctx);
|
||||
status = ucfg_policy_mgr_get_force_1x1(hdd_ctx->psoc, &is_force_1x1);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
hdd_err("Failed to get force 1x1 value");
|
||||
@@ -14751,6 +14751,8 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
|
||||
hdd_debug("Failed to register mode change cb with Policy Manager");
|
||||
goto cds_disable;
|
||||
}
|
||||
hdd_action_oui_config(hdd_ctx);
|
||||
hdd_action_oui_send(hdd_ctx);
|
||||
|
||||
if (hdd_green_ap_enable_egap(hdd_ctx))
|
||||
hdd_debug("enhance green ap is not enabled");
|
||||
@@ -15475,8 +15477,6 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx)
|
||||
|
||||
hdd_enter();
|
||||
|
||||
hdd_action_oui_config(hdd_ctx);
|
||||
|
||||
qdf_nbuf_init_replenish_timer();
|
||||
|
||||
status = wlan_hdd_cache_chann_mutex_create(hdd_ctx);
|
||||
@@ -17431,10 +17431,12 @@ void hdd_component_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
policy_mgr_psoc_enable(psoc);
|
||||
ucfg_tdls_psoc_enable(psoc);
|
||||
ucfg_fwol_psoc_enable(psoc);
|
||||
ucfg_action_oui_psoc_enable(psoc);
|
||||
}
|
||||
|
||||
void hdd_component_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
ucfg_action_oui_psoc_disable(psoc);
|
||||
ucfg_fwol_psoc_disable(psoc);
|
||||
ucfg_tdls_psoc_disable(psoc);
|
||||
policy_mgr_psoc_disable(psoc);
|
||||
|
Reference in New Issue
Block a user