Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp565406ybl; Fri, 30 Aug 2019 04:03:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCldDp/dx+iw+QexWYJ7xTQRVRO6Qd1XQ6XeuGesRHsOuScTSscEriWpIiCGHN4DDAtWl+ X-Received: by 2002:a17:902:2be6:: with SMTP id l93mr15443023plb.0.1567163025537; Fri, 30 Aug 2019 04:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567163025; cv=none; d=google.com; s=arc-20160816; b=CEU67PjxinhvfTM76yLb33nBxeCYbHE08mk7Eut3/b9n+uHxSPBriuMG789oBUr8zI WqNYvdHNPrs8NNCTRZp21YSvhXg2d2rUF156cgQrstPv7WtZ81f5gdMzk67coGC+mkV7 ASzfKERfMCnrqcors4w19fIMdd23z/mmgRYSWBbSmItaJ0GeMb3VeOJvsHR770Yew3tp yGkvWHriQbiVfvpOKB9sUW6IJlNGsMmhulGvAcsuAfVZPjCxJRExP88pzJjKZFHlea5k IgZ8qXJiaqofQsB6MwImIDme3/cbhz5MqLVskZ0xRbQtdE2L/EpSxB8zbaZvJeQLnKL3 626g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=/6rJXpyU5uSX2XcxIQgLawITemN1VdIxT4IEdo6B2gU=; b=vLy/JAV3LHrL2xa0k/R2pyBoloSwIWMOwaBmr5xjW/HXSsdGU5mwDsj3BM0FAK7I0q Eo3/DcjNlntzkfW633tpMKAZHqawKYQHvNj7LUByDrnIOMFyOrWXv5UDJmRaJ+2TfFnc lW1dypTPtlEfXWtuTOXleJpjyPgPosuUPpcWliqb4qOtDkLm28ELmfF19p4umjOxySpD Sxbt5w0UhzK+qtbzTbNKRCKN1IMaYUpkwNoauda0RuiECQQqdAobM8y8UOdYKGjAi/hh VKt4afcOYJP0FP6HO7odkixz3Y5/lY5b+XkGlviM1HASSG6RgxRtp4X9chMFp3DNk96s DjqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=eFtQ08oj; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si4620633pgr.297.2019.08.30.04.03.22; Fri, 30 Aug 2019 04:03:45 -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=@broadcom.com header.s=google header.b=eFtQ08oj; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726969AbfH3LDQ (ORCPT + 99 others); Fri, 30 Aug 2019 07:03:16 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34106 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbfH3LDQ (ORCPT ); Fri, 30 Aug 2019 07:03:16 -0400 Received: by mail-wm1-f67.google.com with SMTP id y135so4138388wmc.1 for ; Fri, 30 Aug 2019 04:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/6rJXpyU5uSX2XcxIQgLawITemN1VdIxT4IEdo6B2gU=; b=eFtQ08ojUVQt8ea227d+CptaFRmOsqkNVx4PccUle/1H7XSsdAPi35yI/aFjzgkb/E SFw9r/Zc/BaQCeB6T0qv0TKVGaqzCnEMBIp1kunajZIKAXiCPBUds4FtRcAi7pIAEXVO hy4ZFw5Vp2xCWnk05Q+70noj7qvT4ZX3eOJaI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/6rJXpyU5uSX2XcxIQgLawITemN1VdIxT4IEdo6B2gU=; b=c99GHguAGIS7LBy8mQhSoRlJ6SJc/FLXnUPuj+ujc0FXUT8QVCXfAGL5BxLV2rJN04 L2AktI38vitUsiwKZDRYtsrTVTF2DRtvaXKeKjf/3O7blEd5WO9/+i/xFFjm9UKHzip1 okZmMDUWZ8OCGRldfwpBhg9rvF032cRlVWnaEZaFYbhV5AVemeUZztiL6ImnMuyxWkxm n9+he14qB+qR1/aVMtlzlG5fRwbKZzVMhAaxX3pugi1wRFyt5RU2eFpFn9LkLiE634Eq LyhPhomkjzMc7Y8MEL2cbLFqcC7ByFqcxPtJ02vCrF/z5QMBZllsdTJ17kMVfU5qEJIP brYg== X-Gm-Message-State: APjAAAWsLvBLZ4Iu4TUn9JQBEOKmdL2JFYwIsJkKfO537W/DIor2wC3e 8i17XO275GiuBBxSQaoXrztxQA== X-Received: by 2002:a1c:4c04:: with SMTP id z4mr17550297wmf.1.1567162994262; Fri, 30 Aug 2019 04:03:14 -0700 (PDT) Received: from [10.176.68.244] ([192.19.248.250]) by smtp.gmail.com with ESMTPSA id n9sm5834526wrp.54.2019.08.30.04.03.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Aug 2019 04:03:13 -0700 (PDT) Subject: Re: [PATCH] cfg80211: Add new helper function for channels To: Johannes Berg , Amar Singhal , jouni@codeaurora.org Cc: linux-wireless@vger.kernel.org, jjohnson@codeaurora.org, rmanohar@codeaurora.org References: <1567115381-7831-1-git-send-email-asinghal@codeaurora.org> <01082dca-8d71-c674-1f61-ab5d7e07c007@broadcom.com> <6222b9d9d125c4c3a9f60cc0fe73cef2011b9959.camel@sipsolutions.net> From: Arend Van Spriel Message-ID: <9a9c8024-a9f9-72f9-557a-c185dca9c15c@broadcom.com> Date: Fri, 30 Aug 2019 13:03:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <6222b9d9d125c4c3a9f60cc0fe73cef2011b9959.camel@sipsolutions.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 8/30/2019 12:41 PM, Johannes Berg wrote: > 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? yup. that would have my preference actually. Regards, Arend