Commit 57ef5ddb authored by David Woo's avatar David Woo Committed by John W. Linville

mac80211: Mark a destination sequence number as valid when a PREQ is received.

If a PREQ frame is received giving us a fresher DSN than what we have, record
the new dsn and mark it as valid.  This patch fixes a bug in the setting of the
MESH_PATH_DSN_VALID flag.

Also, minor fix to coding style on that file.
Signed-off-by: default avatarJavier Cardona <javier@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 13311b00
...@@ -397,7 +397,8 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, ...@@ -397,7 +397,8 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, struct ieee80211_mgmt *mgmt,
u8 *preq_elem, u32 metric) { u8 *preq_elem, u32 metric)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mesh_path *mpath; struct mesh_path *mpath;
u8 *dst_addr, *orig_addr; u8 *dst_addr, *orig_addr;
...@@ -430,7 +431,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, ...@@ -430,7 +431,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
if ((!(mpath->flags & MESH_PATH_DSN_VALID)) || if ((!(mpath->flags & MESH_PATH_DSN_VALID)) ||
DSN_LT(mpath->dsn, dst_dsn)) { DSN_LT(mpath->dsn, dst_dsn)) {
mpath->dsn = dst_dsn; mpath->dsn = dst_dsn;
mpath->flags &= MESH_PATH_DSN_VALID; mpath->flags |= MESH_PATH_DSN_VALID;
} else if ((!(dst_flags & MP_F_DO)) && } else if ((!(dst_flags & MP_F_DO)) &&
(mpath->flags & MESH_PATH_ACTIVE)) { (mpath->flags & MESH_PATH_ACTIVE)) {
reply = true; reply = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment