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
このコミットが含まれているのは:
Liangwei Dong
2022-10-18 12:09:24 +08:00
committed by Madan Koyyalamudi
コミット 77d14af550
12個のファイルの変更491行の追加20行の削除

ファイルの表示

@@ -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;
}