]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: ath12k: remove unused variable monitor_flags
authorKang Yang <quic_kangyang@quicinc.com>
Mon, 29 Apr 2024 08:15:21 +0000 (16:15 +0800)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 7 May 2024 10:18:23 +0000 (13:18 +0300)
monitor_flags is defined in struct ath12k. Although it is changed in
some places, but it is not actually used.

So remove related code.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240429081525.983-2-quic_kangyang@quicinc.com
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/mac.c

index 3cfc65b36579770a7fc8be56eb07e23a41db6887..bb6c1b562baf6807d18780072bcf671659fd458d 100644 (file)
@@ -212,10 +212,6 @@ enum ath12k_dev_flags {
        ATH12K_FLAG_EXT_IRQ_ENABLED,
 };
 
-enum ath12k_monitor_flags {
-       ATH12K_FLAG_MONITOR_ENABLED,
-};
-
 struct ath12k_tx_conf {
        bool changed;
        u16 ac;
@@ -532,7 +528,6 @@ struct ath12k {
 
        unsigned long dev_flags;
        unsigned int filter_flags;
-       unsigned long monitor_flags;
        u32 min_tx_power;
        u32 max_tx_power;
        u32 txpower_limit_2g;
index 4f07ac8c0287c233bf4d0887a9fdc34a44290219..a2b5aa86ec0b8e50d949e369a22eb93b4759b373 100644 (file)
@@ -6510,7 +6510,6 @@ err_vdev_del:
 
        /* Recalc txpower for remaining vdev */
        ath12k_mac_txpower_recalc(ar);
-       clear_bit(ATH12K_FLAG_MONITOR_ENABLED, &ar->monitor_flags);
 
        /* TODO: recal traffic pause state based on the available vdevs */
        arvif->is_created = false;
@@ -6581,15 +6580,9 @@ static void ath12k_mac_configure_filter(struct ath12k *ar,
        reset_flag = !(ar->filter_flags & FIF_BCN_PRBRESP_PROMISC);
 
        ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, reset_flag);
-       if (!ret) {
-               if (!reset_flag)
-                       set_bit(ATH12K_FLAG_MONITOR_ENABLED, &ar->monitor_flags);
-               else
-                       clear_bit(ATH12K_FLAG_MONITOR_ENABLED, &ar->monitor_flags);
-       } else {
+       if (ret)
                ath12k_warn(ar->ab,
                            "fail to set monitor filter: %d\n", ret);
-       }
 
        ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
                   "total_flags:0x%x, reset_flag:%d\n",
@@ -8869,7 +8862,6 @@ static void ath12k_mac_setup(struct ath12k *ar)
 
        INIT_WORK(&ar->wmi_mgmt_tx_work, ath12k_mgmt_over_wmi_tx_work);
        skb_queue_head_init(&ar->wmi_mgmt_tx_queue);
-       clear_bit(ATH12K_FLAG_MONITOR_ENABLED, &ar->monitor_flags);
 }
 
 int ath12k_mac_register(struct ath12k_base *ab)