From ef2cbc6c9331b2c37f866961e6f53617c5634750 Mon Sep 17 00:00:00 2001 From: "Pamidipati, Vijay" Date: Wed, 27 Sep 2017 23:09:06 +0530 Subject: [PATCH] qcacmn: Change default DSCP-TID mapping table to use all TIDs Change default DSCP-TID mapping table so that all possible TID values can be used in transmit datapath. Also propagate a fix from legacy Tx classification code required to compute the offset of L3 header pointer correctly Change-Id: Ia6426817410e67018491c0f4a8122bfae7a1cfe2 CRs-Fixed: 2197640 --- dp/wifi3.0/dp_main.c | 26 +++++++++++++------------- dp/wifi3.0/dp_tx.c | 4 +++- dp/wifi3.0/dp_types.h | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 756fb0196878..350d9a6ec893 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -99,25 +99,25 @@ qdf_declare_param(rx_hash, bool); /** * default_dscp_tid_map - Default DSCP-TID mapping * - * DSCP TID AC - * 000000 0 WME_AC_BE - * 001000 1 WME_AC_BK - * 010000 1 WME_AC_BK - * 011000 0 WME_AC_BE - * 100000 5 WME_AC_VI - * 101000 5 WME_AC_VI - * 110000 6 WME_AC_VO - * 111000 6 WME_AC_VO + * DSCP TID + * 000000 0 + * 001000 1 + * 010000 2 + * 011000 3 + * 100000 4 + * 101000 5 + * 110000 6 + * 111000 7 */ static uint8_t default_dscp_tid_map[DSCP_TID_MAP_MAX] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 5, 5, 5, 5, 5, 5, 5, 5, + 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, + 7, 7, 7, 7, 7, 7, 7, 7, }; /* diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 9204b8bc3799..2453c2e31056 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -24,6 +24,7 @@ #include "hal_tx.h" #include "qdf_mem.h" #include "qdf_nbuf.h" +#include "qdf_net_types.h" #include #ifdef MESH_MODE_SUPPORT #include "if_meta_hdr.h" @@ -1049,10 +1050,11 @@ static void dp_tx_classify_tid(struct dp_vdev *vdev, qdf_nbuf_t nbuf, is_mcast = DP_FRAME_IS_MULTICAST(hdr_ptr); ether_type = eh->ether_type; + llcHdr = (qdf_llc_t *)(nbuf->data + sizeof(struct ether_header)); /* * Check if packet is dot3 or eth2 type. */ - if (IS_LLC_PRESENT(ether_type)) { + if (DP_FRAME_IS_LLC(ether_type) && DP_FRAME_IS_SNAP(llcHdr)) { ether_type = (uint16_t)*(nbuf->data + 2*ETHER_ADDR_LEN + sizeof(*llcHdr)); diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index dbd6a13b0e53..7bd98ced975d 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -130,10 +130,10 @@ union dp_rx_desc_list_elem_t; (_a)[3] == 0xff && \ (_a)[4] == 0xff && \ (_a)[5] == 0xff) -#define IS_LLC_PRESENT(typeorlen) ((typeorlen) >= 0x600) #define DP_FRAME_IS_SNAP(_llc) ((_llc)->llc_dsap == 0xaa && \ (_llc)->llc_ssap == 0xaa && \ (_llc)->llc_un.type_snap.control == 0x3) +#define DP_FRAME_IS_LLC(typeorlen) ((typeorlen) >= 0x600) #define DP_FRAME_FC0_TYPE_MASK 0x0c #define DP_FRAME_FC0_TYPE_DATA 0x08 #define DP_FRAME_IS_DATA(_frame) \