From patchwork Thu May 11 17:49:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 99667 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp851504qge; Thu, 11 May 2017 10:49:54 -0700 (PDT) X-Received: by 10.98.93.27 with SMTP id r27mr311395pfb.103.1494524994004; Thu, 11 May 2017 10:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494524993; cv=none; d=google.com; s=arc-20160816; b=B87Vtv1zwnqhahTUZ3v5fcf5OCxGTqPimCcmVhlY6jskIr7HdKscomrR2lLQaGtA0P DBRY5hWEK6dnBbgWidKNAqgOfmDJYcRSZOzyVBssHaJqk9wiayGsYGrnhqpyJPO1cH3E 1pTmWzyccrv7y1mBGV39fNvJk0/3gdQSV6VNcI5hNHeRwBbHiJGyVtDUYSWwzMFCLDnH 4w6Rkxrhx5Jwvph4KM9Q5zq1kIDOgvWhMFlrvxOO9ifSmTxqpmvHE3BHyStBrQi+sCc5 Msz5jfV27cHjNIiJ2ljD8UcLJU38fmZtzasWk+cderXrAuAJHuebH581fu6Szz4UjByJ vRdQ== 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=GR9VAG6JCIFnCXsqRZ3SRdm+ZWHd1JxhMCeFlL3pBHs=; b=J5LjZzvv7CsVhDBMmZh4WtTEwq876DRMr4xd/Nqyxse4pE+JL02SFuuNfxBDnVFRvg gbjlcXv/WhFJHuQq4/XeI+S4GgtDg05Y9ZTaUa1A1yMlWXH3bystdIZ8YEF2bEU7D6bt 5SEsLy2c+0NLqRa0/xIIcf1OMspgkQ4A+Trm4Eo0Dv3IXTMnB/nxfbA5ke1d3kCBbtDN LH6ATGEjr5TMfzwyJT4G4ENBQzBflc1ebim2CdiYuZsjFZ/QxKNDb2dlfTvO12Tg+6Wz O4I78rVJ0fHV2uyxMeZ4NS3mTpOuus7y6j4MssRsD6urnyztQ2GNALNv4CCLgQ/dSUuv xVeg== 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.53; Thu, 11 May 2017 10:49:53 -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 S933180AbdEKRtx (ORCPT + 6 others); Thu, 11 May 2017 13:49:53 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33459 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933087AbdEKRtw (ORCPT ); Thu, 11 May 2017 13:49:52 -0400 Received: by mail-pf0-f179.google.com with SMTP id e193so17337943pfh.0 for ; Thu, 11 May 2017 10:49:52 -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=GR9VAG6JCIFnCXsqRZ3SRdm+ZWHd1JxhMCeFlL3pBHs=; b=OqaLD75GOpnuBZ6s0wAp4+xfScWw3OYhrnHg3VqNr6g7iOwQ5N/SRG7kFk4f3CEK1Z gVGen3FoMs9I+b+jp9bdPwbcHNeo86SSBghhFGBDAewKkus1zidfI711Hj/Vph/HcxJR Y5VxxOZJjKAQy1z5lYqRXajLJePxKA20sHwDw= 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=GR9VAG6JCIFnCXsqRZ3SRdm+ZWHd1JxhMCeFlL3pBHs=; b=Bo46XEWVZD06Bmp3fRE5nqP0yxxFJNELrizNiUQrgc3K/G5szMixFmjzL9uBqJFFxv d/iSaWIIrssMwmMR3PAFK4djt1gyqDkHEWmqV7NoJ2jqL1O8pqTJP79NgPHfZS0jvQO2 3TVZ+4SmUGQZzOM33VuVTN8eZYIUkCwDxPhB8VAwqVQOImIsj5TTjhVieqQhKbzAbPEk 8heL2J/I1eQ/+d8RGWm9KVb/aEcik5fp/KWOiDhHXuzcxtl4ZvwpViP3Vps0xz8EqYAx od+5htEbdD5cwwQPs1R5897syyUi+VJNqo47hkqVjNm5row7NO4Ycff7zO5As2RK3KM3 YUaQ== X-Gm-Message-State: AODbwcAcUiyGyp7JoKS3d7LuWZbQTTpQyCi9neXgdrGSWhV3whxYaUJQ Lhffk/mKDPb5NyhXBbAWrg== X-Received: by 10.99.115.14 with SMTP id o14mr303548pgc.31.1494524992010; Thu, 11 May 2017 10:49:52 -0700 (PDT) Received: from localhost.localdomain ([106.51.135.126]) by smtp.gmail.com with ESMTPSA id b72sm1200986pfd.118.2017.05.11.10.49.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 May 2017 10:49:51 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Maxim Altshul , Sara Sharon , Kalle Valo Subject: [PATCH for-4.4 5/5] wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event Date: Thu, 11 May 2017 23:19:35 +0530 Message-Id: <1494524975-2352-6-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 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 [AmitP: Minor refactoring for linux-4.4.y] 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 09c7e098f460..085ef5c87262 100644 --- a/drivers/net/wireless/ti/wl18xx/event.c +++ b/drivers/net/wireless/ti/wl18xx/event.c @@ -206,5 +206,33 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl) mbox->sc_pwd_len, mbox->sc_pwd); + 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 f3d4f13379cb..9495fadc8093 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 50cce42089a5..47f355e92193 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c @@ -1029,7 +1029,8 @@ static int wl18xx_boot(struct wl1271 *wl) DFS_CHANNELS_CONFIG_COMPLETE_EVENT | SMART_CONFIG_SYNC_EVENT_ID | SMART_CONFIG_DECODE_EVENT_ID | - TIME_SYNC_EVENT_ID; + TIME_SYNC_EVENT_ID | + RX_BA_WIN_SIZE_CHANGE_EVENT_ID; wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID;