提交 c782bf8c 编写于 作者: C Chun-Yeow Yeoh 提交者: Johannes Berg

mac80211: fix the increment of mesh precedence value

The mesh precedence value in ieee80211_channel_switch
should be incremented or set to 1 only if this is the
initiator of mesh channel switch. For non-initiator,
the precedence value has updated using the Mesh
Channel Switch Parameters element. Fix this.
Signed-off-by: NChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 772f0389
......@@ -3207,13 +3207,13 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
params->chandef.chan->band)
return -EINVAL;
if (!ifmsh->pre_value)
ifmsh->pre_value = 1;
else
ifmsh->pre_value++;
if (ifmsh->csa_role == IEEE80211_MESH_CSA_ROLE_NONE)
if (ifmsh->csa_role == IEEE80211_MESH_CSA_ROLE_NONE) {
ifmsh->csa_role = IEEE80211_MESH_CSA_ROLE_INIT;
if (!ifmsh->pre_value)
ifmsh->pre_value = 1;
else
ifmsh->pre_value++;
}
/* see comments in the NL80211_IFTYPE_AP block */
if (params->count > 1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册