}
  }
  
 +static bool iwl_mvm_use_host_rate(struct iwl_mvm *mvm,
 +                                struct iwl_mvm_sta *mvmsta,
 +                                struct ieee80211_hdr *hdr,
 +                                struct ieee80211_tx_info *info)
 +{
 +      if (unlikely(!mvmsta))
 +              return true;
 +
 +      if (unlikely(info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT))
 +              return true;
 +
 +      if (likely(ieee80211_is_data(hdr->frame_control) &&
 +                 mvmsta->sta_state >= IEEE80211_STA_AUTHORIZED))
 +              return false;
 +
 +      /*
 +       * Not a data frame, use host rate if on an old device that
 +       * can't possibly be doing MLO (firmware may be selecting a
 +       * bad rate), if we might be doing MLO we need to let FW pick
 +       * (since we don't necesarily know the link), but FW rate
 +       * selection was fixed.
 +       */
 +      return mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ;
 +}
 +
+ static void iwl_mvm_copy_hdr(void *cmd, const void *hdr, int hdrlen,
+                            const u8 *addr3_override)
+ {
+       struct ieee80211_hdr *out_hdr = cmd;
+ 
+       memcpy(cmd, hdr, hdrlen);
+       if (addr3_override)
+               memcpy(out_hdr->addr3, addr3_override, ETH_ALEN);
+ }
+ 
  /*
   * Allocates and sets the Tx cmd the driver data pointers in the skb
   */