From patchwork Thu May 11 17:49:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 99666 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp851487qge; Thu, 11 May 2017 10:49:51 -0700 (PDT) X-Received: by 10.99.137.198 with SMTP id v189mr201505pgd.205.1494524991690; Thu, 11 May 2017 10:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494524991; cv=none; d=google.com; s=arc-20160816; b=V9YPZe55uyE4yEVjoww95Vtc3J7giLoIaEuN5sOd9Ic8MLjwvHcfQoZt7A4SPlSqoU X69Z+b86e5hHguDn93etI42SgmGD6cYmzZGBTTC6mLdA+o0I2kLhN/JcuSmNRGKEE5vg /aWG4YbhOC1YvcZeM6lo+fAtrmDuY1BDPAMrCfuE06qtcss6Q09olOYdHwzkiQUuNO0R /sN9oPNb3nUnM1z6hZzhkPGpMpbhG1EZub2JYWpgmAYNY4vUZco7z7zuvwvjxcpCmYI0 P1YifGUqDnLfSiEGWULa+VZpWTMT6eE9gXqzTXJTPbZ1xZL4zoSxa+SIPSauPRQk/I+X 7RNw== 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=lZUtjzTJatB75f5YmYTdMk5pxUbYoOCIT16inbkUIew=; b=QkIgC7vYc0N0/E2xqrMXSliC9zuRuSuiuVecl35qAhMuAqv+R4T6L/bxWaR8J7CFqW 1KBuFGf9ArPVtkHmKIgO+/Kj6aAiwjOkw1TMIQKsAlnEsfcJEnwjiu5xwkUcO/weHGF1 k03nBjeE4/J4K13+cc1YhJf+z2OrIGFR+3fIuLgMXYLIhUw3JwsLIxxEGKq75BVQJdmc Az+/HYGTCw9IfVCk9Pgf7lA0SN9sjTZnoqXaFlRy0RoLOnyfLeNRiu1LZBMcIGbuwuuN 4OG60L4WN/XX7NDvCSeHjJ4g/pWQqQwf1zJ0JScEOX7QedGsrMTg3qiqJ8QI/P9jkDjY IBIw== 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 g1si712796pgc.15.2017.05.11.10.49.51; Thu, 11 May 2017 10:49:51 -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 S933110AbdEKRtv (ORCPT + 6 others); Thu, 11 May 2017 13:49:51 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:33449 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933087AbdEKRtu (ORCPT ); Thu, 11 May 2017 13:49:50 -0400 Received: by mail-pf0-f182.google.com with SMTP id e193so17337502pfh.0 for ; Thu, 11 May 2017 10:49:50 -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=lZUtjzTJatB75f5YmYTdMk5pxUbYoOCIT16inbkUIew=; b=iiRrxqTEG59omsFqzT+N0wYT3yRK3awGOyNsEwuMgEHRFcGJOmXXOfYqaU80Geydtv uyAyQVATjD7EtkmgqAVgi0Ikipm1BFQc2ZBisjOZuREOmsGERfPiOI95NzmZjLRegUsX 4RsM/fW9cuM4Ltu4NI08XLAt0qt1jyPhzV0fU= 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=lZUtjzTJatB75f5YmYTdMk5pxUbYoOCIT16inbkUIew=; b=JhXzZL6LE1e9H5tmQN/ex9XBAjJR9n7Z7v+zMWgPjSzP2d4lE6pmpNAHtLcOs3w6Nd LAbFS0IQiaqbF84tYXJqV5s+f0+WKUYiW8aDHsoFuD7QDjyoTkirpt7Bp/l7E76R3eXP o46Yda5rkZ+v5TM1eAXYE46rN1xgz4XDm2S4i8vuYrOYr1Tbdwk5fiq2+tRqD4hdmWEz /xpZRu03sDcJ+/XFmZa2tIWhalxQKesu6MX/9JLq2jDjBQe30qs40LdhYZuaaRKam/qZ UBDVhn/xPYSHysn74YJtxsPBWNWredNa9oMJL8zjqgsDZXok5sAtdRZnKTffvFjhAIx0 /50g== X-Gm-Message-State: AODbwcBnvY8sPtBVJSMOKy7ThyhKONCopEWLovxY+TR+vDMJI0PhGHZp eEL2H1ZsIULJzUc5 X-Received: by 10.84.140.5 with SMTP id 5mr378012pls.113.1494524989729; Thu, 11 May 2017 10:49:49 -0700 (PDT) Received: from localhost.localdomain ([106.51.135.126]) by smtp.gmail.com with ESMTPSA id b72sm1200986pfd.118.2017.05.11.10.49.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 May 2017 10:49:49 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Maxim Altshul , Sara Sharon , Kalle Valo Subject: [PATCH for-4.4 4/5] wlcore: Pass win_size taken from ieee80211_sta to FW Date: Thu, 11 May 2017 23:19:34 +0530 Message-Id: <1494524975-2352-5-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494524975-2352-1-git-send-email-amit.pundir@linaro.org> References: <1494524975-2352-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 f28fa3b5029d..0646c9b6f8d7 100644 --- a/drivers/net/wireless/ti/wlcore/acx.c +++ b/drivers/net/wireless/ti/wlcore/acx.c @@ -1419,7 +1419,8 @@ out: /* 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 954d57ec98f4..524aea495dff 100644 --- a/drivers/net/wireless/ti/wlcore/acx.h +++ b/drivers/net/wireless/ti/wlcore/acx.h @@ -1112,7 +1112,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 30165ea0fa25..7b27c7e23af2 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -5328,7 +5328,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++; @@ -5349,7 +5351,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--;