diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-12-28 08:32:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:43 -0500 |
commit | 471b3efdfccc257591331724145f8ccf8b3217e1 (patch) | |
tree | c9e576442c7b62c8c667ae1046e560323f0821fd /net/mac80211/tx.c | |
parent | 2bc454b0b30b3645d114689b64321cb49be99923 (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.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 51c0f00d02d1..f9088fe34d59 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, | |||
176 | * to closest integer */ | 176 | * to closest integer */ |
177 | 177 | ||
178 | dur = ieee80211_frame_duration(local, 10, rate, erp, | 178 | dur = ieee80211_frame_duration(local, 10, rate, erp, |
179 | tx->sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE); | 179 | tx->sdata->bss_conf.use_short_preamble); |
180 | 180 | ||
181 | if (next_frag_len) { | 181 | if (next_frag_len) { |
182 | /* Frame is fragmented: duration increases with time needed to | 182 | /* 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, | |||
185 | /* next fragment */ | 185 | /* next fragment */ |
186 | dur += ieee80211_frame_duration(local, next_frag_len, | 186 | dur += ieee80211_frame_duration(local, next_frag_len, |
187 | txrate->rate, erp, | 187 | txrate->rate, erp, |
188 | tx->sdata->flags & | 188 | tx->sdata->bss_conf.use_short_preamble); |
189 | IEEE80211_SDATA_SHORT_PREAMBLE); | ||
190 | } | 189 | } |
191 | 190 | ||
192 | return dur; | 191 | return dur; |
@@ -605,7 +604,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx) | |||
605 | tx->u.tx.control->alt_retry_rate = -1; | 604 | tx->u.tx.control->alt_retry_rate = -1; |
606 | 605 | ||
607 | if (tx->u.tx.mode->mode == MODE_IEEE80211G && | 606 | if (tx->u.tx.mode->mode == MODE_IEEE80211G && |
608 | (tx->sdata->flags & IEEE80211_SDATA_USE_PROTECTION) && | 607 | tx->sdata->bss_conf.use_cts_prot && |
609 | (tx->flags & IEEE80211_TXRXD_FRAGMENTED) && rsel.nonerp) { | 608 | (tx->flags & IEEE80211_TXRXD_FRAGMENTED) && rsel.nonerp) { |
610 | tx->u.tx.last_frag_rate = tx->u.tx.rate; | 609 | tx->u.tx.last_frag_rate = tx->u.tx.rate; |
611 | if (rsel.probe) | 610 | if (rsel.probe) |
@@ -667,7 +666,7 @@ ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx) | |||
667 | if (mode->mode == MODE_IEEE80211G && | 666 | if (mode->mode == MODE_IEEE80211G && |
668 | (tx->u.tx.rate->flags & IEEE80211_RATE_ERP) && | 667 | (tx->u.tx.rate->flags & IEEE80211_RATE_ERP) && |
669 | (tx->flags & IEEE80211_TXRXD_TXUNICAST) && | 668 | (tx->flags & IEEE80211_TXRXD_TXUNICAST) && |
670 | (tx->sdata->flags & IEEE80211_SDATA_USE_PROTECTION) && | 669 | tx->sdata->bss_conf.use_cts_prot && |
671 | !(control->flags & IEEE80211_TXCTL_USE_RTS_CTS)) | 670 | !(control->flags & IEEE80211_TXCTL_USE_RTS_CTS)) |
672 | control->flags |= IEEE80211_TXCTL_USE_CTS_PROTECT; | 671 | control->flags |= IEEE80211_TXCTL_USE_CTS_PROTECT; |
673 | 672 | ||
@@ -676,7 +675,7 @@ ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx) | |||
676 | * available on the network at the current point in time. */ | 675 | * available on the network at the current point in time. */ |
677 | if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && | 676 | if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && |
678 | (tx->u.tx.rate->flags & IEEE80211_RATE_PREAMBLE2) && | 677 | (tx->u.tx.rate->flags & IEEE80211_RATE_PREAMBLE2) && |
679 | (tx->sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE) && | 678 | tx->sdata->bss_conf.use_short_preamble && |
680 | (!tx->sta || (tx->sta->flags & WLAN_STA_SHORT_PREAMBLE))) { | 679 | (!tx->sta || (tx->sta->flags & WLAN_STA_SHORT_PREAMBLE))) { |
681 | tx->u.tx.control->tx_rate = tx->u.tx.rate->val2; | 680 | tx->u.tx.control->tx_rate = tx->u.tx.rate->val2; |
682 | } | 681 | } |
@@ -1754,7 +1753,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1754 | } | 1753 | } |
1755 | 1754 | ||
1756 | control->tx_rate = | 1755 | control->tx_rate = |
1757 | ((sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE) && | 1756 | (sdata->bss_conf.use_short_preamble && |
1758 | (rsel.rate->flags & IEEE80211_RATE_PREAMBLE2)) ? | 1757 | (rsel.rate->flags & IEEE80211_RATE_PREAMBLE2)) ? |
1759 | rsel.rate->val2 : rsel.rate->val; | 1758 | rsel.rate->val2 : rsel.rate->val; |
1760 | control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; | 1759 | control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; |