mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
First 6.15 material:
* cfg80211/mac80211
- remove cooked monitor support
- strict mode for better AP testing
- basic EPCS support
- OMI RX bandwidth reduction support
* rtw88
- preparation for RTL8814AU support
* rtw89
- use wiphy_lock/wiphy_work
- preparations for MLO
- BT-Coex improvements
- regulatory support in firmware files
* iwlwifi
- preparations for the new iwlmld sub-driver
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEpeA8sTs3M8SN2hR410qiO8sPaAAFAmfG9tQACgkQ10qiO8sP
aAAE1g/9Fg6vrTY1OX0at1iXL5AMqtfAVUJffHGz8SyWJNzKgP0pLtXUTi1Ta2b4
TmHG0+4fMcwM0nigL0cg/F6vEE5V7qM30b7WMhIKpBejcCklINEIYuB1a6CwfDNF
7QtE/NA9/oKBy2JftYpm+4mdtlKdwBdkpz3MKE8/BpB1HdmG3IS3/z9+t4jkMOv+
hRxZKRlqpW98uimc5JjkjMGyt/e4QyHiUt0Z7Ly3dzm0PajvmRy4Idkl3TFMi4Yp
GgKFTix9/7G4iYFoyK5iNiqfesnzqY6jaI3sxv6h6AG/Yz8EOkBNNnKovPC0lAo/
ZpkhU63XN10SZXxeSDSiz4tWx3uBxpN8PIRvuaEr+KW7caCjMYXAuB5uE+KvREA3
hkM8zB5IkT54bLaHJYG6TGQoWxRnzoEDjURBHkEG9DfJs2ixKxdLfe/Rc1lvLqt4
t5ejc+UQsjICZ31LhrZkNbfmKLtQfFCcBj3ZUHz9RzO1AXmsqudeRcl0j3rDjsqY
AdYKFEKGCKeBlhr+Cng9VqzJa7gCmgVgkXYjGxJgbL0n3u6oV/S08/7Ssbzf7RXY
ulFqxEjaexn/vtUHVwMOTxyDttftOfB3Y1IrNUJj3OXWpuXK247OQN6QHM9XWtVy
xzBOW3g9N0L3EUM4PVmZTGU4SdtuwNxvZbSrToBfnjVu0rESAT4=
=KYXQ
-----END PGP SIGNATURE-----
Merge tag 'wireless-next-2025-03-04-v2' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
Johannes Berg says:
====================
First 6.15 material:
* cfg80211/mac80211
- remove cooked monitor support
- strict mode for better AP testing
- basic EPCS support
- OMI RX bandwidth reduction support
* rtw88
- preparation for RTL8814AU support
* rtw89
- use wiphy_lock/wiphy_work
- preparations for MLO
- BT-Coex improvements
- regulatory support in firmware files
* iwlwifi
- preparations for the new iwlmld sub-driver
* tag 'wireless-next-2025-03-04-v2' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (128 commits)
wifi: iwlwifi: remove mld/roc.c
wifi: mac80211: refactor populating mesh related fields in sinfo
wifi: cfg80211: reorg sinfo structure elements for mesh
wifi: iwlwifi: Fix spelling mistake "Increate" -> "Increase"
wifi: iwlwifi: add Debug Host Command APIs
wifi: iwlwifi: add IWL_MAX_NUM_IGTKS macro
wifi: iwlwifi: add OMI bandwidth reduction APIs
wifi: iwlwifi: remove mvm prefix from iwl_mvm_d3_end_notif
wifi: iwlwifi: remember if the UATS table was read successfully
wifi: iwlwifi: export iwl_get_lari_config_bitmap
wifi: iwlwifi: add support for external 32 KHz clock
wifi: iwlwifi: mld: add a debug level for EHT prints
wifi: iwlwifi: mld: add a debug level for PTP prints
wifi: iwlwifi: remove mvm prefix from iwl_mvm_esr_mode_notif
wifi: iwlwifi: use 0xff instead of 0xffffffff for invalid
wifi: iwlwifi: location api cleanup
wifi: cfg80211: expose update timestamp to drivers
wifi: mac80211: add ieee80211_iter_chan_contexts_mtx
wifi: mac80211: fix integer overflow in hwmp_route_info_get()
wifi: mac80211: Fix possible integer promotion issue
...
====================
Link: https://patch.msgid.link/20250304125605.127914-3-johannes@sipsolutions.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
71f8992e34
|
|
@ -32,6 +32,10 @@ properties:
|
|||
shutdown-gpios:
|
||||
maxItems: 1
|
||||
|
||||
default-blocked:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description: configure rfkill state as blocked at boot
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- radio-type
|
||||
|
|
@ -48,4 +52,5 @@ examples:
|
|||
label = "rfkill-pcie-wlan";
|
||||
radio-type = "wlan";
|
||||
shutdown-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
|
||||
default-blocked;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2166,7 +2166,7 @@ static void b43_print_fw_helptext(struct b43_wl *wl, bool error)
|
|||
{
|
||||
const char text[] =
|
||||
"You must go to " \
|
||||
"https://wireless.wiki.kernel.org/en/users/Drivers/b43#devicefirmware " \
|
||||
"https://wireless.docs.kernel.org/en/latest/en/users/drivers/b43/developers.html#list-of-firmware " \
|
||||
"and download the correct firmware for this driver version. " \
|
||||
"Please carefully read all instructions on this website.\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -3295,7 +3295,7 @@ static int ipw_init_nic(struct ipw_priv *priv)
|
|||
rc = ipw_poll_bit(priv, IPW_GP_CNTRL_RW,
|
||||
IPW_GP_CNTRL_BIT_CLOCK_READY, 250);
|
||||
if (rc < 0)
|
||||
IPW_DEBUG_INFO("FAILED wait for clock stablization\n");
|
||||
IPW_DEBUG_INFO("FAILED wait for clock stabilization\n");
|
||||
|
||||
/* assert SW reset */
|
||||
ipw_set_bit(priv, IPW_RESET_REG, IPW_RESET_REG_SW_RESET);
|
||||
|
|
|
|||
|
|
@ -1011,8 +1011,6 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev);
|
|||
void libipw_txb_free(struct libipw_txb *);
|
||||
|
||||
/* libipw_rx.c */
|
||||
void libipw_rx_any(struct libipw_device *ieee, struct sk_buff *skb,
|
||||
struct libipw_rx_stats *stats);
|
||||
int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
|
||||
struct libipw_rx_stats *rx_stats);
|
||||
/* make sure to set stats->len */
|
||||
|
|
|
|||
|
|
@ -823,96 +823,6 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Filter out unrelated packets, call libipw_rx[_mgt]
|
||||
* This function takes over the skb, it should not be used again after calling
|
||||
* this function. */
|
||||
void libipw_rx_any(struct libipw_device *ieee,
|
||||
struct sk_buff *skb, struct libipw_rx_stats *stats)
|
||||
{
|
||||
struct libipw_hdr_4addr *hdr;
|
||||
int is_packet_for_us;
|
||||
u16 fc;
|
||||
|
||||
if (ieee->iw_mode == IW_MODE_MONITOR) {
|
||||
if (!libipw_rx(ieee, skb, stats))
|
||||
dev_kfree_skb_irq(skb);
|
||||
return;
|
||||
}
|
||||
|
||||
if (skb->len < sizeof(struct ieee80211_hdr))
|
||||
goto drop_free;
|
||||
|
||||
hdr = (struct libipw_hdr_4addr *)skb->data;
|
||||
fc = le16_to_cpu(hdr->frame_ctl);
|
||||
|
||||
if ((fc & IEEE80211_FCTL_VERS) != 0)
|
||||
goto drop_free;
|
||||
|
||||
switch (fc & IEEE80211_FCTL_FTYPE) {
|
||||
case IEEE80211_FTYPE_MGMT:
|
||||
if (skb->len < sizeof(struct libipw_hdr_3addr))
|
||||
goto drop_free;
|
||||
libipw_rx_mgt(ieee, hdr, stats);
|
||||
dev_kfree_skb_irq(skb);
|
||||
return;
|
||||
case IEEE80211_FTYPE_DATA:
|
||||
break;
|
||||
case IEEE80211_FTYPE_CTL:
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
is_packet_for_us = 0;
|
||||
switch (ieee->iw_mode) {
|
||||
case IW_MODE_ADHOC:
|
||||
/* our BSS and not from/to DS */
|
||||
if (ether_addr_equal(hdr->addr3, ieee->bssid) &&
|
||||
((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == 0)) {
|
||||
/* promisc: get all */
|
||||
if (ieee->dev->flags & IFF_PROMISC)
|
||||
is_packet_for_us = 1;
|
||||
/* to us */
|
||||
else if (ether_addr_equal(hdr->addr1, ieee->dev->dev_addr))
|
||||
is_packet_for_us = 1;
|
||||
/* mcast */
|
||||
else if (is_multicast_ether_addr(hdr->addr1))
|
||||
is_packet_for_us = 1;
|
||||
}
|
||||
break;
|
||||
case IW_MODE_INFRA:
|
||||
/* our BSS (== from our AP) and from DS */
|
||||
if (ether_addr_equal(hdr->addr2, ieee->bssid) &&
|
||||
((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS)) {
|
||||
/* promisc: get all */
|
||||
if (ieee->dev->flags & IFF_PROMISC)
|
||||
is_packet_for_us = 1;
|
||||
/* to us */
|
||||
else if (ether_addr_equal(hdr->addr1, ieee->dev->dev_addr))
|
||||
is_packet_for_us = 1;
|
||||
/* mcast */
|
||||
else if (is_multicast_ether_addr(hdr->addr1)) {
|
||||
/* not our own packet bcasted from AP */
|
||||
if (!ether_addr_equal(hdr->addr3, ieee->dev->dev_addr))
|
||||
is_packet_for_us = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* ? */
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_packet_for_us)
|
||||
if (!libipw_rx(ieee, skb, stats))
|
||||
dev_kfree_skb_irq(skb);
|
||||
return;
|
||||
|
||||
drop_free:
|
||||
dev_kfree_skb_irq(skb);
|
||||
ieee->dev->stats.rx_dropped++;
|
||||
}
|
||||
|
||||
#define MGMT_FRAME_FIXED_PART_LENGTH 0x24
|
||||
|
||||
static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
|
||||
|
|
@ -1729,6 +1639,5 @@ void libipw_rx_mgt(struct libipw_device *ieee,
|
|||
}
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(libipw_rx_any);
|
||||
EXPORT_SYMBOL(libipw_rx_mgt);
|
||||
EXPORT_SYMBOL(libipw_rx);
|
||||
|
|
|
|||
|
|
@ -132,15 +132,8 @@ static void il4965_rs_fill_link_cmd(struct il_priv *il,
|
|||
static void il4965_rs_stay_in_table(struct il_lq_sta *lq_sta,
|
||||
bool force_search);
|
||||
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
static void il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta,
|
||||
u32 *rate_n_flags, int idx);
|
||||
#else
|
||||
static void
|
||||
il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following tables contain the expected throughput metrics for all rates
|
||||
|
|
@ -2495,8 +2488,6 @@ il4965_rs_free_sta(void *il_r, struct ieee80211_sta *sta, void *il_sta)
|
|||
D_RATE("leave\n");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
|
||||
static void
|
||||
il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
|
||||
{
|
||||
|
|
@ -2758,7 +2749,6 @@ il4965_rs_add_debugfs(void *il, void *il_sta, struct dentry *dir)
|
|||
debugfs_create_u8("tx_agg_tid_enable", 0600, dir,
|
||||
&lq_sta->tx_agg_tid_en);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialization of rate scaling information is done by driver after
|
||||
|
|
@ -2781,9 +2771,8 @@ static const struct rate_control_ops rs_4965_ops = {
|
|||
.free = il4965_rs_free,
|
||||
.alloc_sta = il4965_rs_alloc_sta,
|
||||
.free_sta = il4965_rs_free_sta,
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
.add_sta_debugfs = il4965_rs_add_debugfs,
|
||||
#endif
|
||||
.add_sta_debugfs = PTR_IF(IS_ENABLED(CONFIG_MAC80211_DEBUGFS),
|
||||
il4965_rs_add_debugfs),
|
||||
};
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -2815,9 +2815,7 @@ struct il_lq_sta {
|
|||
struct il_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */
|
||||
struct il_traffic_load load[TID_MAX_LOAD_COUNT];
|
||||
u8 tx_agg_tid_en;
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
u32 dbg_fixed_rate;
|
||||
#endif
|
||||
struct il_priv *drv;
|
||||
|
||||
/* used to be in sta_info */
|
||||
|
|
|
|||
|
|
@ -205,7 +205,6 @@ const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101";
|
|||
const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz";
|
||||
const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
|
||||
const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203";
|
||||
const char iwl_ax204_name[] = "Intel(R) Wi-Fi 6 AX204 160MHz";
|
||||
|
||||
const char iwl_ax200_killer_1650w_name[] =
|
||||
"Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)";
|
||||
|
|
|
|||
|
|
@ -180,7 +180,6 @@ const struct iwl_cfg_trans_params iwl_ma_trans_cfg = {
|
|||
};
|
||||
|
||||
const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz";
|
||||
const char iwl_ax221_name[] = "Intel(R) Wi-Fi 6E AX221 160MHz";
|
||||
const char iwl_ax231_name[] = "Intel(R) Wi-Fi 6E AX231 160MHz";
|
||||
const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6E AX411 160MHz";
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,13 @@ static const struct iwl_base_params iwl_bz_base_params = {
|
|||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
const struct iwl_ht_params iwl_bz_ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) |
|
||||
BIT(NL80211_BAND_6GHZ),
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_BZ_COMMON \
|
||||
.ucode_api_max = IWL_BZ_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL_BZ_UCODE_API_MIN, \
|
||||
|
|
@ -113,7 +120,7 @@ static const struct iwl_base_params iwl_bz_base_params = {
|
|||
|
||||
#define IWL_DEVICE_BZ \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.ht_params = &iwl_22000_ht_params
|
||||
.ht_params = &iwl_bz_ht_params
|
||||
|
||||
/*
|
||||
* This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
|
||||
|
|
@ -145,7 +152,6 @@ const struct iwl_cfg_trans_params iwl_gl_trans_cfg = {
|
|||
.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const char iwl_bz_name[] = "Intel(R) TBD Bz device";
|
||||
const char iwl_fm_name[] = "Intel(R) Wi-Fi 7 BE201 320MHz";
|
||||
const char iwl_wh_name[] = "Intel(R) Wi-Fi 7 BE211 320MHz";
|
||||
const char iwl_gl_name[] = "Intel(R) Wi-Fi 7 BE200 320MHz";
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ static const struct iwl_base_params iwl_dr_base_params = {
|
|||
.uhb_supported = true, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.num_rbds = IWL_NUM_RBDS_DR_EHT, \
|
||||
.ht_params = &iwl_22000_ht_params
|
||||
.ht_params = &iwl_bz_ht_params
|
||||
|
||||
/*
|
||||
* This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ static const struct iwl_base_params iwl_sc_base_params = {
|
|||
.uhb_supported = true, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.num_rbds = IWL_NUM_RBDS_SC_EHT, \
|
||||
.ht_params = &iwl_22000_ht_params
|
||||
.ht_params = &iwl_bz_ht_params
|
||||
|
||||
/*
|
||||
* This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
|
||||
|
|
@ -142,22 +142,16 @@ const struct iwl_cfg_trans_params iwl_sc_trans_cfg = {
|
|||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const char iwl_sc_name[] = "Intel(R) TBD Sc device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc = {
|
||||
.fw_name_mac = "sc",
|
||||
IWL_DEVICE_SC,
|
||||
};
|
||||
|
||||
const char iwl_sc2_name[] = "Intel(R) TBD Sc2 device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc2 = {
|
||||
.fw_name_mac = "sc2",
|
||||
IWL_DEVICE_SC,
|
||||
};
|
||||
|
||||
const char iwl_sc2f_name[] = "Intel(R) TBD Sc2f device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc2f = {
|
||||
.fw_name_mac = "sc2f",
|
||||
IWL_DEVICE_SC,
|
||||
|
|
|
|||
|
|
@ -124,17 +124,6 @@ enum iwl_antenna_ok iwl_tx_ant_restriction(struct iwl_priv *priv)
|
|||
return restriction->tx_stream;
|
||||
}
|
||||
|
||||
enum iwl_antenna_ok iwl_rx_ant_restriction(struct iwl_priv *priv)
|
||||
{
|
||||
struct iwl_tt_mgmt *tt = &priv->thermal_throttle;
|
||||
struct iwl_tt_restriction *restriction;
|
||||
|
||||
if (!priv->thermal_throttle.advanced_tt)
|
||||
return IWL_ANT_OK_MULTI;
|
||||
restriction = tt->restriction + tt->state;
|
||||
return restriction->rx_stream;
|
||||
}
|
||||
|
||||
#define CT_KILL_EXIT_DURATION (5) /* 5 seconds duration */
|
||||
#define CT_KILL_WAITING_DURATION (300) /* 300ms duration */
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ u8 iwl_tt_current_power_mode(struct iwl_priv *priv);
|
|||
bool iwl_tt_is_low_power_state(struct iwl_priv *priv);
|
||||
bool iwl_ht_enabled(struct iwl_priv *priv);
|
||||
enum iwl_antenna_ok iwl_tx_ant_restriction(struct iwl_priv *priv);
|
||||
enum iwl_antenna_ok iwl_rx_ant_restriction(struct iwl_priv *priv);
|
||||
void iwl_tt_enter_ct_kill(struct iwl_priv *priv);
|
||||
void iwl_tt_exit_ct_kill(struct iwl_priv *priv);
|
||||
void iwl_tt_handler(struct iwl_priv *priv);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018, 2020-2021, 2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018, 2020-2021, 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -117,7 +117,7 @@ struct iwl_alive_ntf_v6 {
|
|||
* finishing init flow
|
||||
* @IWL_INIT_DEBUG_CFG: driver is going to send debug config command
|
||||
* @IWL_INIT_NVM: driver is going to send NVM_ACCESS commands
|
||||
* @IWL_INIT_PHY: driver is going to send PHY_DB commands
|
||||
* @IWL_INIT_PHY: driver is going to send the PHY_CONFIGURATION_CMD
|
||||
*/
|
||||
enum iwl_extended_cfg_flags {
|
||||
IWL_INIT_DEBUG_CFG,
|
||||
|
|
|
|||
|
|
@ -502,10 +502,15 @@ enum iwl_legacy_cmds {
|
|||
/**
|
||||
* @DTS_MEASUREMENT_NOTIFICATION:
|
||||
* &struct iwl_dts_measurement_notif_v1 or
|
||||
* &struct iwl_dts_measurement_notif_v2
|
||||
* &struct iwl_dts_measurement_notif
|
||||
*/
|
||||
DTS_MEASUREMENT_NOTIFICATION = 0xdd,
|
||||
|
||||
/**
|
||||
* @DEBUG_HOST_COMMAND: &struct iwl_dhc_cmd
|
||||
*/
|
||||
DEBUG_HOST_COMMAND = 0xf1,
|
||||
|
||||
/**
|
||||
* @LDBG_CONFIG_CMD: configure continuous trace recording
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2022 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2022, 2024 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -14,6 +14,9 @@
|
|||
* @FW_CTXT_COLOR_POS: position of the color
|
||||
* @FW_CTXT_COLOR_MSK: mask of the color
|
||||
* @FW_CTXT_INVALID: value used to indicate unused/invalid
|
||||
* @FW_CTXT_ID_INVALID: value used to indicate unused/invalid. This can be
|
||||
* used with newer firmware which no longer use the color. Typically,
|
||||
* firmware versions supported by iwlmld can use this value.
|
||||
*/
|
||||
enum iwl_ctxt_id_and_color {
|
||||
FW_CTXT_ID_POS = 0,
|
||||
|
|
@ -21,6 +24,7 @@ enum iwl_ctxt_id_and_color {
|
|||
FW_CTXT_COLOR_POS = 8,
|
||||
FW_CTXT_COLOR_MSK = 0xff << FW_CTXT_COLOR_POS,
|
||||
FW_CTXT_INVALID = 0xffffffff,
|
||||
FW_CTXT_ID_INVALID = 0xff,
|
||||
};
|
||||
|
||||
#define FW_CMD_ID_AND_COLOR(_id, _color) (((_id) << FW_CTXT_ID_POS) |\
|
||||
|
|
|
|||
|
|
@ -1006,7 +1006,7 @@ struct iwl_wowlan_wake_pkt_notif {
|
|||
* struct iwl_mvm_d3_end_notif - d3 end notification
|
||||
* @flags: See &enum iwl_d0i3_flags
|
||||
*/
|
||||
struct iwl_mvm_d3_end_notif {
|
||||
struct iwl_d3_end_notif {
|
||||
__le32 flags;
|
||||
} __packed;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
|
|
@ -90,9 +90,15 @@ enum iwl_data_path_subcmd_ids {
|
|||
*/
|
||||
SEC_KEY_CMD = 0x18,
|
||||
|
||||
/**
|
||||
* @OMI_SEND_STATUS_NOTIF: notification after OMI was sent
|
||||
* uses &struct iwl_omi_send_status_notif
|
||||
*/
|
||||
OMI_SEND_STATUS_NOTIF = 0xF2,
|
||||
|
||||
/**
|
||||
* @ESR_MODE_NOTIF: notification to recommend/force a wanted esr mode,
|
||||
* uses &struct iwl_mvm_esr_mode_notif
|
||||
* uses &struct iwl_esr_mode_notif
|
||||
*/
|
||||
ESR_MODE_NOTIF = 0xF3,
|
||||
|
||||
|
|
@ -688,4 +694,13 @@ struct iwl_sec_key_cmd {
|
|||
} __packed u; /* SEC_KEY_OPERATION_API_U_VER_1 */
|
||||
} __packed; /* SEC_KEY_CMD_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_omi_send_status_notif - OMI status notification
|
||||
* @success: indicates that the OMI was sent successfully
|
||||
* (currently always set)
|
||||
*/
|
||||
struct iwl_omi_send_status_notif {
|
||||
__le32 success;
|
||||
} __packed; /* OMI_SEND_STATUS_NTFY_API_S_VER_1 */
|
||||
|
||||
#endif /* __iwl_fw_api_datapath_h__ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_fw_dbg_tlv_h__
|
||||
#define __iwl_fw_dbg_tlv_h__
|
||||
|
|
@ -527,6 +527,8 @@ enum iwl_fw_ini_time_point {
|
|||
* @IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA: override trigger data.
|
||||
* Append otherwise
|
||||
* @IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD: send cmd once dump collected
|
||||
* @IWL_FW_INI_APPLY_POLICY_RESET_HANDSHAKE: perform reset handshake and
|
||||
* split dump to before/after with region marking
|
||||
*/
|
||||
enum iwl_fw_ini_trigger_apply_policy {
|
||||
IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT = BIT(0),
|
||||
|
|
@ -535,6 +537,7 @@ enum iwl_fw_ini_trigger_apply_policy {
|
|||
IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG = BIT(9),
|
||||
IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA = BIT(10),
|
||||
IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD = BIT(16),
|
||||
IWL_FW_INI_APPLY_POLICY_RESET_HANDSHAKE = BIT(17),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -556,12 +559,14 @@ enum iwl_fw_ini_trigger_reset_fw_policy {
|
|||
* @IWL_FW_INI_DEBUG_DUMP_POLICY_NO_LIMIT: OS has no limit of dump size
|
||||
* @IWL_FW_INI_DEBUG_DUMP_POLICY_MAX_LIMIT_600KB: mini dump only 600KB region dump
|
||||
* @IWL_FW_IWL_DEBUG_DUMP_POLICY_MAX_LIMIT_5MB: mini dump 5MB size dump
|
||||
* @IWL_FW_IWL_DEBUG_DUMP_POLICY_BEFORE_RESET: dump this region before reset
|
||||
* handshake (if requested by %IWL_FW_INI_APPLY_POLICY_RESET_HANDSHAKE)
|
||||
*/
|
||||
enum iwl_fw_ini_dump_policy {
|
||||
IWL_FW_INI_DEBUG_DUMP_POLICY_NO_LIMIT = BIT(0),
|
||||
IWL_FW_INI_DEBUG_DUMP_POLICY_MAX_LIMIT_600KB = BIT(1),
|
||||
IWL_FW_IWL_DEBUG_DUMP_POLICY_MAX_LIMIT_5MB = BIT(2),
|
||||
|
||||
IWL_FW_IWL_DEBUG_DUMP_POLICY_BEFORE_RESET = BIT(3),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
129
drivers/net/wireless/intel/iwlwifi/fw/api/dhc.h
Normal file
129
drivers/net/wireless/intel/iwlwifi/fw/api/dhc.h
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_fw_api_dhc_h__
|
||||
#define __iwl_fw_api_dhc_h__
|
||||
|
||||
#define DHC_TABLE_MASK_POS (28)
|
||||
|
||||
/**
|
||||
* enum iwl_dhc_table_id - DHC table operations index
|
||||
*/
|
||||
enum iwl_dhc_table_id {
|
||||
/**
|
||||
* @DHC_TABLE_INTEGRATION: select the integration table
|
||||
*/
|
||||
DHC_TABLE_INTEGRATION = 2 << DHC_TABLE_MASK_POS,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iwl_dhc_umac_integration_table - integration operations
|
||||
*/
|
||||
enum iwl_dhc_umac_integration_table {
|
||||
/**
|
||||
* @DHC_INT_UMAC_TWT_OPERATION: trigger a TWT operation
|
||||
*/
|
||||
DHC_INT_UMAC_TWT_OPERATION = 4,
|
||||
/**
|
||||
* @DHC_INTEGRATION_TLC_DEBUG_CONFIG: TLC debug
|
||||
*/
|
||||
DHC_INTEGRATION_TLC_DEBUG_CONFIG = 1,
|
||||
/**
|
||||
* @DHC_INTEGRATION_MAX: Maximum UMAC integration table entries
|
||||
*/
|
||||
DHC_INTEGRATION_MAX
|
||||
};
|
||||
|
||||
#define DHC_TARGET_UMAC BIT(27)
|
||||
|
||||
/**
|
||||
* struct iwl_dhc_cmd - debug host command
|
||||
* @length: length in DWs of the data structure that is concatenated to the end
|
||||
* of this struct
|
||||
* @index_and_mask: bit 31 is 1 for data set operation else it's 0
|
||||
* bits 28-30 is the index of the table of the operation -
|
||||
* &enum iwl_dhc_table_id *
|
||||
* bit 27 is 0 if the cmd targeted to LMAC and 1 if targeted to UMAC,
|
||||
* (LMAC is 0 for backward compatibility)
|
||||
* bit 26 is 0 if the cmd targeted to LMAC0 and 1 if targeted to LMAC1,
|
||||
* relevant only if bit 27 set to 0
|
||||
* bits 0-25 is a specific entry index in the table specified in bits 28-30
|
||||
*
|
||||
* @data: the concatenated data.
|
||||
*/
|
||||
struct iwl_dhc_cmd {
|
||||
__le32 length;
|
||||
__le32 index_and_mask;
|
||||
__le32 data[];
|
||||
} __packed; /* DHC_CMD_API_S */
|
||||
|
||||
/**
|
||||
* enum iwl_dhc_twt_operation_type - describes the TWT operation type
|
||||
*
|
||||
* @DHC_TWT_REQUEST: Send a Request TWT command
|
||||
* @DHC_TWT_SUGGEST: Send a Suggest TWT command
|
||||
* @DHC_TWT_DEMAND: Send a Demand TWT command
|
||||
* @DHC_TWT_GROUPING: Send a Grouping TWT command
|
||||
* @DHC_TWT_ACCEPT: Send a Accept TWT command
|
||||
* @DHC_TWT_ALTERNATE: Send a Alternate TWT command
|
||||
* @DHC_TWT_DICTATE: Send a Dictate TWT command
|
||||
* @DHC_TWT_REJECT: Send a Reject TWT command
|
||||
* @DHC_TWT_TEARDOWN: Send a TearDown TWT command
|
||||
*/
|
||||
enum iwl_dhc_twt_operation_type {
|
||||
DHC_TWT_REQUEST,
|
||||
DHC_TWT_SUGGEST,
|
||||
DHC_TWT_DEMAND,
|
||||
DHC_TWT_GROUPING,
|
||||
DHC_TWT_ACCEPT,
|
||||
DHC_TWT_ALTERNATE,
|
||||
DHC_TWT_DICTATE,
|
||||
DHC_TWT_REJECT,
|
||||
DHC_TWT_TEARDOWN,
|
||||
}; /* DHC_TWT_OPERATION_TYPE_E */
|
||||
|
||||
/**
|
||||
* struct iwl_dhc_twt_operation - trigger a TWT operation
|
||||
*
|
||||
* @mac_id: the mac Id on which to trigger TWT operation
|
||||
* @twt_operation: see &enum iwl_dhc_twt_operation_type
|
||||
* @target_wake_time: when should we be on channel
|
||||
* @interval_exp: the exponent for the interval
|
||||
* @interval_mantissa: the mantissa for the interval
|
||||
* @min_wake_duration: the minimum duration for the wake period
|
||||
* @trigger: is the TWT triggered or not
|
||||
* @flow_type: is the TWT announced or not
|
||||
* @flow_id: the TWT flow identifier from 0 to 7
|
||||
* @protection: is the TWT protected
|
||||
* @ndo_paging_indicator: is ndo_paging_indicator set
|
||||
* @responder_pm_mode: is responder_pm_mode set
|
||||
* @negotiation_type: if the responder wants to doze outside the TWT SP
|
||||
* @twt_request: 1 for TWT request, 0 otherwise
|
||||
* @implicit: is TWT implicit
|
||||
* @twt_group_assignment: the TWT group assignment
|
||||
* @twt_channel: the TWT channel
|
||||
* @reserved: reserved
|
||||
*/
|
||||
struct iwl_dhc_twt_operation {
|
||||
__le32 mac_id;
|
||||
__le32 twt_operation;
|
||||
__le64 target_wake_time;
|
||||
__le32 interval_exp;
|
||||
__le32 interval_mantissa;
|
||||
__le32 min_wake_duration;
|
||||
u8 trigger;
|
||||
u8 flow_type;
|
||||
u8 flow_id;
|
||||
u8 protection;
|
||||
u8 ndo_paging_indicator;
|
||||
u8 responder_pm_mode;
|
||||
u8 negotiation_type;
|
||||
u8 twt_request;
|
||||
u8 implicit;
|
||||
u8 twt_group_assignment;
|
||||
u8 twt_channel;
|
||||
u8 reserved;
|
||||
}; /* DHC_TWT_OPERATION_API_S */
|
||||
|
||||
#endif /* __iwl_fw_api_dhc_h__ */
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_fw_api_location_h__
|
||||
#define __iwl_fw_api_location_h__
|
||||
|
|
@ -1015,7 +1015,7 @@ struct iwl_tof_range_req_ap_entry_v9 {
|
|||
} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_9 */
|
||||
|
||||
/**
|
||||
* struct iwl_tof_range_req_ap_entry_v10 - AP configuration parameters
|
||||
* struct iwl_tof_range_req_ap_entry - AP configuration parameters
|
||||
* @initiator_ap_flags: see &enum iwl_initiator_ap_flags.
|
||||
* @band: 0 for 5.2 GHz, 1 for 2.4 GHz, 2 for 6GHz
|
||||
* @channel_num: AP Channel number
|
||||
|
|
@ -1063,7 +1063,7 @@ struct iwl_tof_range_req_ap_entry_v9 {
|
|||
* @min_time_between_msr: For non trigger based NDP ranging, the minimum time
|
||||
* between measurements in units of milliseconds
|
||||
*/
|
||||
struct iwl_tof_range_req_ap_entry_v10 {
|
||||
struct iwl_tof_range_req_ap_entry {
|
||||
__le32 initiator_ap_flags;
|
||||
u8 band;
|
||||
u8 channel_num;
|
||||
|
|
@ -1134,7 +1134,7 @@ enum iwl_tof_initiator_flags {
|
|||
IWL_TOF_INITIATOR_FLAGS_NON_ASAP_SUPPORT = BIT(20),
|
||||
}; /* LOCATION_RANGE_REQ_CMD_API_S_VER_5 */
|
||||
|
||||
#define IWL_MVM_TOF_MAX_APS 5
|
||||
#define IWL_TOF_MAX_APS 5
|
||||
#define IWL_MVM_TOF_MAX_TWO_SIDED_APS 5
|
||||
|
||||
/**
|
||||
|
|
@ -1153,7 +1153,7 @@ enum iwl_tof_initiator_flags {
|
|||
* when the session is done (successfully / partially).
|
||||
* one of iwl_tof_response_mode.
|
||||
* @reserved0: reserved
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @macaddr_random: '0' Use default source MAC address (i.e. p2_p),
|
||||
* '1' Use MAC Address randomization according to the below
|
||||
* @range_req_bssid: ranging request BSSID
|
||||
|
|
@ -1183,7 +1183,7 @@ struct iwl_tof_range_req_cmd_v5 {
|
|||
u8 ftm_tx_chains;
|
||||
__le16 common_calib;
|
||||
__le16 specific_calib;
|
||||
struct iwl_tof_range_req_ap_entry_v2 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_req_ap_entry_v2 ap[IWL_TOF_MAX_APS];
|
||||
} __packed;
|
||||
/* LOCATION_RANGE_REQ_CMD_API_S_VER_5 */
|
||||
|
||||
|
|
@ -1192,7 +1192,7 @@ struct iwl_tof_range_req_cmd_v5 {
|
|||
* @initiator_flags: see flags @ iwl_tof_initiator_flags
|
||||
* @request_id: A Token incremented per request. The same Token will be
|
||||
* sent back in the range response
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @range_req_bssid: ranging request BSSID
|
||||
* @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
|
||||
* Bits set to 1 shall be randomized by the UMAC
|
||||
|
|
@ -1216,7 +1216,7 @@ struct iwl_tof_range_req_cmd_v7 {
|
|||
__le32 tsf_mac_id;
|
||||
__le16 common_calib;
|
||||
__le16 specific_calib;
|
||||
struct iwl_tof_range_req_ap_entry_v3 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_req_ap_entry_v3 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_7 */
|
||||
|
||||
/**
|
||||
|
|
@ -1224,7 +1224,7 @@ struct iwl_tof_range_req_cmd_v7 {
|
|||
* @initiator_flags: see flags @ iwl_tof_initiator_flags
|
||||
* @request_id: A Token incremented per request. The same Token will be
|
||||
* sent back in the range response
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @range_req_bssid: ranging request BSSID
|
||||
* @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
|
||||
* Bits set to 1 shall be randomized by the UMAC
|
||||
|
|
@ -1248,7 +1248,7 @@ struct iwl_tof_range_req_cmd_v8 {
|
|||
__le32 tsf_mac_id;
|
||||
__le16 common_calib;
|
||||
__le16 specific_calib;
|
||||
struct iwl_tof_range_req_ap_entry_v4 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_req_ap_entry_v4 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_8 */
|
||||
|
||||
/**
|
||||
|
|
@ -1256,7 +1256,7 @@ struct iwl_tof_range_req_cmd_v8 {
|
|||
* @initiator_flags: see flags @ iwl_tof_initiator_flags
|
||||
* @request_id: A Token incremented per request. The same Token will be
|
||||
* sent back in the range response
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @range_req_bssid: ranging request BSSID
|
||||
* @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
|
||||
* Bits set to 1 shall be randomized by the UMAC
|
||||
|
|
@ -1276,7 +1276,7 @@ struct iwl_tof_range_req_cmd_v9 {
|
|||
u8 macaddr_template[ETH_ALEN];
|
||||
__le32 req_timeout_ms;
|
||||
__le32 tsf_mac_id;
|
||||
struct iwl_tof_range_req_ap_entry_v6 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_req_ap_entry_v6 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_9 */
|
||||
|
||||
/**
|
||||
|
|
@ -1284,7 +1284,7 @@ struct iwl_tof_range_req_cmd_v9 {
|
|||
* @initiator_flags: see flags @ iwl_tof_initiator_flags
|
||||
* @request_id: A Token incremented per request. The same Token will be
|
||||
* sent back in the range response
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @range_req_bssid: ranging request BSSID
|
||||
* @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
|
||||
* Bits set to 1 shall be randomized by the UMAC
|
||||
|
|
@ -1304,7 +1304,7 @@ struct iwl_tof_range_req_cmd_v11 {
|
|||
u8 macaddr_template[ETH_ALEN];
|
||||
__le32 req_timeout_ms;
|
||||
__le32 tsf_mac_id;
|
||||
struct iwl_tof_range_req_ap_entry_v7 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_req_ap_entry_v7 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_11 */
|
||||
|
||||
/**
|
||||
|
|
@ -1312,7 +1312,7 @@ struct iwl_tof_range_req_cmd_v11 {
|
|||
* @initiator_flags: see flags @ iwl_tof_initiator_flags
|
||||
* @request_id: A Token incremented per request. The same Token will be
|
||||
* sent back in the range response
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @range_req_bssid: ranging request BSSID
|
||||
* @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
|
||||
* Bits set to 1 shall be randomized by the UMAC
|
||||
|
|
@ -1332,7 +1332,7 @@ struct iwl_tof_range_req_cmd_v12 {
|
|||
u8 macaddr_template[ETH_ALEN];
|
||||
__le32 req_timeout_ms;
|
||||
__le32 tsf_mac_id;
|
||||
struct iwl_tof_range_req_ap_entry_v8 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_req_ap_entry_v8 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_12 */
|
||||
|
||||
/**
|
||||
|
|
@ -1340,7 +1340,7 @@ struct iwl_tof_range_req_cmd_v12 {
|
|||
* @initiator_flags: see flags @ iwl_tof_initiator_flags
|
||||
* @request_id: A Token incremented per request. The same Token will be
|
||||
* sent back in the range response
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @range_req_bssid: ranging request BSSID
|
||||
* @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
|
||||
* Bits set to 1 shall be randomized by the UMAC
|
||||
|
|
@ -1360,15 +1360,15 @@ struct iwl_tof_range_req_cmd_v13 {
|
|||
u8 macaddr_template[ETH_ALEN];
|
||||
__le32 req_timeout_ms;
|
||||
__le32 tsf_mac_id;
|
||||
struct iwl_tof_range_req_ap_entry_v9 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_req_ap_entry_v9 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_13 */
|
||||
|
||||
/**
|
||||
* struct iwl_tof_range_req_cmd_v14 - start measurement cmd
|
||||
* struct iwl_tof_range_req_cmd - start measurement cmd
|
||||
* @initiator_flags: see flags @ iwl_tof_initiator_flags
|
||||
* @request_id: A Token incremented per request. The same Token will be
|
||||
* sent back in the range response
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_ap: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @range_req_bssid: ranging request BSSID
|
||||
* @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
|
||||
* Bits set to 1 shall be randomized by the UMAC
|
||||
|
|
@ -1377,9 +1377,9 @@ struct iwl_tof_range_req_cmd_v13 {
|
|||
* This is the session time for completing the measurement.
|
||||
* @tsf_mac_id: report the measurement start time for each ap in terms of the
|
||||
* TSF of this mac id. 0xff to disable TSF reporting.
|
||||
* @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v10.
|
||||
* @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry.
|
||||
*/
|
||||
struct iwl_tof_range_req_cmd_v14 {
|
||||
struct iwl_tof_range_req_cmd {
|
||||
__le32 initiator_flags;
|
||||
u8 request_id;
|
||||
u8 num_of_ap;
|
||||
|
|
@ -1388,8 +1388,8 @@ struct iwl_tof_range_req_cmd_v14 {
|
|||
u8 macaddr_template[ETH_ALEN];
|
||||
__le32 req_timeout_ms;
|
||||
__le32 tsf_mac_id;
|
||||
struct iwl_tof_range_req_ap_entry_v10 ap[IWL_MVM_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_13 */
|
||||
struct iwl_tof_range_req_ap_entry ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_15 */
|
||||
|
||||
/*
|
||||
* enum iwl_tof_range_request_status - status of the sent request
|
||||
|
|
@ -1609,7 +1609,7 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v5 {
|
|||
} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_5 */
|
||||
|
||||
/**
|
||||
* struct iwl_tof_range_rsp_ap_entry_ntfy_v6 - AP parameters (response)
|
||||
* struct iwl_tof_range_rsp_ap_entry_ntfy - AP parameters (response)
|
||||
* @bssid: BSSID of the AP
|
||||
* @measure_status: current APs measurement status, one of
|
||||
* &enum iwl_tof_entry_status.
|
||||
|
|
@ -1645,7 +1645,7 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v5 {
|
|||
* @tx_pn: the last PN used for this responder Tx in case PMF is configured in
|
||||
* LE byte order.
|
||||
*/
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v6 {
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy {
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 measure_status;
|
||||
u8 measure_bw;
|
||||
|
|
@ -1695,7 +1695,7 @@ enum iwl_tof_response_status {
|
|||
* @request_status: status of current measurement session, one of
|
||||
* &enum iwl_tof_response_status.
|
||||
* @last_in_batch: reprot policy (when not all responses are uploaded at once)
|
||||
* @num_of_aps: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
|
||||
* @num_of_aps: Number of APs to measure (error if > IWL_TOF_MAX_APS)
|
||||
* @ap: per-AP data
|
||||
*/
|
||||
struct iwl_tof_range_rsp_ntfy_v5 {
|
||||
|
|
@ -1703,7 +1703,7 @@ struct iwl_tof_range_rsp_ntfy_v5 {
|
|||
u8 request_status;
|
||||
u8 last_in_batch;
|
||||
u8 num_of_aps;
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v3 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v3 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_5 */
|
||||
|
||||
/**
|
||||
|
|
@ -1719,7 +1719,7 @@ struct iwl_tof_range_rsp_ntfy_v6 {
|
|||
u8 num_of_aps;
|
||||
u8 last_report;
|
||||
u8 reserved;
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v4 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v4 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_6 */
|
||||
|
||||
/**
|
||||
|
|
@ -1735,23 +1735,23 @@ struct iwl_tof_range_rsp_ntfy_v7 {
|
|||
u8 num_of_aps;
|
||||
u8 last_report;
|
||||
u8 reserved;
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v5 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v5 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_7 */
|
||||
|
||||
/**
|
||||
* struct iwl_tof_range_rsp_ntfy_v8 - ranging response notification
|
||||
* struct iwl_tof_range_rsp_ntfy - ranging response notification
|
||||
* @request_id: A Token ID of the corresponding Range request
|
||||
* @num_of_aps: Number of APs results
|
||||
* @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.
|
||||
* @reserved: reserved
|
||||
* @ap: per-AP data
|
||||
*/
|
||||
struct iwl_tof_range_rsp_ntfy_v8 {
|
||||
struct iwl_tof_range_rsp_ntfy {
|
||||
u8 request_id;
|
||||
u8 num_of_aps;
|
||||
u8 last_report;
|
||||
u8 reserved;
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v6 ap[IWL_MVM_TOF_MAX_APS];
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_8,
|
||||
LOCATION_RANGE_RSP_NTFY_API_S_VER_9 */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2019, 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2019, 2021-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -46,7 +46,7 @@ enum iwl_mac_conf_subcmd_ids {
|
|||
*/
|
||||
STA_CONFIG_CMD = 0xA,
|
||||
/**
|
||||
* @AUX_STA_CMD: &struct iwl_mvm_aux_sta_cmd
|
||||
* @AUX_STA_CMD: &struct iwl_aux_sta_cmd
|
||||
*/
|
||||
AUX_STA_CMD = 0xB,
|
||||
/**
|
||||
|
|
@ -61,6 +61,10 @@ enum iwl_mac_conf_subcmd_ids {
|
|||
* @ROC_CMD: &struct iwl_roc_req
|
||||
*/
|
||||
ROC_CMD = 0xE,
|
||||
/**
|
||||
* @TWT_OPERATION_CMD: &struct iwl_twt_operation_cmd
|
||||
*/
|
||||
TWT_OPERATION_CMD = 0x10,
|
||||
/**
|
||||
* @MISSED_BEACONS_NOTIF: &struct iwl_missed_beacons_notif
|
||||
*/
|
||||
|
|
@ -641,7 +645,7 @@ struct iwl_sta_cfg_cmd {
|
|||
} __packed; /* STA_CMD_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_mvm_aux_sta_cmd - command for AUX STA configuration
|
||||
* struct iwl_aux_sta_cmd - command for AUX STA configuration
|
||||
* ( AUX_STA_CMD = 0xB )
|
||||
*
|
||||
* @sta_id: index of aux sta to configure
|
||||
|
|
@ -649,7 +653,7 @@ struct iwl_sta_cfg_cmd {
|
|||
* @mac_addr: mac addr of the auxilary sta
|
||||
* @reserved_for_mac_addr: reserved
|
||||
*/
|
||||
struct iwl_mvm_aux_sta_cmd {
|
||||
struct iwl_aux_sta_cmd {
|
||||
__le32 sta_id;
|
||||
__le32 lmac_id;
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
|
|
@ -693,11 +697,11 @@ enum iwl_mvm_fw_esr_recommendation {
|
|||
}; /* ESR_MODE_RECOMMENDATION_CODE_API_E_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_mvm_esr_mode_notif - FWs recommendation/force for esr mode
|
||||
* struct iwl_esr_mode_notif - FWs recommendation/force for esr mode
|
||||
*
|
||||
* @action: the action to apply on esr state. See &iwl_mvm_fw_esr_recommendation
|
||||
*/
|
||||
struct iwl_mvm_esr_mode_notif {
|
||||
struct iwl_esr_mode_notif {
|
||||
__le32 action;
|
||||
} __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_1 */
|
||||
|
||||
|
|
@ -748,4 +752,83 @@ struct iwl_esr_trans_fail_notif {
|
|||
__le32 err_code;
|
||||
} __packed; /* ESR_TRANSITION_FAILED_NTFY_API_S_VER_1 */
|
||||
|
||||
/*
|
||||
* enum iwl_twt_operation_type: TWT operation in a TWT action frame
|
||||
*
|
||||
* @TWT_OPERATION_REQUEST: TWT Request
|
||||
* @TWT_OPERATION_SUGGEST: TWT Suggest
|
||||
* @TWT_OPERATION_DEMAND: TWT Demand
|
||||
* @TWT_OPERATION_GROUPING: TWT Grouping
|
||||
* @TWT_OPERATION_ACCEPT: TWT Accept
|
||||
* @TWT_OPERATION_ALTERNATE: TWT Alternate
|
||||
* @TWT_OPERATION_DICTATE: TWT Dictate
|
||||
* @TWT_OPERATION_REJECT: TWT Reject
|
||||
* @TWT_OPERATION_TEARDOWN: TWT Teardown
|
||||
* @TWT_OPERATION_UNAVAILABILITY: TWT Unavailability
|
||||
*/
|
||||
enum iwl_twt_operation_type {
|
||||
TWT_OPERATION_REQUEST,
|
||||
TWT_OPERATION_SUGGEST,
|
||||
TWT_OPERATION_DEMAND,
|
||||
TWT_OPERATION_GROUPING,
|
||||
TWT_OPERATION_ACCEPT,
|
||||
TWT_OPERATION_ALTERNATE,
|
||||
TWT_OPERATION_DICTATE,
|
||||
TWT_OPERATION_REJECT,
|
||||
TWT_OPERATION_TEARDOWN,
|
||||
TWT_OPERATION_UNAVAILABILITY,
|
||||
TWT_OPERATION_MAX,
|
||||
}; /* TWT_OPERATION_TYPE_E_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_twt_operation_cmd - initiate a TWT session from driver
|
||||
*
|
||||
* @link_id: FW link id to initiate the TWT
|
||||
* @twt_operation: &enum iwl_twt_operation_type
|
||||
* @target_wake_time: TSF time to start the TWT
|
||||
* @interval_exponent: the exponent for the interval
|
||||
* @interval_mantissa: the mantissa for the interval
|
||||
* @minimum_wake_duration: the minimum duration for the wake period
|
||||
* @trigger: is the TWT triggered or not
|
||||
* @flow_type: is the TWT announced (0) or not (1)
|
||||
* @flow_id: the TWT flow identifier 0 - 7
|
||||
* @twt_protection: is the TWT protected
|
||||
* @ndp_paging_indicator: is ndp paging indicator set
|
||||
* @responder_pm_mode: is responder pm mode set
|
||||
* @negotiation_type: if the responder wants to doze outside the TWT SP
|
||||
* @twt_request: 1 for TWT request (STA), 0 for TWT response (AP)
|
||||
* @implicit: is TWT implicit
|
||||
* @twt_group_assignment: the TWT group assignment
|
||||
* @twt_channel: the TWT channel
|
||||
* @restricted_info_present: is this a restricted TWT
|
||||
* @dl_bitmap_valid: is DL (download) bitmap valid (restricted TWT)
|
||||
* @ul_bitmap_valid: is UL (upload) bitmap valid (restricted TWT)
|
||||
* @dl_tid_bitmap: DL TID bitmap (restricted TWT)
|
||||
* @ul_tid_bitmap: UL TID bitmap (restricted TWT)
|
||||
*/
|
||||
struct iwl_twt_operation_cmd {
|
||||
__le32 link_id;
|
||||
__le32 twt_operation;
|
||||
__le64 target_wake_time;
|
||||
__le32 interval_exponent;
|
||||
__le32 interval_mantissa;
|
||||
__le32 minimum_wake_duration;
|
||||
u8 trigger;
|
||||
u8 flow_type;
|
||||
u8 flow_id;
|
||||
u8 twt_protection;
|
||||
u8 ndp_paging_indicator;
|
||||
u8 responder_pm_mode;
|
||||
u8 negotiation_type;
|
||||
u8 twt_request;
|
||||
u8 implicit;
|
||||
u8 twt_group_assignment;
|
||||
u8 twt_channel;
|
||||
u8 restricted_info_present;
|
||||
u8 dl_bitmap_valid;
|
||||
u8 ul_bitmap_valid;
|
||||
u8 dl_tid_bitmap;
|
||||
u8 ul_tid_bitmap;
|
||||
} __packed; /* TWT_OPERATION_API_S_VER_1 */
|
||||
|
||||
#endif /* __iwl_fw_api_mac_cfg_h__ */
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ enum iwl_phy_ops_subcmd_ids {
|
|||
CMD_DTS_MEASUREMENT_TRIGGER_WIDE = 0x0,
|
||||
|
||||
/**
|
||||
* @CTDP_CONFIG_CMD: &struct iwl_mvm_ctdp_cmd
|
||||
* @CTDP_CONFIG_CMD: &struct iwl_ctdp_cmd
|
||||
*/
|
||||
CTDP_CONFIG_CMD = 0x03,
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ enum iwl_phy_ops_subcmd_ids {
|
|||
/**
|
||||
* @DTS_MEASUREMENT_NOTIF_WIDE:
|
||||
* &struct iwl_dts_measurement_notif_v1 or
|
||||
* &struct iwl_dts_measurement_notif_v2
|
||||
* &struct iwl_dts_measurement_notif
|
||||
*/
|
||||
DTS_MEASUREMENT_NOTIF_WIDE = 0xFF,
|
||||
};
|
||||
|
|
@ -152,13 +152,13 @@ struct iwl_dts_measurement_notif_v1 {
|
|||
} __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_1*/
|
||||
|
||||
/**
|
||||
* struct iwl_dts_measurement_notif_v2 - measurements notification
|
||||
* struct iwl_dts_measurement_notif - measurements notification
|
||||
*
|
||||
* @temp: the measured temperature
|
||||
* @voltage: the measured voltage
|
||||
* @threshold_idx: the trip index that was crossed
|
||||
*/
|
||||
struct iwl_dts_measurement_notif_v2 {
|
||||
struct iwl_dts_measurement_notif {
|
||||
__le32 temp;
|
||||
__le32 voltage;
|
||||
__le32 threshold_idx;
|
||||
|
|
@ -195,25 +195,25 @@ struct ct_kill_notif {
|
|||
} __packed; /* CT_KILL_NOTIFICATION_API_S_VER_1, CT_KILL_NOTIFICATION_API_S_VER_2 */
|
||||
|
||||
/**
|
||||
* enum iwl_mvm_ctdp_cmd_operation - CTDP command operations
|
||||
* enum iwl_ctdp_cmd_operation - CTDP command operations
|
||||
* @CTDP_CMD_OPERATION_START: update the current budget
|
||||
* @CTDP_CMD_OPERATION_STOP: stop ctdp
|
||||
* @CTDP_CMD_OPERATION_REPORT: get the average budget
|
||||
*/
|
||||
enum iwl_mvm_ctdp_cmd_operation {
|
||||
enum iwl_ctdp_cmd_operation {
|
||||
CTDP_CMD_OPERATION_START = 0x1,
|
||||
CTDP_CMD_OPERATION_STOP = 0x2,
|
||||
CTDP_CMD_OPERATION_REPORT = 0x4,
|
||||
};/* CTDP_CMD_OPERATION_TYPE_E */
|
||||
|
||||
/**
|
||||
* struct iwl_mvm_ctdp_cmd - track and manage the FW power consumption budget
|
||||
* struct iwl_ctdp_cmd - track and manage the FW power consumption budget
|
||||
*
|
||||
* @operation: see &enum iwl_mvm_ctdp_cmd_operation
|
||||
* @operation: see &enum iwl_ctdp_cmd_operation
|
||||
* @budget: the budget in milliwatt
|
||||
* @window_size: defined in API but not used
|
||||
*/
|
||||
struct iwl_mvm_ctdp_cmd {
|
||||
struct iwl_ctdp_cmd {
|
||||
__le32 operation;
|
||||
__le32 budget;
|
||||
__le32 window_size;
|
||||
|
|
|
|||
|
|
@ -226,6 +226,58 @@ struct iwl_tlc_update_notif {
|
|||
__le32 amsdu_enabled;
|
||||
} __packed; /* TLC_MNG_UPDATE_NTFY_API_S_VER_2 */
|
||||
|
||||
/**
|
||||
* enum iwl_tlc_debug_types - debug options
|
||||
*/
|
||||
enum iwl_tlc_debug_types {
|
||||
/**
|
||||
* @IWL_TLC_DEBUG_FIXED_RATE: set fixed rate for rate scaling
|
||||
*/
|
||||
IWL_TLC_DEBUG_FIXED_RATE,
|
||||
/**
|
||||
* @IWL_TLC_DEBUG_AGG_DURATION_LIM: time limit for a BA
|
||||
* session, in usec
|
||||
*/
|
||||
IWL_TLC_DEBUG_AGG_DURATION_LIM,
|
||||
/**
|
||||
* @IWL_TLC_DEBUG_AGG_FRAME_CNT_LIM: set max number of frames
|
||||
* in an aggregation
|
||||
*/
|
||||
IWL_TLC_DEBUG_AGG_FRAME_CNT_LIM,
|
||||
/**
|
||||
* @IWL_TLC_DEBUG_TPC_ENABLED: enable or disable tpc
|
||||
*/
|
||||
IWL_TLC_DEBUG_TPC_ENABLED,
|
||||
/**
|
||||
* @IWL_TLC_DEBUG_TPC_STATS: get number of frames Tx'ed in each
|
||||
* tpc step
|
||||
*/
|
||||
IWL_TLC_DEBUG_TPC_STATS,
|
||||
/**
|
||||
* @IWL_TLC_DEBUG_RTS_DISABLE: disable RTS (bool true/false).
|
||||
*/
|
||||
IWL_TLC_DEBUG_RTS_DISABLE,
|
||||
/**
|
||||
* @IWL_TLC_DEBUG_PARTIAL_FIXED_RATE: set partial fixed rate to fw
|
||||
*/
|
||||
IWL_TLC_DEBUG_PARTIAL_FIXED_RATE,
|
||||
}; /* TLC_MNG_DEBUG_TYPES_API_E */
|
||||
|
||||
#define MAX_DATA_IN_DHC_TLC_CMD 10
|
||||
|
||||
/**
|
||||
* struct iwl_dhc_tlc_cmd - fixed debug config
|
||||
* @sta_id: bit 0 - enable/disable, bits 1 - 7 hold station id
|
||||
* @reserved1: reserved
|
||||
* @type: type id of %enum iwl_tlc_debug_types
|
||||
* @data: data to send
|
||||
*/
|
||||
struct iwl_dhc_tlc_cmd {
|
||||
u8 sta_id;
|
||||
u8 reserved1[3];
|
||||
__le32 type;
|
||||
__le32 data[MAX_DATA_IN_DHC_TLC_CMD];
|
||||
} __packed; /* TLC_MNG_DEBUG_CMD_S */
|
||||
|
||||
#define IWL_MAX_MCS_DISPLAY_SIZE 12
|
||||
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ enum iwl_sta_sleep_flag {
|
|||
#define STA_KEY_IDX_INVALID (0xff)
|
||||
#define STA_KEY_MAX_DATA_KEY_NUM (4)
|
||||
#define IWL_MAX_GLOBAL_KEYS (4)
|
||||
#define IWL_MAX_NUM_IGTKS 2
|
||||
#define STA_KEY_LEN_WEP40 (5)
|
||||
#define STA_KEY_LEN_WEP104 (13)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2020, 2022-2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2020, 2022-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -351,7 +351,7 @@ enum iwl_roc_activity {
|
|||
}; /* ROC_ACTIVITY_API_E_VER_1 */
|
||||
|
||||
/*
|
||||
* ROC command
|
||||
* ROC command v5
|
||||
*
|
||||
* Command requests the firmware to remain on a channel for a certain duration.
|
||||
*
|
||||
|
|
@ -366,7 +366,7 @@ enum iwl_roc_activity {
|
|||
* @max_delay: max delay the ROC can start in TU
|
||||
* @duration: remain on channel duration in TU
|
||||
*/
|
||||
struct iwl_roc_req {
|
||||
struct iwl_roc_req_v5 {
|
||||
__le32 action;
|
||||
__le32 activity;
|
||||
__le32 sta_id;
|
||||
|
|
@ -375,7 +375,41 @@ struct iwl_roc_req {
|
|||
__le16 reserved;
|
||||
__le32 max_delay;
|
||||
__le32 duration;
|
||||
} __packed; /* ROC_CMD_API_S_VER_3 */
|
||||
} __packed; /* ROC_CMD_API_S_VER_5 */
|
||||
|
||||
/*
|
||||
* ROC command
|
||||
*
|
||||
* Command requests the firmware to remain on a channel for a certain duration.
|
||||
*
|
||||
* ( MAC_CONF_GROUP 0x3, ROC_CMD 0xE )
|
||||
*
|
||||
* @action: action to perform, see &enum iwl_ctxt_action
|
||||
* @activity: type of activity, see &enum iwl_roc_activity
|
||||
* @sta_id: station id, resumed during "Remain On Channel" activity.
|
||||
* @channel_info: &struct iwl_fw_channel_info
|
||||
* @node_addr: node MAC address for Rx filtering
|
||||
* @reserved1: align to a dword
|
||||
* @max_delay: max delay the ROC can start in TU
|
||||
* @duration: remain on channel duration in TU
|
||||
* @interval: interval between repetitions (when repetitions > 1).
|
||||
* @repetitions: number of repetitions
|
||||
* 0xFF: infinite repetitions. 0 or 1: single repetition.
|
||||
* @reserved2: align to a dword
|
||||
*/
|
||||
struct iwl_roc_req {
|
||||
__le32 action;
|
||||
__le32 activity;
|
||||
__le32 sta_id;
|
||||
struct iwl_fw_channel_info channel_info;
|
||||
u8 node_addr[ETH_ALEN];
|
||||
__le16 reserved1;
|
||||
__le32 max_delay;
|
||||
__le32 duration;
|
||||
__le32 interval;
|
||||
u8 repetitions;
|
||||
u8 reserved2[3];
|
||||
} __packed; /* ROC_CMD_API_S_VER_6 */
|
||||
|
||||
/*
|
||||
* ROC notification
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -2588,29 +2588,28 @@ static const struct iwl_dump_ini_mem_ops iwl_dump_ini_region_ops[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_fwrt_dump_data *dump_data,
|
||||
struct list_head *list)
|
||||
enum iwl_dump_ini_region_selector {
|
||||
IWL_INI_DUMP_ALL_REGIONS,
|
||||
IWL_INI_DUMP_EARLY_REGIONS,
|
||||
IWL_INI_DUMP_LATE_REGIONS,
|
||||
};
|
||||
|
||||
static u32
|
||||
iwl_dump_ini_dump_regions(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_fwrt_dump_data *dump_data,
|
||||
struct list_head *list,
|
||||
enum iwl_fw_ini_time_point tp_id,
|
||||
u64 regions_mask,
|
||||
struct iwl_dump_ini_region_data *imr_reg_data,
|
||||
enum iwl_dump_ini_region_selector which)
|
||||
{
|
||||
struct iwl_fw_ini_trigger_tlv *trigger = dump_data->trig;
|
||||
enum iwl_fw_ini_time_point tp_id = le32_to_cpu(trigger->time_point);
|
||||
struct iwl_dump_ini_region_data reg_data = {
|
||||
.dump_data = dump_data,
|
||||
};
|
||||
struct iwl_dump_ini_region_data imr_reg_data = {
|
||||
.dump_data = dump_data,
|
||||
};
|
||||
int i;
|
||||
u32 size = 0;
|
||||
u64 regions_mask = le64_to_cpu(trigger->regions_mask) &
|
||||
~(fwrt->trans->dbg.unsupported_region_msk);
|
||||
|
||||
BUILD_BUG_ON(sizeof(trigger->regions_mask) != sizeof(regions_mask));
|
||||
BUILD_BUG_ON((sizeof(trigger->regions_mask) * BITS_PER_BYTE) <
|
||||
ARRAY_SIZE(fwrt->trans->dbg.active_regions));
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(fwrt->trans->dbg.active_regions); i++) {
|
||||
u32 reg_type;
|
||||
for (int i = 0; i < ARRAY_SIZE(fwrt->trans->dbg.active_regions); i++) {
|
||||
struct iwl_dump_ini_region_data reg_data = {
|
||||
.dump_data = dump_data,
|
||||
};
|
||||
u32 reg_type, dp;
|
||||
struct iwl_fw_ini_region_tlv *reg;
|
||||
|
||||
if (!(BIT_ULL(i) & regions_mask))
|
||||
|
|
@ -2628,6 +2627,8 @@ static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
|
|||
if (reg_type >= ARRAY_SIZE(iwl_dump_ini_region_ops))
|
||||
continue;
|
||||
|
||||
dp = le32_get_bits(reg->id, IWL_FW_INI_REGION_DUMP_POLICY_MASK);
|
||||
|
||||
if ((reg_type == IWL_FW_INI_REGION_PERIPHERY_PHY ||
|
||||
reg_type == IWL_FW_INI_REGION_PERIPHERY_PHY_RANGE ||
|
||||
reg_type == IWL_FW_INI_REGION_PERIPHERY_SNPS_DPHYIP) &&
|
||||
|
|
@ -2637,6 +2638,20 @@ static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
|
|||
tp_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (which) {
|
||||
case IWL_INI_DUMP_ALL_REGIONS:
|
||||
break;
|
||||
case IWL_INI_DUMP_EARLY_REGIONS:
|
||||
if (!(dp & IWL_FW_IWL_DEBUG_DUMP_POLICY_BEFORE_RESET))
|
||||
continue;
|
||||
break;
|
||||
case IWL_INI_DUMP_LATE_REGIONS:
|
||||
if (dp & IWL_FW_IWL_DEBUG_DUMP_POLICY_BEFORE_RESET)
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* DRAM_IMR can be collected only for FW/HW error timepoint
|
||||
* when fw is not alive. In addition, it must be collected
|
||||
|
|
@ -2646,7 +2661,8 @@ static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
|
|||
if (reg_type == IWL_FW_INI_REGION_DRAM_IMR) {
|
||||
if (tp_id == IWL_FW_INI_TIME_POINT_FW_ASSERT ||
|
||||
tp_id == IWL_FW_INI_TIME_POINT_FW_HW_ERROR)
|
||||
imr_reg_data.reg_tlv = fwrt->trans->dbg.active_regions[i];
|
||||
imr_reg_data->reg_tlv =
|
||||
fwrt->trans->dbg.active_regions[i];
|
||||
else
|
||||
IWL_INFO(fwrt,
|
||||
"WRT: trying to collect DRAM_IMR at time point: %d, skipping\n",
|
||||
|
|
@ -2659,9 +2675,44 @@ static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
|
|||
size += iwl_dump_ini_mem(fwrt, list, ®_data,
|
||||
&iwl_dump_ini_region_ops[reg_type]);
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_fwrt_dump_data *dump_data,
|
||||
struct list_head *list)
|
||||
{
|
||||
struct iwl_fw_ini_trigger_tlv *trigger = dump_data->trig;
|
||||
enum iwl_fw_ini_time_point tp_id = le32_to_cpu(trigger->time_point);
|
||||
struct iwl_dump_ini_region_data imr_reg_data = {
|
||||
.dump_data = dump_data,
|
||||
};
|
||||
u32 size = 0;
|
||||
u64 regions_mask = le64_to_cpu(trigger->regions_mask) &
|
||||
~(fwrt->trans->dbg.unsupported_region_msk);
|
||||
|
||||
BUILD_BUG_ON(sizeof(trigger->regions_mask) != sizeof(regions_mask));
|
||||
BUILD_BUG_ON((sizeof(trigger->regions_mask) * BITS_PER_BYTE) <
|
||||
ARRAY_SIZE(fwrt->trans->dbg.active_regions));
|
||||
|
||||
if (trigger->time_point &
|
||||
cpu_to_le32(IWL_FW_INI_APPLY_POLICY_RESET_HANDSHAKE)) {
|
||||
size += iwl_dump_ini_dump_regions(fwrt, dump_data, list, tp_id,
|
||||
regions_mask, &imr_reg_data,
|
||||
IWL_INI_DUMP_EARLY_REGIONS);
|
||||
iwl_trans_pcie_fw_reset_handshake(fwrt->trans);
|
||||
size += iwl_dump_ini_dump_regions(fwrt, dump_data, list, tp_id,
|
||||
regions_mask, &imr_reg_data,
|
||||
IWL_INI_DUMP_LATE_REGIONS);
|
||||
} else {
|
||||
size += iwl_dump_ini_dump_regions(fwrt, dump_data, list, tp_id,
|
||||
regions_mask, &imr_reg_data,
|
||||
IWL_INI_DUMP_ALL_REGIONS);
|
||||
}
|
||||
/* collect DRAM_IMR region in the last */
|
||||
if (imr_reg_data.reg_tlv)
|
||||
size += iwl_dump_ini_mem(fwrt, list, ®_data,
|
||||
size += iwl_dump_ini_mem(fwrt, list, &imr_reg_data,
|
||||
&iwl_dump_ini_region_ops[IWL_FW_INI_REGION_DRAM_IMR]);
|
||||
|
||||
if (size) {
|
||||
|
|
@ -3042,9 +3093,8 @@ int iwl_fw_start_dbg_conf(struct iwl_fw_runtime *fwrt, u8 conf_id)
|
|||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_fw_start_dbg_conf);
|
||||
|
||||
void iwl_send_dbg_dump_complete_cmd(struct iwl_fw_runtime *fwrt,
|
||||
u32 timepoint,
|
||||
u32 timepoint_data)
|
||||
static void iwl_send_dbg_dump_complete_cmd(struct iwl_fw_runtime *fwrt,
|
||||
u32 timepoint, u32 timepoint_data)
|
||||
{
|
||||
struct iwl_dbg_dump_complete_cmd hcmd_data;
|
||||
struct iwl_host_cmd hcmd = {
|
||||
|
|
@ -3072,6 +3122,7 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
|
|||
struct iwl_fw_dbg_params params = {0};
|
||||
struct iwl_fwrt_dump_data *dump_data =
|
||||
&fwrt->dump.wks[wk_idx].dump_data;
|
||||
|
||||
if (!test_bit(wk_idx, &fwrt->dump.active_wks))
|
||||
return;
|
||||
|
||||
|
|
@ -3096,9 +3147,9 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
|
|||
|
||||
IWL_DEBUG_FW_INFO(fwrt, "WRT: Data collection start\n");
|
||||
if (iwl_trans_dbg_ini_valid(fwrt->trans))
|
||||
iwl_fw_error_ini_dump(fwrt, &fwrt->dump.wks[wk_idx].dump_data);
|
||||
iwl_fw_error_ini_dump(fwrt, dump_data);
|
||||
else
|
||||
iwl_fw_error_dump(fwrt, &fwrt->dump.wks[wk_idx].dump_data);
|
||||
iwl_fw_error_dump(fwrt, dump_data);
|
||||
IWL_DEBUG_FW_INFO(fwrt, "WRT: Data collection done\n");
|
||||
|
||||
iwl_fw_dbg_stop_restart_recording(fwrt, ¶ms, false);
|
||||
|
|
@ -3115,7 +3166,6 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
|
|||
|
||||
if (fwrt->trans->dbg.last_tp_resetfw == IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY)
|
||||
iwl_force_nmi(fwrt->trans);
|
||||
|
||||
out:
|
||||
if (iwl_trans_dbg_ini_valid(fwrt->trans)) {
|
||||
iwl_fw_error_dump_data_free(dump_data);
|
||||
|
|
|
|||
|
|
@ -324,9 +324,6 @@ static inline void iwl_fwrt_update_fw_versions(struct iwl_fw_runtime *fwrt,
|
|||
}
|
||||
|
||||
void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt);
|
||||
void iwl_send_dbg_dump_complete_cmd(struct iwl_fw_runtime *fwrt,
|
||||
u32 timepoint,
|
||||
u32 timepoint_data);
|
||||
bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id);
|
||||
void iwl_fw_disable_dbg_asserts(struct iwl_fw_runtime *fwrt);
|
||||
void iwl_fw_dbg_clear_monitor_buf(struct iwl_fw_runtime *fwrt);
|
||||
|
|
|
|||
|
|
@ -456,7 +456,25 @@ iwl_parse_tas_selection(const u32 tas_selection_in, const u8 tbl_rev)
|
|||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_parse_tas_selection);
|
||||
|
||||
static __le32 iwl_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt)
|
||||
bool iwl_add_mcc_to_tas_block_list(u16 *list, u8 *size, u16 mcc)
|
||||
{
|
||||
for (int i = 0; i < *size; i++) {
|
||||
if (list[i] == mcc)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Verify that there is room for another country
|
||||
* If *size == IWL_WTAS_BLACK_LIST_MAX, then the table is full.
|
||||
*/
|
||||
if (*size >= IWL_WTAS_BLACK_LIST_MAX)
|
||||
return false;
|
||||
|
||||
list[*size++] = mcc;
|
||||
return true;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_add_mcc_to_tas_block_list);
|
||||
|
||||
__le32 iwl_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
int ret;
|
||||
u32 val;
|
||||
|
|
@ -503,6 +521,7 @@ static __le32 iwl_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt)
|
|||
|
||||
return config_bitmap;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_get_lari_config_bitmap);
|
||||
|
||||
static size_t iwl_get_lari_config_cmd_size(u8 cmd_ver)
|
||||
{
|
||||
|
|
@ -553,6 +572,10 @@ int iwl_fill_lari_config(struct iwl_fw_runtime *fwrt,
|
|||
WIDE_ID(REGULATORY_AND_NVM_GROUP,
|
||||
LARI_CONFIG_CHANGE), 1);
|
||||
|
||||
if (WARN_ONCE(cmd_ver > 12,
|
||||
"Don't add newer versions to this function\n"))
|
||||
return -EINVAL;
|
||||
|
||||
memset(cmd, 0, sizeof(*cmd));
|
||||
*cmd_size = iwl_get_lari_config_cmd_size(cmd_ver);
|
||||
|
||||
|
|
@ -674,3 +697,34 @@ bool iwl_puncturing_is_allowed_in_bios(u32 puncturing, u16 mcc)
|
|||
}
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_puncturing_is_allowed_in_bios);
|
||||
|
||||
bool iwl_rfi_is_enabled_in_bios(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
/* default behaviour is disabled */
|
||||
u32 value = 0;
|
||||
int ret = iwl_bios_get_dsm(fwrt, DSM_FUNC_RFI_CONFIG, &value);
|
||||
|
||||
if (ret < 0) {
|
||||
IWL_DEBUG_RADIO(fwrt, "Failed to get DSM RFI, ret=%d\n", ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
value &= DSM_VALUE_RFI_DISABLE;
|
||||
/* RFI BIOS CONFIG value can be 0 or 3 only.
|
||||
* i.e 0 means DDR and DLVR enabled. 3 means DDR and DLVR disabled.
|
||||
* 1 and 2 are invalid BIOS configurations, So, it's not possible to
|
||||
* disable ddr/dlvr separately.
|
||||
*/
|
||||
if (!value) {
|
||||
IWL_DEBUG_RADIO(fwrt, "DSM RFI is evaluated to enable\n");
|
||||
return true;
|
||||
} else if (value == DSM_VALUE_RFI_DISABLE) {
|
||||
IWL_DEBUG_RADIO(fwrt, "DSM RFI is evaluated to disable\n");
|
||||
} else {
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"DSM RFI got invalid value, value=%d\n", value);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_rfi_is_enabled_in_bios);
|
||||
|
|
|
|||
|
|
@ -167,6 +167,8 @@ enum iwl_dsm_values_rfi {
|
|||
#define DSM_VALUE_RFI_DISABLE (DSM_VALUE_RFI_DLVR_DISABLE |\
|
||||
DSM_VALUE_RFI_DDR_DISABLE)
|
||||
|
||||
bool iwl_rfi_is_enabled_in_bios(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
enum iwl_dsm_masks_reg {
|
||||
DSM_MASK_CHINA_22_REG = BIT(2)
|
||||
};
|
||||
|
|
@ -190,6 +192,7 @@ int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
|
|||
bool iwl_is_ppag_approved(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
bool iwl_is_tas_approved(void);
|
||||
bool iwl_add_mcc_to_tas_block_list(u16 *list, u8 *size, u16 mcc);
|
||||
|
||||
struct iwl_tas_selection_data
|
||||
iwl_parse_tas_selection(const u32 tas_selection, const u8 tbl_rev);
|
||||
|
|
@ -212,6 +215,7 @@ int iwl_bios_get_mcc(struct iwl_fw_runtime *fwrt, char *mcc);
|
|||
int iwl_bios_get_eckv(struct iwl_fw_runtime *fwrt, u32 *ext_clk);
|
||||
int iwl_bios_get_wbem(struct iwl_fw_runtime *fwrt, u32 *value);
|
||||
|
||||
__le32 iwl_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt);
|
||||
int iwl_fill_lari_config(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_lari_config_change_cmd *cmd,
|
||||
size_t *cmd_size);
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ struct iwl_txf_iter_data {
|
|||
* the driver by calling &iwl_fw_set_current_image()
|
||||
* @dump: debug dump data
|
||||
* @uats_table: AP type table
|
||||
* @uats_valid: is AP type table valid
|
||||
* @uefi_tables_lock_status: The status of the WIFI GUID UEFI variables lock:
|
||||
* 0: Unlocked, 1 and 2: Locked.
|
||||
* Only read the UEFI variables if locked.
|
||||
|
|
@ -181,6 +182,7 @@ struct iwl_fw_runtime {
|
|||
struct iwl_sar_offset_mapping_cmd sgom_table;
|
||||
bool sgom_enabled;
|
||||
struct iwl_mcc_allowed_ap_type_cmd uats_table;
|
||||
bool uats_valid;
|
||||
u8 uefi_tables_lock_status;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -402,6 +402,9 @@ static int iwl_uefi_uats_parse(struct uefi_cnv_wlan_uats_data *uats_data,
|
|||
|
||||
memcpy(fwrt->uats_table.offset_map, uats_data->offset_map,
|
||||
sizeof(fwrt->uats_table.offset_map));
|
||||
|
||||
fwrt->uats_valid = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __IWL_CONFIG_H__
|
||||
#define __IWL_CONFIG_H__
|
||||
|
|
@ -451,11 +451,8 @@ struct iwl_cfg {
|
|||
#define IWL_CFG_RF_ID_HR 0x7
|
||||
#define IWL_CFG_RF_ID_HR1 0x4
|
||||
|
||||
#define IWL_CFG_NO_160 0x1
|
||||
#define IWL_CFG_160 0x0
|
||||
|
||||
#define IWL_CFG_NO_320 0x1
|
||||
#define IWL_CFG_320 0x0
|
||||
#define IWL_CFG_BW_NO_LIM (U16_MAX - 1)
|
||||
#define IWL_CFG_BW_ANY U16_MAX
|
||||
|
||||
#define IWL_CFG_CORES_BT 0x0
|
||||
#define IWL_CFG_CORES_BT_GNSS 0x5
|
||||
|
|
@ -467,7 +464,7 @@ struct iwl_cfg {
|
|||
#define IWL_CFG_IS_JACKET 0x1
|
||||
|
||||
#define IWL_SUBDEVICE_RF_ID(subdevice) ((u16)((subdevice) & 0x00F0) >> 4)
|
||||
#define IWL_SUBDEVICE_NO_160(subdevice) ((u16)((subdevice) & 0x0200) >> 9)
|
||||
#define IWL_SUBDEVICE_BW_LIM(subdevice) ((u16)((subdevice) & 0x0200) >> 9)
|
||||
#define IWL_SUBDEVICE_CORES(subdevice) ((u16)((subdevice) & 0x1C00) >> 10)
|
||||
|
||||
struct iwl_dev_info {
|
||||
|
|
@ -475,10 +472,10 @@ struct iwl_dev_info {
|
|||
u16 subdevice;
|
||||
u16 mac_type;
|
||||
u16 rf_type;
|
||||
u16 bw_limit;
|
||||
u8 mac_step;
|
||||
u8 rf_step;
|
||||
u8 rf_id;
|
||||
u8 no_160;
|
||||
u8 cores;
|
||||
u8 cdb;
|
||||
u8 jacket;
|
||||
|
|
@ -492,7 +489,7 @@ extern const unsigned int iwl_dev_info_table_size;
|
|||
const struct iwl_dev_info *
|
||||
iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
|
||||
u16 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
|
||||
u8 jacket, u8 rf_id, u8 no_160, u8 cores, u8 rf_step);
|
||||
u8 jacket, u8 rf_id, u8 bw_limit, u8 cores, u8 rf_step);
|
||||
extern const struct pci_device_id iwl_hw_card_ids[];
|
||||
#endif
|
||||
|
||||
|
|
@ -534,7 +531,6 @@ extern const char iwl9560_killer_1550i_name[];
|
|||
extern const char iwl9560_killer_1550s_name[];
|
||||
extern const char iwl_ax200_name[];
|
||||
extern const char iwl_ax203_name[];
|
||||
extern const char iwl_ax204_name[];
|
||||
extern const char iwl_ax201_name[];
|
||||
extern const char iwl_ax101_name[];
|
||||
extern const char iwl_ax200_killer_1650w_name[];
|
||||
|
|
@ -550,17 +546,12 @@ extern const char iwl_ax211_killer_1675i_name[];
|
|||
extern const char iwl_ax411_killer_1690s_name[];
|
||||
extern const char iwl_ax411_killer_1690i_name[];
|
||||
extern const char iwl_ax211_name[];
|
||||
extern const char iwl_ax221_name[];
|
||||
extern const char iwl_ax231_name[];
|
||||
extern const char iwl_ax411_name[];
|
||||
extern const char iwl_bz_name[];
|
||||
extern const char iwl_fm_name[];
|
||||
extern const char iwl_wh_name[];
|
||||
extern const char iwl_gl_name[];
|
||||
extern const char iwl_mtp_name[];
|
||||
extern const char iwl_sc_name[];
|
||||
extern const char iwl_sc2_name[];
|
||||
extern const char iwl_sc2f_name[];
|
||||
extern const char iwl_dr_name[];
|
||||
extern const char iwl_br_name[];
|
||||
#if IS_ENABLED(CONFIG_IWLDVM)
|
||||
|
|
@ -663,6 +654,8 @@ extern const struct iwl_cfg iwl_cfg_ma;
|
|||
extern const struct iwl_cfg iwl_cfg_so_a0_hr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_quz_a0_hr_b0;
|
||||
|
||||
extern const struct iwl_ht_params iwl_bz_ht_params;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_bz;
|
||||
extern const struct iwl_cfg iwl_cfg_gl;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2018, 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2018, 2020-2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_context_info_file_gen3_h__
|
||||
#define __iwl_context_info_file_gen3_h__
|
||||
|
|
@ -80,10 +80,12 @@ enum iwl_prph_scratch_flags {
|
|||
* enum iwl_prph_scratch_ext_flags - PRPH scratch control ext flags
|
||||
* @IWL_PRPH_SCRATCH_EXT_URM_FW: switch to URM mode based on fw setting
|
||||
* @IWL_PRPH_SCRATCH_EXT_URM_PERM: switch to permanent URM mode
|
||||
* @IWL_PRPH_SCRATCH_EXT_32KHZ_CLK_VALID: use external 32 KHz clock
|
||||
*/
|
||||
enum iwl_prph_scratch_ext_flags {
|
||||
IWL_PRPH_SCRATCH_EXT_URM_FW = BIT(4),
|
||||
IWL_PRPH_SCRATCH_EXT_URM_PERM = BIT(5),
|
||||
IWL_PRPH_SCRATCH_EXT_URM_FW = BIT(4),
|
||||
IWL_PRPH_SCRATCH_EXT_URM_PERM = BIT(5),
|
||||
IWL_PRPH_SCRATCH_EXT_32KHZ_CLK_VALID = BIT(8),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2021, 2024 Intel Corporation
|
||||
* Copyright(c) 2018 - 2021, 2024-2025 Intel Corporation
|
||||
*
|
||||
* Portions of this file are derived from the ipw3945 project.
|
||||
*****************************************************************************/
|
||||
|
|
@ -156,6 +156,7 @@ do { \
|
|||
#define IWL_DL_FW 0x00010000
|
||||
#define IWL_DL_RF_KILL 0x00020000
|
||||
#define IWL_DL_TPT 0x00040000
|
||||
#define IWL_DL_PTP 0x00080000
|
||||
/* 0x00F00000 - 0x00100000 */
|
||||
#define IWL_DL_RATE 0x00100000
|
||||
#define IWL_DL_CALIB 0x00200000
|
||||
|
|
@ -165,7 +166,7 @@ do { \
|
|||
#define IWL_DL_RX 0x01000000
|
||||
#define IWL_DL_ISR 0x02000000
|
||||
#define IWL_DL_HT 0x04000000
|
||||
#define IWL_DL_EXTERNAL 0x08000000
|
||||
#define IWL_DL_EHT 0x08000000
|
||||
/* 0xF0000000 - 0x10000000 */
|
||||
#define IWL_DL_11H 0x10000000
|
||||
#define IWL_DL_STATS 0x20000000
|
||||
|
|
@ -175,7 +176,6 @@ do { \
|
|||
#define IWL_DEBUG_INFO(p, f, a...) IWL_DEBUG(p, IWL_DL_INFO, f, ## a)
|
||||
#define IWL_DEBUG_TDLS(p, f, a...) IWL_DEBUG(p, IWL_DL_TDLS, f, ## a)
|
||||
#define IWL_DEBUG_MAC80211(p, f, a...) IWL_DEBUG(p, IWL_DL_MAC80211, f, ## a)
|
||||
#define IWL_DEBUG_EXTERNAL(p, f, a...) IWL_DEBUG(p, IWL_DL_EXTERNAL, f, ## a)
|
||||
#define IWL_DEBUG_TEMP(p, f, a...) IWL_DEBUG(p, IWL_DL_TEMP, f, ## a)
|
||||
#define IWL_DEBUG_SCAN(p, f, a...) IWL_DEBUG(p, IWL_DL_SCAN, f, ## a)
|
||||
#define IWL_DEBUG_RX(p, f, a...) IWL_DEBUG(p, IWL_DL_RX, f, ## a)
|
||||
|
|
@ -216,5 +216,6 @@ do { \
|
|||
#define IWL_DEBUG_LAR(p, f, a...) IWL_DEBUG(p, IWL_DL_LAR, f, ## a)
|
||||
#define IWL_DEBUG_FW_INFO(p, f, a...) \
|
||||
IWL_DEBUG(p, IWL_DL_INFO | IWL_DL_FW, f, ## a)
|
||||
|
||||
#define IWL_DEBUG_PTP(p, f, a...) IWL_DEBUG(p, IWL_DL_PTP, f, ## a)
|
||||
#define IWL_DEBUG_EHT(p, f, a...) IWL_DEBUG(p, IWL_DL_EHT, f, ## a)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2023, 2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -684,10 +684,13 @@ static const struct ieee80211_sband_iftype_data iwl_he_eht_capa[] = {
|
|||
.has_eht = true,
|
||||
.eht_cap_elem = {
|
||||
.mac_cap_info[0] =
|
||||
IEEE80211_EHT_MAC_CAP0_EPCS_PRIO_ACCESS |
|
||||
IEEE80211_EHT_MAC_CAP0_OM_CONTROL |
|
||||
IEEE80211_EHT_MAC_CAP0_TRIG_TXOP_SHARING_MODE1 |
|
||||
IEEE80211_EHT_MAC_CAP0_TRIG_TXOP_SHARING_MODE2 |
|
||||
IEEE80211_EHT_MAC_CAP0_SCS_TRAFFIC_DESC,
|
||||
.mac_cap_info[1] =
|
||||
IEEE80211_EHT_MAC_CAP1_UNSOL_EPCS_PRIO_ACCESS,
|
||||
.phy_cap_info[0] =
|
||||
IEEE80211_EHT_PHY_CAP0_242_TONE_RU_GT20MHZ |
|
||||
IEEE80211_EHT_PHY_CAP0_NDP_4_EHT_LFT_32_GI |
|
||||
|
|
@ -913,11 +916,8 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
|||
{
|
||||
bool is_ap = iftype_data->types_mask & (BIT(NL80211_IFTYPE_AP) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO));
|
||||
bool no_320;
|
||||
|
||||
no_320 = (!trans->trans_cfg->integrated &&
|
||||
trans->pcie_link_speed < PCI_EXP_LNKSTA_CLS_8_0GB) ||
|
||||
trans->reduced_cap_sku;
|
||||
bool slow_pcie = (!trans->trans_cfg->integrated &&
|
||||
trans->pcie_link_speed < PCI_EXP_LNKSTA_CLS_8_0GB);
|
||||
|
||||
if (!data->sku_cap_11be_enable || iwlwifi_mod_params.disable_11be)
|
||||
iftype_data->eht_cap.has_eht = false;
|
||||
|
|
@ -944,7 +944,7 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
|||
IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK);
|
||||
break;
|
||||
case NL80211_BAND_6GHZ:
|
||||
if (!no_320) {
|
||||
if (!trans->reduced_cap_sku) {
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[0] |=
|
||||
IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ;
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[1] |=
|
||||
|
|
@ -986,6 +986,14 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
|||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[4] |= 0x10;
|
||||
}
|
||||
}
|
||||
|
||||
if (slow_pcie) {
|
||||
struct ieee80211_eht_mcs_nss_supp *mcs_nss =
|
||||
&iftype_data->eht_cap.eht_mcs_nss_supp;
|
||||
|
||||
mcs_nss->bw._320.rx_tx_mcs11_max_nss = 0;
|
||||
mcs_nss->bw._320.rx_tx_mcs13_max_nss = 0;
|
||||
}
|
||||
} else {
|
||||
struct ieee80211_he_mcs_nss_supp *he_mcs_nss_supp =
|
||||
&iftype_data->he_cap.he_mcs_nss_supp;
|
||||
|
|
@ -1086,7 +1094,7 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
|||
iftype_data->eht_cap.eht_mcs_nss_supp.bw._320.rx_tx_mcs13_max_nss = 0;
|
||||
}
|
||||
|
||||
if (trans->no_160)
|
||||
if (trans->bw_limit < 160)
|
||||
iftype_data->he_cap.he_cap_elem.phy_cap_info[0] &=
|
||||
~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ static void iwl_trans_reprobe_wk(struct work_struct *wk)
|
|||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
#define IWL_TRANS_RESET_OK_TIME 180 /* seconds */
|
||||
#define IWL_TRANS_RESET_OK_TIME 7 /* seconds */
|
||||
|
||||
static enum iwl_reset_mode
|
||||
iwl_trans_determine_restart_mode(struct iwl_trans *trans)
|
||||
|
|
@ -671,6 +671,9 @@ IWL_EXPORT_SYMBOL(iwl_trans_txq_enable_cfg);
|
|||
|
||||
int iwl_trans_wait_txq_empty(struct iwl_trans *trans, int queue)
|
||||
{
|
||||
if (unlikely(test_bit(STATUS_FW_ERROR, &trans->status)))
|
||||
return -EIO;
|
||||
|
||||
if (WARN_ONCE(trans->state != IWL_TRANS_FW_ALIVE,
|
||||
"bad state = %d\n", trans->state))
|
||||
return -EIO;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2023, 2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -876,7 +876,7 @@ struct iwl_txq {
|
|||
* only valid for discrete (not integrated) NICs
|
||||
* @invalid_tx_cmd: invalid TX command buffer
|
||||
* @reduced_cap_sku: reduced capability supported SKU
|
||||
* @no_160: device not supporting 160 MHz
|
||||
* @bw_limit: the max bandwidth
|
||||
* @step_urm: STEP is in URM, no support for MCS>9 in 320 MHz
|
||||
* @restart: restart worker data
|
||||
* @restart.wk: restart worker
|
||||
|
|
@ -888,6 +888,7 @@ struct iwl_txq {
|
|||
* @trans_specific: data for the specific transport this is allocated for/with
|
||||
* @dsbr_urm_fw_dependent: switch to URM based on fw settings
|
||||
* @dsbr_urm_permanent: switch to URM permanently
|
||||
* @ext_32khz_clock_valid: if true, the external 32 KHz clock can be used
|
||||
*/
|
||||
struct iwl_trans {
|
||||
bool csme_own;
|
||||
|
|
@ -910,11 +911,14 @@ struct iwl_trans {
|
|||
char hw_id_str[52];
|
||||
u32 sku_id[3];
|
||||
bool reduced_cap_sku;
|
||||
u8 no_160:1, step_urm:1;
|
||||
u16 bw_limit;
|
||||
bool step_urm;
|
||||
|
||||
u8 dsbr_urm_fw_dependent:1,
|
||||
dsbr_urm_permanent:1;
|
||||
|
||||
bool ext_32khz_clock_valid;
|
||||
|
||||
u8 rx_mpdu_cmd, rx_mpdu_cmd_hdr_size;
|
||||
|
||||
bool pm_support;
|
||||
|
|
@ -1261,6 +1265,7 @@ enum iwl_reset_mode {
|
|||
};
|
||||
|
||||
void iwl_trans_pcie_reset(struct iwl_trans *trans, enum iwl_reset_mode mode);
|
||||
void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans);
|
||||
|
||||
int iwl_trans_pcie_send_hcmd(struct iwl_trans *trans,
|
||||
struct iwl_host_cmd *cmd);
|
||||
|
|
|
|||
|
|
@ -3376,7 +3376,7 @@ static bool iwl_mvm_wait_d3_notif(struct iwl_notif_wait_data *notif_wait,
|
|||
break;
|
||||
}
|
||||
case WIDE_ID(PROT_OFFLOAD_GROUP, D3_END_NOTIFICATION): {
|
||||
struct iwl_mvm_d3_end_notif *notif = (void *)pkt->data;
|
||||
struct iwl_d3_end_notif *notif = (void *)pkt->data;
|
||||
|
||||
d3_data->d3_end_flags = __le32_to_cpu(notif->flags);
|
||||
d3_data->notif_received |= IWL_D3_NOTIF_D3_END_NOTIF;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/math64.h>
|
||||
|
|
@ -46,107 +46,6 @@ struct iwl_mvm_ftm_iter_data {
|
|||
u8 *tk;
|
||||
};
|
||||
|
||||
int iwl_mvm_ftm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
u8 *addr, u32 cipher, u8 *tk, u32 tk_len,
|
||||
u8 *hltk, u32 hltk_len)
|
||||
{
|
||||
struct iwl_mvm_ftm_pasn_entry *pasn = kzalloc(sizeof(*pasn),
|
||||
GFP_KERNEL);
|
||||
u32 expected_tk_len;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
if (!pasn)
|
||||
return -ENOBUFS;
|
||||
|
||||
iwl_mvm_ftm_remove_pasn_sta(mvm, addr);
|
||||
|
||||
pasn->cipher = iwl_mvm_cipher_to_location_cipher(cipher);
|
||||
|
||||
switch (pasn->cipher) {
|
||||
case IWL_LOCATION_CIPHER_CCMP_128:
|
||||
case IWL_LOCATION_CIPHER_GCMP_128:
|
||||
expected_tk_len = WLAN_KEY_LEN_CCMP;
|
||||
break;
|
||||
case IWL_LOCATION_CIPHER_GCMP_256:
|
||||
expected_tk_len = WLAN_KEY_LEN_GCMP_256;
|
||||
break;
|
||||
default:
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* If associated to this AP and already have security context,
|
||||
* the TK is already configured for this station, so it
|
||||
* shouldn't be set again here.
|
||||
*/
|
||||
if (vif->cfg.assoc) {
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
unsigned int link_id;
|
||||
struct ieee80211_sta *sta;
|
||||
u8 sta_id;
|
||||
|
||||
rcu_read_lock();
|
||||
for_each_vif_active_link(vif, link_conf, link_id) {
|
||||
if (memcmp(addr, link_conf->bssid, ETH_ALEN))
|
||||
continue;
|
||||
|
||||
sta_id = mvmvif->link[link_id]->ap_sta_id;
|
||||
sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]);
|
||||
if (!IS_ERR_OR_NULL(sta) && sta->mfp)
|
||||
expected_tk_len = 0;
|
||||
break;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
if (tk_len != expected_tk_len ||
|
||||
(hltk_len && hltk_len != sizeof(pasn->hltk))) {
|
||||
IWL_ERR(mvm, "Invalid key length: tk_len=%u hltk_len=%u\n",
|
||||
tk_len, hltk_len);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!expected_tk_len && !hltk_len) {
|
||||
IWL_ERR(mvm, "TK and HLTK not set\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
memcpy(pasn->addr, addr, sizeof(pasn->addr));
|
||||
|
||||
if (hltk_len) {
|
||||
memcpy(pasn->hltk, hltk, sizeof(pasn->hltk));
|
||||
pasn->flags |= IWL_MVM_PASN_FLAG_HAS_HLTK;
|
||||
}
|
||||
|
||||
if (tk && tk_len)
|
||||
memcpy(pasn->tk, tk, sizeof(pasn->tk));
|
||||
|
||||
list_add_tail(&pasn->list, &mvm->ftm_initiator.pasn_list);
|
||||
return 0;
|
||||
out:
|
||||
kfree(pasn);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
void iwl_mvm_ftm_remove_pasn_sta(struct iwl_mvm *mvm, u8 *addr)
|
||||
{
|
||||
struct iwl_mvm_ftm_pasn_entry *entry, *prev;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
list_for_each_entry_safe(entry, prev, &mvm->ftm_initiator.pasn_list,
|
||||
list) {
|
||||
if (memcmp(entry->addr, addr, sizeof(entry->addr)))
|
||||
continue;
|
||||
|
||||
list_del(&entry->list);
|
||||
kfree(entry);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void iwl_mvm_ftm_reset(struct iwl_mvm *mvm)
|
||||
{
|
||||
struct iwl_mvm_loc_entry *e, *t;
|
||||
|
|
@ -949,7 +848,7 @@ static int iwl_mvm_ftm_start_v13(struct iwl_mvm *mvm,
|
|||
static int
|
||||
iwl_mvm_ftm_put_target_v10(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct cfg80211_pmsr_request_peer *peer,
|
||||
struct iwl_tof_range_req_ap_entry_v10 *target)
|
||||
struct iwl_tof_range_req_ap_entry *target)
|
||||
{
|
||||
u32 i2r_max_sts, flags;
|
||||
int ret;
|
||||
|
|
@ -1021,7 +920,7 @@ static int iwl_mvm_ftm_start_v14(struct iwl_mvm *mvm,
|
|||
struct ieee80211_vif *vif,
|
||||
struct cfg80211_pmsr_request *req)
|
||||
{
|
||||
struct iwl_tof_range_req_cmd_v14 cmd;
|
||||
struct iwl_tof_range_req_cmd cmd;
|
||||
struct iwl_host_cmd hcmd = {
|
||||
.id = WIDE_ID(LOCATION_GROUP, TOF_RANGE_REQ_CMD),
|
||||
.dataflags[0] = IWL_HCMD_DFL_DUP,
|
||||
|
|
@ -1035,7 +934,7 @@ static int iwl_mvm_ftm_start_v14(struct iwl_mvm *mvm,
|
|||
|
||||
for (i = 0; i < cmd.num_of_ap; i++) {
|
||||
struct cfg80211_pmsr_request_peer *peer = &req->peers[i];
|
||||
struct iwl_tof_range_req_ap_entry_v10 *target = &cmd.ap[i];
|
||||
struct iwl_tof_range_req_ap_entry *target = &cmd.ap[i];
|
||||
|
||||
err = iwl_mvm_ftm_put_target_v10(mvm, vif, peer, target);
|
||||
if (err)
|
||||
|
|
@ -1301,7 +1200,7 @@ static void iwl_mvm_debug_range_resp(struct iwl_mvm *mvm, u8 index,
|
|||
|
||||
static void
|
||||
iwl_mvm_ftm_pasn_update_pn(struct iwl_mvm *mvm,
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v6 *fw_ap)
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy *fw_ap)
|
||||
{
|
||||
struct iwl_mvm_ftm_pasn_entry *entry;
|
||||
|
||||
|
|
@ -1339,7 +1238,7 @@ static bool iwl_mvm_ftm_resp_size_validation(u8 ver, unsigned int pkt_len)
|
|||
switch (ver) {
|
||||
case 9:
|
||||
case 8:
|
||||
return pkt_len == sizeof(struct iwl_tof_range_rsp_ntfy_v8);
|
||||
return pkt_len == sizeof(struct iwl_tof_range_rsp_ntfy);
|
||||
case 7:
|
||||
return pkt_len == sizeof(struct iwl_tof_range_rsp_ntfy_v7);
|
||||
case 6:
|
||||
|
|
@ -1359,7 +1258,7 @@ void iwl_mvm_ftm_range_resp(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
|
|||
struct iwl_tof_range_rsp_ntfy_v5 *fw_resp_v5 = (void *)pkt->data;
|
||||
struct iwl_tof_range_rsp_ntfy_v6 *fw_resp_v6 = (void *)pkt->data;
|
||||
struct iwl_tof_range_rsp_ntfy_v7 *fw_resp_v7 = (void *)pkt->data;
|
||||
struct iwl_tof_range_rsp_ntfy_v8 *fw_resp_v8 = (void *)pkt->data;
|
||||
struct iwl_tof_range_rsp_ntfy *fw_resp_v8 = (void *)pkt->data;
|
||||
int i;
|
||||
bool new_api = fw_has_api(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_FTM_NEW_RANGE_REQ);
|
||||
|
|
@ -1395,9 +1294,9 @@ void iwl_mvm_ftm_range_resp(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
|
|||
IWL_DEBUG_INFO(mvm, "request id: %lld, num of entries: %u\n",
|
||||
mvm->ftm_initiator.req->cookie, num_of_aps);
|
||||
|
||||
for (i = 0; i < num_of_aps && i < IWL_MVM_TOF_MAX_APS; i++) {
|
||||
for (i = 0; i < num_of_aps && i < IWL_TOF_MAX_APS; i++) {
|
||||
struct cfg80211_pmsr_result result = {};
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v6 *fw_ap;
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy *fw_ap;
|
||||
int peer_idx;
|
||||
|
||||
if (new_api) {
|
||||
|
|
|
|||
|
|
@ -324,92 +324,6 @@ static void iwl_mvm_resp_del_pasn_sta(struct iwl_mvm *mvm,
|
|||
kfree(sta);
|
||||
}
|
||||
|
||||
int iwl_mvm_ftm_respoder_add_pasn_sta(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
u8 *addr, u32 cipher, u8 *tk, u32 tk_len,
|
||||
u8 *hltk, u32 hltk_len)
|
||||
{
|
||||
int ret;
|
||||
struct iwl_mvm_pasn_sta *sta = NULL;
|
||||
struct iwl_mvm_pasn_hltk_data hltk_data = {
|
||||
.addr = addr,
|
||||
.hltk = hltk,
|
||||
};
|
||||
struct iwl_mvm_pasn_hltk_data *hltk_data_ptr = NULL;
|
||||
|
||||
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw,
|
||||
WIDE_ID(LOCATION_GROUP, TOF_RESPONDER_DYN_CONFIG_CMD),
|
||||
2);
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
if (cmd_ver < 3) {
|
||||
IWL_ERR(mvm, "Adding PASN station not supported by FW\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if ((!hltk || !hltk_len) && (!tk || !tk_len)) {
|
||||
IWL_ERR(mvm, "TK and HLTK not set\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (hltk && hltk_len) {
|
||||
if (!fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_SECURE_LTF_SUPPORT)) {
|
||||
IWL_ERR(mvm, "No support for secure LTF measurement\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hltk_data.cipher = iwl_mvm_cipher_to_location_cipher(cipher);
|
||||
if (hltk_data.cipher == IWL_LOCATION_CIPHER_INVALID) {
|
||||
IWL_ERR(mvm, "invalid cipher: %u\n", cipher);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hltk_data_ptr = &hltk_data;
|
||||
}
|
||||
|
||||
if (tk && tk_len) {
|
||||
sta = kzalloc(sizeof(*sta) + tk_len, GFP_KERNEL);
|
||||
if (!sta)
|
||||
return -ENOBUFS;
|
||||
|
||||
ret = iwl_mvm_add_pasn_sta(mvm, vif, &sta->int_sta, addr,
|
||||
cipher, tk, tk_len, &sta->keyconf);
|
||||
if (ret) {
|
||||
kfree(sta);
|
||||
return ret;
|
||||
}
|
||||
|
||||
memcpy(sta->addr, addr, ETH_ALEN);
|
||||
list_add_tail(&sta->list, &mvm->resp_pasn_list);
|
||||
}
|
||||
|
||||
ret = iwl_mvm_ftm_responder_dyn_cfg_v3(mvm, vif, NULL, hltk_data_ptr);
|
||||
if (ret && sta)
|
||||
iwl_mvm_resp_del_pasn_sta(mvm, vif, sta);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int iwl_mvm_ftm_resp_remove_pasn_sta(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif, u8 *addr)
|
||||
{
|
||||
struct iwl_mvm_pasn_sta *sta, *prev;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
list_for_each_entry_safe(sta, prev, &mvm->resp_pasn_list, list) {
|
||||
if (!memcmp(sta->addr, addr, ETH_ALEN)) {
|
||||
iwl_mvm_resp_del_pasn_sta(mvm, vif, sta);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
IWL_ERR(mvm, "FTM: PASN station %pM not found\n", addr);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1094,22 +1094,6 @@ static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
|
|||
return iwl_mvm_ppag_send_cmd(mvm);
|
||||
}
|
||||
|
||||
static bool
|
||||
iwl_mvm_add_to_tas_block_list(u16 *list, u8 *size, u16 mcc)
|
||||
{
|
||||
/* Verify that there is room for another country */
|
||||
if (*size >= IWL_WTAS_BLACK_LIST_MAX)
|
||||
return false;
|
||||
|
||||
for (u8 i = 0; i < *size; i++) {
|
||||
if (list[i] == mcc)
|
||||
return true;
|
||||
}
|
||||
|
||||
list[*size++] = mcc;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
|
||||
{
|
||||
u32 cmd_id = WIDE_ID(REGULATORY_AND_NVM_GROUP, TAS_CONFIG);
|
||||
|
|
@ -1150,10 +1134,10 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
|
|||
IWL_DEBUG_RADIO(mvm,
|
||||
"System vendor '%s' is not in the approved list, disabling TAS in US and Canada.\n",
|
||||
dmi_get_system_info(DMI_SYS_VENDOR) ?: "<unknown>");
|
||||
if ((!iwl_mvm_add_to_tas_block_list(data.block_list_array,
|
||||
if ((!iwl_add_mcc_to_tas_block_list(data.block_list_array,
|
||||
&data.block_list_size,
|
||||
IWL_MCC_US)) ||
|
||||
(!iwl_mvm_add_to_tas_block_list(data.block_list_array,
|
||||
(!iwl_add_mcc_to_tas_block_list(data.block_list_array,
|
||||
&data.block_list_size,
|
||||
IWL_MCC_CANADA))) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
|
|
@ -1213,38 +1197,6 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
|
|||
IWL_DEBUG_RADIO(mvm, "failed to send TAS_CONFIG (%d)\n", ret);
|
||||
}
|
||||
|
||||
static bool iwl_mvm_eval_dsm_rfi(struct iwl_mvm *mvm)
|
||||
{
|
||||
u32 value = 0;
|
||||
/* default behaviour is disabled */
|
||||
bool bios_enable_rfi = false;
|
||||
int ret = iwl_bios_get_dsm(&mvm->fwrt, DSM_FUNC_RFI_CONFIG, &value);
|
||||
|
||||
|
||||
if (ret < 0) {
|
||||
IWL_DEBUG_RADIO(mvm, "Failed to get DSM RFI, ret=%d\n", ret);
|
||||
return bios_enable_rfi;
|
||||
}
|
||||
|
||||
value &= DSM_VALUE_RFI_DISABLE;
|
||||
/* RFI BIOS CONFIG value can be 0 or 3 only.
|
||||
* i.e 0 means DDR and DLVR enabled. 3 means DDR and DLVR disabled.
|
||||
* 1 and 2 are invalid BIOS configurations, So, it's not possible to
|
||||
* disable ddr/dlvr separately.
|
||||
*/
|
||||
if (!value) {
|
||||
IWL_DEBUG_RADIO(mvm, "DSM RFI is evaluated to enable\n");
|
||||
bios_enable_rfi = true;
|
||||
} else if (value == DSM_VALUE_RFI_DISABLE) {
|
||||
IWL_DEBUG_RADIO(mvm, "DSM RFI is evaluated to disable\n");
|
||||
} else {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"DSM RFI got invalid value, value=%d\n", value);
|
||||
}
|
||||
|
||||
return bios_enable_rfi;
|
||||
}
|
||||
|
||||
static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm)
|
||||
{
|
||||
struct iwl_lari_config_change_cmd cmd;
|
||||
|
|
@ -1631,7 +1583,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
|||
iwl_mvm_uats_init(mvm);
|
||||
|
||||
if (iwl_rfi_supported(mvm)) {
|
||||
if (iwl_mvm_eval_dsm_rfi(mvm))
|
||||
if (iwl_rfi_is_enabled_in_bios(&mvm->fwrt))
|
||||
iwl_rfi_send_config_cmd(mvm, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1960,26 +1960,3 @@ void iwl_mvm_channel_switch_error_notif(struct iwl_mvm *mvm,
|
|||
ieee80211_channel_switch_disconnect(vif);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
void iwl_mvm_rx_missed_vap_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb)
|
||||
{
|
||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||
struct iwl_missed_vap_notif *mb = (void *)pkt->data;
|
||||
struct ieee80211_vif *vif;
|
||||
u32 id = le32_to_cpu(mb->mac_id);
|
||||
|
||||
IWL_DEBUG_INFO(mvm,
|
||||
"missed_vap notify mac_id=%u, num_beacon_intervals_elapsed=%u, profile_periodicity=%u\n",
|
||||
le32_to_cpu(mb->mac_id),
|
||||
mb->num_beacon_intervals_elapsed,
|
||||
mb->profile_periodicity);
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
vif = iwl_mvm_rcu_dereference_vif_id(mvm, id, true);
|
||||
if (vif)
|
||||
iwl_mvm_connection_loss(mvm, vif, "missed vap beacon");
|
||||
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -70,7 +70,7 @@ static const struct ieee80211_iface_combination iwl_mvm_iface_combinations[] = {
|
|||
};
|
||||
|
||||
static const struct cfg80211_pmsr_capabilities iwl_mvm_pmsr_capa = {
|
||||
.max_peers = IWL_MVM_TOF_MAX_APS,
|
||||
.max_peers = IWL_TOF_MAX_APS,
|
||||
.report_ap_tsf = 1,
|
||||
.randomize_mac_addr = 1,
|
||||
|
||||
|
|
@ -272,9 +272,10 @@ static const u8 tm_if_types_ext_capa_sta[] = {
|
|||
__bf_shf(IEEE80211_EML_CAP_EMLSR_PADDING_DELAY) | \
|
||||
IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_64US << \
|
||||
__bf_shf(IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY))
|
||||
#define IWL_MVM_MLD_CAPA_OPS FIELD_PREP_CONST( \
|
||||
#define IWL_MVM_MLD_CAPA_OPS (FIELD_PREP_CONST( \
|
||||
IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP, \
|
||||
IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_SAME)
|
||||
IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_SAME) | \
|
||||
IEEE80211_MLD_CAP_OP_LINK_RECONF_SUPPORT)
|
||||
|
||||
static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = {
|
||||
{
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ static int iwl_mvm_add_aux_sta_to_fw(struct iwl_mvm *mvm,
|
|||
{
|
||||
int ret;
|
||||
|
||||
struct iwl_mvm_aux_sta_cmd cmd = {
|
||||
struct iwl_aux_sta_cmd cmd = {
|
||||
.sta_id = cpu_to_le32(sta->sta_id),
|
||||
.lmac_id = cpu_to_le32(lmac_id),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -1310,7 +1310,7 @@ struct iwl_mvm {
|
|||
struct cfg80211_pmsr_request *req;
|
||||
struct wireless_dev *req_wdev;
|
||||
struct list_head loc_list;
|
||||
int responses[IWL_MVM_TOF_MAX_APS];
|
||||
int responses[IWL_TOF_MAX_APS];
|
||||
struct {
|
||||
struct list_head resp;
|
||||
} smooth;
|
||||
|
|
@ -2095,8 +2095,6 @@ void iwl_mvm_mac_ctxt_recalc_tsf_id(struct iwl_mvm *mvm,
|
|||
struct ieee80211_vif *vif);
|
||||
void iwl_mvm_probe_resp_data_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
void iwl_mvm_rx_missed_vap_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
void iwl_mvm_channel_switch_error_notif(struct iwl_mvm *mvm,
|
||||
|
|
@ -2520,12 +2518,6 @@ void iwl_mvm_ftm_restart_responder(struct iwl_mvm *mvm,
|
|||
struct ieee80211_bss_conf *bss_conf);
|
||||
void iwl_mvm_ftm_responder_stats(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
int iwl_mvm_ftm_resp_remove_pasn_sta(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif, u8 *addr);
|
||||
int iwl_mvm_ftm_respoder_add_pasn_sta(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
u8 *addr, u32 cipher, u8 *tk, u32 tk_len,
|
||||
u8 *hltk, u32 hltk_len);
|
||||
void iwl_mvm_ftm_responder_clear(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif);
|
||||
|
||||
|
|
@ -2540,10 +2532,6 @@ int iwl_mvm_ftm_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|||
void iwl_mvm_ftm_abort(struct iwl_mvm *mvm, struct cfg80211_pmsr_request *req);
|
||||
void iwl_mvm_ftm_initiator_smooth_config(struct iwl_mvm *mvm);
|
||||
void iwl_mvm_ftm_initiator_smooth_stop(struct iwl_mvm *mvm);
|
||||
int iwl_mvm_ftm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
u8 *addr, u32 cipher, u8 *tk, u32 tk_len,
|
||||
u8 *hltk, u32 hltk_len);
|
||||
void iwl_mvm_ftm_remove_pasn_sta(struct iwl_mvm *mvm, u8 *addr);
|
||||
|
||||
/* TDLS */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -145,7 +145,7 @@ static void iwl_mvm_rx_esr_mode_notif(struct iwl_mvm *mvm,
|
|||
struct iwl_rx_cmd_buffer *rxb)
|
||||
{
|
||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||
struct iwl_mvm_esr_mode_notif *notif = (void *)pkt->data;
|
||||
struct iwl_esr_mode_notif *notif = (void *)pkt->data;
|
||||
struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm);
|
||||
|
||||
/* FW recommendations is only for entering EMLSR */
|
||||
|
|
@ -495,7 +495,7 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = {
|
|||
RX_HANDLER_GRP(DATA_PATH_GROUP, ESR_MODE_NOTIF,
|
||||
iwl_mvm_rx_esr_mode_notif,
|
||||
RX_HANDLER_ASYNC_LOCKED_WIPHY,
|
||||
struct iwl_mvm_esr_mode_notif),
|
||||
struct iwl_esr_mode_notif),
|
||||
|
||||
RX_HANDLER_GRP(DATA_PATH_GROUP, MONITOR_NOTIF,
|
||||
iwl_mvm_rx_monitor_notif, RX_HANDLER_ASYNC_LOCKED,
|
||||
|
|
|
|||
|
|
@ -1783,7 +1783,7 @@ static enum rs_action rs_get_rate_action(struct iwl_mvm *mvm,
|
|||
if ((high_tpt != IWL_INVALID_VALUE) &&
|
||||
(high_tpt > current_tpt)) {
|
||||
IWL_DEBUG_RATE(mvm,
|
||||
"Higher rate is better. Increate rate\n");
|
||||
"Higher rate is better. Increase rate\n");
|
||||
return RS_ACTION_UPSCALE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4311,67 +4311,6 @@ u16 iwl_mvm_tid_queued(struct iwl_mvm *mvm, struct iwl_mvm_tid_data *tid_data)
|
|||
return ieee80211_sn_sub(sn, tid_data->next_reclaimed);
|
||||
}
|
||||
|
||||
int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_int_sta *sta, u8 *addr, u32 cipher,
|
||||
u8 *key, u32 key_len,
|
||||
struct ieee80211_key_conf *keyconf)
|
||||
{
|
||||
int ret;
|
||||
u16 queue;
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
unsigned int wdg_timeout =
|
||||
iwl_mvm_get_wd_timeout(mvm, vif);
|
||||
bool mld = iwl_mvm_has_mld_api(mvm->fw);
|
||||
u32 type = IWL_STA_LINK;
|
||||
|
||||
if (mld)
|
||||
type = STATION_TYPE_PEER;
|
||||
|
||||
ret = iwl_mvm_allocate_int_sta(mvm, sta, 0,
|
||||
NL80211_IFTYPE_UNSPECIFIED, type);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (mld)
|
||||
ret = iwl_mvm_mld_add_int_sta_with_queue(mvm, sta, addr,
|
||||
mvmvif->deflink.fw_link_id,
|
||||
&queue,
|
||||
IWL_MAX_TID_COUNT,
|
||||
&wdg_timeout);
|
||||
else
|
||||
ret = iwl_mvm_add_int_sta_with_queue(mvm, mvmvif->id,
|
||||
mvmvif->color, addr, sta,
|
||||
&queue,
|
||||
IWL_MVM_TX_FIFO_BE);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
keyconf->cipher = cipher;
|
||||
memcpy(keyconf->key, key, key_len);
|
||||
keyconf->keylen = key_len;
|
||||
keyconf->flags = IEEE80211_KEY_FLAG_PAIRWISE;
|
||||
|
||||
if (mld) {
|
||||
/* The MFP flag is set according to the station mfp field. Since
|
||||
* we don't have a station, set it manually.
|
||||
*/
|
||||
u32 key_flags =
|
||||
iwl_mvm_get_sec_flags(mvm, vif, NULL, keyconf) |
|
||||
IWL_SEC_KEY_FLAG_MFP;
|
||||
u32 sta_mask = BIT(sta->sta_id);
|
||||
|
||||
ret = iwl_mvm_mld_send_key(mvm, sta_mask, key_flags, keyconf);
|
||||
} else {
|
||||
ret = iwl_mvm_send_sta_key(mvm, sta->sta_id, keyconf, false,
|
||||
0, NULL, 0, 0, true);
|
||||
}
|
||||
|
||||
out:
|
||||
if (ret)
|
||||
iwl_mvm_dealloc_int_sta(mvm, sta);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void iwl_mvm_cancel_channel_switch(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
u32 id)
|
||||
|
|
|
|||
|
|
@ -597,10 +597,6 @@ void iwl_mvm_modify_all_sta_disable_tx(struct iwl_mvm *mvm,
|
|||
void iwl_mvm_csa_client_absent(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
|
||||
int iwl_mvm_sta_ensure_queue(struct iwl_mvm *mvm, struct ieee80211_txq *txq);
|
||||
void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk);
|
||||
int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_int_sta *sta, u8 *addr, u32 cipher,
|
||||
u8 *key, u32 key_len,
|
||||
struct ieee80211_key_conf *key_conf_out);
|
||||
void iwl_mvm_cancel_channel_switch(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
u32 id);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -771,7 +771,7 @@ static void iwl_mvm_cancel_session_protection(struct iwl_mvm *mvm,
|
|||
|
||||
static void iwl_mvm_roc_rm_cmd(struct iwl_mvm *mvm, u32 activity)
|
||||
{
|
||||
struct iwl_roc_req roc_cmd = {
|
||||
struct iwl_roc_req_v5 roc_cmd = {
|
||||
.action = cpu_to_le32(FW_CTXT_ACTION_REMOVE),
|
||||
.activity = cpu_to_le32(activity),
|
||||
};
|
||||
|
|
@ -1100,7 +1100,7 @@ int iwl_mvm_roc_add_cmd(struct iwl_mvm *mvm,
|
|||
{
|
||||
int res;
|
||||
u32 duration_tu, delay;
|
||||
struct iwl_roc_req roc_req = {
|
||||
struct iwl_roc_req_v5 roc_req = {
|
||||
.action = cpu_to_le32(FW_CTXT_ACTION_ADD),
|
||||
.activity = cpu_to_le32(activity),
|
||||
.sta_id = cpu_to_le32(mvm->aux_sta.sta_id),
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ static bool iwl_mvm_temp_notif_wait(struct iwl_notif_wait_data *notif_wait,
|
|||
void iwl_mvm_temp_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
|
||||
{
|
||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||
struct iwl_dts_measurement_notif_v2 *notif_v2;
|
||||
struct iwl_dts_measurement_notif *notif_v2;
|
||||
int len = iwl_rx_packet_payload_len(pkt);
|
||||
int temp;
|
||||
u32 ths_crossed;
|
||||
|
|
@ -506,7 +506,7 @@ static const u32 iwl_mvm_cdev_budgets[] = {
|
|||
|
||||
int iwl_mvm_ctdp_command(struct iwl_mvm *mvm, u32 op, u32 state)
|
||||
{
|
||||
struct iwl_mvm_ctdp_cmd cmd = {
|
||||
struct iwl_ctdp_cmd cmd = {
|
||||
.operation = cpu_to_le32(op),
|
||||
.budget = cpu_to_le32(iwl_mvm_cdev_budgets[state]),
|
||||
.window_size = 0,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#include <linux/dmi.h>
|
||||
#include "iwl-trans.h"
|
||||
|
|
@ -137,6 +137,9 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
|
|||
if (trans->dsbr_urm_permanent)
|
||||
control_flags_ext |= IWL_PRPH_SCRATCH_EXT_URM_PERM;
|
||||
|
||||
if (trans->ext_32khz_clock_valid)
|
||||
control_flags_ext |= IWL_PRPH_SCRATCH_EXT_32KHZ_CLK_VALID;
|
||||
|
||||
/* Allocate prph scratch */
|
||||
prph_scratch = dma_alloc_coherent(trans->dev, sizeof(*prph_scratch),
|
||||
&trans_pcie->prph_scratch_dma_addr,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -551,16 +551,17 @@ MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids);
|
|||
EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_hw_card_ids);
|
||||
|
||||
#define _IWL_DEV_INFO(_device, _subdevice, _mac_type, _mac_step, _rf_type, \
|
||||
_rf_id, _rf_step, _no_160, _cores, _cdb, _cfg, _name) \
|
||||
_rf_id, _rf_step, _bw_limit, _cores, _cdb, _cfg, _name) \
|
||||
{ .device = (_device), .subdevice = (_subdevice), .cfg = &(_cfg), \
|
||||
.name = _name, .mac_type = _mac_type, .rf_type = _rf_type, .rf_step = _rf_step, \
|
||||
.no_160 = _no_160, .cores = _cores, .rf_id = _rf_id, \
|
||||
.bw_limit = _bw_limit, .cores = _cores, .rf_id = _rf_id, \
|
||||
.mac_step = _mac_step, .cdb = _cdb, .jacket = IWL_CFG_ANY }
|
||||
|
||||
#define IWL_DEV_INFO(_device, _subdevice, _cfg, _name) \
|
||||
_IWL_DEV_INFO(_device, _subdevice, IWL_CFG_ANY, IWL_CFG_ANY, \
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, \
|
||||
IWL_CFG_ANY, _cfg, _name)
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, \
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_ANY, \
|
||||
_cfg, _name)
|
||||
|
||||
VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
|
||||
#if IS_ENABLED(CONFIG_IWLMVM)
|
||||
|
|
@ -723,66 +724,66 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_2ac_cfg_soc, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_2ac_cfg_soc, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_2ac_cfg_soc, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_2ac_cfg_soc, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_2ac_cfg_soc, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_2ac_cfg_soc, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB,
|
||||
iwl9260_2ac_cfg, iwl9270_160_name),
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB,
|
||||
iwl9260_2ac_cfg, iwl9270_name),
|
||||
|
||||
_IWL_DEV_INFO(0x271B, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9260_2ac_cfg, iwl9162_160_name),
|
||||
_IWL_DEV_INFO(0x271B, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9260_2ac_cfg, iwl9162_name),
|
||||
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9260_2ac_cfg, iwl9260_160_name),
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9260_2ac_cfg, iwl9260_name),
|
||||
|
||||
/* Qu with Jf */
|
||||
|
|
@ -790,132 +791,132 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1551,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9560_killer_1550s_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1552,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9560_killer_1550i_name),
|
||||
|
||||
/* Qu C step */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1551,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9560_killer_1550s_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1552,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9560_killer_1550i_name),
|
||||
|
||||
/* QuZ */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1551,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9560_killer_1550s_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1552,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9560_killer_1550i_name),
|
||||
|
||||
/* Qu with Hr */
|
||||
|
|
@ -923,202 +924,202 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_qu_b0_hr1_b0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_qu_b0_hr_b0, iwl_ax203_name),
|
||||
|
||||
/* Qu C step */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_qu_c0_hr1_b0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_qu_c0_hr_b0, iwl_ax203_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_qu_c0_hr_b0, iwl_ax201_name),
|
||||
|
||||
/* QuZ */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_quz_a0_hr1_b0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_quz_a0_hr_b0, iwl_ax203_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_quz_a0_hr_b0, iwl_ax201_name),
|
||||
|
||||
/* Ma */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_ma, iwl_ax201_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_ma, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_ma, iwl_ax231_name),
|
||||
|
||||
/* So with Hr */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax203_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax201_name),
|
||||
|
||||
/* So-F with Hr */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax203_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax201_name),
|
||||
|
||||
/* So-F with Gf */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_CDB,
|
||||
iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name),
|
||||
|
||||
/* SoF with JF2 */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_name),
|
||||
|
||||
/* SoF with JF */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_name),
|
||||
|
||||
/* So with GF */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_CDB,
|
||||
iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name),
|
||||
|
||||
/* So with JF2 */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_name),
|
||||
|
||||
/* So with JF */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_name),
|
||||
|
||||
/* Bz */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_bz, iwl_ax201_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_bz, iwl_ax211_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
|
|
@ -1130,73 +1131,104 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_bz, iwl_wh_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_bz, iwl_ax201_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_bz, iwl_ax211_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_bz, iwl_fm_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_bz, iwl_wh_name),
|
||||
|
||||
/* Ga (Gl) */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_320, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_gl, iwl_gl_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_320, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
iwl_cfg_gl, iwl_mtp_name),
|
||||
|
||||
/* Sc */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc, iwl_sc_name),
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc, iwl_fm_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc, iwl_wh_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC2, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2, iwl_sc2_name),
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC2, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2, iwl_fm_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC2, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2, iwl_wh_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC2F, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2f, iwl_sc2f_name),
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2f, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC2F, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2f, iwl_fm_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC2F, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2f, iwl_wh_name),
|
||||
|
||||
/* Dr */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_DR, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_dr, iwl_dr_name),
|
||||
|
||||
/* Br */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BR, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_br, iwl_br_name),
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
};
|
||||
|
|
@ -1348,7 +1380,7 @@ static int map_crf_id(struct iwl_trans *iwl_trans)
|
|||
VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info *
|
||||
iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
|
||||
u16 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
|
||||
u8 jacket, u8 rf_id, u8 no_160, u8 cores, u8 rf_step)
|
||||
u8 jacket, u8 rf_id, u8 bw_limit, u8 cores, u8 rf_step)
|
||||
{
|
||||
int num_devices = ARRAY_SIZE(iwl_dev_info_table);
|
||||
int i;
|
||||
|
|
@ -1391,8 +1423,15 @@ iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
|
|||
dev_info->rf_id != rf_id)
|
||||
continue;
|
||||
|
||||
if (dev_info->no_160 != (u8)IWL_CFG_ANY &&
|
||||
dev_info->no_160 != no_160)
|
||||
/*
|
||||
* Check that bw_limit have the same "boolean" value since
|
||||
* IWL_SUBDEVICE_BW_LIM can only return a boolean value and
|
||||
* dev_info->bw_limit encodes a non-boolean value.
|
||||
* dev_info->bw_limit == IWL_CFG_BW_NO_LIM must be equal to
|
||||
* !bw_limit to have a match.
|
||||
*/
|
||||
if (dev_info->bw_limit != IWL_CFG_BW_ANY &&
|
||||
(dev_info->bw_limit == IWL_CFG_BW_NO_LIM) == !!bw_limit)
|
||||
continue;
|
||||
|
||||
if (dev_info->cores != (u8)IWL_CFG_ANY &&
|
||||
|
|
@ -1530,13 +1569,13 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
CSR_HW_RFID_IS_CDB(iwl_trans->hw_rf_id),
|
||||
CSR_HW_RFID_IS_JACKET(iwl_trans->hw_rf_id),
|
||||
IWL_SUBDEVICE_RF_ID(pdev->subsystem_device),
|
||||
IWL_SUBDEVICE_NO_160(pdev->subsystem_device),
|
||||
IWL_SUBDEVICE_BW_LIM(pdev->subsystem_device),
|
||||
IWL_SUBDEVICE_CORES(pdev->subsystem_device),
|
||||
CSR_HW_RFID_STEP(iwl_trans->hw_rf_id));
|
||||
if (dev_info) {
|
||||
iwl_trans->cfg = dev_info->cfg;
|
||||
iwl_trans->name = dev_info->name;
|
||||
iwl_trans->no_160 = dev_info->no_160 == IWL_CFG_NO_160;
|
||||
iwl_trans->bw_limit = dev_info->bw_limit;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IWLMVM)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#include "iwl-trans.h"
|
||||
#include "iwl-prph.h"
|
||||
|
|
@ -95,7 +95,7 @@ static void iwl_pcie_gen2_apm_stop(struct iwl_trans *trans, bool op_mode_leave)
|
|||
CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
|
||||
}
|
||||
|
||||
static void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans)
|
||||
void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* KUnit tests for the iwlwifi device info table
|
||||
*
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*/
|
||||
#include <kunit/test.h>
|
||||
#include <linux/pci.h>
|
||||
|
|
@ -13,9 +13,9 @@ MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
|
|||
|
||||
static void iwl_pci_print_dev_info(const char *pfx, const struct iwl_dev_info *di)
|
||||
{
|
||||
printk(KERN_DEBUG "%sdev=%.4x,subdev=%.4x,mac_type=%.4x,mac_step=%.4x,rf_type=%.4x,cdb=%d,jacket=%d,rf_id=%.2x,no_160=%d,cores=%.2x\n",
|
||||
printk(KERN_DEBUG "%sdev=%.4x,subdev=%.4x,mac_type=%.4x,mac_step=%.4x,rf_type=%.4x,cdb=%d,jacket=%d,rf_id=%.2x,bw_limit=%d,cores=%.2x\n",
|
||||
pfx, di->device, di->subdevice, di->mac_type, di->mac_step,
|
||||
di->rf_type, di->cdb, di->jacket, di->rf_id, di->no_160,
|
||||
di->rf_type, di->cdb, di->jacket, di->rf_id, di->bw_limit,
|
||||
di->cores);
|
||||
}
|
||||
|
||||
|
|
@ -31,8 +31,13 @@ static void devinfo_table_order(struct kunit *test)
|
|||
di->mac_type, di->mac_step,
|
||||
di->rf_type, di->cdb,
|
||||
di->jacket, di->rf_id,
|
||||
di->no_160, di->cores, di->rf_step);
|
||||
if (ret != di) {
|
||||
di->bw_limit != IWL_CFG_BW_NO_LIM,
|
||||
di->cores, di->rf_step);
|
||||
if (!ret) {
|
||||
iwl_pci_print_dev_info("No entry found for: ", di);
|
||||
KUNIT_FAIL(test,
|
||||
"No entry found for entry at index %d\n", idx);
|
||||
} else if (ret != di) {
|
||||
iwl_pci_print_dev_info("searched: ", di);
|
||||
iwl_pci_print_dev_info("found: ", ret);
|
||||
KUNIT_FAIL(test,
|
||||
|
|
|
|||
|
|
@ -452,46 +452,6 @@ int lbs_set_snmp_mib(struct lbs_private *priv, u32 oid, u16 val)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* lbs_get_snmp_mib - Get an SNMP MIB value
|
||||
*
|
||||
* @priv: A pointer to &struct lbs_private structure
|
||||
* @oid: The OID to retrieve from the firmware
|
||||
* @out_val: Location for the returned value
|
||||
*
|
||||
* returns: 0 on success, error on failure
|
||||
*/
|
||||
int lbs_get_snmp_mib(struct lbs_private *priv, u32 oid, u16 *out_val)
|
||||
{
|
||||
struct cmd_ds_802_11_snmp_mib cmd;
|
||||
int ret;
|
||||
|
||||
memset(&cmd, 0, sizeof (cmd));
|
||||
cmd.hdr.size = cpu_to_le16(sizeof(cmd));
|
||||
cmd.action = cpu_to_le16(CMD_ACT_GET);
|
||||
cmd.oid = cpu_to_le16(oid);
|
||||
|
||||
ret = lbs_cmd_with_response(priv, CMD_802_11_SNMP_MIB, &cmd);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
switch (le16_to_cpu(cmd.bufsize)) {
|
||||
case sizeof(u8):
|
||||
*out_val = cmd.value[0];
|
||||
break;
|
||||
case sizeof(u16):
|
||||
*out_val = le16_to_cpu(*((__le16 *)(&cmd.value)));
|
||||
break;
|
||||
default:
|
||||
lbs_deb_cmd("SNMP_CMD: (get) unhandled OID 0x%x size %d\n",
|
||||
oid, le16_to_cpu(cmd.bufsize));
|
||||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* lbs_get_tx_power - Get the min, max, and current TX power
|
||||
*
|
||||
|
|
@ -524,31 +484,6 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* lbs_set_tx_power - Set the TX power
|
||||
*
|
||||
* @priv: A pointer to &struct lbs_private structure
|
||||
* @dbm: The desired power level in dBm
|
||||
*
|
||||
* returns: 0 on success, error on failure
|
||||
*/
|
||||
int lbs_set_tx_power(struct lbs_private *priv, s16 dbm)
|
||||
{
|
||||
struct cmd_ds_802_11_rf_tx_power cmd;
|
||||
int ret;
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.hdr.size = cpu_to_le16(sizeof(cmd));
|
||||
cmd.action = cpu_to_le16(CMD_ACT_SET);
|
||||
cmd.curlevel = cpu_to_le16(dbm);
|
||||
|
||||
lbs_deb_cmd("SET_RF_TX_POWER: %d dBm\n", dbm);
|
||||
|
||||
ret = lbs_cmd_with_response(priv, CMD_802_11_RF_TX_POWER, &cmd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* lbs_set_monitor_mode - Enable or disable monitor mode
|
||||
* (only implemented on OLPC usb8388 FW)
|
||||
|
|
@ -968,10 +903,6 @@ static void lbs_submit_command(struct lbs_private *priv,
|
|||
}
|
||||
|
||||
if (command == CMD_802_11_DEEP_SLEEP) {
|
||||
if (priv->is_auto_deep_sleep_enabled) {
|
||||
priv->wakeup_dev_required = 1;
|
||||
priv->dnld_sent = 0;
|
||||
}
|
||||
priv->is_deep_sleep = 1;
|
||||
lbs_complete_command(priv, cmdnode, 0);
|
||||
} else {
|
||||
|
|
@ -1440,70 +1371,6 @@ void lbs_ps_confirm_sleep(struct lbs_private *priv)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* lbs_set_tpc_cfg - Configures the transmission power control functionality
|
||||
*
|
||||
* @priv: A pointer to &struct lbs_private structure
|
||||
* @enable: Transmission power control enable
|
||||
* @p0: Power level when link quality is good (dBm).
|
||||
* @p1: Power level when link quality is fair (dBm).
|
||||
* @p2: Power level when link quality is poor (dBm).
|
||||
* @usesnr: Use Signal to Noise Ratio in TPC
|
||||
*
|
||||
* returns: 0 on success
|
||||
*/
|
||||
int lbs_set_tpc_cfg(struct lbs_private *priv, int enable, int8_t p0, int8_t p1,
|
||||
int8_t p2, int usesnr)
|
||||
{
|
||||
struct cmd_ds_802_11_tpc_cfg cmd;
|
||||
int ret;
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.hdr.size = cpu_to_le16(sizeof(cmd));
|
||||
cmd.action = cpu_to_le16(CMD_ACT_SET);
|
||||
cmd.enable = !!enable;
|
||||
cmd.usesnr = !!usesnr;
|
||||
cmd.P0 = p0;
|
||||
cmd.P1 = p1;
|
||||
cmd.P2 = p2;
|
||||
|
||||
ret = lbs_cmd_with_response(priv, CMD_802_11_TPC_CFG, &cmd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* lbs_set_power_adapt_cfg - Configures the power adaptation settings
|
||||
*
|
||||
* @priv: A pointer to &struct lbs_private structure
|
||||
* @enable: Power adaptation enable
|
||||
* @p0: Power level for 1, 2, 5.5 and 11 Mbps (dBm).
|
||||
* @p1: Power level for 6, 9, 12, 18, 22, 24 and 36 Mbps (dBm).
|
||||
* @p2: Power level for 48 and 54 Mbps (dBm).
|
||||
*
|
||||
* returns: 0 on Success
|
||||
*/
|
||||
|
||||
int lbs_set_power_adapt_cfg(struct lbs_private *priv, int enable, int8_t p0,
|
||||
int8_t p1, int8_t p2)
|
||||
{
|
||||
struct cmd_ds_802_11_pa_cfg cmd;
|
||||
int ret;
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.hdr.size = cpu_to_le16(sizeof(cmd));
|
||||
cmd.action = cpu_to_le16(CMD_ACT_SET);
|
||||
cmd.enable = !!enable;
|
||||
cmd.P0 = p0;
|
||||
cmd.P1 = p1;
|
||||
cmd.P2 = p2;
|
||||
|
||||
ret = lbs_cmd_with_response(priv, CMD_802_11_PA_CFG , &cmd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
struct cmd_ctrl_node *__lbs_cmd_async(struct lbs_private *priv,
|
||||
uint16_t command, struct cmd_header *in_cmd, int in_cmd_size,
|
||||
int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *),
|
||||
|
|
@ -1520,12 +1387,10 @@ struct cmd_ctrl_node *__lbs_cmd_async(struct lbs_private *priv,
|
|||
/* No commands are allowed in Deep Sleep until we toggle the GPIO
|
||||
* to wake up the card and it has signaled that it's ready.
|
||||
*/
|
||||
if (!priv->is_auto_deep_sleep_enabled) {
|
||||
if (priv->is_deep_sleep) {
|
||||
lbs_deb_cmd("command not allowed in deep sleep\n");
|
||||
cmdnode = ERR_PTR(-EBUSY);
|
||||
goto done;
|
||||
}
|
||||
if (priv->is_deep_sleep) {
|
||||
lbs_deb_cmd("command not allowed in deep sleep\n");
|
||||
cmdnode = ERR_PTR(-EBUSY);
|
||||
goto done;
|
||||
}
|
||||
|
||||
cmdnode = lbs_get_free_cmd_node(priv);
|
||||
|
|
|
|||
|
|
@ -105,19 +105,9 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel,
|
|||
|
||||
int lbs_set_snmp_mib(struct lbs_private *priv, u32 oid, u16 val);
|
||||
|
||||
int lbs_get_snmp_mib(struct lbs_private *priv, u32 oid, u16 *out_val);
|
||||
|
||||
|
||||
/* Commands only used in wext.c, assoc. and scan.c */
|
||||
|
||||
int lbs_set_power_adapt_cfg(struct lbs_private *priv, int enable, int8_t p0,
|
||||
int8_t p1, int8_t p2);
|
||||
|
||||
int lbs_set_tpc_cfg(struct lbs_private *priv, int enable, int8_t p0, int8_t p1,
|
||||
int8_t p2, int usesnr);
|
||||
|
||||
int lbs_set_tx_power(struct lbs_private *priv, s16 dbm);
|
||||
|
||||
int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep);
|
||||
|
||||
int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep);
|
||||
|
|
|
|||
|
|
@ -279,7 +279,6 @@ void lbs_process_event(struct lbs_private *priv, u32 event)
|
|||
priv->reset_deep_sleep_wakeup(priv);
|
||||
lbs_deb_cmd("EVENT: ds awake\n");
|
||||
priv->is_deep_sleep = 0;
|
||||
priv->wakeup_dev_required = 0;
|
||||
wake_up_interruptible(&priv->ds_awake_q);
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,11 +64,7 @@ int lbs_resume(struct lbs_private *priv);
|
|||
void lbs_queue_event(struct lbs_private *priv, u32 event);
|
||||
void lbs_notify_command_response(struct lbs_private *priv, u8 resp_idx);
|
||||
|
||||
int lbs_enter_auto_deep_sleep(struct lbs_private *priv);
|
||||
int lbs_exit_auto_deep_sleep(struct lbs_private *priv);
|
||||
|
||||
u32 lbs_fw_index_to_data_rate(u8 index);
|
||||
u8 lbs_data_rate_to_fw_index(u32 rate);
|
||||
|
||||
int lbs_get_firmware(struct device *dev, u32 card_model,
|
||||
const struct lbs_fw_table *fw_table,
|
||||
|
|
|
|||
|
|
@ -83,12 +83,8 @@ struct lbs_private {
|
|||
/* Deep sleep */
|
||||
int is_deep_sleep;
|
||||
int deep_sleep_required;
|
||||
int is_auto_deep_sleep_enabled;
|
||||
int wakeup_dev_required;
|
||||
int is_activity_detected;
|
||||
int auto_deep_sleep_timeout; /* in ms */
|
||||
wait_queue_head_t ds_awake_q;
|
||||
struct timer_list auto_deepsleep_timer;
|
||||
|
||||
/* Host sleep*/
|
||||
int is_host_sleep_configured;
|
||||
|
|
|
|||
|
|
@ -79,26 +79,6 @@ u32 lbs_fw_index_to_data_rate(u8 idx)
|
|||
return fw_data_rates[idx];
|
||||
}
|
||||
|
||||
/**
|
||||
* lbs_data_rate_to_fw_index - use rate to get the index
|
||||
*
|
||||
* @rate: data rate
|
||||
* returns: index or 0
|
||||
*/
|
||||
u8 lbs_data_rate_to_fw_index(u32 rate)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
if (!rate)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < sizeof(fw_data_rates); i++) {
|
||||
if (rate == fw_data_rates[i])
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lbs_set_iface_type(struct lbs_private *priv, enum nl80211_iftype type)
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
@ -276,8 +256,7 @@ void lbs_host_to_card_done(struct lbs_private *priv)
|
|||
|
||||
/* Wake main thread if commands are pending */
|
||||
if (!priv->cur_cmd || priv->tx_pending_len > 0) {
|
||||
if (!priv->wakeup_dev_required)
|
||||
wake_up(&priv->waitq);
|
||||
wake_up(&priv->waitq);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&priv->driver_lock, flags);
|
||||
|
|
@ -468,8 +447,7 @@ static int lbs_thread(void *data)
|
|||
shouldsleep = 0; /* We have a command response */
|
||||
else if (priv->cur_cmd)
|
||||
shouldsleep = 1; /* Can't send a command; one already running */
|
||||
else if (!list_empty(&priv->cmdpendingq) &&
|
||||
!(priv->wakeup_dev_required))
|
||||
else if (!list_empty(&priv->cmdpendingq))
|
||||
shouldsleep = 0; /* We have a command to send */
|
||||
else if (kfifo_len(&priv->event_fifo))
|
||||
shouldsleep = 0; /* We have an event to process */
|
||||
|
|
@ -536,14 +514,6 @@ static int lbs_thread(void *data)
|
|||
}
|
||||
spin_unlock_irq(&priv->driver_lock);
|
||||
|
||||
if (priv->wakeup_dev_required) {
|
||||
lbs_deb_thread("Waking up device...\n");
|
||||
/* Wake up device */
|
||||
if (priv->exit_deep_sleep(priv))
|
||||
lbs_deb_thread("Wakeup device failed\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
/* command timeout stuff */
|
||||
if (priv->cmd_timed_out && priv->cur_cmd) {
|
||||
struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
|
||||
|
|
@ -626,7 +596,6 @@ static int lbs_thread(void *data)
|
|||
|
||||
del_timer(&priv->command_timer);
|
||||
del_timer(&priv->tx_lockup_timer);
|
||||
del_timer(&priv->auto_deepsleep_timer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -773,55 +742,6 @@ static void lbs_tx_lockup_handler(struct timer_list *t)
|
|||
spin_unlock_irqrestore(&priv->driver_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* auto_deepsleep_timer_fn - put the device back to deep sleep mode when
|
||||
* timer expires and no activity (command, event, data etc.) is detected.
|
||||
* @t: Context from which to retrieve a &struct lbs_private pointer
|
||||
* returns: N/A
|
||||
*/
|
||||
static void auto_deepsleep_timer_fn(struct timer_list *t)
|
||||
{
|
||||
struct lbs_private *priv = from_timer(priv, t, auto_deepsleep_timer);
|
||||
|
||||
if (priv->is_activity_detected) {
|
||||
priv->is_activity_detected = 0;
|
||||
} else {
|
||||
if (priv->is_auto_deep_sleep_enabled &&
|
||||
(!priv->wakeup_dev_required) &&
|
||||
(priv->connect_status != LBS_CONNECTED)) {
|
||||
struct cmd_header cmd;
|
||||
|
||||
lbs_deb_main("Entering auto deep sleep mode...\n");
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.size = cpu_to_le16(sizeof(cmd));
|
||||
lbs_cmd_async(priv, CMD_802_11_DEEP_SLEEP, &cmd,
|
||||
sizeof(cmd));
|
||||
}
|
||||
}
|
||||
mod_timer(&priv->auto_deepsleep_timer , jiffies +
|
||||
(priv->auto_deep_sleep_timeout * HZ)/1000);
|
||||
}
|
||||
|
||||
int lbs_enter_auto_deep_sleep(struct lbs_private *priv)
|
||||
{
|
||||
priv->is_auto_deep_sleep_enabled = 1;
|
||||
if (priv->is_deep_sleep)
|
||||
priv->wakeup_dev_required = 1;
|
||||
mod_timer(&priv->auto_deepsleep_timer ,
|
||||
jiffies + (priv->auto_deep_sleep_timeout * HZ)/1000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lbs_exit_auto_deep_sleep(struct lbs_private *priv)
|
||||
{
|
||||
priv->is_auto_deep_sleep_enabled = 0;
|
||||
priv->auto_deep_sleep_timeout = 0;
|
||||
del_timer(&priv->auto_deepsleep_timer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lbs_init_adapter(struct lbs_private *priv)
|
||||
{
|
||||
int ret;
|
||||
|
|
@ -835,9 +755,7 @@ static int lbs_init_adapter(struct lbs_private *priv)
|
|||
priv->psmode = LBS802_11POWERMODECAM;
|
||||
priv->psstate = PS_STATE_FULL_POWER;
|
||||
priv->is_deep_sleep = 0;
|
||||
priv->is_auto_deep_sleep_enabled = 0;
|
||||
priv->deep_sleep_required = 0;
|
||||
priv->wakeup_dev_required = 0;
|
||||
init_waitqueue_head(&priv->ds_awake_q);
|
||||
init_waitqueue_head(&priv->scan_q);
|
||||
priv->authtype_auto = 1;
|
||||
|
|
@ -849,7 +767,6 @@ static int lbs_init_adapter(struct lbs_private *priv)
|
|||
|
||||
timer_setup(&priv->command_timer, lbs_cmd_timeout_handler, 0);
|
||||
timer_setup(&priv->tx_lockup_timer, lbs_tx_lockup_handler, 0);
|
||||
timer_setup(&priv->auto_deepsleep_timer, auto_deepsleep_timer_fn, 0);
|
||||
|
||||
INIT_LIST_HEAD(&priv->cmdfreeq);
|
||||
INIT_LIST_HEAD(&priv->cmdpendingq);
|
||||
|
|
@ -883,7 +800,6 @@ static void lbs_free_adapter(struct lbs_private *priv)
|
|||
kfifo_free(&priv->event_fifo);
|
||||
del_timer(&priv->command_timer);
|
||||
del_timer(&priv->tx_lockup_timer);
|
||||
del_timer(&priv->auto_deepsleep_timer);
|
||||
}
|
||||
|
||||
static const struct net_device_ops lbs_netdev_ops = {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const u16 mwifiex_1d_to_wmm_queue[8] = { 1, 0, 0, 1, 2, 2, 3, 3 };
|
|||
* proper cleanup before exiting.
|
||||
*/
|
||||
static int mwifiex_register(void *card, struct device *dev,
|
||||
struct mwifiex_if_ops *if_ops, void **padapter)
|
||||
const struct mwifiex_if_ops *if_ops, void **padapter)
|
||||
{
|
||||
struct mwifiex_adapter *adapter;
|
||||
int i;
|
||||
|
|
@ -1713,7 +1713,7 @@ static void mwifiex_probe_of(struct mwifiex_adapter *adapter)
|
|||
*/
|
||||
int
|
||||
mwifiex_add_card(void *card, struct completion *fw_done,
|
||||
struct mwifiex_if_ops *if_ops, u8 iface_type,
|
||||
const struct mwifiex_if_ops *if_ops, u8 iface_type,
|
||||
struct device *dev)
|
||||
{
|
||||
struct mwifiex_adapter *adapter;
|
||||
|
|
|
|||
|
|
@ -1470,7 +1470,7 @@ int mwifiex_init_shutdown_fw(struct mwifiex_private *priv,
|
|||
u32 func_init_shutdown);
|
||||
|
||||
int mwifiex_add_card(void *card, struct completion *fw_done,
|
||||
struct mwifiex_if_ops *if_ops, u8 iface_type,
|
||||
const struct mwifiex_if_ops *if_ops, u8 iface_type,
|
||||
struct device *dev);
|
||||
int mwifiex_remove_card(struct mwifiex_adapter *adapter);
|
||||
|
||||
|
|
@ -1571,8 +1571,6 @@ void mwifiex_uap_set_channel(struct mwifiex_private *priv,
|
|||
struct cfg80211_chan_def chandef);
|
||||
int mwifiex_config_start_uap(struct mwifiex_private *priv,
|
||||
struct mwifiex_uap_bss_param *bss_cfg);
|
||||
void mwifiex_uap_del_sta_data(struct mwifiex_private *priv,
|
||||
struct mwifiex_sta_node *node);
|
||||
|
||||
void mwifiex_config_uap_11d(struct mwifiex_private *priv,
|
||||
struct cfg80211_beacon_data *beacon_data);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#define PCIE_VERSION "1.0"
|
||||
#define DRV_NAME "Marvell mwifiex PCIe"
|
||||
|
||||
static struct mwifiex_if_ops pcie_ops;
|
||||
static const struct mwifiex_if_ops pcie_ops;
|
||||
|
||||
static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = {
|
||||
.cmd_addr_lo = PCIE_SCRATCH_0_REG,
|
||||
|
|
@ -3240,7 +3240,7 @@ static void mwifiex_pcie_down_dev(struct mwifiex_adapter *adapter)
|
|||
mwifiex_pcie_free_buffers(adapter);
|
||||
}
|
||||
|
||||
static struct mwifiex_if_ops pcie_ops = {
|
||||
static const struct mwifiex_if_ops pcie_ops = {
|
||||
.init_if = mwifiex_init_pcie,
|
||||
.cleanup_if = mwifiex_cleanup_pcie,
|
||||
.check_fw_status = mwifiex_check_fw_status,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
static void mwifiex_sdio_work(struct work_struct *work);
|
||||
|
||||
static struct mwifiex_if_ops sdio_ops;
|
||||
static const struct mwifiex_if_ops sdio_ops;
|
||||
|
||||
static const struct mwifiex_sdio_card_reg mwifiex_reg_sd87xx = {
|
||||
.start_rd_port = 1,
|
||||
|
|
@ -3167,7 +3167,7 @@ static void mwifiex_sdio_up_dev(struct mwifiex_adapter *adapter)
|
|||
dev_err(&card->func->dev, "error enabling SDIO port\n");
|
||||
}
|
||||
|
||||
static struct mwifiex_if_ops sdio_ops = {
|
||||
static const struct mwifiex_if_ops sdio_ops = {
|
||||
.init_if = mwifiex_init_sdio,
|
||||
.cleanup_if = mwifiex_cleanup_sdio,
|
||||
.check_fw_status = mwifiex_check_fw_status,
|
||||
|
|
|
|||
|
|
@ -325,19 +325,3 @@ int mwifiex_process_uap_event(struct mwifiex_private *priv)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This function deletes station entry from associated station list.
|
||||
* Also if both AP and STA are 11n enabled, RxReorder tables and TxBA stream
|
||||
* tables created for this station are deleted.
|
||||
*/
|
||||
void mwifiex_uap_del_sta_data(struct mwifiex_private *priv,
|
||||
struct mwifiex_sta_node *node)
|
||||
{
|
||||
if (priv->ap_11n_enabled && node->is_11n_enabled) {
|
||||
mwifiex_11n_del_rx_reorder_tbl_by_ta(priv, node->mac_addr);
|
||||
mwifiex_del_tx_ba_stream_tbl_by_ra(priv, node->mac_addr);
|
||||
}
|
||||
mwifiex_del_sta_entry(priv, node->mac_addr);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#define USB_VERSION "1.0"
|
||||
|
||||
static struct mwifiex_if_ops usb_ops;
|
||||
static const struct mwifiex_if_ops usb_ops;
|
||||
|
||||
static const struct usb_device_id mwifiex_usb_table[] = {
|
||||
/* 8766 */
|
||||
|
|
@ -1585,7 +1585,7 @@ mwifiex_pm_wakeup_card_complete(struct mwifiex_adapter *adapter)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct mwifiex_if_ops usb_ops = {
|
||||
static const struct mwifiex_if_ops usb_ops = {
|
||||
.register_dev = mwifiex_register_dev,
|
||||
.unregister_dev = mwifiex_unregister_dev,
|
||||
.wakeup = mwifiex_pm_wakeup_card,
|
||||
|
|
|
|||
|
|
@ -1510,10 +1510,15 @@ enum qlink_tlv_id {
|
|||
};
|
||||
|
||||
struct qlink_tlv_hdr {
|
||||
__le16 type;
|
||||
__le16 len;
|
||||
/* New members MUST be added within the struct_group() macro below. */
|
||||
__struct_group(qlink_tlv_hdr_fixed, __hdr, __packed,
|
||||
__le16 type;
|
||||
__le16 len;
|
||||
);
|
||||
u8 val[];
|
||||
} __packed;
|
||||
static_assert(offsetof(struct qlink_tlv_hdr, val) == sizeof(struct qlink_tlv_hdr_fixed),
|
||||
"struct member likely outside of __struct_group()");
|
||||
|
||||
struct qlink_iface_limit {
|
||||
__le16 max_num;
|
||||
|
|
@ -1567,7 +1572,7 @@ enum qlink_reg_rule_flags {
|
|||
* @dfs_cac_ms: DFS CAC period.
|
||||
*/
|
||||
struct qlink_tlv_reg_rule {
|
||||
struct qlink_tlv_hdr hdr;
|
||||
struct qlink_tlv_hdr_fixed hdr;
|
||||
__le32 start_freq_khz;
|
||||
__le32 end_freq_khz;
|
||||
__le32 max_bandwidth_khz;
|
||||
|
|
@ -1606,7 +1611,7 @@ enum qlink_dfs_state {
|
|||
* @channel: ieee80211 channel settings.
|
||||
*/
|
||||
struct qlink_tlv_channel {
|
||||
struct qlink_tlv_hdr hdr;
|
||||
struct qlink_tlv_hdr_fixed hdr;
|
||||
struct qlink_channel chan;
|
||||
} __packed;
|
||||
|
||||
|
|
@ -1618,7 +1623,7 @@ struct qlink_tlv_channel {
|
|||
* @chan: channel definition data.
|
||||
*/
|
||||
struct qlink_tlv_chandef {
|
||||
struct qlink_tlv_hdr hdr;
|
||||
struct qlink_tlv_hdr_fixed hdr;
|
||||
struct qlink_chandef chdef;
|
||||
} __packed;
|
||||
|
||||
|
|
@ -1643,7 +1648,7 @@ enum qlink_ie_set_type {
|
|||
* @ie_data: IEs data.
|
||||
*/
|
||||
struct qlink_tlv_ie_set {
|
||||
struct qlink_tlv_hdr hdr;
|
||||
struct qlink_tlv_hdr_fixed hdr;
|
||||
u8 type;
|
||||
u8 flags;
|
||||
u8 rsvd[2];
|
||||
|
|
@ -1657,7 +1662,7 @@ struct qlink_tlv_ie_set {
|
|||
* @ie_data: IEs data.
|
||||
*/
|
||||
struct qlink_tlv_ext_ie {
|
||||
struct qlink_tlv_hdr hdr;
|
||||
struct qlink_tlv_hdr_fixed hdr;
|
||||
u8 eid_ext;
|
||||
u8 rsvd[3];
|
||||
u8 ie_data[];
|
||||
|
|
@ -1678,7 +1683,7 @@ struct qlink_sband_iftype_data {
|
|||
* @iftype_data: interface type data entries.
|
||||
*/
|
||||
struct qlink_tlv_iftype_data {
|
||||
struct qlink_tlv_hdr hdr;
|
||||
struct qlink_tlv_hdr_fixed hdr;
|
||||
u8 n_iftype_data;
|
||||
u8 rsvd[3];
|
||||
struct qlink_sband_iftype_data iftype_data[];
|
||||
|
|
|
|||
|
|
@ -644,6 +644,8 @@ struct rtl8xxxu_fileops rtl8192cu_fops = {
|
|||
.rx_agg_buf_size = 16000,
|
||||
.tx_desc_size = sizeof(struct rtl8xxxu_txdesc32),
|
||||
.rx_desc_size = sizeof(struct rtl8xxxu_rxdesc16),
|
||||
.supports_ap = 1,
|
||||
.max_macid_num = 32,
|
||||
.max_sec_cam_num = 32,
|
||||
.adda_1t_init = 0x0b1b25a0,
|
||||
.adda_1t_path_on = 0x0bdb25a0,
|
||||
|
|
|
|||
|
|
@ -860,9 +860,10 @@ rtl8xxxu_writeN(struct rtl8xxxu_priv *priv, u16 addr, u8 *buf, u16 len)
|
|||
return len;
|
||||
|
||||
write_error:
|
||||
dev_info(&udev->dev,
|
||||
"%s: Failed to write block at addr: %04x size: %04x\n",
|
||||
__func__, addr, blocksize);
|
||||
if (rtl8xxxu_debug & RTL8XXXU_DEBUG_REG_WRITE)
|
||||
dev_info(&udev->dev,
|
||||
"%s: Failed to write block at addr: %04x size: %04x\n",
|
||||
__func__, addr, blocksize);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
|
|
@ -4064,8 +4065,14 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
|
|||
*/
|
||||
rtl8xxxu_write16(priv, REG_TRXFF_BNDY + 2, fops->trxff_boundary);
|
||||
|
||||
ret = rtl8xxxu_download_firmware(priv);
|
||||
dev_dbg(dev, "%s: download_firmware %i\n", __func__, ret);
|
||||
for (int retry = 5; retry >= 0 ; retry--) {
|
||||
ret = rtl8xxxu_download_firmware(priv);
|
||||
dev_dbg(dev, "%s: download_firmware %i\n", __func__, ret);
|
||||
if (ret != -EAGAIN)
|
||||
break;
|
||||
if (retry)
|
||||
dev_dbg(dev, "%s: retry firmware download\n", __func__);
|
||||
}
|
||||
if (ret)
|
||||
goto exit;
|
||||
ret = rtl8xxxu_start_firmware(priv);
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
|
|||
* pathA or mac1 has to set phy0&phy1 pathA */
|
||||
if ((content == radiob_txt) && (rfpath == RF90_PATH_A)) {
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
" ===> althougth Path A, we load radiob.txt\n");
|
||||
" ===> although Path A, we load radiob.txt\n");
|
||||
radioa_arraylen = radiob_arraylen;
|
||||
radioa_array_table = radiob_array_table;
|
||||
}
|
||||
|
|
@ -750,7 +750,7 @@ static void _rtl92d_phy_switch_rf_setting(struct ieee80211_hw *hw, u8 channel)
|
|||
&& rtlhal->interfaceindex == 1) {
|
||||
need_pwr_down = rtl92d_phy_enable_anotherphy(hw, false);
|
||||
rtlhal->during_mac1init_radioa = true;
|
||||
/* asume no this case */
|
||||
/* assume no this case */
|
||||
if (need_pwr_down)
|
||||
rtl92d_phy_enable_rf_env(hw, path,
|
||||
&u4regvalue);
|
||||
|
|
@ -1885,7 +1885,7 @@ static void _rtl92d_phy_reload_lck_setting(struct ieee80211_hw *hw,
|
|||
bneed_powerdown_radio =
|
||||
rtl92d_phy_enable_anotherphy(hw, false);
|
||||
rtlpriv->rtlhal.during_mac1init_radioa = true;
|
||||
/* asume no this case */
|
||||
/* assume no this case */
|
||||
if (bneed_powerdown_radio)
|
||||
rtl92d_phy_enable_rf_env(hw, erfpath,
|
||||
&u4regvalue);
|
||||
|
|
|
|||
|
|
@ -735,6 +735,7 @@ void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
|||
{
|
||||
u8 h2c_pkt[H2C_PKT_SIZE] = {0};
|
||||
bool disable_pt = true;
|
||||
u32 mask_hi;
|
||||
|
||||
SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RA_INFO);
|
||||
|
||||
|
|
@ -755,6 +756,20 @@ void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
|||
si->init_ra_lv = 0;
|
||||
|
||||
rtw_fw_send_h2c_command(rtwdev, h2c_pkt);
|
||||
|
||||
if (rtwdev->chip->id != RTW_CHIP_TYPE_8814A)
|
||||
return;
|
||||
|
||||
SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RA_INFO_HI);
|
||||
|
||||
mask_hi = si->ra_mask >> 32;
|
||||
|
||||
SET_RA_INFO_RA_MASK0(h2c_pkt, (mask_hi & 0xff));
|
||||
SET_RA_INFO_RA_MASK1(h2c_pkt, (mask_hi & 0xff00) >> 8);
|
||||
SET_RA_INFO_RA_MASK2(h2c_pkt, (mask_hi & 0xff0000) >> 16);
|
||||
SET_RA_INFO_RA_MASK3(h2c_pkt, (mask_hi & 0xff000000) >> 24);
|
||||
|
||||
rtw_fw_send_h2c_command(rtwdev, h2c_pkt);
|
||||
}
|
||||
|
||||
void rtw_fw_media_status_report(struct rtw_dev *rtwdev, u8 mac_id, bool connect)
|
||||
|
|
|
|||
|
|
@ -557,6 +557,7 @@ static inline void rtw_h2c_pkt_set_header(u8 *h2c_pkt, u8 sub_id)
|
|||
#define H2C_CMD_DEFAULT_PORT 0x2c
|
||||
#define H2C_CMD_RA_INFO 0x40
|
||||
#define H2C_CMD_RSSI_MONITOR 0x42
|
||||
#define H2C_CMD_RA_INFO_HI 0x46
|
||||
#define H2C_CMD_BCN_FILTER_OFFLOAD_P0 0x56
|
||||
#define H2C_CMD_BCN_FILTER_OFFLOAD_P1 0x57
|
||||
#define H2C_CMD_WL_PHY_INFO 0x58
|
||||
|
|
|
|||
|
|
@ -784,7 +784,8 @@ static int __rtw_download_firmware(struct rtw_dev *rtwdev,
|
|||
if (!check_firmware_size(data, size))
|
||||
return -EINVAL;
|
||||
|
||||
if (!ltecoex_read_reg(rtwdev, 0x38, <ecoex_bckp))
|
||||
if (rtwdev->chip->ltecoex_addr &&
|
||||
!ltecoex_read_reg(rtwdev, 0x38, <ecoex_bckp))
|
||||
return -EBUSY;
|
||||
|
||||
wlan_cpu_enable(rtwdev, false);
|
||||
|
|
@ -802,7 +803,8 @@ static int __rtw_download_firmware(struct rtw_dev *rtwdev,
|
|||
|
||||
wlan_cpu_enable(rtwdev, true);
|
||||
|
||||
if (!ltecoex_reg_write(rtwdev, 0x38, ltecoex_bckp)) {
|
||||
if (rtwdev->chip->ltecoex_addr &&
|
||||
!ltecoex_reg_write(rtwdev, 0x38, ltecoex_bckp)) {
|
||||
ret = -EBUSY;
|
||||
goto dlfw_fail;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ u16 rtw_desc_to_bitrate(u8 desc_rate)
|
|||
return rate.bitrate;
|
||||
}
|
||||
|
||||
static struct ieee80211_supported_band rtw_band_2ghz = {
|
||||
static const struct ieee80211_supported_band rtw_band_2ghz = {
|
||||
.band = NL80211_BAND_2GHZ,
|
||||
|
||||
.channels = rtw_channeltable_2g,
|
||||
|
|
@ -149,7 +149,7 @@ static struct ieee80211_supported_band rtw_band_2ghz = {
|
|||
.vht_cap = {0},
|
||||
};
|
||||
|
||||
static struct ieee80211_supported_band rtw_band_5ghz = {
|
||||
static const struct ieee80211_supported_band rtw_band_5ghz = {
|
||||
.band = NL80211_BAND_5GHZ,
|
||||
|
||||
.channels = rtw_channeltable_5g,
|
||||
|
|
@ -1234,7 +1234,9 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
|||
if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC)
|
||||
ldpc_en = VHT_LDPC_EN;
|
||||
} else if (sta->deflink.ht_cap.ht_supported) {
|
||||
ra_mask |= (sta->deflink.ht_cap.mcs.rx_mask[1] << 20) |
|
||||
ra_mask |= ((u64)sta->deflink.ht_cap.mcs.rx_mask[3] << 36) |
|
||||
((u64)sta->deflink.ht_cap.mcs.rx_mask[2] << 28) |
|
||||
(sta->deflink.ht_cap.mcs.rx_mask[1] << 20) |
|
||||
(sta->deflink.ht_cap.mcs.rx_mask[0] << 12);
|
||||
if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_RX_STBC)
|
||||
stbc_en = HT_STBC_EN;
|
||||
|
|
@ -1244,6 +1246,9 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
|||
|
||||
if (efuse->hw_cap.nss == 1 || rtwdev->hal.txrx_1ss)
|
||||
ra_mask &= RA_MASK_VHT_RATES_1SS | RA_MASK_HT_RATES_1SS;
|
||||
else if (efuse->hw_cap.nss == 2)
|
||||
ra_mask &= RA_MASK_VHT_RATES_2SS | RA_MASK_HT_RATES_2SS |
|
||||
RA_MASK_VHT_RATES_1SS | RA_MASK_HT_RATES_1SS;
|
||||
|
||||
if (hal->current_band_type == RTW_BAND_5G) {
|
||||
ra_mask |= (u64)sta->deflink.supp_rates[NL80211_BAND_5GHZ] << 4;
|
||||
|
|
@ -1302,10 +1307,9 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
|||
break;
|
||||
}
|
||||
|
||||
if (sta->deflink.vht_cap.vht_supported && ra_mask & 0xffc00000)
|
||||
tx_num = 2;
|
||||
else if (sta->deflink.ht_cap.ht_supported && ra_mask & 0xfff00000)
|
||||
tx_num = 2;
|
||||
if (sta->deflink.vht_cap.vht_supported ||
|
||||
sta->deflink.ht_cap.ht_supported)
|
||||
tx_num = efuse->hw_cap.nss;
|
||||
|
||||
rate_id = get_rate_id(wireless_set, bw_mode, tx_num);
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ enum rtw_hci_type {
|
|||
};
|
||||
|
||||
struct rtw_hci {
|
||||
struct rtw_hci_ops *ops;
|
||||
const struct rtw_hci_ops *ops;
|
||||
enum rtw_hci_type type;
|
||||
|
||||
u32 rpwm_addr;
|
||||
|
|
@ -166,9 +166,14 @@ enum rtw_rate_section {
|
|||
RTW_RATE_SECTION_HT_2S,
|
||||
RTW_RATE_SECTION_VHT_1S,
|
||||
RTW_RATE_SECTION_VHT_2S,
|
||||
__RTW_RATE_SECTION_2SS_MAX = RTW_RATE_SECTION_VHT_2S,
|
||||
RTW_RATE_SECTION_HT_3S,
|
||||
RTW_RATE_SECTION_HT_4S,
|
||||
RTW_RATE_SECTION_VHT_3S,
|
||||
RTW_RATE_SECTION_VHT_4S,
|
||||
|
||||
/* keep last */
|
||||
RTW_RATE_SECTION_MAX,
|
||||
RTW_RATE_SECTION_NUM,
|
||||
};
|
||||
|
||||
enum rtw_wireless_set {
|
||||
|
|
@ -191,6 +196,7 @@ enum rtw_chip_type {
|
|||
RTW_CHIP_TYPE_8703B,
|
||||
RTW_CHIP_TYPE_8821A,
|
||||
RTW_CHIP_TYPE_8812A,
|
||||
RTW_CHIP_TYPE_8814A,
|
||||
};
|
||||
|
||||
enum rtw_tx_queue_type {
|
||||
|
|
@ -1130,14 +1136,26 @@ struct rtw_rfe_def {
|
|||
* For 2G there are cck rate and ofdm rate with different settings.
|
||||
*/
|
||||
struct rtw_pwr_track_tbl {
|
||||
const u8 *pwrtrk_5gd_n[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5gd_p[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5gc_n[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5gc_p[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5gb_n[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5gb_p[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5ga_n[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5ga_p[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_2gd_n;
|
||||
const u8 *pwrtrk_2gd_p;
|
||||
const u8 *pwrtrk_2gc_n;
|
||||
const u8 *pwrtrk_2gc_p;
|
||||
const u8 *pwrtrk_2gb_n;
|
||||
const u8 *pwrtrk_2gb_p;
|
||||
const u8 *pwrtrk_2ga_n;
|
||||
const u8 *pwrtrk_2ga_p;
|
||||
const u8 *pwrtrk_2g_cckd_n;
|
||||
const u8 *pwrtrk_2g_cckd_p;
|
||||
const u8 *pwrtrk_2g_cckc_n;
|
||||
const u8 *pwrtrk_2g_cckc_p;
|
||||
const u8 *pwrtrk_2g_cckb_n;
|
||||
const u8 *pwrtrk_2g_cckb_p;
|
||||
const u8 *pwrtrk_2g_ccka_n;
|
||||
|
|
@ -1227,8 +1245,8 @@ struct rtw_chip_info {
|
|||
|
||||
const struct rtw_hw_reg *dig;
|
||||
const struct rtw_hw_reg *dig_cck;
|
||||
u32 rf_base_addr[2];
|
||||
u32 rf_sipi_addr[2];
|
||||
u32 rf_base_addr[RTW_RF_PATH_MAX];
|
||||
u32 rf_sipi_addr[RTW_RF_PATH_MAX];
|
||||
const struct rtw_rf_sipi_addr *rf_sipi_read_addr;
|
||||
u8 fix_rf_phy_num;
|
||||
const struct rtw_ltecoex_addr *ltecoex_addr;
|
||||
|
|
@ -1924,7 +1942,7 @@ union rtw_sar_cfg {
|
|||
|
||||
struct rtw_sar {
|
||||
enum rtw_sar_sources src;
|
||||
union rtw_sar_cfg cfg[RTW_RF_PATH_MAX][RTW_RATE_SECTION_MAX];
|
||||
union rtw_sar_cfg cfg[RTW_RF_PATH_MAX][RTW_RATE_SECTION_NUM];
|
||||
};
|
||||
|
||||
struct rtw_hal {
|
||||
|
|
@ -1968,16 +1986,16 @@ struct rtw_hal {
|
|||
s8 tx_pwr_by_rate_offset_5g[RTW_RF_PATH_MAX]
|
||||
[DESC_RATE_MAX];
|
||||
s8 tx_pwr_by_rate_base_2g[RTW_RF_PATH_MAX]
|
||||
[RTW_RATE_SECTION_MAX];
|
||||
[RTW_RATE_SECTION_NUM];
|
||||
s8 tx_pwr_by_rate_base_5g[RTW_RF_PATH_MAX]
|
||||
[RTW_RATE_SECTION_MAX];
|
||||
[RTW_RATE_SECTION_NUM];
|
||||
s8 tx_pwr_limit_2g[RTW_REGD_MAX]
|
||||
[RTW_CHANNEL_WIDTH_MAX]
|
||||
[RTW_RATE_SECTION_MAX]
|
||||
[RTW_RATE_SECTION_NUM]
|
||||
[RTW_MAX_CHANNEL_NUM_2G];
|
||||
s8 tx_pwr_limit_5g[RTW_REGD_MAX]
|
||||
[RTW_CHANNEL_WIDTH_MAX]
|
||||
[RTW_RATE_SECTION_MAX]
|
||||
[RTW_RATE_SECTION_NUM]
|
||||
[RTW_MAX_CHANNEL_NUM_5G];
|
||||
s8 tx_pwr_tbl[RTW_RF_PATH_MAX]
|
||||
[DESC_RATE_MAX];
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ module_param_named(disable_aspm, rtw_pci_disable_aspm, bool, 0644);
|
|||
MODULE_PARM_DESC(disable_msi, "Set Y to disable MSI interrupt support");
|
||||
MODULE_PARM_DESC(disable_aspm, "Set Y to disable PCI ASPM support");
|
||||
|
||||
static u32 rtw_pci_tx_queue_idx_addr[] = {
|
||||
static const u32 rtw_pci_tx_queue_idx_addr[] = {
|
||||
[RTW_TX_QUEUE_BK] = RTK_PCI_TXBD_IDX_BKQ,
|
||||
[RTW_TX_QUEUE_BE] = RTK_PCI_TXBD_IDX_BEQ,
|
||||
[RTW_TX_QUEUE_VI] = RTK_PCI_TXBD_IDX_VIQ,
|
||||
|
|
@ -1591,7 +1591,7 @@ static void rtw_pci_destroy(struct rtw_dev *rtwdev, struct pci_dev *pdev)
|
|||
rtw_pci_io_unmapping(rtwdev, pdev);
|
||||
}
|
||||
|
||||
static struct rtw_hci_ops rtw_pci_ops = {
|
||||
static const struct rtw_hci_ops rtw_pci_ops = {
|
||||
.tx_write = rtw_pci_tx_write,
|
||||
.tx_kick_off = rtw_pci_tx_kick_off,
|
||||
.flush_queues = rtw_pci_flush_queues,
|
||||
|
|
|
|||
|
|
@ -52,60 +52,93 @@ static const u32 db_invert_table[12][8] = {
|
|||
1995262315, 2511886432U, 3162277660U, 3981071706U}
|
||||
};
|
||||
|
||||
u8 rtw_cck_rates[] = { DESC_RATE1M, DESC_RATE2M, DESC_RATE5_5M, DESC_RATE11M };
|
||||
u8 rtw_ofdm_rates[] = {
|
||||
const u8 rtw_cck_rates[] = { DESC_RATE1M, DESC_RATE2M, DESC_RATE5_5M, DESC_RATE11M };
|
||||
|
||||
const u8 rtw_ofdm_rates[] = {
|
||||
DESC_RATE6M, DESC_RATE9M, DESC_RATE12M,
|
||||
DESC_RATE18M, DESC_RATE24M, DESC_RATE36M,
|
||||
DESC_RATE48M, DESC_RATE54M
|
||||
};
|
||||
u8 rtw_ht_1s_rates[] = {
|
||||
|
||||
const u8 rtw_ht_1s_rates[] = {
|
||||
DESC_RATEMCS0, DESC_RATEMCS1, DESC_RATEMCS2,
|
||||
DESC_RATEMCS3, DESC_RATEMCS4, DESC_RATEMCS5,
|
||||
DESC_RATEMCS6, DESC_RATEMCS7
|
||||
};
|
||||
u8 rtw_ht_2s_rates[] = {
|
||||
|
||||
const u8 rtw_ht_2s_rates[] = {
|
||||
DESC_RATEMCS8, DESC_RATEMCS9, DESC_RATEMCS10,
|
||||
DESC_RATEMCS11, DESC_RATEMCS12, DESC_RATEMCS13,
|
||||
DESC_RATEMCS14, DESC_RATEMCS15
|
||||
};
|
||||
u8 rtw_vht_1s_rates[] = {
|
||||
|
||||
const u8 rtw_vht_1s_rates[] = {
|
||||
DESC_RATEVHT1SS_MCS0, DESC_RATEVHT1SS_MCS1,
|
||||
DESC_RATEVHT1SS_MCS2, DESC_RATEVHT1SS_MCS3,
|
||||
DESC_RATEVHT1SS_MCS4, DESC_RATEVHT1SS_MCS5,
|
||||
DESC_RATEVHT1SS_MCS6, DESC_RATEVHT1SS_MCS7,
|
||||
DESC_RATEVHT1SS_MCS8, DESC_RATEVHT1SS_MCS9
|
||||
};
|
||||
u8 rtw_vht_2s_rates[] = {
|
||||
|
||||
const u8 rtw_vht_2s_rates[] = {
|
||||
DESC_RATEVHT2SS_MCS0, DESC_RATEVHT2SS_MCS1,
|
||||
DESC_RATEVHT2SS_MCS2, DESC_RATEVHT2SS_MCS3,
|
||||
DESC_RATEVHT2SS_MCS4, DESC_RATEVHT2SS_MCS5,
|
||||
DESC_RATEVHT2SS_MCS6, DESC_RATEVHT2SS_MCS7,
|
||||
DESC_RATEVHT2SS_MCS8, DESC_RATEVHT2SS_MCS9
|
||||
};
|
||||
u8 *rtw_rate_section[RTW_RATE_SECTION_MAX] = {
|
||||
|
||||
const u8 rtw_ht_3s_rates[] = {
|
||||
DESC_RATEMCS16, DESC_RATEMCS17, DESC_RATEMCS18,
|
||||
DESC_RATEMCS19, DESC_RATEMCS20, DESC_RATEMCS21,
|
||||
DESC_RATEMCS22, DESC_RATEMCS23
|
||||
};
|
||||
|
||||
const u8 rtw_ht_4s_rates[] = {
|
||||
DESC_RATEMCS24, DESC_RATEMCS25, DESC_RATEMCS26,
|
||||
DESC_RATEMCS27, DESC_RATEMCS28, DESC_RATEMCS29,
|
||||
DESC_RATEMCS30, DESC_RATEMCS31
|
||||
};
|
||||
|
||||
const u8 rtw_vht_3s_rates[] = {
|
||||
DESC_RATEVHT3SS_MCS0, DESC_RATEVHT3SS_MCS1,
|
||||
DESC_RATEVHT3SS_MCS2, DESC_RATEVHT3SS_MCS3,
|
||||
DESC_RATEVHT3SS_MCS4, DESC_RATEVHT3SS_MCS5,
|
||||
DESC_RATEVHT3SS_MCS6, DESC_RATEVHT3SS_MCS7,
|
||||
DESC_RATEVHT3SS_MCS8, DESC_RATEVHT3SS_MCS9
|
||||
};
|
||||
|
||||
const u8 rtw_vht_4s_rates[] = {
|
||||
DESC_RATEVHT4SS_MCS0, DESC_RATEVHT4SS_MCS1,
|
||||
DESC_RATEVHT4SS_MCS2, DESC_RATEVHT4SS_MCS3,
|
||||
DESC_RATEVHT4SS_MCS4, DESC_RATEVHT4SS_MCS5,
|
||||
DESC_RATEVHT4SS_MCS6, DESC_RATEVHT4SS_MCS7,
|
||||
DESC_RATEVHT4SS_MCS8, DESC_RATEVHT4SS_MCS9
|
||||
};
|
||||
|
||||
const u8 * const rtw_rate_section[RTW_RATE_SECTION_NUM] = {
|
||||
rtw_cck_rates, rtw_ofdm_rates,
|
||||
rtw_ht_1s_rates, rtw_ht_2s_rates,
|
||||
rtw_vht_1s_rates, rtw_vht_2s_rates
|
||||
rtw_vht_1s_rates, rtw_vht_2s_rates,
|
||||
rtw_ht_3s_rates, rtw_ht_4s_rates,
|
||||
rtw_vht_3s_rates, rtw_vht_4s_rates
|
||||
};
|
||||
EXPORT_SYMBOL(rtw_rate_section);
|
||||
|
||||
u8 rtw_rate_size[RTW_RATE_SECTION_MAX] = {
|
||||
const u8 rtw_rate_size[RTW_RATE_SECTION_NUM] = {
|
||||
ARRAY_SIZE(rtw_cck_rates),
|
||||
ARRAY_SIZE(rtw_ofdm_rates),
|
||||
ARRAY_SIZE(rtw_ht_1s_rates),
|
||||
ARRAY_SIZE(rtw_ht_2s_rates),
|
||||
ARRAY_SIZE(rtw_vht_1s_rates),
|
||||
ARRAY_SIZE(rtw_vht_2s_rates)
|
||||
ARRAY_SIZE(rtw_vht_2s_rates),
|
||||
ARRAY_SIZE(rtw_ht_3s_rates),
|
||||
ARRAY_SIZE(rtw_ht_4s_rates),
|
||||
ARRAY_SIZE(rtw_vht_3s_rates),
|
||||
ARRAY_SIZE(rtw_vht_4s_rates)
|
||||
};
|
||||
EXPORT_SYMBOL(rtw_rate_size);
|
||||
|
||||
static const u8 rtw_cck_size = ARRAY_SIZE(rtw_cck_rates);
|
||||
static const u8 rtw_ofdm_size = ARRAY_SIZE(rtw_ofdm_rates);
|
||||
static const u8 rtw_ht_1s_size = ARRAY_SIZE(rtw_ht_1s_rates);
|
||||
static const u8 rtw_ht_2s_size = ARRAY_SIZE(rtw_ht_2s_rates);
|
||||
static const u8 rtw_vht_1s_size = ARRAY_SIZE(rtw_vht_1s_rates);
|
||||
static const u8 rtw_vht_2s_size = ARRAY_SIZE(rtw_vht_2s_rates);
|
||||
|
||||
enum rtw_phy_band_type {
|
||||
PHY_BAND_2G = 0,
|
||||
PHY_BAND_5G = 1,
|
||||
|
|
@ -1590,7 +1623,7 @@ static void rtw_phy_set_tx_power_limit(struct rtw_dev *rtwdev, u8 regd, u8 band,
|
|||
ch_idx = rtw_channel_to_idx(band, ch);
|
||||
|
||||
if (regd >= RTW_REGD_MAX || bw >= RTW_CHANNEL_WIDTH_MAX ||
|
||||
rs >= RTW_RATE_SECTION_MAX || ch_idx < 0) {
|
||||
rs >= RTW_RATE_SECTION_NUM || ch_idx < 0) {
|
||||
WARN(1,
|
||||
"wrong txpwr_lmt regd=%u, band=%u bw=%u, rs=%u, ch_idx=%u, pwr_limit=%d\n",
|
||||
regd, band, bw, rs, ch_idx, pwr_limit);
|
||||
|
|
@ -1634,11 +1667,15 @@ rtw_xref_5g_txpwr_lmt(struct rtw_dev *rtwdev, u8 regd,
|
|||
static void
|
||||
rtw_xref_txpwr_lmt_by_rs(struct rtw_dev *rtwdev, u8 regd, u8 bw, u8 ch_idx)
|
||||
{
|
||||
static const u8 rs_cmp[4][2] = {
|
||||
{RTW_RATE_SECTION_HT_1S, RTW_RATE_SECTION_VHT_1S},
|
||||
{RTW_RATE_SECTION_HT_2S, RTW_RATE_SECTION_VHT_2S},
|
||||
{RTW_RATE_SECTION_HT_3S, RTW_RATE_SECTION_VHT_3S},
|
||||
{RTW_RATE_SECTION_HT_4S, RTW_RATE_SECTION_VHT_4S}
|
||||
};
|
||||
u8 rs_idx, rs_ht, rs_vht;
|
||||
u8 rs_cmp[2][2] = {{RTW_RATE_SECTION_HT_1S, RTW_RATE_SECTION_VHT_1S},
|
||||
{RTW_RATE_SECTION_HT_2S, RTW_RATE_SECTION_VHT_2S} };
|
||||
|
||||
for (rs_idx = 0; rs_idx < 2; rs_idx++) {
|
||||
for (rs_idx = 0; rs_idx < 4; rs_idx++) {
|
||||
rs_ht = rs_cmp[rs_idx][0];
|
||||
rs_vht = rs_cmp[rs_idx][1];
|
||||
|
||||
|
|
@ -1695,7 +1732,7 @@ rtw_cfg_txpwr_lmt_by_alt(struct rtw_dev *rtwdev, u8 regd, u8 regd_alt)
|
|||
u8 bw, rs;
|
||||
|
||||
for (bw = 0; bw < RTW_CHANNEL_WIDTH_MAX; bw++)
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
__cfg_txpwr_lmt_by_alt(&rtwdev->hal, regd, regd_alt,
|
||||
bw, rs);
|
||||
}
|
||||
|
|
@ -1959,10 +1996,10 @@ static u8 rtw_phy_get_2g_tx_power_index(struct rtw_dev *rtwdev,
|
|||
u8 rate, u8 group)
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
u8 tx_power;
|
||||
bool mcs_rate;
|
||||
bool above_2ss;
|
||||
bool above_2ss, above_3ss, above_4ss;
|
||||
u8 factor = chip->txgi_factor;
|
||||
bool mcs_rate;
|
||||
u8 tx_power;
|
||||
|
||||
if (rate <= DESC_RATE11M)
|
||||
tx_power = pwr_idx_2g->cck_base[group];
|
||||
|
|
@ -1972,11 +2009,15 @@ static u8 rtw_phy_get_2g_tx_power_index(struct rtw_dev *rtwdev,
|
|||
if (rate >= DESC_RATE6M && rate <= DESC_RATE54M)
|
||||
tx_power += pwr_idx_2g->ht_1s_diff.ofdm * factor;
|
||||
|
||||
mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS15) ||
|
||||
mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT1SS_MCS0 &&
|
||||
rate <= DESC_RATEVHT2SS_MCS9);
|
||||
above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15) ||
|
||||
rate <= DESC_RATEVHT4SS_MCS9);
|
||||
above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT2SS_MCS0);
|
||||
above_3ss = (rate >= DESC_RATEMCS16 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT3SS_MCS0);
|
||||
above_4ss = (rate >= DESC_RATEMCS24 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT4SS_MCS0);
|
||||
|
||||
if (!mcs_rate)
|
||||
return tx_power;
|
||||
|
|
@ -1989,11 +2030,19 @@ static u8 rtw_phy_get_2g_tx_power_index(struct rtw_dev *rtwdev,
|
|||
tx_power += pwr_idx_2g->ht_1s_diff.bw20 * factor;
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_2g->ht_2s_diff.bw20 * factor;
|
||||
if (above_3ss)
|
||||
tx_power += pwr_idx_2g->ht_3s_diff.bw20 * factor;
|
||||
if (above_4ss)
|
||||
tx_power += pwr_idx_2g->ht_4s_diff.bw20 * factor;
|
||||
break;
|
||||
case RTW_CHANNEL_WIDTH_40:
|
||||
/* bw40 is the base power */
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_2g->ht_2s_diff.bw40 * factor;
|
||||
if (above_3ss)
|
||||
tx_power += pwr_idx_2g->ht_3s_diff.bw40 * factor;
|
||||
if (above_4ss)
|
||||
tx_power += pwr_idx_2g->ht_4s_diff.bw40 * factor;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -2006,19 +2055,23 @@ static u8 rtw_phy_get_5g_tx_power_index(struct rtw_dev *rtwdev,
|
|||
u8 rate, u8 group)
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
u8 tx_power;
|
||||
bool above_2ss, above_3ss, above_4ss;
|
||||
u8 factor = chip->txgi_factor;
|
||||
u8 upper, lower;
|
||||
bool mcs_rate;
|
||||
bool above_2ss;
|
||||
u8 factor = chip->txgi_factor;
|
||||
u8 tx_power;
|
||||
|
||||
tx_power = pwr_idx_5g->bw40_base[group];
|
||||
|
||||
mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS15) ||
|
||||
mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT1SS_MCS0 &&
|
||||
rate <= DESC_RATEVHT2SS_MCS9);
|
||||
above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15) ||
|
||||
rate <= DESC_RATEVHT4SS_MCS9);
|
||||
above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT2SS_MCS0);
|
||||
above_3ss = (rate >= DESC_RATEMCS16 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT3SS_MCS0);
|
||||
above_4ss = (rate >= DESC_RATEMCS24 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT4SS_MCS0);
|
||||
|
||||
if (!mcs_rate) {
|
||||
tx_power += pwr_idx_5g->ht_1s_diff.ofdm * factor;
|
||||
|
|
@ -2033,11 +2086,19 @@ static u8 rtw_phy_get_5g_tx_power_index(struct rtw_dev *rtwdev,
|
|||
tx_power += pwr_idx_5g->ht_1s_diff.bw20 * factor;
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_5g->ht_2s_diff.bw20 * factor;
|
||||
if (above_3ss)
|
||||
tx_power += pwr_idx_5g->ht_3s_diff.bw20 * factor;
|
||||
if (above_4ss)
|
||||
tx_power += pwr_idx_5g->ht_4s_diff.bw20 * factor;
|
||||
break;
|
||||
case RTW_CHANNEL_WIDTH_40:
|
||||
/* bw40 is the base power */
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_5g->ht_2s_diff.bw40 * factor;
|
||||
if (above_3ss)
|
||||
tx_power += pwr_idx_5g->ht_3s_diff.bw40 * factor;
|
||||
if (above_4ss)
|
||||
tx_power += pwr_idx_5g->ht_4s_diff.bw40 * factor;
|
||||
break;
|
||||
case RTW_CHANNEL_WIDTH_80:
|
||||
/* the base idx of bw80 is the average of bw40+/bw40- */
|
||||
|
|
@ -2048,13 +2109,17 @@ static u8 rtw_phy_get_5g_tx_power_index(struct rtw_dev *rtwdev,
|
|||
tx_power += pwr_idx_5g->vht_1s_diff.bw80 * factor;
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_5g->vht_2s_diff.bw80 * factor;
|
||||
if (above_3ss)
|
||||
tx_power += pwr_idx_5g->vht_3s_diff.bw80 * factor;
|
||||
if (above_4ss)
|
||||
tx_power += pwr_idx_5g->vht_4s_diff.bw80 * factor;
|
||||
break;
|
||||
}
|
||||
|
||||
return tx_power;
|
||||
}
|
||||
|
||||
/* return RTW_RATE_SECTION_MAX to indicate rate is invalid */
|
||||
/* return RTW_RATE_SECTION_NUM to indicate rate is invalid */
|
||||
static u8 rtw_phy_rate_to_rate_section(u8 rate)
|
||||
{
|
||||
if (rate >= DESC_RATE1M && rate <= DESC_RATE11M)
|
||||
|
|
@ -2065,12 +2130,20 @@ static u8 rtw_phy_rate_to_rate_section(u8 rate)
|
|||
return RTW_RATE_SECTION_HT_1S;
|
||||
else if (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15)
|
||||
return RTW_RATE_SECTION_HT_2S;
|
||||
else if (rate >= DESC_RATEMCS16 && rate <= DESC_RATEMCS23)
|
||||
return RTW_RATE_SECTION_HT_3S;
|
||||
else if (rate >= DESC_RATEMCS24 && rate <= DESC_RATEMCS31)
|
||||
return RTW_RATE_SECTION_HT_4S;
|
||||
else if (rate >= DESC_RATEVHT1SS_MCS0 && rate <= DESC_RATEVHT1SS_MCS9)
|
||||
return RTW_RATE_SECTION_VHT_1S;
|
||||
else if (rate >= DESC_RATEVHT2SS_MCS0 && rate <= DESC_RATEVHT2SS_MCS9)
|
||||
return RTW_RATE_SECTION_VHT_2S;
|
||||
else if (rate >= DESC_RATEVHT3SS_MCS0 && rate <= DESC_RATEVHT3SS_MCS9)
|
||||
return RTW_RATE_SECTION_VHT_3S;
|
||||
else if (rate >= DESC_RATEVHT4SS_MCS0 && rate <= DESC_RATEVHT4SS_MCS9)
|
||||
return RTW_RATE_SECTION_VHT_4S;
|
||||
else
|
||||
return RTW_RATE_SECTION_MAX;
|
||||
return RTW_RATE_SECTION_NUM;
|
||||
}
|
||||
|
||||
static s8 rtw_phy_get_tx_power_limit(struct rtw_dev *rtwdev, u8 band,
|
||||
|
|
@ -2088,7 +2161,7 @@ static s8 rtw_phy_get_tx_power_limit(struct rtw_dev *rtwdev, u8 band,
|
|||
if (regd > RTW_REGD_WW)
|
||||
return power_limit;
|
||||
|
||||
if (rs == RTW_RATE_SECTION_MAX)
|
||||
if (rs == RTW_RATE_SECTION_NUM)
|
||||
goto err;
|
||||
|
||||
/* only 20M BW with cck and ofdm */
|
||||
|
|
@ -2096,7 +2169,7 @@ static s8 rtw_phy_get_tx_power_limit(struct rtw_dev *rtwdev, u8 band,
|
|||
bw = RTW_CHANNEL_WIDTH_20;
|
||||
|
||||
/* only 20/40M BW with ht */
|
||||
if (rs == RTW_RATE_SECTION_HT_1S || rs == RTW_RATE_SECTION_HT_2S)
|
||||
if (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS31)
|
||||
bw = min_t(u8, bw, RTW_CHANNEL_WIDTH_40);
|
||||
|
||||
/* select min power limit among [20M BW ~ current BW] */
|
||||
|
|
@ -2132,7 +2205,7 @@ static s8 rtw_phy_get_tx_power_sar(struct rtw_dev *rtwdev, u8 sar_band,
|
|||
.rs = rs,
|
||||
};
|
||||
|
||||
if (rs == RTW_RATE_SECTION_MAX)
|
||||
if (rs == RTW_RATE_SECTION_NUM)
|
||||
goto err;
|
||||
|
||||
return rtw_query_sar(rtwdev, &arg);
|
||||
|
|
@ -2214,14 +2287,14 @@ static void rtw_phy_set_tx_power_index_by_rs(struct rtw_dev *rtwdev,
|
|||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
u8 regd = rtw_regd_get(rtwdev);
|
||||
u8 *rates;
|
||||
const u8 *rates;
|
||||
u8 size;
|
||||
u8 rate;
|
||||
u8 pwr_idx;
|
||||
u8 bw;
|
||||
int i;
|
||||
|
||||
if (rs >= RTW_RATE_SECTION_MAX)
|
||||
if (rs >= RTW_RATE_SECTION_NUM)
|
||||
return;
|
||||
|
||||
rates = rtw_rate_section[rs];
|
||||
|
|
@ -2252,7 +2325,7 @@ static void rtw_phy_set_tx_power_level_by_path(struct rtw_dev *rtwdev,
|
|||
else
|
||||
rs = RTW_RATE_SECTION_OFDM;
|
||||
|
||||
for (; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
for (; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
rtw_phy_set_tx_power_index_by_rs(rtwdev, ch, path, rs);
|
||||
}
|
||||
|
||||
|
|
@ -2274,13 +2347,13 @@ EXPORT_SYMBOL(rtw_phy_set_tx_power_level);
|
|||
|
||||
static void
|
||||
rtw_phy_tx_power_by_rate_config_by_path(struct rtw_hal *hal, u8 path,
|
||||
u8 rs, u8 size, u8 *rates)
|
||||
u8 rs, u8 size, const u8 *rates)
|
||||
{
|
||||
u8 rate;
|
||||
u8 base_idx, rate_idx;
|
||||
s8 base_2g, base_5g;
|
||||
|
||||
if (rs >= RTW_RATE_SECTION_VHT_1S)
|
||||
if (size == 10) /* VHT rates */
|
||||
base_idx = rates[size - 3];
|
||||
else
|
||||
base_idx = rates[size - 1];
|
||||
|
|
@ -2297,28 +2370,12 @@ rtw_phy_tx_power_by_rate_config_by_path(struct rtw_hal *hal, u8 path,
|
|||
|
||||
void rtw_phy_tx_power_by_rate_config(struct rtw_hal *hal)
|
||||
{
|
||||
u8 path;
|
||||
u8 path, rs;
|
||||
|
||||
for (path = 0; path < RTW_RF_PATH_MAX; path++) {
|
||||
rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
RTW_RATE_SECTION_CCK,
|
||||
rtw_cck_size, rtw_cck_rates);
|
||||
rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
RTW_RATE_SECTION_OFDM,
|
||||
rtw_ofdm_size, rtw_ofdm_rates);
|
||||
rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
RTW_RATE_SECTION_HT_1S,
|
||||
rtw_ht_1s_size, rtw_ht_1s_rates);
|
||||
rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
RTW_RATE_SECTION_HT_2S,
|
||||
rtw_ht_2s_size, rtw_ht_2s_rates);
|
||||
rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
RTW_RATE_SECTION_VHT_1S,
|
||||
rtw_vht_1s_size, rtw_vht_1s_rates);
|
||||
rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
RTW_RATE_SECTION_VHT_2S,
|
||||
rtw_vht_2s_size, rtw_vht_2s_rates);
|
||||
}
|
||||
for (path = 0; path < RTW_RF_PATH_MAX; path++)
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
rtw_phy_tx_power_by_rate_config_by_path(hal, path, rs,
|
||||
rtw_rate_size[rs], rtw_rate_section[rs]);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -2347,7 +2404,7 @@ void rtw_phy_tx_power_limit_config(struct rtw_hal *hal)
|
|||
|
||||
for (regd = 0; regd < RTW_REGD_MAX; regd++)
|
||||
for (bw = 0; bw < RTW_CHANNEL_WIDTH_MAX; bw++)
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
__rtw_phy_tx_power_limit_config(hal, regd, bw, rs);
|
||||
}
|
||||
|
||||
|
|
@ -2383,7 +2440,7 @@ void rtw_phy_init_tx_power(struct rtw_dev *rtwdev)
|
|||
/* init tx power limit */
|
||||
for (regd = 0; regd < RTW_REGD_MAX; regd++)
|
||||
for (bw = 0; bw < RTW_CHANNEL_WIDTH_MAX; bw++)
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
rtw_phy_init_tx_power_limit(rtwdev, regd, bw,
|
||||
rs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,14 +7,18 @@
|
|||
|
||||
#include "debug.h"
|
||||
|
||||
extern u8 rtw_cck_rates[];
|
||||
extern u8 rtw_ofdm_rates[];
|
||||
extern u8 rtw_ht_1s_rates[];
|
||||
extern u8 rtw_ht_2s_rates[];
|
||||
extern u8 rtw_vht_1s_rates[];
|
||||
extern u8 rtw_vht_2s_rates[];
|
||||
extern u8 *rtw_rate_section[];
|
||||
extern u8 rtw_rate_size[];
|
||||
extern const u8 rtw_cck_rates[];
|
||||
extern const u8 rtw_ofdm_rates[];
|
||||
extern const u8 rtw_ht_1s_rates[];
|
||||
extern const u8 rtw_ht_2s_rates[];
|
||||
extern const u8 rtw_vht_1s_rates[];
|
||||
extern const u8 rtw_vht_2s_rates[];
|
||||
extern const u8 rtw_ht_3s_rates[];
|
||||
extern const u8 rtw_ht_4s_rates[];
|
||||
extern const u8 rtw_vht_3s_rates[];
|
||||
extern const u8 rtw_vht_4s_rates[];
|
||||
extern const u8 * const rtw_rate_section[];
|
||||
extern const u8 rtw_rate_size[];
|
||||
|
||||
void rtw_phy_init(struct rtw_dev *rtwdev);
|
||||
void rtw_phy_dynamic_mechanism(struct rtw_dev *rtwdev);
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@
|
|||
#define BIT_SHIFT_ROM_PGE 16
|
||||
#define BIT_FW_INIT_RDY BIT(15)
|
||||
#define BIT_FW_DW_RDY BIT(14)
|
||||
#define BIT_CPU_CLK_SEL (BIT(12) | BIT(13))
|
||||
#define BIT_RPWM_TOGGLE BIT(7)
|
||||
#define BIT_RAM_DL_SEL BIT(7) /* legacy only */
|
||||
#define BIT_DMEM_CHKSUM_OK BIT(6)
|
||||
|
|
@ -147,7 +148,7 @@
|
|||
BIT_CHECK_SUM_OK)
|
||||
#define FW_READY_LEGACY (BIT_MCUFWDL_RDY | BIT_FWDL_CHK_RPT | \
|
||||
BIT_WINTINI_RDY | BIT_RAM_DL_SEL)
|
||||
#define FW_READY_MASK 0xffff
|
||||
#define FW_READY_MASK (0xffff & ~BIT_CPU_CLK_SEL)
|
||||
|
||||
#define REG_MCU_TST_CFG 0x84
|
||||
#define VAL_FW_TRIGGER 0x1
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ static u8 rtw8723d_iqk_check_tx_failed(struct rtw_dev *rtwdev,
|
|||
rtw_read32(rtwdev, REG_IQK_RES_TX),
|
||||
rtw_read32(rtwdev, REG_IQK_RES_TY));
|
||||
rtw_dbg(rtwdev, RTW_DBG_RFK,
|
||||
"[IQK] 0xe90(before IQK)= 0x%x, 0xe98(afer IQK) = 0x%x\n",
|
||||
"[IQK] 0xe90(before IQK)= 0x%x, 0xe98(after IQK) = 0x%x\n",
|
||||
rtw_read32(rtwdev, 0xe90),
|
||||
rtw_read32(rtwdev, 0xe98));
|
||||
|
||||
|
|
@ -472,7 +472,7 @@ static u8 rtw8723d_iqk_check_rx_failed(struct rtw_dev *rtwdev,
|
|||
rtw_read32(rtwdev, REG_IQK_RES_RY));
|
||||
|
||||
rtw_dbg(rtwdev, RTW_DBG_RFK,
|
||||
"[IQK] 0xea0(before IQK)= 0x%x, 0xea8(afer IQK) = 0x%x\n",
|
||||
"[IQK] 0xea0(before IQK)= 0x%x, 0xea8(after IQK) = 0x%x\n",
|
||||
rtw_read32(rtwdev, 0xea0),
|
||||
rtw_read32(rtwdev, 0xea8));
|
||||
|
||||
|
|
|
|||
|
|
@ -680,11 +680,11 @@ static void query_phy_status(struct rtw_dev *rtwdev, u8 *phy_status,
|
|||
}
|
||||
|
||||
static void
|
||||
rtw8821c_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
||||
rtw8821c_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path,
|
||||
u8 rs, u32 *phy_pwr_idx)
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
static const u32 offset_txagc[2] = {0x1d00, 0x1d80};
|
||||
static u32 phy_pwr_idx;
|
||||
u8 rate, rate_idx, pwr_index, shift;
|
||||
int j;
|
||||
|
||||
|
|
@ -692,12 +692,12 @@ rtw8821c_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
|||
rate = rtw_rate_section[rs][j];
|
||||
pwr_index = hal->tx_pwr_tbl[path][rate];
|
||||
shift = rate & 0x3;
|
||||
phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
|
||||
*phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
|
||||
if (shift == 0x3 || rate == DESC_RATEVHT1SS_MCS9) {
|
||||
rate_idx = rate & 0xfc;
|
||||
rtw_write32(rtwdev, offset_txagc[path] + rate_idx,
|
||||
phy_pwr_idx);
|
||||
phy_pwr_idx = 0;
|
||||
*phy_pwr_idx);
|
||||
*phy_pwr_idx = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -705,14 +705,16 @@ rtw8821c_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
|||
static void rtw8821c_set_tx_power_index(struct rtw_dev *rtwdev)
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
u32 phy_pwr_idx = 0;
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++) {
|
||||
for (rs = 0; rs <= __RTW_RATE_SECTION_2SS_MAX; rs++) {
|
||||
if (rs == RTW_RATE_SECTION_HT_2S ||
|
||||
rs == RTW_RATE_SECTION_VHT_2S)
|
||||
continue;
|
||||
rtw8821c_set_tx_power_index_by_rate(rtwdev, path, rs);
|
||||
rtw8821c_set_tx_power_index_by_rate(rtwdev, path, rs,
|
||||
&phy_pwr_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -935,11 +935,11 @@ static void query_phy_status(struct rtw_dev *rtwdev, u8 *phy_status,
|
|||
}
|
||||
|
||||
static void
|
||||
rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
||||
rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path,
|
||||
u8 rs, u32 *phy_pwr_idx)
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
static const u32 offset_txagc[2] = {0x1d00, 0x1d80};
|
||||
static u32 phy_pwr_idx;
|
||||
u8 rate, rate_idx, pwr_index, shift;
|
||||
int j;
|
||||
|
||||
|
|
@ -947,12 +947,12 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
|||
rate = rtw_rate_section[rs][j];
|
||||
pwr_index = hal->tx_pwr_tbl[path][rate];
|
||||
shift = rate & 0x3;
|
||||
phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
|
||||
*phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
|
||||
if (shift == 0x3) {
|
||||
rate_idx = rate & 0xfc;
|
||||
rtw_write32(rtwdev, offset_txagc[path] + rate_idx,
|
||||
phy_pwr_idx);
|
||||
phy_pwr_idx = 0;
|
||||
*phy_pwr_idx);
|
||||
*phy_pwr_idx = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -960,11 +960,13 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
|||
static void rtw8822b_set_tx_power_index(struct rtw_dev *rtwdev)
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
u32 phy_pwr_idx = 0;
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs);
|
||||
for (rs = 0; rs <= __RTW_RATE_SECTION_2SS_MAX; rs++)
|
||||
rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs,
|
||||
&phy_pwr_idx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2746,7 +2746,7 @@ static void rtw8822c_set_tx_power_index(struct rtw_dev *rtwdev)
|
|||
s8 diff_idx[4];
|
||||
|
||||
rtw8822c_set_write_tx_power_ref(rtwdev, pwr_ref_cck, pwr_ref_ofdm);
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++) {
|
||||
for (rs = 0; rs <= __RTW_RATE_SECTION_2SS_MAX; rs++) {
|
||||
for (j = 0; j < rtw_rate_size[rs]; j++) {
|
||||
rate = rtw_rate_section[rs][j];
|
||||
pwr_a = hal->tx_pwr_tbl[RF_PATH_A][rate];
|
||||
|
|
|
|||
|
|
@ -1637,7 +1637,7 @@ void rtw88xxa_set_tx_power_index(struct rtw_dev *rtwdev)
|
|||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++) {
|
||||
for (rs = 0; rs <= __RTW_RATE_SECTION_2SS_MAX; rs++) {
|
||||
if (hal->rf_path_num == 1 &&
|
||||
(rs == RTW_RATE_SECTION_HT_2S ||
|
||||
rs == RTW_RATE_SECTION_VHT_2S))
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ int rtw_set_sar_specs(struct rtw_dev *rtwdev,
|
|||
power, BIT(RTW_COMMON_SAR_FCT));
|
||||
|
||||
for (j = 0; j < RTW_RF_PATH_MAX; j++) {
|
||||
for (k = 0; k < RTW_RATE_SECTION_MAX; k++) {
|
||||
for (k = 0; k < RTW_RATE_SECTION_NUM; k++) {
|
||||
arg = (struct rtw_sar_arg){
|
||||
.sar_band = idx,
|
||||
.path = j,
|
||||
|
|
|
|||
|
|
@ -1147,7 +1147,7 @@ static void rtw_sdio_declaim(struct rtw_dev *rtwdev,
|
|||
sdio_release_host(sdio_func);
|
||||
}
|
||||
|
||||
static struct rtw_hci_ops rtw_sdio_ops = {
|
||||
static const struct rtw_hci_ops rtw_sdio_ops = {
|
||||
.tx_write = rtw_sdio_tx_write,
|
||||
.tx_kick_off = rtw_sdio_tx_kick_off,
|
||||
.setup = rtw_sdio_setup,
|
||||
|
|
|
|||
|
|
@ -881,7 +881,7 @@ static void rtw_usb_dynamic_rx_agg(struct rtw_dev *rtwdev, bool enable)
|
|||
}
|
||||
}
|
||||
|
||||
static struct rtw_hci_ops rtw_usb_ops = {
|
||||
static const struct rtw_hci_ops rtw_usb_ops = {
|
||||
.tx_write = rtw_usb_tx_write,
|
||||
.tx_kick_off = rtw_usb_tx_kick_off,
|
||||
.setup = rtw_usb_setup,
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ config RTW89_DEBUGMSG
|
|||
|
||||
config RTW89_DEBUGFS
|
||||
bool "Realtek rtw89 debugfs support"
|
||||
depends on RTW89_CORE
|
||||
depends on RTW89_CORE && CFG80211_DEBUGFS
|
||||
select RTW89_DEBUG
|
||||
help
|
||||
Enable debugfs support
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ int rtw89_iterate_entity_chan(struct rtw89_dev *rtwdev,
|
|||
int ret;
|
||||
u8 idx;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
for_each_set_bit(idx, hal->entity_map, NUM_OF_RTW89_CHANCTX) {
|
||||
chan = rtw89_chan_get(rtwdev, idx);
|
||||
|
|
@ -310,7 +310,7 @@ const struct rtw89_chan *__rtw89_mgnt_chan_get(struct rtw89_dev *rtwdev,
|
|||
enum rtw89_entity_mode mode;
|
||||
u8 role_index;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
if (unlikely(link_index >= __RTW89_MLD_MAX_LINK_NUM)) {
|
||||
WARN(1, "link index %u is invalid (max link inst num: %d)\n",
|
||||
|
|
@ -366,7 +366,7 @@ static void rtw89_entity_recalc_mgnt_roles(struct rtw89_dev *rtwdev)
|
|||
u8 pos = 0;
|
||||
int i, j;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
for (i = 0; i < RTW89_MAX_INTERFACE_NUM; i++)
|
||||
mgnt->active_roles[i] = NULL;
|
||||
|
|
@ -427,7 +427,7 @@ enum rtw89_entity_mode rtw89_entity_recalc(struct rtw89_dev *rtwdev)
|
|||
struct rtw89_chan chan;
|
||||
u8 idx;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
bitmap_copy(recalc_map, hal->entity_map, NUM_OF_RTW89_CHANCTX);
|
||||
|
||||
|
|
@ -2390,7 +2390,7 @@ static void rtw89_mcc_update_limit(struct rtw89_dev *rtwdev)
|
|||
rtw89_iterate_mcc_roles(rtwdev, rtw89_mcc_upd_lmt_iterator, NULL);
|
||||
}
|
||||
|
||||
void rtw89_chanctx_work(struct work_struct *work)
|
||||
void rtw89_chanctx_work(struct wiphy *wiphy, struct wiphy_work *work)
|
||||
{
|
||||
struct rtw89_dev *rtwdev = container_of(work, struct rtw89_dev,
|
||||
chanctx_work.work);
|
||||
|
|
@ -2401,12 +2401,10 @@ void rtw89_chanctx_work(struct work_struct *work)
|
|||
int ret;
|
||||
int i;
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(wiphy);
|
||||
|
||||
if (hal->entity_pause) {
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
if (hal->entity_pause)
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_OF_RTW89_CHANCTX_CHANGES; i++) {
|
||||
if (test_and_clear_bit(i, hal->changes))
|
||||
|
|
@ -2445,8 +2443,6 @@ void rtw89_chanctx_work(struct work_struct *work)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
}
|
||||
|
||||
void rtw89_queue_chanctx_change(struct rtw89_dev *rtwdev,
|
||||
|
|
@ -2477,8 +2473,8 @@ void rtw89_queue_chanctx_change(struct rtw89_dev *rtwdev,
|
|||
rtw89_debug(rtwdev, RTW89_DBG_CHAN,
|
||||
"queue chanctx work for mode %d with delay %d us\n",
|
||||
mode, delay);
|
||||
ieee80211_queue_delayed_work(rtwdev->hw, &rtwdev->chanctx_work,
|
||||
usecs_to_jiffies(delay));
|
||||
wiphy_delayed_work_queue(rtwdev->hw->wiphy, &rtwdev->chanctx_work,
|
||||
usecs_to_jiffies(delay));
|
||||
}
|
||||
|
||||
void rtw89_queue_chanctx_work(struct rtw89_dev *rtwdev)
|
||||
|
|
@ -2491,7 +2487,7 @@ void rtw89_chanctx_track(struct rtw89_dev *rtwdev)
|
|||
struct rtw89_hal *hal = &rtwdev->hal;
|
||||
enum rtw89_entity_mode mode;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
if (hal->entity_pause)
|
||||
return;
|
||||
|
|
@ -2512,7 +2508,7 @@ void rtw89_chanctx_pause(struct rtw89_dev *rtwdev,
|
|||
struct rtw89_hal *hal = &rtwdev->hal;
|
||||
enum rtw89_entity_mode mode;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
if (hal->entity_pause)
|
||||
return;
|
||||
|
|
@ -2555,7 +2551,7 @@ void rtw89_chanctx_proceed(struct rtw89_dev *rtwdev,
|
|||
enum rtw89_entity_mode mode;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
if (unlikely(!hal->entity_pause)) {
|
||||
rtw89_chanctx_proceed_cb(rtwdev, cb_parm);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ void rtw89_config_roc_chandef(struct rtw89_dev *rtwdev,
|
|||
const struct cfg80211_chan_def *chandef);
|
||||
void rtw89_entity_init(struct rtw89_dev *rtwdev);
|
||||
enum rtw89_entity_mode rtw89_entity_recalc(struct rtw89_dev *rtwdev);
|
||||
void rtw89_chanctx_work(struct work_struct *work);
|
||||
void rtw89_chanctx_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_queue_chanctx_work(struct rtw89_dev *rtwdev);
|
||||
void rtw89_queue_chanctx_change(struct rtw89_dev *rtwdev,
|
||||
enum rtw89_chanctx_changes change);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -267,10 +267,10 @@ void rtw89_btc_ntfy_scan_finish(struct rtw89_dev *rtwdev, u8 phy_idx);
|
|||
void rtw89_btc_ntfy_switch_band(struct rtw89_dev *rtwdev, u8 phy_idx, u8 band);
|
||||
void rtw89_btc_ntfy_specific_packet(struct rtw89_dev *rtwdev,
|
||||
enum btc_pkt_type pkt_type);
|
||||
void rtw89_btc_ntfy_eapol_packet_work(struct work_struct *work);
|
||||
void rtw89_btc_ntfy_arp_packet_work(struct work_struct *work);
|
||||
void rtw89_btc_ntfy_dhcp_packet_work(struct work_struct *work);
|
||||
void rtw89_btc_ntfy_icmp_packet_work(struct work_struct *work);
|
||||
void rtw89_btc_ntfy_eapol_packet_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_btc_ntfy_arp_packet_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_btc_ntfy_dhcp_packet_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_btc_ntfy_icmp_packet_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_btc_ntfy_role_info(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_vif_link *rtwvif_link,
|
||||
struct rtw89_sta_link *rtwsta_link,
|
||||
|
|
@ -282,14 +282,16 @@ void rtw89_btc_ntfy_wl_rfk(struct rtw89_dev *rtwdev, u8 phy_map,
|
|||
void rtw89_btc_ntfy_wl_sta(struct rtw89_dev *rtwdev);
|
||||
void rtw89_btc_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
|
||||
u32 len, u8 class, u8 func);
|
||||
void rtw89_btc_dump_info(struct rtw89_dev *rtwdev, struct seq_file *m);
|
||||
void rtw89_coex_act1_work(struct work_struct *work);
|
||||
void rtw89_coex_bt_devinfo_work(struct work_struct *work);
|
||||
void rtw89_coex_rfk_chk_work(struct work_struct *work);
|
||||
ssize_t rtw89_btc_dump_info(struct rtw89_dev *rtwdev, char *buf, size_t bufsz);
|
||||
void rtw89_coex_act1_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_coex_bt_devinfo_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_coex_rfk_chk_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_coex_power_on(struct rtw89_dev *rtwdev);
|
||||
void rtw89_btc_set_policy(struct rtw89_dev *rtwdev, u16 policy_type);
|
||||
void rtw89_btc_set_policy_v1(struct rtw89_dev *rtwdev, u16 policy_type);
|
||||
void rtw89_coex_recognize_ver(struct rtw89_dev *rtwdev);
|
||||
void rtw89_btc_ntfy_preserve_bt_time(struct rtw89_dev *rtwdev, u32 ms);
|
||||
void rtw89_btc_ntfy_conn_rfk(struct rtw89_dev *rtwdev, bool state);
|
||||
|
||||
static inline u8 rtw89_btc_phymap(struct rtw89_dev *rtwdev,
|
||||
enum rtw89_phy_idx phy_idx,
|
||||
|
|
|
|||
|
|
@ -913,16 +913,17 @@ static enum btc_pkt_type
|
|||
rtw89_core_tx_btc_spec_pkt_notify(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_core_tx_request *tx_req)
|
||||
{
|
||||
struct wiphy *wiphy = rtwdev->hw->wiphy;
|
||||
struct sk_buff *skb = tx_req->skb;
|
||||
struct udphdr *udphdr;
|
||||
|
||||
if (IEEE80211_SKB_CB(skb)->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO) {
|
||||
ieee80211_queue_work(rtwdev->hw, &rtwdev->btc.eapol_notify_work);
|
||||
wiphy_work_queue(wiphy, &rtwdev->btc.eapol_notify_work);
|
||||
return PACKET_EAPOL;
|
||||
}
|
||||
|
||||
if (skb->protocol == htons(ETH_P_ARP)) {
|
||||
ieee80211_queue_work(rtwdev->hw, &rtwdev->btc.arp_notify_work);
|
||||
wiphy_work_queue(wiphy, &rtwdev->btc.arp_notify_work);
|
||||
return PACKET_ARP;
|
||||
}
|
||||
|
||||
|
|
@ -932,14 +933,14 @@ rtw89_core_tx_btc_spec_pkt_notify(struct rtw89_dev *rtwdev,
|
|||
if (((udphdr->source == htons(67) && udphdr->dest == htons(68)) ||
|
||||
(udphdr->source == htons(68) && udphdr->dest == htons(67))) &&
|
||||
skb->len > 282) {
|
||||
ieee80211_queue_work(rtwdev->hw, &rtwdev->btc.dhcp_notify_work);
|
||||
wiphy_work_queue(wiphy, &rtwdev->btc.dhcp_notify_work);
|
||||
return PACKET_DHCP;
|
||||
}
|
||||
}
|
||||
|
||||
if (skb->protocol == htons(ETH_P_IP) &&
|
||||
ip_hdr(skb)->protocol == IPPROTO_ICMP) {
|
||||
ieee80211_queue_work(rtwdev->hw, &rtwdev->btc.icmp_notify_work);
|
||||
wiphy_work_queue(wiphy, &rtwdev->btc.icmp_notify_work);
|
||||
return PACKET_ICMP;
|
||||
}
|
||||
|
||||
|
|
@ -2071,17 +2072,17 @@ static void rtw89_stats_trigger_frame(struct rtw89_dev *rtwdev,
|
|||
}
|
||||
}
|
||||
|
||||
static void rtw89_cancel_6ghz_probe_work(struct work_struct *work)
|
||||
static void rtw89_cancel_6ghz_probe_work(struct wiphy *wiphy, struct wiphy_work *work)
|
||||
{
|
||||
struct rtw89_dev *rtwdev = container_of(work, struct rtw89_dev,
|
||||
cancel_6ghz_probe_work);
|
||||
struct list_head *pkt_list = rtwdev->scan_info.pkt_list;
|
||||
struct rtw89_pktofld_info *info;
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(wiphy);
|
||||
|
||||
if (!rtwdev->scanning)
|
||||
goto out;
|
||||
return;
|
||||
|
||||
list_for_each_entry(info, &pkt_list[NL80211_BAND_6GHZ], list) {
|
||||
if (!info->cancel || !test_bit(info->id, rtwdev->pkt_offload))
|
||||
|
|
@ -2094,9 +2095,6 @@ static void rtw89_cancel_6ghz_probe_work(struct work_struct *work)
|
|||
* since if during scanning, pkt_list is accessed in bottom half.
|
||||
*/
|
||||
}
|
||||
|
||||
out:
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
}
|
||||
|
||||
static void rtw89_core_cancel_6ghz_probe_tx(struct rtw89_dev *rtwdev,
|
||||
|
|
@ -2131,7 +2129,7 @@ static void rtw89_core_cancel_6ghz_probe_tx(struct rtw89_dev *rtwdev,
|
|||
}
|
||||
|
||||
if (queue_work)
|
||||
ieee80211_queue_work(rtwdev->hw, &rtwdev->cancel_6ghz_probe_work);
|
||||
wiphy_work_queue(rtwdev->hw->wiphy, &rtwdev->cancel_6ghz_probe_work);
|
||||
}
|
||||
|
||||
static void rtw89_vif_sync_bcn_tsf(struct rtw89_vif_link *rtwvif_link,
|
||||
|
|
@ -2194,8 +2192,11 @@ static void rtw89_vif_rx_stats_iter(void *data, u8 *mac,
|
|||
}
|
||||
pkt_stat->beacon_nr++;
|
||||
|
||||
if (phy_ppdu)
|
||||
if (phy_ppdu) {
|
||||
ewma_rssi_add(&rtwdev->phystat.bcn_rssi, phy_ppdu->rssi_avg);
|
||||
if (!test_bit(RTW89_FLAG_LOW_POWER_MODE, rtwdev->flags))
|
||||
rtwvif_link->bcn_bw_idx = phy_ppdu->bw_idx;
|
||||
}
|
||||
|
||||
pkt_stat->beacon_rate = desc_info->data_rate;
|
||||
}
|
||||
|
|
@ -3143,13 +3144,14 @@ static void rtw89_core_txq_schedule(struct rtw89_dev *rtwdev, u8 ac, bool *reinv
|
|||
ieee80211_txq_schedule_end(hw, ac);
|
||||
}
|
||||
|
||||
static void rtw89_ips_work(struct work_struct *work)
|
||||
static void rtw89_ips_work(struct wiphy *wiphy, struct wiphy_work *work)
|
||||
{
|
||||
struct rtw89_dev *rtwdev = container_of(work, struct rtw89_dev,
|
||||
ips_work);
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
|
||||
lockdep_assert_wiphy(wiphy);
|
||||
|
||||
rtw89_enter_ips_by_hwflags(rtwdev);
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
}
|
||||
|
||||
static void rtw89_core_txq_work(struct work_struct *w)
|
||||
|
|
@ -3291,7 +3293,7 @@ void rtw89_roc_start(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
|||
u32 reg;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(hw->wiphy);
|
||||
|
||||
rtw89_leave_ips_by_hwflags(rtwdev);
|
||||
rtw89_leave_lps(rtwdev);
|
||||
|
|
@ -3330,9 +3332,9 @@ void rtw89_roc_start(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
|||
rtw89_write32_clr(rtwdev, reg, B_AX_A_UC_CAM_MATCH | B_AX_A_BC_CAM_MATCH);
|
||||
|
||||
ieee80211_ready_on_channel(hw);
|
||||
cancel_delayed_work(&rtwvif->roc.roc_work);
|
||||
ieee80211_queue_delayed_work(hw, &rtwvif->roc.roc_work,
|
||||
msecs_to_jiffies(rtwvif->roc.duration));
|
||||
wiphy_delayed_work_cancel(hw->wiphy, &rtwvif->roc.roc_work);
|
||||
wiphy_delayed_work_queue(hw->wiphy, &rtwvif->roc.roc_work,
|
||||
msecs_to_jiffies(rtwvif->roc.duration));
|
||||
}
|
||||
|
||||
void rtw89_roc_end(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
||||
|
|
@ -3345,7 +3347,7 @@ void rtw89_roc_end(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
|||
u32 reg;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(hw->wiphy);
|
||||
|
||||
ieee80211_remain_on_channel_expired(hw);
|
||||
|
||||
|
|
@ -3377,18 +3379,18 @@ void rtw89_roc_end(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
|||
queue_work(rtwdev->txq_wq, &rtwdev->txq_work);
|
||||
|
||||
if (hw->conf.flags & IEEE80211_CONF_IDLE)
|
||||
ieee80211_queue_delayed_work(hw, &roc->roc_work,
|
||||
msecs_to_jiffies(RTW89_ROC_IDLE_TIMEOUT));
|
||||
wiphy_delayed_work_queue(hw->wiphy, &roc->roc_work,
|
||||
msecs_to_jiffies(RTW89_ROC_IDLE_TIMEOUT));
|
||||
}
|
||||
|
||||
void rtw89_roc_work(struct work_struct *work)
|
||||
void rtw89_roc_work(struct wiphy *wiphy, struct wiphy_work *work)
|
||||
{
|
||||
struct rtw89_vif *rtwvif = container_of(work, struct rtw89_vif,
|
||||
roc.roc_work.work);
|
||||
struct rtw89_dev *rtwdev = rtwvif->rtwdev;
|
||||
struct rtw89_roc *roc = &rtwvif->roc;
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(wiphy);
|
||||
|
||||
switch (roc->state) {
|
||||
case RTW89_ROC_IDLE:
|
||||
|
|
@ -3401,8 +3403,6 @@ void rtw89_roc_work(struct work_struct *work)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
}
|
||||
|
||||
static enum rtw89_tfc_lv rtw89_get_traffic_level(struct rtw89_dev *rtwdev,
|
||||
|
|
@ -3533,26 +3533,26 @@ void rtw89_traffic_stats_init(struct rtw89_dev *rtwdev,
|
|||
ewma_tp_init(&stats->rx_ewma_tp);
|
||||
}
|
||||
|
||||
static void rtw89_track_work(struct work_struct *work)
|
||||
static void rtw89_track_work(struct wiphy *wiphy, struct wiphy_work *work)
|
||||
{
|
||||
struct rtw89_dev *rtwdev = container_of(work, struct rtw89_dev,
|
||||
track_work.work);
|
||||
bool tfc_changed;
|
||||
|
||||
lockdep_assert_wiphy(wiphy);
|
||||
|
||||
if (test_bit(RTW89_FLAG_FORBIDDEN_TRACK_WROK, rtwdev->flags))
|
||||
return;
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
|
||||
if (!test_bit(RTW89_FLAG_RUNNING, rtwdev->flags))
|
||||
goto out;
|
||||
return;
|
||||
|
||||
ieee80211_queue_delayed_work(rtwdev->hw, &rtwdev->track_work,
|
||||
RTW89_TRACK_WORK_PERIOD);
|
||||
wiphy_delayed_work_queue(wiphy, &rtwdev->track_work,
|
||||
RTW89_TRACK_WORK_PERIOD);
|
||||
|
||||
tfc_changed = rtw89_traffic_stats_track(rtwdev);
|
||||
if (rtwdev->scanning)
|
||||
goto out;
|
||||
return;
|
||||
|
||||
rtw89_leave_lps(rtwdev);
|
||||
|
||||
|
|
@ -3577,9 +3577,6 @@ static void rtw89_track_work(struct work_struct *work)
|
|||
|
||||
if (rtwdev->lps_enabled && !rtwdev->btc.lps)
|
||||
rtw89_enter_lps_track(rtwdev);
|
||||
|
||||
out:
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
}
|
||||
|
||||
u8 rtw89_core_acquire_bit_map(unsigned long *addr, unsigned long size)
|
||||
|
|
@ -3613,7 +3610,7 @@ int rtw89_core_acquire_sta_ba_entry(struct rtw89_dev *rtwdev,
|
|||
u8 idx;
|
||||
int i;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
idx = rtw89_core_acquire_bit_map(cam_info->ba_cam_map, chip->bacam_num);
|
||||
if (idx == chip->bacam_num) {
|
||||
|
|
@ -3657,7 +3654,7 @@ int rtw89_core_release_sta_ba_entry(struct rtw89_dev *rtwdev,
|
|||
struct rtw89_ba_cam_entry *entry = NULL, *tmp;
|
||||
u8 idx;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
list_for_each_entry_safe(entry, tmp, &rtwsta_link->ba_cam_list, list) {
|
||||
if (entry->tid != tid)
|
||||
|
|
@ -4432,26 +4429,26 @@ static void rtw89_core_ppdu_sts_init(struct rtw89_dev *rtwdev)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < RTW89_PHY_MAX; i++)
|
||||
for (i = 0; i < RTW89_PHY_NUM; i++)
|
||||
skb_queue_head_init(&rtwdev->ppdu_sts.rx_queue[i]);
|
||||
for (i = 0; i < RTW89_PHY_MAX; i++)
|
||||
for (i = 0; i < RTW89_PHY_NUM; i++)
|
||||
rtwdev->ppdu_sts.curr_rx_ppdu_cnt[i] = U8_MAX;
|
||||
}
|
||||
|
||||
void rtw89_core_update_beacon_work(struct work_struct *work)
|
||||
void rtw89_core_update_beacon_work(struct wiphy *wiphy, struct wiphy_work *work)
|
||||
{
|
||||
struct rtw89_dev *rtwdev;
|
||||
struct rtw89_vif_link *rtwvif_link = container_of(work, struct rtw89_vif_link,
|
||||
update_beacon_work);
|
||||
|
||||
lockdep_assert_wiphy(wiphy);
|
||||
|
||||
if (rtwvif_link->net_type != RTW89_NET_TYPE_AP_MODE)
|
||||
return;
|
||||
|
||||
rtwdev = rtwvif_link->rtwvif->rtwdev;
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
rtw89_chip_h2c_update_beacon(rtwdev, rtwvif_link);
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
}
|
||||
|
||||
int rtw89_wait_for_cond(struct rtw89_wait_info *wait, unsigned int cond)
|
||||
|
|
@ -4568,8 +4565,8 @@ int rtw89_core_start(struct rtw89_dev *rtwdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ieee80211_queue_delayed_work(rtwdev->hw, &rtwdev->track_work,
|
||||
RTW89_TRACK_WORK_PERIOD);
|
||||
wiphy_delayed_work_queue(rtwdev->hw->wiphy, &rtwdev->track_work,
|
||||
RTW89_TRACK_WORK_PERIOD);
|
||||
|
||||
set_bit(RTW89_FLAG_RUNNING, rtwdev->flags);
|
||||
|
||||
|
|
@ -4583,8 +4580,11 @@ int rtw89_core_start(struct rtw89_dev *rtwdev)
|
|||
|
||||
void rtw89_core_stop(struct rtw89_dev *rtwdev)
|
||||
{
|
||||
struct wiphy *wiphy = rtwdev->hw->wiphy;
|
||||
struct rtw89_btc *btc = &rtwdev->btc;
|
||||
|
||||
lockdep_assert_wiphy(wiphy);
|
||||
|
||||
/* Prvent to stop twice; enter_ips and ops_stop */
|
||||
if (!test_bit(RTW89_FLAG_RUNNING, rtwdev->flags))
|
||||
return;
|
||||
|
|
@ -4593,25 +4593,21 @@ void rtw89_core_stop(struct rtw89_dev *rtwdev)
|
|||
|
||||
clear_bit(RTW89_FLAG_RUNNING, rtwdev->flags);
|
||||
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
|
||||
cancel_work_sync(&rtwdev->c2h_work);
|
||||
cancel_work_sync(&rtwdev->cancel_6ghz_probe_work);
|
||||
cancel_work_sync(&btc->eapol_notify_work);
|
||||
cancel_work_sync(&btc->arp_notify_work);
|
||||
cancel_work_sync(&btc->dhcp_notify_work);
|
||||
cancel_work_sync(&btc->icmp_notify_work);
|
||||
wiphy_work_cancel(wiphy, &rtwdev->c2h_work);
|
||||
wiphy_work_cancel(wiphy, &rtwdev->cancel_6ghz_probe_work);
|
||||
wiphy_work_cancel(wiphy, &btc->eapol_notify_work);
|
||||
wiphy_work_cancel(wiphy, &btc->arp_notify_work);
|
||||
wiphy_work_cancel(wiphy, &btc->dhcp_notify_work);
|
||||
wiphy_work_cancel(wiphy, &btc->icmp_notify_work);
|
||||
cancel_delayed_work_sync(&rtwdev->txq_reinvoke_work);
|
||||
cancel_delayed_work_sync(&rtwdev->track_work);
|
||||
cancel_delayed_work_sync(&rtwdev->chanctx_work);
|
||||
cancel_delayed_work_sync(&rtwdev->coex_act1_work);
|
||||
cancel_delayed_work_sync(&rtwdev->coex_bt_devinfo_work);
|
||||
cancel_delayed_work_sync(&rtwdev->coex_rfk_chk_work);
|
||||
cancel_delayed_work_sync(&rtwdev->cfo_track_work);
|
||||
wiphy_delayed_work_cancel(wiphy, &rtwdev->track_work);
|
||||
wiphy_delayed_work_cancel(wiphy, &rtwdev->chanctx_work);
|
||||
wiphy_delayed_work_cancel(wiphy, &rtwdev->coex_act1_work);
|
||||
wiphy_delayed_work_cancel(wiphy, &rtwdev->coex_bt_devinfo_work);
|
||||
wiphy_delayed_work_cancel(wiphy, &rtwdev->coex_rfk_chk_work);
|
||||
wiphy_delayed_work_cancel(wiphy, &rtwdev->cfo_track_work);
|
||||
cancel_delayed_work_sync(&rtwdev->forbid_ba_work);
|
||||
cancel_delayed_work_sync(&rtwdev->antdiv_work);
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
wiphy_delayed_work_cancel(wiphy, &rtwdev->antdiv_work);
|
||||
|
||||
rtw89_btc_ntfy_poweroff(rtwdev);
|
||||
rtw89_hci_flush_queues(rtwdev, BIT(rtwdev->hw->queues) - 1, true);
|
||||
|
|
@ -4825,20 +4821,19 @@ int rtw89_core_init(struct rtw89_dev *rtwdev)
|
|||
INIT_WORK(&rtwdev->ba_work, rtw89_core_ba_work);
|
||||
INIT_WORK(&rtwdev->txq_work, rtw89_core_txq_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->txq_reinvoke_work, rtw89_core_txq_reinvoke_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->track_work, rtw89_track_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->chanctx_work, rtw89_chanctx_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->coex_act1_work, rtw89_coex_act1_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->coex_bt_devinfo_work, rtw89_coex_bt_devinfo_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->coex_rfk_chk_work, rtw89_coex_rfk_chk_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->cfo_track_work, rtw89_phy_cfo_track_work);
|
||||
wiphy_delayed_work_init(&rtwdev->track_work, rtw89_track_work);
|
||||
wiphy_delayed_work_init(&rtwdev->chanctx_work, rtw89_chanctx_work);
|
||||
wiphy_delayed_work_init(&rtwdev->coex_act1_work, rtw89_coex_act1_work);
|
||||
wiphy_delayed_work_init(&rtwdev->coex_bt_devinfo_work, rtw89_coex_bt_devinfo_work);
|
||||
wiphy_delayed_work_init(&rtwdev->coex_rfk_chk_work, rtw89_coex_rfk_chk_work);
|
||||
wiphy_delayed_work_init(&rtwdev->cfo_track_work, rtw89_phy_cfo_track_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->forbid_ba_work, rtw89_forbid_ba_work);
|
||||
INIT_DELAYED_WORK(&rtwdev->antdiv_work, rtw89_phy_antdiv_work);
|
||||
wiphy_delayed_work_init(&rtwdev->antdiv_work, rtw89_phy_antdiv_work);
|
||||
rtwdev->txq_wq = alloc_workqueue("rtw89_tx_wq", WQ_UNBOUND | WQ_HIGHPRI, 0);
|
||||
if (!rtwdev->txq_wq)
|
||||
return -ENOMEM;
|
||||
spin_lock_init(&rtwdev->ba_lock);
|
||||
spin_lock_init(&rtwdev->rpwm_lock);
|
||||
mutex_init(&rtwdev->mutex);
|
||||
mutex_init(&rtwdev->rf_mutex);
|
||||
rtwdev->total_sta_assoc = 0;
|
||||
|
||||
|
|
@ -4847,10 +4842,10 @@ int rtw89_core_init(struct rtw89_dev *rtwdev)
|
|||
rtw89_init_wait(&rtwdev->wow.wait);
|
||||
rtw89_init_wait(&rtwdev->mac.ps_wait);
|
||||
|
||||
INIT_WORK(&rtwdev->c2h_work, rtw89_fw_c2h_work);
|
||||
INIT_WORK(&rtwdev->ips_work, rtw89_ips_work);
|
||||
wiphy_work_init(&rtwdev->c2h_work, rtw89_fw_c2h_work);
|
||||
wiphy_work_init(&rtwdev->ips_work, rtw89_ips_work);
|
||||
wiphy_work_init(&rtwdev->cancel_6ghz_probe_work, rtw89_cancel_6ghz_probe_work);
|
||||
INIT_WORK(&rtwdev->load_firmware_work, rtw89_load_firmware_work);
|
||||
INIT_WORK(&rtwdev->cancel_6ghz_probe_work, rtw89_cancel_6ghz_probe_work);
|
||||
|
||||
skb_queue_head_init(&rtwdev->c2h_queue);
|
||||
rtw89_core_ppdu_sts_init(rtwdev);
|
||||
|
|
@ -4867,10 +4862,13 @@ int rtw89_core_init(struct rtw89_dev *rtwdev)
|
|||
rtwdev->mlo_dbcc_mode = MLO_2_PLUS_0_1RF;
|
||||
}
|
||||
|
||||
INIT_WORK(&btc->eapol_notify_work, rtw89_btc_ntfy_eapol_packet_work);
|
||||
INIT_WORK(&btc->arp_notify_work, rtw89_btc_ntfy_arp_packet_work);
|
||||
INIT_WORK(&btc->dhcp_notify_work, rtw89_btc_ntfy_dhcp_packet_work);
|
||||
INIT_WORK(&btc->icmp_notify_work, rtw89_btc_ntfy_icmp_packet_work);
|
||||
rtwdev->bbs[RTW89_PHY_0].phy_idx = RTW89_PHY_0;
|
||||
rtwdev->bbs[RTW89_PHY_1].phy_idx = RTW89_PHY_1;
|
||||
|
||||
wiphy_work_init(&btc->eapol_notify_work, rtw89_btc_ntfy_eapol_packet_work);
|
||||
wiphy_work_init(&btc->arp_notify_work, rtw89_btc_ntfy_arp_packet_work);
|
||||
wiphy_work_init(&btc->dhcp_notify_work, rtw89_btc_ntfy_dhcp_packet_work);
|
||||
wiphy_work_init(&btc->icmp_notify_work, rtw89_btc_ntfy_icmp_packet_work);
|
||||
|
||||
init_completion(&rtwdev->fw.req.completion);
|
||||
init_completion(&rtwdev->rfk_wait.completion);
|
||||
|
|
@ -4890,11 +4888,10 @@ void rtw89_core_deinit(struct rtw89_dev *rtwdev)
|
|||
{
|
||||
rtw89_ser_deinit(rtwdev);
|
||||
rtw89_unload_firmware(rtwdev);
|
||||
rtw89_fw_free_all_early_h2c(rtwdev);
|
||||
__rtw89_fw_free_all_early_h2c(rtwdev);
|
||||
|
||||
destroy_workqueue(rtwdev->txq_wq);
|
||||
mutex_destroy(&rtwdev->rf_mutex);
|
||||
mutex_destroy(&rtwdev->mutex);
|
||||
}
|
||||
EXPORT_SYMBOL(rtw89_core_deinit);
|
||||
|
||||
|
|
@ -4903,6 +4900,7 @@ void rtw89_core_scan_start(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwv
|
|||
{
|
||||
const struct rtw89_chan *chan = rtw89_chan_get(rtwdev,
|
||||
rtwvif_link->chanctx_idx);
|
||||
struct rtw89_bb_ctx *bb = rtw89_get_bb_ctx(rtwdev, rtwvif_link->phy_idx);
|
||||
|
||||
rtwdev->scanning = true;
|
||||
rtw89_leave_lps(rtwdev);
|
||||
|
|
@ -4913,7 +4911,7 @@ void rtw89_core_scan_start(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwv
|
|||
rtw89_btc_ntfy_scan_start(rtwdev, rtwvif_link->phy_idx, chan->band_type);
|
||||
rtw89_chip_rfk_scan(rtwdev, rtwvif_link, true);
|
||||
rtw89_hci_recalc_int_mit(rtwdev);
|
||||
rtw89_phy_config_edcca(rtwdev, true);
|
||||
rtw89_phy_config_edcca(rtwdev, bb, true);
|
||||
|
||||
rtw89_fw_h2c_cam(rtwdev, rtwvif_link, NULL, mac_addr);
|
||||
}
|
||||
|
|
@ -4922,6 +4920,7 @@ void rtw89_core_scan_complete(struct rtw89_dev *rtwdev,
|
|||
struct rtw89_vif_link *rtwvif_link, bool hw_scan)
|
||||
{
|
||||
struct ieee80211_bss_conf *bss_conf;
|
||||
struct rtw89_bb_ctx *bb;
|
||||
|
||||
if (!rtwvif_link)
|
||||
return;
|
||||
|
|
@ -4937,12 +4936,14 @@ void rtw89_core_scan_complete(struct rtw89_dev *rtwdev,
|
|||
|
||||
rtw89_chip_rfk_scan(rtwdev, rtwvif_link, false);
|
||||
rtw89_btc_ntfy_scan_finish(rtwdev, rtwvif_link->phy_idx);
|
||||
rtw89_phy_config_edcca(rtwdev, false);
|
||||
bb = rtw89_get_bb_ctx(rtwdev, rtwvif_link->phy_idx);
|
||||
rtw89_phy_config_edcca(rtwdev, bb, false);
|
||||
|
||||
rtwdev->scanning = false;
|
||||
rtwdev->dig.bypass_dig = true;
|
||||
rtw89_for_each_active_bb(rtwdev, bb)
|
||||
bb->dig.bypass_dig = true;
|
||||
if (hw_scan && (rtwdev->hw->conf.flags & IEEE80211_CONF_IDLE))
|
||||
ieee80211_queue_work(rtwdev->hw, &rtwdev->ips_work);
|
||||
wiphy_work_queue(rtwdev->hw->wiphy, &rtwdev->ips_work);
|
||||
}
|
||||
|
||||
static void rtw89_read_chip_ver(struct rtw89_dev *rtwdev)
|
||||
|
|
@ -5042,8 +5043,6 @@ static int rtw89_chip_efuse_info_setup(struct rtw89_dev *rtwdev)
|
|||
|
||||
rtw89_hci_mac_pre_deinit(rtwdev);
|
||||
|
||||
rtw89_mac_pwr_off(rtwdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -5124,36 +5123,45 @@ int rtw89_chip_info_setup(struct rtw89_dev *rtwdev)
|
|||
|
||||
rtw89_read_chip_ver(rtwdev);
|
||||
|
||||
ret = rtw89_mac_pwr_on(rtwdev);
|
||||
if (ret) {
|
||||
rtw89_err(rtwdev, "failed to power on\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = rtw89_wait_firmware_completion(rtwdev);
|
||||
if (ret) {
|
||||
rtw89_err(rtwdev, "failed to wait firmware completion\n");
|
||||
return ret;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = rtw89_fw_recognize(rtwdev);
|
||||
if (ret) {
|
||||
rtw89_err(rtwdev, "failed to recognize firmware\n");
|
||||
return ret;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = rtw89_chip_efuse_info_setup(rtwdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
ret = rtw89_fw_recognize_elements(rtwdev);
|
||||
if (ret) {
|
||||
rtw89_err(rtwdev, "failed to recognize firmware elements\n");
|
||||
return ret;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = rtw89_chip_board_info_setup(rtwdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
rtw89_core_setup_rfe_parms(rtwdev);
|
||||
rtwdev->ps_mode = rtw89_update_ps_mode(rtwdev);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
rtw89_mac_pwr_off(rtwdev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(rtw89_chip_info_setup);
|
||||
|
||||
|
|
@ -5296,7 +5304,7 @@ static int rtw89_core_register_hw(struct rtw89_dev *rtwdev)
|
|||
goto err_free_supported_band;
|
||||
}
|
||||
|
||||
ret = rtw89_regd_init(rtwdev, rtw89_regd_notifier);
|
||||
ret = rtw89_regd_init_hint(rtwdev);
|
||||
if (ret) {
|
||||
rtw89_err(rtwdev, "failed to init regd\n");
|
||||
goto err_unregister_hw;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ struct rtw89_h2c_rf_tssi;
|
|||
struct rtw89_fw_txpwr_track_cfg;
|
||||
struct rtw89_phy_rfk_log_fmt;
|
||||
struct rtw89_debugfs;
|
||||
struct rtw89_regd_data;
|
||||
|
||||
extern const struct ieee80211_ops rtw89_ops;
|
||||
|
||||
|
|
@ -718,6 +719,7 @@ enum rtw89_ofdma_type {
|
|||
RTW89_OFDMA_NUM,
|
||||
};
|
||||
|
||||
/* neither insert new in the middle, nor change any given definition */
|
||||
enum rtw89_regulation_type {
|
||||
RTW89_WW = 0,
|
||||
RTW89_ETSI = 1,
|
||||
|
|
@ -826,7 +828,7 @@ enum rtw89_mac_idx {
|
|||
enum rtw89_phy_idx {
|
||||
RTW89_PHY_0 = 0,
|
||||
RTW89_PHY_1 = 1,
|
||||
RTW89_PHY_MAX
|
||||
RTW89_PHY_NUM,
|
||||
};
|
||||
|
||||
#define __RTW89_MLD_MAX_LINK_NUM 2
|
||||
|
|
@ -1540,16 +1542,16 @@ struct rtw89_btc_u8_sta_chg {
|
|||
};
|
||||
|
||||
struct rtw89_btc_wl_scan_info {
|
||||
u8 band[RTW89_PHY_MAX];
|
||||
u8 band[RTW89_PHY_NUM];
|
||||
u8 phy_map;
|
||||
u8 rsvd;
|
||||
};
|
||||
|
||||
struct rtw89_btc_wl_dbcc_info {
|
||||
u8 op_band[RTW89_PHY_MAX]; /* op band in each phy */
|
||||
u8 scan_band[RTW89_PHY_MAX]; /* scan band in each phy */
|
||||
u8 real_band[RTW89_PHY_MAX];
|
||||
u8 role[RTW89_PHY_MAX]; /* role in each phy */
|
||||
u8 op_band[RTW89_PHY_NUM]; /* op band in each phy */
|
||||
u8 scan_band[RTW89_PHY_NUM]; /* scan band in each phy */
|
||||
u8 real_band[RTW89_PHY_NUM];
|
||||
u8 role[RTW89_PHY_NUM]; /* role in each phy */
|
||||
};
|
||||
|
||||
struct rtw89_btc_wl_active_role {
|
||||
|
|
@ -1761,7 +1763,8 @@ struct rtw89_btc_wl_rfk_info {
|
|||
u32 phy_map: 2;
|
||||
u32 band: 2;
|
||||
u32 type: 8;
|
||||
u32 rsvd: 14;
|
||||
u32 con_rfk: 1;
|
||||
u32 rsvd: 13;
|
||||
|
||||
u32 start_time;
|
||||
u32 proc_time;
|
||||
|
|
@ -1898,7 +1901,7 @@ struct rtw89_btc_wl_info {
|
|||
u8 cn_report;
|
||||
u8 coex_mode;
|
||||
u8 pta_req_mac;
|
||||
u8 bt_polut_type[RTW89_PHY_MAX]; /* BT polluted WL-Tx type for phy0/1 */
|
||||
u8 bt_polut_type[RTW89_PHY_NUM]; /* BT polluted WL-Tx type for phy0/1 */
|
||||
|
||||
bool is_5g_hi_channel;
|
||||
bool pta_reg_mac_chg;
|
||||
|
|
@ -2230,7 +2233,7 @@ struct rtw89_btc_fbtc_rpt_ctrl_v4 {
|
|||
struct rtw89_btc_fbtc_rpt_ctrl_wl_fw_info wl_fw_info;
|
||||
struct rtw89_btc_fbtc_rpt_ctrl_bt_mailbox bt_mbx_info;
|
||||
__le32 bt_cnt[BTC_BCNT_STA_MAX];
|
||||
struct rtw89_mac_ax_gnt gnt_val[RTW89_PHY_MAX];
|
||||
struct rtw89_mac_ax_gnt gnt_val[RTW89_PHY_NUM];
|
||||
} __packed;
|
||||
|
||||
struct rtw89_btc_fbtc_rpt_ctrl_v5 {
|
||||
|
|
@ -2238,7 +2241,7 @@ struct rtw89_btc_fbtc_rpt_ctrl_v5 {
|
|||
u8 rsvd;
|
||||
__le16 rsvd1;
|
||||
|
||||
u8 gnt_val[RTW89_PHY_MAX][4];
|
||||
u8 gnt_val[RTW89_PHY_NUM][4];
|
||||
__le16 bt_cnt[BTC_BCNT_STA_MAX];
|
||||
|
||||
struct rtw89_btc_fbtc_rpt_ctrl_info_v5 rpt_info;
|
||||
|
|
@ -2250,7 +2253,7 @@ struct rtw89_btc_fbtc_rpt_ctrl_v105 {
|
|||
u8 rsvd;
|
||||
__le16 rsvd1;
|
||||
|
||||
u8 gnt_val[RTW89_PHY_MAX][4];
|
||||
u8 gnt_val[RTW89_PHY_NUM][4];
|
||||
__le16 bt_cnt[BTC_BCNT_STA_MAX_V105];
|
||||
|
||||
struct rtw89_btc_fbtc_rpt_ctrl_info_v5 rpt_info;
|
||||
|
|
@ -2263,7 +2266,7 @@ struct rtw89_btc_fbtc_rpt_ctrl_v7 {
|
|||
u8 rsvd1;
|
||||
u8 rsvd2;
|
||||
|
||||
u8 gnt_val[RTW89_PHY_MAX][4];
|
||||
u8 gnt_val[RTW89_PHY_NUM][4];
|
||||
__le16 bt_cnt[BTC_BCNT_STA_MAX_V105];
|
||||
|
||||
struct rtw89_btc_fbtc_rpt_ctrl_info_v8 rpt_info;
|
||||
|
|
@ -2276,7 +2279,7 @@ struct rtw89_btc_fbtc_rpt_ctrl_v8 {
|
|||
u8 rpt_len_max_l; /* BTC_RPT_MAX bit0~7 */
|
||||
u8 rpt_len_max_h; /* BTC_RPT_MAX bit8~15 */
|
||||
|
||||
u8 gnt_val[RTW89_PHY_MAX][4];
|
||||
u8 gnt_val[RTW89_PHY_NUM][4];
|
||||
__le16 bt_cnt[BTC_BCNT_STA_MAX_V105];
|
||||
|
||||
struct rtw89_btc_fbtc_rpt_ctrl_info_v8 rpt_info;
|
||||
|
|
@ -3174,10 +3177,10 @@ struct rtw89_btc {
|
|||
struct rtw89_btc_btf_fwinfo fwinfo;
|
||||
struct rtw89_btc_dbg dbg;
|
||||
|
||||
struct work_struct eapol_notify_work;
|
||||
struct work_struct arp_notify_work;
|
||||
struct work_struct dhcp_notify_work;
|
||||
struct work_struct icmp_notify_work;
|
||||
struct wiphy_work eapol_notify_work;
|
||||
struct wiphy_work arp_notify_work;
|
||||
struct wiphy_work dhcp_notify_work;
|
||||
struct wiphy_work icmp_notify_work;
|
||||
|
||||
u32 bt_req_len;
|
||||
|
||||
|
|
@ -3444,7 +3447,7 @@ enum rtw89_roc_state {
|
|||
|
||||
struct rtw89_roc {
|
||||
struct ieee80211_channel chan;
|
||||
struct delayed_work roc_work;
|
||||
struct wiphy_delayed_work roc_work;
|
||||
enum ieee80211_roc_type type;
|
||||
enum rtw89_roc_state state;
|
||||
int duration;
|
||||
|
|
@ -3498,6 +3501,7 @@ struct rtw89_vif_link {
|
|||
u8 self_role;
|
||||
u8 wmm;
|
||||
u8 bcn_hit_cond;
|
||||
u8 bcn_bw_idx;
|
||||
u8 hit_rule;
|
||||
u8 last_noa_nr;
|
||||
u64 sync_bcn_tsf;
|
||||
|
|
@ -3514,7 +3518,7 @@ struct rtw89_vif_link {
|
|||
bool pre_pwr_diff_en;
|
||||
bool pwr_diff_en;
|
||||
u8 def_tri_idx;
|
||||
struct work_struct update_beacon_work;
|
||||
struct wiphy_work update_beacon_work;
|
||||
struct rtw89_addr_cam_entry addr_cam;
|
||||
struct rtw89_bssid_cam_entry bssid_cam;
|
||||
struct ieee80211_tx_queue_params tx_params[IEEE80211_NUM_ACS];
|
||||
|
|
@ -4189,10 +4193,12 @@ struct rtw89_edcca_regs {
|
|||
u32 edcca_p_mask;
|
||||
u32 ppdu_level;
|
||||
u32 ppdu_mask;
|
||||
u32 rpt_a;
|
||||
u32 rpt_b;
|
||||
u32 rpt_sel;
|
||||
u32 rpt_sel_mask;
|
||||
struct rtw89_edcca_p_regs {
|
||||
u32 rpt_a;
|
||||
u32 rpt_b;
|
||||
u32 rpt_sel;
|
||||
u32 rpt_sel_mask;
|
||||
} p[RTW89_PHY_NUM];
|
||||
u32 rpt_sel_be;
|
||||
u32 rpt_sel_be_mask;
|
||||
u32 tx_collision_t2r_st;
|
||||
|
|
@ -4536,6 +4542,7 @@ struct rtw89_fw_elm_info {
|
|||
struct rtw89_phy_table *rf_nctl;
|
||||
struct rtw89_fw_txpwr_track_cfg *txpwr_trk;
|
||||
struct rtw89_phy_rfk_log_fmt *rfk_log_fmt;
|
||||
const struct rtw89_regd_data *regd;
|
||||
};
|
||||
|
||||
enum rtw89_fw_mss_dev_type {
|
||||
|
|
@ -4762,12 +4769,11 @@ struct rtw89_hal {
|
|||
struct rtw89_chanctx chanctx[NUM_OF_RTW89_CHANCTX];
|
||||
struct cfg80211_chan_def roc_chandef;
|
||||
|
||||
bool entity_active[RTW89_PHY_MAX];
|
||||
bool entity_active[RTW89_PHY_NUM];
|
||||
bool entity_pause;
|
||||
enum rtw89_entity_mode entity_mode;
|
||||
struct rtw89_entity_mgnt entity_mgnt;
|
||||
|
||||
struct rtw89_edcca_bak edcca_bak;
|
||||
u32 disabled_dm_bitmap; /* bitmap of enum rtw89_dm_type */
|
||||
|
||||
u8 thermal_prot_th;
|
||||
|
|
@ -4973,7 +4979,7 @@ struct rtw89_dpk_bkup_para {
|
|||
struct rtw89_dpk_info {
|
||||
bool is_dpk_enable;
|
||||
bool is_dpk_reload_en;
|
||||
u8 dpk_gs[RTW89_PHY_MAX];
|
||||
u8 dpk_gs[RTW89_PHY_NUM];
|
||||
u16 dc_i[RTW89_DPK_RF_PATH][RTW89_DPK_BKUP_NUM];
|
||||
u16 dc_q[RTW89_DPK_RF_PATH][RTW89_DPK_BKUP_NUM];
|
||||
u8 corr_val[RTW89_DPK_RF_PATH][RTW89_DPK_BKUP_NUM];
|
||||
|
|
@ -5146,9 +5152,27 @@ struct rtw89_power_trim_info {
|
|||
u8 pad_bias_trim[RF_PATH_MAX];
|
||||
};
|
||||
|
||||
enum rtw89_regd_func {
|
||||
RTW89_REGD_FUNC_TAS = 0, /* TAS (Time Average SAR) */
|
||||
RTW89_REGD_FUNC_DAG = 1, /* DAG (Dynamic Antenna Gain) */
|
||||
|
||||
NUM_OF_RTW89_REGD_FUNC,
|
||||
};
|
||||
|
||||
struct rtw89_regd {
|
||||
char alpha2[3];
|
||||
u8 txpwr_regd[RTW89_BAND_NUM];
|
||||
DECLARE_BITMAP(func_bitmap, NUM_OF_RTW89_REGD_FUNC);
|
||||
};
|
||||
|
||||
struct rtw89_regd_data {
|
||||
unsigned int nr;
|
||||
struct rtw89_regd map[] __counted_by(nr);
|
||||
};
|
||||
|
||||
struct rtw89_regd_ctrl {
|
||||
unsigned int nr;
|
||||
const struct rtw89_regd *map;
|
||||
};
|
||||
|
||||
#define RTW89_REGD_MAX_COUNTRY_NUM U8_MAX
|
||||
|
|
@ -5156,6 +5180,7 @@ struct rtw89_regd {
|
|||
#define RTW89_5GHZ_UNII4_START_INDEX 25
|
||||
|
||||
struct rtw89_regulatory_info {
|
||||
struct rtw89_regd_ctrl ctrl;
|
||||
const struct rtw89_regd *regd;
|
||||
enum rtw89_reg_6ghz_power reg_6ghz_power;
|
||||
struct rtw89_reg_6ghz_tpe reg_6ghz_tpe;
|
||||
|
|
@ -5299,8 +5324,8 @@ struct rtw89_lps_parm {
|
|||
};
|
||||
|
||||
struct rtw89_ppdu_sts_info {
|
||||
struct sk_buff_head rx_queue[RTW89_PHY_MAX];
|
||||
u8 curr_rx_ppdu_cnt[RTW89_PHY_MAX];
|
||||
struct sk_buff_head rx_queue[RTW89_PHY_NUM];
|
||||
u8 curr_rx_ppdu_cnt[RTW89_PHY_NUM];
|
||||
};
|
||||
|
||||
struct rtw89_early_h2c {
|
||||
|
|
@ -5419,8 +5444,8 @@ struct rtw89_phy_efuse_gain {
|
|||
bool offset_valid;
|
||||
bool comp_valid;
|
||||
s8 offset[RF_PATH_MAX][RTW89_GAIN_OFFSET_NR]; /* S(8, 0) */
|
||||
s8 offset_base[RTW89_PHY_MAX]; /* S(8, 4) */
|
||||
s8 rssi_base[RTW89_PHY_MAX]; /* S(8, 4) */
|
||||
s8 offset_base[RTW89_PHY_NUM]; /* S(8, 4) */
|
||||
s8 rssi_base[RTW89_PHY_NUM]; /* S(8, 4) */
|
||||
s8 comp[RF_PATH_MAX][RTW89_SUBBAND_NR]; /* S(8, 0) */
|
||||
};
|
||||
|
||||
|
|
@ -5629,8 +5654,6 @@ struct rtw89_dev {
|
|||
struct rtw89_sta_link __rcu *assoc_link_on_macid[RTW89_MAX_MAC_ID_NUM];
|
||||
refcount_t refcount_ap_info;
|
||||
|
||||
/* ensures exclusive access from mac80211 callbacks */
|
||||
struct mutex mutex;
|
||||
struct list_head rtwvifs_list;
|
||||
/* used to protect rf read write */
|
||||
struct mutex rf_mutex;
|
||||
|
|
@ -5650,10 +5673,10 @@ struct rtw89_dev {
|
|||
struct rtw89_cam_info cam_info;
|
||||
|
||||
struct sk_buff_head c2h_queue;
|
||||
struct work_struct c2h_work;
|
||||
struct work_struct ips_work;
|
||||
struct wiphy_work c2h_work;
|
||||
struct wiphy_work ips_work;
|
||||
struct wiphy_work cancel_6ghz_probe_work;
|
||||
struct work_struct load_firmware_work;
|
||||
struct work_struct cancel_6ghz_probe_work;
|
||||
|
||||
struct list_head early_h2c_list;
|
||||
|
||||
|
|
@ -5682,9 +5705,6 @@ struct rtw89_dev {
|
|||
struct rtw89_power_trim_info pwr_trim;
|
||||
|
||||
struct rtw89_cfo_tracking_info cfo_tracking;
|
||||
struct rtw89_env_monitor_info env_monitor;
|
||||
struct rtw89_dig_info dig;
|
||||
struct rtw89_phy_ch_info ch_info;
|
||||
union {
|
||||
struct rtw89_phy_bb_gain_info ax;
|
||||
struct rtw89_phy_bb_gain_info_be be;
|
||||
|
|
@ -5693,15 +5713,22 @@ struct rtw89_dev {
|
|||
struct rtw89_phy_ul_tb_info ul_tb_info;
|
||||
struct rtw89_antdiv_info antdiv;
|
||||
|
||||
struct delayed_work track_work;
|
||||
struct delayed_work chanctx_work;
|
||||
struct delayed_work coex_act1_work;
|
||||
struct delayed_work coex_bt_devinfo_work;
|
||||
struct delayed_work coex_rfk_chk_work;
|
||||
struct delayed_work cfo_track_work;
|
||||
struct rtw89_bb_ctx {
|
||||
enum rtw89_phy_idx phy_idx;
|
||||
struct rtw89_env_monitor_info env_monitor;
|
||||
struct rtw89_dig_info dig;
|
||||
struct rtw89_phy_ch_info ch_info;
|
||||
struct rtw89_edcca_bak edcca_bak;
|
||||
} bbs[RTW89_PHY_NUM];
|
||||
|
||||
struct wiphy_delayed_work track_work;
|
||||
struct wiphy_delayed_work chanctx_work;
|
||||
struct wiphy_delayed_work coex_act1_work;
|
||||
struct wiphy_delayed_work coex_bt_devinfo_work;
|
||||
struct wiphy_delayed_work coex_rfk_chk_work;
|
||||
struct wiphy_delayed_work cfo_track_work;
|
||||
struct delayed_work forbid_ba_work;
|
||||
struct delayed_work roc_work;
|
||||
struct delayed_work antdiv_work;
|
||||
struct wiphy_delayed_work antdiv_work;
|
||||
struct rtw89_ppdu_sts_info ppdu_sts;
|
||||
u8 total_sta_assoc;
|
||||
bool scanning;
|
||||
|
|
@ -6978,6 +7005,48 @@ static inline bool rtw89_is_mlo_1_1(struct rtw89_dev *rtwdev)
|
|||
}
|
||||
}
|
||||
|
||||
static inline u8 rtw89_get_active_phy_bitmap(struct rtw89_dev *rtwdev)
|
||||
{
|
||||
if (!rtwdev->dbcc_en)
|
||||
return BIT(RTW89_PHY_0);
|
||||
|
||||
switch (rtwdev->mlo_dbcc_mode) {
|
||||
case MLO_0_PLUS_2_1RF:
|
||||
case MLO_0_PLUS_2_2RF:
|
||||
return BIT(RTW89_PHY_1);
|
||||
case MLO_1_PLUS_1_1RF:
|
||||
case MLO_1_PLUS_1_2RF:
|
||||
case MLO_2_PLUS_2_2RF:
|
||||
case DBCC_LEGACY:
|
||||
return BIT(RTW89_PHY_0) | BIT(RTW89_PHY_1);
|
||||
case MLO_2_PLUS_0_1RF:
|
||||
case MLO_2_PLUS_0_2RF:
|
||||
default:
|
||||
return BIT(RTW89_PHY_0);
|
||||
}
|
||||
}
|
||||
|
||||
#define rtw89_for_each_active_bb(rtwdev, bb) \
|
||||
for (u8 __active_bb_bitmap = rtw89_get_active_phy_bitmap(rtwdev), \
|
||||
__phy_idx = 0; __phy_idx < RTW89_PHY_NUM; __phy_idx++) \
|
||||
if (__active_bb_bitmap & BIT(__phy_idx) && \
|
||||
(bb = &rtwdev->bbs[__phy_idx]))
|
||||
|
||||
#define rtw89_for_each_capab_bb(rtwdev, bb) \
|
||||
for (u8 __phy_idx_max = rtwdev->dbcc_en ? RTW89_PHY_1 : RTW89_PHY_0, \
|
||||
__phy_idx = 0; __phy_idx <= __phy_idx_max; __phy_idx++) \
|
||||
if ((bb = &rtwdev->bbs[__phy_idx]))
|
||||
|
||||
static inline
|
||||
struct rtw89_bb_ctx *rtw89_get_bb_ctx(struct rtw89_dev *rtwdev,
|
||||
enum rtw89_phy_idx phy_idx)
|
||||
{
|
||||
if (phy_idx >= RTW89_PHY_NUM)
|
||||
return &rtwdev->bbs[RTW89_PHY_0];
|
||||
|
||||
return &rtwdev->bbs[phy_idx];
|
||||
}
|
||||
|
||||
static inline bool rtw89_is_rtl885xb(struct rtw89_dev *rtwdev)
|
||||
{
|
||||
enum rtw89_core_chip_id chip_id = rtwdev->chip->chip_id;
|
||||
|
|
@ -7092,9 +7161,7 @@ void rtw89_chip_cfg_txpwr_ul_tb_offset(struct rtw89_dev *rtwdev,
|
|||
struct rtw89_vif_link *rtwvif_link);
|
||||
bool rtw89_ra_report_to_bitrate(struct rtw89_dev *rtwdev, u8 rpt_rate, u16 *bitrate);
|
||||
int rtw89_regd_setup(struct rtw89_dev *rtwdev);
|
||||
int rtw89_regd_init(struct rtw89_dev *rtwdev,
|
||||
void (*reg_notifier)(struct wiphy *wiphy, struct regulatory_request *request));
|
||||
void rtw89_regd_notifier(struct wiphy *wiphy, struct regulatory_request *request);
|
||||
int rtw89_regd_init_hint(struct rtw89_dev *rtwdev);
|
||||
void rtw89_traffic_stats_init(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_traffic_stats *stats);
|
||||
int rtw89_wait_for_cond(struct rtw89_wait_info *wait, unsigned int cond);
|
||||
|
|
@ -7102,8 +7169,8 @@ void rtw89_complete_cond(struct rtw89_wait_info *wait, unsigned int cond,
|
|||
const struct rtw89_completion_data *data);
|
||||
int rtw89_core_start(struct rtw89_dev *rtwdev);
|
||||
void rtw89_core_stop(struct rtw89_dev *rtwdev);
|
||||
void rtw89_core_update_beacon_work(struct work_struct *work);
|
||||
void rtw89_roc_work(struct work_struct *work);
|
||||
void rtw89_core_update_beacon_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_roc_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
void rtw89_roc_start(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif);
|
||||
void rtw89_roc_end(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif);
|
||||
void rtw89_core_scan_start(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -489,6 +489,30 @@ static int rtw89_fw_hdr_parser(struct rtw89_dev *rtwdev,
|
|||
}
|
||||
}
|
||||
|
||||
static int rtw89_mfw_validate_hdr(struct rtw89_dev *rtwdev,
|
||||
const struct firmware *firmware,
|
||||
const struct rtw89_mfw_hdr *mfw_hdr)
|
||||
{
|
||||
const void *mfw = firmware->data;
|
||||
u32 mfw_len = firmware->size;
|
||||
u8 fw_nr = mfw_hdr->fw_nr;
|
||||
const void *ptr;
|
||||
|
||||
if (fw_nr == 0) {
|
||||
rtw89_err(rtwdev, "mfw header has no fw entry\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
ptr = &mfw_hdr->info[fw_nr];
|
||||
|
||||
if (ptr > mfw + mfw_len) {
|
||||
rtw89_err(rtwdev, "mfw header out of address\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
int rtw89_mfw_recognize(struct rtw89_dev *rtwdev, enum rtw89_fw_type type,
|
||||
struct rtw89_fw_suit *fw_suit, bool nowarn)
|
||||
|
|
@ -499,6 +523,7 @@ int rtw89_mfw_recognize(struct rtw89_dev *rtwdev, enum rtw89_fw_type type,
|
|||
u32 mfw_len = firmware->size;
|
||||
const struct rtw89_mfw_hdr *mfw_hdr = (const struct rtw89_mfw_hdr *)mfw;
|
||||
const struct rtw89_mfw_info *mfw_info = NULL, *tmp;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
if (mfw_hdr->sig != RTW89_MFW_SIG) {
|
||||
|
|
@ -511,6 +536,10 @@ int rtw89_mfw_recognize(struct rtw89_dev *rtwdev, enum rtw89_fw_type type,
|
|||
return 0;
|
||||
}
|
||||
|
||||
ret = rtw89_mfw_validate_hdr(rtwdev, firmware, mfw_hdr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (i = 0; i < mfw_hdr->fw_nr; i++) {
|
||||
tmp = &mfw_hdr->info[i];
|
||||
if (tmp->type != type)
|
||||
|
|
@ -540,6 +569,12 @@ int rtw89_mfw_recognize(struct rtw89_dev *rtwdev, enum rtw89_fw_type type,
|
|||
found:
|
||||
fw_suit->data = mfw + le32_to_cpu(mfw_info->shift);
|
||||
fw_suit->size = le32_to_cpu(mfw_info->size);
|
||||
|
||||
if (fw_suit->data + fw_suit->size > mfw + mfw_len) {
|
||||
rtw89_err(rtwdev, "fw_suit %d out of address\n", type);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -551,12 +586,17 @@ static u32 rtw89_mfw_get_size(struct rtw89_dev *rtwdev)
|
|||
(const struct rtw89_mfw_hdr *)firmware->data;
|
||||
const struct rtw89_mfw_info *mfw_info;
|
||||
u32 size;
|
||||
int ret;
|
||||
|
||||
if (mfw_hdr->sig != RTW89_MFW_SIG) {
|
||||
rtw89_warn(rtwdev, "not mfw format\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = rtw89_mfw_validate_hdr(rtwdev, firmware, mfw_hdr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
mfw_info = &mfw_hdr->info[mfw_hdr->fw_nr - 1];
|
||||
size = le32_to_cpu(mfw_info->shift) + le32_to_cpu(mfw_info->size);
|
||||
|
||||
|
|
@ -1056,6 +1096,101 @@ int rtw89_build_rfk_log_fmt_from_elm(struct rtw89_dev *rtwdev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool rtw89_regd_entcpy(struct rtw89_regd *regd, const void *cursor,
|
||||
u8 cursor_size)
|
||||
{
|
||||
/* fill default values if needed for backward compatibility */
|
||||
struct rtw89_fw_regd_entry entry = {
|
||||
.rule_2ghz = RTW89_NA,
|
||||
.rule_5ghz = RTW89_NA,
|
||||
.rule_6ghz = RTW89_NA,
|
||||
.fmap = cpu_to_le32(0x0),
|
||||
};
|
||||
u8 valid_size = min_t(u8, sizeof(entry), cursor_size);
|
||||
unsigned int i;
|
||||
u32 fmap;
|
||||
|
||||
memcpy(&entry, cursor, valid_size);
|
||||
memset(regd, 0, sizeof(*regd));
|
||||
|
||||
regd->alpha2[0] = entry.alpha2_0;
|
||||
regd->alpha2[1] = entry.alpha2_1;
|
||||
regd->alpha2[2] = '\0';
|
||||
|
||||
/* also need to consider forward compatibility */
|
||||
regd->txpwr_regd[RTW89_BAND_2G] = entry.rule_2ghz < RTW89_REGD_NUM ?
|
||||
entry.rule_2ghz : RTW89_NA;
|
||||
regd->txpwr_regd[RTW89_BAND_5G] = entry.rule_5ghz < RTW89_REGD_NUM ?
|
||||
entry.rule_5ghz : RTW89_NA;
|
||||
regd->txpwr_regd[RTW89_BAND_6G] = entry.rule_6ghz < RTW89_REGD_NUM ?
|
||||
entry.rule_6ghz : RTW89_NA;
|
||||
|
||||
BUILD_BUG_ON(sizeof(fmap) != sizeof(entry.fmap));
|
||||
BUILD_BUG_ON(sizeof(fmap) * 8 < NUM_OF_RTW89_REGD_FUNC);
|
||||
|
||||
fmap = le32_to_cpu(entry.fmap);
|
||||
for (i = 0; i < NUM_OF_RTW89_REGD_FUNC; i++) {
|
||||
if (fmap & BIT(i))
|
||||
set_bit(i, regd->func_bitmap);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#define rtw89_for_each_in_regd_element(regd, element) \
|
||||
for (const void *cursor = (element)->content, \
|
||||
*end = (element)->content + \
|
||||
le32_to_cpu((element)->num_ents) * (element)->ent_sz; \
|
||||
cursor < end; cursor += (element)->ent_sz) \
|
||||
if (rtw89_regd_entcpy(regd, cursor, (element)->ent_sz))
|
||||
|
||||
static
|
||||
int rtw89_recognize_regd_from_elm(struct rtw89_dev *rtwdev,
|
||||
const struct rtw89_fw_element_hdr *elm,
|
||||
const union rtw89_fw_element_arg arg)
|
||||
{
|
||||
const struct __rtw89_fw_regd_element *regd_elm = &elm->u.regd;
|
||||
struct rtw89_fw_elm_info *elm_info = &rtwdev->fw.elm_info;
|
||||
u32 num_ents = le32_to_cpu(regd_elm->num_ents);
|
||||
struct rtw89_regd_data *p;
|
||||
struct rtw89_regd regd;
|
||||
u32 i = 0;
|
||||
|
||||
if (num_ents > RTW89_REGD_MAX_COUNTRY_NUM) {
|
||||
rtw89_warn(rtwdev,
|
||||
"regd element ents (%d) are over max num (%d)\n",
|
||||
num_ents, RTW89_REGD_MAX_COUNTRY_NUM);
|
||||
rtw89_warn(rtwdev,
|
||||
"regd element ignore and take another/common\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (elm_info->regd) {
|
||||
rtw89_debug(rtwdev, RTW89_DBG_REGD,
|
||||
"regd element take the latter\n");
|
||||
devm_kfree(rtwdev->dev, elm_info->regd);
|
||||
elm_info->regd = NULL;
|
||||
}
|
||||
|
||||
p = devm_kzalloc(rtwdev->dev, struct_size(p, map, num_ents), GFP_KERNEL);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
|
||||
p->nr = num_ents;
|
||||
rtw89_for_each_in_regd_element(®d, regd_elm)
|
||||
p->map[i++] = regd;
|
||||
|
||||
if (i != num_ents) {
|
||||
rtw89_err(rtwdev, "regd element has %d invalid ents\n",
|
||||
num_ents - i);
|
||||
devm_kfree(rtwdev->dev, p);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
elm_info->regd = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct rtw89_fw_element_handler __fw_element_handlers[] = {
|
||||
[RTW89_FW_ELEMENT_ID_BBMCU0] = {__rtw89_fw_recognize_from_elm,
|
||||
{ .fw_type = RTW89_FW_BBMCU0 }, NULL},
|
||||
|
|
@ -1114,6 +1249,9 @@ static const struct rtw89_fw_element_handler __fw_element_handlers[] = {
|
|||
[RTW89_FW_ELEMENT_ID_RFKLOG_FMT] = {
|
||||
rtw89_build_rfk_log_fmt_from_elm, {}, NULL,
|
||||
},
|
||||
[RTW89_FW_ELEMENT_ID_REGD] = {
|
||||
rtw89_recognize_regd_from_elm, {}, "REGD",
|
||||
},
|
||||
};
|
||||
|
||||
int rtw89_fw_recognize_elements(struct rtw89_dev *rtwdev)
|
||||
|
|
@ -2697,7 +2835,9 @@ int rtw89_fw_h2c_lps_ml_cmn_info(struct rtw89_dev *rtwdev,
|
|||
{
|
||||
const struct rtw89_phy_bb_gain_info_be *gain = &rtwdev->bb_gain.be;
|
||||
struct rtw89_pkt_stat *pkt_stat = &rtwdev->phystat.cur_pkt_stat;
|
||||
static const u8 bcn_bw_ofst[] = {0, 0, 0, 3, 6, 9, 0, 12};
|
||||
const struct rtw89_chip_info *chip = rtwdev->chip;
|
||||
struct rtw89_efuse *efuse = &rtwdev->efuse;
|
||||
struct rtw89_h2c_lps_ml_cmn_info *h2c;
|
||||
struct rtw89_vif_link *rtwvif_link;
|
||||
const struct rtw89_chan *chan;
|
||||
|
|
@ -2705,6 +2845,7 @@ int rtw89_fw_h2c_lps_ml_cmn_info(struct rtw89_dev *rtwdev,
|
|||
u32 len = sizeof(*h2c);
|
||||
unsigned int link_id;
|
||||
struct sk_buff *skb;
|
||||
u8 beacon_bw_ofst;
|
||||
u8 gain_band;
|
||||
u32 done;
|
||||
u8 path;
|
||||
|
|
@ -2722,9 +2863,10 @@ int rtw89_fw_h2c_lps_ml_cmn_info(struct rtw89_dev *rtwdev,
|
|||
skb_put(skb, len);
|
||||
h2c = (struct rtw89_h2c_lps_ml_cmn_info *)skb->data;
|
||||
|
||||
h2c->fmt_id = 0x1;
|
||||
h2c->fmt_id = 0x3;
|
||||
|
||||
h2c->mlo_dbcc_mode = cpu_to_le32(rtwdev->mlo_dbcc_mode);
|
||||
h2c->rfe_type = efuse->rfe_type;
|
||||
|
||||
rtw89_vif_for_each_link(rtwvif, rtwvif_link, link_id) {
|
||||
path = rtwvif_link->phy_idx == RTW89_PHY_1 ? RF_PATH_B : RF_PATH_A;
|
||||
|
|
@ -2745,9 +2887,21 @@ int rtw89_fw_h2c_lps_ml_cmn_info(struct rtw89_dev *rtwdev,
|
|||
h2c->tia_gain[rtwvif_link->phy_idx][i] =
|
||||
cpu_to_le16(gain->tia_gain[gain_band][bw_idx][path][i]);
|
||||
}
|
||||
|
||||
if (rtwvif_link->bcn_bw_idx < ARRAY_SIZE(bcn_bw_ofst)) {
|
||||
beacon_bw_ofst = bcn_bw_ofst[rtwvif_link->bcn_bw_idx];
|
||||
h2c->dup_bcn_ofst[rtwvif_link->phy_idx] = beacon_bw_ofst;
|
||||
}
|
||||
|
||||
memcpy(h2c->lna_gain[rtwvif_link->phy_idx],
|
||||
gain->lna_gain[gain_band][bw_idx][path],
|
||||
LNA_GAIN_NUM);
|
||||
memcpy(h2c->tia_lna_op1db[rtwvif_link->phy_idx],
|
||||
gain->tia_lna_op1db[gain_band][bw_idx][path],
|
||||
LNA_GAIN_NUM + 1);
|
||||
memcpy(h2c->lna_op1db[rtwvif_link->phy_idx],
|
||||
gain->lna_op1db[gain_band][bw_idx][path],
|
||||
LNA_GAIN_NUM);
|
||||
}
|
||||
|
||||
rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,
|
||||
|
|
@ -5311,6 +5465,7 @@ int rtw89_fw_h2c_scan_offload_be(struct rtw89_dev *rtwdev,
|
|||
u8 macc_role_size = sizeof(*macc_role) * option->num_macc_role;
|
||||
u8 opch_size = sizeof(*opch) * option->num_opch;
|
||||
u8 probe_id[NUM_NL80211_BANDS];
|
||||
u8 scan_offload_ver = U8_MAX;
|
||||
u8 cfg_len = sizeof(*h2c);
|
||||
unsigned int cond;
|
||||
u8 ver = U8_MAX;
|
||||
|
|
@ -5321,6 +5476,11 @@ int rtw89_fw_h2c_scan_offload_be(struct rtw89_dev *rtwdev,
|
|||
|
||||
rtw89_scan_get_6g_disabled_chan(rtwdev, option);
|
||||
|
||||
if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V0, &rtwdev->fw)) {
|
||||
cfg_len = offsetofend(typeof(*h2c), w8);
|
||||
scan_offload_ver = 0;
|
||||
}
|
||||
|
||||
len = cfg_len + macc_role_size + opch_size;
|
||||
skb = rtw89_fw_h2c_alloc_skb_with_hdr(rtwdev, len);
|
||||
if (!skb) {
|
||||
|
|
@ -5392,10 +5552,8 @@ int rtw89_fw_h2c_scan_offload_be(struct rtw89_dev *rtwdev,
|
|||
RTW89_H2C_SCANOFLD_BE_W8_PROBE_RATE_6GHZ);
|
||||
}
|
||||
|
||||
if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V0, &rtwdev->fw)) {
|
||||
cfg_len = offsetofend(typeof(*h2c), w8);
|
||||
if (scan_offload_ver == 0)
|
||||
goto flex_member;
|
||||
}
|
||||
|
||||
h2c->w9 = le32_encode_bits(sizeof(*h2c) / sizeof(h2c->w0),
|
||||
RTW89_H2C_SCANOFLD_BE_W9_SIZE_CFG) |
|
||||
|
|
@ -5994,24 +6152,29 @@ void rtw89_fw_send_all_early_h2c(struct rtw89_dev *rtwdev)
|
|||
{
|
||||
struct rtw89_early_h2c *early_h2c;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
list_for_each_entry(early_h2c, &rtwdev->early_h2c_list, list) {
|
||||
rtw89_fw_h2c_raw(rtwdev, early_h2c->h2c, early_h2c->h2c_len);
|
||||
}
|
||||
}
|
||||
|
||||
void rtw89_fw_free_all_early_h2c(struct rtw89_dev *rtwdev)
|
||||
void __rtw89_fw_free_all_early_h2c(struct rtw89_dev *rtwdev)
|
||||
{
|
||||
struct rtw89_early_h2c *early_h2c, *tmp;
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
list_for_each_entry_safe(early_h2c, tmp, &rtwdev->early_h2c_list, list) {
|
||||
list_del(&early_h2c->list);
|
||||
kfree(early_h2c->h2c);
|
||||
kfree(early_h2c);
|
||||
}
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
}
|
||||
|
||||
void rtw89_fw_free_all_early_h2c(struct rtw89_dev *rtwdev)
|
||||
{
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
__rtw89_fw_free_all_early_h2c(rtwdev);
|
||||
}
|
||||
|
||||
static void rtw89_fw_c2h_parse_attr(struct sk_buff *c2h)
|
||||
|
|
@ -6055,7 +6218,7 @@ void rtw89_fw_c2h_irqsafe(struct rtw89_dev *rtwdev, struct sk_buff *c2h)
|
|||
|
||||
enqueue:
|
||||
skb_queue_tail(&rtwdev->c2h_queue, c2h);
|
||||
ieee80211_queue_work(rtwdev->hw, &rtwdev->c2h_work);
|
||||
wiphy_work_queue(rtwdev->hw->wiphy, &rtwdev->c2h_work);
|
||||
}
|
||||
|
||||
static void rtw89_fw_c2h_cmd_handle(struct rtw89_dev *rtwdev,
|
||||
|
|
@ -6093,17 +6256,17 @@ static void rtw89_fw_c2h_cmd_handle(struct rtw89_dev *rtwdev,
|
|||
rtw89_hex_dump(rtwdev, RTW89_DBG_FW, "C2H: ", skb->data, skb->len);
|
||||
}
|
||||
|
||||
void rtw89_fw_c2h_work(struct work_struct *work)
|
||||
void rtw89_fw_c2h_work(struct wiphy *wiphy, struct wiphy_work *work)
|
||||
{
|
||||
struct rtw89_dev *rtwdev = container_of(work, struct rtw89_dev,
|
||||
c2h_work);
|
||||
struct sk_buff *skb, *tmp;
|
||||
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
skb_queue_walk_safe(&rtwdev->c2h_queue, skb, tmp) {
|
||||
skb_unlink(skb, &rtwdev->c2h_queue);
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
rtw89_fw_c2h_cmd_handle(rtwdev, skb);
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
dev_kfree_skb_any(skb);
|
||||
}
|
||||
}
|
||||
|
|
@ -6184,7 +6347,7 @@ int rtw89_fw_msg_reg(struct rtw89_dev *rtwdev,
|
|||
u32 ret;
|
||||
|
||||
if (h2c_info && h2c_info->id != RTW89_FWCMD_H2CREG_FUNC_GET_FEATURE)
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
lockdep_assert_wiphy(rtwdev->hw->wiphy);
|
||||
|
||||
if (!h2c_info && !c2h_info)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -1801,17 +1801,21 @@ struct rtw89_h2c_lps_ch_info {
|
|||
|
||||
struct rtw89_h2c_lps_ml_cmn_info {
|
||||
u8 fmt_id;
|
||||
u8 rsvd0[3];
|
||||
u8 rfe_type;
|
||||
u8 rsvd0[2];
|
||||
__le32 mlo_dbcc_mode;
|
||||
u8 central_ch[RTW89_PHY_MAX];
|
||||
u8 pri_ch[RTW89_PHY_MAX];
|
||||
u8 bw[RTW89_PHY_MAX];
|
||||
u8 band[RTW89_PHY_MAX];
|
||||
u8 bcn_rate_type[RTW89_PHY_MAX];
|
||||
u8 central_ch[RTW89_PHY_NUM];
|
||||
u8 pri_ch[RTW89_PHY_NUM];
|
||||
u8 bw[RTW89_PHY_NUM];
|
||||
u8 band[RTW89_PHY_NUM];
|
||||
u8 bcn_rate_type[RTW89_PHY_NUM];
|
||||
u8 rsvd1[2];
|
||||
__le16 tia_gain[RTW89_PHY_MAX][TIA_GAIN_NUM];
|
||||
u8 lna_gain[RTW89_PHY_MAX][LNA_GAIN_NUM];
|
||||
__le16 tia_gain[RTW89_PHY_NUM][TIA_GAIN_NUM];
|
||||
u8 lna_gain[RTW89_PHY_NUM][LNA_GAIN_NUM];
|
||||
u8 rsvd2[2];
|
||||
u8 tia_lna_op1db[RTW89_PHY_NUM][LNA_GAIN_NUM + 1];
|
||||
u8 lna_op1db[RTW89_PHY_NUM][LNA_GAIN_NUM];
|
||||
u8 dup_bcn_ofst[RTW89_PHY_NUM];
|
||||
} __packed;
|
||||
|
||||
static inline void RTW89_SET_FWCMD_CPU_EXCEPTION_TYPE(void *cmd, u32 val)
|
||||
|
|
@ -3882,6 +3886,7 @@ enum rtw89_fw_element_id {
|
|||
RTW89_FW_ELEMENT_ID_TX_SHAPE_LMT_RU = 17,
|
||||
RTW89_FW_ELEMENT_ID_TXPWR_TRK = 18,
|
||||
RTW89_FW_ELEMENT_ID_RFKLOG_FMT = 19,
|
||||
RTW89_FW_ELEMENT_ID_REGD = 20,
|
||||
|
||||
RTW89_FW_ELEMENT_ID_NUM,
|
||||
};
|
||||
|
|
@ -3925,6 +3930,15 @@ struct __rtw89_fw_txpwr_element {
|
|||
u8 content[];
|
||||
} __packed;
|
||||
|
||||
struct __rtw89_fw_regd_element {
|
||||
u8 rsvd0;
|
||||
u8 rsvd1;
|
||||
u8 rsvd2;
|
||||
u8 ent_sz;
|
||||
__le32 num_ents;
|
||||
u8 content[];
|
||||
} __packed;
|
||||
|
||||
enum rtw89_fw_txpwr_trk_type {
|
||||
__RTW89_FW_TXPWR_TRK_TYPE_6GHZ_START = 0,
|
||||
RTW89_FW_TXPWR_TRK_TYPE_6GB_N = 0,
|
||||
|
|
@ -4016,6 +4030,7 @@ struct rtw89_fw_element_hdr {
|
|||
__le16 offset[];
|
||||
} __packed rfk_log_fmt;
|
||||
struct __rtw89_fw_txpwr_element txpwr;
|
||||
struct __rtw89_fw_regd_element regd;
|
||||
} __packed u;
|
||||
} __packed;
|
||||
|
||||
|
|
@ -4588,7 +4603,7 @@ int rtw89_fw_h2c_dctl_sec_cam_v2(struct rtw89_dev *rtwdev,
|
|||
struct rtw89_vif_link *rtwvif_link,
|
||||
struct rtw89_sta_link *rtwsta_link);
|
||||
void rtw89_fw_c2h_irqsafe(struct rtw89_dev *rtwdev, struct sk_buff *c2h);
|
||||
void rtw89_fw_c2h_work(struct work_struct *work);
|
||||
void rtw89_fw_c2h_work(struct wiphy *wiphy, struct wiphy_work *work);
|
||||
int rtw89_fw_h2c_role_maintain(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_vif_link *rtwvif_link,
|
||||
struct rtw89_sta_link *rtwsta_link,
|
||||
|
|
@ -4654,6 +4669,7 @@ int rtw89_fw_h2c_raw_with_hdr(struct rtw89_dev *rtwdev,
|
|||
bool rack, bool dack);
|
||||
int rtw89_fw_h2c_raw(struct rtw89_dev *rtwdev, const u8 *buf, u16 len);
|
||||
void rtw89_fw_send_all_early_h2c(struct rtw89_dev *rtwdev);
|
||||
void __rtw89_fw_free_all_early_h2c(struct rtw89_dev *rtwdev);
|
||||
void rtw89_fw_free_all_early_h2c(struct rtw89_dev *rtwdev);
|
||||
int rtw89_fw_h2c_general_pkt(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link,
|
||||
u8 macid);
|
||||
|
|
@ -4874,6 +4890,18 @@ int rtw89_chip_h2c_ba_cam(struct rtw89_dev *rtwdev, struct rtw89_sta *rtwsta,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Must consider compatibility; don't insert new in the mid.
|
||||
* Fill each field's default value in rtw89_regd_entcpy().
|
||||
*/
|
||||
struct rtw89_fw_regd_entry {
|
||||
u8 alpha2_0;
|
||||
u8 alpha2_1;
|
||||
u8 rule_2ghz;
|
||||
u8 rule_5ghz;
|
||||
u8 rule_6ghz;
|
||||
__le32 fmap;
|
||||
} __packed;
|
||||
|
||||
/* must consider compatibility; don't insert new in the mid */
|
||||
struct rtw89_fw_txpwr_byrate_entry {
|
||||
u8 band;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user