Skip to content

Commit 809f683

Browse files
committed
Johannes Berg says: ==================== Quite a bit more work, notably: - mt76: firmware recovery improvements, MLO work - iwlwifi: use embedded PNVM in (to be released) FW images to fix compatibility issues - cfg80211/mac80211: extended regulatory info support (6 GHz) - cfg80211: use "faux device" for regulatory * tag 'wireless-next-2025-07-10' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (48 commits) wifi: mac80211: don't complete management TX on SAE commit wifi: cfg80211/mac80211: implement dot11ExtendedRegInfoSupport wifi: mac80211: send extended MLD capa/ops if AP has it wifi: mac80211: copy first_part into HW scan wifi: cfg80211: add a flag for the first part of a scan wifi: mac80211: remove DISALLOW_PUNCTURING_5GHZ code wifi: cfg80211: only verify part of Extended MLD Capabilities wifi: nl80211: make nl80211_check_scan_flags() type safe wifi: cfg80211: hide scan internals wifi: mac80211: fix deactivated link CSA wifi: mac80211: add mandatory bitrate support for 6 GHz wifi: mac80211: remove spurious blank line wifi: mac80211: verify state before connection wifi: mac80211: avoid weird state in error path wifi: iwlwifi: mvm: remove support for iwl_wowlan_info_notif_v4 wifi: iwlwifi: bump minimum API version in BZ wifi: iwlwifi: mvm: remove unneeded argument wifi: iwlwifi: mvm: remove MLO GTK rekey code wifi: iwlwifi: pcie: rename iwl_pci_gen1_2_probe() argument wifi: iwlwifi: match discrete/integrated to fix some names ... ==================== Link: https://patch.msgid.link/20250710123113.24878-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 96698d1 + 6b04716 commit 809f683

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1220
-1055
lines changed

drivers/net/wireless/intel/iwlwifi/cfg/bz.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#include "fw/api/txq.h"
1111

1212
/* Highest firmware API version supported */
13-
#define IWL_BZ_UCODE_API_MAX 99
13+
#define IWL_BZ_UCODE_API_MAX 102
1414

1515
/* Lowest firmware API version supported */
16-
#define IWL_BZ_UCODE_API_MIN 94
16+
#define IWL_BZ_UCODE_API_MIN 98
1717

1818
/* Memory offsets and lengths */
1919
#define IWL_BZ_SMEM_OFFSET 0x400000

drivers/net/wireless/intel/iwlwifi/cfg/dr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "fw/api/txq.h"
1010

1111
/* Highest firmware API version supported */
12-
#define IWL_DR_UCODE_API_MAX 99
12+
#define IWL_DR_UCODE_API_MAX 102
1313

1414
/* Lowest firmware API version supported */
1515
#define IWL_DR_UCODE_API_MIN 98

drivers/net/wireless/intel/iwlwifi/cfg/sc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "fw/api/txq.h"
1111

1212
/* Highest firmware API version supported */
13-
#define IWL_SC_UCODE_API_MAX 99
13+
#define IWL_SC_UCODE_API_MAX 102
1414

1515
/* Lowest firmware API version supported */
1616
#define IWL_SC_UCODE_API_MIN 98

drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,9 @@ static int iwl_eeprom_acquire_semaphore(struct iwl_trans *trans)
676676
CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM);
677677

