aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-12-28 14:32:58 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:09:43 -0800
commit471b3efdfccc257591331724145f8ccf8b3217e1 (patch)
treec9e576442c7b62c8c667ae1046e560323f0821fd /net/mac80211/tx.c
parent2bc454b0b30b3645d114689b64321cb49be99923 (diff)
mac80211: add unified BSS configuration
This patch (based on Ron Rindjunsky's) creates a framework for a unified way to pass BSS configuration to drivers that require the information, e.g. for implementing power save mode. This patch introduces new ieee80211_bss_conf structure that is passed to the driver via the new bss_info_changed() callback when the BSS configuration changes. This new BSS configuration infrastructure adds the following new features: * drivers are notified of their association AID * drivers are notified of association status and replaces the erp_ie_changed() callback. The patch also does the relevant driver updates for the latter change. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 51c0f00d02d..f9088fe34d5 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -176,7 +176,7 @@ static u16 ieee80211_duration(struct ieee80211_txrx_data *tx, int group_addr,
* to closest integer */
dur = ieee80211_frame_duration(local, 10, rate, erp,
- tx->sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE);
+ tx->sdata->bss_conf.use_short_preamble);
if (next_frag_len) {
/* Frame is fragmented: duration increases with time needed to
@@ -185,8 +185,7 @@ static u16 ieee80211_duration(struct ieee80211_txrx_data *tx, int group_addr,
/* next fragment */
dur += ieee80211_frame_duration(local, next_frag_len,
txrate->rate, erp,
- tx->sdata->flags &
- IEEE80211_SDATA_SHORT_PREAMBLE);
+ tx->sdata->bss_conf.use_short_preamble);
}
return dur;
@@ -605,7 +604,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx)
tx->u.tx.control->alt_retry_rate = -1;
if (tx->u.tx.mode->mode == MODE_IEEE80211G &&
- (tx->sdata->flags & IEEE80211_SDATA_USE_PROTECTION) &&
+ tx->sdata->bss_conf.use_cts_prot &&
(tx->flags & IEEE80211_TXRXD_FRAGMENTED) && rsel.nonerp) {
tx->u.tx.last_frag_rate = tx->u.tx.rate;
if (rsel.probe)
@@ -667,7 +666,7 @@ ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx)
if (mode->mode == MODE_IEEE80211G &&
(tx->u.tx.rate->flags & IEEE80211_RATE_ERP) &&
(tx->flags & IEEE80211_TXRXD_TXUNICAST) &&
- (tx->sdata->flags & IEEE80211_SDATA_USE_PROTECTION) &&
+ tx->sdata->bss_conf.use_cts_prot &&
!(control->flags & IEEE80211_TXCTL_USE_RTS_CTS))
control->flags |= IEEE80211_TXCTL_USE_CTS_PROTECT;
@@ -676,7 +675,7 @@ ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx)
* available on the network at the current point in time. */
if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) &&
(tx->u.tx.rate->flags & IEEE80211_RATE_PREAMBLE2) &&
- (tx->sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE) &&
+ tx->sdata->bss_conf.use_short_preamble &&
(!tx->sta || (tx->sta->flags & WLAN_STA_SHORT_PREAMBLE))) {
tx->u.tx.control->tx_rate = tx->u.tx.rate->val2;
}
@@ -1754,7 +1753,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
}
control->tx_rate =
- ((sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE) &&
+ (sdata->bss_conf.use_short_preamble &&
(rsel.rate->flags & IEEE80211_RATE_PREAMBLE2)) ?
rsel.rate->val2 : rsel.rate->val;
control->antenna_sel_tx = local->hw.conf.antenna_sel_tx;