diff mbox series

[1/4] brcmfmac: fix a sparse incorrect type error in p2p.c

Message ID 20200519110951.88998-2-chi-hsien.lin@cypress.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series brcmfmac: SoftAP creation and dcmd buffer size changes | expand

Commit Message

Chi-Hsien Lin May 19, 2020, 11:09 a.m. UTC
Fix the below sparse error introduced by commit 9c29da3f4e7e
("brcmfmac: Fix P2P Group Formation failure via Go-neg method").

drivers/net/wireless/broadcom/brcm80211//brcmfmac/p2p.c:1741:40: error:
incorrect type in initializer (different base types)
drivers/net/wireless/broadcom/brcm80211//brcmfmac/p2p.c:1741:40:
expected signed int [usertype] requested_dwell
drivers/net/wireless/broadcom/brcm80211//brcmfmac/p2p.c:1741:40:    got
restricted __le32 [usertype] dwell_time
make[3]: *** [drivers/net/wireless/broadcom/brcm80211//brcmfmac/p2p.o]
Error 1

Fixes: 9c29da3f4e7ef ("brcmfmac: Fix P2P Group Formation failure via Go-neg method")
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--
2.25.0


This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message.
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index d2795dc17c46..194c1ac19402 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -1737,8 +1737,7 @@  bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg,
        uint delta_ms;
        unsigned long dwell_jiffies = 0;
        bool dwell_overflow = false;
-
-       s32 requested_dwell = af_params->dwell_time;
+       s32 requested_dwell = le32_to_cpu(af_params->dwell_time);

        action_frame = &af_params->action_frame;
        action_frame_len = le16_to_cpu(action_frame->len);