All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 12/12] mac80211: return NULL from get_channel in multi-channel
@ 2012-03-19 12:57 Michal Kazior
  2012-03-23  8:54 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Kazior @ 2012-03-19 12:57 UTC (permalink / raw)
  To: linux-wireless

According to comment on cfg80211_ops/get_channel we should return NULL
in case of concurrent multi-channel.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 net/mac80211/cfg.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 88cc128..05f7022 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2680,6 +2680,9 @@ ieee80211_wiphy_get_channel(struct wiphy *wiphy)
 	struct ieee80211_local *local = wiphy_priv(wiphy);
 	struct ieee80211_channel_state *chan_state = &local->chan_state;
 
+	if (local->hw.flags & IEEE80211_HW_SUPPORTS_MULTI_CHANNEL)
+		return NULL;
+
 	return chan_state->oper_channel;
 }
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC 12/12] mac80211: return NULL from get_channel in multi-channel
  2012-03-19 12:57 [RFC 12/12] mac80211: return NULL from get_channel in multi-channel Michal Kazior
@ 2012-03-23  8:54 ` Johannes Berg
  2012-03-23  9:19   ` Michał Kazior
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2012-03-23  8:54 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless

On Mon, 2012-03-19 at 13:57 +0100, Michal Kazior wrote:
> According to comment on cfg80211_ops/get_channel we should return NULL
> in case of concurrent multi-channel.
> 
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
> ---
>  net/mac80211/cfg.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index 88cc128..05f7022 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -2680,6 +2680,9 @@ ieee80211_wiphy_get_channel(struct wiphy *wiphy)
>  	struct ieee80211_local *local = wiphy_priv(wiphy);
>  	struct ieee80211_channel_state *chan_state = &local->chan_state;
>  
> +	if (local->hw.flags & IEEE80211_HW_SUPPORTS_MULTI_CHANNEL)
> +		return NULL;
> +

We should return NULL if we're actually using multiple channels :-)

So clearly we need mac80211 do more work in tracking which channels are
used, compatible, etc.

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 12/12] mac80211: return NULL from get_channel in multi-channel
  2012-03-23  8:54 ` Johannes Berg
@ 2012-03-23  9:19   ` Michał Kazior
  2012-03-23  9:26     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Kazior @ 2012-03-23  9:19 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org

Johannes Berg wrote:
> On Mon, 2012-03-19 at 13:57 +0100, Michal Kazior wrote:
>> According to comment on cfg80211_ops/get_channel we should return NULL
>> in case of concurrent multi-channel.
>>
>> Signed-off-by: Michal Kazior<michal.kazior@tieto.com>
>> ---
>>   net/mac80211/cfg.c |    3 +++
>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
>> index 88cc128..05f7022 100644
>> --- a/net/mac80211/cfg.c
>> +++ b/net/mac80211/cfg.c
>> @@ -2680,6 +2680,9 @@ ieee80211_wiphy_get_channel(struct wiphy *wiphy)
>>   	struct ieee80211_local *local = wiphy_priv(wiphy);
>>   	struct ieee80211_channel_state *chan_state =&local->chan_state;
>>
>> +	if (local->hw.flags&  IEEE80211_HW_SUPPORTS_MULTI_CHANNEL)
>> +		return NULL;
>> +
>
> We should return NULL if we're actually using multiple channels :-)
>
> So clearly we need mac80211 do more work in tracking which channels are
> used, compatible, etc.

Oh. So will it be enough to iterate through the interfaces that are up 
and check if they have different operational channels?


-- Pozdrawiam / Best Regards, Michal Kazior.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 12/12] mac80211: return NULL from get_channel in multi-channel
  2012-03-23  9:19   ` Michał Kazior
@ 2012-03-23  9:26     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2012-03-23  9:26 UTC (permalink / raw)
  To: Michał Kazior; +Cc: linux-wireless@vger.kernel.org

On Fri, 2012-03-23 at 10:19 +0100, Michał Kazior wrote:
> Johannes Berg wrote:
> > On Mon, 2012-03-19 at 13:57 +0100, Michal Kazior wrote:
> >> According to comment on cfg80211_ops/get_channel we should return NULL
> >> in case of concurrent multi-channel.
> >>
> >> Signed-off-by: Michal Kazior<michal.kazior@tieto.com>
> >> ---
> >>   net/mac80211/cfg.c |    3 +++
> >>   1 files changed, 3 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> >> index 88cc128..05f7022 100644
> >> --- a/net/mac80211/cfg.c
> >> +++ b/net/mac80211/cfg.c
> >> @@ -2680,6 +2680,9 @@ ieee80211_wiphy_get_channel(struct wiphy *wiphy)
> >>   	struct ieee80211_local *local = wiphy_priv(wiphy);
> >>   	struct ieee80211_channel_state *chan_state =&local->chan_state;
> >>
> >> +	if (local->hw.flags&  IEEE80211_HW_SUPPORTS_MULTI_CHANNEL)
> >> +		return NULL;
> >> +
> >
> > We should return NULL if we're actually using multiple channels :-)
> >
> > So clearly we need mac80211 do more work in tracking which channels are
> > used, compatible, etc.
> 
> Oh. So will it be enough to iterate through the interfaces that are up 
> and check if they have different operational channels?

Technically, yes. But again, I think we need to take a more involved
channel management approach in mac80211, managing compatible channels
etc.

You've also completely ignored the need to tell userspace about what
exactly the hardware supports, which was part of the original design of
the multi-vif feature listing.

But when you think about that, you'll soon notice that this minimal
approach won't work, what for example if a third interface gets added?
With this approach you won't even know if it's on a third channel or
not. Keep in mind that the driver only has limited ways of rejecting
such configuration.


(And as an aside that just crossed my mind: there's also the CSA
handling, but I'm happy to mostly ignore that for now too -- we'll have
to come up with a solution later.)

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-23  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 12:57 [RFC 12/12] mac80211: return NULL from get_channel in multi-channel Michal Kazior
2012-03-23  8:54 ` Johannes Berg
2012-03-23  9:19   ` Michał Kazior
2012-03-23  9:26     ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.