Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1098422pxk; Fri, 18 Sep 2020 03:50:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDEhRMscAciZQDBHyr2saTWgnlbdqf/3w+eWQ+pnYKCwnX8rWvA+VZpiFuLLSSq8zoKinm X-Received: by 2002:a05:6402:1110:: with SMTP id u16mr37753946edv.253.1600426222813; Fri, 18 Sep 2020 03:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600426222; cv=none; d=google.com; s=arc-20160816; b=vGRlPG/BLTe/cBulRMsoWQgCpbdZh288n8ET17lM86e7jphOW7h4VapNkYpBFzmB+x QrQfk3kf9TnRwDWGkYRN/+GXxDalngaHL83aFDtbh7/fxMdlMl0TEdR8SkXB7eIoXK4d rlE8uQ4JmVrHvynznZtIfAzdeaWus0UUb52fEF1ljvSxg8FgQjcADsmCJ/hu9+2N8nHm vC6/M9gPsyaQ4/BSI1btV8XNVMs1QxX+1zLX/YOjK7gZBFZuUFRMYp9baG3GfRnvrEkk ZRlrdD7GMgKNv5EdKZEL3uddMdu2H2BcjSKQJ6njPMuOZXlVJblmokW9srAWXO3vyC5Z 1FYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=LW8ZlilV4rCQzO6MLFogX4Trque4GU2TFcfhNmaol9w=; b=BR3QHy5KYwWi/PQLuX3AmSUJFC1UT13FheUhvvr6ewR2QxbfRxvGL+53aR8AQteuUD Pyrz1bRllfV8ag/4vJu2SDv3pUh0lZCeFXK5nDcfL48asKEHCbwSvhioaye7tqg20T1y 3dYjFPAt/XOST2RaPBeNpwA3D1poyr54vdtavBc/t1otwbzXarhsAeeoUE22PWw90ddP 7VB/btG4FmHUshKa60qH255jRLx20Zghi0m3Do7itBDySv3YtUx0M5+e8FJNWxRgi3n3 JQpBDcQc9MiCe5onDYI9vqbDXbCnnR62+HGswJW6ILtvbF4owTfB4humpsW5Ze/43Xn/ UXTg== 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 c23si1977560edn.110.2020.09.18.03.49.58; Fri, 18 Sep 2020 03:50:22 -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 S1726390AbgIRKsp (ORCPT + 99 others); Fri, 18 Sep 2020 06:48:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbgIRKso (ORCPT ); Fri, 18 Sep 2020 06:48:44 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9E48C06174A for ; Fri, 18 Sep 2020 03:48:44 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJDwZ-006CjO-1t; Fri, 18 Sep 2020 12:48:43 +0200 Message-ID: <07751701c06d14e39c956369e5b1dd2a066fd69e.camel@sipsolutions.net> Subject: Re: [PATCH v2 12/22] mac80211: convert S1G beacon to scan results From: Johannes Berg To: Thomas Pedersen Cc: linux-wireless Date: Fri, 18 Sep 2020 12:48:42 +0200 In-Reply-To: <20200831205600.21058-13-thomas@adapt-ip.com> References: <20200831205600.21058-1-thomas@adapt-ip.com> <20200831205600.21058-13-thomas@adapt-ip.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, 2020-08-31 at 13:55 -0700, Thomas Pedersen wrote: > > + if (!elems->parse_error && elems->s1g_capab) > + bss->s1g = true; It seems odd to set this only if it's in error - why not always set it if the band is right? In fact, why set it at all, since you always know the band? > + case WLAN_EID_S1G_CAPABILITIES: > + if (elen == 15) > + elems->s1g_capab = (void *)pos; > + else > + elem_parse_failed = true; > + break; > + case WLAN_EID_S1G_OPERATION: > + if (elen == 6) > + elems->s1g_oper = (void *)pos; > + else > + elem_parse_failed = true; > + break; > + case WLAN_EID_S1G_SHORT_BCN_INTERVAL: > + if (elen == 2) > + elems->s1g_tsbtt = (void *)pos; > + else > + elem_parse_failed = true; > + break; Seems like you ought to have some structs/sizeof or defines for the sizes? johannes