diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 01e7a734f867..ddb104a70161 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -173,7 +173,7 @@ static u16 ieee80211_duration(struct ieee80211_txrx_data *tx, int group_addr, | |||
173 | * to closest integer */ | 173 | * to closest integer */ |
174 | 174 | ||
175 | dur = ieee80211_frame_duration(local, 10, rate, erp, | 175 | dur = ieee80211_frame_duration(local, 10, rate, erp, |
176 | tx->sdata->short_preamble); | 176 | tx->sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE); |
177 | 177 | ||
178 | if (next_frag_len) { | 178 | if (next_frag_len) { |
179 | /* Frame is fragmented: duration increases with time needed to | 179 | /* Frame is fragmented: duration increases with time needed to |
@@ -181,8 +181,9 @@ static u16 ieee80211_duration(struct ieee80211_txrx_data *tx, int group_addr, | |||
181 | dur *= 2; /* ACK + SIFS */ | 181 | dur *= 2; /* ACK + SIFS */ |
182 | /* next fragment */ | 182 | /* next fragment */ |
183 | dur += ieee80211_frame_duration(local, next_frag_len, | 183 | dur += ieee80211_frame_duration(local, next_frag_len, |
184 | txrate->rate, erp, | 184 | txrate->rate, erp, |
185 | tx->sdata->short_preamble); | 185 | tx->sdata->flags & |
186 | IEEE80211_SDATA_SHORT_PREAMBLE); | ||
186 | } | 187 | } |
187 | 188 | ||
188 | return dur; | 189 | return dur; |
@@ -613,7 +614,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx) | |||
613 | if (!tx->u.tx.rate) | 614 | if (!tx->u.tx.rate) |
614 | return TXRX_DROP; | 615 | return TXRX_DROP; |
615 | if (tx->u.tx.mode->mode == MODE_IEEE80211G && | 616 | if (tx->u.tx.mode->mode == MODE_IEEE80211G && |
616 | tx->sdata->use_protection && | 617 | (tx->sdata->flags & IEEE80211_SDATA_USE_PROTECTION) && |
617 | (tx->flags & IEEE80211_TXRXD_FRAGMENTED) && extra.nonerp) { | 618 | (tx->flags & IEEE80211_TXRXD_FRAGMENTED) && extra.nonerp) { |
618 | tx->u.tx.last_frag_rate = tx->u.tx.rate; | 619 | tx->u.tx.last_frag_rate = tx->u.tx.rate; |
619 | if (extra.probe) | 620 | if (extra.probe) |
@@ -670,7 +671,7 @@ ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx) | |||
670 | if (mode->mode == MODE_IEEE80211G && | 671 | if (mode->mode == MODE_IEEE80211G && |
671 | (tx->u.tx.rate->flags & IEEE80211_RATE_ERP) && | 672 | (tx->u.tx.rate->flags & IEEE80211_RATE_ERP) && |
672 | (tx->flags & IEEE80211_TXRXD_TXUNICAST) && | 673 | (tx->flags & IEEE80211_TXRXD_TXUNICAST) && |
673 | tx->sdata->use_protection && | 674 | (tx->sdata->flags & IEEE80211_SDATA_USE_PROTECTION) && |
674 | !(control->flags & IEEE80211_TXCTL_USE_RTS_CTS)) | 675 | !(control->flags & IEEE80211_TXCTL_USE_RTS_CTS)) |
675 | control->flags |= IEEE80211_TXCTL_USE_CTS_PROTECT; | 676 | control->flags |= IEEE80211_TXCTL_USE_CTS_PROTECT; |
676 | 677 | ||
@@ -679,7 +680,7 @@ ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx) | |||
679 | * available on the network at the current point in time. */ | 680 | * available on the network at the current point in time. */ |
680 | if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && | 681 | if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && |
681 | (tx->u.tx.rate->flags & IEEE80211_RATE_PREAMBLE2) && | 682 | (tx->u.tx.rate->flags & IEEE80211_RATE_PREAMBLE2) && |
682 | tx->sdata->short_preamble && | 683 | (tx->sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE) && |
683 | (!tx->sta || (tx->sta->flags & WLAN_STA_SHORT_PREAMBLE))) { | 684 | (!tx->sta || (tx->sta->flags & WLAN_STA_SHORT_PREAMBLE))) { |
684 | tx->u.tx.control->tx_rate = tx->u.tx.rate->val2; | 685 | tx->u.tx.control->tx_rate = tx->u.tx.rate->val2; |
685 | } | 686 | } |
@@ -1777,8 +1778,9 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, int if_id, | |||
1777 | return NULL; | 1778 | return NULL; |
1778 | } | 1779 | } |
1779 | 1780 | ||
1780 | control->tx_rate = (sdata->short_preamble && | 1781 | control->tx_rate = |
1781 | (rate->flags & IEEE80211_RATE_PREAMBLE2)) ? | 1782 | ((sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE) && |
1783 | (rate->flags & IEEE80211_RATE_PREAMBLE2)) ? | ||
1782 | rate->val2 : rate->val; | 1784 | rate->val2 : rate->val; |
1783 | control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; | 1785 | control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; |
1784 | control->power_level = local->hw.conf.power_level; | 1786 | control->power_level = local->hw.conf.power_level; |