Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2898728pxk; Sun, 20 Sep 2020 22:53:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxo7Ez4lvBIcK4q5LHI0sBRgb3P75i3E7PgNdatRsyBzRnzDOMSsFDks+dCxpWcemjOzrn X-Received: by 2002:a50:d65e:: with SMTP id c30mr51093787edj.57.1600667582374; Sun, 20 Sep 2020 22:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600667582; cv=none; d=google.com; s=arc-20160816; b=EOGCISNTipDUcyyxzIFpKqkPTq/Yym/b83WNKxSBc+0Dyt0bHjBGsZooxekBklijdz UJl5QDa1oTPHFSXSstGgnD5z8ENlVkK/kftKlQNUaacHBPq705B3QDfVMkKeJFuRHA1q He9aQFCz40qSOjbk5zPX/Itc+Yjel4Jy05VZnzJqPWBOtp4JImY5vyZMfFyX9QTG6L+6 CdH0HKYrhVh3HaNI8AsGUau3rPBK6LVHM+pNYRM/mGwHBrwHgjP22pG8GACmjRWQ7Q0l W8vP3JWkmpguw+DJKEbgdG0SVfaJcn8wijrH18uoans0MA3XShxAZ961BBf7LLPByegL G20g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version; bh=rKBS1MMUM47uQWFJd2OXLDX8vBzjd6FDqcm9ACF3qBA=; b=Sg9DKdc63vzYaNoRKqYD+/A7ryeSd0+t0iCeZVdgan2ROCVaUIXkXti2vlXZAL7iOO TdgE9ETa7TWj+NNDUGdq863MqRvYj7FXEtVXmUYd79Z1EOjq6cx5S41nVndXvxWxY5cp b3Ykh4V3Y228kOGv51GW96aTPClw6Yqd4+DuTUAcDI0uDiPmvCMTOjnd7RY2IQOa6Lav me2UDi5HNW63kYQqo6r972KWtbo5wFKqkhynjnN6FUqQL+Yaa+cir3LrwQwCLji7eXtj ffjYoJ9qM4xtIHICsQ3DIrddl6iqQ6SLWO4E6MPBghBBYFdG70eFwrV5ZMJN6//W6bPU MxGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si7419301eji.486.2020.09.20.22.52.37; Sun, 20 Sep 2020 22:53:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726236AbgIUFwb (ORCPT + 99 others); Mon, 21 Sep 2020 01:52:31 -0400 Received: from mail.adapt-ip.com ([173.164.178.19]:46266 "EHLO web.adapt-ip.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726011AbgIUFwb (ORCPT ); Mon, 21 Sep 2020 01:52:31 -0400 Received: from localhost (localhost [127.0.0.1]) by web.adapt-ip.com (Postfix) with ESMTP id 123DA4F9B64; Mon, 21 Sep 2020 05:52:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at web.adapt-ip.com Received: from web.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9X4sIG438GQo; Mon, 21 Sep 2020 05:52:28 +0000 (UTC) Received: from mail.ibsgaard.io (c-73-223-60-234.hsd1.ca.comcast.net [73.223.60.234]) (Authenticated sender: thomas@adapt-ip.com) by web.adapt-ip.com (Postfix) with ESMTPSA id 742434F9809; Mon, 21 Sep 2020 05:52:28 +0000 (UTC) MIME-Version: 1.0 Date: Sun, 20 Sep 2020 22:52:27 -0700 From: Thomas Pedersen To: Johannes Berg Cc: linux-wireless Subject: Re: [PATCH v2 13/22] cfg80211: handle Association Response from S1G STA In-Reply-To: <5025b542741e18d0f329b5a1f5d110fd6a1eeae0.camel@sipsolutions.net> References: <20200831205600.21058-1-thomas@adapt-ip.com> <20200831205600.21058-14-thomas@adapt-ip.com> <5025b542741e18d0f329b5a1f5d110fd6a1eeae0.camel@sipsolutions.net> User-Agent: Roundcube Webmail/1.4.7 Message-ID: <3c9d0c4d8a16d9777db112f72cf13cef@adapt-ip.com> X-Sender: thomas@adapt-ip.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2020-09-18 03:50, Johannes Berg wrote: > On Mon, 2020-08-31 at 13:55 -0700, Thomas Pedersen wrote: >> >> + /* Detect whether this was an S1G Association Response and adjust IE >> + * location accordingly. >> + */ >> + rcu_read_lock(); >> + ies = rcu_dereference(bss->ies); >> + if (WARN_ON(!ies)) { >> + rcu_read_unlock(); >> + return; >> + } >> + s1g = cfg80211_find_ie(WLAN_EID_S1G_CAPABILITIES, ies->data, >> ies->len); >> + if (s1g) { >> + cr.resp_ie = (u8 *)&mgmt->u.s1g_assoc_resp.variable; >> + cr.resp_ie_len = >> + len - offsetof(struct ieee80211_mgmt, >> + u.s1g_assoc_resp.variable); >> + } >> + rcu_read_unlock(); > > That ... is rather strange? > > Why not check bss->channel->band? Thanks! That saves a lot of work :) -- thomas