mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
cfg80211: fix VHT TDLS peer AID verification
I (Johannes) accidentally applied the first version of the patch ("Allow TDLS peer AID to be configured for VHT"). Now apply just the changes between v1 and v2 to get the AID verification and prefer the new attribute over the old one. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
ffb3cf3000
commit
3d124ea27a
@ -3972,10 +3972,10 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
|
|||||||
params.listen_interval =
|
params.listen_interval =
|
||||||
nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
|
nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
|
||||||
|
|
||||||
if (info->attrs[NL80211_ATTR_STA_AID])
|
if (info->attrs[NL80211_ATTR_PEER_AID])
|
||||||
params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
|
|
||||||
else
|
|
||||||
params.aid = nla_get_u16(info->attrs[NL80211_ATTR_PEER_AID]);
|
params.aid = nla_get_u16(info->attrs[NL80211_ATTR_PEER_AID]);
|
||||||
|
else
|
||||||
|
params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
|
||||||
if (!params.aid || params.aid > IEEE80211_MAX_AID)
|
if (!params.aid || params.aid > IEEE80211_MAX_AID)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -4027,7 +4027,8 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
|
|||||||
params.sta_modify_mask &= ~STATION_PARAM_APPLY_UAPSD;
|
params.sta_modify_mask &= ~STATION_PARAM_APPLY_UAPSD;
|
||||||
|
|
||||||
/* TDLS peers cannot be added */
|
/* TDLS peers cannot be added */
|
||||||
if (params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))
|
if ((params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) ||
|
||||||
|
info->attrs[NL80211_ATTR_PEER_AID])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
/* but don't bother the driver with it */
|
/* but don't bother the driver with it */
|
||||||
params.sta_flags_mask &= ~BIT(NL80211_STA_FLAG_TDLS_PEER);
|
params.sta_flags_mask &= ~BIT(NL80211_STA_FLAG_TDLS_PEER);
|
||||||
@ -4053,7 +4054,8 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
|
|||||||
if (params.sta_flags_mask & BIT(NL80211_STA_FLAG_ASSOCIATED))
|
if (params.sta_flags_mask & BIT(NL80211_STA_FLAG_ASSOCIATED))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
/* TDLS peers cannot be added */
|
/* TDLS peers cannot be added */
|
||||||
if (params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))
|
if ((params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) ||
|
||||||
|
info->attrs[NL80211_ATTR_PEER_AID])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
break;
|
break;
|
||||||
case NL80211_IFTYPE_STATION:
|
case NL80211_IFTYPE_STATION:
|
||||||
|
Loading…
Reference in New Issue
Block a user