From patchwork Mon May 28 11:29:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 137070 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2703109lji; Mon, 28 May 2018 04:29:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo5hkGhtqAIJ8Tf1+76fwZ9xWR08BHhKqGyxmX9jns+V5rObkZK6fv729WNbcgXM5HpgSDK X-Received: by 2002:a63:7f15:: with SMTP id a21-v6mr10263316pgd.21.1527506973131; Mon, 28 May 2018 04:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527506973; cv=none; d=google.com; s=arc-20160816; b=z7DgQC5gNnmAujR7nGPFoERW6A/hLl4mCX2p0NCYk5WjIsa+RwjF+5LII0Cv/MaffC /+/ZODe21iLjcQMbuh50Qw8rBvIQbL7aVK8cj1Wphko4ypiQOtFIl8aWn1St40QoYq9d XU7H9oG/2OCly1lyIvXy/eK6bBLjXqIwpYjCxxnrNKEynKSbx5ZomASCSg5tGiq1yXuz 5OBhrNvILLmC0GG0VmkbXdGO57uCUio7BBvy5DaJSU6Pyq0PpkShhVvMNOFJwj5Qe63z M6NXPWvVfrLTtAlk6/03p5PThdasF87V/Xx+hjEfgpt14k0K6Rz2BfU4HTodDg+oN0rT AzEg== 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=nB76wVnq+Y3AlRH8AQWxhFRuNZs+fIwBlZod3wDEJpQ=; b=zvSGAs54QRTvw25TvFdiSAWTsxH02Y70XTLDyOS0ZrY6VuN/c4cuBbjacWiwhbLQye bKBdmaM87/qBaNa6F3+Y91ytwzqpgJPgKc6s6o9WExwOVr/Hbqh8s0CRgkVnSi74oz6A nwm+NLwfYSJyxUv1edjmCkG+tE3baUrtdafaGYDPT4TRpHZhICPwJTb2BRE7f3bdveuA XdJzocW1hKngZcaw+dHM2yDXQN9BQqvn9pW0ERktR5hUi+UtDxcjGRZM5ejb24ZmDQav mn0+UmrfV6YT1IPO1jtBiHEMN5KUUanjduYOgqtLGDPX9oKAf11t9wEipQ+TztWRAHzq CxlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Da4xidRU; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 q3-v6si13505166plb.529.2018.05.28.04.29.32; Mon, 28 May 2018 04:29:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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 header.s=google header.b=Da4xidRU; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 S932647AbeE1L3b (ORCPT + 3 others); Mon, 28 May 2018 07:29:31 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:41547 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938294AbeE1L31 (ORCPT ); Mon, 28 May 2018 07:29:27 -0400 Received: by mail-wr0-f196.google.com with SMTP id u12-v6so19713270wrn.8 for ; Mon, 28 May 2018 04:29:26 -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=nB76wVnq+Y3AlRH8AQWxhFRuNZs+fIwBlZod3wDEJpQ=; b=Da4xidRUkTl71X8+pxaoEAlH+nQ9KK5G4MG0w9EEma6AhuPmUHNFY4+vKqqT9F3CTk 7yXge7YIAvBgqlNCinyZndCzRgBrQl3gGI2vP/zgJYQ6IbNXjaSDn+oL9isrmsTVxe3m pAE3xq4uNACy9c9wjjoULMV230md0Z8lW0RYw= 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=nB76wVnq+Y3AlRH8AQWxhFRuNZs+fIwBlZod3wDEJpQ=; b=KtVzhhslzDpATYip2SvTatjXuwnzkzT4KLVnAKt111bWk4WZHvt5v0C/2Ew8RJU11C oxUoWuBMJa+h9Sfw9RJNEuM/Be5MWNGp5bOQT5xhe9r4AUXCGqQCXAvGeNd6u2Lakm4C 3CeSDoveBwRdqfHPStNBsdJaNeaD7JMKlZSehVVFj7fZC933eL12bPjL2RqTSyzu7bwf /OtbbGiv826LDwqXGr9bZcuSCvHmpeSo3RneuPZiTqEjK9qFXCTQdgErj8uG4urfo5vA GYqp9QXl1/VDiDQgGCZpBwe58r7cULuYouZcQL50euDIFaN5KYmNAls83aJsIsXyZS96 H+wg== X-Gm-Message-State: ALKqPwezT8fM9wK08ZWZ3F/THnj6wEr+a2t4ztXVFD5JcCt7XmtUN8qo xDtu0AkVJAguWzUGUtyU9GMJJfWvuHs= X-Received: by 2002:adf:c4b6:: with SMTP id m51-v6mr9963766wrf.103.1527506966197; Mon, 28 May 2018 04:29:26 -0700 (PDT) Received: from lpoulain-ThinkPad-T470p.home (LFbn-1-10589-161.w90-89.abo.wanadoo.fr. [90.89.181.161]) by smtp.gmail.com with ESMTPSA id c18-v6sm16020324wrq.17.2018.05.28.04.29.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 May 2018 04:29:25 -0700 (PDT) From: Loic Poulain To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, linux-arm-msm@vger.kernel.org, Loic Poulain Subject: [PATCH 2/3] wcn36xx: Track associated stations Date: Mon, 28 May 2018 13:29:19 +0200 Message-Id: <1527506960-13358-2-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527506960-13358-1-git-send-email-loic.poulain@linaro.org> References: <1527506960-13358-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 Add list of associated stations(STA, AP, peer...) per vif. Signed-off-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/main.c | 5 +++++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 3 +++ 2 files changed, 8 insertions(+) -- 2.7.4 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;