linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Johnson <jjohnson@codeaurora.org>
To: Arend Van Spriel <arend.vanspriel@broadcom.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Amar Singhal <asinghal@codeaurora.org>,
	jouni@codeaurora.org, linux-wireless@vger.kernel.org,
	rmanohar@codeaurora.org
Subject: Re: [PATCH] cfg80211: Add new helper function for channels
Date: Fri, 30 Aug 2019 07:09:38 -0700	[thread overview]
Message-ID: <3a609ec7d068dbc97597a0dcb147e839@codeaurora.org> (raw)
In-Reply-To: <9a9c8024-a9f9-72f9-557a-c185dca9c15c@broadcom.com>

On 2019-08-30 04:03, Arend Van Spriel wrote:
> 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.

Sigh. I had the same guidance in pre-review:

we already have ieee80211_operating_class_to_band() and 
ieee80211_channel_to_frequency() so all this function should be is

  return ieee80211_channel_to_frequency(chan, 
ieee80211_operating_class_to_band(op_class))

but then again if anybody needs this functionality they can simply call 
those same functions

      reply	other threads:[~2019-08-30 14:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 21:49 [PATCH] cfg80211: Add new helper function for channels Amar Singhal
2019-08-30  7:16 ` Johannes Berg
2019-08-30 10:40 ` Arend Van Spriel
2019-08-30 10:41   ` Johannes Berg
2019-08-30 11:03     ` Arend Van Spriel
2019-08-30 14:09       ` Jeff Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a609ec7d068dbc97597a0dcb147e839@codeaurora.org \
    --to=jjohnson@codeaurora.org \
    --cc=arend.vanspriel@broadcom.com \
    --cc=asinghal@codeaurora.org \
    --cc=johannes@sipsolutions.net \
    --cc=jouni@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rmanohar@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).