aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c53d77db3e4f..9ab49826c15a 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -516,7 +516,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
516 sband = tx->local->hw.wiphy->bands[tx->channel->band]; 516 sband = tx->local->hw.wiphy->bands[tx->channel->band];
517 517
518 len = min_t(int, tx->skb->len + FCS_LEN, 518 len = min_t(int, tx->skb->len + FCS_LEN,
519 tx->local->fragmentation_threshold); 519 tx->local->hw.wiphy->frag_threshold);
520 520
521 /* set up the tx rate control struct we give the RC algo */ 521 /* set up the tx rate control struct we give the RC algo */
522 txrc.hw = local_to_hw(tx->local); 522 txrc.hw = local_to_hw(tx->local);
@@ -527,8 +527,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
527 txrc.max_rate_idx = tx->sdata->max_ratectrl_rateidx; 527 txrc.max_rate_idx = tx->sdata->max_ratectrl_rateidx;
528 528
529 /* set up RTS protection if desired */ 529 /* set up RTS protection if desired */
530 if (tx->local->rts_threshold < IEEE80211_MAX_RTS_THRESHOLD && 530 if (len > tx->local->hw.wiphy->rts_threshold) {
531 len > tx->local->rts_threshold) {
532 txrc.rts = rts = true; 531 txrc.rts = rts = true;
533 } 532 }
534 533
@@ -770,7 +769,7 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)
770 struct sk_buff *skb = tx->skb; 769 struct sk_buff *skb = tx->skb;
771 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 770 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
772 struct ieee80211_hdr *hdr = (void *)skb->data; 771 struct ieee80211_hdr *hdr = (void *)skb->data;
773 int frag_threshold = tx->local->fragmentation_threshold; 772 int frag_threshold = tx->local->hw.wiphy->frag_threshold;
774 int hdrlen; 773 int hdrlen;
775 int fragnum; 774 int fragnum;
776 775
@@ -1088,7 +1087,7 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
1088 1087
1089 if (tx->flags & IEEE80211_TX_FRAGMENTED) { 1088 if (tx->flags & IEEE80211_TX_FRAGMENTED) {
1090 if ((tx->flags & IEEE80211_TX_UNICAST) && 1089 if ((tx->flags & IEEE80211_TX_UNICAST) &&
1091 skb->len + FCS_LEN > local->fragmentation_threshold && 1090 skb->len + FCS_LEN > local->hw.wiphy->frag_threshold &&
1092 !(info->flags & IEEE80211_TX_CTL_AMPDU)) 1091 !(info->flags & IEEE80211_TX_CTL_AMPDU))
1093 tx->flags |= IEEE80211_TX_FRAGMENTED; 1092 tx->flags |= IEEE80211_TX_FRAGMENTED;
1094 else 1093 else