mac80211: use put_unaligned_le in mesh when necessary
PATCH 1/1 mac80211: use put_unaligned_le in mesh when necessary
Use put_unaligned_le16 and put_unaligned_le32 formesh_path_error_tx and mesh_path_sel_frame_tx.
Signed-off-by Chun-Yeow Yeoh <[email protected]>
--- net/mac80211/mesh.h | 4 +- net/mac80211/mesh_hwmp.c | 87 ++++++++++++++++++------------------------- net/mac80211/mesh_pathtbl.c | 7 ++-- net/mac80211/rx.c | 5 ++- 4 files changed, 45 insertions(+), 58 deletions(-)
net/mac80211/mesh.h +2 -2
@@ -301,8 +301,8 @@ void mesh_mpath_table_grow(void);void mesh_mpp_table_grow (void );/* Mesh paths */ int mesh_path_error_tx (struct ieee80211_sub_if_data *sdata, -u8 ttl,const u8 *target,__le32 target_sn, -__le16 target_rcode,const u8 *ra); +u8 ttl,const u8 *target,u32 target_sn, +u16 target_rcode,const u8 *ra);void mesh_path_assign_nexthop (struct mesh_path *mpath,struct sta_info *sta);void mesh_path_flush_pending (struct mesh_path *mpath);void mesh_path_tx_pending (struct mesh_path *mpath);
net/mac80211/mesh_hwmp.c +37 -50
182 lines not on this page · raw message
net/mac80211/mesh_pathtbl.c +3 -4
@@ -722,7 +722,6 @@ void mesh_plink_broken(struct sta_info *sta)struct mpath_node *node;struct ieee80211_sub_if_data *sdata = sta->sdata;int i; -__le16 reason =cpu_to_le16 (WLAN_REASON_MESH_PATH_DEST_UNREACHABLE );rcu_read_lock (); tbl =rcu_dereference (mesh_paths);
@@ -736,9 +735,9 @@ void mesh_plink_broken(struct sta_info *sta) ++mpath->sn;spin_unlock_bh (&mpath->state_lock);mesh_path_error_tx (sdata, - sdata->u.mesh.mshcfg.element_ttl, - mpath->dst,cpu_to_le32 (mpath->sn), - reason, bcast); + sdata->u.mesh.mshcfg.element_ttl, + mpath->dst, mpath->sn, +WLAN_REASON_MESH_PATH_DEST_UNREACHABLE , bcast); } }rcu_read_unlock ();
net/mac80211/rx.c +3 -2
@@ -2081,7 +2081,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)struct ieee80211_sub_if_data *sdata = rx->sdata;struct ieee80211_rx_status *status =IEEE80211_SKB_RXCB (skb);struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; -__le16 reason =cpu_to_le16 (WLAN_REASON_MESH_PATH_NOFORWARD );u16 q, hdrlen; hdr = (struct ieee80211_hdr *) skb->data;
@@ -2189,7 +2188,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) }else {/* unable to resolve next hop */ mesh_path_error_tx (sdata, ifmsh->mshcfg.element_ttl, - fwd_hdr->addr3,0 , reason, fwd_hdr->addr2); + fwd_hdr->addr3,0 , +WLAN_REASON_MESH_PATH_NOFORWARD , + fwd_hdr->addr2);IEEE80211_IFSTA_MESH_CTR_INC (ifmsh, dropped_frames_no_route);kfree_skb (fwd_skb);return RX_DROP_MONITOR ;
Signature · 1 line
1.7.9.5