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: 10476513 X-Patchwork-Delegate: kvalo@adurom.com 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 9117160383 for ; Wed, 20 Jun 2018 08:48:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81C512855D for ; Wed, 20 Jun 2018 08:48:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7631D28571; Wed, 20 Jun 2018 08:48:29 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham 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 0E4C52855D for ; Wed, 20 Jun 2018 08:48:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932554AbeFTIs1 (ORCPT ); Wed, 20 Jun 2018 04:48:27 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36230 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932224AbeFTIsZ (ORCPT ); Wed, 20 Jun 2018 04:48:25 -0400 Received: by mail-wm0-f67.google.com with SMTP id v131-v6so5295259wma.1 for ; Wed, 20 Jun 2018 01:48:25 -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=IHa6OqDfUWyIP5W6efyewJnq8EtmUFhCXuWUQpUiu+a9VavF/NhaCOIFeGGoYSkGhP UTSrZXzasmQ9lIxyqM8Q9BrqGiR/15aLD3cOr2yq9dcyqLpgH9aHJw4UlyE14HU+WGD+ +WNRyzzdQFJVJCleCBjYiZMh2IjKJblLF+t4UrmyNjOJhyrtSGMdbVpVHsLPjQWLU6Yx 9iB9t7ymF+JCHE4x27W8ghL7niNyPCwC7ruydNFvUnmJClS0/hDKIngUCedxNVCG+jln esSgp/VE3MlpQCm+eKF0tdRWYr9df3odYAvw1M3X0/i0/Q4/TagGhTHUaXhS9cq2RTmI iIHg== X-Gm-Message-State: APt69E02byBBWKM3Jj989lAA12DGgHcl+hBw+z3G0KXdOOLiNzhbV79Z VKzQ9cwvI3h9pLBTBTNLFvmTn2VMwOk= 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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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;