qcacld-3.0: Support send BTM-REQ on SAP mode from driver

Filter out the BSS Transition Management Request frame
and allow it to be sent out from driver to firmware.

Change-Id: I6672c55421b0aa5cf186c82bec977848fdaddc2b
CRs-Fixed: 3154042
This commit is contained in:
Chaoli Zhou
2022-03-18 12:24:55 +08:00
committed by Madan Koyyalamudi
vanhempi 762c9528f0
commit c2fe56b756
2 muutettua tiedostoa jossa 32 lisäystä ja 12 poistoa

Näytä tiedosto

@@ -756,6 +756,8 @@ static char *p2p_get_frame_type_str(struct p2p_frame_info *frame_info)
return "GAS come back request";
case P2P_PUBLIC_ACTION_GAS_COMB_RSP:
return "GAS come back response";
case P2P_PUBLIC_ACTION_WNM_BTM_REQ:
return "BTM request";
default:
return "Other frame";
}
@@ -817,18 +819,32 @@ static QDF_STATUS p2p_get_frame_info(uint8_t *data_buf, uint32_t length,
return QDF_STATUS_SUCCESS;
buf += P2P_ACTION_OFFSET;
if (length > P2P_PUBLIC_ACTION_FRAME_TYPE_OFFSET &&
buf[0] == P2P_PUBLIC_ACTION_FRAME &&
buf[1] == P2P_PUBLIC_ACTION_VENDOR_SPECIFIC &&
!qdf_mem_cmp(&buf[2], P2P_OUI, P2P_OUI_SIZE)) {
buf = data_buf +
P2P_PUBLIC_ACTION_FRAME_TYPE_OFFSET;
action_type = buf[0];
if (action_type > P2P_PUBLIC_ACTION_PROV_DIS_RSP)
frame_info->public_action_type =
P2P_PUBLIC_ACTION_NOT_SUPPORT;
else
frame_info->public_action_type = action_type;
if (length > P2P_PUBLIC_ACTION_FRAME_TYPE_OFFSET) {
switch (buf[0]) {
case P2P_PUBLIC_ACTION_FRAME:
if (buf[1] == P2P_PUBLIC_ACTION_VENDOR_SPECIFIC &&
!qdf_mem_cmp(&buf[2], P2P_OUI, P2P_OUI_SIZE)) {
buf = data_buf +
P2P_PUBLIC_ACTION_FRAME_TYPE_OFFSET;
action_type = buf[0];
if (action_type > P2P_PUBLIC_ACTION_PROV_DIS_RSP)
frame_info->public_action_type =
P2P_PUBLIC_ACTION_NOT_SUPPORT;
else
frame_info->public_action_type =
action_type;
}
break;
case WNM_ACTION_FRAME:
if (buf[1] == WNM_BSS_TM_REQUEST) {
action_type = buf[0];
frame_info->public_action_type =
P2P_PUBLIC_ACTION_WNM_BTM_REQ;
}
break;
default:
break;
}
} else if (length > P2P_ACTION_FRAME_TYPE_OFFSET &&
buf[0] == P2P_ACTION_VENDOR_SPECIFIC_CATEGORY &&
!qdf_mem_cmp(&buf[1], P2P_OUI, P2P_OUI_SIZE)) {

Näytä tiedosto

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2019, 2021 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
@@ -33,6 +34,7 @@
#define P2P_MAC_MGMT_ACTION 0xD
#define P2P_PUBLIC_ACTION_VENDOR_SPECIFIC 0x9
#define P2P_NOA_ATTR 0xC
#define WNM_ACTION_FRAME 0xA
#define P2P_MAX_NOA_ATTR_LEN 31
#define P2P_IE_HEADER_LEN 6
@@ -110,6 +112,7 @@ enum p2p_frame_sub_type {
* @P2P_PUBLIC_ACTION_GAS_INIT_RSP: gas initial response
* @P2P_PUBLIC_ACTION_GAS_COMB_REQ: gas comeback request
* @P2P_PUBLIC_ACTION_GAS_COMB_RSP: gas comeback response
* @P2P_PUBLIC_ACTION_WNM_BTM_REQ: bss transition management request
* @P2P_PUBLIC_ACTION_NOT_SUPPORT: not support p2p public action frame
*/
enum p2p_public_action_type {
@@ -126,6 +129,7 @@ enum p2p_public_action_type {
P2P_PUBLIC_ACTION_GAS_INIT_RSP,
P2P_PUBLIC_ACTION_GAS_COMB_REQ,
P2P_PUBLIC_ACTION_GAS_COMB_RSP,
P2P_PUBLIC_ACTION_WNM_BTM_REQ,
P2P_PUBLIC_ACTION_NOT_SUPPORT,
};