2012-03-20 14:55:20

by Michal Kazior

[permalink] [raw]
Subject: [RFC 04/12] mac80211: prepare ieee80211_get_tx_channel_type to per-vif

In preparation for multi-channel operation.

Signed-off-by: Michal Kazior <[email protected]>
---
net/mac80211/chan.c | 4 +++-
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/mlme.c | 2 +-
net/mac80211/rx.c | 2 +-
4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index e00ce8c..421c64e 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -142,9 +142,11 @@ bool ieee80211_set_channel_type(struct ieee80211_local *local,
* whatever regulatory flags we have been given.
*/
enum nl80211_channel_type ieee80211_get_tx_channel_type(
- struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
enum nl80211_channel_type channel_type)
{
+ struct ieee80211_local *local = sdata->local;
+
switch (channel_type) {
case NL80211_CHAN_HT40PLUS:
if (local->hw.conf.channel->flags &
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 0ffee10..69a38be 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1504,7 +1504,7 @@ bool ieee80211_set_channel_type(struct ieee80211_local *local,
enum nl80211_channel_type
ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info);
enum nl80211_channel_type ieee80211_get_tx_channel_type(
- struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
enum nl80211_channel_type channel_type);

#ifdef CONFIG_MAC80211_NOINLINE
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 576fb25..9d0e865 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -234,7 +234,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
}
}

- tx_channel_type = ieee80211_get_tx_channel_type(local, rx_channel_type);
+ tx_channel_type = ieee80211_get_tx_channel_type(sdata, rx_channel_type);

if (local->tmp_channel)
local->tmp_channel_type = rx_channel_type;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index bcfe8c7..5749c74 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2273,7 +2273,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
local, sband, rx->sta,
IEEE80211_RC_SMPS_CHANGED,
ieee80211_get_tx_channel_type(
- local, local->_oper_channel_type));
+ sdata, local->_oper_channel_type));
goto handled;
}
default:
--
1.7.0.4



2012-03-23 14:05:12

by Michal Kazior

[permalink] [raw]
Subject: Re: [RFC 04/12] mac80211: prepare ieee80211_get_tx_channel_type to per-vif

Johannes Berg wrote:
>
>> enum nl80211_channel_type ieee80211_get_tx_channel_type(
>> - struct ieee80211_local *local,
>> + struct ieee80211_sub_if_data *sdata,
>> enum nl80211_channel_type channel_type)
>
> I have pending patches to delete this :)
>

You mean you have patches that remove the ieee80211_get_tx_channel_type
function? Are they accessible publicly or do you have them in your local
repository? Do you mind sharing them or are you going to push them soon?


-- Pozdrawiam / Best Regards, Michal Kazior.

2012-03-23 08:37:51

by Johannes Berg

[permalink] [raw]
Subject: Re: [RFC 04/12] mac80211: prepare ieee80211_get_tx_channel_type to per-vif


> enum nl80211_channel_type ieee80211_get_tx_channel_type(
> - struct ieee80211_local *local,
> + struct ieee80211_sub_if_data *sdata,
> enum nl80211_channel_type channel_type)

I have pending patches to delete this :)

johannes


2012-03-23 14:10:07

by Johannes Berg

[permalink] [raw]
Subject: Re: [RFC 04/12] mac80211: prepare ieee80211_get_tx_channel_type to per-vif

On Fri, 2012-03-23 at 15:05 +0100, MichaƂ Kazior wrote:
> Johannes Berg wrote:
> >
> >> enum nl80211_channel_type ieee80211_get_tx_channel_type(
> >> - struct ieee80211_local *local,
> >> + struct ieee80211_sub_if_data *sdata,
> >> enum nl80211_channel_type channel_type)
> >
> > I have pending patches to delete this :)
> >
>
> You mean you have patches that remove the ieee80211_get_tx_channel_type
> function? Are they accessible publicly or do you have them in your local
> repository? Do you mind sharing them or are you going to push them soon?

I sent them to the list as RFCs before, but you can also grab them at
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/
(HT cleanups / HT channel type changes)

johannes