Skip to content

Commit dccf87e

Browse files
committed
Johannes Berg says: ==================== More fixes: - ath12k - avoid busy-waiting - activate correct number of links - iwlwifi - iwldvm regression (lots of warnings) - iwlmld merge damage regression (crash) - fix build with some old gcc versions - carl9170: don't talk to device w/o FW [syzbot] - ath6kl: remove bad FW WARN [syzbot] - ieee80211: use variable-length arrays [syzbot] - mac80211 - remove WARN on delayed beacon update [syzbot] - drop OCB frames with invalid source [syzbot] * tag 'wireless-2025-06-18' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: Fix incorrect logic on cmd_ver range checking wifi: iwlwifi: dvm: restore n_no_reclaim_cmds setting wifi: iwlwifi: cfg: Limit cb_size to valid range wifi: iwlwifi: restore missing initialization of async_handlers_list (again) wifi: ath6kl: remove WARN on bad firmware input wifi: carl9170: do not ping device which has failed to load firmware wifi: ath12k: don't wait when there is no vdev started wifi: ath12k: don't use static variables in ath12k_wmi_fw_stats_process() wifi: ath12k: avoid burning CPU while waiting for firmware stats wifi: ath12k: fix documentation on firmware stats wifi: ath12k: don't activate more links than firmware supports wifi: ath12k: update link active in case two links fall on the same MAC wifi: ath12k: support WMI_MLO_LINK_SET_ACTIVE_CMDID command wifi: ath12k: update freq range for each hardware mode wifi: ath12k: parse and save sbs_lower_band_end_freq from WMI_SERVICE_READY_EXT2_EVENTID event wifi: ath12k: parse and save hardware mode info from WMI_SERVICE_READY_EXT_EVENTID event for later use wifi: ath12k: Avoid CPU busy-wait by handling VDEV_STAT and BCN_STAT wifi: mac80211: don't WARN for late channel/color switch wifi: mac80211: drop invalid source address OCB frames wifi: remove zero-length arrays ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 9738280 + 68dd8ee commit dccf87e

File tree

18 files changed

+1445
-133
lines changed

18 files changed

+1445
-133
lines changed

drivers/net/wireless/ath/ath12k/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,7 @@ void ath12k_fw_stats_init(struct ath12k *ar)
12161216
INIT_LIST_HEAD(&ar->fw_stats.pdevs);
12171217
INIT_LIST_HEAD(&ar->fw_stats.bcn);
12181218
init_completion(&ar->fw_stats_complete);
1219+
init_completion(&ar->fw_stats_done);
12191220
}
12201221

12211222
void ath12k_fw_stats_free(struct ath12k_fw_stats *stats)
@@ -1228,8 +1229,9 @@ void ath12k_fw_stats_free(struct ath12k_fw_stats *stats)
12281229
void ath12k_fw_stats_reset(struct ath12k *ar)
12291230
{
12301231
spin_lock_bh(&ar->data_lock);
1231-
ar->fw_stats.fw_stats_done = false;
12321232
ath12k_fw_stats_free(&ar->fw_stats);
1233+
ar->fw_stats.num_vdev_recvd = 0;
1234+
ar->fw_stats.num_bcn_recvd = 0;
12331235
spin_unlock_bh(&ar->data_lock);
12341236
}
12351237

