diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index bcd581477722..a03590416614 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3544,6 +3544,7 @@ typedef struct sSirTdlsSendMgmtReq { /* For multi-session, for PE to locate peSession ID */ struct qdf_mac_addr bssid; struct qdf_mac_addr peer_mac; + enum wifi_traffic_ac ac; /* Variable length. Dont add any field after this. */ uint8_t addIe[1]; } tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq; @@ -5240,15 +5241,6 @@ typedef struct { uint32_t retriesLong; } tSirWifiRateStat, *tpSirWifiRateStat; -/* access categories */ -typedef enum { - WIFI_AC_VO = 0, - WIFI_AC_VI = 1, - WIFI_AC_BE = 2, - WIFI_AC_BK = 3, - WIFI_AC_MAX = 4, -} tSirWifiTrafficAc; - /* wifi peer type */ typedef enum { WIFI_PEER_STA, diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index cd2744552e86..0f55b41433ba 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -520,7 +520,8 @@ static QDF_STATUS lim_mgmt_tdls_tx_complete(void *context, static tSirRetStatus lim_send_tdls_dis_req_frame(tpAniSirGlobal pMac, struct qdf_mac_addr peer_mac, uint8_t dialog, - tpPESession psessionEntry) + tpPESession psessionEntry, + enum wifi_traffic_ac ac) { tDot11fTDLSDisReq tdlsDisReq; uint32_t status = 0; @@ -624,10 +625,10 @@ static tSirRetStatus lim_send_tdls_dis_req_frame(tpAniSirGlobal pMac, /* fill out the buffer descriptor */ header_offset = lim_prepare_tdls_frame_header(pMac, pFrame, - LINK_IDEN_ADDR_OFFSET - (tdlsDisReq), TDLS_LINK_AP, - TDLS_INITIATOR, TID_AC_VI, - psessionEntry); + LINK_IDEN_ADDR_OFFSET(tdlsDisReq), TDLS_LINK_AP, + TDLS_INITIATOR, + (ac == WIFI_AC_VI) ? TID_AC_VI : TID_AC_BK, + psessionEntry); status = dot11f_pack_tdls_dis_req(pMac, &tdlsDisReq, pFrame + header_offset, nPayload, &nPayload); @@ -1111,7 +1112,8 @@ tSirRetStatus lim_send_tdls_link_setup_req_frame(tpAniSirGlobal pMac, uint8_t dialog, tpPESession psessionEntry, uint8_t *addIe, - uint16_t addIeLen) + uint16_t addIeLen, + enum wifi_traffic_ac ac) { tDot11fTDLSSetupReq tdlsSetupReq; uint16_t caps = 0; @@ -1301,10 +1303,10 @@ tSirRetStatus lim_send_tdls_link_setup_req_frame(tpAniSirGlobal pMac, /* fill out the buffer descriptor */ header_offset = lim_prepare_tdls_frame_header(pMac, pFrame, - LINK_IDEN_ADDR_OFFSET - (tdlsSetupReq), TDLS_LINK_AP, - TDLS_INITIATOR, TID_AC_VI, - psessionEntry); + LINK_IDEN_ADDR_OFFSET(tdlsSetupReq), + TDLS_LINK_AP, TDLS_INITIATOR, + (ac == WIFI_AC_VI) ? TID_AC_VI : TID_AC_BK, + psessionEntry); pe_debug("SupportedChnlWidth: %x rxMCSMap: %x rxMCSMap: %x txSupDataRate: %x", tdlsSetupReq.VHTCaps.supportedChannelWidthSet, @@ -1367,7 +1369,8 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac, uint16_t reason, uint8_t responder, tpPESession psessionEntry, - uint8_t *addIe, uint16_t addIeLen) + uint8_t *addIe, uint16_t addIeLen, + enum wifi_traffic_ac ac) { tDot11fTDLSTeardown teardown; uint32_t status = 0; @@ -1476,16 +1479,12 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac, /* fill out the buffer descriptor */ pe_debug("Reason of TDLS Teardown: %d", reason); header_offset = lim_prepare_tdls_frame_header(pMac, pFrame, - LINK_IDEN_ADDR_OFFSET - (teardown), - (reason == - eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE) - ? TDLS_LINK_AP : - TDLS_LINK_DIRECT, - (responder == - true) ? TDLS_RESPONDER : - TDLS_INITIATOR, TID_AC_VI, - psessionEntry); + LINK_IDEN_ADDR_OFFSET(teardown), + (reason == eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE) ? + TDLS_LINK_AP : TDLS_LINK_DIRECT, + (responder == true) ? TDLS_RESPONDER : TDLS_INITIATOR, + (ac == WIFI_AC_VI) ? TID_AC_VI : TID_AC_BK, + psessionEntry); status = dot11f_pack_tdls_teardown(pMac, &teardown, pFrame + header_offset, nPayload, &nPayload); @@ -1561,7 +1560,8 @@ static tSirRetStatus lim_send_tdls_setup_rsp_frame(tpAniSirGlobal pMac, tpPESession psessionEntry, etdlsLinkSetupStatus setupStatus, uint8_t *addIe, - uint16_t addIeLen) + uint16_t addIeLen, + enum wifi_traffic_ac ac) { tDot11fTDLSSetupRsp tdlsSetupRsp; uint32_t status = 0; @@ -1750,10 +1750,10 @@ static tSirRetStatus lim_send_tdls_setup_rsp_frame(tpAniSirGlobal pMac, /* fill out the buffer descriptor */ header_offset = lim_prepare_tdls_frame_header(pMac, pFrame, - LINK_IDEN_ADDR_OFFSET - (tdlsSetupRsp), TDLS_LINK_AP, - TDLS_RESPONDER, TID_AC_VI, - psessionEntry); + LINK_IDEN_ADDR_OFFSET(tdlsSetupRsp), TDLS_LINK_AP, + TDLS_RESPONDER, + (ac == WIFI_AC_VI) ? TID_AC_VI : TID_AC_BK, + psessionEntry); pe_debug("SupportedChnlWidth: %x rxMCSMap: %x rxMCSMap: %x txSupDataRate: %x", tdlsSetupRsp.VHTCaps.supportedChannelWidthSet, @@ -1814,7 +1814,9 @@ tSirRetStatus lim_send_tdls_link_setup_cnf_frame(tpAniSirGlobal pMac, uint8_t dialog, uint32_t peerCapability, tpPESession psessionEntry, - uint8_t *addIe, uint16_t addIeLen) + uint8_t *addIe, + uint16_t addIeLen, + enum wifi_traffic_ac ac) { tDot11fTDLSSetupCnf tdlsSetupCnf; uint32_t status = 0; @@ -1937,10 +1939,11 @@ tSirRetStatus lim_send_tdls_link_setup_cnf_frame(tpAniSirGlobal pMac, /* fill out the buffer descriptor */ header_offset = lim_prepare_tdls_frame_header(pMac, pFrame, - LINK_IDEN_ADDR_OFFSET - (tdlsSetupCnf), TDLS_LINK_AP, - TDLS_INITIATOR, TID_AC_VI, - psessionEntry); + LINK_IDEN_ADDR_OFFSET(tdlsSetupCnf), + TDLS_LINK_AP, + TDLS_INITIATOR, + (ac == WIFI_AC_VI) ? TID_AC_VI : TID_AC_BK, + psessionEntry); status = dot11f_pack_tdls_setup_cnf(pMac, &tdlsSetupCnf, pFrame + header_offset, nPayload, &nPayload); @@ -2838,7 +2841,8 @@ tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal mac_ctx, pe_debug("Transmit Discovery Request Frame"); /* format TDLS discovery request frame and transmit it */ lim_send_tdls_dis_req_frame(mac_ctx, send_req->peer_mac, - send_req->dialog, session_entry); + send_req->dialog, session_entry, + send_req->ac); result_code = eSIR_SME_SUCCESS; break; case SIR_MAC_TDLS_DIS_RSP: @@ -2854,7 +2858,8 @@ tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal mac_ctx, lim_send_tdls_link_setup_req_frame(mac_ctx, send_req->peer_mac, send_req->dialog, session_entry, &send_req->addIe[0], - (send_req->length - sizeof(tSirTdlsSendMgmtReq))); + (send_req->length - sizeof(tSirTdlsSendMgmtReq)), + send_req->ac); result_code = eSIR_SME_SUCCESS; break; case SIR_MAC_TDLS_SETUP_RSP: @@ -2862,7 +2867,8 @@ tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal mac_ctx, lim_send_tdls_setup_rsp_frame(mac_ctx, send_req->peer_mac, send_req->dialog, session_entry, send_req->statusCode, &send_req->addIe[0], - (send_req->length - sizeof(tSirTdlsSendMgmtReq))); + (send_req->length - sizeof(tSirTdlsSendMgmtReq)), + send_req->ac); result_code = eSIR_SME_SUCCESS; break; case SIR_MAC_TDLS_SETUP_CNF: @@ -2871,7 +2877,8 @@ tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal mac_ctx, send_req->peer_mac, send_req->dialog, send_req->peerCapability, session_entry, &send_req->addIe[0], - (send_req->length - sizeof(tSirTdlsSendMgmtReq))); + (send_req->length - sizeof(tSirTdlsSendMgmtReq)), + send_req->ac); result_code = eSIR_SME_SUCCESS; break; case SIR_MAC_TDLS_TEARDOWN: @@ -2880,7 +2887,8 @@ tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal mac_ctx, send_req->peer_mac, send_req->statusCode, send_req->responder, session_entry, &send_req->addIe[0], - (send_req->length - sizeof(tSirTdlsSendMgmtReq))); + (send_req->length - sizeof(tSirTdlsSendMgmtReq)), + send_req->ac); result_code = eSIR_SME_SUCCESS; break; case SIR_MAC_TDLS_PEER_TRAFFIC_IND: diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 7a0199de842f..a5044feaeec7 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1650,7 +1650,7 @@ typedef struct tagCsrTdlsSendMgmt { uint32_t peerCapability; uint8_t *buf; uint8_t len; - + enum wifi_traffic_ac ac; } tCsrTdlsSendMgmt; #endif diff --git a/core/sme/inc/sme_inside.h b/core/sme/inc/sme_inside.h index fc06c8337f25..4530cb3ed999 100644 --- a/core/sme/inc/sme_inside.h +++ b/core/sme/inc/sme_inside.h @@ -100,6 +100,7 @@ typedef struct TdlsSendMgmtInfo { uint32_t peerCapability; uint8_t *buf; uint8_t len; + enum wifi_traffic_ac ac; } tTdlsSendMgmtCmdInfo; typedef struct TdlsLinkEstablishInfo {