}
 
        arsta->txrate.nss = arsta->last_txrate.nss;
-       arsta->txrate.bw = ts->bw;
+       arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(ts->bw);
 
        ath11k_accumulate_per_peer_tx_stats(arsta, peer_stats, rate_idx);
        spin_unlock_bh(&ab->base_lock);
 
        return 0;
 }
 
-static u8 ath11k_bw_to_mac80211_bw(u8 bw)
-{
-       u8 ret = 0;
-
-       switch (bw) {
-       case ATH11K_BW_20:
-               ret = RATE_INFO_BW_20;
-               break;
-       case ATH11K_BW_40:
-               ret = RATE_INFO_BW_40;
-               break;
-       case ATH11K_BW_80:
-               ret = RATE_INFO_BW_80;
-               break;
-       case ATH11K_BW_160:
-               ret = RATE_INFO_BW_160;
-               break;
-       }
-
-       return ret;
-}
-
 static u32 ath11k_bw_to_mac80211_bwflags(u8 bw)
 {
        u32 bwflags = 0;
        }
 
        arsta->txrate.nss = nss;
-       arsta->txrate.bw = ath11k_bw_to_mac80211_bw(bw);
+       arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(bw);
        arsta->tx_info.status.rates[0].flags |= ath11k_bw_to_mac80211_bwflags(bw);
 
        memcpy(&arsta->last_txrate, &arsta->txrate, sizeof(struct rate_info));
                rx_status->rate_idx = rate_mcs + (8 * (nss - 1));
                if (sgi)
                        rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
-               rx_status->bw = ath11k_bw_to_mac80211_bw(bw);
+               rx_status->bw = ath11k_mac_bw_to_mac80211_bw(bw);
                break;
        case RX_MSDU_START_PKT_TYPE_11AC:
                rx_status->encoding = RX_ENC_VHT;
                rx_status->nss = nss;
                if (sgi)
                        rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
-               rx_status->bw = ath11k_bw_to_mac80211_bw(bw);
+               rx_status->bw = ath11k_mac_bw_to_mac80211_bw(bw);
                break;
        case RX_MSDU_START_PKT_TYPE_11AX:
                rx_status->rate_idx = rate_mcs;
                }
                rx_status->encoding = RX_ENC_HE;
                rx_status->nss = nss;
-               rx_status->bw = ath11k_bw_to_mac80211_bw(bw);
+               rx_status->bw = ath11k_mac_bw_to_mac80211_bw(bw);
                break;
        }
 }
 
        [WLAN_HT_CAP_SM_PS_DISABLED] = WMI_PEER_SMPS_PS_NONE,
 };
 
+u8 ath11k_mac_bw_to_mac80211_bw(u8 bw)
+{
+       u8 ret = 0;
+
+       switch (bw) {
+       case ATH11K_BW_20:
+               ret = RATE_INFO_BW_20;
+               break;
+       case ATH11K_BW_40:
+               ret = RATE_INFO_BW_40;
+               break;
+       case ATH11K_BW_80:
+               ret = RATE_INFO_BW_80;
+               break;
+       case ATH11K_BW_160:
+               ret = RATE_INFO_BW_160;
+               break;
+       }
+
+       return ret;
+}
+
 int ath11k_mac_hw_ratecode_to_legacy_rate(u8 hw_rc, u8 preamble, u8 *rateidx,
                                          u16 *rate)
 {
 
 void ath11k_mac_drain_tx(struct ath11k *ar);
 void ath11k_mac_peer_cleanup_all(struct ath11k *ar);
 int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx);
+u8 ath11k_mac_bw_to_mac80211_bw(u8 bw);
 #endif