Commit 0692c33c authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'mac80211-for-net-2021-03-17' of...

Merge tag 'mac80211-for-net-2021-03-17' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211



Johannes Berg says:

====================
First round of fixes for 5.12-rc:
 * HE (802.11ax) elements can be extended, handle that
 * fix locking in network namespace changes that was
   broken due to the RTNL-redux work
 * various other small fixes
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents afa536d8 239729a2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len,
	struct aead_request *aead_req;
	int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm);
	u8 *__aad;
	int ret;

	aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC);
	if (!aead_req)
@@ -40,10 +41,10 @@ int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len,
	aead_request_set_crypt(aead_req, sg, sg, data_len, b_0);
	aead_request_set_ad(aead_req, sg[0].length);

	crypto_aead_encrypt(aead_req);
	ret = crypto_aead_encrypt(aead_req);
	kfree_sensitive(aead_req);

	return 0;
	return ret;
}

int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len,
+3 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce,
	struct aead_request *aead_req;
	int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm);
	const __le16 *fc;
	int ret;

	if (data_len < GMAC_MIC_LEN)
		return -EINVAL;
@@ -59,10 +60,10 @@ int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce,
	aead_request_set_crypt(aead_req, sg, sg, 0, iv);
	aead_request_set_ad(aead_req, GMAC_AAD_LEN + data_len);

	crypto_aead_encrypt(aead_req);
	ret = crypto_aead_encrypt(aead_req);
	kfree_sensitive(aead_req);

	return 0;
	return ret;
}

struct crypto_aead *ieee80211_aes_gmac_key_setup(const u8 key[],
+2 −2
Original line number Diff line number Diff line
@@ -2950,14 +2950,14 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
			continue;

		for (j = 0; j < IEEE80211_HT_MCS_MASK_LEN; j++) {
			if (~sdata->rc_rateidx_mcs_mask[i][j]) {
			if (sdata->rc_rateidx_mcs_mask[i][j] != 0xff) {
				sdata->rc_has_mcs_mask[i] = true;
				break;
			}
		}

		for (j = 0; j < NL80211_VHT_NSS_MAX; j++) {
			if (~sdata->rc_rateidx_vht_mcs_mask[i][j]) {
			if (sdata->rc_rateidx_vht_mcs_mask[i][j] != 0xffff) {
				sdata->rc_has_vht_mcs_mask[i] = true;
				break;
			}
+2 −0
Original line number Diff line number Diff line
@@ -1874,6 +1874,8 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)

	/* remove beacon */
	kfree(sdata->u.ibss.ie);
	sdata->u.ibss.ie = NULL;
	sdata->u.ibss.ie_len = 0;

	/* on the next join, re-program HT parameters */
	memset(&ifibss->ht_capa, 0, sizeof(ifibss->ht_capa));
+12 −1
Original line number Diff line number Diff line
@@ -973,8 +973,19 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
			continue;

		if (!dflt_chandef.chan) {
			/*
			 * Assign the first enabled channel to dflt_chandef
			 * from the list of channels
			 */
			for (i = 0; i < sband->n_channels; i++)
				if (!(sband->channels[i].flags &
						IEEE80211_CHAN_DISABLED))
					break;
			/* if none found then use the first anyway */
			if (i == sband->n_channels)
				i = 0;
			cfg80211_chandef_create(&dflt_chandef,
						&sband->channels[0],
						&sband->channels[i],
						NL80211_CHAN_NO_HT);
			/* init channel we're on */
			if (!local->use_chanctx && !local->_oper_chandef.chan) {
Loading