Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639771 > unrolled thread

[PATCH 4.10 100/129] staging: wlan-ng: add missing byte order conversion

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-05-11 17:50 +0200
Last post2017-05-11 17:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.10 100/129] staging: wlan-ng: add missing byte order conversion Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 17:50 +0200

#1639771 — [PATCH 4.10 100/129] staging: wlan-ng: add missing byte order conversion

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-11 17:50 +0200
Subject[PATCH 4.10 100/129] staging: wlan-ng: add missing byte order conversion
Message-ID<tFYvN-8cz-45@gated-at.bofh.it>
4.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Igor Pylypiv <igor.pylypiv@gmail.com>

commit 2c474b8579e9b67ff72b2bcefce9f53c7f4469d4 upstream.

Conversion macros le16_to_cpu was removed and that caused new sparse warning

sparse output:
drivers/staging/wlan-ng/p80211netdev.c:241:44: warning: incorrect type in argument 2 (different base types)
drivers/staging/wlan-ng/p80211netdev.c:241:44:    expected unsigned short [unsigned] [usertype] fc
drivers/staging/wlan-ng/p80211netdev.c:241:44:    got restricted __le16 [usertype] fc

Fixes: 7ad82572348c ("staging:wlan-ng:Fix sparse warning")
Signed-off-by: Igor Pylypiv <igor.pylypiv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/staging/wlan-ng/p80211netdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -237,7 +237,7 @@ static int p80211_convert_to_ether(struc
 	struct p80211_hdr_a3 *hdr;
 
 	hdr = (struct p80211_hdr_a3 *)skb->data;
-	if (p80211_rx_typedrop(wlandev, hdr->fc))
+	if (p80211_rx_typedrop(wlandev, le16_to_cpu(hdr->fc)))
 		return CONV_TO_ETHER_SKIPPED;
 
 	/* perform mcast filtering: allow my local address through but reject

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web