linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 04/12] mac80211: prepare ieee80211_get_tx_channel_type to per-vif
@ 2012-03-19  9:22 Michal Kazior
  2012-03-23  8:37 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Kazior @ 2012-03-19  9:22 UTC (permalink / raw)
  To: linux-wireless

In preparation for multi-channel operation.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 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


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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19  9:22 [RFC 04/12] mac80211: prepare ieee80211_get_tx_channel_type to per-vif Michal Kazior
2012-03-23  8:37 ` Johannes Berg
2012-03-23 14:05   ` Michał Kazior
2012-03-23 14:10     ` Johannes Berg

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).