aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-09 05:39:59 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-26 06:42:59 -0500
commit4bf88530be971bf95a7830ca61b4120980bf4347 (patch)
tree405d426806cb76551d09f427dafeeee79dac0dea /net/mac80211/ieee80211_i.h
parent3d9d1d6656a73ea8407734cfb00b81d14ef62d4b (diff)
mac80211: convert to channel definition struct
Convert mac80211 (and where necessary, some drivers a little bit) to the new channel definition struct. This will allow extending mac80211 for VHT, which is currently restricted to channel contexts since there are no drivers using that which makes it easier. As I also don't care about VHT for drivers not using the channel context API, I won't convert the previous API to VHT support. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index fba4b1f425c1..0a8f83d142f9 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -799,7 +799,7 @@ ieee80211_get_sdata_band(struct ieee80211_sub_if_data *sdata)
799 rcu_read_lock(); 799 rcu_read_lock();
800 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); 800 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
801 if (!WARN_ON(!chanctx_conf)) 801 if (!WARN_ON(!chanctx_conf))
802 band = chanctx_conf->channel->band; 802 band = chanctx_conf->def.chan->band;
803 rcu_read_unlock(); 803 rcu_read_unlock();
804 804
805 return band; 805 return band;
@@ -1156,8 +1156,7 @@ struct ieee80211_local {
1156 1156
1157 /* virtual monitor interface */ 1157 /* virtual monitor interface */
1158 struct ieee80211_sub_if_data __rcu *monitor_sdata; 1158 struct ieee80211_sub_if_data __rcu *monitor_sdata;
1159 struct ieee80211_channel *monitor_channel; 1159 struct cfg80211_chan_def monitor_chandef;
1160 enum nl80211_channel_type monitor_channel_type;
1161}; 1160};
1162 1161
1163static inline struct ieee80211_sub_if_data * 1162static inline struct ieee80211_sub_if_data *
@@ -1514,7 +1513,7 @@ static inline void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
1514 } 1513 }
1515 1514
1516 __ieee80211_tx_skb_tid_band(sdata, skb, tid, 1515 __ieee80211_tx_skb_tid_band(sdata, skb, tid,
1517 chanctx_conf->channel->band); 1516 chanctx_conf->def.chan->band);
1518 rcu_read_unlock(); 1517 rcu_read_unlock();
1519} 1518}
1520 1519
@@ -1603,8 +1602,7 @@ size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);
1603u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, 1602u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1604 u16 cap); 1603 u16 cap);
1605u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, 1604u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1606 struct ieee80211_channel *channel, 1605 const struct cfg80211_chan_def *chandef,
1607 enum nl80211_channel_type channel_type,
1608 u16 prot_mode); 1606 u16 prot_mode);
1609u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, 1607u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
1610 u32 cap); 1608 u32 cap);
@@ -1616,13 +1614,13 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
1616 enum ieee80211_band band); 1614 enum ieee80211_band band);
1617 1615
1618/* channel management */ 1616/* channel management */
1619enum nl80211_channel_type 1617void ieee80211_ht_oper_to_chandef(struct ieee80211_channel *control_chan,
1620ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper); 1618 struct ieee80211_ht_operation *ht_oper,
1619 struct cfg80211_chan_def *chandef);
1621 1620
1622int __must_check 1621int __must_check
1623ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata, 1622ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata,
1624 struct ieee80211_channel *channel, 1623 const struct cfg80211_chan_def *chandef,
1625 enum nl80211_channel_type channel_type,
1626 enum ieee80211_chanctx_mode mode); 1624 enum ieee80211_chanctx_mode mode);
1627void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata); 1625void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata);
1628 1626