Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278423
b: refs/heads/master
c: 7e3c886
h: refs/heads/master
i:
  278421: 9e9c46d
  278419: c2a49b7
  278415: 95f0fb5
v: v3
  • Loading branch information
Thomas Pedersen authored and John W. Linville committed Nov 28, 2011
1 parent 6bace51 commit 3893c3e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4bb62344e4703414fd253ceb07c163ac37da80d4
refs/heads/master: 7e3c88660b5b90f437cf466b1805089ccb764ee3
5 changes: 3 additions & 2 deletions trunk/net/mac80211/mesh_hwmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,9 +1029,10 @@ int mesh_nexthop_lookup(struct sk_buff *skb,
PREQ_Q_F_START | PREQ_Q_F_REFRESH);
}
next_hop = rcu_dereference(mpath->next_hop);
if (next_hop)
if (next_hop) {
memcpy(hdr->addr1, next_hop->sta.addr, ETH_ALEN);
else
memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
} else
err = -ENOENT;
} else {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/mac80211/mesh_pathtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta)
while ((skb = __skb_dequeue(&mpath->frame_queue)) != NULL) {
hdr = (struct ieee80211_hdr *) skb->data;
memcpy(hdr->addr1, sta->sta.addr, ETH_ALEN);
memcpy(hdr->addr2, mpath->sdata->vif.addr, ETH_ALEN);
__skb_queue_tail(&tmpq, skb);
}

Expand Down Expand Up @@ -264,6 +265,7 @@ static void prepare_for_gate(struct sk_buff *skb, char *dst_addr,
next_hop = rcu_dereference(gate_mpath->next_hop)->sta.addr;
memcpy(hdr->addr1, next_hop, ETH_ALEN);
rcu_read_unlock();
memcpy(hdr->addr2, gate_mpath->sdata->vif.addr, ETH_ALEN);
memcpy(hdr->addr3, dst_addr, ETH_ALEN);
}

Expand Down Expand Up @@ -990,7 +992,7 @@ void mesh_path_discard_frame(struct sk_buff *skb,
u8 *ra, *da;

da = hdr->addr3;
ra = hdr->addr1;
ra = hdr->addr2;
rcu_read_lock();
mpath = mesh_path_lookup(da, sdata);
if (mpath) {
Expand All @@ -999,7 +1001,7 @@ void mesh_path_discard_frame(struct sk_buff *skb,
spin_unlock_bh(&mpath->state_lock);
}
rcu_read_unlock();
mesh_path_error_tx(sdata->u.mesh.mshcfg.element_ttl, skb->data,
mesh_path_error_tx(sdata->u.mesh.mshcfg.element_ttl, da,
cpu_to_le32(sn), reason, ra, sdata);
}

Expand Down
8 changes: 1 addition & 7 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1974,7 +1974,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
goto out;

fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data;
memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
info = IEEE80211_SKB_CB(fwd_skb);
memset(info, 0, sizeof(*info));
info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
Expand All @@ -1983,14 +1982,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
if (is_multicast_ether_addr(fwd_hdr->addr1)) {
IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
fwded_mcast);
memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
} else {
int err;
/*
* Save TA to addr1 to send TA a path error if a
* suitable next hop is not found
*/
memcpy(fwd_hdr->addr1, fwd_hdr->addr2,
ETH_ALEN);
err = mesh_nexthop_lookup(fwd_skb, sdata);
/* Failed to immediately resolve next hop:
* fwded frame was dropped or will be added
Expand Down

0 comments on commit 3893c3e

Please sign in to comment.