diff options
author | Javier Cardona <javier@cozybit.com> | 2009-08-11 04:29:29 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 17:14:03 +0400 |
commit | cca89496a8afe4ad12ce1e468e60cef1e27e4eee (patch) | |
tree | 5dc3fc6541e2afaf66b500a922844d37dad89826 /net/mac80211 | |
parent | 1fe90b033e04d7402b3deb392420fe2ff57986a5 (diff) | |
download | linux-cca89496a8afe4ad12ce1e468e60cef1e27e4eee.tar.xz |
mac80211: Fix unresolved mesh frames queued without valid control.vif
Mesh frames that could not be immediately resolved were queued with a NULL
info->control.vif. This patch moves the call to mesh_nexthop_lookup closer to
the point where it is handed over to ieee80211_tx(). This ensures that the
unresolved frames are ready to be sent once the path is resolved.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-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 ee8aa76f071a..0c08d1e60cb5 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1412,14 +1412,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; - if (ieee80211_vif_is_mesh(&sdata->vif) && - ieee80211_is_data(hdr->frame_control)) { - if (!is_multicast_ether_addr(hdr->addr1)) - if (mesh_nexthop_lookup(skb, sdata)) { - dev_put(sdata->dev); - return; - } - } else if (unlikely(sdata->vif.type == NL80211_IFTYPE_MONITOR)) { + if (unlikely(sdata->vif.type == NL80211_IFTYPE_MONITOR)) { int hdrlen; u16 len_rthdr; @@ -1476,6 +1469,15 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, info->control.vif = &sdata->vif; + if (ieee80211_vif_is_mesh(&sdata->vif) && + ieee80211_is_data(hdr->frame_control) && + !is_multicast_ether_addr(hdr->addr1)) + if (mesh_nexthop_lookup(skb, sdata)) { + /* skb queued: don't free */ + dev_put(sdata->dev); + return; + } + ieee80211_select_queue(local, skb); ieee80211_tx(sdata, skb, false); dev_put(sdata->dev); |