From 1b0ec2a8fe40049c58edaf826a3ee87dcad6e4cf Mon Sep 17 00:00:00 2001 From: sheenam monga Date: Tue, 23 Jul 2019 17:49:39 +0530 Subject: [PATCH] qcacmn: Add Support for ACTION_CATEGORY_FST Currently, mgmt_txrx_get_action_frm_subtype does not handle ACTION_CATEGORY_FST. In case action_category is ACTION_CATEGORY_FST, mgmt_txrx_get_action_frm_subtype returns MGMT_FRM_UNSPECIFIED due to default handling. Function tgt_mgmt_txrx_rx_frame_handler returns QDF_STATUS_E_FAILURE on receiving MGMT_FRM_UNSPECIFIED frame type and drops mgmt frames. Fix is to add support for ACTION_CATEGORY_FST in mgmt_txrx_get_action_frm_subtype to avoid drop of FST mgmt frames. Add new management frames MGMT_ACTION_FST_SETUP_REQ, MGMT_ACTION_FST_SETUP_RSP, MGMT_ACTION_FST_TEAR_DOWN, MGMT_ACTION_FST_ACK_REQ, MGMT_ACTION_FST_ACK_RSP, MGMT_ACTION_FST_ON_CHANNEL_TUNNEL. Add handling for ACTION_CATEGORY_FST in mgmt_txrx_get_action_frm_subtype, Find fst frame subtype and return fst frame subtype from mgmt_get_fst_action_subtype instead of returning MGMT_FRM_UNSPECIFIED in case FST action_category is received. Change-Id: I67b7c14f03cab252b13b677a2c9f20a327be24bd CRs-Fixed: 2495273 --- .../dispatcher/inc/wlan_mgmt_txrx_utils_api.h | 34 +++++++++++++- .../dispatcher/src/wlan_mgmt_txrx_tgt_api.c | 44 +++++++++++++++++++ 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h index 3e264f5ff861..5aeab067fdec 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h +++ b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h @@ -413,6 +413,24 @@ enum wmm_actioncode { WMM_QOS_TEARDOWN, }; +/** + * enum fst_actioncode - fst action frames + * @FST_SETUP_REQ: fst setup request frame + * @FST_SETUP_RSP: fst setup response frame + * @FST_TEAR_DOWN: fst qos teardown frame + * @FST_ACK_REQ: fst ack frame for request + * @FST_ACK_RSP: fst ack frame for response + * @FST_ON_CHANNEL_TUNNEL: fst on channel tunnel frame + */ +enum fst_actioncode { + FST_SETUP_REQ, + FST_SETUP_RSP, + FST_TEAR_DOWN, + FST_ACK_REQ, + FST_ACK_RSP, + FST_ON_CHANNEL_TUNNEL, +}; + /** * enum vht_actioncode - vht action frames * @VHT_ACTION_COMPRESSED_BF: vht compressed bf action frame @@ -537,12 +555,18 @@ struct action_frm_hdr { * @MGMT_ACTION_VHT_COMPRESSED_BF: vht compressed bf action frame * @MGMT_ACTION_VHT_GID_NOTIF: vht gid notification action frame * @MGMT_ACTION_VHT_OPMODE_NOTIF: vht opmode notification action frame - * @MGMT_FRAME_TYPE_ALL: mgmt frame type for all type of frames - * @MGMT_MAX_FRAME_TYPE: max. mgmt frame types * @MGMT_ACTION_GAS_INITIAL_REQUEST: GAS Initial request action frame * @MGMT_ACTION_GAS_INITIAL_RESPONSE: GAS Initial response action frame * @MGMT_ACTION_GAS_COMEBACK_REQUEST: GAS Comeback request action frame * @MGMT_ACTION_GAS_COMEBACK_RESPONSE: GAS Comeback response action frame + * @MGMT_ACTION_FST_SETUP_REQ: FST setup request frame + * @MGMT_ACTION_FST_SETUP_RSPA: FST setup response frame + * @MGMT_ACTION_FST_TEAR_DOWN: FST qos teardown frame + * @MGMT_ACTION_FST_ACK_REQ: FST ack frame for request + * @MGMT_ACTION_FST_ACK_RSP: FST ack frame for response + * @MGMT_ACTION_FST_ON_CHANNEL_TUNNEL: FST on channel tunnel frame + * @MGMT_FRAME_TYPE_ALL: mgmt frame type for all type of frames + * @MGMT_MAX_FRAME_TYPE: max. mgmt frame types */ enum mgmt_frame_type { MGMT_FRM_UNSPECIFIED = -1, @@ -649,6 +673,12 @@ enum mgmt_frame_type { MGMT_ACTION_GAS_INITIAL_RESPONSE, MGMT_ACTION_GAS_COMEBACK_REQUEST, MGMT_ACTION_GAS_COMEBACK_RESPONSE, + MGMT_ACTION_FST_SETUP_REQ, + MGMT_ACTION_FST_SETUP_RSP, + MGMT_ACTION_FST_TEAR_DOWN, + MGMT_ACTION_FST_ACK_REQ, + MGMT_ACTION_FST_ACK_RSP, + MGMT_ACTION_FST_ON_CHANNEL_TUNNEL, MGMT_FRAME_TYPE_ALL, MGMT_MAX_FRAME_TYPE, }; diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c index f79e64e79a8d..c7fa2d19d13c 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c +++ b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c @@ -648,6 +648,47 @@ mgmt_get_vht_action_subtype(uint8_t action_code) return frm_type; } +/** + * mgmt_get_fst_action_subtype() - gets fst action subtype + * @action_code: action code + * + * This function returns the subtype for fst action + * category. + * + * Return: mgmt frame type + */ +static enum mgmt_frame_type +mgmt_get_fst_action_subtype(uint8_t action_code) +{ + enum mgmt_frame_type frm_type; + + switch (action_code) { + case FST_SETUP_REQ: + frm_type = MGMT_ACTION_FST_SETUP_REQ; + break; + case FST_SETUP_RSP: + frm_type = MGMT_ACTION_FST_SETUP_RSP; + break; + case FST_TEAR_DOWN: + frm_type = MGMT_ACTION_FST_TEAR_DOWN; + break; + case FST_ACK_REQ: + frm_type = MGMT_ACTION_FST_ACK_REQ; + break; + case FST_ACK_RSP: + frm_type = MGMT_ACTION_FST_ACK_RSP; + break; + case FST_ON_CHANNEL_TUNNEL: + frm_type = MGMT_ACTION_FST_ON_CHANNEL_TUNNEL; + break; + default: + frm_type = MGMT_FRM_UNSPECIFIED; + break; + } + + return frm_type; +} + /** * mgmt_txrx_get_action_frm_subtype() - gets action frm subtype * @mpdu_data_ptr: pointer to mpdu data @@ -721,6 +762,9 @@ mgmt_txrx_get_action_frm_subtype(uint8_t *mpdu_data_ptr) case ACTION_CATEGORY_VENDOR_SPECIFIC: frm_type = MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC; break; + case ACTION_CATEGORY_FST: + frm_type = mgmt_get_fst_action_subtype(action_hdr->action_code); + break; default: frm_type = MGMT_FRM_UNSPECIFIED; break;