Skip to content

Commit

Permalink
wifi: wcn36xx: main: fix sparse warnings
Browse files Browse the repository at this point in the history
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 <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320182449.3757215-4-kvalo@kernel.org
  • Loading branch information
Kalle Valo committed Mar 25, 2024
1 parent fba5295 commit 1eb2ac4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/wcn36xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 1eb2ac4

Please sign in to comment.