From 1eb2ac4a9f3f615181c83a5853c5ea9332d93e8c Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Wed, 20 Mar 2024 20:24:48 +0200 Subject: wifi: wcn36xx: main: fix sparse warnings Sparse warns: drivers/net/wireless/ath/wcn36xx/main.c:758:58: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/wcn36xx/main.c:758:58: expected unsigned short [usertype] vht_rx_mcs_map drivers/net/wireless/ath/wcn36xx/main.c:758:58: got restricted __le16 [usertype] rx_mcs_map drivers/net/wireless/ath/wcn36xx/main.c:760:58: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/wcn36xx/main.c:760:58: expected unsigned short [usertype] vht_tx_mcs_map drivers/net/wireless/ath/wcn36xx/main.c:760:58: got restricted __le16 [usertype] tx_mcs_map le16_to_cpu() was just missing. Compile tested only. Signed-off-by: Kalle Valo Link: https://msgid.link/20240320182449.3757215-4-kvalo@kernel.org --- drivers/net/wireless/ath/wcn36xx/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index bfbd3c7a70b3..e760d8002e09 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -756,9 +756,9 @@ static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, if (sta->deflink.vht_cap.vht_supported) { sta_priv->supported_rates.op_rate_mode = STA_11ac; sta_priv->supported_rates.vht_rx_mcs_map = - sta->deflink.vht_cap.vht_mcs.rx_mcs_map; + le16_to_cpu(sta->deflink.vht_cap.vht_mcs.rx_mcs_map); sta_priv->supported_rates.vht_tx_mcs_map = - sta->deflink.vht_cap.vht_mcs.tx_mcs_map; + le16_to_cpu(sta->deflink.vht_cap.vht_mcs.tx_mcs_map); } } -- cgit v1.2.3