All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregory.greenman@intel.com
To: kvalo@kernel.org
Cc: johannes@sipsolutions.net, gregory.greenman@intel.com,
	linux-wireless@vger.kernel.org,
	Avraham Stern <avraham.stern@intel.com>
Subject: [PATCH 09/10] iwlwifi: mei: clear the sap data header before sending
Date: Tue, 17 May 2022 12:05:13 +0300	[thread overview]
Message-ID: <20220517120045.8dd3423cf683.I02976028eaa6aab395cb2e701fa7127212762eb7@changeid> (raw)
In-Reply-To: <20220517090514.211796-1-gregory.greenman@intel.com>

From: Avraham Stern <avraham.stern@intel.com>

The SAP data header has some fields that are marked as reserved
but are actually in use by CSME. Clear those fields before sending
the data to avoid having random values in those fields.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mei/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mei/main.c b/drivers/net/wireless/intel/iwlwifi/mei/main.c
index b4f45234cfc8..3d2eb15a9662 100644
--- a/drivers/net/wireless/intel/iwlwifi/mei/main.c
+++ b/drivers/net/wireless/intel/iwlwifi/mei/main.c
@@ -493,6 +493,7 @@ void iwl_mei_add_data_to_ring(struct sk_buff *skb, bool cb_tx)
 	if (cb_tx) {
 		struct iwl_sap_cb_data *cb_hdr = skb_push(skb, sizeof(*cb_hdr));
 
+		memset(cb_hdr, 0, sizeof(*cb_hdr));
 		cb_hdr->hdr.type = cpu_to_le16(SAP_MSG_CB_DATA_PACKET);
 		cb_hdr->hdr.len = cpu_to_le16(skb->len - sizeof(cb_hdr->hdr));
 		cb_hdr->hdr.seq_num = cpu_to_le32(atomic_inc_return(&mei->sap_seq_no));
-- 
2.35.1


  parent reply	other threads:[~2022-05-17  9:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  9:05 [PATCH 00/10] iwlwifi: updates intended for v5.18 2022-05-17 gregory.greenman
2022-05-17  9:05 ` [PATCH 01/10] iwlwifi: pcie: simplify MSI-X cause mapping gregory.greenman
2022-05-17  9:05 ` [PATCH 02/10] iwlwifi: mvm: use NULL instead of ERR_PTR when parsing wowlan status gregory.greenman
2022-05-17  9:05 ` [PATCH 03/10] iwlwifi: mvm: clean up authorized condition gregory.greenman
2022-05-17  9:05 ` [PATCH 04/10] iwlwifi: fw: init SAR GEO table only if data is present gregory.greenman
2022-05-17  9:05 ` [PATCH 05/10] iwlwifi: mvm: fix assert 1F04 upon reconfig gregory.greenman
2022-05-17  9:05 ` [PATCH 06/10] iwlwifi: mvm: add OTP info in case of init failure gregory.greenman
2022-05-17  9:05 ` [PATCH 07/10] iwlwifi: mvm: always tell the firmware to accept MCAST frames in BSS gregory.greenman
2022-05-17  9:05 ` [PATCH 08/10] iwlwifi: mvm: remove vif_count gregory.greenman
2022-05-17  9:05 ` gregory.greenman [this message]
2022-05-17  9:05 ` [PATCH 10/10] iwlwifi: mei: fix potential NULL-ptr deref gregory.greenman
2022-05-17  9:38 ` [PATCH 00/10] iwlwifi: updates intended for v5.18 2022-05-17 Greenman, Gregory

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220517120045.8dd3423cf683.I02976028eaa6aab395cb2e701fa7127212762eb7@changeid \
    --to=gregory.greenman@intel.com \
    --cc=avraham.stern@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.