drivers/net/wireless/ath/ath12k/core.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,12 @@ struct ath12k_sta {
601601
#define ATH12K_NUM_CHANS 101
602602
#define ATH12K_MAX_5GHZ_CHAN 173
603603

604+
static inline bool ath12k_is_2ghz_channel_freq(u32 freq)
605+
{
606+
return freq >= ATH12K_MIN_2GHZ_FREQ &&
607+
freq <= ATH12K_MAX_2GHZ_FREQ;
608+
}
609+
604610
enum ath12k_hw_state {
605611
ATH12K_HW_STATE_OFF,
606612
ATH12K_HW_STATE_ON,
@@ -626,7 +632,8 @@ struct ath12k_fw_stats {
626632
struct list_head pdevs;
627633
struct list_head vdevs;
628634
struct list_head bcn;
629-
bool fw_stats_done;
635+
u32 num_vdev_recvd;
636+
u32 num_bcn_recvd;
630637
};
631638

632639
struct ath12k_dbg_htt_stats {
@@ -806,6 +813,7 @@ struct ath12k {
806813
bool regdom_set_by_user;
807814

808815
struct completion fw_stats_complete;
816+
struct completion fw_stats_done;
809817

810818
struct completion mlo_setup_done;
811819
u32 mlo_setup_status;

drivers/net/wireless/ath/ath12k/debugfs.c

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,64 +1251,6 @@ void ath12k_debugfs_soc_destroy(struct ath12k_base *ab)
12511251
*/
12521252
}
12531253

1254-
void
1255-
ath12k_debugfs_fw_stats_process(struct ath12k *ar,
1256-
struct ath12k_fw_stats *stats)
1257-
{
1258-
struct ath12k_base *ab = ar->ab;
1259-
struct ath12k_pdev *pdev;
1260-
bool is_end;
1261-
static unsigned int num_vdev, num_bcn;
1262-
size_t total_vdevs_started = 0;
1263-
int i;
1264-
1265-
if (stats->stats_id == WMI_REQUEST_VDEV_STAT) {
1266-
if (list_empty(&stats->vdevs)) {
1267-
ath12k_warn(ab, "empty vdev stats");
1268-
return;
1269-
}
1270-
/* FW sends all the active VDEV stats irrespective of PDEV,
1271-
* hence limit until the count of all VDEVs started
1272-
*/
1273-
rcu_read_lock();
1274-
for (i = 0; i < ab->num_radios; i++) {
1275-
pdev = rcu_dereference(ab->pdevs_active[i]);
1276-
if (pdev && pdev->ar)
1277-
total_vdevs_started += pdev->ar->num_started_vdevs;
1278-
}
1279-
rcu_read_unlock();
1280-
1281-
is_end = ((++num_vdev) == total_vdevs_started);
1282-
1283-
list_splice_tail_init(&stats->vdevs,
1284-
&ar->fw_stats.vdevs);
1285-
1286-
if (is_end) {
1287-
ar->fw_stats.fw_stats_done = true;
1288-
num_vdev = 0;
1289-
}
1290-
return;
1291-
}
1292-
if (stats->stats_id == WMI_REQUEST_BCN_STAT) {
1293-
if (list_empty(&stats->bcn)) {
1294-
ath12k_warn(ab, "empty beacon stats");
1295-
return;
1296-
}
1297-
/* Mark end until we reached the count of all started VDEVs
1298-
* within the PDEV
1299-
*/
1300-
is_end = ((++num_bcn) == ar->num_started_vdevs);
1301-
1302-
list_splice_tail_init(&stats->bcn,
1303-
&ar->fw_stats.bcn);
1304-
1305-
if (is_end) {
1306-
ar->fw_stats.fw_stats_done = true;
1307-
num_bcn = 0;
1308-
}
1309-
}
1310-
}
1311-
13121254
static int ath12k_open_vdev_stats(struct inode *inode, struct file *file)
13131255
{
13141256
struct ath12k *ar = inode->i_private;

drivers/net/wireless/ath/ath12k/debugfs.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ void ath12k_debugfs_soc_create(struct ath12k_base *ab);
1212
void ath12k_debugfs_soc_destroy(struct ath12k_base *ab);
1313
void ath12k_debugfs_register(struct ath12k *ar);
1414
void ath12k_debugfs_unregister(struct ath12k *ar);
15-
void ath12k_debugfs_fw_stats_process(struct ath12k *ar,
16-
struct ath12k_fw_stats *stats);
1715
void ath12k_debugfs_op_vif_add(struct ieee80211_hw *hw,
1816
struct ieee80211_vif *vif);
1917
void ath12k_debugfs_pdev_create(struct ath12k_base *ab);
@@ -126,11 +124,6 @@ static inline void ath12k_debugfs_unregister(struct ath12k *ar)
126124
{
127125
}
128126

129-
static inline void ath12k_debugfs_fw_stats_process(struct ath12k *ar,
130-
struct ath12k_fw_stats *stats)
131-
{
132-
}
133-
134127
static inline bool ath12k_debugfs_is_extd_rx_stats_enabled(struct ath12k *ar)
135128
{
136129
return false;

0 commit comments

Comments
 (0)