linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/7] mac80211: make ieee80211_get_hdrlen_from_skb return unsigned
@ 2008-06-06 17:51 Harvey Harrison
  2008-06-06 18:24 ` Michael Buesch
  0 siblings, 1 reply; 7+ messages in thread
From: Harvey Harrison @ 2008-06-06 17:51 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Many callers already expect it to.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 include/net/mac80211.h |    2 +-
 net/mac80211/util.c    |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 53c3b5e..7ab4ff6 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1535,7 +1535,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
  *
  * @skb: the frame
  */
-int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
+unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
 
 /**
  * ieee80211_get_hdrlen - get header length from frame control
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index fade001..60fec1c 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -165,15 +165,15 @@ out:
 }
 EXPORT_SYMBOL(ieee80211_hdrlen);
 
-int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb)
+unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb)
 {
 	const struct ieee80211_hdr *hdr = (const struct ieee80211_hdr *) skb->data;
-	int hdrlen;
+	unsigned int hdrlen;
 
-	if (unlikely(skb->len < 10))
+	if (skb->len < 10)
 		return 0;
-	hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control));
-	if (unlikely(hdrlen > skb->len))
+	hdrlen = ieee80211_hdrlen(hdr->frame_control);
+	if (hdrlen > skb->len)
 		return 0;
 	return hdrlen;
 }
-- 
1.5.6.rc1.257.gba91d



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

end of thread, other threads:[~2008-06-09 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-06 17:51 [PATCH 4/7] mac80211: make ieee80211_get_hdrlen_from_skb return unsigned Harvey Harrison
2008-06-06 18:24 ` Michael Buesch
2008-06-06 18:47   ` Harvey Harrison
2008-06-06 20:15     ` Pavel Roskin
2008-06-07  2:24       ` Harvey Harrison
2008-06-09  9:15         ` Johannes Berg
2008-06-09 16:25           ` Harvey Harrison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).