From patchwork Wed Jun 20 07:57:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 139287 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp470517lji; Wed, 20 Jun 2018 00:58:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK4mgftdlSKqmJO0OBKWa/HAGMcis6dZuqnqqWVplXLSjVPoq52GhFXCsS1s/j+0HQc3kkH X-Received: by 2002:a65:4308:: with SMTP id j8-v6mr17719335pgq.351.1529481527868; Wed, 20 Jun 2018 00:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529481527; cv=none; d=google.com; s=arc-20160816; b=D8jvUjVP2h3c2RoeeXc3tutAps8HACbdjxehhzpPrfK8tGwgJc3FqaKVaNgdG0xc4r GV/EOaKCob9zj26MnPz785uwq2xwnYfKRqyD5JbYsIat9QY5aQo72b8+y/S8vgBn1Tjh rAEJaY2cv6zOIYHklN2kIFyVugT5JUVBfRf3rqk3yaaFEsJqgfGOfczW9BQHQXeOxQSQ LmOo/iwbd3fQSO9btTbldaykenGzTzcmTT2UZ0OPmRDEJrWnzYwgxPtaNzmkmgT6HKcE tgBf0kZY9+eyu2OCWdrWDZBb5gNEsTIUbX1oZGukANbXDRHFr0XrY7y2eCOhkjyerEOn uxIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-signature:arc-authentication-results; bh=HetkL/S4IKkrfPbXaF3GagfobnRNbNQ/VXSb0AM/HgE=; b=jRJ68QQwBbp1O2xUlrV+5ovtEbfZ2hqlRS6YRSk6gCjVBZROAYIR6slBRoggLG4AXz Wwx7XKb8NPvsPO50LlJWWAiAuBBcssXrdYWQZlMWBR4X55SNeXYmsiLv2qu4DsXSL7Te dZmRrxe4gtvsNEeWLc6b50BjwIcc0UAqD9d+k0laFt2/JIeCOqPL8w5BxlC2i/aNl3Rl 01PnIL86aX76QwpPl0xCb/NHpE9nE3fDgG8TDRX0N0WU3onXdtgrFCvSxeNeCLnZ1lUS OF/2TgWRCOMZpvD9Wy3HJchI+GCcPS+3hVL0gW9xtUS5LtfOIDe2BWdNmU9/qDsjawwf SfLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=JQprpMJD; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="WS5cyyD/"; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id k91-v6si1878778pld.248.2018.06.20.00.58.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 00:58:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=JQprpMJD; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="WS5cyyD/"; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HetkL/S4IKkrfPbXaF3GagfobnRNbNQ/VXSb0AM/HgE=; b=JQprpMJD8ExEodjaof8bB3v2/a 4uf8o39viLwEanurmhP9zO6ISgRcyqKanGufg525zkCWJXiX62MqEwBVONShKuF+XsyvSeJvL0Fbx cfvKCCWRKutwU37OMg7T2oDCELSTVSrIsRxH+RgtsJ7RtcSsJTdhdig2aEwPtWt9L/9oIV/L43f8i Rc4DrrBY4GROw5nJtgprypZ0fkwAopu9cdg2tJqZLWWZMzUzS1uBPIJooJZHCr2aCdMiBRLsHJDIS 4q7/+3JuaEzuPSOsbAMdGUIxW3INj6JXQwbNW/qwZ0Nnq02ZGUh3xWjUaajyBR0/pW5UWDEzuYnlJ tnDy3dNQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVY0r-000129-CJ; Wed, 20 Jun 2018 07:58:45 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVY0o-0000wE-CZ for wcn36xx@lists.infradead.org; Wed, 20 Jun 2018 07:58:43 +0000 Received: by mail-wm0-x242.google.com with SMTP id n5-v6so4956729wmc.5 for ; Wed, 20 Jun 2018 00:58:32 -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=vQkq6yOzQnFO6lik3psvlaTVGziFaiUuAKjdpOC2A7w=; b=WS5cyyD/NGGDn1RFw5f6n1poymwNDVwepcLiISmev6TmyyIwPZnp+AjpsXAsCwaT87 ilObv8OMN9dpil8T/3MH/WWQq5B988PSnQh2DqJvKj5jM0C2203pSFm2KfWgtZHcdMlk 4khY2CDWg/mYgzr+MZAIwjdxIWhupZsdEXXpw= 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=vQkq6yOzQnFO6lik3psvlaTVGziFaiUuAKjdpOC2A7w=; b=SSzNohKmiEJkcJJTpUIsRJ7r6q/R1Za9Buw1fAGE3hxtqgYp0lYOElHM3xjL/z3n9J rSd+dGWF87gYlk19+4zUrtymexI/V1GlOSCXTCmQaOIulx/KdlrVvtIz4+CyYmEvsoox ozjzM5qXh0Ubl2QYwbm9/RywnHUYW/18VV9nm96pZnbGg33J5n8GE3FqpJfQKS44er5o CHpOyI6SWCfhFltINWyCn9bS3t0vRdLYgks8NZTGirnY1cOvlw7xxM5uQi26qHjB75/D l7OanWa4CKbrADePgqA2McrvXz3QXXs5ZUb27AXo3wcAX3lz5BjXSnlhA4ZFlNRD7hLe VtUg== X-Gm-Message-State: APt69E3QFjaAEatTuNU7CUYzswvzOXh5rGEBg6LbCjgtMjMl9hxX+hSA m9AHPWWJ+pMY61ec3jIjeScd6Q== X-Received: by 2002:a1c:988d:: with SMTP id a135-v6mr866140wme.79.1529481510709; Wed, 20 Jun 2018 00:58:30 -0700 (PDT) Received: from lpoulain-ThinkPad-T470p.home (LFbn-1-2080-109.w90-76.abo.wanadoo.fr. [90.76.145.109]) by smtp.gmail.com with ESMTPSA id 12-v6sm2806393wmt.19.2018.06.20.00.58.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Jun 2018 00:58:30 -0700 (PDT) From: Loic Poulain To: kvalo@codeaurora.org Subject: [PATCH v2 2/3] wcn36xx: Track associated stations Date: Wed, 20 Jun 2018 09:57:59 +0200 Message-Id: <1529481480-13247-2-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529481480-13247-1-git-send-email-loic.poulain@linaro.org> References: <1529481480-13247-1-git-send-email-loic.poulain@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180620_005842_441826_2EE1A068 X-CRM114-Status: GOOD ( 10.89 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wcn36xx@lists.infradead.org, Loic Poulain , linux-wireless@vger.kernel.org, linux-arm-msm@vger.kernel.org MIME-Version: 1.0 Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Add list of associated stations(STA, AP, peer...) per vif. Signed-off-by: Loic Poulain --- v2: no change drivers/net/wireless/ath/wcn36xx/main.c | 5 +++++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 3 +++ 2 files changed, 8 insertions(+) -- 2.7.4 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 4648a78..6fd0bf6 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -567,6 +567,7 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, key_conf->keyidx, key_conf->keylen, key); + if ((WLAN_CIPHER_SUITE_WEP40 == key_conf->cipher) || (WLAN_CIPHER_SUITE_WEP104 == key_conf->cipher)) { sta_priv->is_data_encrypted = true; @@ -984,6 +985,7 @@ static int wcn36xx_add_interface(struct ieee80211_hw *hw, mutex_lock(&wcn->conf_mutex); vif_priv->bss_index = WCN36XX_HAL_BSS_INVALID_IDX; + INIT_LIST_HEAD(&vif_priv->sta_list); list_add(&vif_priv->list, &wcn->vif_list); wcn36xx_smd_add_sta_self(wcn, vif); @@ -1005,6 +1007,8 @@ static int wcn36xx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, spin_lock_init(&sta_priv->ampdu_lock); sta_priv->vif = vif_priv; + list_add(&sta_priv->list, &vif_priv->sta_list); + /* * For STA mode HW will be configured on BSS_CHANGED_ASSOC because * at this stage AID is not available yet. @@ -1032,6 +1036,7 @@ static int wcn36xx_sta_remove(struct ieee80211_hw *hw, mutex_lock(&wcn->conf_mutex); + list_del(&sta_priv->list); wcn36xx_smd_delete_sta(wcn, sta_priv->sta_index); sta_priv->vif = NULL; diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 11e7401..a58f313 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -129,6 +129,8 @@ struct wcn36xx_vif { u8 self_sta_index; u8 self_dpu_desc_index; u8 self_ucast_dpu_sign; + + struct list_head sta_list; }; /** @@ -154,6 +156,7 @@ struct wcn36xx_vif { * |______________|_____________|_______________| */ struct wcn36xx_sta { + struct list_head list; struct wcn36xx_vif *vif; u16 aid; u16 tid;