Skip to contentSkip to conversation

iwlwifi: mvm: Ignore NVM write status 0x1000

PATCH In review Marek Vasut 2 participants 3 messages May 12, 2024 – May 13, 2024 Intel wireless wifi link (iwlwifi)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: mvm: Ignore NVM write status 0x1000

When loading custom NVM file on Wireless-AC 9260 160MHz, REV=0x324 8086:2526 (rev 29) Subsystem: 8086:001c firmware version 46.6b541b68.0 9260-th-b0-jf-b0-46.ucode , the NVM_WRITE_OPCODE return status is 0x1000 for all sections. What does this mean is unknown, however clearing the top 4 bits permits the NVM to be written and the card operates as it should.

Hexdump of the iNVM file is below, the iNVM file overrides antenna settings to only use AUX antenna and disables MIMO .

00000000  54 4c 50 2a 2a 4d 56 4e  2c 11 00 00 08 10 21 20
00000010  c0 00 00 02 03 03 02 11  2f 00 00 00 00 00 00 00
00000020  00 00 00 00

---
Cc: Abhishek Naik <[email protected]>
Cc: Emmanuel Grumbach <[email protected]>
Cc: Gregory Greenman <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: Miri Korenblit <[email protected]>
Cc: [email protected]

---
 drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +1 -1
index ae81772228813..29342b9a6743e 100644
@@ -59,7 +59,7 @@ static int iwl_nvm_write_chunk(struct iwl_mvm *mvm, u16 section,
 	pkt = cmd.resp_pkt;
 	/* Extract & check NVM write response */
 	nvm_resp = (void *)pkt->data;
-	if (le16_to_cpu(nvm_resp->status) != READ_NVM_CHUNK_SUCCEED) {
+	if ((le16_to_cpu(nvm_resp->status) & 0xfff) != READ_NVM_CHUNK_SUCCEED) {
 		IWL_ERR(mvm,
 			"NVM access write command failed for section %u (status = 0x%x)\n",
 			section, le16_to_cpu(nvm_resp->status));
Signature · 1 line
2.43.0
#1 lore raw
Quoted 12 lines

-----Original Message-----
From: Marek Vasut <[email protected]>
Sent: Sunday, 12 May 2024 21:49
To: [email protected]
Cc: Marek Vasut <[email protected]>; Abhishek Naik <[email protected]>; Grumbach, Emmanuel <[email protected]>; Gregory Greenman <[email protected]>; Berg, Johannes <[email protected]>; Kalle Valo <[email protected]>; Korenblit, Miriam Rachel <[email protected]>
Subject: [PATCH] iwlwifi: mvm: Ignore NVM write status 0x1000

Quoted 8 lines

When loading custom NVM file on Wireless-AC 9260 160MHz, REV=0x324 8086:2526 (rev 29) Subsystem: 8086:001c firmware version 46.6b541b68.0 9260- th-b0-jf-b0-46.ucode , the NVM_WRITE_OPCODE return status is 0x1000 for all sections. What does this mean is unknown, however clearing the top 4 bits permits the NVM to be written and the card operates as it should.

Hexdump of the iNVM file is below, the iNVM file overrides antenna settings to only use AUX antenna and disables MIMO .

The custom NVM is meant for internal use only.

To override antenna settings please use the nl80211 command: NL80211_CMD_SET_WIPHY You can use the 'iw set antenna' command.

Quoted 7 lines
00000000  54 4c 50 2a 2a 4d 56 4e  2c 11 00 00 08 10 21 20
00000010  c0 00 00 02 03 03 02 11  2f 00 00 00 00 00 00 00
00000020  00 00 00 00

---
2.43.0

#2 lore raw
Quoted 18 lines · Miriam Rachel
Quoted 18 lines

-----Original Message-----
From: Marek Vasut <[email protected]>
Sent: Sunday, 12 May 2024 21:49
To: [email protected]
Cc: Marek Vasut <[email protected]>; Abhishek Naik <[email protected]>; Grumbach, Emmanuel <[email protected]>; Gregory Greenman <[email protected]>; Berg, Johannes <[email protected]>; Kalle Valo <[email protected]>; Korenblit, Miriam Rachel <[email protected]>
Subject: [PATCH] iwlwifi: mvm: Ignore NVM write status 0x1000

When loading custom NVM file on Wireless-AC 9260 160MHz, REV=0x324 8086:2526 (rev 29) Subsystem: 8086:001c firmware version 46.6b541b68.0 9260- th-b0-jf-b0-46.ucode , the NVM_WRITE_OPCODE return status is 0x1000 for all sections. What does this mean is unknown, however clearing the top 4 bits permits the NVM to be written and the card operates as it should.

Quoted 4 lines
Quoted 2 lines

Hexdump of the iNVM file is below, the iNVM file overrides antenna settings to only use AUX antenna and disables MIMO .

The custom NVM is meant for internal use only.

But why does NVM loading not work without this patch ?

Quoted 2 lines

To override antenna settings please use the nl80211 command: NL80211_CMD_SET_WIPHY You can use the 'iw set antenna' command.

I need to use only the AUX antenna and disable MIMO entirely, the 'iw set antenna' didn't work, the custom NVM fragment does work.

But I do need this extra patch to load the NVM fragment.

Is the patch correct ? Why is the 0x1000 returned and why does it have to be masked out ?