mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 01:49:20 -04:00
wifi: ath12k: relocate ath12k_mac_ieee80211_sta_bw_to_wmi()
An upcoming change will invoke ath12k_mac_ieee80211_sta_bw_to_wmi() from a line located above its current definition. Hence, relocate it to above so that it can be invoked later on. No functionality changes. Compile tested only. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Acked-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Link: https://patch.msgid.link/20250110-fix_link_sta_bandwidth_update-v1-1-61b6f3ef2ea3@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
committed by
Jeff Johnson
parent
268c73d470
commit
090c645b2a
@@ -3218,6 +3218,37 @@ static int ath12k_setup_peer_smps(struct ath12k *ar, struct ath12k_link_vif *arv
|
||||
ath12k_smps_map[smps]);
|
||||
}
|
||||
|
||||
static u32 ath12k_mac_ieee80211_sta_bw_to_wmi(struct ath12k *ar,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
u32 bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
|
||||
switch (sta->deflink.bandwidth) {
|
||||
case IEEE80211_STA_RX_BW_20:
|
||||
bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_40:
|
||||
bw = WMI_PEER_CHWIDTH_40MHZ;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_80:
|
||||
bw = WMI_PEER_CHWIDTH_80MHZ;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_160:
|
||||
bw = WMI_PEER_CHWIDTH_160MHZ;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_320:
|
||||
bw = WMI_PEER_CHWIDTH_320MHZ;
|
||||
break;
|
||||
default:
|
||||
ath12k_warn(ar->ab, "Invalid bandwidth %d in rc update for %pM\n",
|
||||
sta->deflink.bandwidth, sta->addr);
|
||||
bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
break;
|
||||
}
|
||||
|
||||
return bw;
|
||||
}
|
||||
|
||||
static void ath12k_bss_assoc(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
@@ -5495,37 +5526,6 @@ static int ath12k_mac_station_add(struct ath12k *ar,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u32 ath12k_mac_ieee80211_sta_bw_to_wmi(struct ath12k *ar,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
u32 bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
|
||||
switch (sta->deflink.bandwidth) {
|
||||
case IEEE80211_STA_RX_BW_20:
|
||||
bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_40:
|
||||
bw = WMI_PEER_CHWIDTH_40MHZ;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_80:
|
||||
bw = WMI_PEER_CHWIDTH_80MHZ;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_160:
|
||||
bw = WMI_PEER_CHWIDTH_160MHZ;
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_320:
|
||||
bw = WMI_PEER_CHWIDTH_320MHZ;
|
||||
break;
|
||||
default:
|
||||
ath12k_warn(ar->ab, "Invalid bandwidth %d in rc update for %pM\n",
|
||||
sta->deflink.bandwidth, sta->addr);
|
||||
bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
break;
|
||||
}
|
||||
|
||||
return bw;
|
||||
}
|
||||
|
||||
static int ath12k_mac_assign_link_sta(struct ath12k_hw *ah,
|
||||
struct ath12k_sta *ahsta,
|
||||
struct ath12k_link_sta *arsta,
|
||||
|
||||
Reference in New Issue
Block a user