From: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx> Sparse reported below warning >> drivers/net/wireless/microchip/wilc1000/cfg80211.c:361:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int key_mgmt_suite @@ got restricted __be32 [usertype] @@ 'key_mgmt_suite' value is expected in big-endian format. After receiving mgmt_suite value from wpa_s convert to cpu endianness because the same value is return back using cfg80211_external_auth_request(). Use be32_to_cpu() conversion API to avoid the sparse warning. Reported-by: kernel test robot <lkp@xxxxxxxxx> Fixes: c5b331d4f550fb78 ("wifi: wilc1000: add WPA3 SAE support") Signed-off-by: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx> --- drivers/net/wireless/microchip/wilc1000/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c index 5c2c7f1dbffd..19862d932f1f 100644 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c @@ -359,7 +359,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, memcpy(vif->auth.ssid.ssid, sme->ssid, sme->ssid_len); vif->auth.ssid.ssid_len = sme->ssid_len; } - vif->auth.key_mgmt_suite = cpu_to_be32(sme->crypto.akm_suites[0]); + vif->auth.key_mgmt_suite = be32_to_cpu((__force __be32)sme->crypto.akm_suites[0]); ether_addr_copy(vif->auth.bssid, sme->bssid); break; -- 2.34.1