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: 10476599 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A46AA60383 for ; Wed, 20 Jun 2018 08:59:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57740285BE for ; Wed, 20 Jun 2018 08:59:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C39C285D9; Wed, 20 Jun 2018 08:59:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7914285BE for ; Wed, 20 Jun 2018 08:58:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754490AbeFTI64 (ORCPT ); Wed, 20 Jun 2018 04:58:56 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:39099 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753569AbeFTI6j (ORCPT ); Wed, 20 Jun 2018 04:58:39 -0400 Received: by mail-wm0-f67.google.com with SMTP id p11-v6so5314618wmc.4 for ; Wed, 20 Jun 2018 01:58:38 -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=cyOov6pZLQJyy3IWaRjWWQNkwFBP08TtLzzzE5Fdo5dmFdsF0xcsVIGDre5dqQ0erX StUm0jp8q9T/6q9yK2q+2DneBBXZqYksEO/V0ZDD4WZVQ0/rAfLfHxOujcZlKdRmlqS+ b8+gH5xAaMM/mgqM8++5li/ExQhe9vInjlqZF8+GK84RVBM3bBhOg49JIaL2gF+xkgBg +u4AH77NSZ6IPY6p0dVarfMOGBDYbU7p3+cjRIm6LCdfTGNXRlalXhPutTTuGlBHcPYz pftsZLl/uYXPlf7RrqEKQlqwegTPKGXuSJp5Eo4iUVpRVhFnVT+iRh4zCu9okWOmEweG zmNQ== X-Gm-Message-State: APt69E2Qkcl90I+QlIL3ylVIA3JWjRJ704eeOItb+9dLQKbpa6NKjDl9 s+CbjuJKCBpcXn5QRmQbTA43UJv+lqk= X-Google-Smtp-Source: ADUXVKK2Tmba7ockKiJnHLxFUbO/JKdwweNzW4Aq53NLcGWAeCYAoHZNWOBzCRGnMMYKjTxcj8Jj1w== 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 Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-arm-msm@vger.kernel.org, Loic Poulain 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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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;