From 30294e2c7945322e017e413b744d4f0621dfa282 Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Mon, 9 Dec 2019 14:34:13 +0530 Subject: [PATCH] qcacmn: Skip setting BA window size to 2 for NON BA case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As per the REO logic, if a packet is received with SN <= current SN, then it will be treated as a 2K jump error or OOR and the packet in consideration will be dropped by REO. For NON-BA case this case will be treated as 2k-jump error. For the NON-BA case, the packets with SN <= current SN should not be dropped. The current REO configuration, sets the BA window size to 2 for NON-BA case, which in turn enables 2k-jump detection. For configuring the REO to not drop packets with previous SN, we need not set the BA window size to 2, thereby disabling the 2k-jump check for NON-BA case. A. SN = 1, 2, 3, 4, 2096, … (good case, as long as the SN is within 2K range) B. SN = 3, 5, 2 (3, 5 are good packet, 2 is bad packet and will be dropped to ‘2K error’ with error code = 2K error.) (note that this is for non-BA session, for BA session, we detect SN as either 2K error or OOR error based on SN and window size). After this change, we will treat this as a good packet. C. SN = 1, 1, 1, 1, with duplicate detect enabled – these are duplicate packets and will be dropped to ‘DD queue’ with error code = DD (No change) D. SN = 1, 1, 1, 1, with duplicate detect disabled – packets will be dropped to ‘2K error’ with error code = 2K error. After this change, we will treat this as a good packet. Skip the setting of BA window size to 2 for aggregated packets in NON BA case. CRs-Fixed: 2580605 Change-Id: I19d5eced7c8730a9c3820fd6fc69923d2a98263a --- hal/wifi3.0/hal_reo.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hal/wifi3.0/hal_reo.c b/hal/wifi3.0/hal_reo.c index 4b035ada63..1a89f9d20c 100644 --- a/hal/wifi3.0/hal_reo.c +++ b/hal/wifi3.0/hal_reo.c @@ -63,6 +63,23 @@ static inline void hal_uniform_desc_hdr_setup(uint32_t *desc, uint32_t owner, #endif #define HAL_NON_QOS_TID 16 +#ifdef HAL_DISABLE_NON_BA_2K_JUMP_ERROR +static inline uint32_t hal_update_non_ba_win_size(int tid, + uint32_t ba_window_size) +{ + return ba_window_size; +} +#else +static inline uint32_t hal_update_non_ba_win_size(int tid, + uint32_t ba_window_size) +{ + if ((ba_window_size == 1) && (tid != HAL_NON_QOS_TID)) + ba_window_size++; + + return ba_window_size; +} +#endif + /** * hal_reo_qdesc_setup - Setup HW REO queue descriptor * @@ -114,12 +131,13 @@ void hal_reo_qdesc_setup(hal_soc_handle_t hal_soc_hdl, int tid, if (ba_window_size < 1) ba_window_size = 1; + /* WAR to get 2k exception in Non BA case. * Setting window size to 2 to get 2k jump exception * when we receive aggregates in Non BA case */ - if ((ba_window_size == 1) && (tid != HAL_NON_QOS_TID)) - ba_window_size++; + ba_window_size = hal_update_non_ba_win_size(tid, ba_window_size); + /* Set RTY bit for non-BA case. Duplicate detection is currently not * done by HW in non-BA case if RTY bit is not set. * TODO: This is a temporary War and should be removed once HW fix is