Skip to content

Commit 81c5dce

Browse files
Sergey Matyukevichjmberg-intel
authored andcommitted
cfg80211: add missing constraint for user-supplied VHT mask
Do a logical vht_capa &= vht_capa_mask of user-supplied VHT mask with the driver-supplied mask of modifiable VHT capabilities. Fix whitespaces and comment typos. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent a1881c9 commit 81c5dce

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

net/wireless/mlme.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,11 @@ void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa,
272272

273273
p1 = (u8*)(ht_capa);
274274
p2 = (u8*)(ht_capa_mask);
275-
for (i = 0; i<sizeof(*ht_capa); i++)
275+
for (i = 0; i < sizeof(*ht_capa); i++)
276276
p1[i] &= p2[i];
277277
}
278278

279-
/* Do a logical ht_capa &= ht_capa_mask. */
279+
/* Do a logical vht_capa &= vht_capa_mask. */
280280
void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa,
281281
const struct ieee80211_vht_cap *vht_capa_mask)
282282
{

net/wireless/sme.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,8 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
11711171

11721172
cfg80211_oper_and_ht_capa(&connect->ht_capa_mask,
11731173
rdev->wiphy.ht_capa_mod_mask);
1174+
cfg80211_oper_and_vht_capa(&connect->vht_capa_mask,
1175+
rdev->wiphy.vht_capa_mod_mask);
11741176

11751177
if (connkeys && connkeys->def >= 0) {
11761178
int idx;

0 commit comments

Comments
 (0)