diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 0cc2e23f082c..1460537faf33 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -454,15 +454,16 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
454 | if (unlikely(rsel.probe_idx >= 0)) { | 454 | if (unlikely(rsel.probe_idx >= 0)) { |
455 | info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; | 455 | info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; |
456 | tx->flags |= IEEE80211_TX_PROBE_LAST_FRAG; | 456 | tx->flags |= IEEE80211_TX_PROBE_LAST_FRAG; |
457 | info->control.alt_retry_rate_idx = tx->rate_idx; | 457 | info->control.retries[0].rate_idx = tx->rate_idx; |
458 | info->control.retries[0].limit = tx->local->hw.max_altrate_tries; | ||
458 | tx->rate_idx = rsel.probe_idx; | 459 | tx->rate_idx = rsel.probe_idx; |
459 | } else | 460 | } else if (info->control.retries[0].limit == 0) |
460 | info->control.alt_retry_rate_idx = -1; | 461 | info->control.retries[0].rate_idx = -1; |
461 | 462 | ||
462 | if (unlikely(tx->rate_idx < 0)) | 463 | if (unlikely(tx->rate_idx < 0)) |
463 | return TX_DROP; | 464 | return TX_DROP; |
464 | } else | 465 | } else |
465 | info->control.alt_retry_rate_idx = -1; | 466 | info->control.retries[0].rate_idx = -1; |
466 | 467 | ||
467 | if (tx->sdata->bss_conf.use_cts_prot && | 468 | if (tx->sdata->bss_conf.use_cts_prot && |
468 | (tx->flags & IEEE80211_TX_FRAGMENTED) && (rsel.nonerp_idx >= 0)) { | 469 | (tx->flags & IEEE80211_TX_FRAGMENTED) && (rsel.nonerp_idx >= 0)) { |
@@ -521,7 +522,7 @@ ieee80211_tx_h_misc(struct ieee80211_tx_data *tx) | |||
521 | * frames. | 522 | * frames. |
522 | * TODO: The last fragment could still use multiple retry | 523 | * TODO: The last fragment could still use multiple retry |
523 | * rates. */ | 524 | * rates. */ |
524 | info->control.alt_retry_rate_idx = -1; | 525 | info->control.retries[0].rate_idx = -1; |
525 | } | 526 | } |
526 | 527 | ||
527 | /* Use CTS protection for unicast frames sent using extended rates if | 528 | /* Use CTS protection for unicast frames sent using extended rates if |
@@ -551,7 +552,7 @@ ieee80211_tx_h_misc(struct ieee80211_tx_data *tx) | |||
551 | int idx; | 552 | int idx; |
552 | 553 | ||
553 | /* Do not use multiple retry rates when using RTS/CTS */ | 554 | /* Do not use multiple retry rates when using RTS/CTS */ |
554 | info->control.alt_retry_rate_idx = -1; | 555 | info->control.retries[0].rate_idx = -1; |
555 | 556 | ||
556 | /* Use min(data rate, max base rate) as CTS/RTS rate */ | 557 | /* Use min(data rate, max base rate) as CTS/RTS rate */ |
557 | rate = &sband->bitrates[tx->rate_idx]; | 558 | rate = &sband->bitrates[tx->rate_idx]; |
@@ -1255,8 +1256,7 @@ static int ieee80211_skb_resize(struct ieee80211_local *local, | |||
1255 | return 0; | 1256 | return 0; |
1256 | } | 1257 | } |
1257 | 1258 | ||
1258 | int ieee80211_master_start_xmit(struct sk_buff *skb, | 1259 | int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev) |
1259 | struct net_device *dev) | ||
1260 | { | 1260 | { |
1261 | struct ieee80211_master_priv *mpriv = netdev_priv(dev); | 1261 | struct ieee80211_master_priv *mpriv = netdev_priv(dev); |
1262 | struct ieee80211_local *local = mpriv->local; | 1262 | struct ieee80211_local *local = mpriv->local; |
@@ -1296,20 +1296,16 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, | |||
1296 | 1296 | ||
1297 | if (ieee80211_vif_is_mesh(&osdata->vif) && | 1297 | if (ieee80211_vif_is_mesh(&osdata->vif) && |
1298 | ieee80211_is_data(hdr->frame_control)) { | 1298 | ieee80211_is_data(hdr->frame_control)) { |
1299 | if (ieee80211_is_data(hdr->frame_control)) { | 1299 | if (is_multicast_ether_addr(hdr->addr3)) |
1300 | if (is_multicast_ether_addr(hdr->addr3)) | 1300 | memcpy(hdr->addr1, hdr->addr3, ETH_ALEN); |
1301 | memcpy(hdr->addr1, hdr->addr3, ETH_ALEN); | 1301 | else |
1302 | else | 1302 | if (mesh_nexthop_lookup(skb, osdata)) |
1303 | if (mesh_nexthop_lookup(skb, osdata)) | 1303 | return 0; |
1304 | return 0; | 1304 | if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0) |
1305 | if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0) | 1305 | IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.mesh, |
1306 | IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.mesh, | 1306 | fwded_frames); |
1307 | fwded_frames); | ||
1308 | } | ||
1309 | } else if (unlikely(osdata->vif.type == NL80211_IFTYPE_MONITOR)) { | 1307 | } else if (unlikely(osdata->vif.type == NL80211_IFTYPE_MONITOR)) { |
1310 | struct ieee80211_sub_if_data *sdata; | 1308 | struct ieee80211_sub_if_data *sdata; |
1311 | struct ieee80211_local *local = osdata->local; | ||
1312 | struct ieee80211_hdr *hdr; | ||
1313 | int hdrlen; | 1309 | int hdrlen; |
1314 | u16 len_rthdr; | 1310 | u16 len_rthdr; |
1315 | 1311 | ||