From patchwork Thu May 11 12:12:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 99630 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp698035qge; Thu, 11 May 2017 05:12:35 -0700 (PDT) X-Received: by 10.84.132.2 with SMTP id 2mr18607ple.46.1494504755305; Thu, 11 May 2017 05:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494504755; cv=none; d=google.com; s=arc-20160816; b=lniF1JeEXUzkEWC3FitWC+bbP+One1o6QQ5f7JHcxumRykQJaxrUY3hYL7oXk4GJL7 8rzf/prO7oIVn+fbZRFcXiIJW+rz+0Hdo0ehpF8LncPH6qgYrB8BeuTCJ64BvgVrfDDr IC+SuCRzxfnhNt/xqF2zha8ew2506UhFixXu3vP5jIAp9qJJvsIocwsLc91rOkx8js2u 74+bj/AeT8YUS50LJ1dmY+GCeYkoG/wK8AvZaKYKhS0/SDGmRkQABba9HzdMQDJ3ROxY KcDRKH8nEaCJ9COcBaF8tnfNNg2V9iol1EeGER88Gw2VVvWvfsIlGE9hC6sxSQpCm6qF 5wgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=jleJ/an0ogIu6YWNZvH0LwmRJ3V3P5hBVaGxc84Nt2I=; b=E+y0UzGUMoH9zhIRllA6zmOWeu+e2oHP92rbi2GFYYFR30ZyAtFSdJ+EjLBaUUy63t IdZcgKRcJqsurILtSREgOCAL2qxfHbrs0FSClxeRVyyDmyQwZ1+10auz45JMlZJSj+Pj eM3sKAu7+/dGKxl3fkxK1uu+Yf2dtd1jfVjphJXnVaSprrIwAE926JpW1VkStEaXfp7p 6hr+VBbBmLd0mAbYv8kEJvK5H2Y6jEJwbdE61hrcvlRlfGfSCM9KUs1SqkXOKNHOGNgH 9ZLibNNoZEo8+465RfoulhGFt39MB/LCz8E3WDwwI/1SbslQMDGS447QmajtUb6/LZ6f A6VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z86si1700076pfa.249.2017.05.11.05.12.35; Thu, 11 May 2017 05:12:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755519AbdEKMMd (ORCPT + 6 others); Thu, 11 May 2017 08:12:33 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:36551 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755137AbdEKMMc (ORCPT ); Thu, 11 May 2017 08:12:32 -0400 Received: by mail-pf0-f180.google.com with SMTP id m17so12960928pfg.3 for ; Thu, 11 May 2017 05:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jleJ/an0ogIu6YWNZvH0LwmRJ3V3P5hBVaGxc84Nt2I=; b=dmq5rre+i0GpCM7P1mGhRpuAjAkkQCgYNfNQyJunJDf3/K1YTH15MKCmGvwxVFNVeX xLxXVQqf0mjCepEXQS7UN8EVJWUlF5VJtZPpdHMzHa2Fqe/9npPSAAEP5ks3+BiIaCec cQdZNHByg02X0ScFA57K4dcHFXzom1rCQNNQg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jleJ/an0ogIu6YWNZvH0LwmRJ3V3P5hBVaGxc84Nt2I=; b=BHC6E+RtnNnRNaKc4g/Gf8WTQODf8IMYH1kZfnX1K0czg7yKG7rbmssGxCrOQ+poyR mviSYk5Si6vEIBg3dQP0LiPMSKDMMExXQ277dkR74LPdwX2uD/deIMiD90aEYAb6IqMh qIacS83kJ48hhTWrOLrGXeegd51m+XTTzChBzzUYa3ve+O9FHofBFVd7mGvWl7iE/NGC d8gbutsslHCRvzD2eohSIDWyU6ttoq3DBYJ9uChRYQ9mJSqgFKnQEk76059CvSN4/CDU pbzFBjK3vu+GA31xi2yIx+jj7uYK5Rrs/onR3QAzv0XURprhesu9yRxv4FF9mvT79NlO ngkg== X-Gm-Message-State: AODbwcCiOS6ziImdv0dbgZikTonIxfL5kT/Qs9vEEw5TrLxsi+I39YIF 9//QD0eog5rSz/FE X-Received: by 10.98.135.71 with SMTP id i68mr18322pfe.92.1494504751367; Thu, 11 May 2017 05:12:31 -0700 (PDT) Received: from localhost.localdomain ([106.51.135.126]) by smtp.gmail.com with ESMTPSA id o76sm4886221pfi.119.2017.05.11.05.12.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 May 2017 05:12:30 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Maxim Altshul , Kalle Valo Subject: [PATCH for-4.9 1/2] wlcore: Pass win_size taken from ieee80211_sta to FW Date: Thu, 11 May 2017 17:42:20 +0530 Message-Id: <1494504741-9723-2-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494504741-9723-1-git-send-email-amit.pundir@linaro.org> References: <1494504741-9723-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Maxim Altshul commit 42c7372a111630dab200c2f959424f5ec3bf79a4 upstream. When starting a new BA session, we must pass the win_size to the FW. To do this we take max_rx_aggregation_subframes (BA RX win size) which is stored in ieee80211_sta structure (e.g per link and not per HW) We will use the value stored per link when passing the win_size to firmware through the ACX_BA_SESSION_RX_SETUP command. Signed-off-by: Maxim Altshul Signed-off-by: Kalle Valo Signed-off-by: Amit Pundir --- drivers/net/wireless/ti/wlcore/acx.c | 5 +++-- drivers/net/wireless/ti/wlcore/acx.h | 3 ++- drivers/net/wireless/ti/wlcore/main.c | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c index 26cc23f32241..a4859993db3c 100644 --- a/drivers/net/wireless/ti/wlcore/acx.c +++ b/drivers/net/wireless/ti/wlcore/acx.c @@ -1419,7 +1419,8 @@ int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl, /* setup BA session receiver setting in the FW. */ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, - u16 ssn, bool enable, u8 peer_hlid) + u16 ssn, bool enable, u8 peer_hlid, + u8 win_size) { struct wl1271_acx_ba_receiver_setup *acx; int ret; @@ -1435,7 +1436,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, acx->hlid = peer_hlid; acx->tid = tid_index; acx->enable = enable; - acx->win_size = wl->conf.ht.rx_ba_win_size; + acx->win_size = win_size; acx->ssn = ssn; ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx, diff --git a/drivers/net/wireless/ti/wlcore/acx.h b/drivers/net/wireless/ti/wlcore/acx.h index 6321ed472891..f46d7fdf9a00 100644 --- a/drivers/net/wireless/ti/wlcore/acx.h +++ b/drivers/net/wireless/ti/wlcore/acx.h @@ -1113,7 +1113,8 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl, int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl, struct wl12xx_vif *wlvif); int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, - u16 ssn, bool enable, u8 peer_hlid); + u16 ssn, bool enable, u8 peer_hlid, + u8 win_size); int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif, u64 *mactime); int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 471521a0db7b..5438975c7ff2 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -5285,7 +5285,9 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, } ret = wl12xx_acx_set_ba_receiver_session(wl, tid, *ssn, true, - hlid); + hlid, + params->buf_size); + if (!ret) { *ba_bitmap |= BIT(tid); wl->ba_rx_session_count++; @@ -5306,7 +5308,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, } ret = wl12xx_acx_set_ba_receiver_session(wl, tid, 0, false, - hlid); + hlid, 0); if (!ret) { *ba_bitmap &= ~BIT(tid); wl->ba_rx_session_count--;