diff options
Diffstat (limited to 'net/mac80211/mesh_pathtbl.c')
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 479597e88583..04b9e4d61b8e 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -55,7 +55,25 @@ static DEFINE_RWLOCK(pathtbl_resize_lock); | |||
55 | */ | 55 | */ |
56 | void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta) | 56 | void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta) |
57 | { | 57 | { |
58 | struct sk_buff *skb; | ||
59 | struct ieee80211_hdr *hdr; | ||
60 | struct sk_buff_head tmpq; | ||
61 | unsigned long flags; | ||
62 | |||
58 | rcu_assign_pointer(mpath->next_hop, sta); | 63 | rcu_assign_pointer(mpath->next_hop, sta); |
64 | |||
65 | __skb_queue_head_init(&tmpq); | ||
66 | |||
67 | spin_lock_irqsave(&mpath->frame_queue.lock, flags); | ||
68 | |||
69 | while ((skb = __skb_dequeue(&mpath->frame_queue)) != NULL) { | ||
70 | hdr = (struct ieee80211_hdr *) skb->data; | ||
71 | memcpy(hdr->addr1, sta->sta.addr, ETH_ALEN); | ||
72 | __skb_queue_tail(&tmpq, skb); | ||
73 | } | ||
74 | |||
75 | skb_queue_splice(&tmpq, &mpath->frame_queue); | ||
76 | spin_unlock_irqrestore(&mpath->frame_queue.lock, flags); | ||
59 | } | 77 | } |
60 | 78 | ||
61 | 79 | ||
@@ -481,11 +499,9 @@ enddel: | |||
481 | */ | 499 | */ |
482 | void mesh_path_tx_pending(struct mesh_path *mpath) | 500 | void mesh_path_tx_pending(struct mesh_path *mpath) |
483 | { | 501 | { |
484 | struct sk_buff *skb; | 502 | if (mpath->flags & MESH_PATH_ACTIVE) |
485 | 503 | ieee80211_add_pending_skbs(mpath->sdata->local, | |
486 | while ((skb = skb_dequeue(&mpath->frame_queue)) && | 504 | &mpath->frame_queue); |
487 | (mpath->flags & MESH_PATH_ACTIVE)) | ||
488 | dev_queue_xmit(skb); | ||
489 | } | 505 | } |
490 | 506 | ||
491 | /** | 507 | /** |