Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81c5dce2 authored by Sergey Matyukevich's avatar Sergey Matyukevich Committed by Johannes Berg
Browse files

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: default avatarSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent a1881c9b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa,
		p1[i] &= p2[i];
}

/*  Do a logical ht_capa &= ht_capa_mask.  */
/*  Do a logical vht_capa &= vht_capa_mask.  */
void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa,
				const struct ieee80211_vht_cap *vht_capa_mask)
{
+2 −0
Original line number Diff line number Diff line
@@ -1171,6 +1171,8 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,

	cfg80211_oper_and_ht_capa(&connect->ht_capa_mask,
				  rdev->wiphy.ht_capa_mod_mask);
	cfg80211_oper_and_vht_capa(&connect->vht_capa_mask,
				   rdev->wiphy.vht_capa_mod_mask);

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