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;