diff --git a/components/action_oui/core/src/wlan_action_oui_parse.c b/components/action_oui/core/src/wlan_action_oui_parse.c index cde32c756f..a8f16c84d1 100644 --- a/components/action_oui/core/src/wlan_action_oui_parse.c +++ b/components/action_oui/core/src/wlan_action_oui_parse.c @@ -298,7 +298,6 @@ validate_and_convert_info_mask(uint8_t *token, info_mask = hex_value; - info_mask |= ACTION_OUI_INFO_OUI; ext->info_mask = info_mask; if (!info_mask || !(info_mask & ~ACTION_OUI_INFO_OUI)) { @@ -311,6 +310,16 @@ validate_and_convert_info_mask(uint8_t *token, return false; } + /* + * If OUI bit is not set in the info presence, we need to ignore the + * OUI and OUI Data. Set OUI and OUI data length to 0 here. + */ + if (!(info_mask & ACTION_OUI_INFO_OUI)) { + ext->oui_length = 0; + ext->data_length = 0; + ext->data_mask_length = 0; + } + if (info_mask & ACTION_OUI_INFO_MAC_ADDRESS) { *action_token = ACTION_OUI_MAC_ADDR_TOKEN; return true; @@ -861,6 +870,7 @@ action_oui_search(struct action_oui_psoc_priv *psoc_priv, qdf_list_t *extension_list; QDF_STATUS qdf_status; const uint8_t *oui_ptr; + bool wildcard_oui = false; oui_priv = psoc_priv->oui_priv[action_id]; if (!oui_priv) { @@ -883,11 +893,22 @@ action_oui_search(struct action_oui_psoc_priv *psoc_priv, struct action_oui_extension_priv, item); extension = &priv_ext->extension; + + /* + * If a wildcard OUI bit is not set in the info_mask, proceed + * to other checks skipping the OUI and vendor data checks + */ + + if (!(extension->info_mask & ACTION_OUI_INFO_OUI)) { + action_oui_debug("Wildcard OUI found"); + wildcard_oui = true; + } + oui_ptr = wlan_get_vendor_ie_ptr_from_oui(extension->oui, extension->oui_length, attr->ie_data, attr->ie_length); - if (!oui_ptr) { + if (!oui_ptr && !wildcard_oui) { action_oui_debug("No matching IE found for OUI"); QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG, @@ -902,7 +923,7 @@ action_oui_search(struct action_oui_psoc_priv *psoc_priv, extension->oui, extension->oui_length); - if (extension->data_length && + if (extension->data_length && !wildcard_oui && !check_for_vendor_oui_data(extension, oui_ptr)) { action_oui_debug("Vendor IE Data mismatch"); goto next; @@ -932,6 +953,7 @@ next: node = next_node; next_node = NULL; + wildcard_oui = false; } qdf_mutex_release(&oui_priv->extension_lock); diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 71df56182e..290f8ca377 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -13465,6 +13465,9 @@ enum hdd_external_acs_policy { * * is mandatory and it can be either 3 or 5 bytes means 6 or 10 * hexa-decimal characters + * If the OUI and Data checks needs to be ignored, the oui FFFFFF + * needs to be provided as OUI and bit 0 of Info_Presence_Bit should + * be set to 0. * * is mandatory field and should give length of * the if present else zero @@ -13485,8 +13488,8 @@ enum hdd_external_acs_policy { * Presence of and is * controlled by which is mandatory * will give the information for - * OUI – bit 0 (set/reset don't effect the behaviour, - * always enabled in the code) + * OUI – bit 0 Should be set to 1 + * Setting to 0 will ignore OUI and data check * Mac Address present – bit 1 * NSS – bit 2 * HT check – bit 3