Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5408799ybi; Wed, 12 Jun 2019 01:57:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2Ds8KIkZxum0CRxR/oqA22Pxryf/t14zjG3UEvyIKHsZxAdl7ru/8yj11MT8s0plp0p50 X-Received: by 2002:a17:902:624:: with SMTP id 33mr81721706plg.325.1560329836634; Wed, 12 Jun 2019 01:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560329836; cv=none; d=google.com; s=arc-20160816; b=qpwJoWoWeic6FbM+rlOy85J7rccgxSpQWtOVeJstMvlPmN+Y4QhzKbOKS32/ttnrKo 3PTb45WBSJ1SpfJERgP3VvyBKfh54hKTLNA6G3lMfLxZsCyqPzgJzYn7BDu37LsESUrX Yz7SRzSszD/zIV1r11p2TvKekZMXqb1WoA3UwxverBJ6uxCjYwvoBHtbZ/ddNiDi0mHw VUwoSHCJB0Bm0iOzdYSXRoGLtxzenbe0vbpaYVOD/dM08I6kpRcDDF5tEmAqe+gnfYq9 PerKI5LYrHg0PyNydMt9rjzRO7XJURg9wo86yRZ5aJ3Jbl0CzRXEISsapw3mypNiGuSY 6Ubg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=IzmLCFkQwyEca4au8kdIhJg3l5dQHfwFaqkjjCuLNlM=; b=w/Y1bKt3yuFYI1zHyP1g60VaE9//OVdk3Ndu6pM3/CzwCajW26pTx8MwqLMMEeZr39 UxrI2xkLCI+jcJlFXjGVW4q5y27Mvgnhqho08oSGoGjsgECZCapQCcNbzt43HzoeKfDC vh3a5ECzzu8iFvq9TAP1XNpZTuErppJY95yWIfDWFepPSjk5Ab6zYmx2BS82hqtrEPPJ kKxsnLqywDAHrV8KRSLHV1WOZo1O4ED4aCMH7XGjW7u1gg9aZneZqvZmaEn4aolkSGRY wmLCnK5BOL0RldhrnJItu+6WJZMXg6RvxX+/b03OQ40wOYxYaHe8cI6ehSs4TthUTffc TiuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si10298031plo.100.2019.06.12.01.57.01; Wed, 12 Jun 2019 01:57:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731477AbfFLIiH (ORCPT + 99 others); Wed, 12 Jun 2019 04:38:07 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:48079 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1731305AbfFLIiF (ORCPT ); Wed, 12 Jun 2019 04:38:05 -0400 X-UUID: 0fee5e1d994d40a2be57483e599bfb28-20190612 X-UUID: 0fee5e1d994d40a2be57483e599bfb28-20190612 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1668390797; Wed, 12 Jun 2019 16:38:01 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 12 Jun 2019 16:37:58 +0800 Received: from [172.21.77.33] (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 12 Jun 2019 16:37:58 +0800 Message-ID: <1560328678.4743.6.camel@mtkswgap22> Subject: Re: [PATCH 2/2] mt76: mt7615: update peer's bssid when state transition changes From: Ryder Lee To: Lorenzo Bianconi CC: Sean Wang , YF Luo , , , Yiwei Chung , , Roy Luo , Lorenzo Bianconi , "Felix Fietkau" Date: Wed, 12 Jun 2019 16:37:58 +0800 In-Reply-To: <20190612082618.GA8107@localhost.localdomain> References: <3065a01998dfa04a5d2d680e820a17cb5c110d0f.1560221172.git.ryder.lee@mediatek.com> <449fee28c558b6f02b62275f9beefaab02b47efc.1560221172.git.ryder.lee@mediatek.com> <20190612082618.GA8107@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-TM-SNTS-SMTP: 72901263F5700DB435DA5D08E473CCAD7D900AD367C6200865E79A301332B9AA2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-06-12 at 10:26 +0200, Lorenzo Bianconi wrote: > > Driver should update peer's bssid and bss information when > > state transition changes. > > > > Signed-off-by: Ryder Lee > > --- > > .../net/wireless/mediatek/mt76/mt7615/main.c | 5 +- > > .../net/wireless/mediatek/mt76/mt7615/mcu.c | 49 ++++++++++--------- > > 2 files changed, 27 insertions(+), 27 deletions(-) > > > > [...] > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > > index e82086eb8aa4..8fc12cd37906 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > > @@ -741,17 +741,6 @@ int mt7615_mcu_set_bss_info(struct mt7615_dev *dev, > > u8 *buf, *data, tx_wlan_idx = 0; > > struct req_hdr *hdr; > > > > - if (en) { > > - len += sizeof(struct bss_info_omac); > > - features |= BIT(BSS_INFO_OMAC); > > - if (mvif->omac_idx > EXT_BSSID_START) { > > - len += sizeof(struct bss_info_ext_bss); > > - features |= BIT(BSS_INFO_EXT_BSS); > > - ntlv++; > > - } > > - ntlv++; > > - } > > - > > switch (vif->type) { > > case NL80211_IFTYPE_AP: > > case NL80211_IFTYPE_MESH_POINT: > > @@ -759,22 +748,23 @@ int mt7615_mcu_set_bss_info(struct mt7615_dev *dev, > > conn_type = CONNECTION_INFRA_AP; > > break; > > case NL80211_IFTYPE_STATION: { > > - struct ieee80211_sta *sta; > > - struct mt7615_sta *msta; > > - > > - rcu_read_lock(); > > - > > - sta = ieee80211_find_sta(vif, vif->bss_conf.bssid); > > - if (!sta) { > > + /* TODO: enable BSS_INFO_UAPSD & BSS_INFO_PM */ > > + if (en) { > > + struct ieee80211_sta *sta; > > + struct mt7615_sta *msta; > > + > > + rcu_read_lock(); > > + sta = ieee80211_find_sta(vif, vif->bss_conf.bssid); > > + if (!sta) { > > + rcu_read_unlock(); > > + return -EINVAL; > > + } > > + > > + msta = (struct mt7615_sta *)sta->drv_priv; > > + tx_wlan_idx = msta->wcid.idx; > > rcu_read_unlock(); > > - return -EINVAL; > > } > > - > > - msta = (struct mt7615_sta *)sta->drv_priv; > > - tx_wlan_idx = msta->wcid.idx; > > conn_type = CONNECTION_INFRA_STA; > > - > > - rcu_read_unlock(); > > break; > > } > > default: > > @@ -782,6 +772,17 @@ int mt7615_mcu_set_bss_info(struct mt7615_dev *dev, > > break; > > } > > > > + if (en) { > > + len += sizeof(struct bss_info_omac); > > + features |= BIT(BSS_INFO_OMAC); > > + if (mvif->omac_idx > EXT_BSSID_START) { > > + len += sizeof(struct bss_info_ext_bss); > > + features |= BIT(BSS_INFO_EXT_BSS); > > + ntlv++; > > + } > > + ntlv++; > > + } > > What did you move this chunk down? Ah, my bad. I originally planned to add other conditions and it may change 'en' so moved these stuff behind them. Anyway I forgot to remove this part. Will fix it Ryder. > Regards, > Lorenzo > > > + > > buf = kzalloc(len, GFP_KERNEL); > > if (!buf) > > return -ENOMEM; > > -- > > 2.18.0 > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek