Message ID | 20250303221843.1809753-5-quic_ramess@quicinc.com |
---|---|
State | Superseded |
Headers | show |
Series | wifi: cfg80211: update EML capabilities of an ML Station | expand |
On 3/3/2025 2:18 PM, Rameshkumar Sundaram wrote: > From: Ramasamy Kaliappan <quic_rkaliapp@quicinc.com> ... > + if (u16_get_bits(eml_cap, IEEE80211_EML_CAP_EMLSR_SUPP)) { > + /* Padding delay */ > + eml_delay = ieee80211_emlsr_pad_delay_in_us(eml_cap); > + ml_params->emlsr_padding_delay_us = cpu_to_le32(eml_delay); > + /* Transition delay */ > + eml_delay = ieee80211_emlsr_trans_delay_in_us(eml_cap); > + ml_params->emlsr_trans_delay_us = cpu_to_le32(eml_delay); > + /* Transition timeout */ > + eml_trans_timeout = ieee80211_eml_trans_timeout_in_us(eml_cap); > + ml_params->emlsr_trans_timeout_us = cpu_to_le32(eml_trans_timeout); > + ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi peer (%pM) emlsr padding delay %u, trans delay %u trans timeout %u", > + arg->peer_mac, ml_params->emlsr_padding_delay_us, > + ml_params->emlsr_trans_delay_us, > + ml_params->emlsr_trans_timeout_us); it seems wrong to print the values converted to LE if the host is BE. suggest instead you cache all 3 host values and print those instead. /jeff
On 3/4/2025 5:03 AM, Jeff Johnson wrote: > On 3/3/2025 2:18 PM, Rameshkumar Sundaram wrote: >> From: Ramasamy Kaliappan <quic_rkaliapp@quicinc.com> > ... >> + if (u16_get_bits(eml_cap, IEEE80211_EML_CAP_EMLSR_SUPP)) { >> + /* Padding delay */ >> + eml_delay = ieee80211_emlsr_pad_delay_in_us(eml_cap); >> + ml_params->emlsr_padding_delay_us = cpu_to_le32(eml_delay); >> + /* Transition delay */ >> + eml_delay = ieee80211_emlsr_trans_delay_in_us(eml_cap); >> + ml_params->emlsr_trans_delay_us = cpu_to_le32(eml_delay); >> + /* Transition timeout */ >> + eml_trans_timeout = ieee80211_eml_trans_timeout_in_us(eml_cap); >> + ml_params->emlsr_trans_timeout_us = cpu_to_le32(eml_trans_timeout); >> + ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi peer (%pM) emlsr padding delay %u, trans delay %u trans timeout %u", >> + arg->peer_mac, ml_params->emlsr_padding_delay_us, >> + ml_params->emlsr_trans_delay_us, >> + ml_params->emlsr_trans_timeout_us); > > it seems wrong to print the values converted to LE if the host is BE. > suggest instead you cache all 3 host values and print those instead. > Sure Jeff, will add separate variables and use them in print statement.
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 2d062b5904a8..91aca62e3589 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -3057,6 +3057,7 @@ static void ath12k_peer_assoc_h_mlo(struct ath12k_link_sta *arsta, ml->ml_peer_id = ahsta->ml_peer_id; ml->ieee_link_id = arsta->link_id; ml->num_partner_links = 0; + ml->eml_cap = sta->eml_cap; links = ahsta->links_map; rcu_read_lock(); diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 4dd6cdf84571..625d5a0c9453 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -2107,8 +2107,9 @@ int ath12k_wmi_send_peer_assoc_cmd(struct ath12k *ar, struct wmi_tlv *tlv; void *ptr; u32 peer_legacy_rates_align; - u32 peer_ht_rates_align; + u32 peer_ht_rates_align, eml_delay, eml_trans_timeout; int i, ret, len; + u16 eml_cap; __le32 v; peer_legacy_rates_align = roundup(arg->peer_legacy_rates.num_rates, @@ -2280,6 +2281,24 @@ int ath12k_wmi_send_peer_assoc_cmd(struct ath12k *ar, ml_params->logical_link_idx = cpu_to_le32(arg->ml.logical_link_idx); ml_params->ml_peer_id = cpu_to_le32(arg->ml.ml_peer_id); ml_params->ieee_link_id = cpu_to_le32(arg->ml.ieee_link_id); + + eml_cap = arg->ml.eml_cap; + if (u16_get_bits(eml_cap, IEEE80211_EML_CAP_EMLSR_SUPP)) { + /* Padding delay */ + eml_delay = ieee80211_emlsr_pad_delay_in_us(eml_cap); + ml_params->emlsr_padding_delay_us = cpu_to_le32(eml_delay); + /* Transition delay */ + eml_delay = ieee80211_emlsr_trans_delay_in_us(eml_cap); + ml_params->emlsr_trans_delay_us = cpu_to_le32(eml_delay); + /* Transition timeout */ + eml_trans_timeout = ieee80211_eml_trans_timeout_in_us(eml_cap); + ml_params->emlsr_trans_timeout_us = cpu_to_le32(eml_trans_timeout); + ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi peer (%pM) emlsr padding delay %u, trans delay %u trans timeout %u", + arg->peer_mac, ml_params->emlsr_padding_delay_us, + ml_params->emlsr_trans_delay_us, + ml_params->emlsr_trans_timeout_us); + } + ptr += sizeof(*ml_params); skip_ml_params: diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h index b6a197389277..060bf097d4f5 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h @@ -3718,6 +3718,7 @@ struct peer_assoc_mlo_params { u32 ieee_link_id; u8 num_partner_links; struct wmi_ml_partner_info partner_info[ATH12K_WMI_MLO_MAX_LINKS]; + u16 eml_cap; }; struct wmi_rate_set_arg {