All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] wifi: wilc1000: fix incorrect type assignment sparse warning
@ 2022-07-20 16:03 Ajay.Kathat
  2022-07-20 16:03 ` [PATCH 3/8] wifi: wilc1000: set correct value of 'close' variable in failure case Ajay.Kathat
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Ajay.Kathat @ 2022-07-20 16:03 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Sripad.Balwadgi, Ajay.Kathat, lkp

From: Ajay Singh <ajay.kathat@microchip.com>

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@intel.com>
Fixes: c5b331d4f550fb78 ("wifi: wilc1000: add WPA3 SAE support")
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-10-13 10:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20 16:03 [PATCH 1/8] wifi: wilc1000: fix incorrect type assignment sparse warning Ajay.Kathat
2022-07-20 16:03 ` [PATCH 3/8] wifi: wilc1000: set correct value of 'close' variable in failure case Ajay.Kathat
2022-07-20 16:03 ` [PATCH 2/8] wifi: wilc1000: add WID_TX_POWER WID in g_cfg_byte array Ajay.Kathat
2022-07-27 12:58   ` Kalle Valo
2022-07-20 16:03 ` [PATCH 5/8] wifi: wilc1000: get correct length of string WID from received config packet Ajay.Kathat
2022-07-20 16:03 ` [PATCH 4/8] wifi: wilc1000: set station_info flag only when signal value is valid Ajay.Kathat
2022-07-20 16:03 ` [PATCH 7/8] wifi: wilc1000: add 'isinit' flag for SDIO bus similar to SPI Ajay.Kathat
2022-07-20 16:03 ` [PATCH 6/8] wifi: wilc1000: cancel the connect operation during interface down Ajay.Kathat
2022-07-20 16:03 ` [PATCH 8/8] wifi: wilc1000: use existing iftype variable to store the interface type Ajay.Kathat
2022-07-27 13:00 ` [PATCH 1/8] wifi: wilc1000: fix incorrect type assignment sparse warning Kalle Valo
2022-07-27 17:32   ` Ajay.Kathat
2022-10-13  6:13     ` Kalle Valo
2022-10-13  7:39     ` Johannes Berg
2022-10-13  9:40       ` Jouni Malinen
2022-10-13 10:10         ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.