]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: iwlwifi: mld: set RX_FLAG_RADIOTAP_TLV_AT_END generically
authorJohannes Berg <johannes.berg@intel.com>
Sat, 21 Mar 2026 17:29:22 +0000 (19:29 +0200)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 25 Mar 2026 09:31:58 +0000 (11:31 +0200)
Instead of setting this flag in the iwl_mld_radiotap_put_tlv()
users, and not even all of them, set it inside the function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.31eff369ccf2.If5cee8f7c767b937891abb6cccf2692068ba7758@changeid
drivers/net/wireless/intel/iwlwifi/mld/rx.c

index 6f40d6e47083e5d60ec8f4efb82d7f30c005f014..a2e586c6ea673b4b8c9ed12b8a3eb8d239625190 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2024-2025 Intel Corporation
+ * Copyright (C) 2024-2026 Intel Corporation
  */
 
 #include <net/mac80211.h>
@@ -791,6 +791,9 @@ static void *
 iwl_mld_radiotap_put_tlv(struct sk_buff *skb, u16 type, u16 len)
 {
        struct ieee80211_radiotap_tlv *tlv;
+       struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
+
+       rx_status->flag |= RX_FLAG_RADIOTAP_TLV_AT_END;
 
        tlv = skb_put(skb, sizeof(*tlv));
        tlv->type = cpu_to_le16(type);
@@ -1234,8 +1237,6 @@ static void iwl_mld_rx_eht(struct iwl_mld *mld, struct sk_buff *skb,
 
        eht = iwl_mld_radiotap_put_tlv(skb, IEEE80211_RADIOTAP_EHT, eht_len);
 
-       rx_status->flag |= RX_FLAG_RADIOTAP_TLV_AT_END;
-
        switch (u32_get_bits(rate_n_flags, RATE_MCS_HE_GI_LTF_MSK)) {
        case 0:
                if (he_type == RATE_MCS_HE_TYPE_TRIG) {
@@ -1329,7 +1330,6 @@ static void iwl_mld_rx_eht(struct iwl_mld *mld, struct sk_buff *skb,
 static void iwl_mld_add_rtap_sniffer_config(struct iwl_mld *mld,
                                            struct sk_buff *skb)
 {
-       struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
        struct ieee80211_radiotap_vendor_content *radiotap;
        const u16 vendor_data_len = sizeof(mld->monitor.cur_aid);
 
@@ -1353,8 +1353,6 @@ static void iwl_mld_add_rtap_sniffer_config(struct iwl_mld *mld,
        /* fill the data now */
        memcpy(radiotap->data, &mld->monitor.cur_aid,
               sizeof(mld->monitor.cur_aid));
-
-       rx_status->flag |= RX_FLAG_RADIOTAP_TLV_AT_END;
 }
 #endif
 
@@ -1362,7 +1360,6 @@ static void iwl_mld_add_rtap_sniffer_phy_data(struct iwl_mld *mld,
                                              struct sk_buff *skb,
                                              struct iwl_rx_phy_air_sniffer_ntfy *ntfy)
 {
-       struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
        struct ieee80211_radiotap_vendor_content *radiotap;
        const u16 vendor_data_len = sizeof(*ntfy);
 
@@ -1382,8 +1379,6 @@ static void iwl_mld_add_rtap_sniffer_phy_data(struct iwl_mld *mld,
 
        /* fill the data now */
        memcpy(radiotap->data, ntfy, vendor_data_len);
-
-       rx_status->flag |= RX_FLAG_RADIOTAP_TLV_AT_END;
 }
 
 static void