678678
/* See if we got it */
679-
ret = iwl_poll_bit(trans, CSR_HW_IF_CONFIG_REG,
680-
CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM,
681-
CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM,
682-
IWL_EEPROM_SEM_TIMEOUT);
679+
ret = iwl_poll_bits(trans, CSR_HW_IF_CONFIG_REG,
680+
CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM,
681+
IWL_EEPROM_SEM_TIMEOUT);
683682
if (ret >= 0) {
684683
IWL_DEBUG_EEPROM(trans->dev,
685684
"Acquired semaphore after %d tries.\n",
@@ -797,10 +796,9 @@ static int iwl_read_otp_word(struct iwl_trans *trans, u16 addr,
797796

798797
iwl_write32(trans, CSR_EEPROM_REG,
799798
CSR_EEPROM_REG_MSK_ADDR & (addr << 1));
800-
ret = iwl_poll_bit(trans, CSR_EEPROM_REG,
801-
CSR_EEPROM_REG_READ_VALID_MSK,
802-
CSR_EEPROM_REG_READ_VALID_MSK,
803-
IWL_EEPROM_ACCESS_TIMEOUT);
799+
ret = iwl_poll_bits(trans, CSR_EEPROM_REG,
800+
CSR_EEPROM_REG_READ_VALID_MSK,
801+
IWL_EEPROM_ACCESS_TIMEOUT);
804802
if (ret < 0) {
805803
IWL_ERR(trans, "Time out reading OTP[%d]\n", addr);
806804
return ret;
@@ -993,10 +991,9 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size)
993991
iwl_write32(trans, CSR_EEPROM_REG,
994992
CSR_EEPROM_REG_MSK_ADDR & (addr << 1));
995993

996-
ret = iwl_poll_bit(trans, CSR_EEPROM_REG,
997-
CSR_EEPROM_REG_READ_VALID_MSK,
998-
CSR_EEPROM_REG_READ_VALID_MSK,
999-
IWL_EEPROM_ACCESS_TIMEOUT);
994+
ret = iwl_poll_bits(trans, CSR_EEPROM_REG,
995+
CSR_EEPROM_REG_READ_VALID_MSK,
996+
IWL_EEPROM_ACCESS_TIMEOUT);
1000997
if (ret < 0) {
1001998
IWL_ERR(trans,
1002999
"Time out reading EEPROM[%d]\n", addr);

drivers/net/wireless/intel/iwlwifi/dvm/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,8 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
14671467
/********************
14681468
* 6. Setup services
14691469
********************/
1470-
if (iwl_setup_deferred_work(priv))
1470+
err = iwl_setup_deferred_work(priv);
1471+
if (err)
14711472
goto out_uninit_drv;
14721473

14731474
iwl_setup_rx_handlers(priv);

drivers/net/wireless/intel/iwlwifi/fw/api/d3.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ struct iwl_wowlan_mlo_gtk {
912912
} __packed; /* WOWLAN_MLO_GTK_KEY_API_S_VER_1 */
913913

914914
/**
915-
* struct iwl_wowlan_info_notif_v4 - WoWLAN information notification
915+
* struct iwl_wowlan_info_notif_v3 - WoWLAN information notification
916916
* @gtk: GTK data
917917
* @igtk: IGTK data
918918
* @bigtk: BIGTK data
@@ -927,12 +927,9 @@ struct iwl_wowlan_mlo_gtk {
927927
* @tid_tear_down: bit mask of tids whose BA sessions were closed
928928
* in suspend state
929929
* @station_id: station id
930-
* @num_mlo_link_keys: number of &struct iwl_wowlan_mlo_gtk structs
931-
* following this notif, or reserved in version < 4
932930
* @reserved2: reserved
933-
* @mlo_gtks: array of GTKs of size num_mlo_link_keys for version >= 4
934931
*/
935-
struct iwl_wowlan_info_notif_v4 {
932+
struct iwl_wowlan_info_notif_v3 {
936933
struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
937934
struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
938935
struct iwl_wowlan_igtk_status bigtk[WOWLAN_BIGTK_KEYS_NUM];
@@ -946,10 +943,8 @@ struct iwl_wowlan_info_notif_v4 {
946943
__le32 received_beacons;
947944
u8 tid_tear_down;
948945
u8 station_id;
949-
u8 num_mlo_link_keys;
950-
u8 reserved2;
951-
struct iwl_wowlan_mlo_gtk mlo_gtks[];
952-
} __packed; /* WOWLAN_INFO_NTFY_API_S_VER_3, _VER_4 */
946+
u8 reserved2[2];
947+
} __packed; /* WOWLAN_INFO_NTFY_API_S_VER_3 */
953948

954949
/**
955950
* struct iwl_wowlan_info_notif - WoWLAN information notification

drivers/net/wireless/intel/iwlwifi/fw/file.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ enum iwl_ucode_tlv_type {
104104
IWL_UCODE_TLV_CURRENT_PC = 68,
105105
IWL_UCODE_TLV_FSEQ_BIN_VERSION = 72,
106106

107+
/* contains sub-sections like PNVM file does (did) */
108+
IWL_UCODE_TLV_PNVM_DATA = 74,
109+
107110
IWL_UCODE_TLV_FW_NUM_STATIONS = IWL_UCODE_TLV_CONST_BASE + 0,
108111
IWL_UCODE_TLV_FW_NUM_LINKS = IWL_UCODE_TLV_CONST_BASE + 1,
109112
IWL_UCODE_TLV_FW_NUM_BEACONS = IWL_UCODE_TLV_CONST_BASE + 2,

drivers/net/wireless/intel/iwlwifi/fw/img.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ struct iwl_dump_exclude {
195195
* @phy_integration_ver_len: length of @phy_integration_ver
196196
* @dump_excl: image dump exclusion areas for RT image
197197
* @dump_excl_wowlan: image dump exclusion areas for WoWLAN image
198+
* @pnvm_data: PNVM data embedded in the .ucode file, if any
199+
* @pnvm_size: size of the embedded PNVM data
198200
*/
199201
struct iwl_fw {
200202
u32 ucode_ver;
@@ -227,6 +229,9 @@ struct iwl_fw {
227229
u32 phy_integration_ver_len;
228230

229231
struct iwl_dump_exclude dump_excl[2], dump_excl_wowlan[2];
232+
233+
const void *pnvm_data;
234+
u32 pnvm_size;
230235
};
231236

232237
static inline const char *get_fw_dbg_mode_string(int mode)

drivers/net/wireless/intel/iwlwifi/fw/pnvm.c

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "fw/api/nvm-reg.h"
1212
#include "fw/api/alive.h"
1313
#include "fw/uefi.h"
14+
#include "fw/img.h"
1415

1516
#define IWL_PNVM_REDUCED_CAP_BIT BIT(25)
1617

@@ -264,8 +265,8 @@ static int iwl_pnvm_get_from_fs(struct iwl_trans *trans, u8 **data, size_t *len)
264265
return 0;
265266
}
266267

267-
static u8 *iwl_get_pnvm_image(struct iwl_trans *trans_p, size_t *len,
268-
__le32 sku_id[3])
268+
static const u8 *iwl_get_pnvm_image(struct iwl_trans *trans_p, size_t *len,
269+
__le32 sku_id[3], const struct iwl_fw *fw)
269270
{
270271
struct pnvm_sku_package *package;
271272
u8 *image = NULL;
@@ -290,6 +291,12 @@ static u8 *iwl_get_pnvm_image(struct iwl_trans *trans_p, size_t *len,
290291
}
291292
}
292293

294+
if (fw->pnvm_data) {
295+
*len = fw->pnvm_size;
296+
297+
return fw->pnvm_data;
298+
}
299+
293300
/* If it's not available, or for Intel SKU, try from the filesystem */
294301
if (iwl_pnvm_get_from_fs(trans_p, &image, len))
295302
return NULL;
@@ -298,11 +305,11 @@ static u8 *iwl_get_pnvm_image(struct iwl_trans *trans_p, size_t *len,
298305

299306
static void
300307
iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
301-
const struct iwl_ucode_capabilities *capa,
308+
const struct iwl_fw *fw,
302309
__le32 sku_id[3])
303310
{
304311
struct iwl_pnvm_image *pnvm_data = NULL;
305-
u8 *data = NULL;
312+
const u8 *data = NULL;
306313
size_t length;
307314
int ret;
308315

@@ -313,7 +320,7 @@ iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
313320
if (trans->pnvm_loaded)
314321
goto set;
315322

316-
data = iwl_get_pnvm_image(trans, &length, sku_id);
323+
data = iwl_get_pnvm_image(trans, &length, sku_id, fw);
317324
if (!data) {
318325
trans->fail_to_parse_pnvm_image = true;
319326
return;
@@ -329,15 +336,17 @@ iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
329336
goto free;
330337
}
331338

332-
ret = iwl_trans_load_pnvm(trans, pnvm_data, capa);
339+
ret = iwl_trans_load_pnvm(trans, pnvm_data, &fw->ucode_capa);
333340
if (ret)
334341
goto free;
335342
IWL_DEBUG_INFO(trans, "loaded PNVM version %08x\n", pnvm_data->version);
336343

337344
set:
338-
iwl_trans_set_pnvm(trans, capa);
345+
iwl_trans_set_pnvm(trans, &fw->ucode_capa);
339346
free:
340-
kvfree(data);
347+
/* free only if it was allocated, i.e. not just embedded PNVM data */
348+
if (data != fw->pnvm_data)
349+
kvfree(data);
341350
kfree(pnvm_data);
342351
}
343352

@@ -392,8 +401,7 @@ iwl_pnvm_load_reduce_power_to_trans(struct iwl_trans *trans,
392401

393402
int iwl_pnvm_load(struct iwl_trans *trans,
394403
struct iwl_notif_wait_data *notif_wait,
395-
const struct iwl_ucode_capabilities *capa,
396-
__le32 sku_id[3])
404+
const struct iwl_fw *fw, __le32 sku_id[3])
397405
{
398406
struct iwl_notification_wait pnvm_wait;
399407
static const u16 ntf_cmds[] = { WIDE_ID(REGULATORY_AND_NVM_GROUP,
@@ -403,8 +411,8 @@ int iwl_pnvm_load(struct iwl_trans *trans,
403411
if (!sku_id[0] && !sku_id[1] && !sku_id[2])
404412
return 0;
405413

406-
iwl_pnvm_load_pnvm_to_trans(trans, capa, sku_id);
407-
iwl_pnvm_load_reduce_power_to_trans(trans, capa, sku_id);
414+
iwl_pnvm_load_pnvm_to_trans(trans, fw, sku_id);
415+
iwl_pnvm_load_reduce_power_to_trans(trans, &fw->ucode_capa, sku_id);
408416

409417
iwl_init_notification_wait(notif_wait, &pnvm_wait,
410418
ntf_cmds, ARRAY_SIZE(ntf_cmds),

drivers/net/wireless/intel/iwlwifi/fw/pnvm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
#include "iwl-drv.h"
99
#include "fw/notif-wait.h"
10+
#include "fw/img.h"
1011

1112
#define MVM_UCODE_PNVM_TIMEOUT (HZ / 4)
1213

1314
#define MAX_PNVM_NAME 64
1415

1516
int iwl_pnvm_load(struct iwl_trans *trans,
1617
struct iwl_notif_wait_data *notif_wait,
17-
const struct iwl_ucode_capabilities *capa,
18-
__le32 sku_id[3]);
18+
const struct iwl_fw *fw, __le32 sku_id[3]);
1919

2020
static inline
2121
void iwl_pnvm_get_fs_name(struct iwl_trans *trans,

0 commit comments

Comments
 (0)