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--; From patchwork Thu May 11 12:12:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 99632 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp698070qge; Thu, 11 May 2017 05:12:41 -0700 (PDT) X-Received: by 10.98.88.4 with SMTP id m4mr12234187pfb.41.1494504761128; Thu, 11 May 2017 05:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494504761; cv=none; d=google.com; s=arc-20160816; b=TJZQjPhqQZS/o1Qqsxsq7pDkDpC0jq72Co39Mwcuh93Ww8w8EFgG2vxAc70ZU+2fDR cCL63RDV3zUB5Juimth2yZVbRQGvP8d9PbTo19nhGHF5hv3FLozsUJrQobFIBpq24O3N OxH8HIR8q7R/C2OQgJOp0EA8EzBvQxkT0bC+2sAbwZvk8lPCoS2R7tKSjKK6BKYtbTfM 916HoI5wOMY7C5tDsIzzxD1zPY2z6TlJ43MgKeHr6hVNxVvpPbGzEG2QD9UGGSJxTtxs FwN+RZGRx75rzkA8W8jLj5jUsROYMIHrllX0CaRd13yAT7N6oAF4iapV4MG9MdqGgXnI RFlA== 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=DinAE6ct9Qlx68Iq5rl0ksTg/sy1Ezb5zgqwStBoLYQ=; b=MxczZoxNSPoavhw9veXrdgXRXW1/w1kLvKtX7LxXTLMe5DRYz+u7RIMkyYGmgEhSGB 873rYeyUmx5bWoCiyPGX9tKuIidGP3i7C7hkR2IV439QHccPbbQJfAI29EuwIbNhKwMy awVKQ+TckRdEWFGgPcT5Ul24fjkDqvkkdbVdLbfVFHOXJdKfu/b9PIFXGloX8cfjiyl+ pZXEyCwAJq9e4GEGLuw5buRSqx0QDvobupCL9pV2nsrYJuOWxqgDXzR22GA57gLlQCHt Xx4RbV+zXk6ZnMcPziPuHN5FyrcTGYlyBCMt9FN5hpbSFnFQonI1uPr35JGpF76LLE7g SjLg== 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.40; Thu, 11 May 2017 05:12:41 -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 S1755571AbdEKMMk (ORCPT + 6 others); Thu, 11 May 2017 08:12:40 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:34984 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755137AbdEKMMj (ORCPT ); Thu, 11 May 2017 08:12:39 -0400 Received: by mail-pg0-f41.google.com with SMTP id o3so13802817pgn.2 for ; Thu, 11 May 2017 05:12:39 -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=DinAE6ct9Qlx68Iq5rl0ksTg/sy1Ezb5zgqwStBoLYQ=; b=PiqaOgp4BWJ22AwK/Wg0gdaiYVX9p79cX1zqfZna0RcOdtBukjQGhSf9MrSBMwHlM4 oq6L9hR0bv0TdSkyOrnokfLQQWDXE/us9Yg5jNBAUv4bMs+pXjEPq0ZkhcjVpb8VTGv9 G4+kpqci/DJKf1rCVuXXFaM5YAqffr1M0nvVA= 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=DinAE6ct9Qlx68Iq5rl0ksTg/sy1Ezb5zgqwStBoLYQ=; b=KrFGszUm0uqjGST7ln1qlgKri5wNOl1L62QHvS5Q6MBzv8q1tYH32/cyqnY7yrmTup CHf+zPz94BcSlIEKDLuDiUPt38SNb9jNxCE3SJiJdm6kyJ/BO9Zk2wFIFzRzyvXNHt7Y q9muKuJOH/HH2IeNBM3LeyRlYLTXdW4CTNpNz3nQsTZdq+EPKvU9gAXjNxeBTGtSK+VU 5wWf/cTzDQfzp8airGeNkNOfHuIIRmpm6YBP5nKxDOrQpJm06iRsnYyhjEe7N/wSv5NP e0sYvizq1KXoDAD9Z/+if37rETOEXn9VEEBsPLTizMrm2oqfqZ/Wui9zquY5pOtKblE6 4UGQ== X-Gm-Message-State: AODbwcAs7TfN+nzHL9n7mveRBH/5FqI3iIq/1gCMzbcxqqLLenI4h1qM 07I4KERZAHn34AVc X-Received: by 10.84.210.205 with SMTP id a71mr15979796pli.136.1494504753641; Thu, 11 May 2017 05:12:33 -0700 (PDT) Received: from localhost.localdomain ([106.51.135.126]) by smtp.gmail.com with ESMTPSA id o76sm4886221pfi.119.2017.05.11.05.12.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 May 2017 05:12:32 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Maxim Altshul , Kalle Valo Subject: [PATCH for-4.9 2/2] wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event Date: Thu, 11 May 2017 17:42:21 +0530 Message-Id: <1494504741-9723-3-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 e7ee74b56f23ba447d3124f2eccc32033cca501d upstream. This event is used by the Firmware to limit the RX BA win size for a specific link. The event handler updates the new size in the mac's sta->sta struct. BA sessions opened for that link will use the new restricted win_size. This limitation remains until a new update is received or until the link is closed. Signed-off-by: Maxim Altshul Signed-off-by: Kalle Valo Signed-off-by: Amit Pundir --- drivers/net/wireless/ti/wl18xx/event.c | 28 ++++++++++++++++++++++++++++ drivers/net/wireless/ti/wl18xx/event.h | 1 + drivers/net/wireless/ti/wl18xx/main.c | 3 ++- 3 files changed, 31 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/wireless/ti/wl18xx/event.c b/drivers/net/wireless/ti/wl18xx/event.c index b36ce185c9f2..86fa0fc69084 100644 --- a/drivers/net/wireless/ti/wl18xx/event.c +++ b/drivers/net/wireless/ti/wl18xx/event.c @@ -218,5 +218,33 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl) if (vector & FW_LOGGER_INDICATION) wlcore_event_fw_logger(wl); + if (vector & RX_BA_WIN_SIZE_CHANGE_EVENT_ID) { + struct wl12xx_vif *wlvif; + struct ieee80211_vif *vif; + struct ieee80211_sta *sta; + u8 link_id = mbox->rx_ba_link_id; + u8 win_size = mbox->rx_ba_win_size; + const u8 *addr; + + wlvif = wl->links[link_id].wlvif; + vif = wl12xx_wlvif_to_vif(wlvif); + + /* Update RX aggregation window size and call + * MAC routine to stop active RX aggregations for this link + */ + if (wlvif->bss_type != BSS_TYPE_AP_BSS) + addr = vif->bss_conf.bssid; + else + addr = wl->links[link_id].addr; + + sta = ieee80211_find_sta(vif, addr); + if (sta) { + sta->max_rx_aggregation_subframes = win_size; + ieee80211_stop_rx_ba_session(vif, + wl->links[link_id].ba_bitmap, + addr); + } + } + return 0; } diff --git a/drivers/net/wireless/ti/wl18xx/event.h b/drivers/net/wireless/ti/wl18xx/event.h index ce8ea9c04052..4af297fbb529 100644 --- a/drivers/net/wireless/ti/wl18xx/event.h +++ b/drivers/net/wireless/ti/wl18xx/event.h @@ -38,6 +38,7 @@ enum { REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID = BIT(18), DFS_CHANNELS_CONFIG_COMPLETE_EVENT = BIT(19), PERIODIC_SCAN_REPORT_EVENT_ID = BIT(20), + RX_BA_WIN_SIZE_CHANGE_EVENT_ID = BIT(21), SMART_CONFIG_SYNC_EVENT_ID = BIT(22), SMART_CONFIG_DECODE_EVENT_ID = BIT(23), TIME_SYNC_EVENT_ID = BIT(24), diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 06d6943b257c..5bdf7a03e3dd 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c @@ -1041,7 +1041,8 @@ static int wl18xx_boot(struct wl1271 *wl) SMART_CONFIG_SYNC_EVENT_ID | SMART_CONFIG_DECODE_EVENT_ID | TIME_SYNC_EVENT_ID | - FW_LOGGER_INDICATION; + FW_LOGGER_INDICATION | + RX_BA_WIN_SIZE_CHANGE_EVENT_ID; wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID;