staging: rtl8192u: ieee80211: Fix sparse endianness warnings
PATCH 1/1 staging: rtl8192u: ieee80211: Fix sparse endianness warnings
Fix the following sparse warnings:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: warning: incorrect type in assignment (different base types)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: expected restricted __le16 [usertype] frame_ctldrivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: got intdrivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: warning: invalid assignment: |=drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: left side has type restricted __le16drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: right side has type int
--- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +0 -0
@@ -660,2 +660,2 @@ inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *be auth = (struct ieee80211_authentication *)skb_put (skb,sizeof (struct ieee80211_authentication ));
- auth->header.frame_ctl = IEEE80211_STYPE_AUTH;
- if (challengelen) auth->header.frame_ctl |= IEEE80211_FCTL_WEP;
+ auth->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_AUTH);
+ if (challengelen)
+ auth->header.frame_ctl |= cpu_to_le16(IEEE80211_FCTL_WEP);
auth->header.duration_id = 0x013a; //FIXME
--
2.1.4
Greg KH
maintainerQuoted 21 lines · Gaston Gonzalez
Fix the following sparse warnings:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: warning: incorrect type in assignment (different base types)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: expected restricted__le16[usertype]frame_ctldrivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: got intdrivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: warning: invalid assignment: |=drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: left side has type restricted__le16drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: right side has type intSigned-off-by Gaston Gonzalez <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +0
-0
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *be
Quoted 10 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +3
-2@@ -660,2 +660,2 @@ inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *be auth = (struct ieee80211_authentication *)skb_put (skb,sizeof (struct ieee80211_authentication )); - auth->header.frame_ctl =IEEE80211_STYPE_AUTH ; -if (challengelen) auth->header.frame_ctl |=IEEE80211_FCTL_WEP ; + auth->header.frame_ctl =cpu_to_le16 (IEEE80211_STYPE_AUTH ); +if (challengelen) + auth->header.frame_ctl |=cpu_to_le16 (IEEE80211_FCTL_WEP ); auth->header.duration_id =0x013a ;//FIXME
This patch doesn't apply properly for some reason, can you fix it up and resend?
thanks,
greg k-h
Quoted 36 lines · Greg KH
Quoted 21 lines · Gaston Gonzalez
Fix the following sparse warnings:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: warning: incorrect type in assignment (different base types)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: expected restricted__le16[usertype]frame_ctldrivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: got intdrivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: warning: invalid assignment: |=drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: left side has type restricted__le16drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: right side has type intSigned-off-by Gaston Gonzalez <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +0
-0drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *be
Quoted 10 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +3
-2@@ -660,2 +660,2 @@ inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *be auth = (struct ieee80211_authentication *)skb_put (skb,sizeof (struct ieee80211_authentication )); - auth->header.frame_ctl =IEEE80211_STYPE_AUTH ; -if (challengelen) auth->header.frame_ctl |=IEEE80211_FCTL_WEP ; + auth->header.frame_ctl =cpu_to_le16 (IEEE80211_STYPE_AUTH ); +if (challengelen) + auth->header.frame_ctl |=cpu_to_le16 (IEEE80211_FCTL_WEP ); auth->header.duration_id =0x013a ;//FIXME This patch doesn't apply properly for some reason, can you fix it up and resend?
Quoted 3 lines
thanks,
greg k-h
Hi Greg,
I couldn't find the problem with this patch. Just in case I redo the patch against the updated staging-testing and resent it. To test it I did:
- run checkpatch
- git apply --check
- email it to myself and then 'git am' from mutt
- git log
I've just sent the patch. Please let me know if I missed something.
Thanks,
Gaston