Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp545410ybl; Fri, 30 Aug 2019 03:43:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvZQNsnXpTYKc/A5MbvD2XShX6b77OZo43asMDPowSheFwxFmyjFgZAFMcMSGoY/PZlrVF X-Received: by 2002:a17:902:1101:: with SMTP id d1mr14747238pla.208.1567161786990; Fri, 30 Aug 2019 03:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567161786; cv=none; d=google.com; s=arc-20160816; b=GpxxjhZPAst0PXSucXsLtPErFxWd7mwSeEYzpYYREcOhLrGg+Zizs/uZTIa3vI0oLe J349pJWxOX+XMPFJyiC40fwpLrTh8WOfTWIgbFbJqSIrzbstKOw0Q3g88dmRzfB3awt7 NTTMYi8uCzYVN5xdTpfVj305WhG6DZGFsiHFns67gZbtXjOuMXkW1xj/6G2Y8tsVrAJq e5qaPX/TtH/QVqm6/QQPTed9R1NYGSlIXoCn6UDY2z3BbV6KWZJa8DS1R6zvw0pg3yWV sQUdrxaeYWLkkcZQ+mh8fiOHVnDPJfcI0T8g/EM/4C4XiHvsAkMQLUjrMjdDP5BzxGTB qT/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=1IAWpGf6NNUtX2VdyUfsjlkQl5767kBtvFz+5/deZyk=; b=dPneBw9nwwfaLFxZlZsMm+fbkIpbCod7qkaHUBghhJ1WxueZT1blAjfaEKUHWCTdnL 16wFBx2KXbu+esLOIo3EjDL0vTiLrQdS1iXSwhORYu3Wpkq6IW2GgEKygNRSOf3ZSNwS e5D5mMQfCJeMvnCXAREfLSC0ESX4CRF+AQ4757t152Chj/i/KpwlsiD4rDIlWcUBpEvG 7Kyc74vWCXMRBFqk6dXoVF9bSwlkxUaA9dzRpODpShRX8EEEwrmO6De0StlPgJ6U5lDj z8YXJrvaKuozP/56bXETLYJYPnDZy6AwBAcBT4ElYqAo87qFPD87P7t7kV/esfgHaX4d 2DAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x185si4322685pgb.161.2019.08.30.03.42.52; Fri, 30 Aug 2019 03:43:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727739AbfH3Klq (ORCPT + 99 others); Fri, 30 Aug 2019 06:41:46 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:34642 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727603AbfH3Klq (ORCPT ); Fri, 30 Aug 2019 06:41:46 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.1) (envelope-from ) id 1i3eLg-00046D-7h; Fri, 30 Aug 2019 12:41:44 +0200 Message-ID: <6222b9d9d125c4c3a9f60cc0fe73cef2011b9959.camel@sipsolutions.net> Subject: Re: [PATCH] cfg80211: Add new helper function for channels From: Johannes Berg To: Arend Van Spriel , Amar Singhal , jouni@codeaurora.org Cc: linux-wireless@vger.kernel.org, jjohnson@codeaurora.org, rmanohar@codeaurora.org Date: Fri, 30 Aug 2019 12:41:43 +0200 In-Reply-To: <01082dca-8d71-c674-1f61-ab5d7e07c007@broadcom.com> (sfid-20190830_124022_495117_5F33303B) References: <1567115381-7831-1-git-send-email-asinghal@codeaurora.org> <01082dca-8d71-c674-1f61-ab5d7e07c007@broadcom.com> (sfid-20190830_124022_495117_5F33303B) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 2019-08-30 at 12:40 +0200, Arend Van Spriel wrote: > > +EXPORT_SYMBOL(ieee80211_channel_op_class_to_frequency); > > The function ieee80211_operating_class_to_band() uses ranges within > switch statement, eg.: > > case 128 ... 130: > *band = NL80211_BAND_5GHZ; > return true; No that you remind me - how is this new function not just a composition of the existing ones? i.e. just convert the op_class to band first, and then (band, channel) to freq? johannes