Skip to content

Commit 6f4f8ab

Browse files
committed
Miri Korenblit says: ==================== iwlwifi features, notably: - unused API cleanups - transport layer cleanups - new APIs support ==================== Signed-off-by: Johannes Berg <[email protected]>
2 parents b242271 + bc4a45f commit 6f4f8ab

35 files changed

+587
-234
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ static int iwl_init_otp_access(struct iwl_trans *trans)
766766
{
767767
int ret;
768768

769-
ret = iwl_finish_nic_init(trans);
769+
ret = iwl_trans_activate_nic(trans);
770770
if (ret)
771771
return ret;
772772

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
368368
/* initialize to default */
369369
void iwl_power_initialize(struct iwl_priv *priv)
370370
{
371-
priv->power_data.bus_pm = priv->trans->pm_support;
371+
priv->power_data.bus_pm = iwl_trans_is_pm_supported(priv->trans);
372372

373373
priv->power_data.debug_sleep_level_override = -1;
374374

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

Lines changed: 105 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,64 @@ struct iwl_wowlan_gtk_status_v3 {
632632
struct iwl_wowlan_all_rsc_tsc_v5 sc;
633633
} __packed; /* WOWLAN_GTK_MATERIAL_VER_3 */
634634

635+
/**
636+
* enum iwl_wowlan_key_status - Status of security keys in WoWLAN notifications
637+
* @IWL_WOWLAN_NOTIF_NO_KEY: No key is present; this entry should be ignored.
638+
* @IWL_WOWLAN_STATUS_OLD_KEY: old key exists; no rekey occurred, and only
639+
* metadata is available.
640+
* @IWL_WOWLAN_STATUS_NEW_KEY: A new key was created after a rekey; new key
641+
* material is available.
642+
*/
643+
enum iwl_wowlan_key_status {
644+
IWL_WOWLAN_NOTIF_NO_KEY = 0,
645+
IWL_WOWLAN_STATUS_OLD_KEY = 1,
646+
IWL_WOWLAN_STATUS_NEW_KEY = 2
647+
};
648+
649+
/**
650+
* struct iwl_wowlan_gtk_status - GTK status
651+
* @key: GTK material
652+
* @key_len: GTK length, if set to 0, the key is not available
653+
* @key_flags: information about the key:
654+
* bits[0:1]: key index assigned by the AP
655+
* bits[2:6]: GTK index of the key in the internal DB
656+
* bit[7]: Set iff this is the currently used GTK
657+
* @key_status: key status, see &enum iwl_wowlan_key_status
658+
* @reserved: padding
659+
* @tkip_mic_key: TKIP RX MIC key
660+
* @sc: RSC/TSC counters
661+
*/
662+
struct iwl_wowlan_gtk_status {
663+
u8 key[WOWLAN_KEY_MAX_SIZE];
664+
u8 key_len;
665+
u8 key_flags;
666+
u8 key_status;
667+
u8 reserved;
668+
u8 tkip_mic_key[IWL_MIC_KEY_SIZE];
669+
struct iwl_wowlan_all_rsc_tsc_v5 sc;
670+
} __packed; /* WOWLAN_GTK_MATERIAL_VER_4 */
671+
635672
#define IWL_WOWLAN_GTK_IDX_MASK (BIT(0) | BIT(1))
636673
#define IWL_WOWLAN_IGTK_BIGTK_IDX_MASK (BIT(0))
637674

675+
/**
676+
* struct iwl_wowlan_igtk_status_v1 - IGTK status
677+
* @key: IGTK material
678+
* @ipn: the IGTK packet number (replay counter)
679+
* @key_len: IGTK length, if set to 0, the key is not available
680+
* @key_flags: information about the key:
681+
* bits[0]: key index assigned by the AP (0: index 4, 1: index 5)
682+
* (0: index 6, 1: index 7 with bigtk)
683+
* bits[1:5]: IGTK index of the key in the internal DB
684+
* bit[6]: Set iff this is the currently used IGTK
685+
*/
686+
struct iwl_wowlan_igtk_status_v1 {
687+
u8 key[WOWLAN_KEY_MAX_SIZE];
688+
u8 ipn[6];
689+
u8 key_len;
690+
u8 key_flags;
691+
} __packed; /* WOWLAN_IGTK_MATERIAL_VER_1 */
692+
638693
/**
639694
* struct iwl_wowlan_igtk_status - IGTK status
640695
* @key: IGTK material
@@ -645,13 +700,17 @@ struct iwl_wowlan_gtk_status_v3 {
645700
* (0: index 6, 1: index 7 with bigtk)
646701
* bits[1:5]: IGTK index of the key in the internal DB
647702
* bit[6]: Set iff this is the currently used IGTK
703+
* @key_status: key status, see &enum iwl_wowlan_key_status
704+
* @reserved: padding
648705
*/
649706
struct iwl_wowlan_igtk_status {
650707
u8 key[WOWLAN_KEY_MAX_SIZE];
651708
u8 ipn[6];
652709
u8 key_len;
653710
u8 key_flags;
654-
} __packed; /* WOWLAN_IGTK_MATERIAL_VER_1 */
711+
u8 key_status;
712+
u8 reserved[3];
713+
} __packed; /* WOWLAN_IGTK_MATERIAL_VER_2 */
655714

656715
/**
657716
* struct iwl_wowlan_status_v6 - WoWLAN status
@@ -701,7 +760,7 @@ struct iwl_wowlan_status_v6 {
701760
*/
702761
struct iwl_wowlan_status_v7 {
703762
struct iwl_wowlan_gtk_status_v2 gtk[WOWLAN_GTK_KEYS_NUM];
704-
struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
763+
struct iwl_wowlan_igtk_status_v1 igtk[WOWLAN_IGTK_KEYS_NUM];
705764
__le64 replay_ctr;
706765
__le16 pattern_number;
707766
__le16 non_qos_seq_ctr;
@@ -736,7 +795,7 @@ struct iwl_wowlan_status_v7 {
736795
*/
737796
struct iwl_wowlan_info_notif_v1 {
738797
struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
739-
struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
798+
struct iwl_wowlan_igtk_status_v1 igtk[WOWLAN_IGTK_KEYS_NUM];
740799
__le64 replay_ctr;
741800
__le16 pattern_number;
742801
__le16 reserved1;
@@ -818,8 +877,8 @@ struct iwl_wowlan_mlo_gtk {
818877
*/
819878
struct iwl_wowlan_info_notif_v3 {
820879
struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
821-
struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
822-
struct iwl_wowlan_igtk_status bigtk[WOWLAN_BIGTK_KEYS_NUM];
880+
struct iwl_wowlan_igtk_status_v1 igtk[WOWLAN_IGTK_KEYS_NUM];
881+
struct iwl_wowlan_igtk_status_v1 bigtk[WOWLAN_BIGTK_KEYS_NUM];
823882
__le64 replay_ctr;
824883
__le16 pattern_number;
825884
__le16 reserved1;
@@ -833,6 +892,45 @@ struct iwl_wowlan_info_notif_v3 {
833892
u8 reserved2[2];
834893
} __packed; /* WOWLAN_INFO_NTFY_API_S_VER_3 */
835894

895+
/**
896+
* struct iwl_wowlan_info_notif_v5 - WoWLAN information notification
897+
* @gtk: GTK data
898+
* @igtk: IGTK data
899+
* @bigtk: BIGTK data
900+
* @replay_ctr: GTK rekey replay counter
901+
* @pattern_number: number of the matched patterns
902+
* @qos_seq_ctr: QoS sequence counters to use next
903+
* @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
904+
* @num_of_gtk_rekeys: number of GTK rekeys
905+
* @transmitted_ndps: number of transmitted neighbor discovery packets
906+
* @received_beacons: number of received beacons
907+
* @tid_tear_down: bit mask of tids whose BA sessions were closed
908+
* in suspend state
909+
* @station_id: station id
910+
* @num_mlo_link_keys: number of &struct iwl_wowlan_mlo_gtk structs
911+
* following this notif
912+
* @tid_offloaded_tx: tid used by the firmware to transmit data packets
913+
* while in wowlan
914+
* @mlo_gtks: array of GTKs of size num_mlo_link_keys
915+
*/
916+
struct iwl_wowlan_info_notif_v5 {
917+
struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
918+
struct iwl_wowlan_igtk_status_v1 igtk[WOWLAN_IGTK_KEYS_NUM];
919+
struct iwl_wowlan_igtk_status_v1 bigtk[WOWLAN_BIGTK_KEYS_NUM];
920+
__le64 replay_ctr;
921+
__le16 pattern_number;
922+
__le16 qos_seq_ctr;
923+
__le32 wakeup_reasons;
924+
__le32 num_of_gtk_rekeys;
925+
__le32 transmitted_ndps;
926+
__le32 received_beacons;
927+
u8 tid_tear_down;
928+
u8 station_id;
929+
u8 num_mlo_link_keys;
930+
u8 tid_offloaded_tx;
931+
struct iwl_wowlan_mlo_gtk mlo_gtks[];
932+
} __packed; /* WOWLAN_INFO_NTFY_API_S_VER_5 */
933+
836934
/**
837935
* struct iwl_wowlan_info_notif - WoWLAN information notification
838936
* @gtk: GTK data
@@ -855,7 +953,7 @@ struct iwl_wowlan_info_notif_v3 {
855953
* @mlo_gtks: array of GTKs of size num_mlo_link_keys
856954
*/
857955
struct iwl_wowlan_info_notif {
858-
struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
956+
struct iwl_wowlan_gtk_status gtk[WOWLAN_GTK_KEYS_NUM];
859957
struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
860958
struct iwl_wowlan_igtk_status bigtk[WOWLAN_BIGTK_KEYS_NUM];
861959
__le64 replay_ctr;
@@ -870,7 +968,7 @@ struct iwl_wowlan_info_notif {
870968
u8 num_mlo_link_keys;
871969
u8 tid_offloaded_tx;
872970
struct iwl_wowlan_mlo_gtk mlo_gtks[];
873-
} __packed; /* WOWLAN_INFO_NTFY_API_S_VER_5 */
971+
} __packed; /* WOWLAN_INFO_NTFY_API_S_VER_6 */
874972

875973
/**
876974
* struct iwl_wowlan_wake_pkt_notif - WoWLAN wake packet notification

drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@ struct iwl_mac_config_cmd {
420420
* eht_support set to true. No longer used since _VER_3 of this command.
421421
* @LINK_CONTEXT_MODIFY_BANDWIDTH: Covers iwl_link_ctx_cfg_cmd::modify_bandwidth.
422422
* Request RX OMI to the AP to modify bandwidth of this link.
423+
* @LINK_CONTEXT_MODIFY_UHR_PARAMS: covers iwl_link_ctx_cfg_cmd::npca_params and
424+
* iwl_link_ctx_cfg_cmd::prio_edca_params. Since _VER_7.
423425
* @LINK_CONTEXT_MODIFY_ALL: set all above flags
424426
*/
425427
enum iwl_link_ctx_modify_flags {
@@ -432,6 +434,7 @@ enum iwl_link_ctx_modify_flags {
432434
LINK_CONTEXT_MODIFY_BSS_COLOR_DISABLE = BIT(6),
433435
LINK_CONTEXT_MODIFY_EHT_PARAMS = BIT(7),
434436
LINK_CONTEXT_MODIFY_BANDWIDTH = BIT(8),
437+
LINK_CONTEXT_MODIFY_UHR_PARAMS = BIT(9),
435438
LINK_CONTEXT_MODIFY_ALL = 0xff,
436439
}; /* LINK_CONTEXT_MODIFY_MASK_E_VER_1 */
437440

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enum iwl_prot_offload_subcmd_ids {
2020
/**
2121
* @WOWLAN_INFO_NOTIFICATION: Notification in
2222
* &struct iwl_wowlan_info_notif_v1, iwl_wowlan_info_notif_v3,
23-
* or &struct iwl_wowlan_info_notif
23+
* &struct iwl_wowlan_info_notif_v5 or &struct iwl_wowlan_info_notif
2424
*/
2525
WOWLAN_INFO_NOTIFICATION = 0xFD,
2626

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt,
830830
}
831831

832832
/* reading RXF/TXF sizes */
833-
if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status)) {
833+
if (iwl_trans_is_fw_error(fwrt->trans)) {
834834
fifo_len = iwl_fw_rxf_len(fwrt, mem_cfg);
835835
fifo_len += iwl_fw_txf_len(fwrt, mem_cfg);
836836

@@ -3116,7 +3116,7 @@ static void iwl_send_dbg_dump_complete_cmd(struct iwl_fw_runtime *fwrt,
31163116
.len[0] = sizeof(hcmd_data),
31173117
};
31183118

3119-
if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status))
3119+
if (iwl_trans_is_fw_error(fwrt->trans))
31203120
return;
31213121

31223122
if (fw_has_capa(&fwrt->fw->ucode_capa,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static void iwl_fwrt_dump_lmac_error_log(struct iwl_fw_runtime *fwrt, u8 lmac_nu
178178
if (err)
179179
return;
180180

181-
err = iwl_finish_nic_init(trans);
181+
err = iwl_trans_activate_nic(trans);
182182
if (err)
183183
return;
184184
}

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,16 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = {
5959
DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
6060
},
6161
},
62-
{ .ident = "ASUS",
62+
{ .ident = "ASUSTEK",
6363
.matches = {
6464
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
6565
},
6666
},
67+
{ .ident = "ASUS",
68+
.matches = {
69+
DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
70+
},
71+
},
6772
{ .ident = "GOOGLE-HP",
6873
.matches = {
6974
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
@@ -141,11 +146,16 @@ static const struct dmi_system_id dmi_tas_approved_list[] = {
141146
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
142147
},
143148
},
144-
{ .ident = "ASUS",
149+
{ .ident = "ASUSTEK",
145150
.matches = {
146151
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
147152
},
148153
},
154+
{ .ident = "ASUS",
155+
.matches = {
156+
DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
157+
},
158+
},
149159
{ .ident = "GOOGLE-HP",
150160
.matches = {
151161
DMI_MATCH(DMI_SYS_VENDOR, "Google"),

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "fw/api/phy.h"
1313
#include "fw/api/config.h"
1414
#include "fw/api/nvm-reg.h"
15-
#include "fw/img.h"
1615
#include "iwl-trans.h"
1716

1817
#define BIOS_SAR_MAX_PROFILE_NUM 4

drivers/net/wireless/intel/iwlwifi/iwl-io.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,11 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf)
396396
return 0;
397397
}
398398

399-
int iwl_finish_nic_init(struct iwl_trans *trans)
399+
int iwl_trans_activate_nic(struct iwl_trans *trans)
400400
{
401-
return iwl_pcie_gen1_2_finish_nic_init(trans);
401+
return iwl_pcie_gen1_2_activate_nic(trans);
402402
}
403-
IWL_EXPORT_SYMBOL(iwl_finish_nic_init);
403+
IWL_EXPORT_SYMBOL(iwl_trans_activate_nic);
404404

405405
void iwl_trans_sync_nmi_with_addr(struct iwl_trans *trans, u32 inta_addr,
406406
u32 sw_err_bit)

0 commit comments

Comments
 (0)