linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [RFCv2 05/13] cfg80211: introduce cfg80211_get_chan_state
Date: Wed, 20 Jun 2012 11:11:14 +0200	[thread overview]
Message-ID: <4FE193B2.6020000@tieto.com> (raw)
In-Reply-To: <1340180381.4655.25.camel@jlt3.sipsolutions.net>

Johannes Berg wrote:
> On Wed, 2012-06-20 at 08:14 +0200, Michal Kazior wrote:
>> Helper function for finding out which channel is
>> used by a given interface.
>>
>> An exclusive channel can be used only by a single
>> interface. This is mainly for non-fixed channel
>> IBSS handling.
>>
>> Signed-off-by: Michal Kazior<michal.kazior@tieto.com>
>> ---
>>   net/wireless/chan.c |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
>>   net/wireless/core.h |   12 ++++++++++++
>>   2 files changed, 63 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/wireless/chan.c b/net/wireless/chan.c
>> index c1999e4..167e7cb 100644
>> --- a/net/wireless/chan.c
>> +++ b/net/wireless/chan.c
>> @@ -92,3 +92,54 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev,
>>
>>   	return rdev->ops->set_monitor_channel(&rdev->wiphy, chan, chantype);
>>   }
>> +
>> +void
>> +cfg80211_get_chan_state(struct cfg80211_registered_device *rdev,
>> +		        struct wireless_dev *wdev,
>> +		        struct ieee80211_channel **chan,
>> +		        enum cfg80211_chan_mode *chanmode)
>
> Why not return the mode rather than void&  pointer?

I think returning the mode would be ambiguous - the function name isn't 
"get_chan_mode". chan_mode isn't a result on its own. But then again, 
it's just a matter of preference.


-- 
Pozdrawiam / Best regards, Michal Kazior.

  reply	other threads:[~2012-06-20  9:11 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  6:14 [RFCv2] respect channels in iface combinations Michal Kazior
2012-06-20  6:14 ` [RFCv2 01/13] cfg80211: introduce cfg80211_stop_ap Michal Kazior
2012-06-20  6:14 ` [RFCv2 02/13] cfg80211: .stop_ap when interface is going down Michal Kazior
2012-06-20  6:14 ` [RFCv2 03/13] cfg80211: add channel tracking for AP and mesh Michal Kazior
2012-06-20  8:18   ` Johannes Berg
2012-06-20  9:03     ` Michal Kazior
2012-06-20  9:09       ` Johannes Berg
2012-06-20  6:14 ` [RFCv2 04/13] cfg80211: track ibss fixed channel Michal Kazior
2012-06-20  6:14 ` [RFCv2 05/13] cfg80211: introduce cfg80211_get_chan_state Michal Kazior
2012-06-20  8:19   ` Johannes Berg
2012-06-20  9:11     ` Michal Kazior [this message]
2012-06-20  9:13       ` Johannes Berg
2012-06-20  6:14 ` [RFCv2 06/13] cfg80211: track monitor interfaces count Michal Kazior
2012-06-21 14:55   ` Johannes Berg
2012-06-20  6:14 ` [RFCv2 07/13] mac80211: refactor virtual monitor code Michal Kazior
2012-06-20  6:14 ` [RFCv2 08/13] cfg80211: refuse to .set_monitor_channel when non-monitors are present Michal Kazior
2012-06-20  6:14 ` [RFCv2 09/13] cfg80211: track monitor channel Michal Kazior
2012-06-20  6:14 ` [RFCv2 10/13] cfg80211: set initial " Michal Kazior
2012-06-21 14:57   ` Johannes Berg
2012-06-25  6:57     ` Michal Kazior
2012-06-25  7:28       ` Johannes Berg
2012-06-25  7:40         ` Michal Kazior
2012-06-25  7:41           ` Johannes Berg
2012-06-20  6:14 ` [RFCv2 11/13] cfg80211/mac80211: remove .get_channel Michal Kazior
2012-06-20  6:14 ` [RFCv2 12/13] cfg80211: add channel checking for iface combinations Michal Kazior
2012-06-21 15:03   ` Johannes Berg
2012-06-25  7:00     ` Michal Kazior
2012-06-20  6:14 ` [RFCv2 13/13] cfg80211: respect iface combinations when starting operation Michal Kazior
2012-06-21 15:06   ` Johannes Berg
2012-06-25  7:05     ` Michal Kazior
2012-06-25  7:27       ` Johannes Berg
2012-06-20  8:23 ` [RFCv2] respect channels in iface combinations Johannes Berg

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=4FE193B2.6020000@tieto.com \
    --to=michal.kazior@tieto.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.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).