mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 10:20:17 -04:00
wifi: ath12k: Add num_stations counter for each interface
Currently, ath12k driver maintains a counter to store the number of stations connected to each radio. However, at certain times like debugging, it is useful to know number of stations connected to any one of the interface in that radio. Add support to maintain a counter for number of stations connected to each interface. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20250630044531.3490058-1-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
committed by
Jeff Johnson
parent
acab697c32
commit
a1bff3d6cc
@@ -349,6 +349,7 @@ struct ath12k_link_vif {
|
||||
bool group_key_valid;
|
||||
struct wmi_vdev_install_key_arg group_key;
|
||||
bool pairwise_key_done;
|
||||
u16 num_stations;
|
||||
};
|
||||
|
||||
struct ath12k_vif {
|
||||
|
||||
@@ -3858,6 +3858,8 @@ static void ath12k_mac_init_arvif(struct ath12k_vif *ahvif,
|
||||
INIT_DELAYED_WORK(&arvif->connection_loss_work,
|
||||
ath12k_mac_vif_sta_connection_loss_work);
|
||||
|
||||
arvif->num_stations = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(arvif->bitrate_mask.control); i++) {
|
||||
arvif->bitrate_mask.control[i].legacy = 0xffffffff;
|
||||
arvif->bitrate_mask.control[i].gi = NL80211_TXRATE_DEFAULT_GI;
|
||||
@@ -6168,6 +6170,11 @@ static int ath12k_mac_inc_num_stations(struct ath12k_link_vif *arvif,
|
||||
return -ENOBUFS;
|
||||
|
||||
ar->num_stations++;
|
||||
arvif->num_stations++;
|
||||
|
||||
ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
"mac station %pM connected to vdev %u num_stations %u\n",
|
||||
arsta->addr, arvif->vdev_id, arvif->num_stations);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -6184,6 +6191,17 @@ static void ath12k_mac_dec_num_stations(struct ath12k_link_vif *arvif,
|
||||
return;
|
||||
|
||||
ar->num_stations--;
|
||||
|
||||
if (arvif->num_stations) {
|
||||
arvif->num_stations--;
|
||||
ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
"mac station %pM disconnected from vdev %u num_stations %u\n",
|
||||
arsta->addr, arvif->vdev_id, arvif->num_stations);
|
||||
} else {
|
||||
ath12k_warn(ar->ab,
|
||||
"mac station %pM disconnect for vdev %u without any connected station\n",
|
||||
arsta->addr, arvif->vdev_id);
|
||||
}
|
||||
}
|
||||
|
||||
static void ath12k_mac_station_post_remove(struct ath12k *ar,
|
||||
|
||||
Reference in New Issue
Block a user